Skip to content

Commit

Permalink
Update NES.ino - fix mapper 80+82
Browse files Browse the repository at this point in the history
fix mapper 80+82
  • Loading branch information
nsx0r authored Aug 28, 2024
1 parent 5cbbfa6 commit 6cbc8a5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Cart_Reader/NES.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2294,10 +2294,9 @@ void readPRG(bool readrom) {

case 82: // 128K
banks = int_pow(2, prgsize) * 2;
for (size_t i = 0; i < banks; i += 2) {
write_prg_byte(0x7EFA, i << 2); // PRG Bank 0 ($8000-$9FFF)
write_prg_byte(0x7EFB, (i + 1) << 2); // PRG Bank 1 ($A000-$BFFF)
dumpBankPRG(0x0, 0x4000, base); // 8K Banks ($8000-$BFFF)
for (size_t i = 0; i < banks; i++) {
write_prg_byte(0x7EFA, i << 2); // PRG Bank 0 ($8000-$9FFF)
dumpBankPRG(0x0, 0x2000, base); // 8K Banks ($8000-$BFFF)
}
break;

Expand Down

0 comments on commit 6cbc8a5

Please sign in to comment.