Mapper134: Update and add support for UNL-T4A54A unif board
This commit is contained in:
@@ -905,13 +905,19 @@ void Mapper119_Init(CartInfo *info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------- Mapper 134 ------------------------------ */
|
/* ---------------------------- Mapper 134 ------------------------------ */
|
||||||
|
/* ---------------------------- UNL-T4A54A ------------------------------ */
|
||||||
|
|
||||||
|
/* UNL-T4A54A, functionally the same as mapper 134.
|
||||||
|
* Writes @ $6801. Menu @ prg $20000, chr $00000 */
|
||||||
|
|
||||||
static void M134PW(uint32 A, uint8 V) {
|
static void M134PW(uint32 A, uint8 V) {
|
||||||
setprg8(A, (V & 0x1F) | ((EXPREGS[0] & 2) << 4));
|
uint8 mask = (EXPREGS[0] & 0x04) ? 0x0F : 0x1F;
|
||||||
|
setprg8r(PRGptr[1] ? (EXPREGS[0] & 3) : 0, A, (V & mask) | ((EXPREGS[0] & 3) << 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M134CW(uint32 A, uint8 V) {
|
static void M134CW(uint32 A, uint8 V) {
|
||||||
setchr1(A, (V & 0xFF) | ((EXPREGS[0] & 0x20) << 3));
|
uint8 mask = (EXPREGS[0] & 0x04) ? 0x7F : 0xFF;
|
||||||
|
setchr1r(PRGptr[1] ? (EXPREGS[0] & 0x30) >> 4 : 0, A, (V & mask) | ((EXPREGS[0] & 0x30) << 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(M134Write) {
|
static DECLFW(M134Write) {
|
||||||
@@ -921,13 +927,14 @@ static DECLFW(M134Write) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void M134Power(void) {
|
static void M134Power(void) {
|
||||||
EXPREGS[0] = 0;
|
EXPREGS[0] = 0x01;
|
||||||
GenMMC3Power();
|
GenMMC3Power();
|
||||||
SetWriteHandler(0x6001, 0x6001, M134Write);
|
SetWriteHandler(0x6001, 0x6001, M134Write);
|
||||||
|
SetWriteHandler(0x6801, 0x6801, M134Write);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M134Reset(void) {
|
static void M134Reset(void) {
|
||||||
EXPREGS[0] = 0;
|
EXPREGS[0] = 0x01;
|
||||||
MMC3RegReset();
|
MMC3RegReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -504,6 +504,7 @@ static BMAPPING bmap[] = {
|
|||||||
{ "K-3033", BMCK3033_Init, 0 },
|
{ "K-3033", BMCK3033_Init, 0 },
|
||||||
{ "830134C", BMC830134C_Init, 0 },
|
{ "830134C", BMC830134C_Init, 0 },
|
||||||
{ "GN-26", BMCGN26_Init, 0 },
|
{ "GN-26", BMCGN26_Init, 0 },
|
||||||
|
{ "T4A54A", Mapper134_Init, 0 },
|
||||||
|
|
||||||
#ifdef COPYFAMI
|
#ifdef COPYFAMI
|
||||||
{ "COPYFAMI_MMC3", MapperCopyFamiMMC3_Init, 0 },
|
{ "COPYFAMI_MMC3", MapperCopyFamiMMC3_Init, 0 },
|
||||||
|
|||||||
Reference in New Issue
Block a user