summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/mc68901.c
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2013-12-29 00:14:05 +0000
committer smf- <smf-@users.noreply.github.com>2013-12-29 00:14:05 +0000
commit93188e310b2ffabe49b91bf481081168da7c10a2 (patch)
tree3f9fd79c4ff02fcd9054483cf36b6cf36d62850d /src/emu/machine/mc68901.c
parent4f61954a681efdefc90b89d9e9c94138f7a63097 (diff)
Removed MC68901 polling for gpio bits. [smf]
Diffstat (limited to 'src/emu/machine/mc68901.c')
-rw-r--r--src/emu/machine/mc68901.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/emu/machine/mc68901.c b/src/emu/machine/mc68901.c
index 3dd9273e353..0d0846b74df 100644
--- a/src/emu/machine/mc68901.c
+++ b/src/emu/machine/mc68901.c
@@ -293,7 +293,7 @@ inline void mc68901_device::timer_input(int index, int value)
inline void mc68901_device::gpio_input(int bit, int state)
{
- if (state != BIT(m_gpip, bit))
+ if (state != BIT(m_gpio_input, bit))
{
if (state == BIT(m_aer, bit))
{
@@ -309,9 +309,9 @@ inline void mc68901_device::gpio_input(int bit, int state)
if (state)
- m_gpip &= ~(1 << bit);
+ m_gpio_input |= (1 << bit);
else
- m_gpip |= (1 << bit);
+ m_gpio_input &= ~(1 << bit);
}
}
@@ -328,8 +328,7 @@ inline void mc68901_device::gpio_input(int bit, int state)
mc68901_device::mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MC68901, "Motorola MC68901", tag, owner, clock, "mc68901", __FILE__),
device_serial_interface(mconfig, *this),
- m_gpip(0),
- m_tsr(TSR_BUFFER_EMPTY)
+ m_gpio_input(0)
{
}
@@ -364,7 +363,6 @@ void mc68901_device::device_start()
m_start_bit_hack_for_external_clocks = true;
/* resolve callbacks */
- m_in_gpio_func.resolve(m_in_gpio_cb, *this);
m_out_gpio_func.resolve(m_out_gpio_cb, *this);
m_out_so_func.resolve(m_out_so_cb, *this);
m_out_tao_func.resolve(m_out_tao_cb, *this);
@@ -554,9 +552,7 @@ READ8_MEMBER( mc68901_device::read )
{
switch (offset)
{
- case REGISTER_GPIP:
- m_gpip = m_in_gpio_func(0);
- return m_gpip;
+ case REGISTER_GPIP: return (m_gpio_input & ~m_ddr) | (m_gpip & m_ddr);
case REGISTER_AER: return m_aer;
case REGISTER_DDR: return m_ddr;