summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/expro02.cpp
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2017-05-07 23:18:47 +1000
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2017-05-14 21:44:11 +1000
commit0f0d39ef81562c75e79176dd3bebb1e491ca39d5 (patch) (github)
tree201cee7fdf55ee800f83859a92efd2cfe66cf2b3 /src/mame/drivers/expro02.cpp
parente6c4be2b4d71c7a6c95be0bae111eb416ff0f9e7 (diff)
downloadmame-0f0d39ef81562c75e79176dd3bebb1e491ca39d5.tar.bz2
mame-0f0d39ef81562c75e79176dd3bebb1e491ca39d5.zip
Move static data out of devices into the device types. This is a significant change, so please pay attention.
The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.
Diffstat (limited to 'src/mame/drivers/expro02.cpp')
-rw-r--r--src/mame/drivers/expro02.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/mame/drivers/expro02.cpp b/src/mame/drivers/expro02.cpp
index f18f09f308c..691fcd9b5d1 100644
--- a/src/mame/drivers/expro02.cpp
+++ b/src/mame/drivers/expro02.cpp
@@ -876,7 +876,7 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_CONFIG_START( expro02, expro02_state )
+static MACHINE_CONFIG_START( expro02 )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 12000000)
@@ -921,7 +921,7 @@ static MACHINE_CONFIG_START( expro02, expro02_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_OKIM6295_ADD("oki", 12000000/6, OKIM6295_PIN7_LOW)
+ MCFG_OKIM6295_ADD("oki", 12000000/6, PIN7_LOW)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
@@ -960,7 +960,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( supmodel, comad_noview2 )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(supmodel_map)
- MCFG_OKIM6295_REPLACE("oki", 1584000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_OKIM6295_REPLACE("oki", 1584000, PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -978,7 +978,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( galhustl, comad_noview2 )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(galhustl_map)
- MCFG_OKIM6295_REPLACE("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_OKIM6295_REPLACE("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
@@ -990,7 +990,7 @@ static MACHINE_CONFIG_DERIVED( zipzap, comad_noview2 )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(zipzap_map)
- MCFG_OKIM6295_REPLACE("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_OKIM6295_REPLACE("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
@@ -1822,42 +1822,42 @@ DRIVER_INIT_MEMBER(expro02_state,expro02)
*
*************************************/
-GAME( 1990, galsnew, 0, expro02, expro02, expro02_state, expro02, ROT90, "Kaneko", "Gals Panic (US, EXPRO-02 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1990, galsnewa, galsnew, expro02, galsnewa, expro02_state, expro02, ROT90, "Kaneko", "Gals Panic (Export, EXPRO-02 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1990, galsnewj, galsnew, expro02, galsnewj, expro02_state, expro02, ROT90, "Kaneko (Taito license)", "Gals Panic (Japan, EXPRO-02 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1990, galsnewk, galsnew, expro02, galsnewj, expro02_state, expro02, ROT90, "Kaneko (Inter license)", "Gals Panic (Korea, EXPRO-02 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, galsnew, 0, expro02, expro02, expro02_state, expro02, ROT90, "Kaneko", "Gals Panic (US, EXPRO-02 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, galsnewa, galsnew, expro02, galsnewa, expro02_state, expro02, ROT90, "Kaneko", "Gals Panic (Export, EXPRO-02 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, galsnewj, galsnew, expro02, galsnewj, expro02_state, expro02, ROT90, "Kaneko (Taito license)", "Gals Panic (Japan, EXPRO-02 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, galsnewk, galsnew, expro02, galsnewj, expro02_state, expro02, ROT90, "Kaneko (Inter license)", "Gals Panic (Korea, EXPRO-02 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
/* the first version of Fantasia clones the EXPRO02 almost exactly, including the encrypted tiles*/
-GAME( 1994, fantasia, 0, comad, fantasia, expro02_state, expro02, ROT90, "Comad & New Japan System", "Fantasia (940429 PCB, set 1)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1994, fantasiab, fantasia, comad, fantasia, expro02_state, expro02, ROT90, "Comad & New Japan System", "Fantasia (940429 PCB, set 2)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1994, fantasiaa, fantasia, comad, fantasia, expro02_state, expro02, ROT90, "Comad & New Japan System", "Fantasia (940307 PCB)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1994, fantasia, 0, comad, fantasia, expro02_state, expro02, ROT90, "Comad & New Japan System", "Fantasia (940429 PCB, set 1)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1994, fantasiab, fantasia, comad, fantasia, expro02_state, expro02, ROT90, "Comad & New Japan System", "Fantasia (940429 PCB, set 2)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1994, fantasiaa, fantasia, comad, fantasia, expro02_state, expro02, ROT90, "Comad & New Japan System", "Fantasia (940307 PCB)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
/* subsequent releases remove the encrypted tile (View2 layer) but leave the unused writes to it in the program code */
-GAME( 1994, fantasian,fantasia, fantasia, fantasiaa, driver_device, 0, ROT90, "Comad & New Japan System", "Fantasia (940803 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1994, fantasian,fantasia, fantasia, fantasiaa, expro02_state, 0, ROT90, "Comad & New Japan System", "Fantasia (940803 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1994, supmodel, 0, supmodel, fantasiaa, driver_device, 0, ROT90, "Comad & New Japan System", "Super Model",MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "C" nudity level
+GAME( 1994, supmodel, 0, supmodel, fantasiaa, expro02_state, 0, ROT90, "Comad & New Japan System", "Super Model",MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "C" nudity level
-GAME( 1995, newfant, 0, fantasia, fantasiaa, driver_device, 0, ROT90, "Comad & New Japan System", "New Fantasia (1995 copyright)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // the only difference between the two is the gfx rom containing the copyright
-GAME( 1994, newfanta, newfant, fantasia, fantasiaa, driver_device, 0, ROT90, "Comad & New Japan System", "New Fantasia (1994 copyright)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1995, fantsy95, newfant, fantasia, fantasiaa, driver_device, 0, ROT90, "Hi-max Technology Inc.", "Fantasy '95", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "C" nudity level
+GAME( 1995, newfant, 0, fantasia, fantasiaa, expro02_state, 0, ROT90, "Comad & New Japan System", "New Fantasia (1995 copyright)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // the only difference between the two is the gfx rom containing the copyright
+GAME( 1994, newfanta, newfant, fantasia, fantasiaa, expro02_state, 0, ROT90, "Comad & New Japan System", "New Fantasia (1994 copyright)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1995, fantsy95, newfant, fantasia, fantasiaa, expro02_state, 0, ROT90, "Hi-max Technology Inc.", "Fantasy '95", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "C" nudity level
// the PCB label (A/B) could be related to the 3 different levels of nudity Comad offered
-GAME( 1996, missw96, 0, fantasia, missw96, driver_device, 0, ROT0, "Comad", "Miss World '96 (Nude) (C-3000A PCB, set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
-GAME( 1996, missw96a, missw96, fantasia, missw96, driver_device, 0, ROT0, "Comad", "Miss World '96 (Nude) (C-3000A PCB, set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
-GAME( 1996, missw96b, missw96, fantasia, missw96, driver_device, 0, ROT0, "Comad", "Miss World '96 (Nude) (C-3000A PCB, set 3)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
-GAME( 1996, missw96c, missw96, fantasia, missw96, driver_device, 0, ROT0, "Comad", "Miss World '96 (Nude) (C-3000B PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "B" nudity level
+GAME( 1996, missw96, 0, fantasia, missw96, expro02_state, 0, ROT0, "Comad", "Miss World '96 (Nude) (C-3000A PCB, set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
+GAME( 1996, missw96a, missw96, fantasia, missw96, expro02_state, 0, ROT0, "Comad", "Miss World '96 (Nude) (C-3000A PCB, set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
+GAME( 1996, missw96b, missw96, fantasia, missw96, expro02_state, 0, ROT0, "Comad", "Miss World '96 (Nude) (C-3000A PCB, set 3)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
+GAME( 1996, missw96c, missw96, fantasia, missw96, expro02_state, 0, ROT0, "Comad", "Miss World '96 (Nude) (C-3000B PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "B" nudity level
-GAME( 1996, missmw96, missw96, fantasia, missw96, driver_device, 0, ROT0, "Comad", "Miss Mister World '96 (Nude)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1996, missmw96, missw96, fantasia, missw96, expro02_state, 0, ROT0, "Comad", "Miss Mister World '96 (Nude)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1996, smissw, 0, smissw, missw96, driver_device, 0, ROT0, "Comad", "Super Miss World", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // 951127 PCB
+GAME( 1996, smissw, 0, smissw, missw96, expro02_state, 0, ROT0, "Comad", "Super Miss World", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // 951127 PCB
-GAME( 1997, fantsia2, 0, fantsia2, missw96, driver_device, 0, ROT0, "Comad", "Fantasia II (Explicit)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
-GAME( 1997, fantsia2a,fantsia2, fantsia2, missw96, driver_device, 0, ROT0, "Comad", "Fantasia II (Less Explicit)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "B" nudity level
-GAME( 1998, fantsia2n,fantsia2, fantsia2, missw96, driver_device, 0, ROT0, "Comad", "Fantasia II (1998)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
+GAME( 1997, fantsia2, 0, fantsia2, missw96, expro02_state, 0, ROT0, "Comad", "Fantasia II (Explicit)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
+GAME( 1997, fantsia2a,fantsia2, fantsia2, missw96, expro02_state, 0, ROT0, "Comad", "Fantasia II (Less Explicit)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "B" nudity level
+GAME( 1998, fantsia2n,fantsia2, fantsia2, missw96, expro02_state, 0, ROT0, "Comad", "Fantasia II (1998)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
-GAME( 2002, wownfant, 0, fantsia2, missw96, driver_device, 0, ROT0, "Comad", "WOW New Fantasia", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "B" nudity level
-GAME( 2002, missw02, 0, fantsia2, missw96, driver_device, 0, ROT0, "Daigom", "Miss World 2002", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
+GAME( 2002, wownfant, 0, fantsia2, missw96, expro02_state, 0, ROT0, "Comad", "WOW New Fantasia", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "B" nudity level
+GAME( 2002, missw02, 0, fantsia2, missw96, expro02_state, 0, ROT0, "Daigom", "Miss World 2002", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // "A" nudity level
-GAME( 1996, pgalvip, 0, galhustl, galhustl, driver_device, 0, ROT0, "ACE International / Afega","Pocket Gals V.I.P (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // roms were all AFEGA stickered, select screen seems wrong? maybe not a final version.
-GAME( 1997, pgalvipa, pgalvip, galhustl, galhustl, driver_device, 0, ROT0, "<unknown>", "Pocket Gals V.I.P (set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1997, galhustl, pgalvip, galhustl, galhustl, driver_device, 0, ROT0, "ACE International", "Gals Hustler", MACHINE_SUPPORTS_SAVE ) // hack of the above?
+GAME( 1996, pgalvip, 0, galhustl, galhustl, expro02_state, 0, ROT0, "ACE International / Afega","Pocket Gals V.I.P (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // roms were all AFEGA stickered, select screen seems wrong? maybe not a final version.
+GAME( 1997, pgalvipa, pgalvip, galhustl, galhustl, expro02_state, 0, ROT0, "<unknown>", "Pocket Gals V.I.P (set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1997, galhustl, pgalvip, galhustl, galhustl, expro02_state, 0, ROT0, "ACE International", "Gals Hustler", MACHINE_SUPPORTS_SAVE ) // hack of the above?
-GAME( 1995, zipzap, 0, zipzap, zipzap, driver_device, 0, ROT90, "Barko Corp", "Zip & Zap", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1995, zipzap, 0, zipzap, zipzap, expro02_state, 0, ROT90, "Barko Corp", "Zip & Zap", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )