summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-06-17 01:50:47 +1000
committer Vas Crabb <vas@vastheman.com>2018-06-17 01:50:47 +1000
commitb0d19b944db2b37b52ea7a636c98b2010c996a81 (patch)
tree42c1dfd2a8148f2d2ec45100083484dfcfda0717
parent67fd77d2442fc4f1b22829171f4642df5b59a623 (diff)
more macro removal and overload disambiguation (nw)
-rw-r--r--src/devices/bus/cbmiec/cbmiec.cpp4
-rw-r--r--src/devices/bus/cbmiec/cbmiec.h10
-rw-r--r--src/devices/bus/cbmiec/diag264_lb_iec.cpp2
-rw-r--r--src/devices/bus/pet/user.h14
-rw-r--r--src/devices/bus/vcs_ctrl/ctrl.h16
-rw-r--r--src/devices/machine/mos6526.h8
-rw-r--r--src/devices/sound/msm5205.cpp21
-rw-r--r--src/devices/sound/msm5205.h4
-rw-r--r--src/mame/audio/efo_zsu.cpp2
-rw-r--r--src/mame/audio/hyprolyb.cpp2
-rw-r--r--src/mame/audio/irem.cpp6
-rw-r--r--src/mame/drivers/a2600.cpp16
-rw-r--r--src/mame/drivers/appoooh.cpp4
-rw-r--r--src/mame/drivers/ashnojoe.cpp4
-rw-r--r--src/mame/drivers/battlera.cpp2
-rw-r--r--src/mame/drivers/c128.cpp48
-rw-r--r--src/mame/drivers/c64.cpp54
-rw-r--r--src/mame/drivers/cabal.cpp4
-rw-r--r--src/mame/drivers/cbm2.cpp28
-rw-r--r--src/mame/drivers/chinagat.cpp2
-rw-r--r--src/mame/drivers/chinsan.cpp14
-rw-r--r--src/mame/drivers/combatsc.cpp2
-rw-r--r--src/mame/drivers/crgolf.cpp2
-rw-r--r--src/mame/drivers/dacholer.cpp2
-rw-r--r--src/mame/drivers/darius.cpp2
-rw-r--r--src/mame/drivers/ddragon.cpp4
-rw-r--r--src/mame/drivers/de_2.cpp2
-rw-r--r--src/mame/drivers/dec8.cpp2
-rw-r--r--src/mame/drivers/docastle.cpp4
-rw-r--r--src/mame/drivers/drmicro.cpp2
-rw-r--r--src/mame/drivers/dynax.cpp4
-rw-r--r--src/mame/drivers/fantland.cpp2
-rw-r--r--src/mame/drivers/fcrash.cpp4
-rw-r--r--src/mame/drivers/fromance.cpp2
-rw-r--r--src/mame/drivers/gladiatr.cpp4
-rw-r--r--src/mame/drivers/goal92.cpp2
-rw-r--r--src/mame/drivers/gsword.cpp2
-rw-r--r--src/mame/drivers/hnayayoi.cpp2
-rw-r--r--src/mame/drivers/jangou.cpp4
-rw-r--r--src/mame/drivers/jantotsu.cpp2
-rw-r--r--src/mame/drivers/kungfur.cpp4
-rw-r--r--src/mame/drivers/kurukuru.cpp2
-rw-r--r--src/mame/drivers/lucky74.cpp4
-rw-r--r--src/mame/drivers/lwings.cpp2
-rw-r--r--src/mame/drivers/mastboy.cpp2
-rw-r--r--src/mame/drivers/mermaid.cpp4
-rw-r--r--src/mame/drivers/mgavegas.cpp6
-rw-r--r--src/mame/drivers/mjkjidai.cpp2
-rw-r--r--src/mame/drivers/mlanding.cpp2
-rw-r--r--src/mame/drivers/ojankohs.cpp2
-rw-r--r--src/mame/drivers/opwolf.cpp4
-rw-r--r--src/mame/drivers/pcktgal.cpp2
-rw-r--r--src/mame/drivers/pet.cpp4
-rw-r--r--src/mame/drivers/plus4.cpp68
-rw-r--r--src/mame/drivers/renegade.cpp2
-rw-r--r--src/mame/drivers/rmhaihai.cpp9
-rw-r--r--src/mame/drivers/sf.cpp2
-rw-r--r--src/mame/drivers/sothello.cpp2
-rw-r--r--src/mame/drivers/spdodgeb.cpp4
-rw-r--r--src/mame/drivers/splash.cpp6
-rw-r--r--src/mame/drivers/srmp2.cpp4
-rw-r--r--src/mame/drivers/suprgolf.cpp11
-rw-r--r--src/mame/drivers/system16.cpp4
-rw-r--r--src/mame/drivers/taito_l.cpp4
-rw-r--r--src/mame/drivers/tbowl.cpp4
-rw-r--r--src/mame/drivers/tecmo.cpp4
-rw-r--r--src/mame/drivers/tehkanwc.cpp4
-rw-r--r--src/mame/drivers/tigeroad.cpp2
-rw-r--r--src/mame/drivers/toki.cpp2
-rw-r--r--src/mame/drivers/topspeed.cpp2
-rw-r--r--src/mame/drivers/tubep.cpp4
-rw-r--r--src/mame/drivers/vic10.cpp32
-rw-r--r--src/mame/drivers/vic20.cpp12
-rw-r--r--src/mame/drivers/wacky_gator.cpp2
-rw-r--r--src/mame/drivers/wc90b.cpp4
-rw-r--r--src/mame/includes/gng.h52
-rw-r--r--src/mame/includes/ninjakd2.h12
-rw-r--r--src/mame/machine/pc1512kb.cpp5
-rw-r--r--src/mame/machine/pce_cd.cpp2
-rw-r--r--src/mame/machine/primo.cpp8
-rw-r--r--src/mame/machine/rmnimbus.cpp2
-rw-r--r--src/mame/machine/stfight.cpp2
82 files changed, 320 insertions, 306 deletions
diff --git a/src/devices/bus/cbmiec/cbmiec.cpp b/src/devices/bus/cbmiec/cbmiec.cpp
index c91a9d54773..34cd7d4a63b 100644
--- a/src/devices/bus/cbmiec/cbmiec.cpp
+++ b/src/devices/bus/cbmiec/cbmiec.cpp
@@ -319,8 +319,8 @@ void cbm_iec_device::device_start()
void cbm_iec_device::device_reset()
{
- reset_w(0);
- reset_w(1);
+ host_reset_w(0);
+ host_reset_w(1);
}
diff --git a/src/devices/bus/cbmiec/cbmiec.h b/src/devices/bus/cbmiec/cbmiec.h
index f7d9f5d73ff..da951186a81 100644
--- a/src/devices/bus/cbmiec/cbmiec.h
+++ b/src/devices/bus/cbmiec/cbmiec.h
@@ -93,11 +93,11 @@ public:
DECLARE_READ_LINE_MEMBER( reset_r ) { return get_signal(RESET); }
// writes for host (driver_device)
- DECLARE_WRITE_LINE_MEMBER( srq_w ) { set_signal(this, SRQ, state); }
- DECLARE_WRITE_LINE_MEMBER( atn_w ) { set_signal(this, ATN, state); }
- DECLARE_WRITE_LINE_MEMBER( clk_w ) { set_signal(this, CLK, state); }
- DECLARE_WRITE_LINE_MEMBER( data_w ) { set_signal(this, DATA, state); }
- DECLARE_WRITE_LINE_MEMBER( reset_w ) { set_signal(this, RESET, state); }
+ DECLARE_WRITE_LINE_MEMBER( host_srq_w ) { set_signal(this, SRQ, state); }
+ DECLARE_WRITE_LINE_MEMBER( host_atn_w ) { set_signal(this, ATN, state); }
+ DECLARE_WRITE_LINE_MEMBER( host_clk_w ) { set_signal(this, CLK, state); }
+ DECLARE_WRITE_LINE_MEMBER( host_data_w ) { set_signal(this, DATA, state); }
+ DECLARE_WRITE_LINE_MEMBER( host_reset_w ) { set_signal(this, RESET, state); }
// writes for peripherals (device_t)
void srq_w(device_t *device, int state) { set_signal(device, SRQ, state); }
diff --git a/src/devices/bus/cbmiec/diag264_lb_iec.cpp b/src/devices/bus/cbmiec/diag264_lb_iec.cpp
index 18dac929017..8852f997285 100644
--- a/src/devices/bus/cbmiec/diag264_lb_iec.cpp
+++ b/src/devices/bus/cbmiec/diag264_lb_iec.cpp
@@ -49,5 +49,5 @@ void diag264_serial_loopback_device::device_start()
void diag264_serial_loopback_device::cbm_iec_atn(int state)
{
- m_bus->clk_w(state);
+ m_bus->host_clk_w(state);
}
diff --git a/src/devices/bus/pet/user.h b/src/devices/bus/pet/user.h
index d7753ad23f1..651e121a2fa 100644
--- a/src/devices/bus/pet/user.h
+++ b/src/devices/bus/pet/user.h
@@ -27,11 +27,6 @@
#pragma once
-
-#define MCFG_PET_USER_PORT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, PET_USER_PORT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
#define MCFG_PET_USER_PORT_2_HANDLER(_devcb) \
devcb = &downcast<pet_user_port_device &>(*device).set_2_handler(DEVCB_##_devcb);
@@ -100,6 +95,15 @@ class pet_user_port_device : public device_t,
friend class device_pet_user_port_interface;
public:
+ template <typename T>
+ pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
+ : pet_user_port_device(mconfig, tag, owner, 0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> devcb_base &set_2_handler(Object &&cb) { return m_2_handler.set_callback(std::forward<Object>(cb)); }
diff --git a/src/devices/bus/vcs_ctrl/ctrl.h b/src/devices/bus/vcs_ctrl/ctrl.h
index 4e098548329..2018d70ba34 100644
--- a/src/devices/bus/vcs_ctrl/ctrl.h
+++ b/src/devices/bus/vcs_ctrl/ctrl.h
@@ -85,14 +85,14 @@ public:
// pin 8 - GND
// bit 6 - pin 9 -
//
- uint8_t joy_r() { uint8_t data = 0xff; if (exists()) data = m_device->vcs_joy_r(); return data; }
- DECLARE_READ8_MEMBER( joy_r ) { return joy_r(); }
- uint8_t pot_x_r() { uint8_t data = 0xff; if (exists()) data = m_device->vcs_pot_x_r(); return data; }
- DECLARE_READ8_MEMBER( pot_x_r ) { return pot_x_r(); }
- uint8_t pot_y_r() { uint8_t data = 0xff; if (exists()) data = m_device->vcs_pot_y_r(); return data; }
- DECLARE_READ8_MEMBER( pot_y_r ) { return pot_y_r(); }
-
- void joy_w( uint8_t data ) { if ( exists() ) m_device->vcs_joy_w( data ); }
+ uint8_t read_joy() { return exists() ? m_device->vcs_joy_r() : 0xff; }
+ DECLARE_READ8_MEMBER( joy_r ) { return read_joy(); }
+ uint8_t read_pot_x() { return exists() ? m_device->vcs_pot_x_r() : 0xff; }
+ DECLARE_READ8_MEMBER( pot_x_r ) { return read_pot_x(); }
+ uint8_t read_pot_y() { return exists() ? m_device->vcs_pot_y_r() : 0xff; }
+ DECLARE_READ8_MEMBER( pot_y_r ) { return read_pot_y(); }
+
+ void joy_w(uint8_t data) { if (exists()) m_device->vcs_joy_w(data); }
bool exists() { return m_device != nullptr; }
bool has_pot_x() { return exists() && m_device->has_pot_x(); }
diff --git a/src/devices/machine/mos6526.h b/src/devices/machine/mos6526.h
index 509ff81ed74..2111106c76b 100644
--- a/src/devices/machine/mos6526.h
+++ b/src/devices/machine/mos6526.h
@@ -123,10 +123,10 @@ public:
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
- uint8_t pa_r() { return m_pa; }
- DECLARE_READ8_MEMBER( pa_r ) { return pa_r(); }
- uint8_t pb_r() { return m_pb; }
- DECLARE_READ8_MEMBER( pb_r ) { return pb_r(); }
+ uint8_t read_pa() { return m_pa; }
+ DECLARE_READ8_MEMBER( pa_r ) { return m_pa; }
+ uint8_t read_pb() { return m_pb; }
+ DECLARE_READ8_MEMBER( pb_r ) { return m_pb; }
DECLARE_READ_LINE_MEMBER( sp_r ) { return m_sp; }
DECLARE_WRITE_LINE_MEMBER( sp_w );
diff --git a/src/devices/sound/msm5205.cpp b/src/devices/sound/msm5205.cpp
index 78884068c0b..05646521f36 100644
--- a/src/devices/sound/msm5205.cpp
+++ b/src/devices/sound/msm5205.cpp
@@ -67,13 +67,13 @@ msm5205_device::msm5205_device(const machine_config &mconfig, const char *tag, d
}
msm5205_device::msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
- : device_t(mconfig, type, tag, owner, clock),
- device_sound_interface(mconfig, *this),
- m_s1(false),
- m_s2(false),
- m_bitwidth(4),
- m_vck_cb(*this),
- m_vck_legacy_cb(*this)
+ : device_t(mconfig, type, tag, owner, clock)
+ , device_sound_interface(mconfig, *this)
+ , m_s1(false)
+ , m_s2(false)
+ , m_bitwidth(4)
+ , m_vck_cb(*this)
+ , m_vck_legacy_cb(*this)
{
}
@@ -262,7 +262,7 @@ WRITE_LINE_MEMBER(msm5205_device::reset_w)
* Handle an update of the data to the chip
*/
-void msm5205_device::data_w(int data)
+void msm5205_device::write_data(int data)
{
if (m_bitwidth == 4)
m_data = data & 0x0f;
@@ -270,11 +270,6 @@ void msm5205_device::data_w(int data)
m_data = (data & 0x07) << 1; /* unknown */
}
-WRITE8_MEMBER(msm5205_device::data_w)
-{
- data_w(data);
-}
-
int msm5205_device::get_prescaler() const
{
if (m_s1)
diff --git a/src/devices/sound/msm5205.h b/src/devices/sound/msm5205.h
index ec68e7f21b7..7e6ef5f91f9 100644
--- a/src/devices/sound/msm5205.h
+++ b/src/devices/sound/msm5205.h
@@ -51,8 +51,8 @@ public:
DECLARE_WRITE_LINE_MEMBER(reset_w);
// adpcmata is latched after vclk_interrupt callback
- void data_w(int data);
- DECLARE_WRITE8_MEMBER(data_w);
+ void write_data(int data);
+ DECLARE_WRITE8_MEMBER(data_w) { write_data(data); }
// VCLK slave mode option
// if VCLK and reset or data is changed at the same time,
diff --git a/src/mame/audio/efo_zsu.cpp b/src/mame/audio/efo_zsu.cpp
index c4667bfdfad..0bcb2ea8097 100644
--- a/src/mame/audio/efo_zsu.cpp
+++ b/src/mame/audio/efo_zsu.cpp
@@ -233,7 +233,7 @@ MACHINE_CONFIG_START(efo_zsu_device::device_add_mconfig)
MCFG_DEVICE_ADD("fifo", CD40105, 0)
MCFG_40105_DATA_OUT_READY_CB(WRITELINE(*this, efo_zsu_device, fifo_dor_w))
- MCFG_40105_DATA_OUT_CB(WRITELINE("adpcm", msm5205_device, data_w))
+ MCFG_40105_DATA_OUT_CB(WRITE8("adpcm", msm5205_device, data_w))
MCFG_DEVICE_ADD("adpcm", MSM5205, 4000000/8)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
diff --git a/src/mame/audio/hyprolyb.cpp b/src/mame/audio/hyprolyb.cpp
index 4d4dc9f2365..e4a3c024219 100644
--- a/src/mame/audio/hyprolyb.cpp
+++ b/src/mame/audio/hyprolyb.cpp
@@ -54,7 +54,7 @@ READ8_MEMBER( hyprolyb_adpcm_device::busy_r )
WRITE8_MEMBER( hyprolyb_adpcm_device::msm_data_w )
{
- m_msm->data_w(data);
+ m_msm->write_data(data);
m_adpcm_busy = ~data & 0x80;
}
diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp
index c53ee460931..88d312bbabc 100644
--- a/src/mame/audio/irem.cpp
+++ b/src/mame/audio/irem.cpp
@@ -227,12 +227,12 @@ WRITE8_MEMBER( irem_audio_device::m52_adpcm_w )
{
if (offset & 1)
{
- m_adpcm1->data_w(data);
+ m_adpcm1->write_data(data);
}
if (offset & 2)
{
if (m_adpcm2 != nullptr)
- m_adpcm2->data_w(data);
+ m_adpcm2->write_data(data);
}
}
@@ -241,7 +241,7 @@ WRITE8_MEMBER( irem_audio_device::m62_adpcm_w )
{
msm5205_device *adpcm = (offset & 1) ? m_adpcm2.target() : m_adpcm1.target();
if (adpcm != nullptr)
- adpcm->data_w(data);
+ adpcm->write_data(data);
}
diff --git a/src/mame/drivers/a2600.cpp b/src/mame/drivers/a2600.cpp
index d011d6e407a..ea2b6f73960 100644
--- a/src/mame/drivers/a2600.cpp
+++ b/src/mame/drivers/a2600.cpp
@@ -136,10 +136,10 @@ READ8_MEMBER(a2600_base_state::switch_A_r)
uint8_t val = 0;
// Left controller port PINs 1-4 ( 4321 )
- val |= (m_joy1->joy_r() & 0x0f) << 4;
+ val |= (m_joy1->read_joy() & 0x0f) << 4;
// Right controller port PINs 1-4 ( 4321 )
- val |= m_joy2->joy_r() & 0x0f;
+ val |= m_joy2->read_joy() & 0x0f;
return val;
}
@@ -163,22 +163,22 @@ READ16_MEMBER(a2600_base_state::a2600_read_input_port)
switch (offset)
{
case 0: // Left controller port PIN 5
- return m_joy1->pot_x_r();
+ return m_joy1->read_pot_x();
case 1: // Left controller port PIN 9
- return m_joy1->pot_y_r();
+ return m_joy1->read_pot_y();
case 2: // Right controller port PIN 5
- return m_joy2->pot_x_r();
+ return m_joy2->read_pot_x();
case 3: // Right controller port PIN 9
- return m_joy2->pot_y_r();
+ return m_joy2->read_pot_y();
case 4: // Left controller port PIN 6
- return (m_joy1->joy_r() & 0x20) ? 0xff : 0x7f;
+ return (m_joy1->read_joy() & 0x20) ? 0xff : 0x7f;
case 5: // Right controller port PIN 6
- return (m_joy2->joy_r() & 0x20) ? 0xff : 0x7f;
+ return (m_joy2->read_joy() & 0x20) ? 0xff : 0x7f;
}
return 0xff;
}
diff --git a/src/mame/drivers/appoooh.cpp b/src/mame/drivers/appoooh.cpp
index 310418a04b1..dba029a9678 100644
--- a/src/mame/drivers/appoooh.cpp
+++ b/src/mame/drivers/appoooh.cpp
@@ -182,7 +182,7 @@ WRITE_LINE_MEMBER(appoooh_state::adpcm_int)
uint8_t *RAM = memregion("adpcm")->base();
m_adpcm_data = RAM[m_adpcm_address++];
- m_msm->data_w(m_adpcm_data >> 4);
+ m_msm->write_data(m_adpcm_data >> 4);
if (m_adpcm_data == 0x70)
{
@@ -192,7 +192,7 @@ WRITE_LINE_MEMBER(appoooh_state::adpcm_int)
}
else
{
- m_msm->data_w(m_adpcm_data & 0x0f);
+ m_msm->write_data(m_adpcm_data & 0x0f);
m_adpcm_data = -1;
}
}
diff --git a/src/mame/drivers/ashnojoe.cpp b/src/mame/drivers/ashnojoe.cpp
index 215fde4e0ae..bc583e94182 100644
--- a/src/mame/drivers/ashnojoe.cpp
+++ b/src/mame/drivers/ashnojoe.cpp
@@ -281,11 +281,11 @@ WRITE_LINE_MEMBER(ashnojoe_state::ashnojoe_vclk_cb)
{
if (m_msm5205_vclk_toggle == 0)
{
- m_msm->data_w(m_adpcm_byte >> 4);
+ m_msm->write_data(m_adpcm_byte >> 4);
}
else
{
- m_msm->data_w(m_adpcm_byte & 0xf);
+ m_msm->write_data(m_adpcm_byte & 0xf);
m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
diff --git a/src/mame/drivers/battlera.cpp b/src/mame/drivers/battlera.cpp
index 2c952b6eee5..55f940fd384 100644
--- a/src/mame/drivers/battlera.cpp
+++ b/src/mame/drivers/battlera.cpp
@@ -165,7 +165,7 @@ void battlera_state::battlera_portmap(address_map &map)
WRITE_LINE_MEMBER(battlera_state::adpcm_int)
{
- m_msm->data_w(m_msm5205next >> 4);
+ m_msm->write_data(m_msm5205next >> 4);
m_msm5205next <<= 4;
m_toggle = 1 - m_toggle;
diff --git a/src/mame/drivers/c128.cpp b/src/mame/drivers/c128.cpp
index 77bc5684258..2f783e4a56e 100644
--- a/src/mame/drivers/c128.cpp
+++ b/src/mame/drivers/c128.cpp
@@ -1139,22 +1139,22 @@ READ8_MEMBER( c128_state::sid_potx_r )
{
uint8_t data = 0xff;
- switch (m_cia1->pa_r() >> 6)
+ switch (m_cia1->read_pa() >> 6)
{
- case 1: data = m_joy1->pot_x_r(); break;
- case 2: data = m_joy2->pot_x_r(); break;
+ case 1: data = m_joy1->read_pot_x(); break;
+ case 2: data = m_joy2->read_pot_x(); break;
case 3:
if (m_joy1->has_pot_x() && m_joy2->has_pot_x())
{
- data = 1 / (1 / m_joy1->pot_x_r() + 1 / m_joy2->pot_x_r());
+ data = 1 / (1 / m_joy1->read_pot_x() + 1 / m_joy2->read_pot_x());
}
else if (m_joy1->has_pot_x())
{
- data = m_joy1->pot_x_r();
+ data = m_joy1->read_pot_x();
}
else if (m_joy2->has_pot_x())
{
- data = m_joy2->pot_x_r();
+ data = m_joy2->read_pot_x();
}
break;
}
@@ -1166,22 +1166,22 @@ READ8_MEMBER( c128_state::sid_poty_r )
{
uint8_t data = 0xff;
- switch (m_cia1->pa_r() >> 6)
+ switch (m_cia1->read_pa() >> 6)
{
- case 1: data = m_joy1->pot_y_r(); break;
- case 2: data = m_joy2->pot_y_r(); break;
+ case 1: data = m_joy1->read_pot_y(); break;
+ case 2: data = m_joy2->read_pot_y(); break;
case 3:
if (m_joy1->has_pot_y() && m_joy2->has_pot_y())
{
- data = 1 / (1 / m_joy1->pot_y_r() + 1 / m_joy2->pot_y_r());
+ data = 1 / (1 / m_joy1->read_pot_y() + 1 / m_joy2->read_pot_y());
}
else if (m_joy1->has_pot_y())
{
- data = m_joy1->pot_y_r();
+ data = m_joy1->read_pot_y();
}
else if (m_joy2->has_pot_y())
{
- data = m_joy2->pot_y_r();
+ data = m_joy2->read_pot_y();
}
break;
}
@@ -1221,13 +1221,13 @@ READ8_MEMBER( c128_state::cia1_pa_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy_b = m_joy2->joy_r();
+ uint8_t joy_b = m_joy2->read_joy();
data &= (0xf0 | (joy_b & 0x0f));
data &= ~(!BIT(joy_b, 5) << 4);
// keyboard
- uint8_t cia1_pb = m_cia1->pb_r();
+ uint8_t cia1_pb = m_cia1->read_pb();
uint32_t row[8] = { m_row[0]->read(), m_row[1]->read() & m_lock->read(), m_row[2]->read(), m_row[3]->read(),
m_row[4]->read(), m_row[5]->read(), m_row[6]->read(), m_row[7]->read() };
@@ -1289,13 +1289,13 @@ READ8_MEMBER( c128_state::cia1_pb_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy_a = m_joy1->joy_r();
+ uint8_t joy_a = m_joy1->read_joy();
data &= (0xf0 | (joy_a & 0x0f));
data &= ~(!BIT(joy_a, 5) << 4);
// keyboard
- uint8_t cia1_pa = m_cia1->pa_r();
+ uint8_t cia1_pa = m_cia1->read_pa();
if (!BIT(cia1_pa, 7)) data &= m_row[7]->read();
if (!BIT(cia1_pa, 6)) data &= m_row[6]->read();
@@ -1417,8 +1417,8 @@ WRITE8_MEMBER( c128_state::cia2_pa_w )
m_user->write_m(BIT(data, 2));
// IEC bus
- m_iec->atn_w(!BIT(data, 3));
- m_iec->clk_w(!BIT(data, 4));
+ m_iec->host_atn_w(!BIT(data, 3));
+ m_iec->host_clk_w(!BIT(data, 4));
m_iec_data_out = BIT(data, 5);
update_iec();
@@ -1519,7 +1519,7 @@ inline void c128_state::update_iec()
if (fsdir) data_out &= m_sp1;
- m_iec->data_w(data_out);
+ m_iec->host_data_w(data_out);
// fast serial clock in
int srq_in = m_iec->srq_r();
@@ -1531,7 +1531,7 @@ inline void c128_state::update_iec()
if (fsdir) srq_out &= m_cnt1;
- m_iec->srq_w(srq_out);
+ m_iec->host_srq_w(srq_out);
}
WRITE_LINE_MEMBER( c128_state::iec_srq_w )
@@ -1778,13 +1778,13 @@ MACHINE_CONFIG_START(c128_state::ntsc)
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(*this, c128_state, exp_dma_cd_w))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(*this, c128_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
+ MCFG_DEVICE_ADD(PET_USER_PORT_TAG, PET_USER_PORT, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(*this, c128_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
MCFG_PET_USER_PORT_6_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_7_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, sp_w))
- MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, atn_w))
+ MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, host_atn_w))
MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, flag_w))
MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(*this, c128_state, write_user_pb0))
MCFG_PET_USER_PORT_D_HANDLER(WRITELINE(*this, c128_state, write_user_pb1))
@@ -1952,13 +1952,13 @@ MACHINE_CONFIG_START(c128_state::pal)
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(*this, c128_state, exp_dma_cd_w))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(*this, c128_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
+ MCFG_DEVICE_ADD(PET_USER_PORT_TAG, PET_USER_PORT, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(*this, c128_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
MCFG_PET_USER_PORT_6_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_7_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, sp_w))
- MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, atn_w))
+ MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, host_atn_w))
MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, flag_w))
MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(*this, c128_state, write_user_pb0))
MCFG_PET_USER_PORT_D_HANDLER(WRITELINE(*this, c128_state, write_user_pb1))
diff --git a/src/mame/drivers/c64.cpp b/src/mame/drivers/c64.cpp
index d9a7ae916d7..fe9e22db15a 100644
--- a/src/mame/drivers/c64.cpp
+++ b/src/mame/drivers/c64.cpp
@@ -723,22 +723,22 @@ READ8_MEMBER( c64_state::sid_potx_r )
{
uint8_t data = 0xff;
- switch (m_cia1->pa_r() >> 6)
+ switch (m_cia1->read_pa() >> 6)
{
- case 1: data = m_joy1->pot_x_r(); break;
- case 2: data = m_joy2->pot_x_r(); break;
+ case 1: data = m_joy1->read_pot_x(); break;
+ case 2: data = m_joy2->read_pot_x(); break;
case 3:
if (m_joy1->has_pot_x() && m_joy2->has_pot_x())
{
- data = 1 / (1 / m_joy1->pot_x_r() + 1 / m_joy2->pot_x_r());
+ data = 1 / (1 / m_joy1->read_pot_x() + 1 / m_joy2->read_pot_x());
}
else if (m_joy1->has_pot_x())
{
- data = m_joy1->pot_x_r();
+ data = m_joy1->read_pot_x();
}
else if (m_joy2->has_pot_x())
{
- data = m_joy2->pot_x_r();
+ data = m_joy2->read_pot_x();
}
break;
}
@@ -750,22 +750,22 @@ READ8_MEMBER( c64_state::sid_poty_r )
{
uint8_t data = 0xff;
- switch (m_cia1->pa_r() >> 6)
+ switch (m_cia1->read_pa() >> 6)
{
- case 1: data = m_joy1->pot_y_r(); break;
- case 2: data = m_joy2->pot_y_r(); break;
+ case 1: data = m_joy1->read_pot_y(); break;
+ case 2: data = m_joy2->read_pot_y(); break;
case 3:
if (m_joy1->has_pot_y() && m_joy2->has_pot_y())
{
- data = 1 / (1 / m_joy1->pot_y_r() + 1 / m_joy2->pot_y_r());
+ data = 1 / (1 / m_joy1->read_pot_y() + 1 / m_joy2->read_pot_y());
}
else if (m_joy1->has_pot_y())
{
- data = m_joy1->pot_y_r();
+ data = m_joy1->read_pot_y();
}
else if (m_joy2->has_pot_y())
{
- data = m_joy2->pot_y_r();
+ data = m_joy2->read_pot_y();
}
break;
}
@@ -805,13 +805,13 @@ READ8_MEMBER( c64_state::cia1_pa_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy_b = m_joy2->joy_r();
+ uint8_t joy_b = m_joy2->read_joy();
data &= (0xf0 | (joy_b & 0x0f));
data &= ~(!BIT(joy_b, 5) << 4);
// keyboard
- uint8_t cia1_pb = m_cia1->pb_r();
+ uint8_t cia1_pb = m_cia1->read_pb();
uint32_t row[8] = { m_row[0]->read(), m_row[1]->read() & m_lock->read(), m_row[2]->read(), m_row[3]->read(),
m_row[4]->read(), m_row[5]->read(), m_row[6]->read(), m_row[7]->read() };
@@ -873,13 +873,13 @@ READ8_MEMBER( c64_state::cia1_pb_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy_a = m_joy1->joy_r();
+ uint8_t joy_a = m_joy1->read_joy();
data &= (0xf0 | (joy_a & 0x0f));
data &= ~(!BIT(joy_a, 5) << 4);
// keyboard
- uint8_t cia1_pa = m_cia1->pa_r();
+ uint8_t cia1_pa = m_cia1->read_pa();
if (!BIT(cia1_pa, 7)) data &= m_row[7]->read();
if (!BIT(cia1_pa, 6)) data &= m_row[6]->read();
@@ -935,7 +935,7 @@ READ8_MEMBER( c64gs_state::cia1_pa_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy_b = m_joy2->joy_r();
+ uint8_t joy_b = m_joy2->read_joy();
data &= (0xf0 | (joy_b & 0x0f));
data &= ~(!BIT(joy_b, 5) << 4);
@@ -963,7 +963,7 @@ READ8_MEMBER( c64gs_state::cia1_pb_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy_a = m_joy1->joy_r();
+ uint8_t joy_a = m_joy1->read_joy();
data &= (0xf0 | (joy_a & 0x0f));
data &= ~(!BIT(joy_a, 5) << 4);
@@ -1037,9 +1037,9 @@ WRITE8_MEMBER( c64_state::cia2_pa_w )
m_user->write_m(BIT(data, 2));
// IEC bus
- m_iec->atn_w(!BIT(data, 3));
- m_iec->clk_w(!BIT(data, 4));
- m_iec->data_w(!BIT(data, 5));
+ m_iec->host_atn_w(!BIT(data, 3));
+ m_iec->host_clk_w(!BIT(data, 4));
+ m_iec->host_data_w(!BIT(data, 5));
}
READ8_MEMBER( c64_state::cia2_pb_r )
@@ -1391,13 +1391,13 @@ MACHINE_CONFIG_START(c64_state::ntsc)
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(*this, c64_state, write))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(*this, c64_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
+ MCFG_DEVICE_ADD(PET_USER_PORT_TAG, PET_USER_PORT, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(*this, c64_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
MCFG_PET_USER_PORT_6_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_7_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, sp_w))
- MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, atn_w))
+ MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, host_atn_w))
MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, flag_w))
MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(*this, c64_state, write_user_pb0))
MCFG_PET_USER_PORT_D_HANDLER(WRITELINE(*this, c64_state, write_user_pb1))
@@ -1550,13 +1550,13 @@ MACHINE_CONFIG_START(c64_state::pal)
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(*this, c64_state, write))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(*this, c64_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
+ MCFG_DEVICE_ADD(PET_USER_PORT_TAG, PET_USER_PORT, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(*this, c64_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
MCFG_PET_USER_PORT_6_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_7_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, sp_w))
- MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, atn_w))
+ MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, host_atn_w))
MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, flag_w))
MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(*this, c64_state, write_user_pb0))
MCFG_PET_USER_PORT_D_HANDLER(WRITELINE(*this, c64_state, write_user_pb1))
@@ -1685,13 +1685,13 @@ MACHINE_CONFIG_START(c64gs_state::pal_gs)
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(*this, c64_state, write))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(*this, c64_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
+ MCFG_DEVICE_ADD(PET_USER_PORT_TAG, PET_USER_PORT, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(*this, c64_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
MCFG_PET_USER_PORT_6_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_7_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, sp_w))
- MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, atn_w))
+ MCFG_PET_USER_PORT_9_HANDLER(WRITELINE(CBM_IEC_TAG, cbm_iec_device, host_atn_w))
MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(MOS6526_2_TAG, mos6526_device, flag_w))
MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(*this, c64_state, write_user_pb0))
MCFG_PET_USER_PORT_D_HANDLER(WRITELINE(*this, c64_state, write_user_pb1))
diff --git a/src/mame/drivers/cabal.cpp b/src/mame/drivers/cabal.cpp
index 063d249a76a..567c0266bc3 100644
--- a/src/mame/drivers/cabal.cpp
+++ b/src/mame/drivers/cabal.cpp
@@ -249,7 +249,7 @@ WRITE8_MEMBER(cabal_state::cabalbl_1_adpcm_w)
{
m_msm1->reset_w(BIT(data, 7));
/* ?? bit 6?? */
- m_msm1->data_w(data);
+ m_msm1->write_data(data);
m_msm1->vclk_w(1);
m_msm1->vclk_w(0);
}
@@ -257,7 +257,7 @@ WRITE8_MEMBER(cabal_state::cabalbl_2_adpcm_w)
{
m_msm2->reset_w(BIT(data, 7));
/* ?? bit 6?? */
- m_msm2->data_w(data);
+ m_msm2->write_data(data);
m_msm2->vclk_w(1);
m_msm2->vclk_w(0);
}
diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp
index 408b9189ce9..e69661d8526 100644
--- a/src/mame/drivers/cbm2.cpp
+++ b/src/mame/drivers/cbm2.cpp
@@ -1472,20 +1472,20 @@ READ8_MEMBER( cbm2_state::sid_potx_r )
switch (m_cia_pa >> 6)
{
- case 1: data = m_joy1->pot_x_r(); break;
- case 2: data = m_joy2->pot_x_r(); break;
+ case 1: data = m_joy1->read_pot_x(); break;
+ case 2: data = m_joy2->read_pot_x(); break;
case 3:
if (m_joy1->has_pot_x() && m_joy2->has_pot_x())
{
- data = 1 / (1 / m_joy1->pot_x_r() + 1 / m_joy2->pot_x_r());
+ data = 1 / (1 / m_joy1->read_pot_x() + 1 / m_joy2->read_pot_x());
}
else if (m_joy1->has_pot_x())
{
- data = m_joy1->pot_x_r();
+ data = m_joy1->read_pot_x();
}
else if (m_joy2->has_pot_x())
{
- data = m_joy2->pot_x_r();
+ data = m_joy2->read_pot_x();
}
break;
}
@@ -1499,20 +1499,20 @@ READ8_MEMBER( cbm2_state::sid_poty_r )
switch (m_cia_pa >> 6)
{
- case 1: data = m_joy1->pot_y_r(); break;
- case 2: data = m_joy2->pot_y_r(); break;
+ case 1: data = m_joy1->read_pot_y(); break;
+ case 2: data = m_joy2->read_pot_y(); break;
case 3:
if (m_joy1->has_pot_y() && m_joy2->has_pot_y())
{
- data = 1 / (1 / m_joy1->pot_y_r() + 1 / m_joy2->pot_y_r());
+ data = 1 / (1 / m_joy1->read_pot_y() + 1 / m_joy2->read_pot_y());
}
else if (m_joy1->has_pot_y())
{
- data = m_joy1->pot_y_r();
+ data = m_joy1->read_pot_y();
}
else if (m_joy2->has_pot_y())
{
- data = m_joy2->pot_y_r();
+ data = m_joy2->read_pot_y();
}
break;
}
@@ -1830,8 +1830,8 @@ READ8_MEMBER( cbm2_state::cia_pa_r )
data &= m_user->d1_r(space, 0);
// joystick
- data &= ~(!BIT(m_joy1->joy_r(), 5) << 6);
- data &= ~(!BIT(m_joy2->joy_r(), 5) << 7);
+ data &= ~(!BIT(m_joy1->read_joy(), 5) << 6);
+ data &= ~(!BIT(m_joy2->read_joy(), 5) << 7);
return data;
}
@@ -1883,8 +1883,8 @@ READ8_MEMBER( cbm2_state::cia_pb_r )
uint8_t data = 0;
// joystick
- data |= m_joy1->joy_r() & 0x0f;
- data |= (m_joy2->joy_r() & 0x0f) << 4;
+ data |= m_joy1->read_joy() & 0x0f;
+ data |= (m_joy2->read_joy() & 0x0f) << 4;
// user port
data &= m_user->d2_r(space, 0);
diff --git a/src/mame/drivers/chinagat.cpp b/src/mame/drivers/chinagat.cpp
index 10bdfc58523..a4ddd731712 100644
--- a/src/mame/drivers/chinagat.cpp
+++ b/src/mame/drivers/chinagat.cpp
@@ -292,7 +292,7 @@ WRITE8_MEMBER(chinagat_state::saiyugoub1_adpcm_control_w )
if (((m_i8748_P2 & 0xc) >= 8) && ((data & 0xc) == 4))
{
- m_adpcm->data_w(m_pcm_nibble);
+ m_adpcm->write_data(m_pcm_nibble);
logerror("Writing %02x to m5205\n", m_pcm_nibble);
}
logerror("$ROM=%08x P1=%02x P2=%02x Prev_P2=%02x Nibble=%1x PCM_data=%02x\n", m_adpcm_addr, m_i8748_P1, data, m_i8748_P2, m_pcm_shift, m_pcm_nibble);
diff --git a/src/mame/drivers/chinsan.cpp b/src/mame/drivers/chinsan.cpp
index 35170468855..fa5d01bc0b3 100644
--- a/src/mame/drivers/chinsan.cpp
+++ b/src/mame/drivers/chinsan.cpp
@@ -38,14 +38,14 @@
class chinsan_state : public driver_device
{
public:
- chinsan_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ chinsan_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_video_ram(*this, "video_ram"), m_color_ram(*this, "color_ram"),
m_gfxdecode(*this, "gfxdecode"),
m_adpcm(*this, "adpcm"),
- m_inputs_p1{ {*this, "p1_0"}, {*this, "p1_1"}, {*this, "p1_2"}, {*this, "p1_3"}, {*this, "p1_4"} },
- m_inputs_p2{ {*this, "p2_0"}, {*this, "p2_1"}, {*this, "p2_2"}, {*this, "p2_3"}, {*this, "p2_4"} },
+ m_inputs_p1(*this, "p1_%u", 0U),
+ m_inputs_p2(*this, "p2_%u", 0U),
m_bank1(*this, "bank1"), m_bank0d(*this, "bank0d"), m_bank1d(*this, "bank1d"),
m_tilemap(nullptr),
m_int_enabled(false),
@@ -83,8 +83,8 @@ private:
required_shared_ptr<uint8_t> m_color_ram;
required_device<gfxdecode_device> m_gfxdecode;
optional_device<msm5205_device> m_adpcm;
- required_ioport m_inputs_p1[5];
- required_ioport m_inputs_p2[5];
+ required_ioport_array<5> m_inputs_p1;
+ required_ioport_array<5> m_inputs_p2;
required_memory_bank m_bank1;
optional_memory_bank m_bank0d;
optional_memory_bank m_bank1d;
@@ -419,7 +419,7 @@ WRITE_LINE_MEMBER( chinsan_state::adpcm_int_w )
uint8_t *ROM = memregion("adpcm")->base();
m_adpcm_data = ((m_trigger ? (ROM[m_adpcm_pos] & 0x0f) : (ROM[m_adpcm_pos] & 0xf0) >> 4));
- m_adpcm->data_w(m_adpcm_data & 0xf);
+ m_adpcm->write_data(m_adpcm_data & 0xf);
m_trigger ^= 1;
if (m_trigger == 0)
{
diff --git a/src/mame/drivers/combatsc.cpp b/src/mame/drivers/combatsc.cpp
index c249fb8b622..a2eda5e116a 100644
--- a/src/mame/drivers/combatsc.cpp
+++ b/src/mame/drivers/combatsc.cpp
@@ -405,7 +405,7 @@ WRITE8_MEMBER(combatsc_state::combatscb_msm_w)
membank("bl_abank")->set_entry(BIT(data, 7));
m_msm->reset_w(BIT(data, 4));
- m_msm->data_w(data & 0x0f);
+ m_msm->write_data(data & 0x0f);
}
WRITE8_MEMBER(combatsc_state::combatscb_sound_irq_ack)
diff --git a/src/mame/drivers/crgolf.cpp b/src/mame/drivers/crgolf.cpp
index 13fbb63b7ca..36ebdc417bc 100644
--- a/src/mame/drivers/crgolf.cpp
+++ b/src/mame/drivers/crgolf.cpp
@@ -196,7 +196,7 @@ WRITE_LINE_MEMBER(crgolf_state::vck_callback)
uint8_t data = memregion("adpcm")->base()[m_sample_offset >> 1];
/* write the next nibble and advance */
- m_msm->data_w((data >> (4 * (~m_sample_offset & 1))) & 0x0f);
+ m_msm->write_data((data >> (4 * (~m_sample_offset & 1))) & 0x0f);
m_sample_offset++;
/* every 256 clocks, we decrement the length */
diff --git a/src/mame/drivers/dacholer.cpp b/src/mame/drivers/dacholer.cpp
index b9b4602c55b..e1cb3ba5039 100644
--- a/src/mame/drivers/dacholer.cpp
+++ b/src/mame/drivers/dacholer.cpp
@@ -593,7 +593,7 @@ WRITE_LINE_MEMBER(dacholer_state::adpcm_int)
{
if (m_snd_interrupt_enable == 1 || (m_snd_interrupt_enable == 0 && m_msm_toggle == 1))
{
- m_msm->data_w(m_msm_data >> 4);
+ m_msm->write_data(m_msm_data >> 4);
m_msm_data <<= 4;
m_msm_toggle ^= 1;
if (m_msm_toggle == 0)
diff --git a/src/mame/drivers/darius.cpp b/src/mame/drivers/darius.cpp
index 0d2107bab8e..35f6a066347 100644
--- a/src/mame/drivers/darius.cpp
+++ b/src/mame/drivers/darius.cpp
@@ -483,7 +483,7 @@ WRITE8_MEMBER(darius_state::adpcm_nmi_enable)
WRITE8_MEMBER(darius_state::adpcm_data_w)
{
- m_msm->data_w(data);
+ m_msm->write_data(data);
m_msm->reset_w(!(data & 0x20)); /* my best guess, but it could be output enable as well */
}
diff --git a/src/mame/drivers/ddragon.cpp b/src/mame/drivers/ddragon.cpp
index fd7027a454a..56f0d015119 100644
--- a/src/mame/drivers/ddragon.cpp
+++ b/src/mame/drivers/ddragon.cpp
@@ -453,7 +453,7 @@ void ddragon_state::dd_adpcm_int( msm5205_device *device, int chip )
}
else if (m_adpcm_data[chip] != -1)
{
- device->data_w(m_adpcm_data[chip] & 0x0f);
+ device->write_data(m_adpcm_data[chip] & 0x0f);
m_adpcm_data[chip] = -1;
}
else
@@ -461,7 +461,7 @@ void ddragon_state::dd_adpcm_int( msm5205_device *device, int chip )
uint8_t *ROM = memregion("adpcm")->base() + 0x10000 * chip;
m_adpcm_data[chip] = ROM[m_adpcm_pos[chip]++];
- device->data_w(m_adpcm_data[chip] >> 4);
+ device->write_data(m_adpcm_data[chip] >> 4);
}
}
diff --git a/src/mame/drivers/de_2.cpp b/src/mame/drivers/de_2.cpp
index aed7e0104c4..1c845825bbb 100644
--- a/src/mame/drivers/de_2.cpp
+++ b/src/mame/drivers/de_2.cpp
@@ -245,7 +245,7 @@ WRITE_LINE_MEMBER(de_2_state::ym2151_irq_w)
WRITE_LINE_MEMBER(de_2_state::msm5205_irq_w)
{
- m_msm5205->data_w(m_sample_data >> 4);
+ m_msm5205->write_data(m_sample_data >> 4);
if(m_more_data)
{
if(m_nmi_enable)
diff --git a/src/mame/drivers/dec8.cpp b/src/mame/drivers/dec8.cpp
index f2c0776583f..eb914d7598f 100644
--- a/src/mame/drivers/dec8.cpp
+++ b/src/mame/drivers/dec8.cpp
@@ -380,7 +380,7 @@ WRITE_LINE_MEMBER(dec8_state::csilver_adpcm_int)
if (m_toggle)
m_audiocpu->set_input_line(m6502_device::IRQ_LINE, HOLD_LINE);
- m_msm->data_w(m_msm5205next >> 4);
+ m_msm->write_data(m_msm5205next >> 4);
m_msm5205next <<= 4;
}
diff --git a/src/mame/drivers/docastle.cpp b/src/mame/drivers/docastle.cpp
index c0b742b3500..37cc08a423b 100644
--- a/src/mame/drivers/docastle.cpp
+++ b/src/mame/drivers/docastle.cpp
@@ -205,13 +205,13 @@ WRITE_LINE_MEMBER(docastle_state::idsoccer_adpcm_int)
}
else if (m_adpcm_data != -1)
{
- m_msm->data_w(m_adpcm_data & 0x0f);
+ m_msm->write_data(m_adpcm_data & 0x0f);
m_adpcm_data = -1;
}
else
{
m_adpcm_data = memregion("adpcm")->base()[m_adpcm_pos++];
- m_msm->data_w(m_adpcm_data >> 4);
+ m_msm->write_data(m_adpcm_data >> 4);
}
}
diff --git a/src/mame/drivers/drmicro.cpp b/src/mame/drivers/drmicro.cpp
index 8b62479ea08..586bd4d25b6 100644
--- a/src/mame/drivers/drmicro.cpp
+++ b/src/mame/drivers/drmicro.cpp
@@ -55,7 +55,7 @@ WRITE_LINE_MEMBER(drmicro_state::pcm_w)
if (~m_pcm_adr & 1)
data >>= 4;
- m_msm->data_w(data & 0x0f);
+ m_msm->write_data(data & 0x0f);
m_msm->reset_w(0);
m_pcm_adr = (m_pcm_adr + 1) & 0x7fff;
diff --git a/src/mame/drivers/dynax.cpp b/src/mame/drivers/dynax.cpp
index 289b874f55f..9dfb8e84191 100644
--- a/src/mame/drivers/dynax.cpp
+++ b/src/mame/drivers/dynax.cpp
@@ -317,7 +317,7 @@ void dynax_state::nanajign_palette_update(offs_t offset)
WRITE_LINE_MEMBER(dynax_state::adpcm_int)
{
- m_msm->data_w(m_msm5205next >> 4);
+ m_msm->write_data(m_msm5205next >> 4);
m_msm5205next <<= 4;
m_toggle = 1 - m_toggle;
@@ -331,7 +331,7 @@ WRITE_LINE_MEMBER(dynax_state::adpcm_int)
WRITE_LINE_MEMBER(dynax_state::adpcm_int_cpu1)
{
- m_msm->data_w(m_msm5205next >> 4);
+ m_msm->write_data(m_msm5205next >> 4);
m_msm5205next <<= 4;
m_toggle_cpu1 = 1 - m_toggle_cpu1;
diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp
index c6ecfe7520f..83d74c7d199 100644
--- a/src/mame/drivers/fantland.cpp
+++ b/src/mame/drivers/fantland.cpp
@@ -396,7 +396,7 @@ void fantland_state::borntofi_adpcm_int( msm5205_device *device, int voice )
}
else
{
- device->data_w(rom[start / 2] >> ((start & 1) * 4));
+ device->write_data(rom[start / 2] >> ((start & 1) * 4));
m_adpcm_nibble[voice]++;
}
}
diff --git a/src/mame/drivers/fcrash.cpp b/src/mame/drivers/fcrash.cpp
index bf717d868cf..a235c88e07c 100644
--- a/src/mame/drivers/fcrash.cpp
+++ b/src/mame/drivers/fcrash.cpp
@@ -145,7 +145,7 @@ WRITE8_MEMBER( cps_state::knightsb_snd_bankswitch_w )
WRITE_LINE_MEMBER(cps_state::m5205_int1)
{
- m_msm_1->data_w(m_sample_buffer1 & 0x0f);
+ m_msm_1->write_data(m_sample_buffer1 & 0x0f);
m_sample_buffer1 >>= 4;
m_sample_select1 ^= 1;
if (m_sample_select1 == 0)
@@ -154,7 +154,7 @@ WRITE_LINE_MEMBER(cps_state::m5205_int1)
WRITE_LINE_MEMBER(cps_state::m5205_int2)
{
- m_msm_2->data_w(m_sample_buffer2 & 0x0f);
+ m_msm_2->write_data(m_sample_buffer2 & 0x0f);
m_sample_buffer2 >>= 4;
m_sample_select2 ^= 1;
}
diff --git a/src/mame/drivers/fromance.cpp b/src/mame/drivers/fromance.cpp
index fb3efdd7016..a1ac481669c 100644
--- a/src/mame/drivers/fromance.cpp
+++ b/src/mame/drivers/fromance.cpp
@@ -162,7 +162,7 @@ WRITE_LINE_MEMBER(fromance_state::fromance_adpcm_int)
/* clock the data through */
if (m_vclk_left)
{
- m_msm->data_w(m_adpcm_data >> 4);
+ m_msm->write_data(m_adpcm_data >> 4);
m_adpcm_data <<= 4;
m_vclk_left--;
}
diff --git a/src/mame/drivers/gladiatr.cpp b/src/mame/drivers/gladiatr.cpp
index 6b190f29efa..19c968f1889 100644
--- a/src/mame/drivers/gladiatr.cpp
+++ b/src/mame/drivers/gladiatr.cpp
@@ -232,7 +232,7 @@ WRITE8_MEMBER(gladiatr_state::gladiator_adpcm_w)
// bit 6 = bank offset
membank("bank2")->set_entry((data & 0x40) ? 1 : 0);
- m_msm->data_w(data); // bit 0..3
+ m_msm->write_data(data); // bit 0..3
m_msm->reset_w(BIT(data, 5)); // bit 5
m_msm->vclk_w (BIT(data, 4)); // bit 4
}
@@ -242,7 +242,7 @@ WRITE8_MEMBER(ppking_state::ppking_adpcm_w)
// bit 6 = bank offset
//membank("bank2")->set_entry((data & 0x40) ? 1 : 0);
- m_msm->data_w(data); // bit 0..3
+ m_msm->write_data(data); // bit 0..3
m_msm->reset_w(BIT(data, 5)); // bit 5
m_msm->vclk_w (BIT(data, 4)); // bit 4
}
diff --git a/src/mame/drivers/goal92.cpp b/src/mame/drivers/goal92.cpp
index 3eb4b7d09b9..5e9c6cc533a 100644
--- a/src/mame/drivers/goal92.cpp
+++ b/src/mame/drivers/goal92.cpp
@@ -223,7 +223,7 @@ WRITE_LINE_MEMBER(goal92_state::irqhandler)
WRITE_LINE_MEMBER(goal92_state::goal92_adpcm_int)
{
- m_msm->data_w(m_msm5205next);
+ m_msm->write_data(m_msm5205next);
m_msm5205next >>= 4;
m_adpcm_toggle^= 1;
diff --git a/src/mame/drivers/gsword.cpp b/src/mame/drivers/gsword.cpp
index 4ffe3855bc1..934529b46cd 100644
--- a/src/mame/drivers/gsword.cpp
+++ b/src/mame/drivers/gsword.cpp
@@ -264,7 +264,7 @@ WRITE8_MEMBER(gsword_state::sound_command_w)
WRITE8_MEMBER(gsword_state::adpcm_data_w)
{
- m_msm->data_w(data & 0x0f); // bit 0..3
+ m_msm->write_data(data & 0x0f); // bit 0..3
m_msm->reset_w(BIT(data, 5)); // bit 5
m_msm->vclk_w(BIT(data, 4)); // bit 4
}
diff --git a/src/mame/drivers/hnayayoi.cpp b/src/mame/drivers/hnayayoi.cpp
index 49c5f53ce04..5dbccbd5a13 100644
--- a/src/mame/drivers/hnayayoi.cpp
+++ b/src/mame/drivers/hnayayoi.cpp
@@ -81,7 +81,7 @@ WRITE8_MEMBER(hnayayoi_state::keyboard_w)
WRITE8_MEMBER(hnayayoi_state::adpcm_data_w)
{
- m_msm->data_w(data);
+ m_msm->write_data(data);
}
diff --git a/src/mame/drivers/jangou.cpp b/src/mame/drivers/jangou.cpp
index e739d931837..3cc88d6427b 100644
--- a/src/mame/drivers/jangou.cpp
+++ b/src/mame/drivers/jangou.cpp
@@ -301,10 +301,10 @@ WRITE8_MEMBER(jangou_state::adpcm_w)
WRITE_LINE_MEMBER(jangou_state::jngolady_vclk_cb)
{
if (m_msm5205_vclk_toggle == 0)
- m_msm->data_w(m_adpcm_byte >> 4);
+ m_msm->write_data(m_adpcm_byte >> 4);
else
{
- m_msm->data_w(m_adpcm_byte & 0xf);
+ m_msm->write_data(m_adpcm_byte & 0xf);
m_cpu_1->set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/jantotsu.cpp b/src/mame/drivers/jantotsu.cpp
index 251068c8fa2..2cb5ae3af4a 100644
--- a/src/mame/drivers/jantotsu.cpp
+++ b/src/mame/drivers/jantotsu.cpp
@@ -317,7 +317,7 @@ WRITE_LINE_MEMBER(jantotsu_state::jan_adpcm_int)
uint8_t *ROM = memregion("adpcm")->base();
m_adpcm_data = ((m_adpcm_trigger ? (ROM[m_adpcm_pos] & 0x0f) : (ROM[m_adpcm_pos] & 0xf0) >> 4));
- m_adpcm->data_w(m_adpcm_data & 0xf);
+ m_adpcm->write_data(m_adpcm_data & 0xf);
m_adpcm_trigger ^= 1;
if (m_adpcm_trigger == 0)
{
diff --git a/src/mame/drivers/kungfur.cpp b/src/mame/drivers/kungfur.cpp
index 950931dc81f..3a50028b76e 100644
--- a/src/mame/drivers/kungfur.cpp
+++ b/src/mame/drivers/kungfur.cpp
@@ -212,7 +212,7 @@ WRITE_LINE_MEMBER(kungfur_state::kfr_adpcm1_int)
uint8_t *ROM = memregion("adpcm1")->base();
uint8_t data = ROM[m_adpcm_pos[0] & 0x1ffff];
- m_adpcm1->data_w(m_adpcm_sel[0] ? data & 0xf : data >> 4 & 0xf);
+ m_adpcm1->write_data(m_adpcm_sel[0] ? data & 0xf : data >> 4 & 0xf);
m_adpcm_pos[0] += m_adpcm_sel[0];
m_adpcm_sel[0] ^= 1;
}
@@ -222,7 +222,7 @@ WRITE_LINE_MEMBER(kungfur_state::kfr_adpcm2_int)
uint8_t *ROM = memregion("adpcm2")->base();
uint8_t data = ROM[m_adpcm_pos[1] & 0x3ffff];
- m_adpcm2->data_w(m_adpcm_sel[1] ? data & 0xf : data >> 4 & 0xf);
+ m_adpcm2->write_data(m_adpcm_sel[1] ? data & 0xf : data >> 4 & 0xf);
m_adpcm_pos[1] += m_adpcm_sel[1];
m_adpcm_sel[1] ^= 1;
}
diff --git a/src/mame/drivers/kurukuru.cpp b/src/mame/drivers/kurukuru.cpp
index 38ca813618c..a116d963c00 100644
--- a/src/mame/drivers/kurukuru.cpp
+++ b/src/mame/drivers/kurukuru.cpp
@@ -460,7 +460,7 @@ public:
WRITE_LINE_MEMBER(kurukuru_state::kurukuru_msm5205_vck)
{
m_soundirq->rst30_w(1);
- m_adpcm->data_w(m_adpcm_data);
+ m_adpcm->write_data(m_adpcm_data);
}
diff --git a/src/mame/drivers/lucky74.cpp b/src/mame/drivers/lucky74.cpp
index 714c8524aee..9666d9a0e26 100644
--- a/src/mame/drivers/lucky74.cpp
+++ b/src/mame/drivers/lucky74.cpp
@@ -1438,7 +1438,7 @@ WRITE_LINE_MEMBER(lucky74_state::lucky74_adpcm_int)
/* transferring 1st nibble */
m_adpcm_data = memregion("adpcm")->base()[m_adpcm_pos];
m_adpcm_pos = (m_adpcm_pos + 1) & 0xffff;
- m_msm->data_w(m_adpcm_data >> 4);
+ m_msm->write_data(m_adpcm_data >> 4);
if (m_adpcm_pos == m_adpcm_end)
{
@@ -1451,7 +1451,7 @@ WRITE_LINE_MEMBER(lucky74_state::lucky74_adpcm_int)
else
{
/* transferring 2nd nibble */
- m_msm->data_w(m_adpcm_data & 0x0f);
+ m_msm->write_data(m_adpcm_data & 0x0f);
m_adpcm_data = -1;
}
}
diff --git a/src/mame/drivers/lwings.cpp b/src/mame/drivers/lwings.cpp
index 794381d0667..629d91366e1 100644
--- a/src/mame/drivers/lwings.cpp
+++ b/src/mame/drivers/lwings.cpp
@@ -280,7 +280,7 @@ READ8_MEMBER(lwings_state::avengers_soundlatch2_r)
WRITE8_MEMBER(lwings_state::msm5205_w)
{
m_msm->reset_w(BIT(data, 7));
- m_msm->data_w(data);
+ m_msm->write_data(data);
m_msm->vclk_w(1);
m_msm->vclk_w(0);
}
diff --git a/src/mame/drivers/mastboy.cpp b/src/mame/drivers/mastboy.cpp
index d25a3e5ca43..dfd5dce3bb6 100644
--- a/src/mame/drivers/mastboy.cpp
+++ b/src/mame/drivers/mastboy.cpp
@@ -595,7 +595,7 @@ WRITE8_MEMBER(mastboy_state::msm5205_data_w)
WRITE_LINE_MEMBER(mastboy_state::adpcm_int)
{
- m_msm->data_w(m_m5205_next);
+ m_msm->write_data(m_m5205_next);
m_m5205_next >>= 4;
m_m5205_part ^= 1;
diff --git a/src/mame/drivers/mermaid.cpp b/src/mame/drivers/mermaid.cpp
index 22e251a14c3..4ae015c8fee 100644
--- a/src/mame/drivers/mermaid.cpp
+++ b/src/mame/drivers/mermaid.cpp
@@ -401,7 +401,7 @@ void mermaid_state::machine_reset()
WRITE8_MEMBER(mermaid_state::adpcm_data_w)
{
m_adpcm_data = data;
- m_adpcm->data_w(m_adpcm_trigger ? (data & 0x0f) : (data & 0xf0) >> 4);
+ m_adpcm->write_data(m_adpcm_trigger ? (data & 0x0f) : (data & 0xf0) >> 4);
}
WRITE_LINE_MEMBER(mermaid_state::rougien_adpcm_int)
@@ -410,7 +410,7 @@ WRITE_LINE_MEMBER(mermaid_state::rougien_adpcm_int)
return;
m_adpcm_trigger ^= 1;
- m_adpcm->data_w(m_adpcm_trigger ? (m_adpcm_data & 0x0f) : (m_adpcm_data & 0xf0) >> 4);
+ m_adpcm->write_data(m_adpcm_trigger ? (m_adpcm_data & 0x0f) : (m_adpcm_data & 0xf0) >> 4);
m_adpcm_counter->clock_w(m_adpcm_trigger);
if (m_adpcm_trigger == 0 && m_adpcm_counter->count() == 0)
{
diff --git a/src/mame/drivers/mgavegas.cpp b/src/mame/drivers/mgavegas.cpp
index 04f1aeac376..1559beb1079 100644
--- a/src/mame/drivers/mgavegas.cpp
+++ b/src/mame/drivers/mgavegas.cpp
@@ -52,8 +52,8 @@ Ver. 2.2 should exist
class mgavegas_state : public driver_device
{
public:
- mgavegas_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ mgavegas_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ay(*this, "aysnd"),
m_msm(*this, "5205"),
@@ -353,7 +353,7 @@ WRITE8_MEMBER(mgavegas_state::csoki_w)
if (LOG_MSM5205)
logerror("MSM5205 write to %04X data = %02X \n",offset+0xc800,data);
m_msm->reset_w(data&0x10>>4);
- m_msm->data_w(data&0x0f);
+ m_msm->write_data(data&0x0f);
}
diff --git a/src/mame/drivers/mjkjidai.cpp b/src/mame/drivers/mjkjidai.cpp
index 85db83060b9..557b5fcaaca 100644
--- a/src/mame/drivers/mjkjidai.cpp
+++ b/src/mame/drivers/mjkjidai.cpp
@@ -48,7 +48,7 @@ WRITE_LINE_MEMBER(mjkjidai_state::adpcm_int)
else
{
uint8_t const data = m_adpcmrom[m_adpcm_pos / 2];
- m_msm->data_w(m_adpcm_pos & 1 ? data & 0xf : data >> 4);
+ m_msm->write_data(m_adpcm_pos & 1 ? data & 0xf : data >> 4);
m_adpcm_pos++;
}
}
diff --git a/src/mame/drivers/mlanding.cpp b/src/mame/drivers/mlanding.cpp
index 2326f5efb19..2b6f07ac1c5 100644
--- a/src/mame/drivers/mlanding.cpp
+++ b/src/mame/drivers/mlanding.cpp
@@ -577,7 +577,7 @@ void mlanding_state::msm5205_update(int chip)
uint8_t data = rom[m_msm_pos[chip]];
msm5205_device *msm = chip ? m_msm2 : m_msm1;
- msm->data_w((m_msm_nibble[chip] ? data : data >> 4) & 0xf);
+ msm->write_data((m_msm_nibble[chip] ? data : data >> 4) & 0xf);
if (m_msm_nibble[chip])
++m_msm_pos[chip];
diff --git a/src/mame/drivers/ojankohs.cpp b/src/mame/drivers/ojankohs.cpp
index 6a18700aee0..231d84cef89 100644
--- a/src/mame/drivers/ojankohs.cpp
+++ b/src/mame/drivers/ojankohs.cpp
@@ -76,7 +76,7 @@ WRITE_LINE_MEMBER(ojankohs_state::ojankohs_adpcm_int)
/* clock the data through */
if (m_vclk_left)
{
- m_msm->data_w((m_adpcm_data >> 4));
+ m_msm->write_data((m_adpcm_data >> 4));
m_adpcm_data <<= 4;
m_vclk_left--;
}
diff --git a/src/mame/drivers/opwolf.cpp b/src/mame/drivers/opwolf.cpp
index 2496ad6690a..f6f4b621627 100644
--- a/src/mame/drivers/opwolf.cpp
+++ b/src/mame/drivers/opwolf.cpp
@@ -476,7 +476,7 @@ void opwolf_state::opwolf_msm5205_vck(msm5205_device *device,int chip)
{
if (m_adpcm_data[chip] != -1)
{
- device->data_w(m_adpcm_data[chip] & 0x0f);
+ device->write_data(m_adpcm_data[chip] & 0x0f);
m_adpcm_data[chip] = -1;
if (m_adpcm_pos[chip] == m_adpcm_end[chip])
{
@@ -488,7 +488,7 @@ void opwolf_state::opwolf_msm5205_vck(msm5205_device *device,int chip)
{
m_adpcm_data[chip] = memregion("adpcm")->base()[m_adpcm_pos[chip]];
m_adpcm_pos[chip] = (m_adpcm_pos[chip] + 1) & 0x7ffff;
- device->data_w(m_adpcm_data[chip] >> 4);
+ device->write_data(m_adpcm_data[chip] >> 4);
}
}
WRITE_LINE_MEMBER(opwolf_state::opwolf_msm5205_vck_1)
diff --git a/src/mame/drivers/pcktgal.cpp b/src/mame/drivers/pcktgal.cpp
index 7271ebad306..68301399655 100644
--- a/src/mame/drivers/pcktgal.cpp
+++ b/src/mame/drivers/pcktgal.cpp
@@ -50,7 +50,7 @@ WRITE8_MEMBER(pcktgal_state::sound_w)
WRITE_LINE_MEMBER(pcktgal_state::adpcm_int)
{
- m_msm->data_w(m_msm5205next >> 4);
+ m_msm->write_data(m_msm5205next >> 4);
m_msm5205next <<= 4;
m_toggle = 1 - m_toggle;
diff --git a/src/mame/drivers/pet.cpp b/src/mame/drivers/pet.cpp
index 03c712d4499..a57f80fc845 100644
--- a/src/mame/drivers/pet.cpp
+++ b/src/mame/drivers/pet.cpp
@@ -1833,7 +1833,7 @@ MACHINE_CONFIG_START(pet_state::pet)
MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL(8'000'000)/8, pet_expansion_cards, nullptr)
MCFG_PET_EXPANSION_SLOT_DMA_CALLBACKS(READ8(*this, pet_state, read), WRITE8(*this, pet_state, write))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, pet_user_port_cards, nullptr)
+ MCFG_DEVICE_ADD(PET_USER_PORT_TAG, PET_USER_PORT, pet_user_port_cards, nullptr)
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(*this, pet_state, user_diag_w))
MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(M6522_TAG, via6522_device, write_ca1))
MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(M6522_TAG, via6522_device, write_pa0))
@@ -2297,7 +2297,7 @@ MACHINE_CONFIG_START(pet80_state::pet80)
MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL(16'000'000)/16, pet_expansion_cards, nullptr)
MCFG_PET_EXPANSION_SLOT_DMA_CALLBACKS(READ8(*this, pet_state, read), WRITE8(*this, pet_state, write))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, pet_user_port_cards, nullptr)
+ MCFG_DEVICE_ADD(PET_USER_PORT_TAG, PET_USER_PORT, pet_user_port_cards, nullptr)
MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(M6522_TAG, via6522_device, write_ca1))
MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(M6522_TAG, via6522_device, write_pa0))
MCFG_PET_USER_PORT_D_HANDLER(WRITELINE(M6522_TAG, via6522_device, write_pa1))
diff --git a/src/mame/drivers/plus4.cpp b/src/mame/drivers/plus4.cpp
index 0d5dbe16406..92eb70c4da2 100644
--- a/src/mame/drivers/plus4.cpp
+++ b/src/mame/drivers/plus4.cpp
@@ -709,13 +709,13 @@ WRITE8_MEMBER( plus4_state::cpu_w )
//logerror("%s cpu write %02x\n", machine().describe_context(), data);
// serial data
- m_iec->data_w(!BIT(data, 0));
+ m_iec->host_data_w(!BIT(data, 0));
// serial clock
- m_iec->clk_w(!BIT(data, 1));
+ m_iec->host_clk_w(!BIT(data, 1));
// serial attention
- m_iec->atn_w(!BIT(data, 2));
+ m_iec->host_atn_w(!BIT(data, 2));
// cassette motor
m_cassette->motor_w(BIT(data, 3));
@@ -758,7 +758,7 @@ READ8_MEMBER( plus4_state::ted_k_r )
// joystick
if (!BIT(offset, 2))
{
- uint8_t joy_a = m_joy1->joy_r();
+ uint8_t joy_a = m_joy1->read_joy();
data &= (0xf0 | (joy_a & 0x0f));
data &= ~(!BIT(joy_a, 5) << 6);
@@ -766,7 +766,7 @@ READ8_MEMBER( plus4_state::ted_k_r )
if (!BIT(offset, 1))
{
- uint8_t joy_b = m_joy2->joy_r();
+ uint8_t joy_b = m_joy2->read_joy();
data &= (0xf0 | (joy_b & 0x0f));
data &= ~(!BIT(joy_b, 5) << 7);
@@ -914,37 +914,37 @@ MACHINE_CONFIG_START(plus4_state::plus4)
// devices
MCFG_PLS100_ADD(PLA_TAG)
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, plus4_user_port_cards, nullptr)
- MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(MOS6529_USER_TAG, mos6529_device, write_p2)) // cassette sense
- MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(MOS6529_USER_TAG, mos6529_device, write_p3))
- MCFG_PET_USER_PORT_6_HANDLER(WRITELINE(MOS6529_USER_TAG, mos6529_device, write_p4))
- MCFG_PET_USER_PORT_7_HANDLER(WRITELINE(MOS6529_USER_TAG, mos6529_device, write_p5))
- MCFG_PET_USER_PORT_8_HANDLER(WRITELINE(MOS6551_TAG, mos6551_device, write_rxc))
- MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(MOS6529_USER_TAG, mos6529_device, write_p0))
- MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(MOS6551_TAG, mos6551_device, write_rxd))
- MCFG_PET_USER_PORT_F_HANDLER(WRITELINE(MOS6529_USER_TAG, mos6529_device, write_p7))
- MCFG_PET_USER_PORT_H_HANDLER(WRITELINE(MOS6551_TAG, mos6551_device, write_dcd)) MCFG_DEVCB_XOR(1) // TODO: add missing pull up before inverter
- MCFG_PET_USER_PORT_J_HANDLER(WRITELINE(MOS6529_USER_TAG, mos6529_device, write_p6))
- MCFG_PET_USER_PORT_K_HANDLER(WRITELINE(MOS6529_USER_TAG, mos6529_device, write_p1))
- MCFG_PET_USER_PORT_L_HANDLER(WRITELINE(MOS6551_TAG, mos6551_device, write_dsr)) MCFG_DEVCB_XOR(1) // TODO: add missing pull up before inverter
-
- MCFG_DEVICE_ADD(MOS6551_TAG, MOS6551, 0)
+ MCFG_DEVICE_ADD(m_user, PET_USER_PORT, plus4_user_port_cards, nullptr)
+ MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(m_spi_user, mos6529_device, write_p2)) // cassette sense
+ MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(m_spi_user, mos6529_device, write_p3))
+ MCFG_PET_USER_PORT_6_HANDLER(WRITELINE(m_spi_user, mos6529_device, write_p4))
+ MCFG_PET_USER_PORT_7_HANDLER(WRITELINE(m_spi_user, mos6529_device, write_p5))
+ MCFG_PET_USER_PORT_8_HANDLER(WRITELINE(m_acia, mos6551_device, write_rxc))
+ MCFG_PET_USER_PORT_B_HANDLER(WRITELINE(m_spi_user, mos6529_device, write_p0))
+ MCFG_PET_USER_PORT_C_HANDLER(WRITELINE(m_acia, mos6551_device, write_rxd))
+ MCFG_PET_USER_PORT_F_HANDLER(WRITELINE(m_spi_user, mos6529_device, write_p7))
+ MCFG_PET_USER_PORT_H_HANDLER(WRITELINE(m_acia, mos6551_device, write_dcd)) MCFG_DEVCB_XOR(1) // TODO: add missing pull up before inverter
+ MCFG_PET_USER_PORT_J_HANDLER(WRITELINE(m_spi_user, mos6529_device, write_p6))
+ MCFG_PET_USER_PORT_K_HANDLER(WRITELINE(m_spi_user, mos6529_device, write_p1))
+ MCFG_PET_USER_PORT_L_HANDLER(WRITELINE(m_acia, mos6551_device, write_dsr)) MCFG_DEVCB_XOR(1) // TODO: add missing pull up before inverter
+
+ MCFG_DEVICE_ADD(m_acia, MOS6551, 0)
MCFG_MOS6551_XTAL(XTAL(1'843'200))
- MCFG_MOS6551_RXC_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_8))
- MCFG_MOS6551_RTS_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_d)) MCFG_DEVCB_XOR(1)
- MCFG_MOS6551_DTR_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_e)) MCFG_DEVCB_XOR(1)
- MCFG_MOS6551_TXD_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_m))
+ MCFG_MOS6551_RXC_HANDLER(WRITELINE(m_user, pet_user_port_device, write_8))
+ MCFG_MOS6551_RTS_HANDLER(WRITELINE(m_user, pet_user_port_device, write_d)) MCFG_DEVCB_XOR(1)
+ MCFG_MOS6551_DTR_HANDLER(WRITELINE(m_user, pet_user_port_device, write_e)) MCFG_DEVCB_XOR(1)
+ MCFG_MOS6551_TXD_HANDLER(WRITELINE(m_user, pet_user_port_device, write_m))
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(*this, plus4_state, acia_irq_w))
- MCFG_DEVICE_ADD(MOS6529_USER_TAG, MOS6529, 0)
- MCFG_MOS6529_P0_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_b))
- MCFG_MOS6529_P1_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_k))
- MCFG_MOS6529_P2_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_4))
- MCFG_MOS6529_P3_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_5))
- MCFG_MOS6529_P4_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_6))
- MCFG_MOS6529_P5_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_7))
- MCFG_MOS6529_P6_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_j))
- MCFG_MOS6529_P7_HANDLER(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_f))
+ MCFG_DEVICE_ADD(m_spi_user, MOS6529, 0)
+ MCFG_MOS6529_P0_HANDLER(WRITELINE(m_user, pet_user_port_device, write_b))
+ MCFG_MOS6529_P1_HANDLER(WRITELINE(m_user, pet_user_port_device, write_k))
+ MCFG_MOS6529_P2_HANDLER(WRITELINE(m_user, pet_user_port_device, write_4))
+ MCFG_MOS6529_P3_HANDLER(WRITELINE(m_user, pet_user_port_device, write_5))
+ MCFG_MOS6529_P4_HANDLER(WRITELINE(m_user, pet_user_port_device, write_6))
+ MCFG_MOS6529_P5_HANDLER(WRITELINE(m_user, pet_user_port_device, write_7))
+ MCFG_MOS6529_P6_HANDLER(WRITELINE(m_user, pet_user_port_device, write_j))
+ MCFG_MOS6529_P7_HANDLER(WRITELINE(m_user, pet_user_port_device, write_f))
MCFG_DEVICE_ADD(MOS6529_KB_TAG, MOS6529, 0)
MCFG_MOS6529_P0_HANDLER(WRITELINE(*this, plus4_state, write_kb0))
@@ -959,7 +959,7 @@ MACHINE_CONFIG_START(plus4_state::plus4)
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, plus4_datassette_devices, "c1531", NOOP)
MCFG_CBM_IEC_ADD("c1541")
- MCFG_CBM_IEC_BUS_ATN_CALLBACK(WRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_9))
+ MCFG_CBM_IEC_BUS_ATN_CALLBACK(WRITELINE(m_user, pet_user_port_device, write_9))
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy")
diff --git a/src/mame/drivers/renegade.cpp b/src/mame/drivers/renegade.cpp
index cf6d873bad1..5d3d7768d21 100644
--- a/src/mame/drivers/renegade.cpp
+++ b/src/mame/drivers/renegade.cpp
@@ -165,7 +165,7 @@ WRITE_LINE_MEMBER(renegade_state::adpcm_int)
else
{
uint8_t const data = m_adpcmrom[m_adpcm_pos / 2];
- m_msm->data_w(m_adpcm_pos & 1 ? data & 0xf : data >> 4);
+ m_msm->write_data(m_adpcm_pos & 1 ? data & 0xf : data >> 4);
m_adpcm_pos++;
}
}
diff --git a/src/mame/drivers/rmhaihai.cpp b/src/mame/drivers/rmhaihai.cpp
index 61936fb72d8..8115e0bd9b3 100644
--- a/src/mame/drivers/rmhaihai.cpp
+++ b/src/mame/drivers/rmhaihai.cpp
@@ -47,7 +47,8 @@ public:
m_msm(*this, "msm"),
m_gfxdecode(*this, "gfxdecode"),
m_colorram(*this, "colorram"),
- m_videoram(*this, "videoram") { }
+ m_videoram(*this, "videoram")
+ { }
void init_rmhaihai();
void rmhaihai(machine_config &config);
@@ -212,9 +213,9 @@ READ8_MEMBER(rmhaihai_state::samples_r)
WRITE8_MEMBER(rmhaihai_state::adpcm_w)
{
- m_msm->data_w(data); /* bit0..3 */
- m_msm->reset_w(BIT(data, 5)); /* bit 5 */
- m_msm->vclk_w(BIT(data, 4)); /* bit4 */
+ m_msm->write_data(data); // bit0..3
+ m_msm->reset_w(BIT(data, 5)); // bit 5
+ m_msm->vclk_w(BIT(data, 4)); // bit4
}
WRITE8_MEMBER(rmhaihai_state::ctrl_w)
diff --git a/src/mame/drivers/sf.cpp b/src/mame/drivers/sf.cpp
index b7b61248e26..3c1a509bab5 100644
--- a/src/mame/drivers/sf.cpp
+++ b/src/mame/drivers/sf.cpp
@@ -148,7 +148,7 @@ WRITE8_MEMBER(sf_state::msm_w)
{
m_msm[Chip]->reset_w(BIT(data, 7));
/* ?? bit 6?? */
- m_msm[Chip]->data_w(data);
+ m_msm[Chip]->write_data(data);
m_msm[Chip]->vclk_w(1);
m_msm[Chip]->vclk_w(0);
}
diff --git a/src/mame/drivers/sothello.cpp b/src/mame/drivers/sothello.cpp
index 4028f7dabef..27d0a913a83 100644
--- a/src/mame/drivers/sothello.cpp
+++ b/src/mame/drivers/sothello.cpp
@@ -344,7 +344,7 @@ INPUT_PORTS_END
WRITE_LINE_MEMBER(sothello_state::adpcm_int)
{
/* only 4 bits are used */
- m_msm->data_w(m_msm_data & 0x0f);
+ m_msm->write_data(m_msm_data & 0x0f);
m_soundcpu->set_input_line(0, ASSERT_LINE);
}
diff --git a/src/mame/drivers/spdodgeb.cpp b/src/mame/drivers/spdodgeb.cpp
index e4fe0a4d237..b937f73a657 100644
--- a/src/mame/drivers/spdodgeb.cpp
+++ b/src/mame/drivers/spdodgeb.cpp
@@ -68,7 +68,7 @@ void spdodgeb_state::spd_adpcm_int( msm5205_device *device, int chip )
}
else if (m_adpcm_data[chip] != -1)
{
- device->data_w(m_adpcm_data[chip] & 0x0f);
+ device->write_data(m_adpcm_data[chip] & 0x0f);
m_adpcm_data[chip] = -1;
}
else
@@ -76,7 +76,7 @@ void spdodgeb_state::spd_adpcm_int( msm5205_device *device, int chip )
uint8_t *ROM = memregion("adpcm")->base() + 0x10000 * chip;
m_adpcm_data[chip] = ROM[m_adpcm_pos[chip]++];
- device->data_w(m_adpcm_data[chip] >> 4);
+ device->write_data(m_adpcm_data[chip] >> 4);
}
}
diff --git a/src/mame/drivers/splash.cpp b/src/mame/drivers/splash.cpp
index 4aee49760a7..f4af04c878e 100644
--- a/src/mame/drivers/splash.cpp
+++ b/src/mame/drivers/splash.cpp
@@ -106,7 +106,7 @@ WRITE8_MEMBER(splash_state::splash_adpcm_control_w)
WRITE_LINE_MEMBER(splash_state::splash_msm5205_int)
{
- m_msm->data_w(m_adpcm_data >> 4);
+ m_msm->write_data(m_adpcm_data >> 4);
m_adpcm_data = (m_adpcm_data << 4) & 0xf0;
}
@@ -600,7 +600,7 @@ WRITE_LINE_MEMBER(funystrp_state::adpcm_int1)
{
if (m_snd_interrupt_enable1 || m_msm_toggle1 == 1)
{
- m_msm1->data_w(m_msm_data1 >> 4);
+ m_msm1->write_data(m_msm_data1 >> 4);
m_msm_data1 <<= 4;
m_msm_toggle1 ^= 1;
if (m_msm_toggle1 == 0)
@@ -615,7 +615,7 @@ WRITE_LINE_MEMBER(funystrp_state::adpcm_int2)
{
if (m_snd_interrupt_enable2 || m_msm_toggle2 == 1)
{
- m_msm2->data_w(m_msm_data2 >> 4);
+ m_msm2->write_data(m_msm_data2 >> 4);
m_msm_data2 <<= 4;
m_msm_toggle2 ^= 1;
if (m_msm_toggle2 == 0)
diff --git a/src/mame/drivers/srmp2.cpp b/src/mame/drivers/srmp2.cpp
index 1ef157a9956..fb4606a082d 100644
--- a/src/mame/drivers/srmp2.cpp
+++ b/src/mame/drivers/srmp2.cpp
@@ -245,12 +245,12 @@ WRITE_LINE_MEMBER(srmp2_state::adpcm_int)
}
else
{
- m_msm->data_w(((m_adpcm_data >> 4) & 0x0f));
+ m_msm->write_data(((m_adpcm_data >> 4) & 0x0f));
}
}
else
{
- m_msm->data_w(((m_adpcm_data >> 0) & 0x0f));
+ m_msm->write_data(((m_adpcm_data >> 0) & 0x0f));
m_adpcm_sptr++;
m_adpcm_data = -1;
}
diff --git a/src/mame/drivers/suprgolf.cpp b/src/mame/drivers/suprgolf.cpp
index 7309e223ef1..0fcda6f05ba 100644
--- a/src/mame/drivers/suprgolf.cpp
+++ b/src/mame/drivers/suprgolf.cpp
@@ -35,13 +35,14 @@
class suprgolf_state : public driver_device
{
public:
- suprgolf_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ suprgolf_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_msm(*this, "msm"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_videoram(*this, "videoram") { }
+ m_videoram(*this, "videoram")
+ { }
required_device<cpu_device> m_maincpu;
required_device<msm5205_device> m_msm;
@@ -461,12 +462,12 @@ WRITE_LINE_MEMBER(suprgolf_state::adpcm_int)
m_toggle ^= 1;
if(m_toggle)
{
- m_msm->data_w((m_msm5205next & 0xf0) >> 4);
+ m_msm->write_data((m_msm5205next & 0xf0) >> 4);
if(m_msm_nmi_mask) { m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); }
}
else
{
- m_msm->data_w((m_msm5205next & 0x0f) >> 0);
+ m_msm->write_data((m_msm5205next & 0x0f) >> 0);
}
}
diff --git a/src/mame/drivers/system16.cpp b/src/mame/drivers/system16.cpp
index 53dea9c4095..532ba140f9f 100644
--- a/src/mame/drivers/system16.cpp
+++ b/src/mame/drivers/system16.cpp
@@ -368,7 +368,7 @@ WRITE8_MEMBER(segas1x_bootleg_state::tturfbl_msm5205_data_w)
WRITE_LINE_MEMBER(segas1x_bootleg_state::tturfbl_msm5205_callback)
{
- m_msm->data_w((m_sample_buffer >> 4) & 0x0f);
+ m_msm->write_data((m_sample_buffer >> 4) & 0x0f);
m_sample_buffer <<= 4;
m_sample_select ^= 1;
@@ -1175,7 +1175,7 @@ WRITE8_MEMBER(segas1x_bootleg_state::shdancbl_msm5205_data_w)
WRITE_LINE_MEMBER(segas1x_bootleg_state::shdancbl_msm5205_callback)
{
- m_msm->data_w(m_sample_buffer & 0x0f);
+ m_msm->write_data(m_sample_buffer & 0x0f);
m_sample_buffer >>= 4;
m_sample_select ^= 1;
diff --git a/src/mame/drivers/taito_l.cpp b/src/mame/drivers/taito_l.cpp
index 3a60f83eaf0..e691f4259e6 100644
--- a/src/mame/drivers/taito_l.cpp
+++ b/src/mame/drivers/taito_l.cpp
@@ -339,14 +339,14 @@ WRITE_LINE_MEMBER(champwr_state::msm5205_vck)
{
if (m_adpcm_data != -1)
{
- m_msm->data_w(m_adpcm_data & 0x0f);
+ m_msm->write_data(m_adpcm_data & 0x0f);
m_adpcm_data = -1;
}
else
{
m_adpcm_data = m_adpcm_rgn[m_adpcm_pos];
m_adpcm_pos = (m_adpcm_pos + 1) & 0x1ffff;
- m_msm->data_w(m_adpcm_data >> 4);
+ m_msm->write_data(m_adpcm_data >> 4);
}
}
diff --git a/src/mame/drivers/tbowl.cpp b/src/mame/drivers/tbowl.cpp
index 59e5d42eaf8..40e778f1f27 100644
--- a/src/mame/drivers/tbowl.cpp
+++ b/src/mame/drivers/tbowl.cpp
@@ -142,7 +142,7 @@ void tbowl_state::adpcm_int( msm5205_device *device, int num )
device->reset_w(1);
else if (m_adpcm_data[num] != -1)
{
- device->data_w(m_adpcm_data[num] & 0x0f);
+ device->write_data(m_adpcm_data[num] & 0x0f);
m_adpcm_data[num] = -1;
}
else
@@ -150,7 +150,7 @@ void tbowl_state::adpcm_int( msm5205_device *device, int num )
uint8_t *ROM = memregion("adpcm")->base() + 0x10000 * num;
m_adpcm_data[num] = ROM[m_adpcm_pos[num]++];
- device->data_w(m_adpcm_data[num] >> 4);
+ device->write_data(m_adpcm_data[num] >> 4);
}
}
diff --git a/src/mame/drivers/tecmo.cpp b/src/mame/drivers/tecmo.cpp
index 3c05672371a..40a22c6e7bd 100644
--- a/src/mame/drivers/tecmo.cpp
+++ b/src/mame/drivers/tecmo.cpp
@@ -95,7 +95,7 @@ WRITE_LINE_MEMBER(tecmo_state::adpcm_int)
m_msm->reset_w(1);
else if (m_adpcm_data != -1)
{
- m_msm->data_w(m_adpcm_data & 0x0f);
+ m_msm->write_data(m_adpcm_data & 0x0f);
m_adpcm_data = -1;
}
else
@@ -103,7 +103,7 @@ WRITE_LINE_MEMBER(tecmo_state::adpcm_int)
uint8_t *ROM = memregion("adpcm")->base();
m_adpcm_data = ROM[m_adpcm_pos++];
- m_msm->data_w(m_adpcm_data >> 4);
+ m_msm->write_data(m_adpcm_data >> 4);
}
}
diff --git a/src/mame/drivers/tehkanwc.cpp b/src/mame/drivers/tehkanwc.cpp
index d8d20403dde..a4d05511913 100644
--- a/src/mame/drivers/tehkanwc.cpp
+++ b/src/mame/drivers/tehkanwc.cpp
@@ -217,10 +217,10 @@ WRITE_LINE_MEMBER(tehkanwc_state::adpcm_int)
int msm_data = SAMPLES[m_msm_data_offs & 0x7fff];
if (m_toggle == 0)
- m_msm->data_w((msm_data >> 4) & 0x0f);
+ m_msm->write_data((msm_data >> 4) & 0x0f);
else
{
- m_msm->data_w(msm_data & 0x0f);
+ m_msm->write_data(msm_data & 0x0f);
m_msm_data_offs++;
}
diff --git a/src/mame/drivers/tigeroad.cpp b/src/mame/drivers/tigeroad.cpp
index db37dbb7a55..c9d41cc2e49 100644
--- a/src/mame/drivers/tigeroad.cpp
+++ b/src/mame/drivers/tigeroad.cpp
@@ -68,7 +68,7 @@ WRITE16_MEMBER(tigeroad_state::tigeroad_soundcmd_w)
WRITE8_MEMBER(tigeroad_state::msm5205_w)
{
m_msm->reset_w(BIT(data, 7));
- m_msm->data_w(data);
+ m_msm->write_data(data);
m_msm->vclk_w(1);
m_msm->vclk_w(0);
}
diff --git a/src/mame/drivers/toki.cpp b/src/mame/drivers/toki.cpp
index 0eb56e19618..20d63a7aff6 100644
--- a/src/mame/drivers/toki.cpp
+++ b/src/mame/drivers/toki.cpp
@@ -118,7 +118,7 @@ READ16_MEMBER(toki_state::pip_r)
WRITE_LINE_MEMBER(toki_state::tokib_adpcm_int)
{
- m_msm->data_w(m_msm5205next);
+ m_msm->write_data(m_msm5205next);
m_msm5205next >>= 4;
m_toggle ^= 1;
diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp
index 16840fac905..cba573bed2b 100644
--- a/src/mame/drivers/topspeed.cpp
+++ b/src/mame/drivers/topspeed.cpp
@@ -270,7 +270,7 @@ void topspeed_state::msm5205_update(int chip)
uint8_t data = m_msm_rom[chip][m_msm_pos[chip]];
- m_msm[chip]->data_w((m_msm_nibble[chip] ? data : data >> 4) & 0xf);
+ m_msm[chip]->write_data((m_msm_nibble[chip] ? data : data >> 4) & 0xf);
if (m_msm_nibble[chip])
++m_msm_pos[chip];
diff --git a/src/mame/drivers/tubep.cpp b/src/mame/drivers/tubep.cpp
index 136c69d973e..1949d4af032 100644
--- a/src/mame/drivers/tubep.cpp
+++ b/src/mame/drivers/tubep.cpp
@@ -537,12 +537,12 @@ WRITE_LINE_MEMBER(tubep_state::rjammer_adpcm_vck)
if (m_ls74 == 1)
{
- m_msm->data_w((m_ls377 >> 0) & 15);
+ m_msm->write_data((m_ls377 >> 0) & 15);
m_soundcpu->set_input_line(0, ASSERT_LINE);
}
else
{
- m_msm->data_w((m_ls377 >> 4) & 15);
+ m_msm->write_data((m_ls377 >> 4) & 15);
}
}
diff --git a/src/mame/drivers/vic10.cpp b/src/mame/drivers/vic10.cpp
index 2feee1721ed..008beb9f0d7 100644
--- a/src/mame/drivers/vic10.cpp
+++ b/src/mame/drivers/vic10.cpp
@@ -395,22 +395,22 @@ READ8_MEMBER( vic10_state::sid_potx_r )
{
uint8_t data = 0xff;
- switch (m_cia->pa_r() >> 6)
+ switch (m_cia->read_pa() >> 6)
{
- case 1: data = m_joy1->pot_x_r(); break;
- case 2: data = m_joy2->pot_x_r(); break;
+ case 1: data = m_joy1->read_pot_x(); break;
+ case 2: data = m_joy2->read_pot_x(); break;
case 3:
if (m_joy1->has_pot_x() && m_joy2->has_pot_x())
{
- data = 1 / (1 / m_joy1->pot_x_r() + 1 / m_joy2->pot_x_r());
+ data = 1 / (1 / m_joy1->read_pot_x() + 1 / m_joy2->read_pot_x());
}
else if (m_joy1->has_pot_x())
{
- data = m_joy1->pot_x_r();
+ data = m_joy1->read_pot_x();
}
else if (m_joy2->has_pot_x())
{
- data = m_joy2->pot_x_r();
+ data = m_joy2->read_pot_x();
}
break;
}
@@ -422,22 +422,22 @@ READ8_MEMBER( vic10_state::sid_poty_r )
{
uint8_t data = 0xff;
- switch (m_cia->pa_r() >> 6)
+ switch (m_cia->read_pa() >> 6)
{
- case 1: data = m_joy1->pot_y_r(); break;
- case 2: data = m_joy2->pot_y_r(); break;
+ case 1: data = m_joy1->read_pot_y(); break;
+ case 2: data = m_joy2->read_pot_y(); break;
case 3:
if (m_joy1->has_pot_y() && m_joy2->has_pot_y())
{
- data = 1 / (1 / m_joy1->pot_y_r() + 1 / m_joy2->pot_y_r());
+ data = 1 / (1 / m_joy1->read_pot_y() + 1 / m_joy2->read_pot_y());
}
else if (m_joy1->has_pot_y())
{
- data = m_joy1->pot_y_r();
+ data = m_joy1->read_pot_y();
}
else if (m_joy2->has_pot_y())
{
- data = m_joy2->pot_y_r();
+ data = m_joy2->read_pot_y();
}
break;
}
@@ -477,13 +477,13 @@ READ8_MEMBER( vic10_state::cia_pa_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy_b = m_joy2->joy_r();
+ uint8_t joy_b = m_joy2->read_joy();
data &= (0xf0 | (joy_b & 0x0f));
data &= ~(!BIT(joy_b, 5) << 4);
// keyboard
- uint8_t cia_pb = m_cia->pb_r();
+ uint8_t cia_pb = m_cia->read_pb();
uint32_t row[8] = { m_row[0]->read(), m_row[1]->read() & m_lock->read(), m_row[2]->read(), m_row[3]->read(),
m_row[4]->read(), m_row[5]->read(), m_row[6]->read(), m_row[7]->read() };
@@ -525,13 +525,13 @@ READ8_MEMBER( vic10_state::cia_pb_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy_a = m_joy1->joy_r();
+ uint8_t joy_a = m_joy1->read_joy();
data &= (0xf0 | (joy_a & 0x0f));
data &= ~(!BIT(joy_a, 5) << 4);
// keyboard
- uint8_t cia_pa = m_cia->pa_r();
+ uint8_t cia_pa = m_cia->read_pa();
if (!BIT(cia_pa, 7)) data &= m_row[7]->read();
if (!BIT(cia_pa, 6)) data &= m_row[6]->read();
diff --git a/src/mame/drivers/vic20.cpp b/src/mame/drivers/vic20.cpp
index 0c83e666695..2379e70d787 100644
--- a/src/mame/drivers/vic20.cpp
+++ b/src/mame/drivers/vic20.cpp
@@ -556,7 +556,7 @@ READ8_MEMBER( vic20_state::via1_pa_r )
data |= m_iec->data_r() << 1;
// joystick / user port
- uint8_t joy = m_joy->joy_r();
+ uint8_t joy = m_joy->read_joy();
data |= (m_user_joy0 && BIT(joy, 0)) << 2;
data |= (m_user_joy1 && BIT(joy, 1)) << 3;
@@ -592,7 +592,7 @@ WRITE8_MEMBER( vic20_state::via1_pa_w )
// serial attention out
m_user->write_9(!BIT(data, 7));
- m_iec->atn_w(!BIT(data, 7));
+ m_iec->host_atn_w(!BIT(data, 7));
}
WRITE8_MEMBER( vic20_state::via1_pb_w )
@@ -654,7 +654,7 @@ READ8_MEMBER( vic20_state::via2_pb_r )
uint8_t data = 0xff;
// joystick
- uint8_t joy = m_joy->joy_r();
+ uint8_t joy = m_joy->read_joy();
data &= BIT(joy, 3) << 7;
@@ -688,13 +688,13 @@ WRITE8_MEMBER( vic20_state::via2_pb_w )
WRITE_LINE_MEMBER( vic20_state::via2_ca2_w )
{
// serial clock out
- m_iec->clk_w(!state);
+ m_iec->host_clk_w(!state);
}
WRITE_LINE_MEMBER( vic20_state::via2_cb2_w )
{
// serial data out
- m_iec->data_w(!state);
+ m_iec->host_data_w(!state);
}
@@ -805,7 +805,7 @@ MACHINE_CONFIG_START(vic20_state::vic20)
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, "joy")
MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(WRITELINE(*this, vic20_state, write_light_pen))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, vic20_user_port_cards, nullptr)
+ MCFG_DEVICE_ADD(PET_USER_PORT_TAG, PET_USER_PORT, vic20_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(*this, vic20_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(*this, vic20_state, write_user_joy0))
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(*this, vic20_state, write_user_joy1))
diff --git a/src/mame/drivers/wacky_gator.cpp b/src/mame/drivers/wacky_gator.cpp
index b918a23cb94..f1ed95e5026 100644
--- a/src/mame/drivers/wacky_gator.cpp
+++ b/src/mame/drivers/wacky_gator.cpp
@@ -255,7 +255,7 @@ WRITE_LINE_MEMBER(wackygtr_state::adpcm_int)
if (!(m_adpcm_ctrl & 0x80))
{
uint8_t data = m_samples->base()[m_adpcm_pos & 0xffff];
- m_msm->data_w((m_adpcm_sel ? data : (data >> 4)) & 0x0f);
+ m_msm->write_data((m_adpcm_sel ? data : (data >> 4)) & 0x0f);
m_adpcm_pos += m_adpcm_sel;
m_adpcm_sel ^= 1;
}
diff --git a/src/mame/drivers/wc90b.cpp b/src/mame/drivers/wc90b.cpp
index 562975f15dd..eb8994afc1b 100644
--- a/src/mame/drivers/wc90b.cpp
+++ b/src/mame/drivers/wc90b.cpp
@@ -335,11 +335,11 @@ WRITE_LINE_MEMBER(wc90b_state::adpcm_int)
m_toggle ^= 1;
if(m_toggle)
{
- m_msm->data_w((m_msm5205next & 0xf0) >> 4);
+ m_msm->write_data((m_msm5205next & 0xf0) >> 4);
m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
else
- m_msm->data_w((m_msm5205next & 0x0f) >> 0);
+ m_msm->write_data((m_msm5205next & 0x0f) >> 0);
}
void wc90b_state::machine_start()
diff --git a/src/mame/includes/gng.h b/src/mame/includes/gng.h
index 9ffcc8acd49..7969f8eadc5 100644
--- a/src/mame/includes/gng.h
+++ b/src/mame/includes/gng.h
@@ -5,6 +5,10 @@
Ghosts'n Goblins
*************************************************************************/
+#ifndef MAME_INCLUDES_GNG_H
+#define MAME_INCLUDES_GNG_H
+
+#pragma once
#include "sound/2203intf.h"
#include "video/bufsprite.h"
@@ -13,27 +17,21 @@
class gng_state : public driver_device
{
public:
- gng_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_spriteram(*this, "spriteram") ,
+ gng_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_spriteram(*this, "spriteram"),
m_fgvideoram(*this, "fgvideoram"),
m_bgvideoram(*this, "bgvideoram"),
m_maincpu(*this, "maincpu"),
m_ym(*this, "ym%u", 1),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
- /* memory pointers */
- required_device<buffered_spriteram8_device> m_spriteram;
- required_shared_ptr<uint8_t> m_fgvideoram;
- required_shared_ptr<uint8_t> m_bgvideoram;
-
- /* video-related */
- tilemap_t *m_bg_tilemap;
- tilemap_t *m_fg_tilemap;
- uint8_t m_scrollx[2];
- uint8_t m_scrolly[2];
+ void gng(machine_config &config);
+ void diamond(machine_config &config);
+protected:
DECLARE_WRITE8_MEMBER(gng_bankswitch_w);
DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w);
DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w);
@@ -50,14 +48,28 @@ public:
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_gng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ void diamond_map(address_map &map);
+ void gng_map(address_map &map);
+ void sound_map(address_map &map);
+
+private:
+ /* memory pointers */
+ required_device<buffered_spriteram8_device> m_spriteram;
+ required_shared_ptr<uint8_t> m_fgvideoram;
+ required_shared_ptr<uint8_t> m_bgvideoram;
+
+ /* video-related */
+ tilemap_t *m_bg_tilemap;
+ tilemap_t *m_fg_tilemap;
+ uint8_t m_scrollx[2];
+ uint8_t m_scrolly[2];
+
required_device<cpu_device> m_maincpu;
required_device_array<ym2203_device, 2> m_ym;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- void gng(machine_config &config);
- void diamond(machine_config &config);
- void diamond_map(address_map &map);
- void gng_map(address_map &map);
- void sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_GNG_H
diff --git a/src/mame/includes/ninjakd2.h b/src/mame/includes/ninjakd2.h
index 74c84e2d5f1..f82eebc6277 100644
--- a/src/mame/includes/ninjakd2.h
+++ b/src/mame/includes/ninjakd2.h
@@ -29,7 +29,8 @@ public:
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_decrypted_opcodes(*this, "decrypted_opcodes"),
- m_mainbank(*this, "mainbank") { }
+ m_mainbank(*this, "mainbank")
+ { }
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_soundcpu;
@@ -96,7 +97,8 @@ class mnight_state : public ninjakd2_state
{
public:
mnight_state(const machine_config &mconfig, device_type type, const char *tag) :
- ninjakd2_state(mconfig, type, tag) { }
+ ninjakd2_state(mconfig, type, tag)
+ { }
void arkarea(machine_config &config);
void mnight(machine_config &config);
@@ -114,7 +116,8 @@ class robokid_state : public mnight_state
{
public:
robokid_state(const machine_config &mconfig, device_type type, const char *tag) :
- mnight_state(mconfig, type, tag) { }
+ mnight_state(mconfig, type, tag)
+ { }
void robokid(machine_config &config);
void robokid_main_cpu(address_map &map);
@@ -150,7 +153,8 @@ public:
omegaf_state(const machine_config &mconfig, device_type type, const char *tag) :
robokid_state(mconfig, type, tag),
m_dsw_io(*this, "DIPSW%u", 1U),
- m_pad_io(*this, "PAD%u", 1U) { }
+ m_pad_io(*this, "PAD%u", 1U)
+ { }
DECLARE_READ8_MEMBER(unk_r);
DECLARE_READ8_MEMBER(io_protection_r);
diff --git a/src/mame/machine/pc1512kb.cpp b/src/mame/machine/pc1512kb.cpp
index f5b543f0c4e..fcbaf350f6b 100644
--- a/src/mame/machine/pc1512kb.cpp
+++ b/src/mame/machine/pc1512kb.cpp
@@ -350,10 +350,7 @@ READ8_MEMBER( pc1512_keyboard_device::kb_bus_r )
if (!BIT(m_kb_y, 8)) data &= m_y[8]->read();
if (!BIT(m_kb_y, 9)) data &= m_y[9]->read();
if (!BIT(m_kb_y, 10)) data &= m_y[10]->read();
- if (!m_joy_com)
- {
- data &= m_joy->joy_r();
- }
+ if (!m_joy_com) data &= m_joy->read_joy();
return data;
}
diff --git a/src/mame/machine/pce_cd.cpp b/src/mame/machine/pce_cd.cpp
index 8788ee177cc..a2bc3be4ae0 100644
--- a/src/mame/machine/pce_cd.cpp
+++ b/src/mame/machine/pce_cd.cpp
@@ -297,7 +297,7 @@ WRITE_LINE_MEMBER( pce_cd_device::msm5205_int )
/* Supply new ADPCM data */
msm_data = (m_msm_nibble) ? (m_adpcm_ram[m_msm_start_addr] & 0x0f) : ((m_adpcm_ram[m_msm_start_addr] & 0xf0) >> 4);
- m_msm->data_w(msm_data);
+ m_msm->write_data(msm_data);
m_msm_nibble ^= 1;
if (m_msm_nibble == 0)
diff --git a/src/mame/machine/primo.cpp b/src/mame/machine/primo.cpp
index 40f7cb1c396..089f4e34db6 100644
--- a/src/mame/machine/primo.cpp
+++ b/src/mame/machine/primo.cpp
@@ -167,18 +167,18 @@ WRITE8_MEMBER(primo_state::primo_ki_2_w)
// bit 7, 6 - not used
// bit 5 - SCLK
- m_iec->clk_w(!BIT(data, 5));
+ m_iec->host_clk_w(!BIT(data, 5));
// bit 4 - SDATA
- m_iec->data_w(!BIT(data, 4));
+ m_iec->host_data_w(!BIT(data, 4));
// bit 3 - not used
// bit 2 - SRQ
- m_iec->srq_w(!BIT(data, 2));
+ m_iec->host_srq_w(!BIT(data, 2));
// bit 1 - ATN
- m_iec->atn_w(!BIT(data, 1));
+ m_iec->host_atn_w(!BIT(data, 1));
// bit 0 - not used
diff --git a/src/mame/machine/rmnimbus.cpp b/src/mame/machine/rmnimbus.cpp
index 6dd1afdf2b8..388263d2dfb 100644
--- a/src/mame/machine/rmnimbus.cpp
+++ b/src/mame/machine/rmnimbus.cpp
@@ -1485,7 +1485,7 @@ void rmnimbus_state::rmni_sound_reset()
WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_porta_w)
{
- m_msm->data_w(data);
+ m_msm->write_data(data);
// Mouse code needs a copy of this.
m_ay8910_a=data;
diff --git a/src/mame/machine/stfight.cpp b/src/mame/machine/stfight.cpp
index b439b987082..844e8e53c30 100644
--- a/src/mame/machine/stfight.cpp
+++ b/src/mame/machine/stfight.cpp
@@ -180,7 +180,7 @@ WRITE_LINE_MEMBER(stfight_state::stfight_adpcm_int)
adpcm_data >>= 4;
++m_adpcm_data_offs;
- m_msm->data_w(adpcm_data & 0x0f);
+ m_msm->write_data(adpcm_data & 0x0f);
}
}