diff options
author | 2018-05-06 00:40:40 +1000 | |
---|---|---|
committer | 2018-05-06 00:51:27 +1000 | |
commit | 4ea3cd0bc1f54e47a0d38a47afac38101549e9ee (patch) | |
tree | bbadc20010b6bad48cf321b1c864655587e4b8ad /src/devices/bus/scsi | |
parent | bba5127d7a73ca44fdc0dcab7286846c81206771 (diff) |
Streamline machine configuration macros - everyone's a device edition.
Start replacing special device macros with additional constructors,
starting with ISA, INTELLEC 4 and RS-232 buses.
Allow an object finder to take on the target of another object finder.
(For a combination of the previous two things in action, see either the
INTELLEC 4 driver, or the Apple 2 PC Exporter card. Also check out
looping over a device finder array to instantiate devices in some
places. Lots of things no longer need to pass tags around.)
Start supplying default clocks for things that have a standard clock or
have all clocks internal.
Eliminate the separate DEV versions of the DEVCB_ macros. Previously,
the plain versions were a shortcut for DEVICE_SELF as the target. You
can now supply a string tag (relative to current device being
configured), an object finder (takes on the base and relative tag), or
a reference to a device/interface (only do this if you know the device
won't be replaced out from under it, but that's a safe assumption for
your subdevices). In almost all cases, you can get the effect you want
by supplying *this as the target.
Eliminate sound and CPU versions of macros. They serve no useful
purpose, provide no extra checks, make error messages longer, add
indirection, and mislead newbies into thinking there's a difference.
Remove a lot of now-unnecessary ":" prefixes binding things relative to
machine root.
Clean up some miscellaneous rot.
Examples of new functionality in use in (some more subtle than others):
* src/mame/drivers/intellec4.cpp
* src/mame/drivers/tranz330.cpp
* src/mame/drivers/osboren1.cpp
* src/mame/drivers/zorba.cpp
* src/mame/devices/smioc.cpp
* src/devices/bus/a2bus/pc_xporter.cpp
* src/devices/bus/isa/isa.h
* src/devices/bus/isa/isa.h
* src/devices/bus/intellec4/intellec4.h
Diffstat (limited to 'src/devices/bus/scsi')
-rw-r--r-- | src/devices/bus/scsi/s1410.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/scsi/scsi.h | 32 | ||||
-rw-r--r-- | src/devices/bus/scsi/scsicd.cpp | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/src/devices/bus/scsi/s1410.cpp b/src/devices/bus/scsi/s1410.cpp index 67637f3b7fc..e05cfe73014 100644 --- a/src/devices/bus/scsi/s1410.cpp +++ b/src/devices/bus/scsi/s1410.cpp @@ -166,9 +166,9 @@ void s1410_device::s1410_io(address_map &map) //------------------------------------------------- MACHINE_CONFIG_START(s1410_device::device_add_mconfig) - MCFG_CPU_ADD(Z8400A_TAG, Z80, XTAL(16'000'000)/4) - MCFG_CPU_PROGRAM_MAP(s1410_mem) - MCFG_CPU_IO_MAP(s1410_io) + MCFG_DEVICE_ADD(Z8400A_TAG, Z80, XTAL(16'000'000)/4) + MCFG_DEVICE_PROGRAM_MAP(s1410_mem) + MCFG_DEVICE_IO_MAP(s1410_io) MCFG_DEVICE_DISABLE() MCFG_HARDDISK_ADD("image") diff --git a/src/devices/bus/scsi/scsi.h b/src/devices/bus/scsi/scsi.h index 5ed0f8ab019..d6c93129667 100644 --- a/src/devices/bus/scsi/scsi.h +++ b/src/devices/bus/scsi/scsi.h @@ -70,24 +70,24 @@ #define MCFG_SCSI_OUTPUT_LATCH_ADD(_tag, scsi_port_tag) \ MCFG_DEVICE_ADD(_tag, OUTPUT_LATCH, 0) \ - MCFG_OUTPUT_LATCH_BIT0_HANDLER(DEVWRITELINE(scsi_port_tag, scsi_port_device, write_data0)) \ - MCFG_OUTPUT_LATCH_BIT1_HANDLER(DEVWRITELINE(scsi_port_tag, scsi_port_device, write_data1)) \ - MCFG_OUTPUT_LATCH_BIT2_HANDLER(DEVWRITELINE(scsi_port_tag, scsi_port_device, write_data2)) \ - MCFG_OUTPUT_LATCH_BIT3_HANDLER(DEVWRITELINE(scsi_port_tag, scsi_port_device, write_data3)) \ - MCFG_OUTPUT_LATCH_BIT4_HANDLER(DEVWRITELINE(scsi_port_tag, scsi_port_device, write_data4)) \ - MCFG_OUTPUT_LATCH_BIT5_HANDLER(DEVWRITELINE(scsi_port_tag, scsi_port_device, write_data5)) \ - MCFG_OUTPUT_LATCH_BIT6_HANDLER(DEVWRITELINE(scsi_port_tag, scsi_port_device, write_data6)) \ - MCFG_OUTPUT_LATCH_BIT7_HANDLER(DEVWRITELINE(scsi_port_tag, scsi_port_device, write_data7)) + MCFG_OUTPUT_LATCH_BIT0_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data0)) \ + MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data1)) \ + MCFG_OUTPUT_LATCH_BIT2_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data2)) \ + MCFG_OUTPUT_LATCH_BIT3_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data3)) \ + MCFG_OUTPUT_LATCH_BIT4_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data4)) \ + MCFG_OUTPUT_LATCH_BIT5_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data5)) \ + MCFG_OUTPUT_LATCH_BIT6_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data6)) \ + MCFG_OUTPUT_LATCH_BIT7_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data7)) #define MCFG_SCSI_DATA_INPUT_BUFFER(_tag) \ - MCFG_SCSI_DATA0_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit0)) \ - MCFG_SCSI_DATA1_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit1)) \ - MCFG_SCSI_DATA2_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit2)) \ - MCFG_SCSI_DATA3_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit3)) \ - MCFG_SCSI_DATA4_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit4)) \ - MCFG_SCSI_DATA5_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit5)) \ - MCFG_SCSI_DATA6_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit6)) \ - MCFG_SCSI_DATA7_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit7)) + MCFG_SCSI_DATA0_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit0)) \ + MCFG_SCSI_DATA1_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit1)) \ + MCFG_SCSI_DATA2_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit2)) \ + MCFG_SCSI_DATA3_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit3)) \ + MCFG_SCSI_DATA4_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit4)) \ + MCFG_SCSI_DATA5_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit5)) \ + MCFG_SCSI_DATA6_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit6)) \ + MCFG_SCSI_DATA7_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit7)) class scsi_port_slot_device; class scsi_port_interface; diff --git a/src/devices/bus/scsi/scsicd.cpp b/src/devices/bus/scsi/scsicd.cpp index 42da6f2fc6c..1a5e6f8002d 100644 --- a/src/devices/bus/scsi/scsicd.cpp +++ b/src/devices/bus/scsi/scsicd.cpp @@ -33,5 +33,5 @@ void scsicd_device::device_start() MACHINE_CONFIG_START(scsicd_device::device_add_mconfig) MCFG_CDROM_ADD("image") MCFG_CDROM_INTERFACE("cdrom") - MCFG_SOUND_ADD("cdda", CDDA, 0) + MCFG_DEVICE_ADD("cdda", CDDA) MACHINE_CONFIG_END |