|
|
|
@ -20,7 +20,7 @@ int main(int argc, char* argv[])
|
|
|
|
|
|
|
|
|
|
print("{}ms\n", t.elapsedNanoseconds() / 1000000.0); |
|
|
|
|
|
|
|
|
|
Emu::the().init(8000000, "gbc_bios.bin"); |
|
|
|
|
Emu::the().init(8000000); |
|
|
|
|
|
|
|
|
|
CPU cpu(8000000); |
|
|
|
|
PPU ppu(4000000); |
|
|
|
@ -36,9 +36,9 @@ int main(int argc, char* argv[])
|
|
|
|
|
Emu::the().addMemorySpace("CARDRAM", 0xa000, 0xbfff); // 8KiB
|
|
|
|
|
Emu::the().addMemorySpace("WRAM1", 0xc000, 0xcfff, 1); // 4 KiB, Work RAM
|
|
|
|
|
Emu::the().addMemorySpace("WRAM2", 0xd000, 0xdfff, 7); // 4 KiB * 7 banks, Work RAM
|
|
|
|
|
Emu::the().addMemorySpace("ECHORAM", 0xe000, 0xfdff, 1); // 7679B, Mirror of 0xc000~0xddff
|
|
|
|
|
Emu::the().addMemorySpace("OAM", 0xfe00, 0xfe9f, 1); // 4KiB, Object Attribute Memory (VRAM Sprite Attribute Table)
|
|
|
|
|
Emu::the().addMemorySpace("HRAM", 0xff80, 0xfffe, 1); // 126B, High RAM (CPU cache)
|
|
|
|
|
Emu::the().addMemorySpace("ECHORAM", 0xe000, 0xfdff, 1); // 7680B, Mirror of 0xc000~0xddff
|
|
|
|
|
Emu::the().addMemorySpace("OAM", 0xfe00, 0xfe9f, 1); // 160B, Object Attribute Memory (VRAM Sprite Attribute Table)
|
|
|
|
|
Emu::the().addMemorySpace("HRAM", 0xff80, 0xfffe, 1); // 127B, High RAM (CPU cache)
|
|
|
|
|
|
|
|
|
|
// Get shared register
|
|
|
|
|
print("{}\n", *Emu::the().processingUnit("cpu")->sharedRegister("a")); |
|
|
|
|