Fix the Joypad interrupt. Fixes #237

This commit is contained in:
Lior Halphon 2020-03-27 17:36:55 +03:00
parent 876b36ac1c
commit 05403d3a56

View File

@ -780,7 +780,7 @@ static void write_high_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
}
else if ((gb->io_registers[GB_IO_JOYP] & 0x30) != (value & 0x30)) {
GB_sgb_write(gb, value);
gb->io_registers[GB_IO_JOYP] = value & 0xF0;
gb->io_registers[GB_IO_JOYP] = (value & 0xF0) | (gb->io_registers[GB_IO_JOYP] & 0x0F);
GB_update_joyp(gb);
}
return;