Minor adjustment to LCD timing after enabling it.

This commit is contained in:
Lior Halphon 2017-02-20 14:20:45 +02:00
parent 399e88d5fe
commit 91513ced22
1 changed files with 3 additions and 1 deletions

View File

@ -441,7 +441,9 @@ static void write_high_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
case GB_IO_LCDC:
if ((value & 0x80) && !(gb->io_registers[GB_IO_LCDC] & 0x80)) {
gb->display_cycles = 0;
/* It appears that there's a slight delay after enabling the screen? */
/* Todo: verify this. */
gb->display_cycles = gb->cgb_double_speed? -2 : -4;
}
gb->io_registers[GB_IO_LCDC] = value;
return;