|
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... | |
| void | setMemoryRegion (uint24_t start, uint24_t end) |
| Change starting and ending points of this mapped memory. More... | |
| virtual bool | hasMemoryAt (uint24_t addr) |
| Return true if this component has mapped the address. More... | |
| virtual uint24_t | getStart () |
| Get the first address mapped to this component. More... | |
Private Attributes | |
| uint24_t | _start = 0 |
| The starting address mapped to this component. More... | |
| uint24_t | _end = 0 |
| The last continuous address mapped to this components. For shadows, see the MemoryShadow class. More... | |
Common interface implemented by all components mapping memory.
|
virtual |
Get the first address mapped to this component.
Reimplemented in ComSquare::Memory::IRectangleMemory.
|
virtual |
Return true if this component has mapped the address.
| addr | The address to check. |
Reimplemented in ComSquare::Memory::IRectangleMemory.
|
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::PPU::PPU, ComSquare::CPU::CPU, ComSquare::APU::DSP::DSP, ComSquare::APU::APU, ComSquare::Memory::IRectangleMemory, ComSquare::Ram::Ram, and ComSquare::Memory::MemoryShadow.
Change starting and ending points of this mapped memory.
| start | The first address mapped to this component. |
| end | The last address mapped to this component. |
|
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::PPU::PPU, ComSquare::CPU::CPU, ComSquare::APU::DSP::DSP, ComSquare::APU::APU, ComSquare::Memory::IRectangleMemory, ComSquare::Ram::Ram, and ComSquare::Memory::MemoryShadow.
|
private |
The last continuous address mapped to this components. For shadows, see the MemoryShadow class.
|
private |
The starting address mapped to this component.
1.8.17