Update implementation of some unlicensed mappers

This commit is contained in:
negativeExponent
2020-02-16 19:18:02 +08:00
parent cfaee1217f
commit 6e7d5abaab
9 changed files with 426 additions and 279 deletions

View File

@@ -322,73 +322,6 @@ void SA0037_Init(CartInfo *info) {
AddExState(&latch[0], 1, 0, "LATC");
}
/* ----------------------------------------------- */
static void TCU01Synco() {
setprg32(0x8000, ((latch[0] & 0x80) >> 6) | ((latch[0] >> 2) & 1));
setchr8((latch[0] >> 3) & 0xF);
}
static DECLFW(TCU01Write) {
if ((A & 0x103) == 0x102) {
latch[0] = V;
TCU01Synco();
}
}
static void TCU01Power(void) {
latch[0] = 0;
SetReadHandler(0x8000, 0xFFFF, CartBR);
SetWriteHandler(0x4100, 0xFFFF, TCU01Write);
TCU01Synco();
}
static void TCU01Restore(int version) {
TCU01Synco();
}
void TCU01_Init(CartInfo *info) {
GameStateRestore = TCU01Restore;
info->Power = TCU01Power;
AddExState(&latch[0], 1, 0, "LATC");
}
/* ----------------------------------------------- */
static void TCU02Synco() {
setprg32(0x8000, 0);
setchr8(latch[0] & 3);
}
static DECLFW(TCU02Write) {
if ((A & 0x103) == 0x102) {
latch[0] = V + 3;
TCU02Synco();
}
}
static DECLFR(TCU02Read) {
return (latch[0] & 0x3F) | (X.DB & 0xC0);
}
static void TCU02Power(void) {
latch[0] = 0;
SetReadHandler(0x8000, 0xFFFF, CartBR);
SetReadHandler(0x4100, 0x4100, TCU02Read);
SetWriteHandler(0x4100, 0xFFFF, TCU02Write);
TCU02Synco();
}
static void TCU02Restore(int version) {
TCU02Synco();
}
void TCU02_Init(CartInfo *info) {
GameStateRestore = TCU02Restore;
info->Power = TCU02Power;
AddExState(&latch[0], 1, 0, "LATC");
}
/* --------------------------------------------- */
static DECLFR(TCA01Read) {