From d03a1fbd16e3ed7ab205803ba8ab348d5e89e31d Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 6 Aug 2016 14:36:33 +0300 Subject: [PATCH] Fixed TMA writing while reloading. --- Core/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/memory.c b/Core/memory.c index f34fe865..c12c1861 100644 --- a/Core/memory.c +++ b/Core/memory.c @@ -384,7 +384,7 @@ static void write_high_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value) case GB_IO_TMA: gb->io_registers[GB_IO_TMA] = value; - if (gb->tima_reload_state == GB_TIMA_RELOADED) { + if (gb->tima_reload_state != GB_TIMA_RUNNING) { gb->io_registers[GB_IO_TIMA] = value; } return;