Fix stat_lyc_onoff
This commit is contained in:
parent
8b4714d8e2
commit
80b1275e07
@ -311,11 +311,9 @@ static void update_display_state(GB_gameboy_t *gb, uint8_t cycles)
|
|||||||
if (!(gb->io_registers[GB_IO_LCDC] & 0x80)) {
|
if (!(gb->io_registers[GB_IO_LCDC] & 0x80)) {
|
||||||
/* LCD is disabled, state is constant */
|
/* LCD is disabled, state is constant */
|
||||||
|
|
||||||
/* When the LCD is off, LY is 0 and STAT mode is 0.
|
/* When the LCD is off, LY is 0 and STAT mode is 0. */
|
||||||
Todo: Verify the LY=LYC flag should be on. */
|
|
||||||
gb->io_registers[GB_IO_LY] = 0;
|
gb->io_registers[GB_IO_LY] = 0;
|
||||||
gb->io_registers[GB_IO_STAT] &= ~3;
|
gb->io_registers[GB_IO_STAT] &= ~3;
|
||||||
gb->io_registers[GB_IO_STAT] |= 4;
|
|
||||||
gb->effective_scx = gb->io_registers[GB_IO_SCX];
|
gb->effective_scx = gb->io_registers[GB_IO_SCX];
|
||||||
if (gb->hdma_on_hblank) {
|
if (gb->hdma_on_hblank) {
|
||||||
gb->hdma_on_hblank = false;
|
gb->hdma_on_hblank = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user