all repos — mgba @ f9ebe36faccf4267bde327f3b607a3054ca7f862

mGBA Game Boy Advance Emulator

Fix regression caused by converting DISPSTAT into a bitfield
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 Oct 2014 23:19:26 -0700
commit

f9ebe36faccf4267bde327f3b607a3054ca7f862

parent

38e8cc1ee45bc49164e76c979463e3b9d1a7370e

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M src/gba/gba-video.csrc/gba/gba-video.c

@@ -157,7 +157,8 @@ return video->nextEvent;

} void GBAVideoWriteDISPSTAT(struct GBAVideo* video, uint16_t value) { - video->dispstat = value; + video->dispstat &= 0x7; + video->dispstat |= value & 0xFFF8; if (GBARegisterDISPSTATIsVcounterIRQ(video->dispstat)) { // FIXME: this can be too late if we're in the middle of an Hblank