Skip to content

Commit

Permalink
Fix dumping EEPROM registers in 32 MB ROMs (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Epicpkmn11 authored Dec 31, 2023
1 parent 196a85a commit a727ca4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arm9/source/dumpOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,14 @@ void gbaCartDump(void) {
}
}

// 32MB + EEPROM: Fix last 256 bytes
if(!failed && (romSize == (32 << 20) && (saveType == SAVE_GBA_EEPROM_05 || saveType == SAVE_GBA_EEPROM_8))) {
u8 buffer[256];
toncset(buffer, ((u8 *)GBAROM)[((32 << 20) - 257)], 256);
fseek(destinationFile, -256, SEEK_END);
fwrite(buffer, 1, 256, destinationFile);
}

// Check for 64MB GBA Video ROM
if ((strncmp((char*)0x080000AC, "MSAE", 4) == 0 // Shark Tale
|| strncmp((char*)0x080000AC, "MSKE", 4) == 0 // Shrek
Expand Down

0 comments on commit a727ca4

Please sign in to comment.