mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-24 12:01:53 +01:00
commit
7cbfb37f76
@ -680,10 +680,7 @@ byte copyToRomName_MD(char* output, const byte* input, byte length) {
|
||||
byte myLength = 0;
|
||||
|
||||
for (byte i = 0; i < 48; i++) {
|
||||
if (
|
||||
(
|
||||
(input[i] >= '0' && input[i] <= '9') || (input[i] >= 'A' && input[i] <= 'z'))
|
||||
&& myLength < length) {
|
||||
if (((input[i] >= '0' && input[i] <= '9') || (input[i] >= 'A' && input[i] <= 'z')) && myLength < length) {
|
||||
output[myLength++] = input[i];
|
||||
}
|
||||
}
|
||||
@ -740,38 +737,45 @@ void getCartInfo_MD() {
|
||||
}
|
||||
if (cartSize == 0x300000) {
|
||||
switch (chksum) {
|
||||
case 0xBC5F: //Batman Forever (World).md
|
||||
case 0x3CDD: //Donald in Maui Mallard (Brazil) (En).md
|
||||
case 0x44AD: //Donald in Maui Mallard (Europe) (Rev A).md
|
||||
case 0x2D9A: //Foreman for Real (World).md
|
||||
case 0x5648: //Justice League Task Force (World).md
|
||||
case 0x0A29: //Mega 6 Vol. 3 (Europe).md
|
||||
case 0x7651: //NFL Quarterback Club (World).md
|
||||
case 0x74CA: //WWF RAW (World).md
|
||||
case 0xBC5F: //Batman Forever (World)
|
||||
case 0x3CDD: //Donald in Maui Mallard (Brazil) (En)
|
||||
case 0x44AD: //Donald in Maui Mallard (Europe) (Rev A)
|
||||
case 0x2D9A: //Foreman for Real (World)
|
||||
case 0x5648: //Justice League Task Force (World)
|
||||
case 0x0A29: //Mega 6 Vol. 3 (Europe)
|
||||
case 0x7651: //NFL Quarterback Club (World)
|
||||
case 0x74CA: //WWF RAW (World)
|
||||
cartSize = 0x400000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cartSize == 0x200000) {
|
||||
switch (chksum) {
|
||||
case 0xAE95: //Winter Olympic Games (USA)
|
||||
chksum = 0x56A0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cartSize == 0x180000) {
|
||||
switch (chksum) {
|
||||
case 0xFFE2: //Cannon Fodder (Europe).md
|
||||
case 0xF418: //Chaos Engine, The (Europe).md
|
||||
case 0xF71D: //Fatal Fury (Europe, Korea) (En).md
|
||||
case 0xA884: //Flashback (Europe) (En,Fr).md
|
||||
case 0x7D68: //Flashback - The Quest for Identity (USA) (En,Fr).md
|
||||
case 0x030D: //Shining Force (Europe).md
|
||||
case 0xE975: //Shining Force (USA).md
|
||||
case 0xFFE2: //Cannon Fodder (Europe)
|
||||
case 0xF418: //Chaos Engine, The (Europe)
|
||||
case 0xF71D: //Fatal Fury (Europe, Korea) (En)
|
||||
case 0xA884: //Flashback (Europe) (En,Fr)
|
||||
case 0x7D68: //Flashback - The Quest for Identity (USA) (En,Fr)
|
||||
case 0x030D: //Shining Force (Europe)
|
||||
case 0xE975: //Shining Force (USA)
|
||||
cartSize = 0x200000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cartSize == 0x100000) {
|
||||
switch (chksum) {
|
||||
case 0xCDF5: //Life on Mars (Aftermarket).md
|
||||
case 0xCDF5: //Life on Mars (Aftermarket)
|
||||
cartSize = 0x400000;
|
||||
chksum = 0x603A;
|
||||
break;
|
||||
case 0xF85F: //Metal Dragon (Aftermarket).md
|
||||
case 0xF85F: //Metal Dragon (Aftermarket)
|
||||
cartSize = 0x200000;
|
||||
chksum = 0x6965;
|
||||
break;
|
||||
@ -779,55 +783,90 @@ void getCartInfo_MD() {
|
||||
}
|
||||
if (cartSize == 0xC0000) {
|
||||
switch (chksum) {
|
||||
case 0x9D79: //Wonder Boy in Monster World (USA, Europe).md
|
||||
case 0x9D79: //Wonder Boy in Monster World (USA, Europe)
|
||||
cartSize = 0x100000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cartSize == 0x80000) {
|
||||
switch (chksum) {
|
||||
case 0xD07D: //Zero Wing (Japan).md
|
||||
case 0xD07D: //Zero Wing (Japan)
|
||||
cartSize = 0x100000;
|
||||
chksum = 0xF204;
|
||||
break;
|
||||
case 0x95C9: //Zero Wing (Europe).md
|
||||
case 0x9144: //Zoop (Europe).md
|
||||
case 0xB8D4: //Zoop (USA).md
|
||||
case 0x95C9: //Zero Wing (Europe)
|
||||
case 0x9144: //Zoop (Europe)
|
||||
case 0xB8D4: //Zoop (USA)
|
||||
cartSize = 0x100000;
|
||||
break;
|
||||
case 0xC422: //Jeopardy! (USA)
|
||||
chksum = 0xC751;
|
||||
break;
|
||||
case 0x0C6A: //Monopoly (USA)
|
||||
chksum = 0xE1AA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cartSize == 0x40000) {
|
||||
switch (chksum) {
|
||||
case 0x8BC6: //Pac-Attack (USA).md
|
||||
case 0xB344: //Pac-Panic (Europe).md
|
||||
case 0x8BC6: //Pac-Attack (USA)
|
||||
case 0xB344: //Pac-Panic (Europe)
|
||||
cartSize = 0x100000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cartSize == 0x20000) {
|
||||
switch (chksum) {
|
||||
case 0x7E50: //Micro Machines 2 - Turbo Tournament (Europe).md
|
||||
case 0x7E50: //Micro Machines 2 - Turbo Tournament (Europe)
|
||||
cartSize = 0x100000;
|
||||
chksum = 0xD074;
|
||||
break;
|
||||
case 0x168B: //Micro Machines - Military (Europe).md
|
||||
case 0x168B: //Micro Machines - Military (Europe)
|
||||
cartSize = 0x100000;
|
||||
chksum = 0xCEE0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Beggar Prince (Rev 1)(Aftermarket).md
|
||||
// Fatman (Japan).md
|
||||
if (!strncmp("GM T-44013 ", id, 11) && (chksum == 0xFFFF)) {
|
||||
chksum = 0xC560;
|
||||
cartSize = 0xA0000;
|
||||
}
|
||||
|
||||
// Beggar Prince (Rev 1)(Aftermarket)
|
||||
if (!strncmp("SF-001", id, 6) && (chksum == 0x3E08)) {
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
// Legend of Wukong (Aftermarket).md
|
||||
// Legend of Wukong (Aftermarket)
|
||||
if (!strncmp("SF-002", id, 6) && (chksum == 0x12B0)) {
|
||||
chksum = 0x45C6;
|
||||
}
|
||||
|
||||
//YM2612 Instrument Editor (Aftermarket)
|
||||
if (!strncmp("GM 10101010", id, 11) && (chksum == 0xC439)) {
|
||||
chksum = 0x21B0;
|
||||
cartSize = 0x100000;
|
||||
}
|
||||
|
||||
//Decoder (Aftermarket)
|
||||
if (!strncmp("GM REMUTE02", id, 11) && (chksum == 0x0000)) {
|
||||
chksum = 0x5426;
|
||||
cartSize = 0x400000;
|
||||
}
|
||||
|
||||
//Handy Harvy (Aftermarket)
|
||||
if (!strncmp("GM HHARVYSG", id, 11) && (chksum == 0x0000)) {
|
||||
chksum = 0xD9D2;
|
||||
cartSize = 0x100000;
|
||||
}
|
||||
|
||||
//Jim Power - The Lost Dimension in 3D (Aftermarket)
|
||||
if (!strncmp("GM T-107036", id, 11) && (chksum == 0x0000)) {
|
||||
chksum = 0xAA28;
|
||||
}
|
||||
|
||||
// Sonic & Knuckles Check
|
||||
SnKmode = 0;
|
||||
if (chksum == 0xDFB3) {
|
||||
@ -1112,12 +1151,6 @@ void getCartInfo_MD() {
|
||||
cartSize = 0x80000;
|
||||
}
|
||||
|
||||
// Fatman (Japan)
|
||||
if (!strncmp(romName, "LACEGMT4401300J", 15) && (chksum == 0xffff)) {
|
||||
chksum = 0xC560;
|
||||
cartSize = 0xA0000;
|
||||
}
|
||||
|
||||
// Some games are missing the ROM size in the header, in this case calculate ROM size by looking for mirror of the first line of the ROM
|
||||
// This does not work for cartridges that have SRAM mapped directly after the maskrom like Striker (Europe)
|
||||
if ((cartSize < 0x8000) || (cartSize > 0xEAF400)) {
|
||||
|
17
sd/md.txt
17
sd/md.txt
@ -1720,6 +1720,9 @@ FDA0A099
|
||||
DEcapAttack (USA, Europe, Korea) (En).md
|
||||
73DC0DD8
|
||||
|
||||
Decoder (World) (Aftermarket) (Unl).md
|
||||
7B310789
|
||||
|
||||
Demolition Man (USA, Europe) (Beta).md
|
||||
57FFAD7A
|
||||
|
||||
@ -2416,6 +2419,9 @@ Fire Shark (Europe).md
|
||||
Fire Shark (USA).md
|
||||
9C175146
|
||||
|
||||
Fire Shark (USA) (Aftermarket) (Unl).md
|
||||
54B072A1
|
||||
|
||||
Flash Point (Japan) (En) (Proto).md
|
||||
0655074D
|
||||
|
||||
@ -2774,7 +2780,7 @@ Gynoug (Japan).md
|
||||
1B69241F
|
||||
|
||||
Handy Harvy (World) (Aftermarket) (Unl).md
|
||||
AFDC24EE
|
||||
EDA45D8F
|
||||
|
||||
Hard Drivin' (World).md
|
||||
3225BAAF
|
||||
@ -2818,6 +2824,9 @@ Hellfire (Japan).md
|
||||
Hellfire (USA).md
|
||||
184018F9
|
||||
|
||||
Hellfire (USA) (Aftermarket) (Unl).md
|
||||
FF095325
|
||||
|
||||
Hercules 2 (Taiwan) (En) (Unl).md
|
||||
292623DB
|
||||
|
||||
@ -7117,6 +7126,9 @@ CDDBECFC
|
||||
True Lies (World).md
|
||||
18C09468
|
||||
|
||||
Truxton (World) (Aftermarket) (Unl).md
|
||||
A6B7DE3C
|
||||
|
||||
Tun Shi Tian Di 3 - San Guo Wai Chuan (Taiwan) (Unl).md
|
||||
6F98247D
|
||||
|
||||
@ -7942,6 +7954,9 @@ A104E033
|
||||
Yi Men Ying Lie - Yang Jia Jiang (Taiwan) (Unl).md
|
||||
6604A79E
|
||||
|
||||
YM2612 Instrument Editor (World) (Aftermarket) (Unl).md
|
||||
D8949C3E
|
||||
|
||||
Yogi Bear - Cartoon Capers (Europe).md
|
||||
204F97D8
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user