summaryrefslogtreecommitdiff
path: root/src/n64/Cartridge.cpp
diff options
context:
space:
mode:
authorbriaguya <70942617+briaguya0@users.noreply.github.com>2026-07-24 18:09:55 -0400
committerGitHub <noreply@github.com>2026-07-24 18:09:55 -0400
commit4cae44160693e1beb562e39dc301bd42278be1f9 (patch)
tree5d247f7821a6040221b4bf34d2cae2b87c42d23a /src/n64/Cartridge.cpp
parentcd33252589a61d044138f449041a87adee2a8291 (diff)
oot support (#219)
Diffstat (limited to 'src/n64/Cartridge.cpp')
-rw-r--r--src/n64/Cartridge.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/n64/Cartridge.cpp b/src/n64/Cartridge.cpp
index cca2f78..f165b5b 100644
--- a/src/n64/Cartridge.cpp
+++ b/src/n64/Cartridge.cpp
@@ -7,7 +7,11 @@ void N64::Cartridge::Initialize() {
LUS::BinaryReader reader((char*)this->gRomData.data(), this->gRomData.size());
reader.SetEndianness(Torch::Endianness::Big);
reader.Seek(0x10, LUS::SeekOffsetType::Start);
+#ifdef ROM_CRC_BSWAP
this->gRomCRC = BSWAP32(reader.ReadUInt32());
+#else
+ this->gRomCRC = reader.ReadUInt32();
+#endif
reader.Seek(0x20, LUS::SeekOffsetType::Start);
this->gGameTitle = std::string(reader.ReadCString());
this->gGameTitle.pop_back(); // Remove null terminator