mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-20 14:15:11 +00:00
Fixing memory shadow's bank offset
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include "RectangleShadow.hpp"
|
||||
#include "../Utility/Utility.hpp"
|
||||
|
||||
#include <utility>
|
||||
#include <iostream>
|
||||
@@ -17,13 +18,13 @@ namespace ComSquare::Memory
|
||||
|
||||
uint8_t RectangleShadow::read_internal(uint24_t addr)
|
||||
{
|
||||
addr += this->_bankOffset << 16u;
|
||||
addr += this->_bankOffset * (this->_endPage - this->_startPage);
|
||||
return this->_initial->read_internal(addr);
|
||||
}
|
||||
|
||||
void RectangleShadow::write_internal(uint24_t addr, uint8_t data)
|
||||
{
|
||||
addr += this->_bankOffset << 16u;
|
||||
addr += this->_bankOffset * (this->_endPage - this->_startPage);
|
||||
this->_initial->write_internal(addr, data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user