diff --git a/src/boards/mmc3.c b/src/boards/mmc3.c index 90a34b4..083aa4e 100644 --- a/src/boards/mmc3.c +++ b/src/boards/mmc3.c @@ -599,6 +599,12 @@ void Mapper47_Init(CartInfo *info) { } /* ---------------------------- Mapper 49 ------------------------------- */ +/* -------------------- BMC-STREETFIGTER-GAME4IN1 ----------------------- */ +/* added 6-24-19: + * BMC-STREETFIGTER-GAME4IN1 - Sic. $6000 set to $41 rather than $00 on power-up. + */ + +static uint8 isUNIF = 0; static void M49PW(uint32 A, uint8 V) { if (EXPREGS[0] & 1) { @@ -625,11 +631,12 @@ static DECLFW(M49Write) { } static void M49Reset(void) { - EXPREGS[0] = 0; + EXPREGS[0] = isUNIF ? 0x41 : 0; MMC3RegReset(); } static void M49Power(void) { + EXPREGS[0] = isUNIF ? 0x41 : 0; M49Reset(); GenMMC3Power(); SetWriteHandler(0x6000, 0x7FFF, M49Write); @@ -637,6 +644,7 @@ static void M49Power(void) { } void Mapper49_Init(CartInfo *info) { + isUNIF = 0; GenMMC3_Init(info, 512, 256, 0, 0); cwrap = M49CW; pwrap = M49PW; @@ -645,6 +653,16 @@ void Mapper49_Init(CartInfo *info) { AddExState(EXPREGS, 1, 0, "EXPR"); } +void BMCSFGAME4IN1_Init(CartInfo *info) { + isUNIF = 1; + GenMMC3_Init(info, 512, 512, 0, 0); + cwrap = M49CW; + pwrap = M49PW; + info->Reset = M49Reset; + info->Power = M49Power; + AddExState(EXPREGS, 1, 0, "EXPR"); +} + /* ---------------------------- Mapper 52 ------------------------------- */ static void M52PW(uint32 A, uint8 V) { uint32 mask = 0x1F ^ ((EXPREGS[0] & 8) << 1); diff --git a/src/unif.c b/src/unif.c index 9e8cc07..3e482e7 100644 --- a/src/unif.c +++ b/src/unif.c @@ -495,6 +495,7 @@ static BMAPPING bmap[] = { { "JC-016-2", Mapper205_Init, 0 }, { "AX-40G", UNLAX40G_Init, 0 }, + { " BMC-STREETFIGTER-GAME4IN1", BMCSFGAME4IN1_Init, 0 }, #ifdef COPYFAMI { "COPYFAMI_MMC3", MapperCopyFamiMMC3_Init, 0 }, diff --git a/src/unif.h b/src/unif.h index 2c9f269..9bcf745 100644 --- a/src/unif.h +++ b/src/unif.h @@ -181,6 +181,7 @@ void UNLKS7021A_Init(CartInfo *info); /* m525 */ void BTL900218_Init(CartInfo *info); /* m524 */ void UNLAX40G_Init(CartInfo *info); /* m527 */ void BMCK3088_Init(CartInfo *info); /* m287 */ +void BMCSFGAME4IN1_Init(CartInfo *info); /* m049 */ #ifdef COPYFAMI void MapperCopyFamiMMC3_Init(CartInfo *info);