diff --git a/src/boards/addrlatch.c b/src/boards/addrlatch.c index 8118768..a1d1dfd 100644 --- a/src/boards/addrlatch.c +++ b/src/boards/addrlatch.c @@ -472,6 +472,25 @@ void Mapper242_Init(CartInfo *info) { Latch_Init(info, M242Sync, NULL, 0x0000, 0x8000, 0xFFFF, 1); } +/*------------------ Map 541 ---------------------------*/ +/* LittleCom 160-in-1 multicart */ +static void M541Sync(void) { + if (latche & 2) { + /* NROM-128 */ + setprg16(0x8000, latche >> 2); + setprg16(0xC000, latche >> 2); + } else { + /* NROM=256 */ + setprg32(0x8000, latche >> 3); + } + setchr8(0); + setmirror(latche & 1); +} + +void Mapper541_Init(CartInfo *info) { + Latch_Init(info, M541Sync, NULL, 0x0000, 0xC000, 0xFFFF, 0); +} + /*------------------ 190in1 ---------------------------*/ static void BMC190in1Sync(void) { diff --git a/src/ines.c b/src/ines.c index 535f381..ecfc06e 100644 --- a/src/ines.c +++ b/src/ines.c @@ -659,9 +659,10 @@ static BMAPPINGLocal bmap[] = { {(uint8_t*)"OK-411", 361, GN45_Init}, /* OK-411 is emulated together with GN-45 */ {(uint8_t*)"HUMMER/JY-052", 281, Mapper281_Init}, {(uint8_t*)"GN-45", 366, GN45_Init}, - + {(uint8_t*)"Bit Corp 4-in-1", 357, Mapper357_Init }, {(uint8_t*)"MMC3 PIRATE SFC-12", 372, Mapper372_Init }, + {(uint8_t*)"LittleCom 160-in-1", 541, Mapper541_Init }, /* UNIF to NES 2.0 BOARDS */ diff --git a/src/ines.h b/src/ines.h index 6ddb767..b7e5edd 100644 --- a/src/ines.h +++ b/src/ines.h @@ -244,6 +244,7 @@ void NC7000M_Init(CartInfo *); void J2282_Init(CartInfo *); void Mapper357_Init(CartInfo *); -void Mapper372_Init(CartInfo *info); +void Mapper372_Init(CartInfo *); +void Mapper541_Init(CartInfo *); #endif