summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/epson_sio/pf10.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/epson_sio/pf10.cpp')
-rw-r--r--src/devices/bus/epson_sio/pf10.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/devices/bus/epson_sio/pf10.cpp b/src/devices/bus/epson_sio/pf10.cpp
index f986bb5d4c2..462de5ecaa3 100644
--- a/src/devices/bus/epson_sio/pf10.cpp
+++ b/src/devices/bus/epson_sio/pf10.cpp
@@ -12,6 +12,7 @@
#include "emu.h"
#include "pf10.h"
+#include "imagedev/floppy.h"
//**************************************************************************
@@ -60,8 +61,7 @@ static void pf10_floppies(device_slot_interface &device)
device.option_add("smd165", EPSON_SMD_165);
}
-void epson_pf10_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(epson_pf10_device::device_add_mconfig)
HD6303Y(config, m_cpu, XTAL(4'915'200)); // HD63A03XF
m_cpu->set_addrmap(AS_PROGRAM, &epson_pf10_device::cpu_mem);
m_cpu->in_p1_cb().set(FUNC(epson_pf10_device::port1_r));
@@ -71,12 +71,12 @@ void epson_pf10_device::device_add_mconfig(machine_config &config)
m_cpu->out_ser_tx_cb().set(FUNC(epson_pf10_device::hd6303_tx_w));
UPD765A(config, m_fdc, 4'000'000, false, true);
- FLOPPY_CONNECTOR(config, m_floppy, pf10_floppies, "smd165", floppy_image_device::default_floppy_formats);
+ MCFG_FLOPPY_DRIVE_ADD("upd765a:0", pf10_floppies, "smd165", floppy_image_device::default_floppy_formats)
- EPSON_SIO(config, m_sio_output, nullptr);
- m_sio_output->rx_callback().set(DEVICE_SELF, FUNC(epson_pf10_device::rxc_w));
- m_sio_output->pin_callback().set(DEVICE_SELF, FUNC(epson_pf10_device::pinc_w));
-}
+ MCFG_EPSON_SIO_ADD("sio", nullptr)
+ MCFG_EPSON_SIO_RX(WRITELINE(DEVICE_SELF, epson_pf10_device, rxc_w))
+ MCFG_EPSON_SIO_PIN(WRITELINE(DEVICE_SELF, epson_pf10_device, pinc_w))
+MACHINE_CONFIG_END
//**************************************************************************
@@ -92,9 +92,7 @@ epson_pf10_device::epson_pf10_device(const machine_config &mconfig, const char *
device_epson_sio_interface(mconfig, *this),
m_cpu(*this, "maincpu"),
m_fdc(*this, "upd765a"),
- m_sio_output(*this, "sio"),
- m_floppy(*this, "upd765a:0"),
- m_timer(nullptr),
+ m_sio_output(*this, "sio"), m_floppy(nullptr), m_timer(nullptr),
m_port1(0xff),
m_port2(0xff),
m_rxc(1), m_hd6303_tx(0), m_pinc(0)
@@ -110,6 +108,7 @@ epson_pf10_device::epson_pf10_device(const machine_config &mconfig, const char *
void epson_pf10_device::device_start()
{
m_timer = timer_alloc(0, nullptr);
+ m_floppy = subdevice<floppy_connector>("upd765a:0")->get_device();
}
//-------------------------------------------------
@@ -159,8 +158,7 @@ READ8_MEMBER( epson_pf10_device::port2_r )
WRITE8_MEMBER( epson_pf10_device::port2_w )
{
- if (m_floppy->get_device() != nullptr)
- m_floppy->get_device()->mon_w(data & PORT2_MON);
+ m_floppy->mon_w(data & PORT2_MON);
logerror("%s: port2_w(%02x)\n", tag(), data);
}