diff options
author | Aaron Giles <aaron@aarongiles.com> | 2010-09-01 05:03:27 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2010-09-01 05:03:27 +0000 |
commit | f6b83b62c5f14751c4017cdc6b9b6c0d3a29a3c4 (patch) | |
tree | 9b52f318ea41cc4567d0b1f405432867be5f1220 /src/mame/drivers/funworld.c | |
parent | ce3c3205ccf83ec9898825f7a9e8583f6b4c8eb1 (diff) |
Changed the MACHINE_DRIVER_* macros, as follows:
1. Renamed MACHINE_DRIVER_* to MACHINE_CONFIG_* to match the name
of the object it actually describes. The MDRV_* prefix may
eventually be bulk updated at some point, but not now.
2. MACHINE_CONFIG_START() now takes a driver_data_t-derived
class as a required second parameter. This means that
MDRV_DRIVER_DATA() is no longer required, and every "root"
machine config *must* specify a driver data class (or driver_data_t
itself if the driver has not yet been updated to use driver data).
3. New MACHINE_CONFIG_DERIVED() macro defines a machine_config
that is derived from another machine_config. This takes the place
of the very typical MACHINE_DRIVER_START()/MDRV_IMPORT_FROM()
combination.
4. New MACHINE_CONFIG_FRAGMENT() macro defines a partial
machine_config that can only be included in another "root"
machine_config. This is also used for machine_configs that are
specified as part of a device.
5. Changed MDRV_IMPORT_FROM() to MDRV_FRAGMENT_ADD() to more
accurately describe what is happening.
6. Added asserts to the above three macros to ensure they are
properly used.
Updated all machine drivers to use the new macros. Search & replace
lists below cover 99% of the changes, with just a few manual fixups.
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*MDRV_DRIVER_DATA\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, \2 \)
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*/\* driver data \*/[\r\n\t ]*MDRV_DRIVER_DATA\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, \2 \)
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*MDRV_IMPORT_FROM\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_DERIVED\( \1, \2 \)
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*/\* basic machine hardware \*/[\r\n\t ]*MDRV_IMPORT_FROM\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_DERIVED\( \1, \2 \)\r\n\r\n\t/\* basic machine hardware \*/
For all files outside of mame/drivers....
S: MACHINE_DRIVER_START
R: MACHINE_CONFIG_FRAGMENT in all non-drivers
For all files within mame/drivers....
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, driver_data_t \)
S: MDRV_IMPORT_FROM
R: MDRV_FRAGMENT_ADD
S: MACHINE_DRIVER_END
R: MACHINE_CONFIG_END
S: MACHINE_DRIVER_NAME
R: MACHINE_CONFIG_NAME
S: MACHINE_DRIVER_EXTERN
R: MACHINE_CONFIG_EXTERN
Final step: run mame -valid and fix the incorrect macros at the lines
where the asserts show up.
Diffstat (limited to 'src/mame/drivers/funworld.c')
-rw-r--r-- | src/mame/drivers/funworld.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/src/mame/drivers/funworld.c b/src/mame/drivers/funworld.c index 275e3776ea5..f43bf17e2e6 100644 --- a/src/mame/drivers/funworld.c +++ b/src/mame/drivers/funworld.c @@ -2116,7 +2116,7 @@ static const mc6845_interface mc6845_intf = * Machine Drivers * **************************/ -static MACHINE_DRIVER_START( fw1stpal ) +static MACHINE_CONFIG_START( fw1stpal, driver_data_t ) /* basic machine hardware */ MDRV_CPU_ADD("maincpu", M65SC02, MASTER_CLOCK/8) /* 2MHz */ MDRV_CPU_PROGRAM_MAP(funworld_map) @@ -2151,23 +2151,21 @@ static MACHINE_DRIVER_START( fw1stpal ) MDRV_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/8) /* 2MHz */ MDRV_SOUND_CONFIG(ay8910_intf) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.5) /* analyzed to avoid clips */ -MACHINE_DRIVER_END +MACHINE_CONFIG_END -static MACHINE_DRIVER_START( fw2ndpal ) - MDRV_IMPORT_FROM(fw1stpal) +static MACHINE_CONFIG_DERIVED( fw2ndpal, fw1stpal ) MDRV_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MDRV_CPU_PROGRAM_MAP(funworld_map) MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) MDRV_GFXDECODE(fw2ndpal) -MACHINE_DRIVER_END +MACHINE_CONFIG_END -static MACHINE_DRIVER_START( funquiz ) - MDRV_IMPORT_FROM(fw1stpal) -// MDRV_IMPORT_FROM(fw2ndpal) +static MACHINE_CONFIG_DERIVED( funquiz, fw1stpal ) +// MDRV_FRAGMENT_ADD(fw2ndpal) MDRV_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MDRV_CPU_PROGRAM_MAP(funquiz_map) @@ -2176,11 +2174,10 @@ static MACHINE_DRIVER_START( funquiz ) MDRV_SOUND_REPLACE("ay8910", AY8910, MASTER_CLOCK/8) /* 2MHz */ MDRV_SOUND_CONFIG(funquiz_ay8910_intf) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.5) -MACHINE_DRIVER_END +MACHINE_CONFIG_END -static MACHINE_DRIVER_START( magicrd2 ) - MDRV_IMPORT_FROM(fw1stpal) +static MACHINE_CONFIG_DERIVED( magicrd2, fw1stpal ) MDRV_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MDRV_CPU_PROGRAM_MAP(magicrd2_map) @@ -2191,39 +2188,35 @@ static MACHINE_DRIVER_START( magicrd2 ) MDRV_SOUND_REPLACE("ay8910", AY8910, MASTER_CLOCK/8) /* 2MHz */ MDRV_SOUND_CONFIG(ay8910_intf) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.5) /* analyzed to avoid clips */ -MACHINE_DRIVER_END +MACHINE_CONFIG_END -static MACHINE_DRIVER_START( royalcd1 ) - MDRV_IMPORT_FROM(fw1stpal) +static MACHINE_CONFIG_DERIVED( royalcd1, fw1stpal ) MDRV_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* (G65SC02P in pro version) 2MHz */ MDRV_CPU_PROGRAM_MAP(magicrd2_map) MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) -MACHINE_DRIVER_END +MACHINE_CONFIG_END -static MACHINE_DRIVER_START( royalcd2 ) - MDRV_IMPORT_FROM(fw2ndpal) +static MACHINE_CONFIG_DERIVED( royalcd2, fw2ndpal ) MDRV_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MDRV_CPU_PROGRAM_MAP(magicrd2_map) MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) -MACHINE_DRIVER_END +MACHINE_CONFIG_END -static MACHINE_DRIVER_START( cuoreuno ) - MDRV_IMPORT_FROM(fw1stpal) +static MACHINE_CONFIG_DERIVED( cuoreuno, fw1stpal ) MDRV_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MDRV_CPU_PROGRAM_MAP(cuoreuno_map) MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) -MACHINE_DRIVER_END +MACHINE_CONFIG_END -static MACHINE_DRIVER_START( saloon ) - MDRV_IMPORT_FROM(fw1stpal) +static MACHINE_CONFIG_DERIVED( saloon, fw1stpal ) MDRV_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MDRV_CPU_PROGRAM_MAP(saloon_map) MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) -MACHINE_DRIVER_END +MACHINE_CONFIG_END |