summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/norautp.cpp
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/mame/drivers/norautp.cpp
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/mame/drivers/norautp.cpp')
-rw-r--r--src/mame/drivers/norautp.cpp114
1 files changed, 57 insertions, 57 deletions
diff --git a/src/mame/drivers/norautp.cpp b/src/mame/drivers/norautp.cpp
index bbbaca9eb41..ca5b4586e9a 100644
--- a/src/mame/drivers/norautp.cpp
+++ b/src/mame/drivers/norautp.cpp
@@ -1243,29 +1243,29 @@ GFXDECODE_END
MACHINE_CONFIG_START(norautp_state::noraut_base)
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80, NORAUT_CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(norautp_map)
- MCFG_CPU_IO_MAP(norautp_portmap)
+ MCFG_DEVICE_ADD("maincpu", Z80, NORAUT_CPU_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(norautp_map)
+ MCFG_DEVICE_IO_MAP(norautp_portmap)
MCFG_NVRAM_ADD_0FILL("nvram") /* doesn't work if placed at derivative drivers */
MCFG_DEVICE_ADD("ppi8255_0", I8255, 0)
/* (60-63) Mode 0 - Port A set as input */
MCFG_I8255_IN_PORTA_CB(IOPORT("DSW1"))
- MCFG_I8255_OUT_PORTB_CB(WRITE8(norautp_state, mainlamps_w))
- MCFG_I8255_OUT_PORTC_CB(WRITE8(norautp_state, counterlamps_w))
+ MCFG_I8255_OUT_PORTB_CB(WRITE8(*this, norautp_state, mainlamps_w))
+ MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, norautp_state, counterlamps_w))
MCFG_DEVICE_ADD("ppi8255_1", I8255, 0)
/* (a0-a3) Mode 0 - Ports A & B set as input */
MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
- MCFG_I8255_OUT_PORTC_CB(WRITE8(norautp_state, soundlamps_w))
+ MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, norautp_state, soundlamps_w))
MCFG_DEVICE_ADD("ppi8255_2", I8255, 0)
/* (c0-c3) Group A Mode 2 (5-lines handshacked bidirectional port)
Group B Mode 0, output; (see below for lines PC0-PC2) */
MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))
- MCFG_I8255_OUT_PORTC_CB(WRITELINE(norautp_state, ppi2_obf_w)) MCFG_DEVCB_BIT(7)
+ MCFG_I8255_OUT_PORTC_CB(WRITELINE(*this, norautp_state, ppi2_obf_w)) MCFG_DEVCB_BIT(7)
/* PPI-2 is configured as mixed mode2 and mode0 output.
It means that port A should be bidirectional and port B just as output.
Port C as hshk regs, and P0-P2 as input (norautp, norautjp) or output (other sets). */
@@ -1286,7 +1286,7 @@ MACHINE_CONFIG_START(norautp_state::noraut_base)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("discrete", DISCRETE, 0)
+ MCFG_DEVICE_ADD("discrete", DISCRETE)
MCFG_DISCRETE_INTF(norautp)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -1296,8 +1296,8 @@ MACHINE_CONFIG_START(norautp_state::norautp)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
MACHINE_CONFIG_END
@@ -1305,11 +1305,11 @@ MACHINE_CONFIG_START(norautp_state::norautpl)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
/* sound hardware */
- MCFG_SOUND_MODIFY("discrete")
+ MCFG_DEVICE_MODIFY("discrete")
MCFG_DISCRETE_INTF(kimble)
MACHINE_CONFIG_END
@@ -1318,9 +1318,9 @@ MACHINE_CONFIG_START(norautp_state::norautxp)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(norautxp_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(norautxp_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
MACHINE_CONFIG_END
@@ -1328,9 +1328,9 @@ MACHINE_CONFIG_START(norautp_state::nortest1)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(nortest1_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(nortest1_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
MACHINE_CONFIG_END
@@ -1338,9 +1338,9 @@ MACHINE_CONFIG_START(norautp_state::norautx4)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(norautx4_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(norautx4_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
MACHINE_CONFIG_END
@@ -1349,9 +1349,9 @@ static MACHINE_CONFIG_START( norautx8 )
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(norautx8_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(norautx8_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
MACHINE_CONFIG_END
#endif
@@ -1360,12 +1360,12 @@ MACHINE_CONFIG_START(norautp_state::kimble)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(kimble_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(kimble_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
/* sound hardware */
- MCFG_SOUND_MODIFY("discrete")
+ MCFG_DEVICE_MODIFY("discrete")
MCFG_DISCRETE_INTF(kimble)
MACHINE_CONFIG_END
@@ -1373,10 +1373,10 @@ MACHINE_CONFIG_START(norautp_state::newhilop)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(newhilop_map)
-// MCFG_CPU_IO_MAP(newhilop_portmap)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(newhilop_map)
+// MCFG_DEVICE_IO_MAP(newhilop_portmap)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold)
MACHINE_CONFIG_END
/********** 8080 based **********/
@@ -1386,12 +1386,12 @@ MACHINE_CONFIG_START(norautp_state::dphl)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(dphl_map)
- MCFG_CPU_IO_MAP(norautp_portmap)
+ MCFG_DEVICE_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(dphl_map)
+ MCFG_DEVICE_IO_MAP(norautp_portmap)
/* sound hardware */
- MCFG_SOUND_MODIFY("discrete")
+ MCFG_DEVICE_MODIFY("discrete")
MCFG_DISCRETE_INTF(dphl)
MACHINE_CONFIG_END
@@ -1400,12 +1400,12 @@ MACHINE_CONFIG_START(norautp_state::dphla)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(dphla_map)
- MCFG_CPU_IO_MAP(norautp_portmap)
+ MCFG_DEVICE_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(dphla_map)
+ MCFG_DEVICE_IO_MAP(norautp_portmap)
/* sound hardware */
- MCFG_SOUND_MODIFY("discrete")
+ MCFG_DEVICE_MODIFY("discrete")
MCFG_DISCRETE_INTF(dphl)
MACHINE_CONFIG_END
@@ -1414,12 +1414,12 @@ MACHINE_CONFIG_START(norautp_state::kimbldhl)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(kimbldhl_map)
- MCFG_CPU_IO_MAP(norautp_portmap)
+ MCFG_DEVICE_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(kimbldhl_map)
+ MCFG_DEVICE_IO_MAP(norautp_portmap)
/* sound hardware */
- MCFG_SOUND_MODIFY("discrete")
+ MCFG_DEVICE_MODIFY("discrete")
MCFG_DISCRETE_INTF(kimble)
MACHINE_CONFIG_END
@@ -1428,12 +1428,12 @@ MACHINE_CONFIG_START(norautp_state::dphltest)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(dphltest_map)
- MCFG_CPU_IO_MAP(norautp_portmap)
+ MCFG_DEVICE_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(dphltest_map)
+ MCFG_DEVICE_IO_MAP(norautp_portmap)
/* sound hardware */
- MCFG_SOUND_MODIFY("discrete")
+ MCFG_DEVICE_MODIFY("discrete")
MCFG_DISCRETE_INTF(dphl)
MACHINE_CONFIG_END
@@ -1442,12 +1442,12 @@ MACHINE_CONFIG_START(norautp_state::drhl)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(drhl_map)
- MCFG_CPU_IO_MAP(norautp_portmap)
+ MCFG_DEVICE_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(drhl_map)
+ MCFG_DEVICE_IO_MAP(norautp_portmap)
/* sound hardware */
- MCFG_SOUND_MODIFY("discrete")
+ MCFG_DEVICE_MODIFY("discrete")
MCFG_DISCRETE_INTF(dphl)
MACHINE_CONFIG_END
@@ -1456,12 +1456,12 @@ MACHINE_CONFIG_START(norautp_state::ssjkrpkr)
noraut_base(config);
/* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(ssjkrpkr_map)
- MCFG_CPU_IO_MAP(norautp_portmap)
+ MCFG_DEVICE_REPLACE("maincpu", I8080, DPHL_CPU_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(ssjkrpkr_map)
+ MCFG_DEVICE_IO_MAP(norautp_portmap)
/* sound hardware */
- MCFG_SOUND_MODIFY("discrete")
+ MCFG_DEVICE_MODIFY("discrete")
MCFG_DISCRETE_INTF(dphl)
MACHINE_CONFIG_END