From 16a2569626db95ac8bc40475fe6b44d6b493028c Mon Sep 17 00:00:00 2001 From: PsyK0p4T <87064902+PsyK0p4T@users.noreply.github.com> Date: Mon, 24 Apr 2023 23:20:39 +0200 Subject: [PATCH 1/3] Update md.txt Aftermarket entries added/modified. --- sd/md.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sd/md.txt b/sd/md.txt index 359d9b1..86d6e7c 100644 --- a/sd/md.txt +++ b/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 From 12710686d52d2e90e9178f6ab9e7f9d6fcdf2c2c Mon Sep 17 00:00:00 2001 From: PsyK0p4T <87064902+PsyK0p4T@users.noreply.github.com> Date: Mon, 24 Apr 2023 23:28:43 +0200 Subject: [PATCH 2/3] Update MD.ino Fixed header checksum for : - Jeopardy! (USA) - Monopoly (USA) - Winter Olympic Games (USA) Moved code to other fixed games : - Fatman (Japan) Added support for : - YM2612 Instrument Editor (Aftermarket) - Decoder (Aftermarket) - Handy Harvy (Aftermarket) - Jim Power - The Lost Dimension in 3D (Aftermarket) --- Cart_Reader/MD.ino | 60 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/Cart_Reader/MD.ino b/Cart_Reader/MD.ino index 3b298a6..59e4527 100644 --- a/Cart_Reader/MD.ino +++ b/Cart_Reader/MD.ino @@ -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]; } } @@ -751,6 +748,12 @@ void getCartInfo_MD() { cartSize = 0x400000; break; } + if (cartSize == 0x200000) { + switch (chksum) { + case 0xAE95: //Winter Olympic Games (USA).md + chksum = 0x56A0; + break; + } } if (cartSize == 0x180000) { switch (chksum) { @@ -767,11 +770,11 @@ void getCartInfo_MD() { } 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; @@ -795,6 +798,12 @@ void getCartInfo_MD() { case 0xB8D4: //Zoop (USA).md cartSize = 0x100000; break; + case 0xC422: //Jeopardy! (USA).md + chksum = 0xC751; + break; + case 0x0C6A: //Monopoly (USA).md + chksum = 0xE1AA; + break; } } if (cartSize == 0x40000) { @@ -818,16 +827,45 @@ void getCartInfo_MD() { } } - // 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 +1150,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)) { From 03801cdddb2c1b6c696c80b20a2ae7bc4dcf9779 Mon Sep 17 00:00:00 2001 From: nsx0r Date: Tue, 25 Apr 2023 07:23:07 +0200 Subject: [PATCH 3/3] fix --- Cart_Reader/MD.ino | 55 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/Cart_Reader/MD.ino b/Cart_Reader/MD.ino index 59e4527..59df10e 100644 --- a/Cart_Reader/MD.ino +++ b/Cart_Reader/MD.ino @@ -737,33 +737,34 @@ 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).md + 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; } @@ -782,45 +783,45 @@ 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).md + case 0xC422: //Jeopardy! (USA) chksum = 0xC751; break; - case 0x0C6A: //Monopoly (USA).md + 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;