all repos — mgba @ bf9017c89bc8a008a3afbd68d58851fb10f1f473

mGBA Game Boy Advance Emulator

LR35902: Fix events running with the wrong cycle active
Jeffrey Pfau jeffrey@endrift.com
Wed, 21 Sep 2016 14:11:24 -0700
commit

bf9017c89bc8a008a3afbd68d58851fb10f1f473

parent

b309e9894c941771d2dabd9e6fcd7e0dad3af6fc

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

jump to
M CHANGESCHANGES

@@ -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.csrc/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 {