mirror of
https://github.com/holub/mame
synced 2025-05-05 13:54:42 +03:00
arknoid2, plumppop, jpopnics: Use uPD4701 device (nw)
This commit is contained in:
parent
486071edce
commit
50ab64de8a
@ -862,7 +862,7 @@ static ADDRESS_MAP_START( jpopnics_sub_map, AS_PROGRAM, 8, jpopnics_state )
|
|||||||
AM_RANGE(0xd000, 0xdfff) AM_RAM
|
AM_RANGE(0xd000, 0xdfff) AM_RAM
|
||||||
AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1")
|
AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1")
|
||||||
|
|
||||||
AM_RANGE(0xf000, 0xf003) AM_READ(analog_r)
|
AM_RANGE(0xf000, 0xf003) AM_DEVREAD("upd4701", upd4701_device, read_xy)
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
/* RAM/ROM bank that maps at 0x8000-0xbfff on maincpu */
|
/* RAM/ROM bank that maps at 0x8000-0xbfff on maincpu */
|
||||||
@ -891,17 +891,6 @@ MACHINE_CONFIG_END
|
|||||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\
|
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||||
|
|
||||||
#define COMMON_COIN1(coinstate)\
|
|
||||||
PORT_START("COIN1")\
|
|
||||||
PORT_BIT( 0x01, coinstate, IPT_COIN1 )\
|
|
||||||
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )
|
|
||||||
|
|
||||||
#define COMMON_COIN2(coinstate)\
|
|
||||||
PORT_START("COIN2")\
|
|
||||||
PORT_BIT( 0x01, coinstate, IPT_COIN2 )\
|
|
||||||
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )
|
|
||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( plumppop )
|
static INPUT_PORTS_START( plumppop )
|
||||||
/* 0xb001 (CPU1) port 0 -> 0xef0e (shared RAM) */
|
/* 0xb001 (CPU1) port 0 -> 0xef0e (shared RAM) */
|
||||||
PORT_START("DSWA")
|
PORT_START("DSWA")
|
||||||
@ -961,14 +950,17 @@ static INPUT_PORTS_START( plumppop )
|
|||||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||||
|
|
||||||
COMMON_COIN1(IP_ACTIVE_HIGH)
|
PORT_START("COIN1")
|
||||||
COMMON_COIN2(IP_ACTIVE_HIGH)
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||||
|
|
||||||
|
PORT_START("COIN2")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||||
|
|
||||||
PORT_START("AN1") /* spinner 1 - read at f000/1 */
|
PORT_START("AN1") /* spinner 1 - read at f000/1 */
|
||||||
PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(1)
|
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_RESET
|
||||||
|
|
||||||
PORT_START("AN2") /* spinner 2 - read at f002/3 */
|
PORT_START("AN2") /* spinner 2 - read at f002/3 */
|
||||||
PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2)
|
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_RESET
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
@ -1003,8 +995,12 @@ static INPUT_PORTS_START( extrmatn )
|
|||||||
TAITO_JOY_LRUD_2_BUTTONS_START( 2 )
|
TAITO_JOY_LRUD_2_BUTTONS_START( 2 )
|
||||||
|
|
||||||
COMMON_IN2
|
COMMON_IN2
|
||||||
COMMON_COIN1(IP_ACTIVE_HIGH)
|
|
||||||
COMMON_COIN2(IP_ACTIVE_HIGH)
|
PORT_START("COIN1")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||||
|
|
||||||
|
PORT_START("COIN2")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
@ -1045,20 +1041,22 @@ static INPUT_PORTS_START( arknoid2 )
|
|||||||
PORT_START("IN1")
|
PORT_START("IN1")
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
COMMON_IN2
|
PORT_START("IN2")
|
||||||
COMMON_COIN1(IP_ACTIVE_HIGH)
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_WRITE_LINE_DEVICE_MEMBER("upd4701", upd4701_device, right_w)
|
||||||
COMMON_COIN2(IP_ACTIVE_HIGH)
|
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT )
|
||||||
|
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
|
PORT_START("COIN1")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_WRITE_LINE_DEVICE_MEMBER("upd4701", upd4701_device, left_w)
|
||||||
|
|
||||||
|
PORT_START("COIN2")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_WRITE_LINE_DEVICE_MEMBER("upd4701", upd4701_device, middle_w)
|
||||||
|
|
||||||
PORT_START("AN1") /* spinner 1 - read at f000/1 */
|
PORT_START("AN1") /* spinner 1 - read at f000/1 */
|
||||||
PORT_BIT ( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15)
|
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_RESET
|
||||||
PORT_BIT ( 0x1000, IP_ACTIVE_LOW, IPT_COIN2 ) /* Mirrored for service mode */
|
|
||||||
PORT_BIT ( 0x2000, IP_ACTIVE_HIGH, IPT_SERVICE1 ) /* Mirrored for service mode */
|
|
||||||
PORT_BIT ( 0x4000, IP_ACTIVE_LOW, IPT_COIN1 ) /* Mirrored for service mode */
|
|
||||||
PORT_BIT ( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
|
||||||
|
|
||||||
PORT_START("AN2") /* spinner 2 - read at f002/3 */
|
PORT_START("AN2") /* spinner 2 - read at f002/3 */
|
||||||
PORT_BIT ( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2)
|
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_RESET
|
||||||
PORT_BIT ( 0xf000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
static INPUT_PORTS_START( arknid2u )
|
static INPUT_PORTS_START( arknid2u )
|
||||||
@ -1098,8 +1096,12 @@ static INPUT_PORTS_START( drtoppel )
|
|||||||
TAITO_JOY_LRUD_2_BUTTONS_START( 2 )
|
TAITO_JOY_LRUD_2_BUTTONS_START( 2 )
|
||||||
|
|
||||||
COMMON_IN2
|
COMMON_IN2
|
||||||
COMMON_COIN1(IP_ACTIVE_HIGH)
|
|
||||||
COMMON_COIN2(IP_ACTIVE_HIGH)
|
PORT_START("COIN1")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||||
|
|
||||||
|
PORT_START("COIN2")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
static INPUT_PORTS_START( drtopplu )
|
static INPUT_PORTS_START( drtopplu )
|
||||||
@ -1182,8 +1184,12 @@ static INPUT_PORTS_START( chukatai )
|
|||||||
TAITO_JOY_LRUD_2_BUTTONS_START( 2 )
|
TAITO_JOY_LRUD_2_BUTTONS_START( 2 )
|
||||||
|
|
||||||
COMMON_IN2
|
COMMON_IN2
|
||||||
COMMON_COIN1(IP_ACTIVE_HIGH)
|
|
||||||
COMMON_COIN2(IP_ACTIVE_HIGH)
|
PORT_START("COIN1")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||||
|
|
||||||
|
PORT_START("COIN2")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
static INPUT_PORTS_START( chukatau )
|
static INPUT_PORTS_START( chukatau )
|
||||||
@ -1291,8 +1297,12 @@ static INPUT_PORTS_START( tnzsjo )
|
|||||||
TAITO_JOY_LRUD_2_BUTTONS_START( 2 )
|
TAITO_JOY_LRUD_2_BUTTONS_START( 2 )
|
||||||
|
|
||||||
COMMON_IN2
|
COMMON_IN2
|
||||||
COMMON_COIN1(IP_ACTIVE_LOW)
|
|
||||||
COMMON_COIN2(IP_ACTIVE_LOW)
|
PORT_START("COIN1")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
|
|
||||||
|
PORT_START("COIN2")
|
||||||
|
PORT_BIT( 1, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
static INPUT_PORTS_START( tnzsop )
|
static INPUT_PORTS_START( tnzsop )
|
||||||
@ -1458,17 +1468,11 @@ static INPUT_PORTS_START( jpopnics )
|
|||||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
|
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
|
|
||||||
PORT_START("COIN1")
|
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
|
||||||
|
|
||||||
PORT_START("COIN2")
|
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
|
||||||
|
|
||||||
PORT_START("AN1") /* spinner 1 - read at f000/1 */
|
PORT_START("AN1") /* spinner 1 - read at f000/1 */
|
||||||
PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(1)
|
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_RESET
|
||||||
|
|
||||||
PORT_START("AN2") /* spinner 2 - read at f002/3 */
|
PORT_START("AN2") /* spinner 2 - read at f002/3 */
|
||||||
PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2)
|
PORT_BIT( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_RESET
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
@ -1578,7 +1582,13 @@ static MACHINE_CONFIG_DERIVED( extrmatn, tnzs )
|
|||||||
MCFG_PALETTE_INIT_OWNER(tnzs_base_state, prompalette)
|
MCFG_PALETTE_INIT_OWNER(tnzs_base_state, prompalette)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
static MACHINE_CONFIG_DERIVED( arknoid2, extrmatn )
|
static MACHINE_CONFIG_DERIVED( plumppop, extrmatn )
|
||||||
|
MCFG_DEVICE_ADD("upd4701", UPD4701A, 0)
|
||||||
|
MCFG_UPD4701_PORTX("AN1")
|
||||||
|
MCFG_UPD4701_PORTY("AN2")
|
||||||
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
static MACHINE_CONFIG_DERIVED( arknoid2, plumppop )
|
||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_MODIFY("maincpu")
|
MCFG_CPU_MODIFY("maincpu")
|
||||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", arknoid2_state, mcu_interrupt)
|
MCFG_CPU_VBLANK_INT_DRIVER("screen", arknoid2_state, mcu_interrupt)
|
||||||
@ -1682,6 +1692,10 @@ static MACHINE_CONFIG_DERIVED( jpopnics, tnzs_base )
|
|||||||
MCFG_CPU_MODIFY("sub")
|
MCFG_CPU_MODIFY("sub")
|
||||||
MCFG_CPU_PROGRAM_MAP(jpopnics_sub_map)
|
MCFG_CPU_PROGRAM_MAP(jpopnics_sub_map)
|
||||||
|
|
||||||
|
MCFG_DEVICE_ADD("upd4701", UPD4701A, 0)
|
||||||
|
MCFG_UPD4701_PORTX("AN1")
|
||||||
|
MCFG_UPD4701_PORTY("AN2")
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_PALETTE_MODIFY("palette")
|
MCFG_PALETTE_MODIFY("palette")
|
||||||
MCFG_PALETTE_ENTRIES(1024)
|
MCFG_PALETTE_ENTRIES(1024)
|
||||||
@ -2774,7 +2788,7 @@ ROM_END
|
|||||||
|
|
||||||
|
|
||||||
// YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR,COMPANY,FULLNAME,FLAGS
|
// YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR,COMPANY,FULLNAME,FLAGS
|
||||||
GAME( 1987, plumppop, 0, extrmatn, plumppop, extrmatn_state, 0, ROT0, "Taito Corporation", "Plump Pop (Japan)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1987, plumppop, 0, plumppop, plumppop, extrmatn_state, 0, ROT0, "Taito Corporation", "Plump Pop (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1992, jpopnics, 0, jpopnics, jpopnics, jpopnics_state, 0, ROT0, "Nics", "Jumping Pop (Nics, Korean hack of Plump Pop)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
GAME( 1992, jpopnics, 0, jpopnics, jpopnics, jpopnics_state, 0, ROT0, "Nics", "Jumping Pop (Nics, Korean hack of Plump Pop)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||||
|
|
||||||
GAME( 1987, extrmatn, 0, extrmatn, extrmatn, extrmatn_state, 0, ROT270, "Taito Corporation Japan", "Extermination (World)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1987, extrmatn, 0, extrmatn, extrmatn, extrmatn_state, 0, ROT270, "Taito Corporation Japan", "Extermination (World)", MACHINE_SUPPORTS_SAVE )
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "cpu/mcs48/mcs48.h"
|
#include "cpu/mcs48/mcs48.h"
|
||||||
#include "machine/bankdev.h"
|
#include "machine/bankdev.h"
|
||||||
#include "machine/gen_latch.h"
|
#include "machine/gen_latch.h"
|
||||||
|
#include "machine/upd4701.h"
|
||||||
|
|
||||||
#define MAX_SAMPLES 0x2f /* max samples */
|
#define MAX_SAMPLES 0x2f /* max samples */
|
||||||
|
|
||||||
@ -26,8 +27,6 @@ public:
|
|||||||
, m_palette(*this, "palette")
|
, m_palette(*this, "palette")
|
||||||
, m_mainbank(*this, "mainbank")
|
, m_mainbank(*this, "mainbank")
|
||||||
, m_subbank(*this, "subbank")
|
, m_subbank(*this, "subbank")
|
||||||
, m_an1(*this, "AN1")
|
|
||||||
, m_an2(*this, "AN2")
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual void machine_start() override;
|
virtual void machine_start() override;
|
||||||
@ -39,8 +38,6 @@ public:
|
|||||||
uint32_t screen_update_tnzs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
uint32_t screen_update_tnzs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
DECLARE_WRITE_LINE_MEMBER(screen_vblank_tnzs);
|
DECLARE_WRITE_LINE_MEMBER(screen_vblank_tnzs);
|
||||||
|
|
||||||
DECLARE_READ8_MEMBER(analog_r); // TODO: Move into a subclass
|
|
||||||
|
|
||||||
DECLARE_PALETTE_INIT(prompalette);
|
DECLARE_PALETTE_INIT(prompalette);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -52,9 +49,6 @@ protected:
|
|||||||
optional_device<address_map_bank_device> m_mainbank; /* FIXME: optional because of reuse from cchance.cpp */
|
optional_device<address_map_bank_device> m_mainbank; /* FIXME: optional because of reuse from cchance.cpp */
|
||||||
optional_memory_bank m_subbank; /* FIXME: optional because of reuse from cchance.cpp */
|
optional_memory_bank m_subbank; /* FIXME: optional because of reuse from cchance.cpp */
|
||||||
|
|
||||||
optional_ioport m_an1; // TODO: Move these into a subclass
|
|
||||||
optional_ioport m_an2;
|
|
||||||
|
|
||||||
/* misc / mcu */
|
/* misc / mcu */
|
||||||
int m_bank2;
|
int m_bank2;
|
||||||
};
|
};
|
||||||
@ -65,6 +59,7 @@ public:
|
|||||||
tnzs_mcu_state(const machine_config &mconfig, device_type type, const char *tag, bool lockout_level)
|
tnzs_mcu_state(const machine_config &mconfig, device_type type, const char *tag, bool lockout_level)
|
||||||
: tnzs_base_state(mconfig, type, tag)
|
: tnzs_base_state(mconfig, type, tag)
|
||||||
, m_mcu(*this, "mcu")
|
, m_mcu(*this, "mcu")
|
||||||
|
, m_upd4701(*this, "upd4701")
|
||||||
, m_in0(*this, "IN0")
|
, m_in0(*this, "IN0")
|
||||||
, m_in1(*this, "IN1")
|
, m_in1(*this, "IN1")
|
||||||
, m_in2(*this, "IN2")
|
, m_in2(*this, "IN2")
|
||||||
@ -80,8 +75,11 @@ public:
|
|||||||
DECLARE_READ8_MEMBER(mcu_r);
|
DECLARE_READ8_MEMBER(mcu_r);
|
||||||
DECLARE_WRITE8_MEMBER(mcu_w);
|
DECLARE_WRITE8_MEMBER(mcu_w);
|
||||||
|
|
||||||
|
DECLARE_READ8_MEMBER(analog_r);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
required_device<upi41_cpu_device> m_mcu;
|
required_device<upi41_cpu_device> m_mcu;
|
||||||
|
optional_device<upd4701_device> m_upd4701;
|
||||||
|
|
||||||
required_ioport m_in0;
|
required_ioport m_in0;
|
||||||
required_ioport m_in1;
|
required_ioport m_in1;
|
||||||
@ -193,11 +191,15 @@ class jpopnics_state : public tnzs_base_state
|
|||||||
public:
|
public:
|
||||||
jpopnics_state(const machine_config &mconfig, device_type type, const char *tag)
|
jpopnics_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: tnzs_base_state(mconfig, type, tag)
|
: tnzs_base_state(mconfig, type, tag)
|
||||||
|
, m_upd4701(*this, "upd4701")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual void machine_reset() override;
|
virtual void machine_reset() override;
|
||||||
|
|
||||||
DECLARE_WRITE8_MEMBER(subbankswitch_w);
|
DECLARE_WRITE8_MEMBER(subbankswitch_w);
|
||||||
|
|
||||||
|
private:
|
||||||
|
required_device<upd4701_device> m_upd4701;
|
||||||
};
|
};
|
||||||
|
|
||||||
class insectx_state : public tnzs_base_state
|
class insectx_state : public tnzs_base_state
|
||||||
|
@ -67,15 +67,12 @@ WRITE8_MEMBER(tnzs_mcu_state::mcu_port2_w)
|
|||||||
m_input_select = data & 0xf;
|
m_input_select = data & 0xf;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Eliminate this once arknoid2 MCU is dumped
|
READ8_MEMBER(tnzs_mcu_state::analog_r)
|
||||||
READ8_MEMBER(tnzs_base_state::analog_r)
|
|
||||||
{
|
{
|
||||||
uint16_t val = ((offset & 2) ? m_an2 : m_an1).read_safe(0);
|
if (m_upd4701.found())
|
||||||
|
return m_upd4701->read_xy(space, offset);
|
||||||
|
|
||||||
if (offset & 1)
|
return 0;
|
||||||
return val >> 8;
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void arknoid2_state::mcu_reset()
|
void arknoid2_state::mcu_reset()
|
||||||
@ -378,6 +375,10 @@ void arknoid2_state::machine_start()
|
|||||||
save_item(NAME(m_mcu_credits));
|
save_item(NAME(m_mcu_credits));
|
||||||
save_item(NAME(m_mcu_reportcoin));
|
save_item(NAME(m_mcu_reportcoin));
|
||||||
save_item(NAME(m_mcu_command));
|
save_item(NAME(m_mcu_command));
|
||||||
|
|
||||||
|
// kludge to make device work with active-high coin inputs
|
||||||
|
m_upd4701->left_w(0);
|
||||||
|
m_upd4701->middle_w(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void kageki_state::machine_start()
|
void kageki_state::machine_start()
|
||||||
@ -412,6 +413,10 @@ WRITE8_MEMBER(arknoid2_state::bankswitch1_w)
|
|||||||
tnzs_base_state::bankswitch1_w(space, offset, data, mem_mask);
|
tnzs_base_state::bankswitch1_w(space, offset, data, mem_mask);
|
||||||
if (data & 0x04)
|
if (data & 0x04)
|
||||||
mcu_reset();
|
mcu_reset();
|
||||||
|
|
||||||
|
// never actually written by arknoid2 (though code exists to do it)
|
||||||
|
m_upd4701->resetx_w(BIT(data, 5));
|
||||||
|
m_upd4701->resety_w(BIT(data, 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(insectx_state::bankswitch1_w)
|
WRITE8_MEMBER(insectx_state::bankswitch1_w)
|
||||||
@ -445,6 +450,13 @@ WRITE8_MEMBER(tnzs_mcu_state::bankswitch1_w)
|
|||||||
tnzs_base_state::bankswitch1_w(space, offset, data, mem_mask);
|
tnzs_base_state::bankswitch1_w(space, offset, data, mem_mask);
|
||||||
if ((data & 0x04) != 0 && m_mcu != nullptr)
|
if ((data & 0x04) != 0 && m_mcu != nullptr)
|
||||||
m_mcu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
|
m_mcu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
|
||||||
|
|
||||||
|
// written only at startup by plumppop?
|
||||||
|
if (m_upd4701.found())
|
||||||
|
{
|
||||||
|
m_upd4701->resetx_w(BIT(data, 5));
|
||||||
|
m_upd4701->resety_w(BIT(data, 5));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(tnzs_base_state::bankswitch1_w)
|
WRITE8_MEMBER(tnzs_base_state::bankswitch1_w)
|
||||||
@ -463,8 +475,12 @@ void jpopnics_state::machine_reset()
|
|||||||
|
|
||||||
WRITE8_MEMBER(jpopnics_state::subbankswitch_w)
|
WRITE8_MEMBER(jpopnics_state::subbankswitch_w)
|
||||||
{
|
{
|
||||||
/* bits 0-1 select ROM bank */
|
// bits 0-1 select ROM bank
|
||||||
m_subbank->set_entry(data & 0x03);
|
m_subbank->set_entry(data & 0x03);
|
||||||
|
|
||||||
|
// written once at startup
|
||||||
|
m_upd4701->resetx_w(BIT(data, 5));
|
||||||
|
m_upd4701->resety_w(BIT(data, 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(tnzsb_state::sound_command_w)
|
WRITE8_MEMBER(tnzsb_state::sound_command_w)
|
||||||
|
Loading…
Reference in New Issue
Block a user