straighten out bandai m159/m016 handling and add valid null-EEPROM emulation to get those games booting.
This commit is contained in:
parent
fd696c43e8
commit
170bcefdd2
|
@ -2,6 +2,7 @@
|
|||
*
|
||||
* Copyright notice for this file:
|
||||
* Copyright (C) 2007 CaH4e3
|
||||
* Copyright (C) 2011 FCEUX team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -21,6 +22,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
//Famicom Jump 2 should get transformed to m153
|
||||
//All other games are not supporting EEPROM saving right now.
|
||||
//We may need to distinguish between 16 and 159 in order to know the EEPROM configuration.
|
||||
//Until then, we just return 0x00 from the EEPROM read
|
||||
|
||||
#include "mapinc.h"
|
||||
|
||||
static uint8 reg[16], is153;
|
||||
|
@ -58,13 +64,7 @@ static void BandaiSync(void)
|
|||
if(is153)
|
||||
{
|
||||
int base=(reg[0]&1)<<4;
|
||||
if(!UNIFchrrama) // SD Gundam Gaiden - Knight Gundam Monogatari 2 - Hikari no Kishi (J) uses WRAM but have CHRROM too
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<8; i++) setchr1(i<<10,reg[i]);
|
||||
}
|
||||
else
|
||||
setchr8(0);
|
||||
setchr8(0);
|
||||
setprg16(0x8000,(reg[8]&0x0F)|base);
|
||||
setprg16(0xC000,0x0F|base);
|
||||
}
|
||||
|
@ -102,11 +102,17 @@ static DECLFW(BandaiWrite)
|
|||
}
|
||||
}
|
||||
|
||||
DECLFR(BandaiRead)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void BandaiPower(void)
|
||||
{
|
||||
BandaiSync();
|
||||
SetReadHandler(0x8000,0xFFFF,CartBR);
|
||||
SetWriteHandler(0x6000,0xFFFF,BandaiWrite);
|
||||
SetReadHandler(0x6000,0x7FFF,BandaiRead);
|
||||
}
|
||||
|
||||
static void M153Power(void)
|
||||
|
@ -141,6 +147,12 @@ void Mapper16_Init(CartInfo *info)
|
|||
AddExState(&StateRegs, ~0, 0, 0);
|
||||
}
|
||||
|
||||
void Mapper159_Init(CartInfo *info)
|
||||
{
|
||||
Mapper16_Init(info);
|
||||
}
|
||||
|
||||
|
||||
void Mapper153_Init(CartInfo *info)
|
||||
{
|
||||
is153=1;
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
{0xbfc7a2e9,16,8},
|
||||
{0x33b899c9,16,-1}, /* Dragon Ball - Dai Maou Fukkatsu (J) [!] */
|
||||
{0x3f15d20d,153,8}, /* Famicom Jump 2 */
|
||||
// {0xb049a8c4,153,-1}, /* SD Gundam Gaiden - Knight Gundam Monogatari 2 - Hikari no Kishi (J) [!] */
|
||||
// NOT 16, since uses WRAM but 8000-FFFF address range for bankswitching,
|
||||
|
||||
{0x983d8175,157,8}, /* Datach Battle Rush */
|
||||
{0x894efdbc,157,8}, /* Datach Crayon Shin Chan */
|
||||
|
|
|
@ -566,6 +566,7 @@ static BMAPPINGLocal bmap[] = {
|
|||
{"", 153, Mapper153_Init},
|
||||
{"", 154, Mapper154_Init},
|
||||
{"", 155, Mapper155_Init},
|
||||
{"", 159, Mapper159_Init},
|
||||
{"SA009", 160, SA009_Init},
|
||||
{"", 163, Mapper163_Init},
|
||||
{"", 164, Mapper164_Init},
|
||||
|
|
|
@ -406,6 +406,7 @@ void Mapper152_Init(CartInfo *);
|
|||
void Mapper153_Init(CartInfo *);
|
||||
void Mapper154_Init(CartInfo *);
|
||||
void Mapper155_Init(CartInfo *);
|
||||
void Mapper159_Init(CartInfo *);
|
||||
void Mapper163_Init(CartInfo *);
|
||||
void Mapper164_Init(CartInfo *);
|
||||
void Mapper165_Init(CartInfo *);
|
||||
|
|
Loading…
Reference in New Issue