Adding const qualifiers to the IMemory and adding error messages in the memory viewer

This commit is contained in:
Zoe Roux
2021-02-04 10:22:30 +01:00
parent 2e4e39a696
commit c9eed50289
30 changed files with 208 additions and 123 deletions

View File

@@ -18,13 +18,13 @@ namespace ComSquare::Memory
this->setMemoryRegion(startBank, endBank, startPage, endPage);
}
uint24_t RectangleShadow::getRelativeAddress(uint24_t addr)
uint24_t RectangleShadow::getRelativeAddress(uint24_t addr) const
{
uint24_t base = ARectangleMemory::getRelativeAddress(addr);
return base + this->_bankOffset * (this->_endPage - this->_startPage);
}
uint8_t RectangleShadow::read(uint24_t addr)
uint8_t RectangleShadow::read(uint24_t addr) const
{
return this->_initial->read(addr);
}
@@ -40,22 +40,27 @@ namespace ComSquare::Memory
return this;
}
bool RectangleShadow::isMirror()
uint24_t RectangleShadow::getSize() const
{
return this->_initial->getSize();
}
bool RectangleShadow::isMirror() const
{
return true;
}
std::shared_ptr<IMemory> RectangleShadow::getMirrored()
std::shared_ptr<IMemory> RectangleShadow::getMirrored() const
{
return this->_initial;
}
std::string RectangleShadow::getName()
std::string RectangleShadow::getName() const
{
return this->_initial->getName();
}
Component RectangleShadow::getComponent()
Component RectangleShadow::getComponent() const
{
return this->_initial->getComponent();
}