diff --git a/Cart_Reader/NES.ino b/Cart_Reader/NES.ino index f182c9d8..59f5d2a4 100644 --- a/Cart_Reader/NES.ino +++ b/Cart_Reader/NES.ino @@ -101,7 +101,7 @@ static const struct mapper_NES PROGMEM mapsize[] = { { 78, 3, 3, 5, 5, 0, 0 }, // irem 74hc161/32 { 79, 1, 2, 2, 3, 0, 0 }, // NINA-03/06 by AVE [UNLICENSED] { 80, 3, 3, 5, 6, 0, 1 }, // taito x1-005 [prgram r/w] - { 82, 3, 3, 5, 6, 0, 1 }, // taito x1-017 [prgram r/w] + { 82, 3, 5, 5, 6, 0, 1 }, // taito x1-017 [prgram r/w] // 84 - bad mapper, not used { 85, 3, 5, 0, 5, 0, 1 }, // vrc7 [sram r/w] { 86, 3, 3, 4, 4, 0, 0 }, // jaleco jf-13 (moero pro yakyuu) @@ -2286,10 +2286,9 @@ void readPRG(bool readrom) { case 80: // 128K case 207: // 256K [CART SOMETIMES NEEDS POWERCYCLE] banks = int_pow(2, prgsize) * 2; - for (size_t i = 0; i < banks; i += 2) { + for (size_t i = 0; i < banks; i++) { write_prg_byte(0x7EFA, i); // PRG Bank 0 ($8000-$9FFF) - write_prg_byte(0x7EFC, i + 1); // PRG Bank 1 ($A000-$BFFF) - dumpBankPRG(0x0, 0x4000, base); + dumpBankPRG(0x0, 0x2000, base); } break; @@ -3296,13 +3295,12 @@ void readCHR(bool readrom) { case 80: // 128K/256K case 82: // 128K/256K case 207: // 128K [CART SOMETIMES NEEDS POWERCYCLE] - banks = int_pow(2, chrsize) * 4; - for (size_t i = 0; i < banks; i += 4) { - write_prg_byte(0x7EF2, i); // CHR Bank 2 [REGISTERS 0x7EF0/0x7EF1 WON'T WORK] - write_prg_byte(0x7EF3, i + 1); // CHR Bank 3 - write_prg_byte(0x7EF4, i + 2); // CHR Bank 4 - write_prg_byte(0x7EF5, i + 3); // CHR Bank 5 - dumpBankCHR(0x0, 0x2000); + banks = int_pow(2, chrsize) * 2; + write_prg_byte(0x7EF6, 0x00); // CHR mode [2x 2KiB banks at $0000-$0FFF] + for (size_t i = 0; i < banks; i += 2) { + write_prg_byte(0x7EF0, i << 1); + write_prg_byte(0x7EF1, (i + 1) << 1); + dumpBankCHR(0x0, 0x1000); } break; @@ -4651,4 +4649,4 @@ void A29040B_writeFLASH() { #endif //****************************************** // End of File -//****************************************** \ No newline at end of file +//******************************************