mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
bus/nes: Added support for YUNG-08 SMB2 FDS conversions. (#8366)
Software list items promoted to working (nes.xml) --------------------------------------- Super Mario Bros. 2 (YUNG-08) Super Mario Bros. 2 (YUNG-08, no protection)
This commit is contained in:
parent
e6b0d608eb
commit
2ad1f4d9aa
10
hash/nes.xml
10
hash/nes.xml
@ -67263,14 +67263,15 @@ Also notice that VRAM & WRAM are probably incorrect for some of these sets, at t
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="smb2fdsy" cloneof="smb2fds" supported="no">
|
||||
<software name="smb2fdsy" cloneof="smb2fds">
|
||||
<description>Super Mario Bros. 2 (YUNG-08)</description>
|
||||
<year>19??</year>
|
||||
<publisher><pirate></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="yung08" /> <!-- mapper 368 -->
|
||||
<feature name="pcb" value="YUNG-08" />
|
||||
<dataarea name="prg" size="73728">
|
||||
<feature name="mirroring" value="vertical" />
|
||||
<dataarea name="prg" size="81920">
|
||||
<rom name="mali4dai.prg0" size="32768" crc="473b9553" sha1="5b3a5752229cfadb41b2ae8a1fe3eff2b7132a17" offset="0x00000" status="baddump" /> <!-- original label: 瑪琍4代 -->
|
||||
<rom name="mali4dai.prg1" size="32768" crc="8d188ef2" sha1="44b76a77c3d2ffd582a510516a9da6e58aaecc92" offset="0x08000" status="baddump" /> <!-- original label: 瑪琍4代 -->
|
||||
<rom name="mali4dai.prg2" size="2048" crc="9f098abf" sha1="d295e4e882c21dcbda6b4923e54d1e924b557fa4" offset="0x10000" status="baddump" /> <!-- no label -->
|
||||
@ -67285,14 +67286,15 @@ Also notice that VRAM & WRAM are probably incorrect for some of these sets, at t
|
||||
</software>
|
||||
|
||||
<!-- Two boards turned up with the same silkscreen YUNG-08, and this one for whatever reason had different ROMs with the protection check patched out but with the hardware to support it still intact. -->
|
||||
<software name="smb2fdsy1" cloneof="smb2fds" supported="no">
|
||||
<software name="smb2fdsy1" cloneof="smb2fds">
|
||||
<description>Super Mario Bros. 2 (YUNG-08, no protection)</description>
|
||||
<year>19??</year>
|
||||
<publisher><pirate></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="yung08" /> <!-- mapper 368 -->
|
||||
<feature name="pcb" value="YUNG-08" />
|
||||
<dataarea name="prg" size="73728">
|
||||
<feature name="mirroring" value="vertical" />
|
||||
<dataarea name="prg" size="81920">
|
||||
<rom name="mali4dai (alt).prg0" size="32768" crc="473b9553" sha1="5b3a5752229cfadb41b2ae8a1fe3eff2b7132a17" offset="0x00000" status="baddump" />
|
||||
<rom name="mali4dai (alt).prg1" size="32768" crc="8d188ef2" sha1="44b76a77c3d2ffd582a510516a9da6e58aaecc92" offset="0x08000" status="baddump" />
|
||||
<rom name="mali4dai (alt).prg2" size="2048" crc="c9fbd397" sha1="21c72e06ff861bda4b8bf81541c1eb665e88d27e" offset="0x10000" status="baddump" />
|
||||
|
@ -13,6 +13,9 @@
|
||||
|
||||
TODO:
|
||||
- review all PCBs and fix the starting banks (which are often the main problem of not working games)
|
||||
- SMB2 bootlegs all seem to have timing issues. This is apparent on worlds A-D as the bottom of the
|
||||
world letter scrolls. Hardware footage of the mapper 50 version shows the letter bottoms flickering
|
||||
(though it could be a video/compression artifact).
|
||||
|
||||
***********************************************************************************************************/
|
||||
|
||||
@ -65,6 +68,7 @@ DEFINE_DEVICE_TYPE(NES_AC08, nes_ac08_device, "nes_ac08", "N
|
||||
DEFINE_DEVICE_TYPE(NES_MMALEE, nes_mmalee_device, "nes_mmalee", "NES Cart Super Mario Bros. Malee 2 Pirate PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_SHUIGUAN, nes_shuiguan_device, "nes_shuiguan", "NES Cart Shui Guan Pipe Pirate PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_RT01, nes_rt01_device, "nes_rt01", "NES Cart RT-01 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_YUNG08, nes_yung08_device, "nes_yung08", "NES Cart Super Mario Bros. 2 YUNG-08 PCB")
|
||||
|
||||
|
||||
nes_ax5705_device::nes_ax5705_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
@ -212,6 +216,11 @@ nes_rt01_device::nes_rt01_device(const machine_config &mconfig, const char *tag,
|
||||
{
|
||||
}
|
||||
|
||||
nes_yung08_device::nes_yung08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_nrom_device(mconfig, NES_YUNG08, tag, owner, clock), m_irq_count(0), m_irq_latch(0), irq_timer(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -648,7 +657,6 @@ void nes_shuiguan_device::pcb_reset()
|
||||
memset(m_mmc_vrom_bank, 0, sizeof(m_mmc_vrom_bank));
|
||||
}
|
||||
|
||||
|
||||
void nes_rt01_device::device_start()
|
||||
{
|
||||
common_start();
|
||||
@ -664,6 +672,28 @@ void nes_rt01_device::pcb_reset()
|
||||
prg16_cdef(0);
|
||||
}
|
||||
|
||||
void nes_yung08_device::device_start()
|
||||
{
|
||||
common_start();
|
||||
irq_timer = timer_alloc(TIMER_IRQ);
|
||||
irq_timer->adjust(attotime::zero, 0, clocks_to_attotime(1));
|
||||
|
||||
save_item(NAME(m_irq_count));
|
||||
save_item(NAME(m_irq_latch));
|
||||
}
|
||||
|
||||
void nes_yung08_device::pcb_reset()
|
||||
{
|
||||
prg8_89(1);
|
||||
prg8_ab(0);
|
||||
prg8_cd(0); // switchable bank
|
||||
prg8_ef(8);
|
||||
chr8(0, CHRROM);
|
||||
|
||||
m_irq_count = 0;
|
||||
m_irq_latch = 0;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mapper specific handlers
|
||||
@ -2021,7 +2051,6 @@ uint8_t nes_shuiguan_device::read_m(offs_t offset)
|
||||
return m_prg[offset & 0x1fff];
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
RT-01
|
||||
@ -2049,3 +2078,73 @@ uint8_t nes_rt01_device::read_h(offs_t offset)
|
||||
|
||||
return hi_access_rom(offset);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
YUNG-08
|
||||
|
||||
Games: Super Mario Bros. 2 Pirate (YUNG-08)
|
||||
|
||||
NES 2.0: mapper 368
|
||||
|
||||
In MAME: Supported.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
void nes_yung08_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
if (id == TIMER_IRQ)
|
||||
{
|
||||
if (BIT(m_irq_latch, 0))
|
||||
{
|
||||
m_irq_count = (m_irq_count + 1) & 0x0fff;
|
||||
if (!m_irq_count)
|
||||
set_irq_line(ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nes_yung08_device::write_45(offs_t offset, u8 data)
|
||||
{
|
||||
switch (offset & 0x51ff)
|
||||
{
|
||||
case 0x4022:
|
||||
prg8_cd(data & 1 ? 3 : 4 + ((data & 0x07) >> 1));
|
||||
break;
|
||||
case 0x4122:
|
||||
m_irq_latch = data & 0x35;
|
||||
if (!BIT(m_irq_latch, 0))
|
||||
{
|
||||
set_irq_line(CLEAR_LINE);
|
||||
m_irq_count = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void nes_yung08_device::write_ex(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("yung08 write_ex, offset: %04x, data: %02x\n", offset, data));
|
||||
write_45(offset + 0x4020, data);
|
||||
}
|
||||
|
||||
void nes_yung08_device::write_l(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("yung08 write_l, offset: %04x, data: %02x\n", offset, data));
|
||||
write_45(offset + 0x4100, data);
|
||||
}
|
||||
|
||||
u8 nes_yung08_device::read_l(offs_t offset)
|
||||
{
|
||||
LOG_MMC(("yung08 read_l, offset: %04x\n", offset));
|
||||
offset += 0x100;
|
||||
if ((offset & 0x11ff) == 0x0122) // 0x4122
|
||||
return m_irq_latch | 0x8a;
|
||||
return get_open_bus();
|
||||
}
|
||||
|
||||
u8 nes_yung08_device::read_m(offs_t offset)
|
||||
{
|
||||
LOG_MMC(("yung08 read_m, offset: %04x\n", offset));
|
||||
return m_prg[0x02 * 0x2000 + offset]; // fixed to bank #2
|
||||
}
|
||||
|
@ -652,6 +652,36 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_yung08_device
|
||||
|
||||
class nes_yung08_device : public nes_nrom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_yung08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
virtual u8 read_l(offs_t offset) override;
|
||||
virtual u8 read_m(offs_t offset) override;
|
||||
virtual void write_ex(offs_t offset, u8 data) override;
|
||||
virtual void write_l(offs_t offset, u8 data) override;
|
||||
|
||||
virtual void pcb_reset() override;
|
||||
|
||||
protected:
|
||||
// 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_latch;
|
||||
|
||||
static const device_timer_id TIMER_IRQ = 0;
|
||||
emu_timer *irq_timer;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(NES_AX5705, nes_ax5705_device)
|
||||
@ -682,5 +712,6 @@ DECLARE_DEVICE_TYPE(NES_AC08, nes_ac08_device)
|
||||
DECLARE_DEVICE_TYPE(NES_MMALEE, nes_mmalee_device)
|
||||
DECLARE_DEVICE_TYPE(NES_SHUIGUAN, nes_shuiguan_device)
|
||||
DECLARE_DEVICE_TYPE(NES_RT01, nes_rt01_device)
|
||||
DECLARE_DEVICE_TYPE(NES_YUNG08, nes_yung08_device)
|
||||
|
||||
#endif // MAME_BUS_NES_BOOTLEG_H
|
||||
|
@ -301,6 +301,7 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("smb2j", NES_SMB2J);
|
||||
device.option_add_internal("smb2ja", NES_SMB2JA);
|
||||
device.option_add_internal("smb2jb", NES_SMB2JB);
|
||||
device.option_add_internal("yung08", NES_YUNG08);
|
||||
device.option_add_internal("btl_0353", NES_0353); // used by Lucky (Roger) Rabbit FDS conversion
|
||||
device.option_add_internal("09034a", NES_09034A);
|
||||
device.option_add_internal("batmanfs", NES_BATMANFS);
|
||||
|
@ -402,7 +402,7 @@ static const nes_mmc mmc_list[] =
|
||||
// 365 is this asderp95 in nes.xml?
|
||||
// 366 K-3131GS and K-3131SS 4-in-1 carts
|
||||
// 367 7-in-1 cart that is a close variant of mapper 205
|
||||
// { 368, BTL_YUNG08 } // SMB2 FDS conversion
|
||||
{ 368, BTL_YUNG08 }, // SMB2 FDS conversion
|
||||
// 369 Super Mario Bros Party multicart
|
||||
// 370 Golden Mario Party II multicart
|
||||
// 371 Spanish PEC-586 computer main cart
|
||||
|
@ -207,6 +207,7 @@ static const nes_pcb pcb_list[] =
|
||||
{ "smb2j", UNL_SMB2J },
|
||||
{ "smb2ja", BTL_SMB2JA },
|
||||
{ "smb2jb", BTL_SMB2JB },
|
||||
{ "yung08", BTL_YUNG08 },
|
||||
{ "btl_0353", BTL_0353 },
|
||||
{ "09034a", BTL_09034A },
|
||||
{ "batmanfs", BTL_BATMANFS },
|
||||
|
@ -112,7 +112,7 @@ enum
|
||||
// Bootleg boards
|
||||
BTL_SMB2JA, BTL_MARIOBABY, BTL_AISENSHINICOL, BTL_TOBIDASE,
|
||||
BTL_SMB2JB, BTL_09034A, BTL_SMB3, BTL_SBROS11, BTL_DRAGONNINJA,
|
||||
BTL_PIKACHUY2K, BTL_SHUIGUAN, BTL_0353, BTL_BATMANFS, BTL_PALTHENA,
|
||||
BTL_PIKACHUY2K, BTL_SHUIGUAN, BTL_0353, BTL_BATMANFS, BTL_PALTHENA, BTL_YUNG08,
|
||||
// Kaiser
|
||||
KAISER_KS202, KAISER_KS7010, KAISER_KS7012, KAISER_KS7013B,
|
||||
KAISER_KS7016, KAISER_KS7016B, KAISER_KS7017, KAISER_KS7021A,
|
||||
|
@ -83,7 +83,7 @@ void nes_state::machine_start()
|
||||
space.install_read_handler(0x8000, 0xffff, read8sm_delegate(*m_cartslot, FUNC(nes_cart_slot_device::read_h)));
|
||||
}
|
||||
|
||||
if (m_cartslot->get_pcb_id() == BTL_SMB2JB || m_cartslot->get_pcb_id() == UNL_AC08 || m_cartslot->get_pcb_id() == UNL_SMB2J)
|
||||
if (m_cartslot->get_pcb_id() == BTL_SMB2JB || m_cartslot->get_pcb_id() == BTL_YUNG08 || m_cartslot->get_pcb_id() == UNL_AC08 || m_cartslot->get_pcb_id() == UNL_SMB2J)
|
||||
{
|
||||
logerror("write_ex installed!\n");
|
||||
space.install_write_handler(0x4020, 0x40ff, write8sm_delegate(*m_cartslot, FUNC(nes_cart_slot_device::write_ex)));
|
||||
|
Loading…
Reference in New Issue
Block a user