diff options
author | 2018-05-06 00:40:40 +1000 | |
---|---|---|
committer | 2018-05-06 00:51:27 +1000 | |
commit | 4ea3cd0bc1f54e47a0d38a47afac38101549e9ee (patch) | |
tree | bbadc20010b6bad48cf321b1c864655587e4b8ad /src/mame/drivers/force68k.cpp | |
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/mame/drivers/force68k.cpp')
-rw-r--r-- | src/mame/drivers/force68k.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/mame/drivers/force68k.cpp b/src/mame/drivers/force68k.cpp index b5326076d1c..4935d704917 100644 --- a/src/mame/drivers/force68k.cpp +++ b/src/mame/drivers/force68k.cpp @@ -539,8 +539,8 @@ static void fccpu1_vme_cards(device_slot_interface &device) */ MACHINE_CONFIG_START(force68k_state::fccpu1) /* basic machine hardware */ - MCFG_CPU_ADD ("maincpu", M68000, XTAL(16'000'000) / 2) - MCFG_CPU_PROGRAM_MAP (force68k_mem) + MCFG_DEVICE_ADD ("maincpu", M68000, XTAL(16'000'000) / 2) + MCFG_DEVICE_PROGRAM_MAP (force68k_mem) /* P3/Host Port config * LO command causes ROM monitor to expect S-records on HOST port by default @@ -550,52 +550,52 @@ MACHINE_CONFIG_START(force68k_state::fccpu1) */ MCFG_DEVICE_ADD ("aciahost", ACIA6850, 0) - MCFG_ACIA6850_TXD_HANDLER (DEVWRITELINE ("rs232host", rs232_port_device, write_txd)) - MCFG_ACIA6850_RTS_HANDLER (DEVWRITELINE ("rs232host", rs232_port_device, write_rts)) + MCFG_ACIA6850_TXD_HANDLER (WRITELINE ("rs232host", rs232_port_device, write_txd)) + MCFG_ACIA6850_RTS_HANDLER (WRITELINE ("rs232host", rs232_port_device, write_rts)) - MCFG_RS232_PORT_ADD ("rs232host", default_rs232_devices, "null_modem") - MCFG_RS232_RXD_HANDLER (DEVWRITELINE ("aciahost", acia6850_device, write_rxd)) - MCFG_RS232_CTS_HANDLER (DEVWRITELINE ("aciahost", acia6850_device, write_cts)) + MCFG_DEVICE_ADD ("rs232host", RS232_PORT, default_rs232_devices, "null_modem") + MCFG_RS232_RXD_HANDLER (WRITELINE ("aciahost", acia6850_device, write_rxd)) + MCFG_RS232_CTS_HANDLER (WRITELINE ("aciahost", acia6850_device, write_cts)) /* P4/Terminal Port config */ MCFG_DEVICE_ADD ("aciaterm", ACIA6850, 0) - MCFG_ACIA6850_TXD_HANDLER (DEVWRITELINE ("rs232trm", rs232_port_device, write_txd)) - MCFG_ACIA6850_RTS_HANDLER (DEVWRITELINE ("rs232trm", rs232_port_device, write_rts)) + MCFG_ACIA6850_TXD_HANDLER (WRITELINE ("rs232trm", rs232_port_device, write_txd)) + MCFG_ACIA6850_RTS_HANDLER (WRITELINE ("rs232trm", rs232_port_device, write_rts)) - MCFG_RS232_PORT_ADD ("rs232trm", default_rs232_devices, "terminal") - MCFG_RS232_RXD_HANDLER (DEVWRITELINE ("aciaterm", acia6850_device, write_rxd)) - MCFG_RS232_CTS_HANDLER (DEVWRITELINE ("aciaterm", acia6850_device, write_cts)) + MCFG_DEVICE_ADD ("rs232trm", RS232_PORT, default_rs232_devices, "terminal") + MCFG_RS232_RXD_HANDLER (WRITELINE ("aciaterm", acia6850_device, write_rxd)) + MCFG_RS232_CTS_HANDLER (WRITELINE ("aciaterm", acia6850_device, write_cts)) /* P5/Remote Port config */ MCFG_DEVICE_ADD ("aciaremt", ACIA6850, 0) /* Bit Rate Generator */ MCFG_MC14411_ADD ("brg", XTAL(1'843'200)) - MCFG_MC14411_F1_CB(WRITELINE (force68k_state, write_f1_clock)) - MCFG_MC14411_F3_CB(WRITELINE (force68k_state, write_f3_clock)) - MCFG_MC14411_F5_CB(WRITELINE (force68k_state, write_f5_clock)) - MCFG_MC14411_F7_CB(WRITELINE (force68k_state, write_f7_clock)) - MCFG_MC14411_F8_CB(WRITELINE (force68k_state, write_f8_clock)) - MCFG_MC14411_F9_CB(WRITELINE (force68k_state, write_f9_clock)) - MCFG_MC14411_F11_CB(WRITELINE (force68k_state, write_f11_clock)) - MCFG_MC14411_F13_CB(WRITELINE (force68k_state, write_f13_clock)) - MCFG_MC14411_F15_CB(WRITELINE (force68k_state, write_f15_clock)) + MCFG_MC14411_F1_CB(WRITELINE (*this, force68k_state, write_f1_clock)) + MCFG_MC14411_F3_CB(WRITELINE (*this, force68k_state, write_f3_clock)) + MCFG_MC14411_F5_CB(WRITELINE (*this, force68k_state, write_f5_clock)) + MCFG_MC14411_F7_CB(WRITELINE (*this, force68k_state, write_f7_clock)) + MCFG_MC14411_F8_CB(WRITELINE (*this, force68k_state, write_f8_clock)) + MCFG_MC14411_F9_CB(WRITELINE (*this, force68k_state, write_f9_clock)) + MCFG_MC14411_F11_CB(WRITELINE (*this, force68k_state, write_f11_clock)) + MCFG_MC14411_F13_CB(WRITELINE (*this, force68k_state, write_f13_clock)) + MCFG_MC14411_F15_CB(WRITELINE (*this, force68k_state, write_f15_clock)) /* RTC Real Time Clock device */ MCFG_DEVICE_ADD ("rtc", MM58167, XTAL(32'768)) /* PIT Parallel Interface and Timer device, assuming strapped for on board clock */ MCFG_DEVICE_ADD ("pit", PIT68230, XTAL(16'000'000) / 2) - MCFG_PIT68230_PA_OUTPUT_CB (DEVWRITE8 ("cent_data_out", output_latch_device, write)) - MCFG_PIT68230_H2_CB (DEVWRITELINE ("centronics", centronics_device, write_strobe)) + MCFG_PIT68230_PA_OUTPUT_CB (WRITE8 ("cent_data_out", output_latch_device, write)) + MCFG_PIT68230_H2_CB (WRITELINE ("centronics", centronics_device, write_strobe)) // Centronics MCFG_CENTRONICS_ADD ("centronics", centronics_devices, "printer") - MCFG_CENTRONICS_ACK_HANDLER (WRITELINE (force68k_state, centronics_ack_w)) - MCFG_CENTRONICS_BUSY_HANDLER (WRITELINE (force68k_state, centronics_busy_w)) - MCFG_CENTRONICS_PERROR_HANDLER (WRITELINE (force68k_state, centronics_perror_w)) - MCFG_CENTRONICS_SELECT_HANDLER (WRITELINE (force68k_state, centronics_select_w)) + MCFG_CENTRONICS_ACK_HANDLER (WRITELINE (*this, force68k_state, centronics_ack_w)) + MCFG_CENTRONICS_BUSY_HANDLER (WRITELINE (*this, force68k_state, centronics_busy_w)) + MCFG_CENTRONICS_PERROR_HANDLER (WRITELINE (*this, force68k_state, centronics_perror_w)) + MCFG_CENTRONICS_SELECT_HANDLER (WRITELINE (*this, force68k_state, centronics_select_w)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD ("cent_data_out", "centronics") // EPROM sockets @@ -611,28 +611,28 @@ MACHINE_CONFIG_END * such as an optional 68881 FPU */ MACHINE_CONFIG_START (force68k_state::fccpu6) - MCFG_CPU_ADD ("maincpu", M68000, XTAL(8'000'000)) /* Jumper B10 Mode B */ - MCFG_CPU_PROGRAM_MAP (force68k_mem) + MCFG_DEVICE_ADD ("maincpu", M68000, XTAL(8'000'000)) /* Jumper B10 Mode B */ + MCFG_DEVICE_PROGRAM_MAP (force68k_mem) MACHINE_CONFIG_END MACHINE_CONFIG_START (force68k_state::fccpu6a) - MCFG_CPU_ADD ("maincpu", M68000, XTAL(12'500'000)) /* Jumper B10 Mode A */ - MCFG_CPU_PROGRAM_MAP (force68k_mem) + MCFG_DEVICE_ADD ("maincpu", M68000, XTAL(12'500'000)) /* Jumper B10 Mode A */ + MCFG_DEVICE_PROGRAM_MAP (force68k_mem) MACHINE_CONFIG_END MACHINE_CONFIG_START (force68k_state::fccpu6v) - MCFG_CPU_ADD ("maincpu", M68010, XTAL(8'000'000)) /* Jumper B10 Mode B */ - MCFG_CPU_PROGRAM_MAP (force68k_mem) + MCFG_DEVICE_ADD ("maincpu", M68010, XTAL(8'000'000)) /* Jumper B10 Mode B */ + MCFG_DEVICE_PROGRAM_MAP (force68k_mem) MACHINE_CONFIG_END MACHINE_CONFIG_START (force68k_state::fccpu6va) - MCFG_CPU_ADD ("maincpu", M68010, XTAL(12'500'000)) /* Jumper B10 Mode A */ - MCFG_CPU_PROGRAM_MAP (force68k_mem) + MCFG_DEVICE_ADD ("maincpu", M68010, XTAL(12'500'000)) /* Jumper B10 Mode A */ + MCFG_DEVICE_PROGRAM_MAP (force68k_mem) MACHINE_CONFIG_END MACHINE_CONFIG_START (force68k_state::fccpu6vb) - MCFG_CPU_ADD ("maincpu", M68010, XTAL(12'500'000)) /* Jumper B10 Mode A */ - MCFG_CPU_PROGRAM_MAP (force68k_mem) + MCFG_DEVICE_ADD ("maincpu", M68010, XTAL(12'500'000)) /* Jumper B10 Mode A */ + MCFG_DEVICE_PROGRAM_MAP (force68k_mem) MACHINE_CONFIG_END #endif |