summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/im6402.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/im6402.cpp')
-rw-r--r--src/devices/machine/im6402.cpp53
1 files changed, 20 insertions, 33 deletions
diff --git a/src/devices/machine/im6402.cpp b/src/devices/machine/im6402.cpp
index a464560870c..db3521c8d4b 100644
--- a/src/devices/machine/im6402.cpp
+++ b/src/devices/machine/im6402.cpp
@@ -89,12 +89,6 @@ im6402_device::im6402_device(const machine_config &mconfig, const char *tag, dev
void im6402_device::device_start()
{
- // resolve callbacks
- m_write_tro.resolve_safe();
- m_write_dr.resolve_safe();
- m_write_tbre.resolve_safe();
- m_write_tre.resolve_safe();
-
// create the timers
if (m_rrc > 0)
{
@@ -180,15 +174,6 @@ void im6402_device::tra_complete()
//-------------------------------------------------
-// rcv_callback -
-//-------------------------------------------------
-
-void im6402_device::rcv_callback()
-{
-}
-
-
-//-------------------------------------------------
// rcv_complete -
//-------------------------------------------------
@@ -212,7 +197,7 @@ void im6402_device::rcv_complete()
// write - transmitter buffer register write
//-------------------------------------------------
-WRITE8_MEMBER( im6402_device::write )
+void im6402_device::write(uint8_t data)
{
LOG("IM6402 Transmit Buffer Register %02x\n", data);
@@ -238,7 +223,7 @@ WRITE8_MEMBER( im6402_device::write )
// rrc_w - receiver register clock
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::rrc_w )
+void im6402_device::rrc_w(int state)
{
if (state)
{
@@ -252,7 +237,7 @@ WRITE_LINE_MEMBER( im6402_device::rrc_w )
// trc_w - transmitter register clock
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::trc_w )
+void im6402_device::trc_w(int state)
{
if (state)
{
@@ -266,7 +251,7 @@ WRITE_LINE_MEMBER( im6402_device::trc_w )
// rrd_w - receiver register disable
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::rrd_w )
+void im6402_device::rrd_w(int state)
{
}
@@ -275,7 +260,7 @@ WRITE_LINE_MEMBER( im6402_device::rrd_w )
// sfd_w - status flags disable
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::sfd_w )
+void im6402_device::sfd_w(int state)
{
}
@@ -284,7 +269,7 @@ WRITE_LINE_MEMBER( im6402_device::sfd_w )
// drr_w - data received reset
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::drr_w )
+void im6402_device::drr_w(int state)
{
if (state)
{
@@ -297,7 +282,7 @@ WRITE_LINE_MEMBER( im6402_device::drr_w )
// mr_w - master reset
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::mr_w )
+void im6402_device::mr_w(int state)
{
if (state)
{
@@ -310,7 +295,7 @@ WRITE_LINE_MEMBER( im6402_device::mr_w )
// crl_w - control register load
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::crl_w )
+void im6402_device::crl_w(int state)
{
if (state)
{
@@ -336,7 +321,7 @@ WRITE_LINE_MEMBER( im6402_device::crl_w )
// pi_w - parity inhibit
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::pi_w )
+void im6402_device::pi_w(int state)
{
LOG("IM6402 Parity Inhibit %u\n", state);
@@ -348,7 +333,7 @@ WRITE_LINE_MEMBER( im6402_device::pi_w )
// sbs_w - stop bit select
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::sbs_w )
+void im6402_device::sbs_w(int state)
{
LOG("IM6402 Stop Bit Select %u\n", state);
@@ -360,7 +345,7 @@ WRITE_LINE_MEMBER( im6402_device::sbs_w )
// cls1_w - character length select 1
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::cls1_w )
+void im6402_device::cls1_w(int state)
{
LOG("IM6402 Character Length Select 1 %u\n", state);
@@ -372,7 +357,7 @@ WRITE_LINE_MEMBER( im6402_device::cls1_w )
// cls2_w - character length select 2
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::cls2_w )
+void im6402_device::cls2_w(int state)
{
LOG("IM6402 Character Length Select 2 %u\n", state);
@@ -384,17 +369,19 @@ WRITE_LINE_MEMBER( im6402_device::cls2_w )
// epe_w - even parity enable
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::epe_w )
+void im6402_device::epe_w(int state)
{
LOG("IM6402 Even Parity Enable %u\n", state);
m_epe = state;
}
-WRITE_LINE_MEMBER(im6402_device::write_rri)
+
+//-------------------------------------------------
+// rri_w - receiver register input
+//-------------------------------------------------
+
+void im6402_device::rri_w(int state)
{
- // HACK derive clock from data line as wangpckb sends bytes instantly to make up for mcs51 serial implementation
- receive_register_update_bit(state);
- rx_clock_w(1);
- rx_clock_w(0);
+ rx_w(state);
}