diff --git a/src/gba/gba-io.c b/src/gba/gba-io.c index cee554037..5628b7384 100644 --- a/src/gba/gba-io.c +++ b/src/gba/gba-io.c @@ -297,7 +297,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { case REG_DISPSTAT: value &= 0xFFF8; GBAVideoWriteDISPSTAT(&gba->video, value); - break; + return; // Audio case REG_SOUND1CNT_LO: diff --git a/src/gba/gba-video.c b/src/gba/gba-video.c index 424a5f9b8..0cd7f52d5 100644 --- a/src/gba/gba-video.c +++ b/src/gba/gba-video.c @@ -169,7 +169,7 @@ int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles) { void GBAVideoWriteDISPSTAT(struct GBAVideo* video, uint16_t value) { video->p->memory.io[REG_DISPSTAT >> 1] &= 0x7; - video->p->memory.io[REG_DISPSTAT >> 1] |= value & 0xFFF8; + video->p->memory.io[REG_DISPSTAT >> 1] |= value; uint16_t dispstat = video->p->memory.io[REG_DISPSTAT >> 1];