From 36fa976b53ea2929cdba7d5c94c9975e13beb117 Mon Sep 17 00:00:00 2001 From: nsx0r Date: Sat, 19 Nov 2022 09:04:06 +0100 Subject: [PATCH] added NES mapper 28 added NES mapper 28, tested working with 2x Action 53 cartridges --- Cart_Reader/NES.ino | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Cart_Reader/NES.ino b/Cart_Reader/NES.ino index 85ed008..0634e2f 100644 --- a/Cart_Reader/NES.ino +++ b/Cart_Reader/NES.ino @@ -51,6 +51,7 @@ static const byte PROGMEM mapsize[] = { 24, 4, 4, 5, 5, 0, 0, // vrc6a (akumajou densetsu) 25, 3, 4, 5, 6, 0, 1, // vrc2c/vrc4b/vrc4d [sram r/w] 26, 4, 4, 5, 6, 1, 1, // vrc6b [sram r/w] + 28, 5, 7, 0, 0, 0, 0, // Action 53 [UNLICENSED] 30, 4, 5, 0, 0, 0, 0, // unrom 512 (NESmaker) [UNLICENSED] 32, 3, 4, 5, 5, 0, 0, // irem g-101 33, 3, 4, 5, 6, 0, 0, // taito tc0190 @@ -2696,6 +2697,25 @@ void readPRG(boolean readrom) { } } break; + + case 28: // using 32k mode for inner and outer banks, switching only with outer + banks = int_pow(2, prgsize) / 2; + write_prg_byte(0x5000, 0x81); + write_prg_byte(0x8000, 0); + write_prg_byte(0x5000, 0x80); + write_prg_byte(0x8000, 0); + write_prg_byte(0x5000, 0x01); + write_prg_byte(0x8000, 0); + write_prg_byte(0x5000, 0x00); + write_prg_byte(0x8000, 0); + for (int i = 0; i < banks; i++) { + write_prg_byte(0x5000, 0x81); + write_prg_byte(0x8000, i); + for (word address = 0x0; address < 0x8000; address += 512) { + dumpPRG(base, address); + } + } + break; case 30: // 256K/512K banks = int_pow(2, prgsize);