diff options
author | splash5 <[email protected]> | 2022-12-25 01:22:13 +0800 |
---|---|---|
committer | splash5 <[email protected]> | 2022-12-25 18:45:14 +0800 |
commit | cf9b70554f92e7b475b8a9aa0cfb3354a83b3560 (patch) | |
tree | 1bbdf64fcdcd2bd7f2bd6149b147124d6553a144 | |
parent | 1ef40b1f89bdbd077a40e1d20bf9f359d4d87214 (diff) | |
download | cartreader-cf9b70554f92e7b475b8a9aa0cfb3354a83b3560.tar.gz cartreader-cf9b70554f92e7b475b8a9aa0cfb3354a83b3560.zip |
Fix for NES "TMNT2" (Japan, VRC4)
-rw-r--r-- | Cart_Reader/NES.ino | 10 |
1 files 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); } |