Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
saulfabregwiivc committed Aug 27, 2023
1 parent e648409 commit e1301c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/vba/gb/GB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2652,6 +2652,9 @@ void gbReset()
if (gbRomType >= 0x1c && gbRomType<=0x1e)
gbDataMBC5.isRumbleCartridge = 1;

memset(&gbDataMBC7, 0, sizeof(gbDataMBC7));
gbDataMBC7.mapperROMBank = 1;

memset(&gbDataHuC1, 0, sizeof(gbDataHuC1));
gbDataHuC1.mapperROMBank = 1;

Expand Down Expand Up @@ -3544,6 +3547,7 @@ static bool gbWriteSaveState(gzFile gzFile)
utilGzWrite(gzFile, &gbDataMBC2, sizeof(gbDataMBC2));
utilGzWrite(gzFile, &gbDataMBC3, sizeof(gbDataMBC3));
utilGzWrite(gzFile, &gbDataMBC5, sizeof(gbDataMBC5));
utilGzWrite(gzFile, &gbDataMBC7, sizeof(gbDataMBC7));
utilGzWrite(gzFile, &gbDataHuC1, sizeof(gbDataHuC1));
utilGzWrite(gzFile, &gbDataHuC3, sizeof(gbDataHuC3));
utilGzWrite(gzFile, &gbDataTAMA5, sizeof(gbDataTAMA5));
Expand Down Expand Up @@ -3712,6 +3716,7 @@ static bool gbReadSaveState(gzFile gzFile)
else
utilGzRead(gzFile, &gbDataMBC3, sizeof(gbDataMBC3));
utilGzRead(gzFile, &gbDataMBC5, sizeof(gbDataMBC5));
utilGzRead(gzFile, &gbDataMBC7, sizeof(gbDataMBC7));
utilGzRead(gzFile, &gbDataHuC1, sizeof(gbDataHuC1));
utilGzRead(gzFile, &gbDataHuC3, sizeof(gbDataHuC3));
if(version>=11)
Expand Down
1 change: 1 addition & 0 deletions source/vba/gb/gbMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ extern mapperMBC1 gbDataMBC1;
extern mapperMBC2 gbDataMBC2;
extern mapperMBC3 gbDataMBC3;
extern mapperMBC5 gbDataMBC5;
extern mapperMBC7 gbDataMBC7;
extern mapperHuC1 gbDataHuC1;
extern mapperHuC3 gbDataHuC3;
extern mapperTAMA5 gbDataTAMA5;
Expand Down

0 comments on commit e1301c6

Please sign in to comment.