@@ -262,12 +262,12 @@ static const struct mapper_NES PROGMEM mapsize[] = {
262
262
{ 221 , 0 , 7 , 0 , 0 , 0 , 0 }, // NTDEC N625092 (400-in-1)
263
263
// 222 - 810343-C [TODO]
264
264
// 223 - not used (duplicate of 199)
265
- // 224 - 晶科泰 [Jncota] KT-008 (duplicate of 268)
266
- { 225 , 4 , 7 , 5 , 8 , 0 , 0 }, // ET-4310 / K-1010
267
- { 226 , 6 , 7 , 0 , 0 , 0 , 0 }, // 0380 / 910307
268
- { 227 , 1 , 5 , 0 , 0 , 0 , 0 }, // 810449-C-A1 / 外星 [Wàixīng] FW01 / N120-72
269
- { 228 , 4 , 7 , 5 , 7 , 0 , 0 }, // Action 52 / Cheetahmen II
270
- { 229 , 5 , 5 , 6 , 6 , 0 , 0 }, // SC 0892 / BMC 31-IN-1
265
+ { 224 , 0 , 11 , 0 , 8 , 0 , 0 }, // 晶科泰 [Jncota] KT-008
266
+ { 225 , 4 , 7 , 5 , 8 , 0 , 0 }, // ET-4310 / K-1010
267
+ { 226 , 6 , 7 , 0 , 0 , 0 , 0 }, // 0380 / 910307
268
+ { 227 , 1 , 5 , 0 , 0 , 0 , 0 }, // 810449-C-A1 / 外星 [Wàixīng] FW01 / N120-72
269
+ { 228 , 4 , 7 , 5 , 7 , 0 , 0 }, // Action 52 / Cheetahmen II
270
+ { 229 , 5 , 5 , 6 , 6 , 0 , 0 }, // SC 0892 / BMC 31-IN-1
271
271
// 230 - CTC-43A [TODO]
272
272
// 231 - 20-in-1 [TODO]
273
273
{ 232 , 4 , 4 , 0 , 0 , 0 , 0 }, // BIC BF9096 (Camerica/Codemasters "Quattro" cartridges)
@@ -305,27 +305,33 @@ static const struct mapper_NES PROGMEM mapsize[] = {
305
305
// 264 - Yoko Soft / Cony Soft [TODO]
306
306
// 265 - T-262 multicarts [TODO]
307
307
// 266 - City Fighter IV [TODO]
308
- // 267 - 晶太 EL861121C / JY-119 multicart [TODO]
309
- { 268 , 0 , 11 , 0 , 8 , 0 , 0 }, // KP6022 / AA6023 ASIC (Mindkids/Coolboy)
308
+ // 267 - 晶太 [Jīngtài] EL861121C / JY-119 multicart [TODO]
309
+ { 268 , 0 , 11 , 0 , 8 , 0 , 0 }, // KP6022 / AA6023 ASIC (Mindkids/Coolboy) [268.0-1]
310
310
{ 286 , 0 , 3 , 0 , 5 , 0 , 0 }, // Benshieng BS-5 multicarts [TODO]
311
311
{ 288 , 0 , 3 , 0 , 4 , 0 , 0 }, // GKCXIN1 (21-in-1)
312
312
{ 289 , 5 , 7 , 0 , 0 , 0 , 0 }, // 60311C / N76A-1
313
313
{ 290 , 0 , 5 , 0 , 4 , 0 , 0 }, // Asder 20-in-1
314
314
// 313 - undumpable (reset-based TKROM multicarts)
315
- { 315 , 0 , 5 , 0 , 7 , 0 , 0 }, // 820732C / 830134C
316
- { 319 , 3 , 3 , 4 , 4 , 0 , 0 }, // HP-898F / KD-7/9-E
317
- { 329 , 1 , 7 , 0 , 0 , 0 , 3 }, // EDU2000 (duplicate of 177)
318
- { 331 , 0 , 5 , 0 , 7 , 0 , 0 }, // NewStar multicarts (NS03, 7-in-1, 12-in-1)
319
- { 332 , 3 , 4 , 4 , 5 , 0 , 0 }, // WS-1001
320
- { 351 , 0 , 6 , 0 , 8 , 0 , 0 }, // Techline XB multicarts
321
- { 366 , 0 , 6 , 0 , 8 , 0 , 0 }, // GN-45
322
- // 422 - TEC9719 [TODO]
315
+ { 315 , 0 , 5 , 0 , 7 , 0 , 0 }, // 820732C / 830134C
316
+ { 319 , 3 , 3 , 4 , 4 , 0 , 0 }, // HP-898F / KD-7/9-E
317
+ { 329 , 1 , 7 , 0 , 0 , 0 , 3 }, // EDU2000 (duplicate of 177)
318
+ { 331 , 0 , 5 , 0 , 7 , 0 , 0 }, // NewStar multicarts (NS03, 7-in-1, 12-in-1)
319
+ { 332 , 3 , 4 , 4 , 5 , 0 , 0 }, // WS-1001
320
+ { 351 , 0 , 6 , 0 , 8 , 0 , 0 }, // Techline XB multicarts
321
+ { 366 , 0 , 6 , 0 , 8 , 0 , 0 }, // GN-45
322
+ { 396 , 0 , 6 , 0 , 0 , 0 , 0 }, // 晶太 [Jīngtài] YY850437C
323
+ { 422 , 1 , 8 , 0 , 8 , 0 , 0 }, // TEC9719
323
324
{ 446 , 0 , 8 , 0 , 0 , 0 , 0 }, // SMD172B_FPGA
324
325
{ 470 , 0 , 11 , 0 , 0 , 0 , 0 }, // INX_007T_V01
325
326
{ 532 , 4 , 4 , 6 , 6 , 0 , 0 }, // CHINA_ER_SAN2 (duplicate of 19)
326
- // 534 - ING003C [TODO]
327
+ { 534 , 1 , 8 , 0 , 8 , 0 , 0 }, // ING003C / PJ-008 / AT-207
327
328
// 551 - 晶科泰 [Jncota] KT-xxx [TODO]
328
- { 552 , 0 , 5 , 0 , 6 , 0 , 0 } // Taito P3-044 (X1-017, actual bank order)
329
+ { 552 , 0 , 5 , 0 , 6 , 0 , 0 }, // Taito P3-044 (X1-017, actual bank order)
330
+ { 995 , 0 , 11 , 0 , 8 , 0 , 0 }, // [placeholder for 268.2-3]
331
+ { 996 , 0 , 8 , 0 , 8 , 0 , 0 }, // [placeholder for 268.4-5]
332
+ { 997 , 0 , 11 , 0 , 8 , 0 , 0 }, // [placeholder for 268.6-7]
333
+ { 998 , 0 , 6 , 0 , 6 , 0 , 0 }, // [placeholder for 268.8-9]
334
+ { 999 , 0 , 6 , 0 , 6 , 0 , 0 } // [placeholder for 268.10-11]
329
335
};
330
336
331
337
const char _file_name_no_number_fmt[] PROGMEM = " %s.%s" ;
@@ -2097,19 +2103,27 @@ void readPRG(bool readrom) {
2097
2103
case 195 :
2098
2104
case 196 :
2099
2105
case 206 : // 32/64/128K
2106
+ case 224 :
2100
2107
case 245 : // 1024K
2101
2108
case 248 :
2102
2109
case 268 : // submapper 0
2103
2110
case 315 :
2104
2111
case 351 :
2105
2112
case 366 :
2113
+ case 422 :
2114
+ case 534 :
2115
+ case 995 :
2116
+ case 996 :
2117
+ case 997 :
2118
+ case 998 :
2119
+ case 999 :
2106
2120
if ((mapper == 206 ) && (prgsize == 1 )) {
2107
2121
dumpBankPRG (0x0 , 0x8000 , base);
2108
2122
} else {
2109
2123
banks = int_pow (2 , prgsize) * 2 ;
2110
2124
write_prg_byte (0xA001 , 0x80 ); // Block Register - PRG RAM Chip Enable, Writable
2111
- if (mapper == 126 ) {
2112
- write_prg_byte (0x6003 , 0 ); // set MMC3 banking mode
2125
+ if (( mapper == 126 ) || (mapper == 422 ) || (mapper == 534 ) ) {
2126
+ write_prg_byte (0x6803 , 0 ); // set MMC3 banking mode
2113
2127
}
2114
2128
if ((mapper == 115 ) || (mapper == 134 ) || (mapper == 248 )) {
2115
2129
write_prg_byte (0x6000 , 0 ); // set MMC3 banking mode
@@ -2151,8 +2165,9 @@ void readPRG(bool readrom) {
2151
2165
if (mapper == 116 ) {
2152
2166
write_prg_byte (0x4100 , 0x01 ); // MMC3 mode
2153
2167
}
2154
- if (mapper == 126 ) {
2155
- write_prg_byte (0x6000 , (i & 0x180 ) >> 3 | (i & 0x70 ) >> 4 );
2168
+ if ((mapper == 126 ) || (mapper == 422 ) || (mapper == 534 )) {
2169
+ write_prg_byte (0x6800 , (i & 0x300 ) >> 4 | (i & 0x70 ) >> 4 ); // submapper 0
2170
+ // write_prg_byte(0x6800, (i & 0x80) >> 2 | (i & 0x70) >> 4); // submapper 1
2156
2171
}
2157
2172
if (mapper == 134 ) {
2158
2173
write_prg_byte (0x6000 , (i & 0x40 ) >> 2 ); // A19
@@ -2171,15 +2186,11 @@ void readPRG(bool readrom) {
2171
2186
write_prg_byte (0x8001 , 0xFF );
2172
2187
}
2173
2188
}
2174
- if (mapper == 268 ) {
2189
+ if (( mapper == 224 ) || (mapper == 268 ) ) {
2175
2190
write_prg_byte (0x5000 , ((i & 0x70 ) >> 4 ) | ((i & 0xC00 ) >> 6 ));
2176
2191
write_prg_byte (0x5001 , ((i & 0x80 ) >> 3 ) | ((i & 0x300 ) >> 6 ) | 0x60 );
2177
- write_prg_byte (0x5002 , 0 );
2178
- write_prg_byte (0x5003 , 0 );
2179
2192
write_prg_byte (0x6000 , ((i & 0x70 ) >> 4 ) | ((i & 0xC00 ) >> 6 ));
2180
2193
write_prg_byte (0x6001 , ((i & 0x80 ) >> 3 ) | ((i & 0x300 ) >> 6 ) | 0x60 );
2181
- write_prg_byte (0x6002 , 0 );
2182
- write_prg_byte (0x6003 , 0 );
2183
2194
}
2184
2195
if (mapper == 315 ) {
2185
2196
write_prg_byte (0x6800 , (i & 30 ) >> 3 );
@@ -2190,6 +2201,42 @@ void readPRG(bool readrom) {
2190
2201
if (mapper == 366 ) {
2191
2202
write_prg_byte (0x6800 + (i & 0x70 ), i);
2192
2203
}
2204
+ if (mapper == 995 ) {
2205
+ write_prg_byte (0x5000 , ((i & 0x70 ) >> 4 ) | ((i & 0xC00 ) >> 6 ));
2206
+ write_prg_byte (0x5001 , ((i & 0x80 ) >> 4 ) | ((i & 0x100 ) >> 6 ) | ((i & 0x200 ) >> 8 ) | 0x60 );
2207
+ write_prg_byte (0x6000 , ((i & 0x70 ) >> 4 ) | ((i & 0xC00 ) >> 6 ));
2208
+ write_prg_byte (0x6001 , ((i & 0x80 ) >> 4 ) | ((i & 0x100 ) >> 6 ) | ((i & 0x200 ) >> 8 ) | 0x60 );
2209
+ }
2210
+ if (mapper == 996 ) {
2211
+ write_prg_byte (0x5000 , ((i & 0x70 ) >> 4 ) | ((i & 0x180 ) >> 3 ));
2212
+ write_prg_byte (0x5001 , 0x60 );
2213
+ write_prg_byte (0x6000 , ((i & 0x70 ) >> 4 ) | ((i & 0x180 ) >> 3 ));
2214
+ write_prg_byte (0x6001 , 0x60 );
2215
+ }
2216
+ if (mapper == 997 ) {
2217
+ if (i >= banks / 2 ) {
2218
+ write_prg_byte (0x5000 , ((i & 0x70 ) >> 4 ) | ((i & 0xC00 ) >> 6 ) | 0x88 );
2219
+ write_prg_byte (0x6000 , ((i & 0x70 ) >> 4 ) | ((i & 0xC00 ) >> 6 ) | 0x88 );
2220
+ } else {
2221
+ write_prg_byte (0x5000 , ((i & 0x70 ) >> 4 ) | ((i & 0xC00 ) >> 6 ));
2222
+ write_prg_byte (0x6000 , ((i & 0x70 ) >> 4 ) | ((i & 0xC00 ) >> 6 ));
2223
+ }
2224
+ write_prg_byte (0x6001 , ((i & 0x80 ) >> 3 ) | ((i & 0x300 ) >> 6 ) | 0x60 );
2225
+ write_prg_byte (0x6002 , 0x00 );
2226
+ write_prg_byte (0x6003 , 0x00 );
2227
+ }
2228
+ if ((mapper == 998 ) || (mapper == 999 )) {
2229
+ write_prg_byte (0x5000 , ((i & 0x70 ) >> 4 ));
2230
+ write_prg_byte (0x5001 , 0x60 );
2231
+ write_prg_byte (0x6000 , ((i & 0x70 ) >> 4 ));
2232
+ write_prg_byte (0x6001 , 0x60 );
2233
+ }
2234
+ if ((mapper == 224 ) || (mapper == 268 ) || (mapper == 995 ) || (mapper == 996 ) || (mapper == 997 ) || (mapper == 998 ) || (mapper == 999 )) {
2235
+ write_prg_byte (0x5002 , 0x00 );
2236
+ write_prg_byte (0x5003 , 0x00 );
2237
+ write_prg_byte (0x6002 , 0x00 );
2238
+ write_prg_byte (0x6003 , 0x00 );
2239
+ }
2193
2240
write_prg_byte (0x8000 , 0x06 ); // PRG Bank 0 ($8000-$9FFF)
2194
2241
write_prg_byte (0x8001 , i);
2195
2242
dumpBankPRG (0x0 , 0x2000 , base);
@@ -2710,7 +2757,7 @@ void readPRG(bool readrom) {
2710
2757
2711
2758
case 91 :
2712
2759
banks = int_pow (2 , prgsize) * 2 ;
2713
- for (size_t i = 0 ; i < banks; i += 1 ) {
2760
+ for (size_t i = 0 ; i < banks; i++ ) {
2714
2761
write_prg_byte (0x8000 + ((i & 0x30 ) >> 3 ), i); // PRG A18-A17 (submapper 0 only)
2715
2762
write_prg_byte (0x7000 , i); // PRG -A13
2716
2763
dumpBankPRG (0x0 , 0x2000 , base);
@@ -2833,7 +2880,7 @@ void readPRG(bool readrom) {
2833
2880
2834
2881
case 120 :
2835
2882
base = 0x6000 ;
2836
- for (size_t i = 0 ; i < 8 ; i += 1 ) {
2883
+ for (size_t i = 0 ; i < 8 ; i++ ) {
2837
2884
write_prg_byte (0x41FF , i);
2838
2885
dumpBankPRG (0x0 , 0x2000 , base);
2839
2886
}
@@ -2843,7 +2890,7 @@ void readPRG(bool readrom) {
2843
2890
2844
2891
case 125 :
2845
2892
base = 0x6000 ;
2846
- for (size_t i = 0 ; i < 16 ; i += 1 ) {
2893
+ for (size_t i = 0 ; i < 16 ; i++ ) {
2847
2894
write_prg_byte (0x6000 , i);
2848
2895
dumpBankPRG (0x0 , 0x2000 , base);
2849
2896
}
@@ -3271,6 +3318,15 @@ void readPRG(bool readrom) {
3271
3318
}
3272
3319
break ;
3273
3320
3321
+ case 396 :
3322
+ banks = int_pow (2 , prgsize);
3323
+ for (int i = 0 ; i < banks; i++) {
3324
+ write_prg_byte (0xA000 , (i >> 3 ) & 0x07 );
3325
+ write_prg_byte (0x8000 , i & 0x07 );
3326
+ dumpBankPRG (0x0 , 0x4000 , base);
3327
+ }
3328
+ break ;
3329
+
3274
3330
case 446 :
3275
3331
banks = int_pow (2 , prgsize) * 2 ;
3276
3332
write_prg_byte (0x5003 , 0 );
@@ -3398,14 +3454,18 @@ void readCHR(bool readrom) {
3398
3454
case 195 :
3399
3455
case 196 :
3400
3456
case 206 : // 16K/32K/64K
3457
+ case 224 :
3401
3458
case 248 :
3459
+ case 268 :
3402
3460
case 315 :
3403
3461
case 351 :
3404
3462
case 366 :
3463
+ case 422 :
3464
+ case 534 :
3405
3465
banks = int_pow (2 , chrsize) * 4 ;
3406
3466
write_prg_byte (0xA001 , 0x80 );
3407
- if (mapper == 126 ) {
3408
- write_prg_byte (0x6003 , 0 ); // set MMC3 banking mode
3467
+ if (( mapper == 126 ) || (mapper == 422 ) || (mapper == 534 ) ) {
3468
+ write_prg_byte (0x6803 , 0 ); // set MMC3 banking mode
3409
3469
}
3410
3470
if ((mapper == 115 ) || (mapper == 134 ) || (mapper == 248 )) {
3411
3471
write_prg_byte (0x6000 , 0 ); // set MMC3 banking mode
@@ -3451,7 +3511,7 @@ void readCHR(bool readrom) {
3451
3511
write_prg_byte (0x4100 , 0x01 | ((i & 0x100 ) >> 6 )); // A18
3452
3512
}
3453
3513
if (mapper == 126 ) {
3454
- write_prg_byte (0x6000 , (i & 0x200 ) >> 5 | (i & 0x100 ) >> 3 ); // select outer bank
3514
+ write_prg_byte (0x6800 , (i & 0x200 ) >> 5 | (i & 0x100 ) >> 3 ); // select outer bank
3455
3515
}
3456
3516
if (mapper == 134 ) {
3457
3517
write_prg_byte (0x6000 , (i & 0x200 ) >> 4 ); // A19
@@ -3460,7 +3520,7 @@ void readCHR(bool readrom) {
3460
3520
if (mapper == 176 ) {
3461
3521
write_prg_byte (0x5FF2 , (i & 0x700 ) >> 3 ); // outer 256k bank
3462
3522
}
3463
- if (mapper == 268 ) {
3523
+ if (( mapper == 224 ) || (mapper == 268 ) || (mapper == 995 ) || (mapper == 996 ) || (mapper == 997 ) ) {
3464
3524
write_prg_byte (0x5000 , ((i & 0x380 ) >> 4 ) | ((i & 0xC00 ) >> 9 ));
3465
3525
write_prg_byte (0x6000 , ((i & 0x380 ) >> 4 ) | ((i & 0xC00 ) >> 9 ));
3466
3526
}
@@ -3473,6 +3533,13 @@ void readCHR(bool readrom) {
3473
3533
if (mapper == 366 ) {
3474
3534
write_prg_byte (0x6800 + ((i & 0x380 ) >> 3 ), i);
3475
3535
}
3536
+ if ((mapper == 422 ) || (mapper == 534 )) {
3537
+ write_prg_byte (0x6800 , (i & 0x380 ) >> 4 );
3538
+ }
3539
+ if ((mapper == 998 ) || (mapper == 999 )) {
3540
+ write_prg_byte (0x5000 , (i & 0x80 ) >> 4 );
3541
+ write_prg_byte (0x6000 , (i & 0x80 ) >> 4 );
3542
+ }
3476
3543
write_prg_byte (0x8000 , 0x02 );
3477
3544
write_prg_byte (0x8001 , i);
3478
3545
dumpBankCHR (0x1000 , 0x1400 );
@@ -3650,7 +3717,7 @@ void readCHR(bool readrom) {
3650
3717
3651
3718
case 34 : // NINA
3652
3719
banks = int_pow (2 , chrsize);
3653
- for (size_t i = 0 ; i < banks; i += 1 ) {
3720
+ for (size_t i = 0 ; i < banks; i++ ) {
3654
3721
write_prg_byte (0x7FFE , i); // Select 4 KB CHR bank at $0000
3655
3722
delay (200 ); // NINA seems slow to switch banks
3656
3723
dumpBankCHR (0x0 , 0x1000 );
@@ -3960,7 +4027,7 @@ void readCHR(bool readrom) {
3960
4027
3961
4028
case 91 :
3962
4029
banks = int_pow (2 , chrsize) * 2 ;
3963
- for (size_t i = 0 ; i < banks; i += 1 ) {
4030
+ for (size_t i = 0 ; i < banks; i++ ) {
3964
4031
write_prg_byte (0x8000 + ((i & 0x100 ) >> 8 ), i); // CHR A19 (submapper 0 only)
3965
4032
write_prg_byte (0x6000 , i); // CHR A18-A11
3966
4033
dumpBankCHR (0x0 , 0x800 );
@@ -4210,18 +4277,6 @@ void readCHR(bool readrom) {
4210
4277
}
4211
4278
break ;
4212
4279
4213
- case 268 : // mapper 268.0 and 268.1
4214
- banks = int_pow (2 , chrsize) * 4 ;
4215
- write_prg_byte (0xA001 , 0x80 );
4216
- for (size_t i = 0 ; i < banks; i++) {
4217
- write_prg_byte (0x6000 , ((i & 0x380 ) >> 4 ) | ((i & 0xC00 ) >> 9 ));
4218
- write_prg_byte (0x5000 , ((i & 0x380 ) >> 4 ) | ((i & 0xC00 ) >> 9 ));
4219
- write_prg_byte (0x8000 , 0x02 );
4220
- write_prg_byte (0x8001 , i);
4221
- dumpBankCHR (0x1000 , 0x1400 );
4222
- }
4223
- break ;
4224
-
4225
4280
case 286 :
4226
4281
banks = int_pow (2 , chrsize) * 2 ;
4227
4282
for (int i = 0 ; i < banks; i++) {
0 commit comments