[NES] fix mapper 148

This commit is contained in:
nsx0r 2023-07-18 07:17:17 +02:00 committed by GitHub
parent f4fb19e6ae
commit 66dfc8b4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3331,9 +3331,10 @@ void readCHR(bool readrom) {
break; break;
case 3: // 8K/16K/32K - bus conflicts case 3: // 8K/16K/32K - bus conflicts
case 148: // Sachen SA-008-A and Tengen 800008 - Bus conflicts
banks = int_pow(2, chrsize) / 2; banks = int_pow(2, chrsize) / 2;
for (size_t i = 0; i < banks; i++) { for (size_t i = 0; i < banks; i++) {
for (size_t x = 0; x < 0x2000; x++) { for (size_t x = 0; x < 0x8000; x++) {
if (read_prg_byte(0x8000 + x) == i) { if (read_prg_byte(0x8000 + x) == i) {
write_prg_byte(0x8000 + x, i); write_prg_byte(0x8000 + x, i);
break; break;
@ -4063,26 +4064,6 @@ void readCHR(bool readrom) {
} }
break; break;
case 148: // Sachen SA-008-A and Tengen 800008 -- Bus conflicts
banks = int_pow(2, chrsize);
busConflict = true;
for (size_t i = 0; i < banks; i++) {
for (size_t x = 0; x < 0x8000; x++) {
if (read_prg_byte(0x8000 + x) == i) {
write_prg_byte(0x8000 + x, i & 0x07);
busConflict = false;
break;
}
}
if (busConflict) {
write_prg_byte(0x8000 + i, i & 0x07);
}
for (size_t address = 0x0; address < 0x2000; address += 512) {
dumpCHR(address);
}
}
break;
case 174: // 64k case 174: // 64k
for (size_t i = 0; i < 8; i++) { for (size_t i = 0; i < 8; i++) {
write_prg_byte(0xFF00 + (i << 1), 0); write_prg_byte(0xFF00 + (i << 1), 0);