aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsx0r <[email protected]>2023-07-18 07:17:17 +0200
committerGitHub <[email protected]>2023-07-18 07:17:17 +0200
commit66dfc8b4e9b1d528b604ea3bd4acdcb83667b163 (patch)
tree2285ab672b5589abe4336a3dc5946846d2ac5a61
parentf4fb19e6ae67b46ddd86c2051437882f8ed7e2db (diff)
downloadcartreader-66dfc8b4e9b1d528b604ea3bd4acdcb83667b163.tar.gz
cartreader-66dfc8b4e9b1d528b604ea3bd4acdcb83667b163.zip
[NES] fix mapper 148
-rw-r--r--Cart_Reader/NES.ino23
1 files changed, 2 insertions, 21 deletions
diff --git a/Cart_Reader/NES.ino b/Cart_Reader/NES.ino
index 9bdd4a9..f958b3e 100644
--- a/Cart_Reader/NES.ino
+++ b/Cart_Reader/NES.ino
@@ -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);