summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/sg1000_exp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-05-06 00:40:40 +1000
committer Vas Crabb <vas@vastheman.com>2018-05-06 00:51:27 +1000
commit4ea3cd0bc1f54e47a0d38a47afac38101549e9ee (patch)
treebbadc20010b6bad48cf321b1c864655587e4b8ad /src/devices/bus/sg1000_exp
parentbba5127d7a73ca44fdc0dcab7286846c81206771 (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/sg1000_exp')
-rw-r--r--src/devices/bus/sg1000_exp/fm_unit.cpp2
-rw-r--r--src/devices/bus/sg1000_exp/sk1100.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/bus/sg1000_exp/fm_unit.cpp b/src/devices/bus/sg1000_exp/fm_unit.cpp
index c43b143248c..ab759994f30 100644
--- a/src/devices/bus/sg1000_exp/fm_unit.cpp
+++ b/src/devices/bus/sg1000_exp/fm_unit.cpp
@@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(SEGA_FM_UNIT, sega_fm_unit_device, "sega_fm_unit", "SG-1000 F
MACHINE_CONFIG_START(sega_fm_unit_device::device_add_mconfig)
- MCFG_SOUND_ADD("ym2413", YM2413, XTAL(10'738'635)/3)
+ MCFG_DEVICE_ADD("ym2413", YM2413, XTAL(10'738'635)/3)
// if this output gain is changed, the gain set when unmute the output need
// to be changed too, probably along the gain set for SMSJ/SMSKRFM drivers.
MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":mono", 1.00)
diff --git a/src/devices/bus/sg1000_exp/sk1100.cpp b/src/devices/bus/sg1000_exp/sk1100.cpp
index 89e4338ff28..c3b1c89d981 100644
--- a/src/devices/bus/sg1000_exp/sk1100.cpp
+++ b/src/devices/bus/sg1000_exp/sk1100.cpp
@@ -157,9 +157,9 @@ ioport_constructor sega_sk1100_device::device_input_ports() const
MACHINE_CONFIG_START(sega_sk1100_device::device_add_mconfig)
/* devices */
MCFG_DEVICE_ADD(UPD9255_0_TAG, I8255, 0)
- MCFG_I8255_IN_PORTA_CB(READ8(sega_sk1100_device, ppi_pa_r))
- MCFG_I8255_IN_PORTB_CB(READ8(sega_sk1100_device, ppi_pb_r))
- MCFG_I8255_OUT_PORTC_CB(WRITE8(sega_sk1100_device, ppi_pc_w))
+ MCFG_I8255_IN_PORTA_CB(READ8(*this, sega_sk1100_device, ppi_pa_r))
+ MCFG_I8255_IN_PORTB_CB(READ8(*this, sega_sk1100_device, ppi_pb_r))
+ MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, sega_sk1100_device, ppi_pc_w))
// MCFG_PRINTER_ADD("sp400") /* serial printer */