aboutsummaryrefslogtreecommitdiffhomepage
path: root/Cart_Reader
diff options
context:
space:
mode:
authornsx0r <[email protected]>2022-11-24 22:18:46 +0100
committerGitHub <[email protected]>2022-11-24 22:18:46 +0100
commit2c477ddae1581eda45bd24162b4a66104ed881cf (patch)
treeddb96249e27bb10a69b0a81380710f0bff9380f6 /Cart_Reader
parenta93a9e51dee42b379ee4024aec11ddcd1fd865ca (diff)
downloadcartreader-2c477ddae1581eda45bd24162b4a66104ed881cf.tar.gz
cartreader-2c477ddae1581eda45bd24162b4a66104ed881cf.zip
added NES mapper 176
added NES mapper 176, tested working
Diffstat (limited to 'Cart_Reader')
-rw-r--r--Cart_Reader/NES.ino48
1 files changed, 48 insertions, 0 deletions
diff --git a/Cart_Reader/NES.ino b/Cart_Reader/NES.ino
index 0634e2f..d94e8c7 100644
--- a/Cart_Reader/NES.ino
+++ b/Cart_Reader/NES.ino
@@ -105,6 +105,7 @@ static const byte PROGMEM mapsize[] = {
155, 3, 3, 3, 5, 0, 1, // mmc1 variant [sram r/w]
158, 3, 3, 5, 5, 0, 0, // tengen rambo-1 variant (alien syndrome (u)) [UNLICENSED]
159, 3, 4, 5, 6, 1, 1, // bandai x24c01 [eep r/w]
+ 176, 4, 4, 5, 5, 0, 0, // 8025 enhanced MMC3 [UNLICENSED]
180, 3, 3, 0, 0, 0, 0, // unrom variant (crazy climber)
184, 1, 1, 2, 3, 0, 0, // sunsoft 1
185, 0, 1, 1, 1, 0, 0, // cnrom lockout
@@ -3110,6 +3111,25 @@ void readPRG(boolean readrom) {
}
}
break;
+
+ case 176:
+ banks = int_pow(2, prgsize) * 2;
+ write_prg_byte(0x5FF3, 0); // extended MMC3 mode: disabled
+ write_prg_byte(0x5FF0, 1); // 256K outer bank mode
+ for (int i = 0; i < banks-3; i += 2) {
+ write_prg_byte(0x5FF1, (i & 0xE0) >> 1); // outer bank select
+ write_prg_byte(0x8000, 6);
+ write_prg_byte(0x8001, i);
+ write_prg_byte(0x8000, 7);
+ write_prg_byte(0x8001, i + 1);
+ for (word address = 0x0; address < 0x4000; address += 512) {
+ dumpPRG(base, address);
+ }
+ }
+ for (word address = 0x4000; address < 0x8000; address += 512) {
+ dumpPRG(base, address);
+ }
+ break;
case 200:
banks = int_pow(2, prgsize);
@@ -3919,6 +3939,34 @@ void readCHR(boolean readrom) {
}
}
break;
+
+ case 176:
+ banks = int_pow(2, chrsize) * 4;
+ write_prg_byte(0x5FF3, 0); // extended MMC3 mode: disabled
+ write_prg_byte(0x5FF0, 1); // 256K outer bank mode
+ for (int i = 0; i < banks; i += 8) {
+ write_prg_byte(0x5FF2, (i & 0x700) >> 3); // outer 256k bank
+ write_prg_byte(0x8000, 0);
+ write_prg_byte(0x8001, i);
+ write_prg_byte(0x8000, 0x0A);
+ write_prg_byte(0x8001, i + 1);
+ write_prg_byte(0x8000, 1);
+ write_prg_byte(0x8001, i + 2);
+ write_prg_byte(0x8000, 0x0B);
+ write_prg_byte(0x8001, i + 3);
+ write_prg_byte(0x8000, 2);
+ write_prg_byte(0x8001, i + 4);
+ write_prg_byte(0x8000, 3);
+ write_prg_byte(0x8001, i + 5);
+ write_prg_byte(0x8000, 4);
+ write_prg_byte(0x8001, i + 6);
+ write_prg_byte(0x8000, 5);
+ write_prg_byte(0x8001, i + 7);
+ for (word address = 0x0; address < 0x2000; address += 512) {
+ dumpCHR(address);
+ }
+ }
+ break;
case 184: // 16K/32K
banks = int_pow(2, chrsize);