GBA Memory: Log GPIO writes on non-GPIO carts as Pak Hardware instead of Memory

This commit is contained in:
Vicki Pfau 2021-04-03 00:32:35 -07:00
parent 91cfbbf676
commit 89928b86ac
2 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Other fixes:
Misc:
- Core: Truncate preloading ROMs that slightly exceed max size (fixes mgba.io/i/2093)
- GBA: Default-enable VBA bug compat for Ruby and Emerald ROM hacks
- GBA Memory: Log GPIO writes on non-GPIO carts as Pak Hardware instead of Memory
- Qt: Add ROM filename and size to bug reporter
0.9.0: (2021-03-28)

View File

@ -912,7 +912,11 @@ void GBAStore16(struct ARMCore* cpu, uint32_t address, int16_t value, int* cycle
}
break;
case REGION_CART0:
if (memory->hw.devices != HW_NONE && IS_GPIO_REGISTER(address & 0xFFFFFE)) {
if (IS_GPIO_REGISTER(address & 0xFFFFFE)) {
if (memory->hw.devices == HW_NONE) {
mLOG(GBA_HW, WARN, "Write to GPIO address %08X on cartridge without GPIO", address);
break;
}
uint32_t reg = address & 0xFFFFFE;
GBAHardwareGPIOWrite(&memory->hw, reg, value);
break;