all repos — mgba @ 1f137b06ac4549f55fc3296c1ed6298ada56c35d

mGBA Game Boy Advance Emulator

GB Video: Attempt to reproduce STAT bug
Jeffrey Pfau jeffrey@endrift.com
Sat, 27 Feb 2016 01:39:46 -0800
commit

1f137b06ac4549f55fc3296c1ed6298ada56c35d

parent

53e70a54601738b89ada5feaa19f54058e3632d8

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/gb/video.csrc/gb/video.c

@@ -271,6 +271,10 @@ }

void GBVideoWriteSTAT(struct GBVideo* video, GBRegisterSTAT value) { video->stat = (video->stat & 0x7) | (value & 0x78); + if (video->p->model == GB_MODEL_DMG && video->mode == 1) { + video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT); + GBUpdateIRQs(video->p); + } } void GBVideoWritePalette(struct GBVideo* video, uint16_t address, uint8_t value) {