added NES mappers 46+52+212

added NES mappers 46+52+212
This commit is contained in:
nsx0r 2022-12-06 16:48:53 +01:00 committed by GitHub
parent 13b6af3275
commit eba530437f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,8 +60,10 @@ static const byte PROGMEM mapsize[] = {
37, 4, 4, 6, 6, 0, 0, // (super mario bros + tetris + world cup) 37, 4, 4, 6, 6, 0, 0, // (super mario bros + tetris + world cup)
42, 0, 3, 0, 5, 0, 0, // hacked FDS games converted to cartridge [UNLICENSED] 42, 0, 3, 0, 5, 0, 0, // hacked FDS games converted to cartridge [UNLICENSED]
45, 3, 6, 0, 8, 0, 0, // ga23c asic multicart [UNLICENSED] 45, 3, 6, 0, 8, 0, 0, // ga23c asic multicart [UNLICENSED]
46, 1, 6, 0, 8, 0, 0, // Rumble Station [UNLICENSED]
47, 4, 4, 6, 6, 0, 0, // (super spike vball + world cup) 47, 4, 4, 6, 6, 0, 0, // (super spike vball + world cup)
48, 3, 4, 6, 6, 0, 0, // taito tc0690 48, 3, 4, 6, 6, 0, 0, // taito tc0690
52, 0, 3, 0, 3, 0, 0, // Realtec 8213 [UNLICENSED]
58, 1, 6, 1, 6, 0, 0, // BMC-GKB (C)NROM-based multicarts, duplicate of mapper 213 [UNLICENSED] 58, 1, 6, 1, 6, 0, 0, // BMC-GKB (C)NROM-based multicarts, duplicate of mapper 213 [UNLICENSED]
60, 2, 2, 3, 3, 0, 0, // Reset-based NROM-128 4-in-1 multicarts [UNLICENSED] 60, 2, 2, 3, 3, 0, 0, // Reset-based NROM-128 4-in-1 multicarts [UNLICENSED]
62, 7, 7, 8, 8, 0, 0, // K-1017P [UNLICENSED] 62, 7, 7, 8, 8, 0, 0, // K-1017P [UNLICENSED]
@ -123,6 +125,7 @@ static const byte PROGMEM mapsize[] = {
206, 1, 3, 2, 4, 0, 0, // dxrom 206, 1, 3, 2, 4, 0, 0, // dxrom
207, 4, 4, 5, 5, 0, 0, // taito x1-005 variant (fudou myouou den) 207, 4, 4, 5, 5, 0, 0, // taito x1-005 variant (fudou myouou den)
210, 3, 5, 5, 6, 0, 0, // namco 175/340 210, 3, 5, 5, 6, 0, 0, // namco 175/340
212, 0, 3, 0, 4, 0, 0, // BMC Super HiK 300-in-1 [UNLICENSED]
213, 1, 6, 1, 6, 0, 0, // BMC-GKB (C)NROM-based multicarts, duplicate of mapper 58 [UNLICENSED] 213, 1, 6, 1, 6, 0, 0, // BMC-GKB (C)NROM-based multicarts, duplicate of mapper 58 [UNLICENSED]
225, 4, 7, 5, 8, 0, 0, // ET-4310 (FC) + K-1010 (NES) [UNLICENSED] 225, 4, 7, 5, 8, 0, 0, // ET-4310 (FC) + K-1010 (NES) [UNLICENSED]
226, 6, 7, 0, 0, 0, 0, // BMC-76IN1, BMC-SUPER42IN1, BMC-GHOSTBUSTERS63IN1 [UNLICENSED] 226, 6, 7, 0, 0, 0, 0, // BMC-76IN1, BMC-SUPER42IN1, BMC-GHOSTBUSTERS63IN1 [UNLICENSED]
@ -2850,16 +2853,28 @@ void readPRG(boolean readrom) {
} }
break; break;
case 62: case 46:
banks = int_pow(2, prgsize) / 2; banks = int_pow(2, prgsize) / 2; // 32k banks
for (int i = 0; i < banks; i++) { for (int i = 0; i < banks; i++) {
write_prg_byte(0x8000 + (i * 512) + ((i & 32) << 1), 0x00); write_prg_byte(0x6000, (i & 0x1E) >> 1); // high bits
write_prg_byte(0x8000, i & 0x01); // low bit
for (word address = 0x0; address < 0x8000; address += 512) { for (word address = 0x0; address < 0x8000; address += 512) {
dumpPRG(base, address); dumpPRG(base, address);
} }
} }
break; break;
case 52:
banks = int_pow(2, prgsize) ;
write_prg_byte(0xA001, 0x80); // enable WRAM write
for (int i = 0; i < banks; i++) {
write_prg_byte(0x6000, (i & 0x07) | 0x08);
for (word address = 0x0; address < 0x4000; address += 512) {
dumpPRG(base, address);
}
}
break;
case 58: case 58:
case 213: case 213:
banks = int_pow(2, prgsize) / 2; banks = int_pow(2, prgsize) / 2;
@ -2884,6 +2899,16 @@ void readPRG(boolean readrom) {
} }
break; break;
case 62:
banks = int_pow(2, prgsize) / 2;
for (int i = 0; i < banks; i++) {
write_prg_byte(0x8000 + (i * 512) + ((i & 32) << 1), 0x00);
for (word address = 0x0; address < 0x8000; address += 512) {
dumpPRG(base, address);
}
}
break;
case 66: // 64K/128K case 66: // 64K/128K
banks = int_pow(2, prgsize) / 2; banks = int_pow(2, prgsize) / 2;
for (int i = 0; i < banks; i++) { // 64K/128K for (int i = 0; i < banks; i++) { // 64K/128K
@ -3275,6 +3300,16 @@ void readPRG(boolean readrom) {
} }
break; break;
case 212:
banks = int_pow(2, prgsize);
for (int i = 0; i < banks; i++) {
write_prg_byte(0x8000 + (i & 0x07), 0);
for (word address = 0x0; address < 0x4000; address += 512) {
dumpPRG(base, address);
}
}
break;
case 225: case 225:
case 255: case 255:
banks = int_pow(2, prgsize); banks = int_pow(2, prgsize);
@ -3791,6 +3826,28 @@ void readCHR(boolean readrom) {
} }
break; break;
case 46:
banks = int_pow(2, chrsize); // 8k banks
for (int i = 0; i < banks; i++) {
write_prg_byte(0x6000, (i & 0x78) << 1); // high bits
write_prg_byte(0x8000, (i & 0x07) << 4); // low bits
for (word address = 0x0; address < 0x2000; address += 512) {
dumpCHR(address);
}
}
break;
case 52:
banks = int_pow(2, chrsize);
write_prg_byte(0xA001, 0x80); // enable WRAM write
for (int i = 0; i < banks; i++) {
write_prg_byte(0x6000, (i & 0x04) << 2 | (i & 0x03) << 4 | 0x40);
for (word address = 0x0; address < 0x1000; address += 512) {
dumpCHR(address);
}
}
break;
case 58: case 58:
case 213: case 213:
banks = int_pow(2, chrsize) / 2; banks = int_pow(2, chrsize) / 2;
@ -4163,6 +4220,16 @@ void readCHR(boolean readrom) {
} }
break; break;
case 212:
banks = int_pow(2, chrsize) / 2;
for (int i = 0; i < banks; i++) {
write_prg_byte(0x8000 + (i & 0x07), 0);
for (word address = 0x0; address < 0x2000; address += 512) {
dumpCHR(address);
}
}
break;
case 225: case 225:
case 255: case 255:
banks = int_pow(2, chrsize) / 2; banks = int_pow(2, chrsize) / 2;