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/sdk86.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/sdk86.cpp')
-rw-r--r-- | src/mame/drivers/sdk86.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mame/drivers/sdk86.cpp b/src/mame/drivers/sdk86.cpp index b82d8ef2e18..f73851dd771 100644 --- a/src/mame/drivers/sdk86.cpp +++ b/src/mame/drivers/sdk86.cpp @@ -146,32 +146,32 @@ DEVICE_INPUT_DEFAULTS_END MACHINE_CONFIG_START(sdk86_state::sdk86) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", I8086, XTAL(14'745'600)/3) /* divided down by i8284 clock generator; jumper selection allows it to be slowed to 2.5MHz, hence changing divider from 3 to 6 */ - MCFG_CPU_PROGRAM_MAP(sdk86_mem) - MCFG_CPU_IO_MAP(sdk86_io) + MCFG_DEVICE_ADD("maincpu", I8086, XTAL(14'745'600)/3) /* divided down by i8284 clock generator; jumper selection allows it to be slowed to 2.5MHz, hence changing divider from 3 to 6 */ + MCFG_DEVICE_PROGRAM_MAP(sdk86_mem) + MCFG_DEVICE_IO_MAP(sdk86_io) /* video hardware */ MCFG_DEFAULT_LAYOUT(layout_sdk86) /* Devices */ MCFG_DEVICE_ADD(I8251_TAG, I8251, 0) - MCFG_I8251_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd)) - MCFG_I8251_DTR_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_dtr)) - MCFG_I8251_RTS_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_cts)) + MCFG_I8251_TXD_HANDLER(WRITELINE(RS232_TAG, rs232_port_device, write_txd)) + MCFG_I8251_DTR_HANDLER(WRITELINE(RS232_TAG, rs232_port_device, write_dtr)) + MCFG_I8251_RTS_HANDLER(WRITELINE(I8251_TAG, i8251_device, write_cts)) - MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, "terminal") - MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_rxd)) - MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr)) + MCFG_DEVICE_ADD(RS232_TAG, RS232_PORT, default_rs232_devices, "terminal") + MCFG_RS232_RXD_HANDLER(WRITELINE(I8251_TAG, i8251_device, write_rxd)) + MCFG_RS232_DSR_HANDLER(WRITELINE(I8251_TAG, i8251_device, write_dsr)) MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("terminal", terminal) MCFG_DEVICE_ADD("usart_clock", CLOCK, XTAL(14'745'600)/3/16) - MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_txc)) - MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE(I8251_TAG, i8251_device, write_rxc)) + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(I8251_TAG, i8251_device, write_txc)) + MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(I8251_TAG, i8251_device, write_rxc)) MCFG_DEVICE_ADD("i8279", I8279, 2500000) // based on divider - MCFG_I8279_OUT_SL_CB(WRITE8(sdk86_state, scanlines_w)) // scan SL lines - MCFG_I8279_OUT_DISP_CB(WRITE8(sdk86_state, digit_w)) // display A&B - MCFG_I8279_IN_RL_CB(READ8(sdk86_state, kbd_r)) // kbd RL lines + MCFG_I8279_OUT_SL_CB(WRITE8(*this, sdk86_state, scanlines_w)) // scan SL lines + MCFG_I8279_OUT_DISP_CB(WRITE8(*this, sdk86_state, digit_w)) // display A&B + MCFG_I8279_IN_RL_CB(READ8(*this, sdk86_state, kbd_r)) // kbd RL lines MCFG_I8279_IN_SHIFT_CB(GND) // Shift key MCFG_I8279_IN_CTRL_CB(GND) |