From ab550f6d3edd9512f559cf17c18cf1bc431b1b1b Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 23 Aug 2022 23:08:54 +0200 Subject: [PATCH] Emulator: Fix offset bug in writeMemory() function --- src/emu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu.cpp b/src/emu.cpp index a850623..7959ab0 100644 --- a/src/emu.cpp +++ b/src/emu.cpp @@ -65,7 +65,7 @@ void Emu::writeMemory(uint32_t address, uint32_t value) writeMemory(address + (0xe000 - 0xc000), value); } - memory.memory[memory.active_bank][address] = value; + memory.memory[memory.active_bank][address - memory.start_address] = value; return; } }