Adding internal registers for the CPU

This commit is contained in:
AnonymusRaccoon
2020-01-28 11:48:13 +01:00
parent ab71231fd8
commit 208d1b14d6
12 changed files with 215 additions and 61 deletions

View File

@@ -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);