std::vector< RectangleShadow > _rectangleShadows
The list of rectangle memory shadows that are used to map duplicated zones of memory.
Definition: MemoryBus.hpp:31
uint8_t read(uint24_t addr) override
Read data at a global address. This form allow read to be silenced.
Definition: MemoryBus.cpp:25
The memory bus is the component responsible of mapping addresses to components address and transmitti...
Definition: MemoryBus.hpp:22
uint8_t _openBus
The last value read via the memory bus.
Definition: MemoryBus.hpp:39
std::optional< uint8_t > peek(uint24_t addr) override
This as the same purpose as a read but it does not change the open bus and won't throw an exception.
Definition: MemoryBus.cpp:39
std::vector< MemoryShadow > _shadows
The list of simple memory shadows that are used to map duplicated zones of memory.
Definition: MemoryBus.hpp:29
std::vector< std::reference_wrapper< IMemory > > _memoryAccessors
The list of components registered inside the bus. Every components that can read/write to a public ad...
Definition: MemoryBus.hpp:26
uint8_t peek_v(uint24_t addr) override
This as the same purpose as a read but it does not change the open bus and won't throw an exception.
Definition: MemoryBus.cpp:52
MemoryBus & operator=(const MemoryBus &)=default
A memory bus is assignable.
unsigned uint24_t
Definition: Ints.hpp:10
MemoryBus()=default
Create a new default memory bus.
Common interface implemented by all components mapping memory.
Definition: IMemory.hpp:17
Container of all the components of the SNES.
Definition: SNES.hpp:32
The memory bus is the component responsible of mapping addresses to components address and transmitti...
Definition: IMemoryBus.hpp:19
void write(uint24_t addr, uint8_t data) override
Write a data to a global address.
Definition: MemoryBus.cpp:60
void mapComponents(SNES &console)
Map components to the address space using the currently loaded cartridge to set the right mapping mod...
Definition: MemoryBus.cpp:79
void _mirrorComponents(SNES &console, unsigned i)
WRam, CPU, PPU & APU registers are mirrored to all banks of Q1 & Q3. This function is used for the mi...
Definition: MemoryBus.cpp:71
IMemory * getAccessor(uint24_t addr) override
Helper function to get the components that is responsible of read/write at an address.
Definition: MemoryBus.cpp:14
~MemoryBus() override=default
A default destructor.