mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-26 14:34:15 +01:00
[NES] fix mapper 148
This commit is contained in:
parent
f4fb19e6ae
commit
66dfc8b4e9
@ -3331,9 +3331,10 @@ void readCHR(bool readrom) {
|
||||
break;
|
||||
|
||||
case 3: // 8K/16K/32K - bus conflicts
|
||||
case 148: // Sachen SA-008-A and Tengen 800008 - Bus conflicts
|
||||
banks = int_pow(2, chrsize) / 2;
|
||||
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) {
|
||||
write_prg_byte(0x8000 + x, i);
|
||||
break;
|
||||
@ -4063,26 +4064,6 @@ void readCHR(bool readrom) {
|
||||
}
|
||||
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
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
write_prg_byte(0xFF00 + (i << 1), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user