summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/hp9845_io/98034.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/hp9845_io/98034.cpp')
-rw-r--r--src/devices/bus/hp9845_io/98034.cpp47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/devices/bus/hp9845_io/98034.cpp b/src/devices/bus/hp9845_io/98034.cpp
index 57ba7a57191..61658c1ecf1 100644
--- a/src/devices/bus/hp9845_io/98034.cpp
+++ b/src/devices/bus/hp9845_io/98034.cpp
@@ -15,7 +15,6 @@
#include "emu.h"
#include "98034.h"
-#include "coreutil.h"
// Debugging
//#define VERBOSE 1
@@ -114,7 +113,7 @@ void hp98034_io_card_device::device_reset()
update_dc();
}
-READ16_MEMBER(hp98034_io_card_device::reg_r)
+uint16_t hp98034_io_card_device::reg_r(address_space &space, offs_t offset)
{
uint16_t res = m_odr;
@@ -147,14 +146,14 @@ READ16_MEMBER(hp98034_io_card_device::reg_r)
// This is meant to gain some margin to NP in the race with
// CPU (in real hw the margin was probably no more than a
// couple of µs).
- machine().scheduler().boost_interleave(attotime::from_usec(5) , attotime::from_usec(100));
+ machine().scheduler().add_quantum(attotime::from_usec(5) , attotime::from_usec(100));
space.device().execute().spin();
machine().scheduler().synchronize();
LOG("%.06f RD R%u=%04x %s\n" , machine().time().as_double() , offset + 4 , res , machine().describe_context());
return res;
}
-WRITE16_MEMBER(hp98034_io_card_device::reg_w)
+void hp98034_io_card_device::reg_w(address_space &space, offs_t offset, uint16_t data)
{
m_idr = (uint8_t)data;
@@ -170,13 +169,13 @@ WRITE16_MEMBER(hp98034_io_card_device::reg_w)
update_flg();
// See reg_r above
- machine().scheduler().boost_interleave(attotime::from_usec(5) , attotime::from_usec(100));
+ machine().scheduler().add_quantum(attotime::from_usec(5) , attotime::from_usec(100));
space.device().execute().spin();
machine().scheduler().synchronize();
LOG("%.06f WR R%u=%04x %s\n" , machine().time().as_double() , offset + 4 , data , machine().describe_context());
}
-WRITE8_MEMBER(hp98034_io_card_device::dc_w)
+void hp98034_io_card_device::dc_w(uint8_t data)
{
if (data != m_dc) {
LOG("%.06f DC=%02x\n" , machine().time().as_double() , data);
@@ -185,7 +184,7 @@ WRITE8_MEMBER(hp98034_io_card_device::dc_w)
}
}
-READ8_MEMBER(hp98034_io_card_device::dc_r)
+uint8_t hp98034_io_card_device::dc_r()
{
uint8_t res;
@@ -199,19 +198,19 @@ READ8_MEMBER(hp98034_io_card_device::dc_r)
return res;
}
-WRITE8_MEMBER(hp98034_io_card_device::hpib_data_w)
+void hp98034_io_card_device::hpib_data_w(uint8_t data)
{
m_data_out = data;
update_data_out();
}
-WRITE8_MEMBER(hp98034_io_card_device::hpib_ctrl_w)
+void hp98034_io_card_device::hpib_ctrl_w(uint8_t data)
{
m_ctrl_out = data;
update_ctrl_out();
}
-READ8_MEMBER(hp98034_io_card_device::hpib_ctrl_r)
+uint8_t hp98034_io_card_device::hpib_ctrl_r()
{
uint8_t res = 0;
@@ -243,56 +242,56 @@ READ8_MEMBER(hp98034_io_card_device::hpib_ctrl_r)
return res;
}
-READ8_MEMBER(hp98034_io_card_device::hpib_data_r)
+uint8_t hp98034_io_card_device::hpib_data_r()
{
- return ~m_ieee488->read_dio();
+ return ~m_ieee488->dio_r();
}
-READ8_MEMBER(hp98034_io_card_device::idr_r)
+uint8_t hp98034_io_card_device::idr_r()
{
return m_idr;
}
-WRITE8_MEMBER(hp98034_io_card_device::odr_w)
+void hp98034_io_card_device::odr_w(uint8_t data)
{
m_odr = data;
}
-READ8_MEMBER(hp98034_io_card_device::mode_reg_r)
+uint8_t hp98034_io_card_device::mode_reg_r()
{
LOG("%.06f MR=%02x\n" , machine().time().as_double() , m_mode_reg);
return m_mode_reg;
}
-WRITE8_MEMBER(hp98034_io_card_device::mode_reg_clear_w)
+void hp98034_io_card_device::mode_reg_clear_w(uint8_t data)
{
LOG("%.06f clear_w\n" , machine().time().as_double());
m_mode_reg = 0xff;
m_force_flg = false;
if (update_flg()) {
// See reg_r above
- machine().scheduler().boost_interleave(attotime::zero , attotime::from_usec(100));
+ machine().scheduler().perfect_quantum(attotime::from_usec(100));
machine().scheduler().synchronize();
}
}
-READ8_MEMBER(hp98034_io_card_device::switch_r)
+uint8_t hp98034_io_card_device::switch_r()
{
return m_sw1->read() | 0xc0;
}
-IRQ_CALLBACK_MEMBER(hp98034_io_card_device::irq_callback)
+uint8_t hp98034_io_card_device::int_ack_r()
{
int res = 0xff;
- if (irqline == 0 && !m_ieee488->ifc_r()) {
+ if (!m_ieee488->ifc_r()) {
BIT_CLR(res, 1);
}
return res;
}
-WRITE_LINE_MEMBER(hp98034_io_card_device::ieee488_ctrl_w)
+void hp98034_io_card_device::ieee488_ctrl_w(int state)
{
update_clr_hpib();
}
@@ -303,7 +302,7 @@ void hp98034_io_card_device::update_dc()
sts_w(BIT(m_dc , 4));
if (update_flg()) {
// See reg_r above
- machine().scheduler().boost_interleave(attotime::zero , attotime::from_usec(100));
+ machine().scheduler().perfect_quantum(attotime::from_usec(100));
machine().scheduler().synchronize();
}
update_clr_hpib();
@@ -331,7 +330,7 @@ void hp98034_io_card_device::update_data_out()
if (m_clr_hpib) {
m_data_out = 0;
}
- m_ieee488->write_dio(~m_data_out);
+ m_ieee488->host_dio_w(~m_data_out);
}
void hp98034_io_card_device::update_ctrl_out()
@@ -400,7 +399,7 @@ void hp98034_io_card_device::device_add_mconfig(machine_config &config)
m_cpu->set_addrmap(AS_IO, &hp98034_io_card_device::np_io_map);
m_cpu->dc_changed().set(FUNC(hp98034_io_card_device::dc_w));
m_cpu->read_dc().set(FUNC(hp98034_io_card_device::dc_r));
- m_cpu->set_irq_acknowledge_callback(FUNC(hp98034_io_card_device::irq_callback));
+ m_cpu->int_ack().set(FUNC(hp98034_io_card_device::int_ack_r));
IEEE488_SLOT(config , "ieee_dev" , 0 , hp_ieee488_devices , nullptr);
IEEE488_SLOT(config , "ieee_rem" , 0 , remote488_devices , nullptr);