all repos — mgba @ 7ef68dab5723576744dc4af5aa4cc0a543a516a1

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

7ef68dab5723576744dc4af5aa4cc0a543a516a1

parent

47634adafa931b90f727bbec883dd1ac66d49d80

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 {