mirror of https://github.com/mgba-emu/mgba.git
LR35902: Fix events running with the wrong cycle active
This commit is contained in:
parent
b309e9894c
commit
bf9017c89b
1
CHANGES
1
CHANGES
|
@ -7,6 +7,7 @@ Bugfixes:
|
||||||
- Qt: Fix saving overrides
|
- Qt: Fix saving overrides
|
||||||
- FFmpeg: Fix encoding AAC
|
- FFmpeg: Fix encoding AAC
|
||||||
- GB Video: Fix video frames getting missed when LCDC is off
|
- GB Video: Fix video frames getting missed when LCDC is off
|
||||||
|
- LR35902: Fix events running with the wrong cycle active
|
||||||
Misc:
|
Misc:
|
||||||
- All: Only update version info if needed
|
- All: Only update version info if needed
|
||||||
- FFmpeg: Encoding cleanup
|
- FFmpeg: Encoding cleanup
|
||||||
|
|
|
@ -141,6 +141,7 @@ void LR35902Tick(struct LR35902Core* cpu) {
|
||||||
if (cpu->cycles + 2 >= cpu->nextEvent) {
|
if (cpu->cycles + 2 >= cpu->nextEvent) {
|
||||||
int32_t diff = cpu->nextEvent - cpu->cycles;
|
int32_t diff = cpu->nextEvent - cpu->cycles;
|
||||||
cpu->cycles = cpu->nextEvent;
|
cpu->cycles = cpu->nextEvent;
|
||||||
|
cpu->executionState += diff;
|
||||||
cpu->irqh.processEvents(cpu);
|
cpu->irqh.processEvents(cpu);
|
||||||
cpu->cycles += 2 - diff;
|
cpu->cycles += 2 - diff;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue