The wiki appears to be incomplete. I cannot get Dragon Quest VII to correctly swap between the 2 PRG banks.
Nintendulator does not currently support Mapper 245. But, FCEUX does. It uses the code below:
I can't understand what it is doing with EXPREGS. Can someone lend some assistance please?
Nintendulator does not currently support Mapper 245. But, FCEUX does. It uses the code below:
Code:
// ---------------------------- Mapper 245 ------------------------------
static void M245CW(uint32 A, uint8 V) {
if (!UNIFchrrama) // Yong Zhe Dou E Long - Dragon Quest VI (As).nes NEEDS THIS for RAM cart
setchr1(A, V & 7);
EXPREGS[0] = V;
FixMMC3PRG(MMC3_cmd);
}
static void M245PW(uint32 A, uint8 V) {
setprg8(A, (V & 0x3F) | ((EXPREGS[0] & 2) << 5));
}
static void M245Power(void) {
EXPREGS[0] = 0;
GenMMC3Power();
}
void Mapper245_Init(CartInfo *info) {
GenMMC3_Init(info, 512, 256, 8, info->battery);
cwrap = M245CW;
pwrap = M245PW;
info->Power = M245Power;
AddExState(EXPREGS, 1, 0, "EXPR");
}
static void M245CW(uint32 A, uint8 V) {
if (!UNIFchrrama) // Yong Zhe Dou E Long - Dragon Quest VI (As).nes NEEDS THIS for RAM cart
setchr1(A, V & 7);
EXPREGS[0] = V;
FixMMC3PRG(MMC3_cmd);
}
static void M245PW(uint32 A, uint8 V) {
setprg8(A, (V & 0x3F) | ((EXPREGS[0] & 2) << 5));
}
static void M245Power(void) {
EXPREGS[0] = 0;
GenMMC3Power();
}
void Mapper245_Init(CartInfo *info) {
GenMMC3_Init(info, 512, 256, 8, info->battery);
cwrap = M245CW;
pwrap = M245PW;
info->Power = M245Power;
AddExState(EXPREGS, 1, 0, "EXPR");
}
I can't understand what it is doing with EXPREGS. Can someone lend some assistance please?