all repos — mgba @ c9145e18d7504e07c3d67aaadae7de5e22ea3179

mGBA Game Boy Advance Emulator

Partially revert "GB: Fix execution state and HALT getting out of sync"

This reverts commit 5d9e4d217a273bec4dfdddafdea85e25eda7a45f.
Vicki Pfau vi@endrift.com
Sun, 19 Nov 2017 07:29:37 -0800
commit

c9145e18d7504e07c3d67aaadae7de5e22ea3179

parent

e104b465640fe584cc6fd402d3c78e57e9819905

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

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

@@ -622,8 +622,6 @@ break;

} if (cpu->halted) { cpu->cycles = cpu->nextEvent; - cpu->executionState += cpu->nextEvent; - cpu->executionState &= 3; if (!gb->memory.ie || !gb->memory.ime) { break; }

@@ -681,8 +679,6 @@

void GBHalt(struct LR35902Core* cpu) { struct GB* gb = (struct GB*) cpu->master; if (!(gb->memory.ie & gb->memory.io[REG_IF])) { - cpu->executionState += cpu->nextEvent - cpu->cycles; - cpu->executionState &= 3; cpu->cycles = cpu->nextEvent; cpu->halted = true; } else if (gb->model < GB_MODEL_CGB) {