get rid of memory.cc/.hh

also fix bus' shared pointer in cpu
TODO: put cpu in bus not the other way around

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2024-06-14 05:37:10 +05:30
parent ffcdf5f3a7
commit 9397140473
16 changed files with 456 additions and 486 deletions

View File

@@ -43,7 +43,7 @@ uint32_t
CpuFixture::getr_(uint8_t r, Cpu& cpu) {
uint32_t addr = 0x02000000;
uint8_t offset = r == 15 ? 4 : 0;
uint32_t word = bus.read_word(addr + offset);
uint32_t word = bus->read_word(addr + offset);
Cpu tmp = cpu;
uint32_t ret = 0xFFFFFFFF;
uint8_t base = r ? 0 : 1;
@@ -74,9 +74,9 @@ CpuFixture::getr_(uint8_t r, Cpu& cpu) {
addr += offset;
ret = bus.read_word(addr);
ret = bus->read_word(addr);
bus.write_word(addr, word);
bus->write_word(addr, word);
return ret;
}