mirror of https://github.com/mgba-emu/mgba.git
Fix 8-bit I/O writes
This commit is contained in:
parent
15aa862d70
commit
3f122dcf14
|
@ -130,9 +130,9 @@ void GBAIOWrite8(struct GBA* gba, uint32_t address, uint8_t value) {
|
|||
}
|
||||
return;
|
||||
}
|
||||
value <<= 8 * (address & 1);
|
||||
value |= (gba->memory.io[(address & (SIZE_IO - 1)) >> 1]) & ~(0xFF << (8 * (address & 1)));
|
||||
GBAIOWrite(gba, address, value);
|
||||
uint16_t value16 = value << (8 * (address & 1));
|
||||
value16 |= (gba->memory.io[(address & (SIZE_IO - 1)) >> 1]) & ~(0xFF << (8 * (address & 1)));
|
||||
GBAIOWrite(gba, address & 0xFFFFFFFE, value16);
|
||||
}
|
||||
|
||||
void GBAIOWrite32(struct GBA* gba, uint32_t address, uint32_t value) {
|
||||
|
|
Loading…
Reference in New Issue