mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
bus/nes: Added support for Super RPG 5 in 1. (#8680)
New working software list additions (nes.xml) ----------------------------------- Super RPG 5 in 1 (CH501) [NewRisingSun]
This commit is contained in:
parent
eb6dc439d5
commit
00a9f25e72
19
hash/nes.xml
19
hash/nes.xml
@ -80956,6 +80956,25 @@ be better to redump them properly. -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_5srpg">
|
||||
<description>Super RPG 5 in 1 (CH501)</description>
|
||||
<year>1996</year>
|
||||
<publisher><pirate></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="srpg_5in1" />
|
||||
<dataarea name="prg" size="2097152">
|
||||
<rom name="super rpg 5 in 1 ch501.prg" size="2097152" crc="d65e0e3b" sha1="4d8502e6a55649f41d8b6f45e5c352d306dc1e8e" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 32k VRAM on cartridge, only 8k used -->
|
||||
<dataarea name="vram" size="32768">
|
||||
</dataarea>
|
||||
<!-- 64k WRAM on cartridge, battery backed up, 2x32k chips -->
|
||||
<dataarea name="bwram" size="65536">
|
||||
<rom value="0x00" size="65536" offset="0" loadflag="fill" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_5tvg">
|
||||
<description>TV Game 5 in 1</description>
|
||||
<year>1989</year>
|
||||
|
@ -32,6 +32,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_JY820845C, nes_bmc_jy820845c_device, "nes_bmc_jy82084
|
||||
DEFINE_DEVICE_TYPE(NES_FARID_SLROM, nes_farid_slrom_device, "nes_farid_slrom", "NES Cart Farid SLROM 8 in 1 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device, "nes_ninjaryu", "NES Cart Ninja Ryukenden Chinese PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_RESETSXROM, nes_resetsxrom_device, "nes_resetsxrom", "NES Cart BMC RESET-SXROM PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_SRPG_5IN1, nes_srpg5in1_device, "nes_srpg5in1", "NES Cart Super RPG 5 in 1 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_TXC_22110, nes_txc_22110_device, "nes_txc_22110", "NES Cart TXC 01-22110-000 PCB")
|
||||
|
||||
|
||||
@ -55,6 +56,11 @@ nes_resetsxrom_device::nes_resetsxrom_device(const machine_config &mconfig, cons
|
||||
{
|
||||
}
|
||||
|
||||
nes_srpg5in1_device::nes_srpg5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_sxrom_device(mconfig, NES_SRPG_5IN1, tag, owner, clock), m_outer(0), m_outer_count(0), m_outer_latch(0)
|
||||
{
|
||||
}
|
||||
|
||||
nes_txc_22110_device::nes_txc_22110_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_sxrom_device(mconfig, NES_TXC_22110, tag, owner, clock), m_latch0(0), m_mode(0)
|
||||
{
|
||||
@ -102,6 +108,22 @@ void nes_resetsxrom_device::pcb_reset()
|
||||
nes_sxrom_device::pcb_reset();
|
||||
}
|
||||
|
||||
void nes_srpg5in1_device::device_start()
|
||||
{
|
||||
nes_sxrom_device::device_start();
|
||||
save_item(NAME(m_outer));
|
||||
save_item(NAME(m_outer_count));
|
||||
save_item(NAME(m_outer_latch));
|
||||
}
|
||||
|
||||
void nes_srpg5in1_device::pcb_reset()
|
||||
{
|
||||
m_outer = 0;
|
||||
m_outer_count = 0;
|
||||
m_outer_latch = 0;
|
||||
nes_sxrom_device::pcb_reset();
|
||||
}
|
||||
|
||||
void nes_txc_22110_device::device_start()
|
||||
{
|
||||
nes_sxrom_device::device_start();
|
||||
@ -241,6 +263,68 @@ void nes_farid_slrom_device::write_m(offs_t offset, u8 data)
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
BMC-SRPG-5IN1 (PCB has no distinguishing label)
|
||||
|
||||
Games: Super RPG 5 in 1 CH501
|
||||
|
||||
MMC1 clone with banking for multigame menu. Note: This
|
||||
game does not soft reset properly on real hardware.
|
||||
|
||||
The interesting feature of this board is that it has a
|
||||
serially written 4-bit shift register that selects the
|
||||
outer game bank (meaning it has two shift registers,
|
||||
since it also clones the MMC1's). The MSB (bit 3) seems
|
||||
to indicate menu mode (0) or game mode (1), but it's not
|
||||
clear if/how this is used. Is it a lock? We currently
|
||||
don't use the MSB nor allow it to be read back.
|
||||
|
||||
NES 2.0: mapper 543
|
||||
|
||||
In MAME: Supported.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
void nes_srpg5in1_device::write_l(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("srpg5in1 write_l, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
offset += 0x100;
|
||||
if (offset >= 0x1000)
|
||||
{
|
||||
m_outer_latch = (data & 0x08) | m_outer_latch >> 1;
|
||||
m_outer_count = (m_outer_count + 1) & 0x03;
|
||||
if (!m_outer_count)
|
||||
{
|
||||
m_outer = m_outer_latch;
|
||||
set_prg();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nes_srpg5in1_device::write_m(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("srpg5in1 write_m, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
u8 bank = BIT(m_outer, 1) ? bitswap<3>(m_outer, 1, 2, 0) : (m_outer & 1) << 1 | BIT(m_reg[1], 3);
|
||||
|
||||
if (!BIT(m_reg[3], 4)) // WRAM enabled
|
||||
m_battery[((bank * 0x2000) + offset) & (m_battery.size() - 1)] = data;
|
||||
}
|
||||
|
||||
u8 nes_srpg5in1_device::read_m(offs_t offset)
|
||||
{
|
||||
LOG_MMC(("srpg5in1 read_m, offset: %04x\n", offset));
|
||||
|
||||
u8 bank = BIT(m_outer, 1) ? bitswap<3>(m_outer, 1, 2, 0) : (m_outer & 1) << 1 | BIT(m_reg[1], 3);
|
||||
|
||||
if (!BIT(m_reg[3], 4)) // WRAM enabled
|
||||
return m_battery[((bank * 0x2000) + offset) & (m_battery.size() - 1)];
|
||||
|
||||
return get_open_bus();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
TXC 01-22110-000 Board
|
||||
|
@ -96,6 +96,32 @@ private:
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_srpg5in1_device
|
||||
|
||||
class nes_srpg5in1_device : public nes_sxrom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_srpg5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
virtual u8 read_m(offs_t offset) override;
|
||||
virtual void write_l(offs_t offset, u8 data) override;
|
||||
virtual void write_m(offs_t offset, u8 data) override;
|
||||
|
||||
virtual void pcb_reset() override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
virtual void set_prg() override { nes_sxrom_device::set_prg((m_outer & 0x07) << 4, 0x0f); }
|
||||
virtual void set_chr() override { nes_sxrom_device::set_chr(0x00, 0x01); }
|
||||
|
||||
private:
|
||||
u8 m_outer, m_outer_count, m_outer_latch;
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_txc_22110_device
|
||||
|
||||
class nes_txc_22110_device : public nes_sxrom_device
|
||||
@ -127,6 +153,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_JY820845C, nes_bmc_jy820845c_device)
|
||||
DECLARE_DEVICE_TYPE(NES_FARID_SLROM, nes_farid_slrom_device)
|
||||
DECLARE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device)
|
||||
DECLARE_DEVICE_TYPE(NES_RESETSXROM, nes_resetsxrom_device)
|
||||
DECLARE_DEVICE_TYPE(NES_SRPG_5IN1, nes_srpg5in1_device)
|
||||
DECLARE_DEVICE_TYPE(NES_TXC_22110, nes_txc_22110_device)
|
||||
|
||||
#endif // MAME_BUS_NES_MMC1_CLONES_H
|
||||
|
@ -382,6 +382,7 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("bmc_850437c", NES_BMC_850437C);
|
||||
device.option_add_internal("bmc_970630c", NES_BMC_970630C);
|
||||
device.option_add_internal("bmc_jy820845c", NES_BMC_JY820845C);
|
||||
device.option_add_internal("srpg_5in1", NES_SRPG_5IN1);
|
||||
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);
|
||||
|
@ -505,7 +505,7 @@ static const nes_mmc mmc_list[] =
|
||||
// 540 for mstrfgt6 in nes.xml or a variant of it not in nes.xml?
|
||||
{ 541, BMC_LITTLECOM160 },
|
||||
// 542 Chairman Mao's 100th anniversary cart? You've got to be kidding me.
|
||||
// 543 5 in 1 (CH-501) multicart, not in nes.xml?
|
||||
{ 543, BMC_SRPG_5IN1 },
|
||||
// 544 another alt of sango2ht/sanguo2a?
|
||||
// 545 4 in 1 (ST-80) multicart, not in nes.xml?
|
||||
// 546 10 in 1 Tenchi wo Kurau multicart, not in nes.xml?
|
||||
|
@ -263,6 +263,7 @@ static const nes_pcb pcb_list[] =
|
||||
{ "bmc_850437c", BMC_850437C },
|
||||
{ "bmc_970630c", BMC_970630C },
|
||||
{ "bmc_jy820845c", BMC_JY820845C },
|
||||
{ "srpg_5in1", BMC_SRPG_5IN1 },
|
||||
{ "n32_4in1", BMC_N32_4IN1 },
|
||||
{ "ntd03", BMC_NTD_03 },
|
||||
{ "bmc_ctc09", BMC_CTC09 },
|
||||
|
@ -98,7 +98,7 @@ enum
|
||||
BMC_HP898F, BMC_VT5201, BMC_BENSHIENG,
|
||||
BMC_60311C, BMC_80013B, BMC_810544C, BMC_830425C,
|
||||
BMC_830928C, BMC_850437C, BMC_970630C,
|
||||
BMC_N32_4IN1, BMC_NC20MB, BMC_NT639, BMC_NTD_03,
|
||||
BMC_N32_4IN1, BMC_NC20MB, BMC_NT639, BMC_NTD_03, BMC_SRPG_5IN1,
|
||||
BMC_EL860947C, BMC_EL861121C, BMC_FK23C, BMC_FK23CA, BMC_JY820845C,
|
||||
BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146,
|
||||
BMC_2751, BMC_8157, BMC_00202650,
|
||||
|
Loading…
Reference in New Issue
Block a user