GB IO: Unused MMIO bits read high
Jeffrey Pfau jeffrey@endrift.com
Wed, 20 Jan 2016 21:58:36 -0800
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/gb/io.c
→
src/gb/io.c
@@ -63,7 +63,7 @@ case REG_TAC:
value = GBTimerUpdateTAC(&gb->timer, value); break; case REG_IF: - gb->memory.io[REG_IF] = value; + gb->memory.io[REG_IF] = value | 0xE0; GBUpdateIRQs(gb); return; case REG_LCDC:@@ -109,7 +109,7 @@ default:
// ??? break; } - return (gb->memory.io[REG_JOYP] | 0xF) ^ (keys & 0xF); + return 0xC0 | (gb->memory.io[REG_JOYP] | 0xF) ^ (keys & 0xF); } uint8_t GBIORead(struct GB* gb, unsigned address) {