bus/nes: Added emulation for Super Mario Family multicart. (#8677)
- Replaced underdumped PRG. [MLX, NewRisingSun] Software list items promoted to working (nes.xml) --------------------------------------- Super Mario Family 10 in 1
This commit is contained in:
parent
bbacd0e761
commit
3961612bf3
21
hash/nes.xml
21
hash/nes.xml
@ -82360,18 +82360,21 @@ be better to redump them properly. -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_marif" supported="no">
|
||||
<description>Mario Family 10 in 1</description>
|
||||
<year>19??</year>
|
||||
<software name="mc_marif" supported="partial">
|
||||
<description>Super Mario Family 10 in 1</description>
|
||||
<year>1992?</year>
|
||||
<publisher><pirate></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="txrom" />
|
||||
<feature name="pcb" value="NES-TLROM" />
|
||||
<dataarea name="chr" size="524288">
|
||||
<rom name="mario family 10-in-1 [p1].chr" size="524288" crc="b9724865" sha1="9b2416a5d2d6e92c8ea28bba40ba9b3646d40d92" offset="00000" status="baddump" />
|
||||
<feature name="slot" value="bmc_810305c" />
|
||||
<feature name="pcb_model" value="81-03-05-C" />
|
||||
<dataarea name="prg" size="1048576">
|
||||
<rom name="0001" size="1048576" crc="880fc6a9" sha1="a677e8aaa0f58be6c62ab72936ef0c2065014ff4" status="baddump" />
|
||||
</dataarea>
|
||||
<dataarea name="prg" size="524288">
|
||||
<rom name="mario family 10-in-1 [p1].prg" size="524288" crc="bb191650" sha1="3af18925766baa141dce6ab67ce011fa94d643f7" offset="00000" status="baddump" />
|
||||
<dataarea name="chr" size="524288">
|
||||
<rom name="0002" size="524288" crc="b9724865" sha1="9b2416a5d2d6e92c8ea28bba40ba9b3646d40d92" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
<!-- 8k WRAM on cartridge -->
|
||||
<dataarea name="wram" size="8192">
|
||||
|
@ -74,6 +74,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_K3006, nes_bmc_k3006_device, "nes_bmc_k3006",
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_K3033, nes_bmc_k3033_device, "nes_bmc_k3033", "NES Cart BMC K-3033 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_00202650, nes_bmc_00202650_device, "nes_bmc_00202650", "NES Cart BMC 00202650 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_411120C, nes_bmc_411120c_device, "nes_bmc_411120c", "NES Cart BMC 411120C PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_810305C, nes_bmc_810305c_device, "nes_bmc_810305c", "NES Cart BMC 81-03-05-C PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_820720C, nes_bmc_820720c_device, "nes_bmc_820720c", "NES Cart BMC 820720C PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_830118C, nes_bmc_830118c_device, "nes_bmc_830118c", "NES Cart BMC 830118C PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_830832C, nes_bmc_830832c_device, "nes_bmc_830832c", "NES Cart BMC 830832C PCB")
|
||||
@ -367,6 +368,11 @@ nes_bmc_411120c_device::nes_bmc_411120c_device(const machine_config &mconfig, co
|
||||
{
|
||||
}
|
||||
|
||||
nes_bmc_810305c_device::nes_bmc_810305c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_txsrom_device(mconfig, NES_BMC_810305C, tag, owner, clock), m_outer(0)
|
||||
{
|
||||
}
|
||||
|
||||
nes_bmc_820720c_device::nes_bmc_820720c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_txrom_device(mconfig, NES_BMC_820720C, tag, owner, clock), m_reg(0)
|
||||
{
|
||||
@ -865,6 +871,20 @@ void nes_bmc_411120c_device::pcb_reset()
|
||||
mmc3_common_initialize(0x0f, 0x7f, 0);
|
||||
}
|
||||
|
||||
void nes_bmc_810305c_device::device_start()
|
||||
{
|
||||
mmc3_start();
|
||||
save_item(NAME(m_outer));
|
||||
}
|
||||
|
||||
void nes_bmc_810305c_device::pcb_reset()
|
||||
{
|
||||
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
|
||||
|
||||
m_outer = 0;
|
||||
mmc3_common_initialize(0x1f, 0x7f, 0);
|
||||
}
|
||||
|
||||
void nes_bmc_820720c_device::device_start()
|
||||
{
|
||||
mmc3_start();
|
||||
@ -3007,6 +3027,77 @@ void nes_bmc_411120c_device::write_m(offs_t offset, u8 data)
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
BMC-81-03-05-C
|
||||
|
||||
Games: 92' Super Mario Family
|
||||
|
||||
MMC3 clone with banking for multigame menu. Note,
|
||||
this cart has one TxSROM game (SMB4) and so it uses
|
||||
the nonstandard MMC3 mirroring of those boards.
|
||||
|
||||
NES 2.0: mapper 353
|
||||
|
||||
In MAME: Partially supported.
|
||||
|
||||
TODO: Banking isn't quite right. Golden Mario, the
|
||||
4th game, should be SMB2J but loads as plain old
|
||||
Mario Bros with garbled graphics. Golden Mario
|
||||
should be on the last outer bank #3.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
void nes_bmc_810305c_device::set_prg(int prg_base, int prg_mask)
|
||||
{
|
||||
u8 a17 = BIT(m_mmc_vrom_bank[0], 7);
|
||||
|
||||
nes_txrom_device::set_prg(prg_base | (m_outer == 2 && a17) << 4, prg_mask);
|
||||
|
||||
if (m_outer == 3 && !a17)
|
||||
{
|
||||
prg8_cd(m_mmc_prg_bank[0] | 0x70);
|
||||
prg8_ef(m_mmc_prg_bank[1] | 0x70);
|
||||
}
|
||||
}
|
||||
|
||||
void nes_bmc_810305c_device::set_chr(u8 chr, int chr_base, int chr_mask)
|
||||
{
|
||||
if (m_outer == 2 && BIT(m_mmc_vrom_bank[0], 7))
|
||||
chr8(0, CHRRAM);
|
||||
else
|
||||
nes_txrom_device::set_chr(chr, chr_base, chr_mask);
|
||||
}
|
||||
|
||||
void nes_bmc_810305c_device::chr_cb(int start, int bank, int source)
|
||||
{
|
||||
if (m_outer)
|
||||
nes_txrom_device::chr_cb(start, bank, source);
|
||||
else
|
||||
nes_txsrom_device::chr_cb(start, bank, source);
|
||||
}
|
||||
|
||||
void nes_bmc_810305c_device::write_h(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("bmc_810305c write_h, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
if (BIT(offset, 7)) // outer register
|
||||
{
|
||||
m_outer = (offset >> 13) & 0x03;
|
||||
|
||||
m_prg_base = m_outer << 5;
|
||||
m_prg_mask = 0x1f >> (m_outer == 2);
|
||||
set_prg(m_prg_base, m_prg_mask);
|
||||
|
||||
m_chr_base = m_outer << 7;
|
||||
set_chr(m_chr_source, m_chr_base, m_chr_mask);
|
||||
}
|
||||
else if (m_outer) // standard MMC3 registers
|
||||
nes_txrom_device::write_h(offset, data);
|
||||
else // TxSROM MMC3 registers without mirroring bit
|
||||
nes_txsrom_device::write_h(offset, data);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
BMC-820720C
|
||||
|
@ -884,6 +884,31 @@ private:
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_bmc_810305c_device
|
||||
|
||||
class nes_bmc_810305c_device : public nes_txsrom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_bmc_810305c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
virtual void write_h(offs_t offset, u8 data) override;
|
||||
virtual void chr_cb(int start, int bank, int source) override;
|
||||
|
||||
virtual void pcb_reset() override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
virtual void set_prg(int prg_base, int prg_mask) override;
|
||||
virtual void set_chr(u8 chr, int chr_base, int chr_mask) override;
|
||||
|
||||
private:
|
||||
u8 m_outer;
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_bmc_820720c_device
|
||||
|
||||
class nes_bmc_820720c_device : public nes_txrom_device
|
||||
@ -1069,6 +1094,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_K3006, nes_bmc_k3006_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_K3033, nes_bmc_k3033_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_00202650, nes_bmc_00202650_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_411120C, nes_bmc_411120c_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_810305C, nes_bmc_810305c_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_820720C, nes_bmc_820720c_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_830118C, nes_bmc_830118c_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_830832C, nes_bmc_830832c_device)
|
||||
|
@ -451,6 +451,7 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("bmc_gold7in1", NES_BMC_GOLD7IN1);
|
||||
device.option_add_internal("bmc_00202650", NES_BMC_00202650);
|
||||
device.option_add_internal("bmc_411120c", NES_BMC_411120C);
|
||||
device.option_add_internal("bmc_810305c", NES_BMC_810305C);
|
||||
device.option_add_internal("bmc_820720c", NES_BMC_820720C);
|
||||
device.option_add_internal("bmc_830118c", NES_BMC_830118C);
|
||||
device.option_add_internal("bmc_830832c", NES_BMC_830832C);
|
||||
|
@ -388,7 +388,7 @@ static const nes_mmc mmc_list[] =
|
||||
// { 350, BMC_891227 }, not in nes.xml
|
||||
{ 351, BMC_TECHLINE9IN1 },
|
||||
{ 352, KAISER_KS106C }, // 4-in-1
|
||||
// 353 Super Mario Family multicart
|
||||
{ 353, BMC_810305C }, // Super Mario Family multicart
|
||||
// 354 250-in-1 multicart with FDS Bubble Bobble
|
||||
// 355 Hwang Shinwei 3-D Block etc, currently has unemulated PIC16C54
|
||||
// 356 7-in-1 Rockman (JY-208)
|
||||
|
@ -324,6 +324,7 @@ static const nes_pcb pcb_list[] =
|
||||
{ "bmc_gold7in1", BMC_GOLD_7IN1 },
|
||||
{ "bmc_00202650", BMC_00202650 },
|
||||
{ "bmc_411120c", BMC_411120C },
|
||||
{ "bmc_810305c", BMC_810305C },
|
||||
{ "bmc_820720c", BMC_820720C },
|
||||
{ "bmc_830118c", BMC_830118C },
|
||||
{ "bmc_830832c", BMC_830832C },
|
||||
|
@ -102,8 +102,9 @@ enum
|
||||
BMC_EL860947C, BMC_EL861121C, BMC_FK23C, BMC_FK23CA, BMC_JY820845C,
|
||||
BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146,
|
||||
BMC_2751, BMC_8157, BMC_00202650,
|
||||
BMC_820720C, BMC_830118C, BMC_830832C, BMC_YY841101C, BMC_YY841155C,
|
||||
BMC_411120C, BMC_GOLD150, BMC_GOLD260,
|
||||
BMC_411120C, BMC_810305C, BMC_820720C, BMC_830118C,
|
||||
BMC_830832C, BMC_YY841101C, BMC_YY841155C,
|
||||
BMC_GOLD150, BMC_GOLD260,
|
||||
BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, BMC_LITTLECOM160, BMC_CTC09,
|
||||
BMC_K1029, BMC_K3006, BMC_K3033, BMC_K3036, BMC_K3046, BMC_SA005A, BMC_TJ03,
|
||||
BMC_RESETSXROM, BMC_RESETTXROM, BMC_TECHLINE9IN1,
|
||||
|
Loading…
Reference in New Issue
Block a user