diff --git a/Core/display.c b/Core/display.c index 2f38afb..fac567c 100644 --- a/Core/display.c +++ b/Core/display.c @@ -198,7 +198,7 @@ void display_vblank(GB_gameboy_t *gb) frames++; */ - if (!(gb->io_registers[GB_IO_LCDC] & 0x80)) { + if (!(gb->io_registers[GB_IO_LCDC] & 0x80) || gb->stopped) { /* LCD is off, memset screen to white */ memset(gb->screen, 0xFF, 160 * 144 * 4); } diff --git a/Core/z80_cpu.c b/Core/z80_cpu.c index 5018bce..e94beda 100644 --- a/Core/z80_cpu.c +++ b/Core/z80_cpu.c @@ -1333,7 +1333,7 @@ void cpu_run(GB_gameboy_t *gb) /* Run pseudo instructions rst 40-60*/ rst(gb, 0x87 + interrupt_bit * 8); } - else if(!gb->halted) { + else if(!gb->halted && !gb->stopped) { unsigned char opcode = read_memory(gb, gb->pc); opcodes[opcode](gb, opcode); }