mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
bus/nes: Added support for NES-EVENT2 board. (#9272)
* bus/nes: Added support for NES-EVENT2 board. New working software list additions (nes.xml) ----------------------------------- Nintendo Campus Challenge 1991 (USA) [anonymous] * Mark this clearly as a bootleg.
This commit is contained in:
parent
0d8ac5b760
commit
0f00fbc817
32
hash/nes.xml
32
hash/nes.xml
@ -21110,11 +21110,12 @@ license:CC0
|
||||
</software>
|
||||
|
||||
<software name="kungfuju" cloneof="kungfu">
|
||||
<description>Kung Fu (Jpn, USA)</description><!-- Dump still to be confirmed from a Jpn cart -->
|
||||
<description>Kung Fu (Japan, USA)</description>
|
||||
<year>1985</year>
|
||||
<publisher>Nintendo</publisher>
|
||||
<info name="serial" value="HVC-KF"/>
|
||||
<info name="serial" value="NES-SX-USA"/>
|
||||
<info name="release" value="198510xx"/>
|
||||
<info name="release" value="198510xx (USA)"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="nrom" />
|
||||
<feature name="pcb" value="NES-NROM-256" />
|
||||
@ -34585,7 +34586,7 @@ license:CC0
|
||||
</software>
|
||||
|
||||
<software name="skykidj" cloneof="skykid">
|
||||
<description>Sky Kid (Jpn)</description>
|
||||
<description>SkyKid (Japan)</description>
|
||||
<year>1986</year>
|
||||
<publisher>Namcot</publisher>
|
||||
<info name="serial" value="NAM-NSK-3900 (18)"/>
|
||||
@ -34605,7 +34606,7 @@ license:CC0
|
||||
</software>
|
||||
|
||||
<software name="skykid">
|
||||
<description>Sky Kid (USA)</description>
|
||||
<description>SkyKid (USA)</description>
|
||||
<year>1987</year>
|
||||
<publisher>Sunsoft</publisher>
|
||||
<info name="serial" value="NES-SY-USA"/>
|
||||
@ -49099,6 +49100,29 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- The dump is from the repro cart. It is unknown if it has been modified. -->
|
||||
<software name="ncc91">
|
||||
<description>Nintendo Campus Challenge 1991 (bootleg)</description>
|
||||
<year>2009</year>
|
||||
<publisher>RetroZone</publisher>
|
||||
<info name="usage" value="To play, press start on controller 2."/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="nes_event2" />
|
||||
<dataarea name="prg" size="524288">
|
||||
<rom name="0.prg" size="524288" crc="61a6741d" sha1="ece5c65a80c9594696408528ddbbe53ddeb20b8e" status="baddump" />
|
||||
</dataarea>
|
||||
<dataarea name="chr" size="262144">
|
||||
<rom name="nwc.chr" size="262144" crc="3722904a" sha1="f88d7886bc0f9a7f93c1760130e311d4ab38ecfb" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
<!-- 10k WRAM on cartridge (8k + 2k) -->
|
||||
<dataarea name="wram" size="10240">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="nintenwc">
|
||||
<description>Nintendo World Cup (Euro, Rev. B)</description>
|
||||
<year>1990</year>
|
||||
|
@ -1,14 +1,15 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Fabio Priuli
|
||||
// copyright-holders:Fabio Priuli,kmg
|
||||
/***********************************************************************************************************
|
||||
|
||||
|
||||
NES/Famicom cartridge emulation for Nintendo NES-EVENT PCB
|
||||
NES/Famicom cartridge emulation for Nintendo NES-EVENT PCBs
|
||||
|
||||
|
||||
Here we emulate the following PCBs
|
||||
|
||||
* Nintendo NES-EVENT [mapper 105]
|
||||
* Nintendo NES-EVENT2 [mapper 555]
|
||||
|
||||
***********************************************************************************************************/
|
||||
|
||||
@ -30,7 +31,8 @@
|
||||
// constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
DEFINE_DEVICE_TYPE(NES_EVENT, nes_event_device, "nes_event", "NES Cart Event PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_EVENT, nes_event_device, "nes_event", "NES Cart EVENT PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_EVENT2, nes_event2_device, "nes_event2", "NES Cart EVENT2 PCB")
|
||||
|
||||
|
||||
nes_event_device::nes_event_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
@ -44,6 +46,16 @@ nes_event_device::nes_event_device(const machine_config &mconfig, const char *ta
|
||||
{
|
||||
}
|
||||
|
||||
nes_event2_device::nes_event2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_tqrom_device(mconfig, NES_EVENT2, tag, owner, clock)
|
||||
, m_dsw(*this, "DIPSW")
|
||||
, m_tqrom_mode(false)
|
||||
, event_timer(nullptr)
|
||||
, m_timer_count(0)
|
||||
, m_timer_enabled(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void nes_event_device::device_start()
|
||||
{
|
||||
@ -71,6 +83,30 @@ void nes_event_device::pcb_reset()
|
||||
m_timer_on = 0;
|
||||
}
|
||||
|
||||
void nes_event2_device::device_start()
|
||||
{
|
||||
mmc3_start();
|
||||
|
||||
event_timer = timer_alloc(TIMER_EVENT);
|
||||
event_timer->adjust(attotime::zero, 0, clocks_to_attotime(1));
|
||||
|
||||
save_item(NAME(m_tqrom_mode));
|
||||
|
||||
save_item(NAME(m_timer_count));
|
||||
save_item(NAME(m_timer_enabled));
|
||||
}
|
||||
|
||||
void nes_event2_device::pcb_reset()
|
||||
{
|
||||
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
|
||||
|
||||
m_tqrom_mode = false;
|
||||
mmc3_common_initialize(0x07, 0x7f, 0);
|
||||
|
||||
m_timer_count = 0;
|
||||
m_timer_enabled = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
@ -79,9 +115,9 @@ void nes_event_device::pcb_reset()
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
Event PCB
|
||||
EVENT PCB
|
||||
|
||||
Games: Nintento World Championships
|
||||
Games: Nintento World Championships 1990
|
||||
|
||||
MMC1 variant with repurposed register at $a000 and a
|
||||
lot of discrete components
|
||||
@ -135,6 +171,93 @@ void nes_event_device::set_prg()
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
EVENT2 PCB
|
||||
|
||||
Games: Nintento Campus Challenge 1991
|
||||
|
||||
Similar to the previous EVENT PCB, but based around
|
||||
the MMC3. Onboard 8K VRAM and 8K WRAM support Pinbot
|
||||
and SMB3, respectively, and an additional 2K WRAM at
|
||||
$5000 is used by the control routine. The board also
|
||||
featured an RJ11, used to transmit player names and
|
||||
scores to a display at the staged events.
|
||||
|
||||
The present emulation is based on what is known via
|
||||
the reproduction board by RetroZone. That board is
|
||||
missing the RJ11, two DIP switches, and...?
|
||||
|
||||
NES 2.0: mapper 555
|
||||
|
||||
In MAME: Supported.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
u8 nes_event2_device::read_l(offs_t offset)
|
||||
{
|
||||
// LOG_MMC(("event2 read_l, offset: %04x\n", offset));
|
||||
offset += 0x100;
|
||||
if (offset >= 0x1800)
|
||||
return (m_timer_count >= (0x10 | m_dsw->read()) << 25) ? 0x80 : 0;
|
||||
else if (offset < 0x1000 || m_prgram.empty())
|
||||
return get_open_bus();
|
||||
else
|
||||
return m_prgram[(0x2000 + (offset & 0x7ff)) % m_prgram.size()];
|
||||
}
|
||||
|
||||
u8 nes_event2_device::read_m(offs_t offset)
|
||||
{
|
||||
// LOG_MMC(("event2 read_m, offset: %04x\n", offset));
|
||||
if (m_prgram.empty())
|
||||
return get_open_bus();
|
||||
else
|
||||
return m_prgram[offset % m_prgram.size()];
|
||||
}
|
||||
|
||||
void nes_event2_device::write_l(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("event2 write_l, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
offset += 0x100;
|
||||
switch (offset & 0x1c00)
|
||||
{
|
||||
case 0x1000:
|
||||
case 0x1400:
|
||||
m_prgram[(0x2000 + (offset & 0x7ff)) % m_prgram.size()] = data;
|
||||
break;
|
||||
case 0x1800:
|
||||
m_tqrom_mode = (data & 0x06) == 0x02;
|
||||
|
||||
m_prg_base = (data & 0x04) << 3;
|
||||
m_prg_mask = (data & 0x03) << 3 | 0x07;
|
||||
set_prg(m_prg_base, m_prg_mask);
|
||||
|
||||
m_chr_base = m_prg_base << 2;
|
||||
set_chr(m_chr_source, m_chr_base, m_chr_mask);
|
||||
|
||||
m_timer_enabled = BIT(data, 3);
|
||||
if (!m_timer_enabled)
|
||||
m_timer_count = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void nes_event2_device::write_m(offs_t offset, u8 data)
|
||||
{
|
||||
// LOG_MMC(("event2 write_m, offset: %04x, data: %02x\n", offset, data));
|
||||
if (!m_prgram.empty())
|
||||
m_prgram[offset % m_prgram.size()] = data;
|
||||
}
|
||||
|
||||
void nes_event2_device::set_chr(u8 chr, int chr_base, int chr_mask)
|
||||
{
|
||||
if (m_tqrom_mode)
|
||||
nes_tqrom_device::set_chr(chr, chr_base, chr_mask);
|
||||
else
|
||||
nes_txrom_device::set_chr(chr, chr_base, chr_mask);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// Dipswitch
|
||||
@ -168,6 +291,11 @@ ioport_constructor nes_event_device::device_input_ports() const
|
||||
return INPUT_PORTS_NAME( nwc_dsw );
|
||||
}
|
||||
|
||||
ioport_constructor nes_event2_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( nwc_dsw );
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_timer - handler timer events
|
||||
@ -184,3 +312,9 @@ void nes_event_device::device_timer(emu_timer &timer, device_timer_id id, int pa
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nes_event2_device::device_timer(emu_timer &timer, device_timer_id id, int param)
|
||||
{
|
||||
if (id == TIMER_EVENT && m_timer_enabled)
|
||||
m_timer_count++;
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Fabio Priuli
|
||||
// copyright-holders:Fabio Priuli,kmg
|
||||
#ifndef MAME_BUS_NES_EVENT_H
|
||||
#define MAME_BUS_NES_EVENT_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "mmc1.h"
|
||||
#include "mmc3.h"
|
||||
|
||||
|
||||
// ======================> nes_event_device
|
||||
@ -38,8 +39,43 @@ protected:
|
||||
int m_timer_on, m_timer_enabled;
|
||||
};
|
||||
|
||||
// ======================> nes_event2_device
|
||||
|
||||
class nes_event2_device : public nes_tqrom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_event2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
virtual u8 read_l(offs_t offset) override;
|
||||
virtual void write_l(offs_t offset, u8 data) override;
|
||||
virtual u8 read_m(offs_t offset) 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 device_timer(emu_timer &timer, device_timer_id id, int param) override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
virtual void set_chr(u8 chr, int chr_base, int chr_mask) override;
|
||||
|
||||
required_ioport m_dsw;
|
||||
|
||||
bool m_tqrom_mode;
|
||||
|
||||
static constexpr device_timer_id TIMER_EVENT = 0;
|
||||
emu_timer *event_timer;
|
||||
|
||||
u32 m_timer_count;
|
||||
int m_timer_enabled;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(NES_EVENT, nes_event_device)
|
||||
DECLARE_DEVICE_TYPE(NES_EVENT, nes_event_device)
|
||||
DECLARE_DEVICE_TYPE(NES_EVENT2, nes_event2_device)
|
||||
|
||||
#endif // MAME_BUS_NES_EVENT_H
|
||||
|
@ -79,8 +79,13 @@ nes_txsrom_device::nes_txsrom_device(const machine_config &mconfig, const char *
|
||||
{
|
||||
}
|
||||
|
||||
nes_tqrom_device::nes_tqrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: nes_txrom_device(mconfig, NES_TQROM, tag, owner, clock)
|
||||
nes_tqrom_device::nes_tqrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_txrom_device(mconfig, type, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
nes_tqrom_device::nes_tqrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_tqrom_device(mconfig, NES_TQROM, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -87,10 +87,9 @@ class nes_txsrom_device : public nes_txrom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_txsrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
nes_txsrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void write_h(offs_t offset, uint8_t data) override;
|
||||
virtual void write_h(offs_t offset, u8 data) override;
|
||||
virtual void chr_cb(int start, int bank, int source) override;
|
||||
|
||||
protected:
|
||||
@ -107,10 +106,13 @@ class nes_tqrom_device : public nes_txrom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_tqrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
nes_tqrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
protected:
|
||||
virtual void set_chr( uint8_t chr, int chr_base, int chr_mask ) override;
|
||||
// construction/destruction
|
||||
nes_tqrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
virtual void set_chr(u8 chr, int chr_base, int chr_mask) override;
|
||||
};
|
||||
|
||||
|
||||
@ -122,7 +124,6 @@ public:
|
||||
// construction/destruction
|
||||
nes_qj_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void write_m(offs_t offset, uint8_t data) override;
|
||||
virtual void pcb_reset() override;
|
||||
};
|
||||
@ -136,7 +137,6 @@ public:
|
||||
// construction/destruction
|
||||
nes_zz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void write_m(offs_t offset, uint8_t data) override;
|
||||
virtual void pcb_reset() override;
|
||||
};
|
||||
|
@ -119,6 +119,7 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("pal_zz", NES_ZZ_PCB);
|
||||
device.option_add_internal("nes_qj", NES_QJ_PCB);
|
||||
device.option_add_internal("nes_event", NES_EVENT);
|
||||
device.option_add_internal("nes_event2", NES_EVENT2);
|
||||
// Discrete Components boards
|
||||
// IC_74x139x74
|
||||
device.option_add_internal("discrete_74x139", NES_74X139X74);
|
||||
|
@ -516,7 +516,7 @@ static const nes_mmc mmc_list[] =
|
||||
// 552 TAITO_X1_017, this is a correction of mapper 82. We should drop 82 and only support the accurate dumps of 552?
|
||||
{ 553, SACHEN_3013 }, // Dong Dong Nao 1
|
||||
{ 554, KAISER_KS7010 }, // Akumajo Dracula FDS conversion
|
||||
// 555 retroUSB re-release of 1991 Nintendo Campus Challenge
|
||||
{ 555, STD_EVENT2 },
|
||||
// 556 JY-215 multicart
|
||||
{ 557, UNL_LG25 }, // Moero TwinBee FDS conversion
|
||||
// 558 some games on YC-03-09 board (related to mappers 162-164)
|
||||
|
@ -42,6 +42,7 @@ static const nes_pcb pcb_list[] =
|
||||
{ "pal_zz", PAL_ZZ },
|
||||
{ "nes_qj", NES_QJ },
|
||||
{ "nes_event", STD_EVENT },
|
||||
{ "nes_event2", STD_EVENT2 },
|
||||
{ "discrete_74x139", DIS_74X139X74 },
|
||||
{ "discrete_74x377", DIS_74X377 },
|
||||
{ "discrete_74x161", DIS_74X161X161X32 },
|
||||
|
@ -26,7 +26,7 @@ enum
|
||||
STD_SXROM, STD_SOROM, STD_SZROM,
|
||||
STD_TXROM, STD_TXSROM, STD_TKROM, STD_TQROM,
|
||||
STD_UXROM, STD_UN1ROM, UXROM_CC,
|
||||
HVC_FAMBASIC, NES_QJ, PAL_ZZ, STD_EVENT,
|
||||
HVC_FAMBASIC, NES_QJ, PAL_ZZ, STD_EVENT, STD_EVENT2,
|
||||
STD_DISKSYS,
|
||||
STD_NROM368,//homebrew extension of NROM!
|
||||
// Discrete components boards (by various manufacturer)
|
||||
|
Loading…
Reference in New Issue
Block a user