Move overrides out of some mappers

Move mapper-based overrides out and use ines-correct.h if possible. Affects the following mappers below:
- Move Cnrom database to ines-correct.h
- Mapper 201 update
- Mapper 91: Add Street Fighter III (Submapper 1) to ines-correct.h
- Add dipswitch notes to m237
- Update mapper9 (PC10 version of Mike Tyson's Punch-out)
This commit is contained in:
negativeExponent
2020-04-08 00:21:29 +08:00
parent 5df33af7dd
commit 53a43479f3
7 changed files with 35 additions and 31 deletions

View File

@@ -81,6 +81,12 @@ static void StateRestore(int version) {
}
void Mapper237_Init(CartInfo *info) {
/* The menu system used by this cart seems to be configurable as 4 different types:
* 0: 42-in-1
* 1: 5,000-in-1
* 2: 420-in-1
* 3: 10,000,000-in-1 (lol)
*/
dipswitch = 0;
if ((info->CRC32) == 0x272709b9) /* Teletubbies Y2K (420-in-1) */
dipswitch = 2;

View File

@@ -109,11 +109,8 @@ static void StateRestore(int version) {
void Mapper91_Init(CartInfo *info) {
submapper = 0;
if (info->CRC32 == 0x082778e6) /* Super Fighter III */
submapper = 1;
else if (info->iNES2)
submapper = info->submapper;
/* Super Fighter III */
if (info->submapper == 1) submapper = info->submapper;
info->Power = M91Power;
GameHBIRQHook = M91IRQHook;
GameStateRestore = StateRestore;

View File

@@ -291,8 +291,8 @@ static void M201Sync(void) {
}
void Mapper201_Init(CartInfo *info) {
if (info->CRC32 == 0x05658DED)
submapper = 15;
submapper = 0;
if (info->submapper > 0) submapper = info->submapper;
Latch_Init(info, M201Sync, NULL, 0xFFFF, 0x8000, 0xFFFF, 0);
}

View File

@@ -154,21 +154,10 @@ static void CNROMSync(void) {
}
void CNROM_Init(CartInfo *info) {
uint8 CNROM_busc = 1; /* by default, CNROM is set to emulate bus conflicts to all games */
/* TODO: move these to extended database when implemented. */
switch (info->CRC32) {
case 0xf283cf58: /* Colorful Dragon (Asia) (PAL) (Unl).nes */
case 0x2915faf0: /* Incantation (Asia) (Unl).nes */
case 0xebd0644d: /* Dao Shuai (Asia) (Unl).nes */
case 0x8f154a0d: /* Pu Ke Jing Ling (China) (Unl).nes */
case 0xd04a40e6: /* Bingo 75 (Asia) (Unl).nes */
case 0xe41b440f: /* Sidewinder (Joy Van) */
case 0xb0c871c5: /* Wei Lai Xiao Zi (Joy Van) */
case 0xb3be2f71: /* Yanshan Chess (Unl) */
uint8 CNROM_busc = 1; /* by default, CNROM is set to emulate bus conflicts to all games. */
if (info->submapper && info->submapper == 1) /* no bus conflict */
CNROM_busc = 0;
break;
}
FCEU_printf(" Bus Conflict: %s\n", CNROM_busc ? "Yes" : "No");
Latch_Init(info, CNROMSync, 0, 0x8000, 0xFFFF, 1, CNROM_busc);
}

View File

@@ -118,7 +118,7 @@ void Mapper9_Init(CartInfo *info) {
info->Power = MMC2and4Power;
info->Close = MMC2and4Close;
PPU_hook = MMC2and4PPUHook;
if (info->CRC32 == 0x7b837fde) { /* Mike Tyson's Punch-Out!! (PC10) supports save ram */
if (info->battery) { /* Mike Tyson's Punch-Out!! (PC10) supports save ram */
isPC10 = 1;
WRAMSIZE = 8192;
WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);