mirror of https://github.com/mgba-emu/mgba.git
GB IO: Unused MMIO bits read high
This commit is contained in:
parent
e284a059a2
commit
73e3532277
|
@ -63,7 +63,7 @@ void GBIOWrite(struct GB* gb, unsigned address, uint8_t value) {
|
|||
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 @@ static uint8_t _readKeys(struct GB* gb) {
|
|||
// ???
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue