summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/spectrum/fuller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/spectrum/fuller.cpp')
-rw-r--r--src/devices/bus/spectrum/fuller.cpp65
1 files changed, 38 insertions, 27 deletions
diff --git a/src/devices/bus/spectrum/fuller.cpp b/src/devices/bus/spectrum/fuller.cpp
index 36275ccc4cd..636967cbdd6 100644
--- a/src/devices/bus/spectrum/fuller.cpp
+++ b/src/devices/bus/spectrum/fuller.cpp
@@ -84,51 +84,62 @@ void spectrum_fuller_device::device_start()
}
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void spectrum_fuller_device::device_reset()
-{
- m_exp->set_io_space(&io_space());
-
- io_space().install_write_handler(0x3f, 0x3f, 0, 0xff00, 0, write8_delegate(FUNC(ay8910_device::address_w), m_psg.target()));
- io_space().install_readwrite_handler(0x5f, 0x5f, 0, 0xff00, 0, read8_delegate(FUNC(ay8910_device::data_r), m_psg.target()), write8_delegate(FUNC(ay8910_device::data_w), m_psg.target()));
- io_space().install_read_handler(0x7f, 0x7f, 0, 0xff00, 0, read8_delegate(FUNC(spectrum_fuller_device::joystick_r), this));
-}
-
-
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
-READ8_MEMBER(spectrum_fuller_device::joystick_r)
-{
- return m_joy->read() | (0xff ^ 0x8f);
-}
-
READ_LINE_MEMBER(spectrum_fuller_device::romcs)
{
return m_exp->romcs();
}
-READ8_MEMBER(spectrum_fuller_device::mreq_r)
+void spectrum_fuller_device::opcode_fetch(offs_t offset)
{
- return m_exp->mreq_r(space, offset);
+ m_exp->opcode_fetch(offset);
}
-WRITE8_MEMBER(spectrum_fuller_device::mreq_w)
+uint8_t spectrum_fuller_device::mreq_r(offs_t offset)
{
+ uint8_t data = 0xff;
+
if (m_exp->romcs())
- m_exp->mreq_w(space, offset, data);
+ data &= m_exp->mreq_r(offset);
+
+ return data;
}
-READ8_MEMBER(spectrum_fuller_device::port_fe_r)
+void spectrum_fuller_device::mreq_w(offs_t offset, uint8_t data)
{
- uint8_t data = 0xff;
-
if (m_exp->romcs())
- data &= m_exp->port_fe_r(space, offset);
+ m_exp->mreq_w(offset, data);
+}
+uint8_t spectrum_fuller_device::iorq_r(offs_t offset)
+{
+ uint8_t data = m_exp->iorq_r(offset);
+
+ switch (offset & 0xff)
+ {
+ case 0x5f:
+ data &= m_psg->data_r();
+ break;
+ case 0x7f:
+ data &= m_joy->read() | (0xff ^ 0x8f);
+ break;
+ }
return data;
}
+
+void spectrum_fuller_device::iorq_w(offs_t offset, uint8_t data)
+{
+ switch (offset & 0xff)
+ {
+ case 0x3f:
+ m_psg->address_w(data);
+ break;
+ case 0x5f:
+ m_psg->data_w(data);
+ break;
+ }
+ m_exp->iorq_w(offset, data);
+}