summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/bbc/fdc/fdc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/bbc/fdc/fdc.cpp')
-rw-r--r--src/devices/bus/bbc/fdc/fdc.cpp52
1 files changed, 29 insertions, 23 deletions
diff --git a/src/devices/bus/bbc/fdc/fdc.cpp b/src/devices/bus/bbc/fdc/fdc.cpp
index 5db09a3903e..d3588ea9f6f 100644
--- a/src/devices/bus/bbc/fdc/fdc.cpp
+++ b/src/devices/bus/bbc/fdc/fdc.cpp
@@ -32,15 +32,6 @@ device_bbc_fdc_interface::device_bbc_fdc_interface(const machine_config &mconfig
}
-//-------------------------------------------------
-// ~device_bbc_fdc_interface - destructor
-//-------------------------------------------------
-
-device_bbc_fdc_interface::~device_bbc_fdc_interface()
-{
-}
-
-
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
@@ -53,17 +44,8 @@ bbc_fdc_slot_device::bbc_fdc_slot_device(const machine_config &mconfig, const ch
device_t(mconfig, BBC_FDC_SLOT, tag, owner, clock),
device_slot_interface(mconfig, *this),
m_card(nullptr),
- m_intrq_handler(*this),
- m_drq_handler(*this)
-{
-}
-
-
-//-------------------------------------------------
-// bbc_fdc_slot_device - destructor
-//-------------------------------------------------
-
-bbc_fdc_slot_device::~bbc_fdc_slot_device()
+ m_intrq_cb(*this),
+ m_drq_cb(*this)
{
}
@@ -86,12 +68,13 @@ void bbc_fdc_slot_device::device_validity_check(validity_checker &valid) const
void bbc_fdc_slot_device::device_start()
{
device_t *const carddev = get_card_device();
- if (carddev && !dynamic_cast<device_bbc_fdc_interface *>(carddev))
+ m_card = dynamic_cast<device_bbc_fdc_interface *>(get_card_device());
+ if (carddev && !m_card)
osd_printf_error("Card device %s (%s) does not implement device_bbc_fdc_interface\n", carddev->tag(), carddev->name());
// resolve callbacks
- m_intrq_handler.resolve_safe();
- m_drq_handler.resolve_safe();
+ m_intrq_cb.resolve_safe();
+ m_drq_cb.resolve_safe();
}
//-------------------------------------------------
@@ -102,6 +85,27 @@ void bbc_fdc_slot_device::device_reset()
{
}
+//-------------------------------------------------
+// read
+//-------------------------------------------------
+
+READ8_MEMBER(bbc_fdc_slot_device::read)
+{
+ if (m_card)
+ return m_card->read(space, offset);
+ else
+ return 0xff;
+}
+
+//-------------------------------------------------
+// write
+//-------------------------------------------------
+
+WRITE8_MEMBER(bbc_fdc_slot_device::write)
+{
+ if (m_card)
+ m_card->write(space, offset, data);
+}
//-------------------------------------------------
// SLOT_INTERFACE( bbc_fdc_devices )
@@ -110,6 +114,7 @@ void bbc_fdc_slot_device::device_reset()
// slot devices
#include "acorn.h"
+//#include "ams.h"
#include "cumana.h"
#include "cv1797.h"
//#include "microware.h"
@@ -123,6 +128,7 @@ void bbc_fdc_devices(device_slot_interface &device)
{
device.option_add("acorn8271", BBC_ACORN8271);
device.option_add("acorn1770", BBC_ACORN1770);
+ //device.option_add("ams3", BBC_AMS3);
device.option_add("cumana1", BBC_CUMANA1);
device.option_add("cumana2", BBC_CUMANA2);
device.option_add("cv1797", BBC_CV1797);