mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-28 14:01:52 +01:00
commit
3d3412c708
@ -760,13 +760,26 @@ void getCartInfo_MD() {
|
||||
id[c + 1] = loByte;
|
||||
}
|
||||
|
||||
// Get cart name
|
||||
for (byte c = 0; c < 48; c += 2) {
|
||||
// split word
|
||||
word myWord = readWord_MD((0x150 + c) / 2);
|
||||
byte loByte = myWord & 0xFF;
|
||||
byte hiByte = myWord >> 8;
|
||||
|
||||
// write to buffer
|
||||
sdBuffer[c] = hiByte;
|
||||
sdBuffer[c + 1] = loByte;
|
||||
}
|
||||
romName[copyToRomName_MD(romName, sdBuffer, sizeof(romName) - 1)] = 0;
|
||||
|
||||
// Identify games using SVP chip
|
||||
if (!strncmp("GM MK-1229 ", id, 11) || !strncmp("GM G-7001 ", id, 11)) // Virtua Racing (E/U/J)
|
||||
isSVP = 1;
|
||||
else
|
||||
isSVP = 0;
|
||||
|
||||
// Fix cartridge sizes according to no-intro database
|
||||
// Fix cartridge sizes and checksums according to no-intro database
|
||||
if (cartSize == 0x400000) {
|
||||
switch (chksum) {
|
||||
case 0xCE25: // Super Street Fighter 2 (J) 40Mbit
|
||||
@ -893,115 +906,108 @@ void getCartInfo_MD() {
|
||||
}
|
||||
}
|
||||
|
||||
// Fatman (Japan).md
|
||||
// Fatman (Japan)
|
||||
if (!strncmp("GM T-44013 ", id, 11) && (chksum == 0xFFFF)) {
|
||||
chksum = 0xC560;
|
||||
cartSize = 0xA0000;
|
||||
}
|
||||
|
||||
// Beggar Prince (Rev 1)(Aftermarket)
|
||||
// Slaughter Sport (USA)
|
||||
if (!strncmp("GMT5604600jJ", romName, 12) && (chksum == 0xFFFF)) {
|
||||
strcpy(romName, "SLAUGHTERSPORT");
|
||||
chksum = 0x6BAE;
|
||||
}
|
||||
|
||||
// Fixes aftermarket cartridges
|
||||
// Beggar Prince (Rev 1)
|
||||
if (!strncmp("SF-001", id, 6) && (chksum == 0x3E08)) {
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Legend of Wukong (Aftermarket)
|
||||
// Legend of Wukong
|
||||
if (!strncmp("SF-002", id, 6) && (chksum == 0x12B0)) {
|
||||
chksum = 0x45C6;
|
||||
}
|
||||
|
||||
// YM2612 Instrument Editor (Aftermarket)
|
||||
// YM2612 Instrument Editor
|
||||
if (!strncmp("GM 10101010", id, 11) && (chksum == 0xC439)) {
|
||||
chksum = 0x21B0;
|
||||
cartSize = 0x100000;
|
||||
}
|
||||
|
||||
// Technoptimistic (Aftermarket)
|
||||
// Technoptimistic
|
||||
if (!strncmp("MU REMUTE01", id, 11) && (chksum == 0x0000)) {
|
||||
chksum = 0xB55C;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Decoder (Aftermarket)
|
||||
// Decoder
|
||||
if (!strncmp("GM REMUTE02", id, 11) && (chksum == 0x0000)) {
|
||||
chksum = 0x5426;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Handy Harvy (Aftermarket)
|
||||
// Handy Harvy
|
||||
if (!strncmp("GM HHARVYSG", id, 11) && (chksum == 0x0000)) {
|
||||
chksum = 0xD9D2;
|
||||
cartSize = 0x100000;
|
||||
}
|
||||
|
||||
// Jim Power - The Lost Dimension in 3D (Aftermarket)
|
||||
// Jim Power - The Lost Dimension in 3D
|
||||
if (!strncmp("GM T-107036", id, 11) && (chksum == 0x0000)) {
|
||||
chksum = 0xAA28;
|
||||
}
|
||||
|
||||
// mikeyeldey95 (Aftermarket)
|
||||
// mikeyeldey95
|
||||
if (!strncmp("GM 00000000-43", id, 14) && (chksum == 0x0000)) {
|
||||
chksum = 0x921B;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Enryuu Seiken Xiao-Mei (Aftermarket)
|
||||
// Enryuu Seiken Xiao-Mei
|
||||
if (!strncmp("GM 00000000-00", id, 14) && (chksum == 0x1E0C)) {
|
||||
chksum = 0xE7E5;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Life on Earth - Reimagined (Aftermarket)
|
||||
// Life on Earth - Reimagined
|
||||
if (!strncmp("GM 00000000-00", id, 14) && (chksum == 0x6BD5)) {
|
||||
chksum = 0x1FEA;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Sasha Darko's Sacred Line I (Aftermarket)
|
||||
// Sasha Darko's Sacred Line I
|
||||
if (!strncmp("GM 00000005-00", id, 14) && (chksum == 0x9F34)) {
|
||||
chksum = 0xA094;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Sasha Darko's Sacred Line II (Aftermarket)
|
||||
// Sasha Darko's Sacred Line II
|
||||
if (!strncmp("GM 00000005-00", id, 14) && (chksum == 0x0E9B)) {
|
||||
chksum = 0x6B4B;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Sasha Darko's Sacred Line (Watermelon Release) (Aftermarket)
|
||||
// Sasha Darko's Sacred Line (Watermelon Release)
|
||||
if (!strncmp("GM T-574323-00", id, 14) && (chksum == 0xAEDD)) {
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Kromasphere (Aftermarket)
|
||||
// Kromasphere
|
||||
if (!strncmp("GM MK-0000 -00", id, 14) && (chksum == 0xC536)) {
|
||||
chksum = 0xFAB1;
|
||||
cartSize = 0x200000;
|
||||
}
|
||||
|
||||
// YM2017 (Aftermarket)
|
||||
// YM2017
|
||||
if (!strncmp("GM CSET0001-02", id, 14) && (chksum == 0x0000)) {
|
||||
chksum = 0xE3A9;
|
||||
}
|
||||
|
||||
// The Curse of Illmore Bay (Aftermarket)
|
||||
// The Curse of Illmore Bay
|
||||
if (!strncmp("1774 ", id, 14) && (chksum == 0x0000)) {
|
||||
chksum = 0x6E34;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Coffee Crisis (Aftermarket)
|
||||
// Coffee Crisis
|
||||
if (!strncmp("JN-20160131-03", id, 14) && (chksum == 0x0000)) {
|
||||
chksum = 0x8040;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
// Romeow & Julicat
|
||||
if (!strncmp("ROMEOWJULICAT", romName, 13) && (chksum == 0x0000)) {
|
||||
chksum = 0xB094;
|
||||
cartSize = 0x200000;
|
||||
}
|
||||
|
||||
// Sonic & Knuckles Check
|
||||
// Sonic & Knuckles checks
|
||||
SnKmode = 0;
|
||||
if (chksum == 0xDFB3) {
|
||||
|
||||
//Sonic & Knuckles ID:GM MK-1563 -00
|
||||
if (!strcmp("GM MK-1563 -00", id)) {
|
||||
if (!strcmp("GM MK-1563 -00", id) && (chksum == 0xDFB3)) {
|
||||
char labelLockon[17];
|
||||
memset(labelLockon, 0, 17);
|
||||
|
||||
@ -1039,21 +1045,15 @@ void getCartInfo_MD() {
|
||||
idLockon[c + 1] = loByte;
|
||||
}
|
||||
|
||||
if (!strncmp("GM 00001009-0", idLockon, 13) || !strncmp("GM 00004049-0", idLockon, 13)) {
|
||||
//Sonic1 ID:GM 00001009-0? or GM 00004049-0?
|
||||
if (!strncmp("GM 00001009-0", idLockon, 13) || !strncmp("GM 00004049-0", idLockon, 13)) { // Sonic1 ID:GM 00001009-0? or GM 00004049-0?
|
||||
SnKmode = 2;
|
||||
} else if (!strcmp("GM 00001051-00", idLockon) || !strcmp("GM 00001051-01", idLockon) || !strcmp("GM 00001051-02", idLockon)) {
|
||||
//Sonic2 ID:GM 00001051-00 or GM 00001051-01 or GM 00001051-02
|
||||
} else if (!strcmp("GM 00001051-00", idLockon) || !strcmp("GM 00001051-01", idLockon) || !strcmp("GM 00001051-02", idLockon)) { // Sonic2 ID:GM 00001051-00 or GM 00001051-01 or GM 00001051-02
|
||||
SnKmode = 3;
|
||||
|
||||
// Prepare Sonic2 Banks
|
||||
writeSSF2Map(0x509878, 1); // 0xA130F1
|
||||
|
||||
} else if (!strcmp("GM MK-1079 -00", idLockon)) {
|
||||
//Sonic3 ID:GM MK-1079 -00
|
||||
} else if (!strcmp("GM MK-1079 -00", idLockon)) { // Sonic3 ID:GM MK-1079 -00
|
||||
SnKmode = 4;
|
||||
} else {
|
||||
//Other game
|
||||
} else { // Other game
|
||||
SnKmode = 5;
|
||||
}
|
||||
|
||||
@ -1061,7 +1061,6 @@ void getCartInfo_MD() {
|
||||
SnKmode = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Serial EEPROM Check
|
||||
for (int i = 0; i < eepcount; i++) {
|
||||
@ -1234,25 +1233,6 @@ void getCartInfo_MD() {
|
||||
}
|
||||
}
|
||||
|
||||
// Get name
|
||||
for (byte c = 0; c < 48; c += 2) {
|
||||
// split word
|
||||
word myWord = readWord_MD((0x150 + c) / 2);
|
||||
byte loByte = myWord & 0xFF;
|
||||
byte hiByte = myWord >> 8;
|
||||
|
||||
// write to buffer
|
||||
sdBuffer[c] = hiByte;
|
||||
sdBuffer[c + 1] = loByte;
|
||||
}
|
||||
romName[copyToRomName_MD(romName, sdBuffer, sizeof(romName) - 1)] = 0;
|
||||
|
||||
//Check for Slaughter Sport
|
||||
if (!strncmp("GMT5604600jJ", romName, 12) && (chksum == 0xFFFF)) {
|
||||
strcpy(romName, "SLAUGHTERSPORT");
|
||||
chksum = 0x6BAE;
|
||||
}
|
||||
|
||||
//Get Lock-on cart name
|
||||
if (SnKmode >= 2) {
|
||||
char romNameLockon[12];
|
||||
|
Loading…
Reference in New Issue
Block a user