diff --git a/Core/z80_cpu.c b/Core/z80_cpu.c index 06f52ba..aec3bea 100644 --- a/Core/z80_cpu.c +++ b/Core/z80_cpu.c @@ -32,6 +32,7 @@ static void stop(GB_gameboy_t *gb, uint8_t opcode) else { gb->stopped = true; } + gb->pc++; } /* Operand naming conventions for functions: diff --git a/Core/z80_disassembler.c b/Core/z80_disassembler.c index 2426596..4b1d6ea 100644 --- a/Core/z80_disassembler.c +++ b/Core/z80_disassembler.c @@ -22,8 +22,14 @@ static void nop(GB_gameboy_t *gb, uint8_t opcode, uint16_t *pc) static void stop(GB_gameboy_t *gb, uint8_t opcode, uint16_t *pc) { - GB_log(gb, "STOP\n"); (*pc)++; + uint8_t next = GB_read_memory(gb, (*pc)++); + if (next) { + GB_log(gb, "CORRUPTED STOP (%02x)\n", next); + } + else { + GB_log(gb, "STOP\n"); + } } static char *register_names[] = {"af", "bc", "de", "hl", "sp"};