summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/decocass.c
diff options
context:
space:
mode:
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
commitf6b83b62c5f14751c4017cdc6b9b6c0d3a29a3c4 (patch)
tree9b52f318ea41cc4567d0b1f405432867be5f1220 /src/mame/drivers/decocass.c
parentce3c3205ccf83ec9898825f7a9e8583f6b4c8eb1 (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/decocass.c')
-rw-r--r--src/mame/drivers/decocass.c152
1 files changed, 60 insertions, 92 deletions
diff --git a/src/mame/drivers/decocass.c b/src/mame/drivers/decocass.c
index 22074b0dc9e..74ce2d79240 100644
--- a/src/mame/drivers/decocass.c
+++ b/src/mame/drivers/decocass.c
@@ -626,10 +626,7 @@ static PALETTE_INIT( decocass )
}
-static MACHINE_DRIVER_START( decocass )
-
- /* driver data */
- MDRV_DRIVER_DATA(decocass_state)
+static MACHINE_CONFIG_START( decocass, decocass_state )
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M6502, HCLK4)
@@ -669,241 +666,212 @@ static MACHINE_DRIVER_START( decocass )
MDRV_SOUND_ADD("ay2", AY8910, HCLK2)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( ctsttape )
+static MACHINE_CONFIG_DERIVED( ctsttape, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(ctsttape)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( chwy )
+static MACHINE_CONFIG_DERIVED( chwy, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(chwy)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( clocknch )
+static MACHINE_CONFIG_DERIVED( clocknch, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(clocknch)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( ctisland )
+static MACHINE_CONFIG_DERIVED( ctisland, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(ctisland)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( csuperas )
+static MACHINE_CONFIG_DERIVED( csuperas, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(csuperas)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( castfant )
+static MACHINE_CONFIG_DERIVED( castfant, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(castfant)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cluckypo )
+static MACHINE_CONFIG_DERIVED( cluckypo, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cluckypo)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cterrani )
+static MACHINE_CONFIG_DERIVED( cterrani, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cterrani)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cexplore )
+static MACHINE_CONFIG_DERIVED( cexplore, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cexplore)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cprogolf )
+static MACHINE_CONFIG_DERIVED( cprogolf, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cprogolf)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cmissnx )
+static MACHINE_CONFIG_DERIVED( cmissnx, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cmissnx)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cdiscon1 )
+static MACHINE_CONFIG_DERIVED( cdiscon1, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cdiscon1)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cptennis )
+static MACHINE_CONFIG_DERIVED( cptennis, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cptennis)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( ctornado )
+static MACHINE_CONFIG_DERIVED( ctornado, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(ctornado)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cbnj )
+static MACHINE_CONFIG_DERIVED( cbnj, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cbnj)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cburnrub )
+static MACHINE_CONFIG_DERIVED( cburnrub, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cburnrub)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cbtime )
+static MACHINE_CONFIG_DERIVED( cbtime, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cbtime)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cgraplop )
+static MACHINE_CONFIG_DERIVED( cgraplop, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cgraplop)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cgraplop2 )
+static MACHINE_CONFIG_DERIVED( cgraplop2, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cgraplop2)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( clapapa )
+static MACHINE_CONFIG_DERIVED( clapapa, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(clapapa)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cfghtice )
+static MACHINE_CONFIG_DERIVED( cfghtice, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cfghtice)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cprobowl )
+static MACHINE_CONFIG_DERIVED( cprobowl, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cprobowl)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cnightst )
+static MACHINE_CONFIG_DERIVED( cnightst, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cnightst)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cprosocc )
+static MACHINE_CONFIG_DERIVED( cprosocc, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cprosocc)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cppicf )
+static MACHINE_CONFIG_DERIVED( cppicf, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cppicf)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cbdash )
+static MACHINE_CONFIG_DERIVED( cbdash, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cbdash)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cscrtry )
+static MACHINE_CONFIG_DERIVED( cscrtry, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cscrtry)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( cflyball )
+static MACHINE_CONFIG_DERIVED( cflyball, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(cflyball)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
-static MACHINE_DRIVER_START( czeroize )
+static MACHINE_CONFIG_DERIVED( czeroize, decocass )
/* basic machine hardware */
- MDRV_IMPORT_FROM(decocass)
MDRV_MACHINE_RESET(czeroize)
MDRV_SCREEN_MODIFY("screen")
MDRV_SCREEN_VISIBLE_AREA(1*8, 32*8-1, 1*8, 31*8-1)
-MACHINE_DRIVER_END
+MACHINE_CONFIG_END
#define ROM_LOAD_BIOS(bios,name,offset,length,hash) \