From 999cae1f8e6bb2b46a0e1568c14f839a80dd9d54 Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Mon, 7 Sep 2020 02:50:28 -0600 Subject: [PATCH] Properly dump *Shrek & Shark Tale* GBA Video ROM properly --- arm9/source/dumpOperations.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arm9/source/dumpOperations.cpp b/arm9/source/dumpOperations.cpp index 4eb4531..cee9a45 100644 --- a/arm9/source/dumpOperations.cpp +++ b/arm9/source/dumpOperations.cpp @@ -567,12 +567,21 @@ void gbaCartDump(void) { } // Dump! remove(destPath); + // Reset data at virtual address + u32 rstCmd[4] = { + 0x11, // Command + 0x1000, // ROM address + 0x08001000, // Virtual address + 0x8, // Size (in 0x200 byte blocks) + }; + writeChange(rstCmd); FILE* destinationFile = fopen(destPath, "wb"); fwrite(GBAROM, 1, romSize, destinationFile); fclose(destinationFile); // Check for 64MB GBA Video ROM if (strncmp((char*)0x080000AC, "MSAE", 4)==0 // Shark Tale || strncmp((char*)0x080000AC, "MSKE", 4)==0 // Shrek + || strncmp((char*)0x080000AC, "MSTE", 4)==0 // Shrek & Shark Tale || strncmp((char*)0x080000AC, "M2SE", 4)==0 // Shrek 2 ) { // Dump last 32MB