Skip to content

Commit

Permalink
Update NES.ino - fixed mapper 88
Browse files Browse the repository at this point in the history
Update NES.ino - fixed mapper 88
  • Loading branch information
nsx0r authored Jan 1, 2025
1 parent 44ad089 commit c6f3e8b
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion Cart_Reader/NES.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,6 @@ void readCHR(bool readrom) {
case 52:
case 64:
case 76:
case 88: // 128K
case 95: // 32K
case 118:
case 119:
Expand Down Expand Up @@ -3408,6 +3407,30 @@ void readCHR(bool readrom) {
}
break;

case 88:
banks = int_pow(2, chrsize) * 4;
write_prg_byte(0xA001, 0x80);
for (size_t i = 0; i < banks; i += 4) {
if (i < 64) {
write_prg_byte(0x8000, 0);
write_prg_byte(0x8001, i);
write_prg_byte(0x8000, 1);
write_prg_byte(0x8001, i + 2);
dumpBankCHR(0x0, 0x1000);
} else {
write_prg_byte(0x8000, 2);
write_prg_byte(0x8001, i);
write_prg_byte(0x8000, 3);
write_prg_byte(0x8001, i + 1);
write_prg_byte(0x8000, 4);
write_prg_byte(0x8001, i + 2);
write_prg_byte(0x8000, 5);
write_prg_byte(0x8001, i + 3);
dumpBankCHR(0x1000, 0x2000);
}
}
break;

case 89: // 128K
banks = int_pow(2, chrsize) / 2;
for (size_t i = 0; i < banks; i++) { // 8K Banks
Expand Down

0 comments on commit c6f3e8b

Please sign in to comment.