From cf9b70554f92e7b475b8a9aa0cfb3354a83b3560 Mon Sep 17 00:00:00 2001 From: splash5 <2173030+splash5@users.noreply.github.com> Date: Sun, 25 Dec 2022 01:22:13 +0800 Subject: [PATCH 1/2] Fix for NES "TMNT2" (Japan, VRC4) --- Cart_Reader/NES.ino | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Cart_Reader/NES.ino b/Cart_Reader/NES.ino index 0884b88..4a83ae9 100644 --- a/Cart_Reader/NES.ino +++ b/Cart_Reader/NES.ino @@ -2726,6 +2726,11 @@ void readPRG(boolean readrom) { case 65: case 75: // 128K/256K banks = int_pow(2, prgsize) * 2; + + // set vrc4 swap setting for TMNT2 + if (mapper == 25) + write_prg_byte(0x9005, 0x00); + for (int i = 0; i < banks; i += 2) { write_prg_byte(0x8000, i); write_prg_byte(0xA000, i + 1); @@ -3892,10 +3897,7 @@ void readCHR(boolean readrom) { banks = int_pow(2, chrsize) * 4; for (int i = 0; i < banks; i++) { write_prg_byte(0xB000, i & 0xF); // CHR Bank Lower 4 bits - if ((ramsize > 0) || (banks == 128)) // VRC2c (Ganbare Goemon Gaiden)/VRC4b (Bio Miracle/Gradius 2/Racer Mini) - write_prg_byte(0xB002, (i >> 4) & 0xF); // CHR Bank Upper 4 bits VRC2c/VRC4b - else - write_prg_byte(0xB008, (i >> 4) & 0xF); // CHR Bank Upper 4 bits VRC4d (Teenage Mutant Ninja Turtles) + write_prg_byte(0xB00A, (i >> 4) & 0xF); // Combine VRC2c and VRC4b, VRC4d reg for (word address = 0x0; address < 0x400; address += 512) { dumpCHR(address); } From b4021f55943f578b2710335ab6ccf2ebacd160aa Mon Sep 17 00:00:00 2001 From: splash5 <2173030+splash5@users.noreply.github.com> Date: Sun, 25 Dec 2022 01:25:12 +0800 Subject: [PATCH 2/2] Fix wrong first/last bank crc32 --- sd/nes.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sd/nes.txt b/sd/nes.txt index b469311..527e028 100755 --- a/sd/nes.txt +++ b/sd/nes.txt @@ -407,7 +407,7 @@ Alpha Mission (USA).nes DBF90772,CFB688EC,4E45531A020430082000000000000001 Alter Ego (World) (Aftermarket) (Homebrew) (Alt).nes -83428A58,B2AA7578,4E45531A030101080000000000000001 +83428A58,6DDDE59A,4E45531A030101080000000000000001 Alter Ego (World) (Aftermarket) (Homebrew).nes B84035A7,EAA054EE,4E45531A020101080000000000000001 @@ -1277,7 +1277,7 @@ California Raisins - The Grape Escape (USA) (Proto 2).nes 8D97155C,D0B4DCEB,4E45531A080021082000000700000001 Caltron - 6 in 1 (USA) (Unl).nes -4686C5DD,B2AA7578,4E45531A101090280000000000000001 +4686C5DD,882E7885,4E45531A101090280000000000000001 Caltron - 9 in 1 (USA) (Proto) (Unl).nes C4B94BD5,E456575A,4E45531A20205088010000000000002A @@ -2198,13 +2198,13 @@ Dragon Ball Z Gaiden - Saiya Jin Zetsumetsu Keikaku (Japan).nes 136CA449,8455270E,4E45531A102002185000200000000001 Dragon Ball Z II - Gekishin Freeza!! (Japan) (Rev 1).nes -A9541452,043BA09E,4E45531A102002185000200000000001 +A9541452,28F80BEE,4E45531A102002185000200000000001 Dragon Ball Z II - Gekishin Freeza!! (Japan).nes 99240573,043BA09E,4E45531A102002185000200000000001 Dragon Ball Z III - Ressen Jinzou Ningen (Japan).nes -DC52BF0C,104C1B5D,4E45531A102002185000200000000001 +DC52BF0C,F728D2E8,4E45531A102002185000200000000001 Dragon Boat Festival (Taiwan) (En,Zh-Hant) (Aftermarket) (Unl).nes 3A8823EC,52921D62,4E45531A200021080000000700000001 @@ -2585,7 +2585,7 @@ Famicom Jump - Eiyuu Retsuden (Japan).nes D343C66A,A1989DBD,4E45531A101000184000000000000001 Famicom Jump II - Saikyou no 7 Nin (Japan).nes -3F15D20D,033DD3B4,4E45531A200092980000700700000001 +3F15D20D,1E8C2A98,4E45531A200092980000700700000001 Famicom Meijin Sen (Japan) (Rev 1).nes 821F2F9F,301E4A16,4E45531A081012080000700000000001 @@ -2711,7 +2711,7 @@ Famista '89 - Kaimaku Ban!! (Japan).nes 4F2F1846,080C2A6F,4E45531A0808E1C80000000000000001 Famista '90 (Japan).nes -0C1792DA,D8EF4A98,4E45531A081032182000000000000001 +0C1792DA,CE6A1111,4E45531A081032182000000000000001 Famista '91 (Japan).nes 808606F0,EE32182B,4E45531A081021D81000000000000001 @@ -3068,10 +3068,10 @@ Ganbare Goemon Gaiden - Kieta Ougon Kiseru (Japan) (Rev 1).nes 36D22AD5,575F1A03,4E45531A102092183000700000000001 Ganbare Goemon Gaiden - Kieta Ougon Kiseru (Japan).nes -EB92B32A,575F1A03,4E45531A102092183000700000000001 +EB92B32A,29676146,4E45531A102092183000700000000001 Ganbare Goemon Gaiden 2 - Tenka no Zaihou (Japan).nes -286FCD20,63D7430A,4E45531A102052182000700000000001 +286FCD20,5C72C803,4E45531A102052182000700000000001 Ganbare Goemon! - Karakuri Douchuu (Japan).nes 4FC2F673,DF687D8A,4E45531A0810B0480000000000000001 @@ -4187,7 +4187,7 @@ Kaguya Hime Densetsu (Japan).nes 26CEC726,26C75FC5,4E45531A100012080000700700000001 Kaijuu Monogatari (Japan).nes -BC11E61A,50967F3D,4E45531A081032182000000000000001 +BC11E61A,D13E835A,4E45531A081032182000000000000001 Kaiketsu Yancha Maru (Japan).nes D1397940,24EFF378,4E45531A100010680000000700000001 @@ -4880,7 +4880,7 @@ Magical Taruruuto-kun - Fantastic World!! (Japan).nes 0CF42E69,31162506,4E45531A0810F2980000100000000001 Magical Taruruuto-kun 2 - Mahou Daibouken (Japan).nes -B7F28915,279A61CC,4E45531A0810F2980000100000000001 +B7F28915,DD32AB73,4E45531A0810F2980000100000000001 Magician (USA) (Beta 2).nes B7D69A6D,9C7CCED9,4E45531A081042080000700000000001 @@ -4901,7 +4901,7 @@ Magnum Kikiippatsu - Empire City - 1931 (Japan).nes 8E7ABDFC,CF6DD945,4E45531A080021082000000700000001 Maharaja (Japan).nes -98CCC9AB,FC6DBEC5,4E45531A081042480000700000000001 +98CCC9AB,74835DC4,4E45531A081042480000700000000001 Mahjang Companion (Asia) (Ja) (Sachen) (Unl).nes 72FA78C3,D6315DEA,4E45531A0408B0880000000000000001 @@ -5012,7 +5012,7 @@ Mappy (Japan).nes 5D1301C5,C8980174,4E45531A010101080000000000000001 Mappy Kids (Japan).nes -35D8C961,29814E8D,4E45531A081030185000000000000001 +35D8C961,CDC965BC,4E45531A081030185000000000000001 Mappy-Land (Japan).nes 2E563C66,8E375DB9,4E45531A0804E1C80000000000000001 @@ -5570,7 +5570,7 @@ Moulin Rouge Senki - Melville no Honoo (Japan).nes F7E07B83,EA422D65,4E45531A081012080000700000000001 Mouryou Senki Madara (Japan).nes -E1383DEB,B9BE2C89,4E45531A1020A2180000700000000001 +E1383DEB,41D1092B,4E45531A1020A2180000700000000001 Mr. Assy - Momoco & Hanako (Asia) (Ja) (Proto) (Pirate).nes 39B7D24A,CD0AACA8,4E45531A0408B1080000000000000001 @@ -5951,7 +5951,7 @@ Oeka Kids - Anpanman to Oekaki Shiyou!! (Japan).nes 9D048EA4,3FFE4C5B,4E45531A080001680000000900000017 Oishinbo - Kyuukyoku no Menu Sanbon Shoubu (Japan).nes -264F26B1,F9A54CA8,4E45531A081010080000000000000001 +264F26B1,23E84734,4E45531A081010080000000000000001 Okkotoshi Puzzle - Tonjan! (Japan) (Beta).nes 415A66F2,1C711DC7,4E45531A081010080000000000000001 @@ -6887,7 +6887,7 @@ S.C.A.T. - Special Cybernetic Attack Team (USA).nes 74189E12,1F109798,4E45531A081010080000000000000001 Saint Seiya - Ougon Densetsu (Japan).nes -026C5FCA,93BF482A,4E45531A081080980000000000000001 +026C5FCA,0B9D7DD5,4E45531A081080980000000000000001 Saint Seiya - Ougon Densetsu Kanketsu Hen (Japan) (Beta).nes 7C108923,70D91420,4E45531A081010080000000000000001 @@ -8267,7 +8267,7 @@ Tennis (Japan, USA) (En).nes D4D9E21A,5468EF1C,4E45531A010100080000000000000001 Terao no Dosukoi Oozumou (Japan).nes -6479E76A,FBBF8A6E,4E45531A081020180000000000000001 +6479E76A,9E7B387F,4E45531A081020180000000000000001 Terminator 2 (Japan).nes D27B9D50,13B6BB6C,4E45531A081040080000000000000001 @@ -9221,7 +9221,7 @@ Youkai Club (Japan).nes 6BC65D7E,6EB1C88A,4E45531A0804C1880000000000000001 Youkai Douchuuki (Japan).nes -C811DC7A,E3F72472,4E45531A081030185000000000000001 +C811DC7A,E9694C13,4E45531A081030185000000000000001 Young Indiana Jones Chronicles, The (USA).nes 35C6F574,B7E7DF8F,4E45531A081040080000000000000001 @@ -9308,7 +9308,7 @@ Zoids - Chuuou Tairiku no Tatakai (Japan) (Rev 1).nes E0B6B7BB,4A90ABCA,4E45531A080021082000000700000001 Zoids - Chuuou Tairiku no Tatakai (Japan).nes -D0DF726E,4A90ABCA,4E45531A080021082000000700000001 +D0DF726E,DC2916EA,4E45531A080021082000000700000001 Zoids 2 - Zenebas no Gyakushuu (Japan).nes 89E085FE,4EC7C739,4E45531A100012080000700700000001