Go to the documentation of this file.
25 RectangleShadow(
IMemory &initial, uint8_t startBank, uint8_t endBank, uint16_t startPage, uint16_t endPage);
56 [[nodiscard]] std::string
getName()
const override;
IMemory & getMirrored() const
Return the memory accessor this accessor mirror if any.
Definition: RectangleShadow.cpp:46
Component getComponent() const override
Get the component of this accessor (used for debug purpose)
Definition: RectangleShadow.cpp:56
Component
Definition: Components.hpp:9
int _bankOffset
The number of banks to add to the memory before accessing it from the initial data.
Definition: RectangleShadow.hpp:18
Base memory class to map non continuous rectangle to the memory. (A rectangle that spam across more t...
Definition: ARectangleMemory.hpp:13
unsigned uint24_t
Definition: Ints.hpp:10
uint24_t getRelativeAddress(uint24_t addr) const override
Translate an absolute address to a relative address.
Definition: RectangleShadow.cpp:20
Common interface implemented by all components mapping memory.
Definition: IMemory.hpp:17
~RectangleShadow() override=default
A default destructor.
uint24_t getSize() const override
Get the size of the data. This size can be lower than the mapped data.
Definition: RectangleShadow.cpp:41
Definition: RectangleShadow.hpp:13
RectangleShadow(IMemory &initial, uint8_t startBank, uint8_t endBank, uint16_t startPage, uint16_t endPage)
Create a shadow for the memory given as parameter.
Definition: RectangleShadow.cpp:10
std::string getName() const override
Get the name of this accessor (used for debug purpose)
Definition: RectangleShadow.cpp:51
Definition: AMemory.cpp:7
void setBankOffset(int bankOffset)
Set the number of bank this component do not shadow. Referring to the first byte of this component wi...
Definition: RectangleShadow.cpp:36
IMemory & _initial
Memory to shadow from.
Definition: RectangleShadow.hpp:16
void write(uint24_t addr, uint8_t data) override
Write data to the ram.
Definition: RectangleShadow.cpp:31
RectangleShadow & operator=(const RectangleShadow &)=delete
@brrief A rectangle shadow is not assignable
uint8_t read(uint24_t addr) override
Read from the initial AMemory given.
Definition: RectangleShadow.cpp:26