all repos — mgba @ 7643e45212f5ad4a405de53348dc697017df086a

mGBA Game Boy Advance Emulator

GB: Fix reset not working properly
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Aug 2016 19:14:56 -0700
commit

7643e45212f5ad4a405de53348dc697017df086a

parent

5e50a635cf1ba6a02d9591fc623dc68aa8b82fa9

2 files changed, 4 insertions(+), 3 deletions(-)

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

@@ -65,9 +65,6 @@ gb->pristineRomSize = 0;

gb->yankedRomSize = 0; gb->stream = NULL; - - gb->eiPending = INT_MAX; - gb->doubleSpeed = 0; } bool GBLoadROM(struct GB* gb, struct VFile* vf) {

@@ -244,6 +241,9 @@ }

cpu->b = 0; cpu->d = 0; + + gb->eiPending = INT_MAX; + gb->doubleSpeed = 0; cpu->memory.setActiveRegion(cpu, cpu->pc);
M src/gb/video.csrc/gb/video.c

@@ -43,6 +43,7 @@ }

void GBVideoReset(struct GBVideo* video) { video->ly = 0; + video->x = 0; video->mode = 1; video->stat = 1;