all repos — mgba @ 73e3532277c14f1eca6d5d822e56340e6352e473

mGBA Game Boy Advance Emulator

GB IO: Unused MMIO bits read high
Jeffrey Pfau jeffrey@endrift.com
Wed, 20 Jan 2016 21:58:36 -0800
commit

73e3532277c14f1eca6d5d822e56340e6352e473

parent

e284a059a2e4ae84ee10c2a7f1b78d00420bf41b

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gb/io.csrc/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) {