GB: Fix reset not working properly

This commit is contained in:
Jeffrey Pfau 2016-08-19 19:14:56 -07:00
parent 5e50a635cf
commit 7643e45212
2 changed files with 4 additions and 3 deletions

View File

@ -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) {

View File

@ -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;