summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2021-08-12 09:05:41 -0800
committer GitHub <noreply@github.com>2021-08-13 03:05:41 +1000
commit4131373f0a910e30cac4a24ae574b0f2ddb02b45 (patch)
tree0719d47d32fa04dc3b47eab8e30a8df9d9cedbf6
parent3e714f3de19e0cb314eaa82f5f473e9c8b30d191 (diff)
bus/nes: Miscellaneous minor multicart fixes, mostly. (#8291)
* pengseal: Fixed company and title screen graphics. * dongdong: Added device for this unique board (should have been marked not working.) * mc_sg20: Fixed graphics fixed in all games, no longer randomly resets to Bomberman mid-game in Hogan's Alley. * mc_190: Refactored code - this is the same as mc_sg20 with a mirroring bit. * mc_1994: Corrected banking code - all games work now. * mc_4ck1: Runs now, although Contra has some incorrect tiling issues; added jumper setting. * mc_6m23: Fixed graphics in all games (light gun still not working due to non-bus issues). * magicdrg: Fixed background tiling. Software list items promoted to working --------------------------------------- 1994 Super HIK 14 in 1 (G-136) 4 in 1 1993 (CK-001) 4 in 1 1993 (CK-001, Alt)
-rw-r--r--hash/nes.xml69
-rw-r--r--src/devices/bus/nes/multigame.cpp238
-rw-r--r--src/devices/bus/nes/multigame.h68
-rw-r--r--src/devices/bus/nes/nes_carts.cpp1
-rw-r--r--src/devices/bus/nes/nes_pcb.hxx1
-rw-r--r--src/devices/bus/nes/nes_slot.h20
-rw-r--r--src/devices/bus/nes/sachen.cpp35
-rw-r--r--src/devices/bus/nes/sachen.h13
-rw-r--r--src/mame/machine/nes.cpp67
9 files changed, 290 insertions, 222 deletions
diff --git a/hash/nes.xml b/hash/nes.xml
index 676dae3b019..bad37cc718e 100644
--- a/hash/nes.xml
+++ b/hash/nes.xml
@@ -52820,14 +52820,16 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</part>
</software>
- <!-- SA-002 is Penguin and Seal, and its dump coincide with the HES version -->
+ <!-- SA-002 is Penguin and Seal, and its dump coincides with the HES version, Arctic Adventure -->
<software name="pengseal">
<description>The Penguin &amp; Seal (Tw, Aus)</description>
- <year>19??</year>
+ <year>1989</year>
<publisher>Sachen ~ HES</publisher>
+ <info name="serial" value="SA-002"/>
<part name="cart" interface="nes_cart">
<feature name="slot" value="nrom" />
<feature name="pcb" value="NES-NROM-128" />
+ <feature name="mirroring" value="vertical" />
<dataarea name="chr" size="8192">
<rom name="penguin &amp; seal, the (asia, australia) (unl).chr" size="8192" crc="8213c68d" sha1="4a78f686ab8945b32cd32d8c1033bbeedcc24579" offset="00000" status="baddump" />
</dataarea>
@@ -52838,6 +52840,26 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</part>
</software>
+<!-- nointro -->
+ <software name="dongdong" cloneof="pengseal">
+ <description>Dong Dong Nao 1 (Tw)</description>
+ <year>1989</year>
+ <publisher>Sachen</publisher>
+ <info name="serial" value="SA-002"/>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="s3013" />
+ <feature name="pcb" value="SACHEN-3013" />
+ <feature name="mirroring" value="vertical" />
+ <dataarea name="chr" size="8192">
+ <rom name="dong dong no 1 (asia) (unl).chr" size="8192" crc="6bd749f5" sha1="25c2c8ed044c0b282ef3a6555baab76e380f0fac" offset="00000" status="baddump" />
+ </dataarea>
+ <dataarea name="prg" size="32768">
+ <rom name="dong dong no 1 (asia) (unl).prg" size="16384" crc="e732a4bc" sha1="af9cb94b091405bb432019bff2ab4c4179316030" offset="00000" status="baddump" />
+ <rom size="16384" offset="0x4000" loadflag="reload" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="dongdng2">
<description>Middle School English - Dong Dong Nao II (Tw)</description>
<!-- check title: Dong Dong Nao Ii - Guo Zhong Ying Wen in GoodNES, Middle School English - Dong Dong Nao - Guo Zhong Ying Wen in TOSEC -->
@@ -53448,25 +53470,6 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</part>
</software>
-<!-- nointro -->
- <software name="dongdong" supported="partial">
- <description>Dong Dong Nao 1 (Tw)</description>
- <year>19??</year>
- <publisher>Sachen</publisher>
- <part name="cart" interface="nes_cart">
- <feature name="slot" value="nrom" />
- <feature name="pcb" value="NES-NROM-128" />
- <feature name="mirroring" value="horizontal" />
- <dataarea name="chr" size="8192">
- <rom name="dong dong no 1 (asia) (unl).chr" size="8192" crc="6bd749f5" sha1="25c2c8ed044c0b282ef3a6555baab76e380f0fac" offset="00000" status="baddump" />
- </dataarea>
- <dataarea name="prg" size="32768">
- <rom name="dong dong no 1 (asia) (unl).prg" size="16384" crc="e732a4bc" sha1="af9cb94b091405bb432019bff2ab4c4179316030" offset="00000" status="baddump" />
- <rom size="16384" offset="0x4000" loadflag="reload" />
- </dataarea>
- </part>
- </software>
-
<!-- NTDEC / Gluk Video (the latter company being a Spanish importer?) -->
@@ -65666,6 +65669,7 @@ All musics were removed in this game.
<part name="cart" interface="nes_cart">
<feature name="slot" value="magicseries" />
<feature name="pcb" value="MAGICSERIES" />
+ <feature name="mirroring" value="vertical" />
<dataarea name="chr" size="65536">
<rom name="magic dragon (unl).chr" size="65536" crc="4937921d" sha1="bf9b79c09fcf821a27090394a8c3f1de0ac0584c" offset="00000" status="baddump" />
</dataarea>
@@ -78154,12 +78158,13 @@ be better to redump them properly. -->
</software>
<software name="mc_190">
- <description>190 in 1</description>
+ <description>Golden 190 in 1</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_190in1" />
<feature name="pcb" value="BMC-190IN1" />
+ <feature name="peripheral" value="zapper" />
<dataarea name="chr" size="65536">
<rom name="190-in-1 [p1][u].chr" size="65536" crc="d94022fb" sha1="2f1e7ebbf748991dd468f591c793f3916325b25c" offset="00000" status="baddump" />
</dataarea>
@@ -78169,7 +78174,7 @@ be better to redump them properly. -->
</part>
</software>
- <software name="mc_1994" supported="no">
+ <software name="mc_1994">
<description>1994 Super HIK 14 in 1 (G-136)</description>
<year>19??</year>
<publisher>&lt;pirate&gt;</publisher>
@@ -79344,7 +79349,7 @@ be better to redump them properly. -->
</software>
<!-- The UNIF file contained separate PRG banks -->
- <software name="mc_4ck1" supported="no">
+ <software name="mc_4ck1" supported="partial">
<description>4 in 1 1993 (CK-001)</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
@@ -79362,15 +79367,11 @@ be better to redump them properly. -->
<!-- 8k VRAM on cartridge -->
<dataarea name="vram" size="8192">
</dataarea>
- <dipswitch name="Menu type" tag="DSW" mask="1">
- <dipvalue name="4-in-1" value="0" default="yes"/>
- <dipvalue name="20-in-1" value="1"/>
- </dipswitch>
</part>
</software>
<!-- Is this really from a single-chip cart? or the dumping tools have merged the PRG contents? -->
- <software name="mc_4ck1a" cloneof="mc_4ck1" supported="no">
+ <software name="mc_4ck1a" cloneof="mc_4ck1" supported="partial">
<description>4 in 1 1993 (CK-001, Alt)</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
@@ -79891,13 +79892,14 @@ be better to redump them properly. -->
</part>
</software>
- <software name="mc_6m23" supported="no">
+ <software name="mc_6m23" supported="partial">
<description>6 in 1 (MGC-023)</description>
- <year>19??</year>
- <publisher>&lt;unknown&gt;</publisher>
+ <year>1993</year>
+ <publisher>TXC Corp</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_11160" />
<feature name="pcb" value="BMC-11160" />
+ <feature name="peripheral" value="zapper" />
<dataarea name="chr" size="131072">
<rom name="6-in-1 (mgc-023)[u].chr" size="131072" crc="9660700e" sha1="68181b5f172aed2fa9ab8799cf15755d3157be53" offset="00000" status="baddump" />
</dataarea>
@@ -81620,13 +81622,14 @@ to check why this is different -->
</part>
</software>
- <software name="mc_sg20" supported="partial">
+ <software name="mc_sg20">
<description>Super Gun 20 in 1</description>
<year>19??</year>
<publisher>&lt;pirate&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="sgun20in1" />
<feature name="pcb" value="BMC-SUPERGUN-20IN1" />
+ <feature name="peripheral" value="zapper" />
<dataarea name="chr" size="32768">
<rom name="super gun 20-in-1 [p1].chr" size="32768" crc="2d5d160c" sha1="887efc66eca7af81b11c94874d15add6c156da09" offset="00000" status="baddump" />
</dataarea>
diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp
index 02bac0698bc..f23db61b64f 100644
--- a/src/devices/bus/nes/multigame.cpp
+++ b/src/devices/bus/nes/multigame.cpp
@@ -87,6 +87,29 @@ DEFINE_DEVICE_TYPE(NES_BMC_42IN1RESET, nes_bmc_42in1reset_device, "nes_bmc_42in1
DEFINE_DEVICE_TYPE(NES_BMC_LC160, nes_bmc_lc160_device, "nes_bmc_lc160", "NES Cart BMC Little Com 160 PCB")
+INPUT_PORTS_START( bmc_8157 )
+ PORT_START("JUMPER")
+ PORT_CONFNAME( 0x01, 0x01, "Menu Type" )
+ PORT_CONFSETTING( 0x00, "20-in-1" )
+ PORT_CONFSETTING( 0x01, "4-in-1" )
+INPUT_PORTS_END
+
+
+//-------------------------------------------------
+// input_ports - device-specific input ports
+//-------------------------------------------------
+
+ioport_constructor nes_bmc_8157_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( bmc_8157 );
+}
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
nes_action52_device::nes_action52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_ACTION52, tag, owner, clock)
{
@@ -147,8 +170,18 @@ nes_studyngame_device::nes_studyngame_device(const machine_config &mconfig, cons
{
}
-nes_sgun20in1_device::nes_sgun20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : nes_nrom_device(mconfig, NES_SUPERGUN20IN1, tag, owner, clock)
+nes_sgun20in1_device::nes_sgun20in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+ : nes_nrom_device(mconfig, type, tag, owner, clock)
+{
+}
+
+nes_sgun20in1_device::nes_sgun20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_sgun20in1_device(mconfig, NES_SUPERGUN20IN1, tag, owner, clock)
+{
+}
+
+nes_bmc_190in1_device::nes_bmc_190in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_sgun20in1_device(mconfig, NES_BMC_190IN1, tag, owner, clock)
{
}
@@ -217,12 +250,12 @@ nes_bmc_ws_device::nes_bmc_ws_device(const machine_config &mconfig, const char *
{
}
-nes_bmc_11160_device::nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+nes_bmc_11160_device::nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_11160, tag, owner, clock)
{
}
-nes_bmc_g146_device::nes_bmc_g146_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+nes_bmc_g146_device::nes_bmc_g146_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_G146, tag, owner, clock)
{
}
@@ -232,8 +265,10 @@ nes_bmc_2751_device::nes_bmc_2751_device(const machine_config &mconfig, const ch
{
}
-nes_bmc_8157_device::nes_bmc_8157_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+nes_bmc_8157_device::nes_bmc_8157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_8157, tag, owner, clock)
+ , m_jumper(*this, "JUMPER")
+ , m_latch(0)
{
}
@@ -322,11 +357,6 @@ nes_bmc_150in1_device::nes_bmc_150in1_device(const machine_config &mconfig, cons
{
}
-nes_bmc_190in1_device::nes_bmc_190in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : nes_nrom_device(mconfig, NES_BMC_190IN1, tag, owner, clock)
-{
-}
-
nes_bmc_800in1_device::nes_bmc_800in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_BMC_800IN1, tag, owner, clock), m_mode(0)
{
@@ -557,17 +587,12 @@ void nes_studyngame_device::pcb_reset()
chr8(0, m_chr_source);
}
-void nes_sgun20in1_device::device_start()
-{
- common_start();
-}
-
void nes_sgun20in1_device::pcb_reset()
{
- m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg16_89ab(0);
prg16_cdef(0);
- chr8(0, m_chr_source);
+ chr8(0, CHRROM);
+ set_nt_mirroring(PPU_MIRROR_VERT);
}
void nes_vt5201_device::device_start()
@@ -721,30 +746,6 @@ void nes_bmc_ws_device::pcb_reset()
m_latch = 0;
}
-void nes_bmc_11160_device::device_start()
-{
- common_start();
-}
-
-void nes_bmc_11160_device::pcb_reset()
-{
- m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
- prg32(0);
- chr8(0, m_chr_source);
-}
-
-void nes_bmc_g146_device::device_start()
-{
- common_start();
-}
-
-void nes_bmc_g146_device::pcb_reset()
-{
- m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
- prg32(0);
- chr8(0, m_chr_source);
-}
-
void nes_bmc_2751_device::pcb_start(running_machine &machine, u8 *ciram_ptr, bool cart_mounted)
{
device_nes_cart_interface::pcb_start(machine, ciram_ptr, cart_mounted);
@@ -761,13 +762,16 @@ void nes_bmc_2751_device::pcb_reset()
void nes_bmc_8157_device::device_start()
{
common_start();
+ save_item(NAME(m_latch));
}
void nes_bmc_8157_device::pcb_reset()
{
- m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
- prg32(0);
- chr8(0, m_chr_source);
+ prg16_89ab(0);
+ prg16_cdef(0);
+ chr8(0, CHRRAM);
+
+ m_latch = 0;
}
void nes_bmc_hik300_device::device_start()
@@ -992,19 +996,6 @@ void nes_bmc_150in1_device::pcb_reset()
chr8(0, m_chr_source);
}
-void nes_bmc_190in1_device::device_start()
-{
- common_start();
-}
-
-void nes_bmc_190in1_device::pcb_reset()
-{
- m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
- prg16_89ab(0);
- prg16_cdef(0);
- chr8(0, m_chr_source);
-}
-
void nes_bmc_800in1_device::device_start()
{
common_start();
@@ -1529,24 +1520,39 @@ void nes_studyngame_device::write_h(offs_t offset, uint8_t data)
/*-------------------------------------------------
- BMC-SUPERGUN-20IN1
+ Boards BMC-SUPERGUN-20IN1, BMC-190IN1
- Unknown Bootleg Multigame Board
- Games: Super Gun 20 in 1
+ Unknown Bootleg Multigame Boards
+ Games: Super Gun 20 in 1, Golden 190 in 1
iNES: mapper 214
+ NES 2.0: mapper 300
- In MESS: Supported.
+ In MAME: Supported.
-------------------------------------------------*/
-void nes_sgun20in1_device::write_h(offs_t offset, uint8_t data)
+void nes_sgun20in1_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("supergun20in1 write_h, offset: %04x, data: %02x\n", offset, data));
- prg16_89ab(offset >> 2);
- prg16_cdef(offset >> 2);
- chr8(offset, CHRROM);
+// Hogan's Alley in 20-in-1 will occasionally sweep through 0x66xx-0x68xx which
+// causes an abrupt goto Bomberman title screen. This mask is a best guess.
+ switch (offset & 0x7000)
+ {
+ case 0x0000:
+ case 0x7000:
+ offset = (offset >> 2) & (m_prg_mask >> 1);
+ prg16_89ab(offset);
+ prg16_cdef(offset);
+ chr8(offset, CHRROM);
+ }
+}
+
+void nes_bmc_190in1_device::write_h(offs_t offset, u8 data)
+{
+ nes_sgun20in1_device::write_h(offset, data);
+ set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
}
/*-------------------------------------------------
@@ -1946,21 +1952,23 @@ void nes_bmc_ws_device::write_m(offs_t offset, uint8_t data)
/*-------------------------------------------------
- Board BMC-11160 (by TXC?)
+ Board BMC-11160 by TXC
Games: 6 in 1 (MGC-023)
- In MESS: Partially Supported
+ NES 2.0: mapper 299
+
+ In MAME: Partially supported. (Light gun hit detection is broken)
-------------------------------------------------*/
-void nes_bmc_11160_device::write_h(offs_t offset, uint8_t data)
+void nes_bmc_11160_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_11160 write_h, offset: %04x, data: %02x\n", offset, data));
- prg32((data & 0x70) >> 4);
- chr8(((data & 0x70) >> 2) | (data & 3), m_chr_source);
- set_nt_mirroring(BIT(data, 7) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
+ prg32((data & 0x30) >> 4);
+ chr8(((data & 0x30) >> 2) | (data & 0x03), CHRROM);
+ set_nt_mirroring(BIT(data, 7) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ);
}
/*-------------------------------------------------
@@ -1969,31 +1977,29 @@ void nes_bmc_11160_device::write_h(offs_t offset, uint8_t data)
Games: 1994 Super HIK 14 in 1 (G-136)
- In MESS: Partially Supported
+ NES 2.0: mapper 349
+
+ In MAME: Supported.
-------------------------------------------------*/
-void nes_bmc_g146_device::write_h(offs_t offset, uint8_t data)
+void nes_bmc_g146_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_g146 write_h, offset: %04x, data: %02x\n", offset, data));
- if (offset & 0x800)
- {
- // UNROM mode
- int helper = offset & BIT(offset, 6);
- prg16_89ab((offset & 0x1f) | helper);
- prg16_cdef((offset & 0x18) | 7);
- }
- else if (offset & 0x40)
+ u8 prg_lo = offset & 0x1f;
+ u8 prg_hi = prg_lo; // default: NROM-128 mode
+ if (BIT(offset, 11))
+ prg_hi |= 0x07; // UNROM mode
+ else if (!BIT(offset, 6))
{
- // 16KB mode
- prg16_89ab(offset & 0x1f);
- prg16_cdef(offset & 0x1f);
+ prg_lo &= ~0x01; // NROM-256 mode
+ prg_hi |= 0x01;
}
- else
- prg32((offset & 0x1f) >> 4);
+ prg16_89ab(prg_lo);
+ prg16_cdef(prg_hi);
- set_nt_mirroring(!BIT(offset, 7) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
+ set_nt_mirroring(BIT(offset, 7) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
}
/*-------------------------------------------------
@@ -2025,35 +2031,41 @@ void nes_bmc_2751_device::write_h(offs_t offset, u8 data)
Games: 4 in 1 1993 (CK-001)
- In MESS: Partially Supported
+ NES 2.0: mapper 301
+
+ In MAME: Preliminary supported.
+
+ TODO: Determine the cause of Contra graphics glitches.
+ Is NesDev description of board wrong? It seems b9 = 1
+ and b7 = 0 always? Also couldn't see evidence of the
+ mirroring bit being used.
-------------------------------------------------*/
-void nes_bmc_8157_device::write_h(offs_t offset, uint8_t data)
+void nes_bmc_8157_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_8157 write_h, offset: %04x, data: %02x\n", offset, data));
- prg16_89ab((offset >> 2) & 0x1f);
- if (offset & 0x200)
- prg16_cdef(offset & 0x1f);
- else
- prg16_cdef((offset & 0x18) | 7);
+ u8 bank = (offset >> 2) & 0x1f;
+ prg16_89ab(bank);
+ if (BIT(offset, 9))
+ bank |= 0x07;
+ else if (BIT(offset, 7))
+ bank &= ~0x07;
+ prg16_cdef(bank);
- set_nt_mirroring(!BIT(offset, 1) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
+ m_latch = BIT(offset, 8);
+ set_nt_mirroring(BIT(offset, 1) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
}
-uint8_t nes_bmc_8157_device::read_h(offs_t offset)
+u8 nes_bmc_8157_device::read_h(offs_t offset)
{
LOG_MMC(("bmc_8157 read_h, offset: %04x\n", offset));
- // m_dipsetting = ioport("CARTDIPS")->read();
-
-// uint8_t val = hi_access_rom(offset);
-// return val | m_noise; // the first write_h sets m_noise=0xff or 0 depending on dsw
-
+ if (m_latch)
+ offset = (offset & ~0x01) | m_jumper->read();
return hi_access_rom(offset);
}
-
/*-------------------------------------------------
BMC-SUPERHIK_300IN1
@@ -2611,28 +2623,6 @@ void nes_bmc_150in1_device::write_h(offs_t offset, uint8_t data)
set_nt_mirroring(BIT(offset, 0) ? PPU_MIRROR_HORZ: PPU_MIRROR_VERT);
}
-
-/*-------------------------------------------------
-
- Board BMC-190IN1
-
- Games: 190-in-1
-
- In MESS: Supported
-
- -------------------------------------------------*/
-
-void nes_bmc_190in1_device::write_h(offs_t offset, uint8_t data)
-{
- LOG_MMC(("bmc190in1 write_h, offset: %04x, data: %02x\n", offset, data));
-
- set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
- offset >>= 2;
- prg16_89ab(offset);
- prg16_cdef(offset);
- chr8(offset, CHRROM);
-}
-
/*-------------------------------------------------
BMC-800IN1
diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h
index b6d8fe3c5b6..8add9505737 100644
--- a/src/devices/bus/nes/multigame.h
+++ b/src/devices/bus/nes/multigame.h
@@ -258,15 +258,26 @@ class nes_sgun20in1_device : public nes_nrom_device
{
public:
// construction/destruction
- nes_sgun20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ nes_sgun20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- virtual void write_h(offs_t offset, uint8_t data) override;
+ virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
protected:
- // device-level overrides
- virtual void device_start() override;
+ nes_sgun20in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+};
+
+
+// ======================> nes_bmc_190in1_device
+
+class nes_bmc_190in1_device : public nes_sgun20in1_device
+{
+public:
+ // construction/destruction
+ nes_bmc_190in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+ virtual void write_h(offs_t offset, u8 data) override;
};
@@ -511,15 +522,9 @@ class nes_bmc_11160_device : public nes_nrom_device
{
public:
// construction/destruction
- nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
- virtual void write_h(offs_t offset, uint8_t data) override;
+ nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- virtual void pcb_reset() override;
-
-protected:
- // device-level overrides
- virtual void device_start() override;
+ virtual void write_h(offs_t offset, u8 data) override;
};
@@ -529,15 +534,9 @@ class nes_bmc_g146_device : public nes_nrom_device
{
public:
// construction/destruction
- nes_bmc_g146_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
- virtual void write_h(offs_t offset, uint8_t data) override;
-
- virtual void pcb_reset() override;
+ nes_bmc_g146_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
-protected:
- // device-level overrides
- virtual void device_start() override;
+ virtual void write_h(offs_t offset, u8 data) override;
};
@@ -562,16 +561,21 @@ class nes_bmc_8157_device : public nes_nrom_device
{
public:
// construction/destruction
- nes_bmc_8157_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ nes_bmc_8157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- virtual uint8_t read_h(offs_t offset) override;
- virtual void write_h(offs_t offset, uint8_t data) override;
+ virtual u8 read_h(offs_t offset) override;
+ virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
+ virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
+
+private:
+ required_ioport m_jumper;
+ u8 m_latch;
};
@@ -898,24 +902,6 @@ protected:
};
-// ======================> nes_bmc_190in1_device
-
-class nes_bmc_190in1_device : public nes_nrom_device
-{
-public:
- // construction/destruction
- nes_bmc_190in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
- virtual void write_h(offs_t offset, uint8_t data) override;
-
- virtual void pcb_reset() override;
-
-protected:
- // device-level overrides
- virtual void device_start() override;
-};
-
-
// ======================> nes_bmc_800in1_device
class nes_bmc_800in1_device : public nes_nrom_device
diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp
index 98a4a8cf49b..b9e124f470f 100644
--- a/src/devices/bus/nes/nes_carts.cpp
+++ b/src/devices/bus/nes/nes_carts.cpp
@@ -206,6 +206,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("sa72007", NES_SACHEN_SA72007);
device.option_add_internal("sa72008", NES_SACHEN_SA72008);
device.option_add_internal("tca01", NES_SACHEN_TCA01);
+ device.option_add_internal("s3013", NES_SACHEN_3013);
device.option_add_internal("s8259a", NES_SACHEN_8259A);
device.option_add_internal("s8259b", NES_SACHEN_8259B);
device.option_add_internal("s8259c", NES_SACHEN_8259C);
diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx
index 9e9066e3312..5aa7b84315c 100644
--- a/src/devices/bus/nes/nes_pcb.hxx
+++ b/src/devices/bus/nes/nes_pcb.hxx
@@ -117,6 +117,7 @@ static const nes_pcb pcb_list[] =
{ "sa72007", SACHEN_SA72007 },
{ "sa72008", SACHEN_SA72008 },
{ "tca01", SACHEN_TCA01 },
+ { "s3013", SACHEN_3013 },
{ "s8259a", SACHEN_8259A },
{ "s8259b", SACHEN_8259B },
{ "s8259c", SACHEN_8259C },
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index 8652e0e82fc..58874cf2464 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -64,25 +64,25 @@ enum
/* Namcot */
NAMCOT_163, NAMCOT_175, NAMCOT_340,
NAMCOT_3425, NAMCOT_34X3, NAMCOT_3446,
- /* NTDEC */
+ // NTDEC
NTDEC_ASDER, NTDEC_FIGHTINGHERO, NTDEC_N715021,
- /* Rex Soft */
+ // Rex Soft
REXSOFT_SL1632, REXSOFT_DBZ5,
- /* Sachen */
+ // Sachen
SACHEN_8259A, SACHEN_8259B, SACHEN_8259C, SACHEN_8259D,
SACHEN_SA009, SACHEN_SA0036, SACHEN_SA0037,
- SACHEN_SA72007, SACHEN_SA72008, SACHEN_TCA01,
- SACHEN_TCU01, SACHEN_TCU02, SACHEN_SA9602B,
+ SACHEN_SA72007, SACHEN_SA72008, SACHEN_SA9602B,
+ SACHEN_TCA01, SACHEN_TCU01, SACHEN_TCU02, SACHEN_3013,
SACHEN_74LS374, SACHEN_74LS374_ALT, SACHEN_SHERO,
- /* Sunsoft */
+ // Sunsoft
SUNSOFT_1, SUNSOFT_2, SUNSOFT_3, SUNSOFT_4,
SUNSOFT_DCS, SUNSOFT_5, SUNSOFT_FME7,
- /* Taito */
+ // Taito
TAITO_TC0190FMC, TAITO_TC0190FMCP,
TAITO_X1_005, TAITO_X1_017,
- /* Tengen */
+ // Tengen
TENGEN_800008, TENGEN_800032, TENGEN_800037,
- /* TXC */
+ // TXC
TXC_22211, TXC_DUMARACING, TXC_MJBLOCK,
TXC_COMMANDOS, TXC_TW, TXC_STRIKEW,
// Multigame Carts
@@ -99,7 +99,7 @@ enum
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_841101C,
- BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_CH001, BMC_SUPER22,
+ BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_SUPER22,
BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, BMC_LITTLECOM160,
BMC_CTC09, BMC_K3006, BMC_K3036, BMC_K3046, BMC_SA005A, BMC_TJ03,
// Unlicensed
diff --git a/src/devices/bus/nes/sachen.cpp b/src/devices/bus/nes/sachen.cpp
index 0622bfec8d4..f30dd2529b2 100644
--- a/src/devices/bus/nes/sachen.cpp
+++ b/src/devices/bus/nes/sachen.cpp
@@ -16,6 +16,7 @@
* Sachen TCA-01 [mapper 143]
* Sachen TCU-01 [mapper 147]
* Sachen TCU-02 [mapper 136]
+ * Sachen 3013 [mapper 553]
* Sachen Discrete PCBs [mapper 150 & 243]
* Sachen 8259 [mapper 141 (A), 138 (B), 139 (C), 137 (D)]
@@ -52,6 +53,7 @@ DEFINE_DEVICE_TYPE(NES_SACHEN_SA72008, nes_sachen_sa72008_device, "nes_sa7
DEFINE_DEVICE_TYPE(NES_SACHEN_TCA01, nes_sachen_tca01_device, "nes_tca01", "NES Cart Sachen TCA-01 PCB")
DEFINE_DEVICE_TYPE(NES_SACHEN_TCU01, nes_sachen_tcu01_device, "nes_tcu01", "NES Cart Sachen TCU-01 PCB")
DEFINE_DEVICE_TYPE(NES_SACHEN_TCU02, nes_sachen_tcu02_device, "nes_tcu02", "NES Cart Sachen TCU-02 PCB")
+DEFINE_DEVICE_TYPE(NES_SACHEN_3013, nes_sachen_3013_device, "nes_3013", "NES Cart Sachen 3013 PCB")
DEFINE_DEVICE_TYPE(NES_SACHEN_74X374, nes_sachen_74x374_device, "nes_s74x374", "NES Cart Sachen 74*374 PCB")
DEFINE_DEVICE_TYPE(NES_SACHEN_74X374_ALT, nes_sachen_74x374_alt_device, "nes_s74x374a", "NES Cart Sachen 74*374 Alt PCB")
DEFINE_DEVICE_TYPE(NES_SACHEN_8259A, nes_sachen_8259a_device, "nes_s8259a", "NES Cart Sachen 8259A PCB")
@@ -100,6 +102,11 @@ nes_sachen_tcu02_device::nes_sachen_tcu02_device(const machine_config &mconfig,
{
}
+nes_sachen_3013_device::nes_sachen_3013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_nrom_device(mconfig, NES_SACHEN_3013, tag, owner, clock)
+{
+}
+
nes_sachen_74x374_device::nes_sachen_74x374_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_mmc_vrom_bank(0)
{
@@ -402,11 +409,11 @@ void nes_sachen_sa72008_device::write_l(offs_t offset, uint8_t data)
Sachen TCA-01 bootleg boards
- iNES: mapper 143
-
Games: Dancing Blocks, Magic Mathematic
- In MESS: Supported.
+ iNES: mapper 143
+
+ In MAME: Supported.
-------------------------------------------------*/
@@ -479,6 +486,28 @@ uint8_t nes_sachen_tcu02_device::read_l(offs_t offset)
/*-------------------------------------------------
+ Sachen 3013 board
+
+ Games: Dong Dong Nao 1
+
+ This discrete board basically behaves like standard
+ NROM-128 (mapper 0) but has circuitry so that the
+ lower half of PRG reads as a constant instead of as
+ a mirror of the upper half.
+
+ NES 2.0: mapper 553
+
+ In MAME: Supported.
+
+ -------------------------------------------------*/
+
+u8 nes_sachen_3013_device::read_h(offs_t offset)
+{
+ return (offset < 0x4000) ? 0x3a : hi_access_rom(offset);
+}
+
+/*-------------------------------------------------
+
Sachen 74x374 bootleg boards
Games: Chess Academy, Chinese Checkers Jpn, Mahjong Academy,
diff --git a/src/devices/bus/nes/sachen.h b/src/devices/bus/nes/sachen.h
index b23599345b3..3c73bcd23be 100644
--- a/src/devices/bus/nes/sachen.h
+++ b/src/devices/bus/nes/sachen.h
@@ -158,6 +158,18 @@ private:
};
+// ======================> nes_sachen_3013_device
+
+class nes_sachen_3013_device : public nes_nrom_device
+{
+public:
+ // construction/destruction
+ nes_sachen_3013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+ virtual u8 read_h(offs_t offset) override;
+};
+
+
// ======================> nes_sachen_74x374_device
class nes_sachen_74x374_device : public nes_nrom_device
@@ -270,6 +282,7 @@ DECLARE_DEVICE_TYPE(NES_SACHEN_SA72008, nes_sachen_sa72008_device)
DECLARE_DEVICE_TYPE(NES_SACHEN_TCA01, nes_sachen_tca01_device)
DECLARE_DEVICE_TYPE(NES_SACHEN_TCU01, nes_sachen_tcu01_device)
DECLARE_DEVICE_TYPE(NES_SACHEN_TCU02, nes_sachen_tcu02_device)
+DECLARE_DEVICE_TYPE(NES_SACHEN_3013, nes_sachen_3013_device)
DECLARE_DEVICE_TYPE(NES_SACHEN_74X374, nes_sachen_74x374_device)
DECLARE_DEVICE_TYPE(NES_SACHEN_74X374_ALT, nes_sachen_74x374_alt_device)
DECLARE_DEVICE_TYPE(NES_SACHEN_8259A, nes_sachen_8259a_device)
diff --git a/src/mame/machine/nes.cpp b/src/mame/machine/nes.cpp
index 8c7d8287d0a..2393557500b 100644
--- a/src/mame/machine/nes.cpp
+++ b/src/mame/machine/nes.cpp
@@ -70,28 +70,73 @@ void nes_state::machine_start()
m_ppu->set_latch(*m_cartslot->m_cart, FUNC(device_nes_cart_interface::ppu_latch));
// install additional handlers (read_h, read_ex, write_ex)
- if (m_cartslot->get_pcb_id() == STD_EXROM || m_cartslot->get_pcb_id() == STD_NROM368 || m_cartslot->get_pcb_id() == STD_DISKSYS
- || m_cartslot->get_pcb_id() == GG_NROM || m_cartslot->get_pcb_id() == CAMERICA_ALADDIN || m_cartslot->get_pcb_id() == SUNSOFT_DCS
- || m_cartslot->get_pcb_id() == BANDAI_DATACH || m_cartslot->get_pcb_id() == BANDAI_KARAOKE || m_cartslot->get_pcb_id() == UNL_2A03PURITANS || m_cartslot->get_pcb_id() == AVE_MAXI15 || m_cartslot->get_pcb_id() == BTL_PALTHENA
- || m_cartslot->get_pcb_id() == KAISER_KS7010 || m_cartslot->get_pcb_id() == KAISER_KS7022 || m_cartslot->get_pcb_id() == KAISER_KS7030 || m_cartslot->get_pcb_id() == KAISER_KS7031 || m_cartslot->get_pcb_id() == KAISER_KS7037 || m_cartslot->get_pcb_id() == KAISER_KS7057 || m_cartslot->get_pcb_id() == BMC_VT5201
- || m_cartslot->get_pcb_id() == UNL_LH32 || m_cartslot->get_pcb_id() == UNL_LH10 || m_cartslot->get_pcb_id() == UNL_2708 || m_cartslot->get_pcb_id() == UNL_RT01
- || m_cartslot->get_pcb_id() == UNL_43272 || m_cartslot->get_pcb_id() == UNL_EH8813A || m_cartslot->get_pcb_id() == BMC_G63IN1 || m_cartslot->get_pcb_id() == BMC_8157
- || m_cartslot->get_pcb_id() == BMC_GOLD150 || m_cartslot->get_pcb_id() == BMC_CH001
- || m_cartslot->get_pcb_id() == BMC_70IN1 || m_cartslot->get_pcb_id() == BMC_800IN1)
+ static const int r_h_pcbs[] =
+ {
+ AVE_MAXI15,
+ BANDAI_DATACH,
+ BANDAI_KARAOKE,
+ BMC_70IN1,
+ BMC_800IN1,
+ BMC_8157,
+ BMC_G63IN1,
+ BMC_GOLD150,
+ BMC_VT5201,
+ BTL_PALTHENA,
+ CAMERICA_ALADDIN,
+ GG_NROM,
+ KAISER_KS7010,
+ KAISER_KS7022,
+ KAISER_KS7030,
+ KAISER_KS7031,
+ KAISER_KS7037,
+ KAISER_KS7057,
+ SACHEN_3013,
+ STD_DISKSYS,
+ STD_EXROM,
+ STD_NROM368,
+ SUNSOFT_DCS,
+ UNL_2708,
+ UNL_2A03PURITANS,
+ UNL_43272,
+ UNL_EH8813A,
+ UNL_LH10,
+ UNL_LH32,
+ UNL_RT01
+ };
+
+ static const int w_ex_pcbs[] =
+ {
+ BTL_SMB2JB,
+ BTL_YUNG08,
+ UNL_AC08,
+ UNL_SMB2J
+ };
+
+ static const int rw_ex_pcbs[] =
+ {
+ BTL_09034A,
+ KAISER_KS7017,
+ STD_DISKSYS,
+ UNL_603_5052
+ };
+
+ int pcb_id = m_cartslot->get_pcb_id();
+
+ if (std::find(std::begin(r_h_pcbs), std::end(r_h_pcbs), pcb_id) != std::end(r_h_pcbs))
{
logerror("read_h installed!\n");
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() == BTL_YUNG08 || m_cartslot->get_pcb_id() == UNL_AC08 || m_cartslot->get_pcb_id() == UNL_SMB2J)
+ if (std::find(std::begin(w_ex_pcbs), std::end(w_ex_pcbs), pcb_id) != std::end(w_ex_pcbs))
{
logerror("write_ex installed!\n");
space.install_write_handler(0x4020, 0x40ff, write8sm_delegate(*m_cartslot, FUNC(nes_cart_slot_device::write_ex)));
}
- if (m_cartslot->get_pcb_id() == BTL_09034A || m_cartslot->get_pcb_id() == KAISER_KS7017 || m_cartslot->get_pcb_id() == UNL_603_5052 || m_cartslot->get_pcb_id() == STD_DISKSYS)
+ if (std::find(std::begin(rw_ex_pcbs), std::end(rw_ex_pcbs), pcb_id) != std::end(rw_ex_pcbs))
{
- logerror("write_ex & read_ex installed!\n");
+ logerror("read_ex & write_ex installed!\n");
space.install_read_handler(0x4020, 0x40ff, read8sm_delegate(*m_cartslot, FUNC(nes_cart_slot_device::read_ex)));
space.install_write_handler(0x4020, 0x40ff, write8sm_delegate(*m_cartslot, FUNC(nes_cart_slot_device::write_ex)));
}