|
ComSquare
|
Common interface implemented by all components mapping memory. More...
#include <IMemory.hpp>
Public Member Functions | |
| virtual uint8_t | read (uint24_t addr)=0 |
| Read data from the component. More... | |
| virtual void | write (uint24_t addr, uint8_t data)=0 |
| Write data to this component. More... | |
| virtual bool | hasMemoryAt (uint24_t addr) const =0 |
| Return true if this component has mapped the address. More... | |
| virtual uint24_t | getRelativeAddress (uint24_t addr) const =0 |
| Translate an absolute address to a relative address. More... | |
| virtual uint24_t | getSize () const =0 |
| Get the size of the data. This size can be lower than the mapped data. More... | |
| virtual std::string | getName () const =0 |
| Get the name of this accessor (used for debug purpose) More... | |
| virtual Component | getComponent () const =0 |
| Get the component of this accessor (used for debug purpose) More... | |
| virtual std::string | getValueName (uint24_t addr) const =0 |
| Get the name of the data at the address. More... | |
| virtual | ~IMemory ()=default |
| A virtual default destructor. More... | |
Common interface implemented by all components mapping memory.
|
virtualdefault |
A virtual default destructor.
|
pure virtual |
Get the component of this accessor (used for debug purpose)
Implemented in ComSquare::CPU::CPU, ComSquare::APU::APU, ComSquare::PPU::PPU, ComSquare::APU::IPL::IPL, ComSquare::Memory::RectangleShadow, ComSquare::Ram::Ram, and ComSquare::Memory::MemoryShadow.
|
pure virtual |
Get the name of this accessor (used for debug purpose)
Implemented in ComSquare::CPU::CPU, ComSquare::APU::APU, ComSquare::PPU::PPU, ComSquare::APU::IPL::IPL, ComSquare::Memory::RectangleShadow, ComSquare::Ram::Ram, and ComSquare::Memory::MemoryShadow.
Translate an absolute address to a relative address.
| addr | The absolute address (in the 24 bit bus) |
| InvalidAddress | is thrown if the address is not mapped by this component. |
Implemented in ComSquare::Memory::RectangleShadow, ComSquare::Memory::ARectangleMemory, and ComSquare::Memory::AMemory.
|
pure virtual |
Get the size of the data. This size can be lower than the mapped data.
Implemented in ComSquare::CPU::CPU, ComSquare::APU::APU, ComSquare::Cartridge::Cartridge, ComSquare::PPU::PPU, ComSquare::APU::IPL::IPL, ComSquare::Ram::Ram, ComSquare::Memory::RectangleShadow, and ComSquare::Memory::MemoryShadow.
|
pure virtual |
Get the name of the data at the address.
| addr | The address (in local space) |
Implemented in ComSquare::CPU::CPU, ComSquare::APU::APU, ComSquare::PPU::PPU, ComSquare::APU::IPL::IPL, ComSquare::Memory::MemoryShadow, and ComSquare::Memory::ARectangleMemory.
|
pure virtual |
Return true if this component has mapped the address.
| addr | The address to check. |
Implemented in ComSquare::Memory::AMemory, and ComSquare::Memory::ARectangleMemory.
|
pure virtual |
Read data from the component.
| addr | The local address to read from (0x0 should refer to the first byte of this component). |
| This | function should thrown an InvalidAddress for address that are not mapped to the component. |
Implemented in ComSquare::CPU::CPU, ComSquare::APU::APU, ComSquare::Cartridge::Cartridge, ComSquare::PPU::PPU, ComSquare::APU::IPL::IPL, ComSquare::Memory::RectangleShadow, ComSquare::Ram::Ram, and ComSquare::Memory::MemoryShadow.
|
pure virtual |
Write data to this component.
| addr | The local address to write data (0x0 should refer to the first byte of this component). |
| data | The new data to write. |
| This | function should thrown an InvalidAddress for address that are not mapped to the component. |
Implemented in ComSquare::CPU::CPU, ComSquare::APU::APU, ComSquare::Cartridge::Cartridge, ComSquare::PPU::PPU, ComSquare::APU::IPL::IPL, ComSquare::Memory::RectangleShadow, ComSquare::Ram::Ram, and ComSquare::Memory::MemoryShadow.
1.8.17