mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
bus/nes: Added support for a 4 in 1 multicart. (#8549)
New working software list additions (nes.xml) ----------------------------------- 4 in 1 HQ [famiac]
This commit is contained in:
parent
885d6e1dd9
commit
972d324eb2
16
hash/nes.xml
16
hash/nes.xml
@ -79684,6 +79684,22 @@ be better to redump them properly. -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- SMB 1 and 2 have swapped graphics assets. This occurs on hardware. -->
|
||||
<software name="mc_4hq">
|
||||
<description>4 in 1 HQ</description>
|
||||
<year>19??</year>
|
||||
<publisher><pirate></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="n32_4in1" />
|
||||
<dataarea name="prg" size="131072">
|
||||
<rom name="4-in-1 hq.prg" size="131072" crc="f4a72781" sha1="d7c235b7c72116c304eb57e286fcb5210d2be1d7" status="baddump" />
|
||||
</dataarea>
|
||||
<dataarea name="chr" size="32768">
|
||||
<rom name="4-in-1 hq.chr" size="32768" crc="5a1b3ed8" sha1="b3ecce305bcd1494bdba6df1044cfd67759b7bf7" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_4k106">
|
||||
<description>4 in 1 (KS-106C)</description>
|
||||
<year>19??</year>
|
||||
|
@ -50,6 +50,7 @@ DEFINE_DEVICE_TYPE(NES_BTL_DNINJA, nes_btl_dn_device, "nes_btl_dn", "N
|
||||
DEFINE_DEVICE_TYPE(NES_SMB2J, nes_smb2j_device, "nes_smb2j", "NES Cart Super Mario Bros. 2 Jpn PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_SMB2JA, nes_smb2ja_device, "nes_smb2ja", "NES Cart Super Mario Bros. 2 Jpn (Alt) PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_SMB2JB, nes_smb2jb_device, "nes_smb2jb", "NES Cart Super Mario Bros. 2 Jpn (Alt 2) PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_N32_4IN1, nes_n32_4in1_device, "nes_n32_4in1", "NES Cart N-32 4 in 1 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_0353, nes_0353_device, "nes_0353", "NES Cart 0353 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_09034A, nes_09034a_device, "nes_09034a", "NES Cart 09-034A PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BATMANFS, nes_batmanfs_device, "nes_batmanfs", "NES Cart Batman Pirate PCB")
|
||||
@ -118,8 +119,18 @@ nes_smb2ja_device::nes_smb2ja_device(const machine_config &mconfig, const char *
|
||||
{
|
||||
}
|
||||
|
||||
nes_smb2jb_device::nes_smb2jb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_nrom_device(mconfig, type, tag, owner, clock), m_irq_count(0), m_irq_enable(0), m_reg(0), m_bank67(type == NES_SMB2JB ? 0x0f : 0x07), irq_timer(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
nes_smb2jb_device::nes_smb2jb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_nrom_device(mconfig, NES_SMB2JB, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
|
||||
: nes_smb2jb_device(mconfig, NES_SMB2JB, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
nes_n32_4in1_device::nes_n32_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_smb2jb_device(mconfig, NES_N32_4IN1, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
@ -427,6 +438,7 @@ void nes_smb2jb_device::device_start()
|
||||
|
||||
save_item(NAME(m_irq_enable));
|
||||
save_item(NAME(m_irq_count));
|
||||
save_item(NAME(m_reg));
|
||||
}
|
||||
|
||||
void nes_smb2jb_device::pcb_reset()
|
||||
@ -439,6 +451,16 @@ void nes_smb2jb_device::pcb_reset()
|
||||
|
||||
m_irq_enable = 0;
|
||||
m_irq_count = 0;
|
||||
m_reg = 0;
|
||||
}
|
||||
|
||||
void nes_n32_4in1_device::pcb_reset()
|
||||
{
|
||||
// Powers up in menu, but soft reset does not touch banks (so each game returns to its own title). Is this correct?
|
||||
|
||||
m_irq_enable = 0;
|
||||
m_irq_count = 0;
|
||||
m_reg = 0;
|
||||
}
|
||||
|
||||
void nes_0353_device::device_start()
|
||||
@ -1341,7 +1363,8 @@ void nes_smb2jb_device::write_45(offs_t offset, u8 data)
|
||||
switch (offset & 0x4120)
|
||||
{
|
||||
case 0x4020:
|
||||
prg8_cd(bitswap<4>(data, 3, 0, 2, 1));
|
||||
m_reg = bitswap<4>(data, 3, 0, 2, 1);
|
||||
prg8_cd(m_reg);
|
||||
break;
|
||||
case 0x4120:
|
||||
m_irq_enable = BIT(data, 0);
|
||||
@ -1369,7 +1392,57 @@ void nes_smb2jb_device::write_l(offs_t offset, u8 data)
|
||||
u8 nes_smb2jb_device::read_m(offs_t offset)
|
||||
{
|
||||
LOG_MMC(("smb2jb read_m, offset: %04x\n", offset));
|
||||
return m_prg[0x0f * 0x2000 + offset];
|
||||
return m_prg[m_bank67 * 0x2000 + offset];
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
BMC-N32-4IN1
|
||||
|
||||
Unknown Bootleg Multigame Board
|
||||
Games: 4 in 1
|
||||
|
||||
This multicart contains the mapper 50 version of SMB2.
|
||||
There are changes to bank locations compared to that
|
||||
game, but otherwise we rely on the existing SMB2JB
|
||||
emulation (unless other differences are discovered?)
|
||||
|
||||
NES 2.0: mapper 416
|
||||
|
||||
In MAME: Supported.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
void nes_n32_4in1_device::write_h(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("n32_4in1 write_h, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
if (offset < 0x2000)
|
||||
{
|
||||
if (BIT(data, 3)) // NROM games
|
||||
{
|
||||
u8 bank = bitswap<3>(data, 3, 7, 5);
|
||||
u8 mode = BIT(data, 7);
|
||||
if (data & 0xc0)
|
||||
{
|
||||
prg16_89ab(bank & ~mode);
|
||||
prg16_cdef(bank | mode);
|
||||
}
|
||||
else
|
||||
for (int i = 0; i < 4; i++)
|
||||
prg8_x(i, bank << 1);
|
||||
}
|
||||
else // SMB2 only
|
||||
{
|
||||
prg8_89(0);
|
||||
prg8_ab(1);
|
||||
prg8_cd(m_reg);
|
||||
prg8_ef(3);
|
||||
}
|
||||
|
||||
chr8((data >> 1) & 0x03, CHRROM);
|
||||
set_nt_mirroring(BIT(data, 2) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
@ -236,20 +236,39 @@ public:
|
||||
virtual void pcb_reset() override;
|
||||
|
||||
protected:
|
||||
nes_smb2jb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
private:
|
||||
void write_45(offs_t offset, u8 data);
|
||||
u16 m_irq_count;
|
||||
int m_irq_enable;
|
||||
u8 m_reg;
|
||||
|
||||
private:
|
||||
void write_45(offs_t offset, u8 data);
|
||||
u8 m_bank67;
|
||||
|
||||
static const device_timer_id TIMER_IRQ = 0;
|
||||
emu_timer *irq_timer;
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_n32_4in1_device
|
||||
|
||||
class nes_n32_4in1_device : public nes_smb2jb_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_n32_4in1_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 pcb_reset() override;
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_0353_device
|
||||
|
||||
class nes_0353_device : public nes_nrom_device
|
||||
@ -729,6 +748,7 @@ DECLARE_DEVICE_TYPE(NES_BTL_DNINJA, nes_btl_dn_device)
|
||||
DECLARE_DEVICE_TYPE(NES_SMB2J, nes_smb2j_device)
|
||||
DECLARE_DEVICE_TYPE(NES_SMB2JA, nes_smb2ja_device)
|
||||
DECLARE_DEVICE_TYPE(NES_SMB2JB, nes_smb2jb_device)
|
||||
DECLARE_DEVICE_TYPE(NES_N32_4IN1, nes_n32_4in1_device)
|
||||
DECLARE_DEVICE_TYPE(NES_0353, nes_0353_device)
|
||||
DECLARE_DEVICE_TYPE(NES_09034A, nes_09034a_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BATMANFS, nes_batmanfs_device)
|
||||
|
@ -372,6 +372,7 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("bmc_810544c", NES_BMC_810544C);
|
||||
device.option_add_internal("bmc_830425c", NES_BMC_830425C);
|
||||
device.option_add_internal("bmc_850437c", NES_BMC_850437C);
|
||||
device.option_add_internal("n32_4in1", NES_N32_4IN1);
|
||||
device.option_add_internal("ntd03", NES_NTD03);
|
||||
device.option_add_internal("bmc_ctc09", NES_BMC_CTC09);
|
||||
device.option_add_internal("bmc_gb63", NES_BMC_GB63);
|
||||
|
@ -451,7 +451,7 @@ static const nes_mmc mmc_list[] =
|
||||
// 413 homebrew game Super Russian Roulette
|
||||
// 414 9999999-in-1 multicart
|
||||
{ 415, BTL_0353 }, // Lucky (Roger) Rabbit FDS conversion
|
||||
// 416 4-in-1 that includes mapper 50 SMB2j pirate
|
||||
{ 416, BMC_N32_4IN1 },
|
||||
{ 417, BTL_BATMANFS }, // "Fine Studio" Batman bootleg
|
||||
{ 418, UNL_LH42 }, // Highway Star Whirlwind Manu bootleg
|
||||
// 419 VT03 PnPs
|
||||
|
@ -258,6 +258,7 @@ static const nes_pcb pcb_list[] =
|
||||
{ "bmc_810544c", BMC_810544C },
|
||||
{ "bmc_830425c", BMC_830425C },
|
||||
{ "bmc_850437c", BMC_850437C },
|
||||
{ "n32_4in1", BMC_N32_4IN1 },
|
||||
{ "ntd03", BMC_NTD_03 },
|
||||
{ "bmc_ctc09", BMC_CTC09 },
|
||||
{ "bmc_gb63", BMC_G63IN1 },
|
||||
|
@ -97,7 +97,8 @@ enum
|
||||
BMC_70IN1, BMC_500IN1, BMC_800IN1, BMC_1200IN1,
|
||||
BMC_GKA, BMC_GKB, BMC_GKCXIN1, BMC_VT5201, BMC_BENSHIENG,
|
||||
BMC_60311C, BMC_80013B, BMC_810544C, BMC_830425C, BMC_850437C,
|
||||
BMC_NT639, BMC_NTD_03, BMC_G63IN1, BMC_FCGENJIN_8IN1, BMC_FK23C, BMC_FK23CA,
|
||||
BMC_N32_4IN1, BMC_NT639, BMC_NTD_03, BMC_G63IN1,
|
||||
BMC_FCGENJIN_8IN1, BMC_FK23C, BMC_FK23CA,
|
||||
BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146,
|
||||
BMC_2751, BMC_8157, BMC_830118C, BMC_830832C, BMC_841101C,
|
||||
BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_SUPER22,
|
||||
|
@ -106,6 +106,7 @@ void nes_state::machine_start()
|
||||
|
||||
static const int w_ex_pcbs[] =
|
||||
{
|
||||
BMC_N32_4IN1,
|
||||
BTL_SMB2JB,
|
||||
BTL_YUNG08,
|
||||
UNL_AC08,
|
||||
|
Loading…
Reference in New Issue
Block a user