GBA Memory: Properly narrow down GPIO write validity check

This commit is contained in:
Vicki Pfau 2024-12-11 16:25:17 -08:00
parent 109fbe60f5
commit 655211651a
1 changed files with 1 additions and 1 deletions

View File

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