LR35902: Fix events running with the wrong cycle active
Jeffrey Pfau jeffrey@endrift.com
Wed, 21 Sep 2016 14:11:24 -0700
2 files changed,
2 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -7,6 +7,7 @@ - Qt: Fix "close" button on Overrides view
- Qt: Fix saving overrides - FFmpeg: Fix encoding AAC - GB Video: Fix video frames getting missed when LCDC is off + - LR35902: Fix events running with the wrong cycle active Misc: - All: Only update version info if needed - FFmpeg: Encoding cleanup
M
src/lr35902/lr35902.c
→
src/lr35902/lr35902.c
@@ -141,6 +141,7 @@ _LR35902Step(cpu);
if (cpu->cycles + 2 >= cpu->nextEvent) { int32_t diff = cpu->nextEvent - cpu->cycles; cpu->cycles = cpu->nextEvent; + cpu->executionState += diff; cpu->irqh.processEvents(cpu); cpu->cycles += 2 - diff; } else {