summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-02-13 23:31:39 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-02-13 23:31:39 -0500
commit1bd974c2b4f1f8815065efd4f5fcc0443ae15d28 (patch)
tree6ed01e4ac11872c9fcf5e6f5d86ab7dbdc5cc123
parent8fc46e850cb73864d1ce4bdfc2e26f410c5b5532 (diff)
ay31015: Make SI and SO line callbacks as well (nw)
-rw-r--r--src/devices/machine/ay31015.cpp4
-rw-r--r--src/devices/machine/ay31015.h4
-rw-r--r--src/mame/drivers/nascom1.cpp12
3 files changed, 10 insertions, 10 deletions
diff --git a/src/devices/machine/ay31015.cpp b/src/devices/machine/ay31015.cpp
index ee5bc6650f7..f0e8fe2a97a 100644
--- a/src/devices/machine/ay31015.cpp
+++ b/src/devices/machine/ay31015.cpp
@@ -208,7 +208,7 @@ void ay31015_device::device_reset()
inline uint8_t ay31015_device::get_si()
{
if (!m_read_si_cb.isnull())
- m_pins[AY31015_SI] = m_read_si_cb(0) ? 1 : 0;
+ m_pins[AY31015_SI] = m_read_si_cb();
return m_pins[AY31015_SI];
}
@@ -219,7 +219,7 @@ inline void ay31015_device::set_so( int data )
m_pins[AY31015_SO] = data ? 1 : 0;
if (!m_write_so_cb.isnull())
- m_write_so_cb((offs_t)0, m_pins[AY31015_SO]);
+ m_write_so_cb(m_pins[AY31015_SO]);
}
diff --git a/src/devices/machine/ay31015.h b/src/devices/machine/ay31015.h
index 8e43199ed77..fc4df0d2d3c 100644
--- a/src/devices/machine/ay31015.h
+++ b/src/devices/machine/ay31015.h
@@ -148,8 +148,8 @@ protected:
double m_tx_clock; /* TCP - pin 40 */
emu_timer *m_tx_timer;
- devcb_read8 m_read_si_cb; // SI - pin 20 - This will be called whenever the SI pin is sampled. Optional
- devcb_write8 m_write_so_cb; // SO - pin 25 - This will be called whenever data is put on the SO pin. Optional
+ devcb_read_line m_read_si_cb; // SI - pin 20 - This will be called whenever the SI pin is sampled. Optional
+ devcb_write_line m_write_so_cb; // SO - pin 25 - This will be called whenever data is put on the SO pin. Optional
devcb_write_line m_write_pe_cb; // PE - pin 13 - This will be called whenever the PE pin may have changed. Optional
devcb_write_line m_write_fe_cb; // FE - pin 14 - This will be called whenever the FE pin may have changed. Optional
devcb_write_line m_write_or_cb; // OR - pin 15 - This will be called whenever the OR pin may have changed. Optional
diff --git a/src/mame/drivers/nascom1.cpp b/src/mame/drivers/nascom1.cpp
index c8d1ab715c0..b42bed005de 100644
--- a/src/mame/drivers/nascom1.cpp
+++ b/src/mame/drivers/nascom1.cpp
@@ -79,8 +79,8 @@ public:
DECLARE_READ8_MEMBER(nascom1_port_02_r);
DECLARE_DRIVER_INIT(nascom);
void screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, int char_height);
- DECLARE_READ8_MEMBER(nascom1_hd6402_si);
- DECLARE_WRITE8_MEMBER(nascom1_hd6402_so);
+ DECLARE_READ_LINE_MEMBER(nascom1_hd6402_si);
+ DECLARE_WRITE_LINE_MEMBER(nascom1_hd6402_so);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER( nascom1_cassette );
DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( nascom1_cassette );
DECLARE_SNAPSHOT_LOAD_MEMBER( nascom1 );
@@ -210,12 +210,12 @@ READ8_MEMBER( nascom_state::nascom1_port_02_r )
return data;
}
-READ8_MEMBER( nascom_state::nascom1_hd6402_si )
+READ_LINE_MEMBER( nascom_state::nascom1_hd6402_si )
{
return 1;
}
-WRITE8_MEMBER( nascom_state::nascom1_hd6402_so )
+WRITE_LINE_MEMBER( nascom_state::nascom1_hd6402_so )
{
}
@@ -670,8 +670,8 @@ MACHINE_CONFIG_START(nascom_state::nascom)
MCFG_DEVICE_ADD( "hd6402", AY31015, 0 )
MCFG_AY31015_TX_CLOCK(( XTAL(16'000'000) / 16 ) / 256)
MCFG_AY31015_RX_CLOCK(( XTAL(16'000'000) / 16 ) / 256)
- MCFG_AY51013_READ_SI_CB(READ8(nascom_state, nascom1_hd6402_si))
- MCFG_AY51013_WRITE_SO_CB(WRITE8(nascom_state, nascom1_hd6402_so))
+ MCFG_AY51013_READ_SI_CB(READLINE(nascom_state, nascom1_hd6402_si))
+ MCFG_AY51013_WRITE_SO_CB(WRITELINE(nascom_state, nascom1_hd6402_so))
// cassette is connected to the uart
MCFG_CASSETTE_ADD("cassette")