X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffile.cpp;h=7fd96ef59edaad467be216dbc7e9875928aac9c7;hb=80871c4045dd1aa9b60e03b9cc92e7d2835a2387;hp=22f3c8fee3d709645ffe7942fb71a2a74d296e12;hpb=34c2f4526d11f2139130c4c94920dd7b1c7a6124;p=virtualjaguar diff --git a/src/file.cpp b/src/file.cpp index 22f3c8f..7fd96ef 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -126,9 +126,11 @@ bool JaguarLoadFile(char * path) EepromInit(); jaguarRunAddress = 0x802000; // For non-BIOS runs, this is true int fileType = ParseFileType(buffer[0], buffer[1], jaguarROMSize); + jaguarCartInserted = false; if (fileType == JST_ROM) { + jaguarCartInserted = true; memcpy(jagMemSpace + 0x800000, buffer, jaguarROMSize); delete[] buffer; return true; @@ -369,7 +371,8 @@ uint32 ParseFileType(uint8 header1, uint8 header2, uint32 size) // If the file size is divisible by 1M, we probably have an regular ROM. // We can also check our CRC32 against the internal ROM database to be sure. - if ((size % 1048576) == 0) + // (We also check for the Memory Track cartridge size here as well...) + if ((size % 1048576) == 0 || size == 131072) return JST_ROM; // If the file size + 8192 bytes is divisible by 1M, we probably have an