Update Ganbare Goemon Gaiden 2 to use Mapper21 based on sources
This commit is contained in:
@@ -131,9 +131,7 @@ static DECLFW(VRC24Write) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(M21Write) {
|
static DECLFW(M21Write) {
|
||||||
A = (A & 0xF000) | ((A >> 1) & 0x3); /* Ganbare Goemon Gaiden 2 - Tenka no Zaihou (J) [!] isn't mapper 21 actually,
|
A = (A & 0xF000) | ((A >> 1) & 0x3) | ((A >> 6) & 0x3); /* Ganbare Goemon Gaiden 2 - Tenka no Zaihou (J) [!] is Mapper 21*/
|
||||||
* it's mapper 23 by wirings
|
|
||||||
*/
|
|
||||||
VRC24Write(A, V);
|
VRC24Write(A, V);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,14 +152,18 @@ static DECLFW(M22Write) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(M23Write) {
|
static DECLFW(M23Write) {
|
||||||
A |= ((A >> 2) & 0x3) | ((A >> 4) & 0x3) | ((A >> 6) & 0x3);/* actually there is many-in-one mapper source, some pirate or
|
A |= ((A >> 2) & 0x3) | ((A >> 4) & 0x3); /* actually there is many-in-one mapper source, some pirate or
|
||||||
* licensed games use various address bits for registers
|
* licensed games use various address bits for registers
|
||||||
*/
|
*/
|
||||||
VRC24Write(A, V);
|
VRC24Write(A, V);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M21Power(void) {
|
static void M21Power(void) {
|
||||||
Sync();
|
Sync();
|
||||||
|
setprg8r(0x10, 0x6000, 0);
|
||||||
|
SetReadHandler(0x6000, 0x7FFF, CartBR);
|
||||||
|
SetWriteHandler(0x6000, 0x7FFF, CartBW);
|
||||||
|
FCEU_CheatAddRAM(WRAMSIZE >> 10, 0x6000, WRAM);
|
||||||
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
||||||
SetWriteHandler(0x8000, 0xFFFF, M21Write);
|
SetWriteHandler(0x8000, 0xFFFF, M21Write);
|
||||||
}
|
}
|
||||||
@@ -223,16 +225,6 @@ static void VRC24Close(void) {
|
|||||||
WRAM = NULL;
|
WRAM = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mapper21_Init(CartInfo *info) {
|
|
||||||
isPirate = 0;
|
|
||||||
is22 = 0;
|
|
||||||
info->Power = M21Power;
|
|
||||||
MapIRQHook = VRC24IRQHook;
|
|
||||||
GameStateRestore = StateRestore;
|
|
||||||
|
|
||||||
AddExState(&StateRegs, ~0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Mapper22_Init(CartInfo *info) {
|
void Mapper22_Init(CartInfo *info) {
|
||||||
isPirate = 0;
|
isPirate = 0;
|
||||||
is22 = 1;
|
is22 = 1;
|
||||||
@@ -260,6 +252,13 @@ void VRC24_Init(CartInfo *info) {
|
|||||||
AddExState(&StateRegs, ~0, 0, 0);
|
AddExState(&StateRegs, ~0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Mapper21_Init(CartInfo *info) {
|
||||||
|
isPirate = 0;
|
||||||
|
is22 = 0;
|
||||||
|
info->Power = M21Power;
|
||||||
|
VRC24_Init(info);
|
||||||
|
}
|
||||||
|
|
||||||
void Mapper23_Init(CartInfo *info) {
|
void Mapper23_Init(CartInfo *info) {
|
||||||
isPirate = 0;
|
isPirate = 0;
|
||||||
is22 = 0;
|
is22 = 0;
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
{0x6e68e31a, 16, 8}, /* Dragon Ball 3*/
|
{0x6e68e31a, 16, 8}, /* Dragon Ball 3*/
|
||||||
{0x33b899c9, 16, -1}, /* Dragon Ball - Dai Maou Fukkatsu (J) [!] */
|
{0x33b899c9, 16, -1}, /* Dragon Ball - Dai Maou Fukkatsu (J) [!] */
|
||||||
{0xa262a81f, 16, -1}, /* Rokudenashi Blues (J) */
|
{0xa262a81f, 16, -1}, /* Rokudenashi Blues (J) */
|
||||||
{0x286fcd20, 23, -1}, /* Ganbare Goemon Gaiden 2 - Tenka no Zaihou (J) [!] */
|
{0x286fcd20, 21, -1}, /* Ganbare Goemon Gaiden 2 - Tenka no Zaihou (J) [!] */
|
||||||
{0xe4a291ce, 23, -1}, /* World Hero (Unl) [!] */
|
{0xe4a291ce, 23, -1}, /* World Hero (Unl) [!] */
|
||||||
{0x51e9cd33, 23, -1}, /* World Hero (Unl) [b1] */
|
{0x51e9cd33, 23, -1}, /* World Hero (Unl) [b1] */
|
||||||
{0x105dd586, 27, -1}, /* Mi Hun Che variations... */
|
{0x105dd586, 27, -1}, /* Mi Hun Che variations... */
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
{0x276237b3, 206, 0}, /* Karnov */
|
{0x276237b3, 206, 0}, /* Karnov */
|
||||||
{0xa5e6baf9, 206, 1}, /* Dragon Slayer 4 - Drasle Family (Japan) */
|
{0xa5e6baf9, 206, 1}, /* Dragon Slayer 4 - Drasle Family (Japan) */
|
||||||
{0x4f2f1846, 206, 1}, /* Famista '89 - Kaimaku Han!! (J) */
|
{0x4f2f1846, 206, 1}, /* Famista '89 - Kaimaku Han!! (J) */
|
||||||
{0x22d6d5bd, 206, 1}, /* Jikuu Yuuden - Debias (J) */
|
{0x22d6d5bd, 206, 1}, /* Jikuu Yuuden - Debias (J) */
|
||||||
{0x9d21fe96, 206, 1}, /* Lupin Sansei - Pandora no Isan (Japan) */
|
{0x9d21fe96, 206, 1}, /* Lupin Sansei - Pandora no Isan (Japan) */
|
||||||
{0x96dfc776, 206, 1}, /* R.B.I. Baseball 2 (USA) (Unl) */
|
{0x96dfc776, 206, 1}, /* R.B.I. Baseball 2 (USA) (Unl) */
|
||||||
{0xfd63e7ac, 206, 1}, /* R.B.I. Baseball 3 (USA) (Unl) */
|
{0xfd63e7ac, 206, 1}, /* R.B.I. Baseball 3 (USA) (Unl) */
|
||||||
|
|||||||
Reference in New Issue
Block a user