GB: Fix reset not working properly
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Aug 2016 19:14:56 -0700
2 files changed,
4 insertions(+),
3 deletions(-)
M
src/gb/gb.c
→
src/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.c
→
src/gb/video.c
@@ -43,6 +43,7 @@ }
void GBVideoReset(struct GBVideo* video) { video->ly = 0; + video->x = 0; video->mode = 1; video->stat = 1;