summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/guab.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-05-04 03:01:32 +1000
committer Vas Crabb <vas@vastheman.com>2018-05-04 03:01:32 +1000
commit32a73f450da82c345b0f694bee311af34a5e717d (patch)
treede6259ee4c0120e992f348afcc9078e16bbe49d4 /src/mame/drivers/guab.cpp
parentaa96f47092f764f089c2ce9e0f26d756197150e8 (diff)
Make MCFG_DEVICE_ADD and callable device types more flexible:
* Allows defaulted clocks (see subtle example with vboy) * Allows additional constructors (see RS232 port in tranz330) * Allows use of device finder in place of tag in MCFG_DEVICE_ADD * Requires out-of-line destructor for devices using incomplete types * Requires XTAL or explicit u32 for clocks for devices with private types Devices must still define the standard constructor. When writing additional constructors, be aware that the constructor runs before device_add_mconfig in the context of the existing device, not the new device. See osborne1, zorba, tranz330, and vboy for examples of this in use. Compilation is a bit slower, but this is temporary while refactoring is in progress. Eliminated the need for MCFG_SOUND_ROUTE_EX. Removed macros from slot option configuration - they just obfuscated code and slowed it down with needless dynamic casts, but didn't actually simplify it.
Diffstat (limited to 'src/mame/drivers/guab.cpp')
-rw-r--r--src/mame/drivers/guab.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mame/drivers/guab.cpp b/src/mame/drivers/guab.cpp
index 9df666b5f28..a0a88b316e6 100644
--- a/src/mame/drivers/guab.cpp
+++ b/src/mame/drivers/guab.cpp
@@ -458,9 +458,10 @@ FLOPPY_FORMATS_MEMBER( guab_state::floppy_formats )
FLOPPY_GUAB_FORMAT
FLOPPY_FORMATS_END
-static SLOT_INTERFACE_START( guab_floppies )
- SLOT_INTERFACE("dd", FLOPPY_35_DD)
-SLOT_INTERFACE_END
+static void guab_floppies(device_slot_interface &device)
+{
+ device.option_add("dd", FLOPPY_35_DD);
+}
//**************************************************************************
@@ -532,7 +533,7 @@ MACHINE_CONFIG_START(guab_state::guab)
MCFG_RS232_PORT_ADD("rs232_1", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia6850_1", acia6850_device, write_rxd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia6850_1", acia6850_device, write_cts))
- MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("keyboard", acia_1_rs232_defaults)
+ MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("keyboard", acia_1_rs232_defaults)
MCFG_DEVICE_ADD("acia_clock", CLOCK, 153600) // source? the ptm doesn't seem to output any common baud values
MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("acia6850_1", acia6850_device, write_txc))