diff --git a/src/gb/gb.c b/src/gb/gb.c index 9d050867f..99a0f1b72 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -65,9 +65,6 @@ static void GBInit(void* cpu, struct mCPUComponent* component) { gb->yankedRomSize = 0; gb->stream = NULL; - - gb->eiPending = INT_MAX; - gb->doubleSpeed = 0; } bool GBLoadROM(struct GB* gb, struct VFile* vf) { @@ -245,6 +242,9 @@ void GBReset(struct LR35902Core* cpu) { cpu->b = 0; cpu->d = 0; + gb->eiPending = INT_MAX; + gb->doubleSpeed = 0; + cpu->memory.setActiveRegion(cpu, cpu->pc); if (gb->yankedRomSize) { diff --git a/src/gb/video.c b/src/gb/video.c index 14ddd2082..d439953bf 100644 --- a/src/gb/video.c +++ b/src/gb/video.c @@ -43,6 +43,7 @@ void GBVideoInit(struct GBVideo* video) { void GBVideoReset(struct GBVideo* video) { video->ly = 0; + video->x = 0; video->mode = 1; video->stat = 1;