Seems like I forgot to finish implementing the stop instruction!
This commit is contained in:
parent
52afba21d1
commit
e6c4b4d1b2
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user