mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-19 21:55:11 +00:00
Adding internal registers for the CPU
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace ComSquare
|
||||
{
|
||||
std::shared_ptr<IMemory> MemoryBus::getAccessor(uint32_t addr)
|
||||
std::shared_ptr<IMemory> MemoryBus::getAccessor(uint24_t addr)
|
||||
{
|
||||
return *std::find_if(this->_memoryAccessors.begin(), this->_memoryAccessors.end(), [addr](std::shared_ptr<IMemory> &accessor)
|
||||
{
|
||||
@@ -16,7 +16,7 @@ namespace ComSquare
|
||||
});
|
||||
}
|
||||
|
||||
uint8_t MemoryBus::read(uint32_t addr)
|
||||
uint8_t MemoryBus::read(uint24_t addr)
|
||||
{
|
||||
std::shared_ptr<IMemory> handler = this->getAccessor(addr);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace ComSquare
|
||||
return data;
|
||||
}
|
||||
|
||||
void MemoryBus::write(uint32_t addr, uint8_t data)
|
||||
void MemoryBus::write(uint24_t addr, uint8_t data)
|
||||
{
|
||||
std::shared_ptr<IMemory> handler = this->getAccessor(addr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user