Add mapper 374

This commit is contained in:
negativeExponent
2020-01-29 01:09:31 +08:00
parent 38305957f7
commit fd823c4021
3 changed files with 28 additions and 0 deletions

View File

@@ -443,3 +443,29 @@ void FARIDSLROM8IN1_Init(CartInfo *info) {
AddExState(&lock, 1, 0, "LOCK");
AddExState(&reg, 1, 0, "REG6");
}
/* ---------------------------- Mapper 374 -------------------------------- */
/* 1995 Super HiK 4-in-1 - 新系列機器戰警组合卡 (JY-022)
* 1996 Super HiK 4-in-1 - 新系列超級飛狼組合卡 (JY-051)
*/
static uint8 game = 0;
static void M374PRG(uint32 A, uint8 V) {
setprg16(A, (V & 0x07) | (game << 3));
}
static void M374CHR(uint32 A, uint8 V) {
setchr4(A, (V & 0x1F) | (game << 5));
}
static void M374Reset(void) {
game = (game + 1) & 3;
MMC1CMReset();
}
void Mapper374_Init(CartInfo *info) {
GenMMC1Init(info, 128, 128, 0, 0);
MMC1CHRHook4 = M374CHR;
MMC1PRGHook16 = M374PRG;
info->Reset = M374Reset;
AddExState(&game, 1, 0, "GAME");
}