diff options
author | 2018-05-04 03:01:32 +1000 | |
---|---|---|
committer | 2018-05-04 03:01:32 +1000 | |
commit | 32a73f450da82c345b0f694bee311af34a5e717d (patch) | |
tree | de6259ee4c0120e992f348afcc9078e16bbe49d4 /src/devices/bus/adamnet | |
parent | aa96f47092f764f089c2ce9e0f26d756197150e8 (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/devices/bus/adamnet')
-rw-r--r-- | src/devices/bus/adamnet/adamnet.cpp | 15 | ||||
-rw-r--r-- | src/devices/bus/adamnet/adamnet.h | 4 | ||||
-rw-r--r-- | src/devices/bus/adamnet/fdc.cpp | 7 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/devices/bus/adamnet/adamnet.cpp b/src/devices/bus/adamnet/adamnet.cpp index 832ea2309c4..7e45a72adca 100644 --- a/src/devices/bus/adamnet/adamnet.cpp +++ b/src/devices/bus/adamnet/adamnet.cpp @@ -257,10 +257,11 @@ WRITE_LINE_MEMBER( adamnet_device::reset_w ) #include "printer.h" #include "spi.h" -SLOT_INTERFACE_START( adamnet_devices ) - SLOT_INTERFACE("ddp", ADAM_DDP) - SLOT_INTERFACE("fdc", ADAM_FDC) - SLOT_INTERFACE("kb", ADAM_KB) - SLOT_INTERFACE("prn", ADAM_PRN) - SLOT_INTERFACE("spi", ADAM_SPI) -SLOT_INTERFACE_END +void adamnet_devices(device_slot_interface &device) +{ + device.option_add("ddp", ADAM_DDP); + device.option_add("fdc", ADAM_FDC); + device.option_add("kb", ADAM_KB); + device.option_add("prn", ADAM_PRN); + device.option_add("spi", ADAM_SPI); +} diff --git a/src/devices/bus/adamnet/adamnet.h b/src/devices/bus/adamnet/adamnet.h index 76e42742f1c..b95fca7585d 100644 --- a/src/devices/bus/adamnet/adamnet.h +++ b/src/devices/bus/adamnet/adamnet.h @@ -127,8 +127,6 @@ DECLARE_DEVICE_TYPE(ADAMNET, adamnet_device) DECLARE_DEVICE_TYPE(ADAMNET_SLOT, adamnet_slot_device) -SLOT_INTERFACE_EXTERN( adamnet_devices ); - - +void adamnet_devices(device_slot_interface &device); #endif // MAME_BUS_ADAMNET_ADAMNET_H diff --git a/src/devices/bus/adamnet/fdc.cpp b/src/devices/bus/adamnet/fdc.cpp index 00b0d4c64de..68d6b377062 100644 --- a/src/devices/bus/adamnet/fdc.cpp +++ b/src/devices/bus/adamnet/fdc.cpp @@ -117,9 +117,10 @@ FLOPPY_FORMATS_MEMBER( adam_fdc_device::floppy_formats ) FLOPPY_ADAM_FORMAT FLOPPY_FORMATS_END -static SLOT_INTERFACE_START( adam_fdc_floppies ) - SLOT_INTERFACE( "525ssdd", FLOPPY_525_SSDD ) -SLOT_INTERFACE_END +static void adam_fdc_floppies(device_slot_interface &device) +{ + device.option_add("525ssdd", FLOPPY_525_SSDD); +} //------------------------------------------------- |