summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinspectredc <78732756+inspectredc@users.noreply.github.com>2024-04-13 04:45:58 +0100
committerGitHub <noreply@github.com>2024-04-12 23:45:58 -0400
commitaa710337368e449ca6195c9cf9a72ea93f32dddd (patch)
tree42b178ef732b35132341160421328760990807ab
parent6cd066f5afd61f2171f57d95b69f1e0f3204588c (diff)
add compressed gc support (#12)
-rw-r--r--ZAPD/ZRom.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ZAPD/ZRom.cpp b/ZAPD/ZRom.cpp
index eb4f210..ed0bd24 100644
--- a/ZAPD/ZRom.cpp
+++ b/ZAPD/ZRom.cpp
@@ -43,6 +43,7 @@ namespace fs = std::filesystem;
#define OOT_OFF_TW_IQUE 0xB240
#define MM_OFF_US_10 0x1A500
+#define MM_OFF_US_GC 0x1AE90
#define MM_OFF_JP_10 0x1C110
#define MM_OFF_JP_11 0x1C050
#define MM_OFF_DBG 0x24F60
@@ -68,6 +69,7 @@ namespace fs = std::filesystem;
#define MM_NTSC_10 0x5354631C
#define MM_NTSC_10_UNCOMPRESSED 0xDA6983E7
+#define MM_NTSC_GC 0xB443EB08
bool ZRom::IsMQ() {
int crc = BitConverter::ToInt32BE(romData, 0x10);
@@ -88,6 +90,7 @@ bool ZRom::IsMQ() {
// MM - Always not MQ
case MM_NTSC_10:
case MM_NTSC_10_UNCOMPRESSED:
+ case MM_NTSC_GC:
default:
return false;
case OOT_NTSC_JP_MQ:
@@ -198,10 +201,17 @@ ZRom::ZRom(std::string romPath)
version.version = "MM US 1.0";
version.listPath = "mm.txt";
version.offset = MM_OFF_US_10;
+ break;
case MM_NTSC_10_UNCOMPRESSED:
version.version = "MM US 1.0";
version.listPath = "mm.txt";
version.offset = MM_OFF_US_10;
+ break;
+ case MM_NTSC_GC:
+ version.version = "MM US GC";
+ version.listPath = "mm_gc.txt";
+ version.offset = MM_OFF_US_GC;
+ break;
}
auto path = StringHelper::Sprintf("%s/%s", Globals::Instance->fileListPath.string().c_str(), version.listPath.c_str());