Merge pull request #571 from nsx0r/patch-15

added NES mapper 62
This commit is contained in:
sanni 2022-10-19 14:45:20 +02:00 committed by GitHub
commit 9c74fd8847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,7 @@ static const byte PROGMEM mapsize[] = {
45, 3, 6, 0, 8, 0, 0, // ga23c asic multicart [UNLICENSED]
47, 4, 4, 6, 6, 0, 0, // (super spike vball + world cup)
48, 3, 4, 6, 6, 0, 0, // taito tc0690
62, 7, 7, 8, 8, 0, 0, // K-1017P [UNLICENSED]
64, 2, 3, 4, 5, 0, 0, // tengen rambo-1 [UNLICENSED]
65, 3, 4, 5, 6, 0, 0, // irem h-3001
66, 2, 3, 2, 3, 0, 0, // gxrom/mhrom
@ -148,9 +149,9 @@ byte mapcount = (sizeof(mapsize) / sizeof(mapsize[0])) / 7;
boolean mapfound = false;
byte mapselect;
int PRG[] = { 16, 32, 64, 128, 256, 512, 1024 };
int PRG[] = { 16, 32, 64, 128, 256, 512, 1024, 2048 };
byte prglo = 0; // Lowest Entry
byte prghi = 6; // Highest Entry
byte prghi = 7; // Highest Entry
int CHR[] = { 0, 8, 16, 32, 64, 128, 256, 512, 1024 };
byte chrlo = 0; // Lowest Entry
@ -3220,6 +3221,16 @@ void readPRG(boolean readrom) {
}
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
banks = int_pow(2, prgsize) / 2;
for (int i = 0; i < banks; i++) { // 64K/128K
@ -3818,6 +3829,16 @@ void readCHR(boolean readrom) {
}
break;
case 62:
banks = int_pow(2, chrsize) / 2;
for (int i = 0; i < banks; i++) {
write_prg_byte(0x8000 + (i / 4), i & 3);
for (word address = 0x0; address < 0x2000; address += 512) {
dumpCHR(address);
}
}
break;
case 67: // 128K
banks = int_pow(2, chrsize) * 2;
for (int i = 0; i < banks; i += 4) { // 2K Banks