summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers
diff options
context:
space:
mode:
authorGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2012-09-13 11:15:32 +0000
committerGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2012-09-13 11:15:32 +0000
commit219e664785890f52079bae7e74543920d638796a (patch)
tree774d1ab1e7d87ae4d2c1ef335dcef24a28a7d7e8 /src/mame/drivers
parentaf9a5e817d3eefdda79e801056b29167ecbcdef9 (diff)
Massive change, MACHINE_START\RESET, VIDEO_START\RESET and PALETTE_INIT changed to be members of state classes (no whatsnew)
Diffstat (limited to 'src/mame/drivers')
-rw-r--r--src/mame/drivers/1942.c22
-rw-r--r--src/mame/drivers/1943.c14
-rw-r--r--src/mame/drivers/1945kiii.c11
-rw-r--r--src/mame/drivers/20pacgal.c22
-rw-r--r--src/mame/drivers/2mindril.c27
-rw-r--r--src/mame/drivers/30test.c13
-rw-r--r--src/mame/drivers/39in1.c8
-rw-r--r--src/mame/drivers/3do.c23
-rw-r--r--src/mame/drivers/40love.c113
-rw-r--r--src/mame/drivers/4enraya.c22
-rw-r--r--src/mame/drivers/4roses.c4
-rw-r--r--src/mame/drivers/5clown.c17
-rw-r--r--src/mame/drivers/8080bw.c82
-rw-r--r--src/mame/drivers/88games.c64
-rw-r--r--src/mame/drivers/ace.c37
-rw-r--r--src/mame/drivers/acefruit.c43
-rw-r--r--src/mame/drivers/aces1.c15
-rw-r--r--src/mame/drivers/acommand.c13
-rw-r--r--src/mame/drivers/actfancr.c36
-rw-r--r--src/mame/drivers/adp.c51
-rw-r--r--src/mame/drivers/aeroboto.c33
-rw-r--r--src/mame/drivers/aerofgt.c98
-rw-r--r--src/mame/drivers/airbustr.c77
-rw-r--r--src/mame/drivers/ajax.c3
-rw-r--r--src/mame/drivers/albazc.c12
-rw-r--r--src/mame/drivers/albazg.c33
-rw-r--r--src/mame/drivers/aleck64.c3
-rw-r--r--src/mame/drivers/alg.c30
-rw-r--r--src/mame/drivers/aliens.c31
-rw-r--r--src/mame/drivers/alpha68k.c150
-rw-r--r--src/mame/drivers/amaticmg.c40
-rw-r--r--src/mame/drivers/ambush.c1
-rw-r--r--src/mame/drivers/ampoker2.c4
-rw-r--r--src/mame/drivers/amspdwy.c27
-rw-r--r--src/mame/drivers/angelkds.c35
-rw-r--r--src/mame/drivers/appoooh.c30
-rw-r--r--src/mame/drivers/aquarium.c15
-rw-r--r--src/mame/drivers/arabian.c18
-rw-r--r--src/mame/drivers/arcadecl.c19
-rw-r--r--src/mame/drivers/arcadia.c6
-rw-r--r--src/mame/drivers/argus.c12
-rw-r--r--src/mame/drivers/aristmk4.c46
-rw-r--r--src/mame/drivers/aristmk5.c35
-rw-r--r--src/mame/drivers/aristmk6.c4
-rw-r--r--src/mame/drivers/arkanoid.c74
-rw-r--r--src/mame/drivers/armedf.c104
-rw-r--r--src/mame/drivers/artmagic.c31
-rw-r--r--src/mame/drivers/ashnojoe.c23
-rw-r--r--src/mame/drivers/asterix.c62
-rw-r--r--src/mame/drivers/asteroid.c1
-rw-r--r--src/mame/drivers/astinvad.c70
-rw-r--r--src/mame/drivers/astrafr.c72
-rw-r--r--src/mame/drivers/astrocde.c6
-rw-r--r--src/mame/drivers/astrocorp.c16
-rw-r--r--src/mame/drivers/astrof.c87
-rw-r--r--src/mame/drivers/asuka.c70
-rw-r--r--src/mame/drivers/atarifb.c112
-rw-r--r--src/mame/drivers/atarig1.c24
-rw-r--r--src/mame/drivers/atarig42.c30
-rw-r--r--src/mame/drivers/atarigt.c19
-rw-r--r--src/mame/drivers/atarigx2.c19
-rw-r--r--src/mame/drivers/atarisy1.c34
-rw-r--r--src/mame/drivers/atarisy2.c46
-rw-r--r--src/mame/drivers/atarisy4.c30
-rw-r--r--src/mame/drivers/ataxx.c4
-rw-r--r--src/mame/drivers/atetris.c26
-rw-r--r--src/mame/drivers/atlantis.c15
-rw-r--r--src/mame/drivers/atvtrack.c22
-rw-r--r--src/mame/drivers/avalnche.c12
-rw-r--r--src/mame/drivers/avt.c19
-rw-r--r--src/mame/drivers/aztarac.c6
-rw-r--r--src/mame/drivers/backfire.c48
-rw-r--r--src/mame/drivers/badlands.c49
-rw-r--r--src/mame/drivers/bagman.c18
-rw-r--r--src/mame/drivers/balsente.c3
-rw-r--r--src/mame/drivers/bankp.c10
-rw-r--r--src/mame/drivers/baraduke.c2
-rw-r--r--src/mame/drivers/batman.c26
-rw-r--r--src/mame/drivers/battlane.c21
-rw-r--r--src/mame/drivers/battlera.c1
-rw-r--r--src/mame/drivers/battlex.c25
-rw-r--r--src/mame/drivers/battlnts.c28
-rw-r--r--src/mame/drivers/bbusters.c4
-rw-r--r--src/mame/drivers/beaminv.c20
-rw-r--r--src/mame/drivers/beezer.c6
-rw-r--r--src/mame/drivers/berzerk.c44
-rw-r--r--src/mame/drivers/bestleag.c15
-rw-r--r--src/mame/drivers/bfcobra.c30
-rw-r--r--src/mame/drivers/bfm_sc1.c49
-rw-r--r--src/mame/drivers/bfm_sc2.c43
-rw-r--r--src/mame/drivers/bfm_sc4h.c47
-rw-r--r--src/mame/drivers/bfm_swp.c9
-rw-r--r--src/mame/drivers/bfmsys85.c37
-rw-r--r--src/mame/drivers/big10.c4
-rw-r--r--src/mame/drivers/bigevglf.c129
-rw-r--r--src/mame/drivers/bigstrkb.c1
-rw-r--r--src/mame/drivers/bingoc.c4
-rw-r--r--src/mame/drivers/bingor.c4
-rw-r--r--src/mame/drivers/bionicc.c33
-rw-r--r--src/mame/drivers/bishi.c25
-rw-r--r--src/mame/drivers/bking.c106
-rw-r--r--src/mame/drivers/blackt96.c39
-rw-r--r--src/mame/drivers/bladestl.c33
-rw-r--r--src/mame/drivers/blitz.c17
-rw-r--r--src/mame/drivers/blitz68k.c25
-rw-r--r--src/mame/drivers/blktiger.c55
-rw-r--r--src/mame/drivers/blmbycar.c34
-rw-r--r--src/mame/drivers/blockade.c24
-rw-r--r--src/mame/drivers/blockhl.c31
-rw-r--r--src/mame/drivers/blockout.c17
-rw-r--r--src/mame/drivers/bloodbro.c1
-rw-r--r--src/mame/drivers/blstroid.c19
-rw-r--r--src/mame/drivers/blueprnt.c18
-rw-r--r--src/mame/drivers/bmcbowl.c8
-rw-r--r--src/mame/drivers/bmcpokr.c4
-rw-r--r--src/mame/drivers/bnstars.c35
-rw-r--r--src/mame/drivers/bogeyman.c18
-rw-r--r--src/mame/drivers/bombjack.c17
-rw-r--r--src/mame/drivers/boogwing.c1
-rw-r--r--src/mame/drivers/bottom9.c49
-rw-r--r--src/mame/drivers/boxer.c34
-rw-r--r--src/mame/drivers/brkthru.c30
-rw-r--r--src/mame/drivers/bsktball.c90
-rw-r--r--src/mame/drivers/btime.c93
-rw-r--r--src/mame/drivers/bublbobl.c192
-rw-r--r--src/mame/drivers/buggychl.c48
-rw-r--r--src/mame/drivers/buster.c10
-rw-r--r--src/mame/drivers/bwing.c41
-rw-r--r--src/mame/drivers/byvid.c7
-rw-r--r--src/mame/drivers/bzone.c16
-rw-r--r--src/mame/drivers/cabal.c9
-rw-r--r--src/mame/drivers/cabaret.c20
-rw-r--r--src/mame/drivers/calchase.c25
-rw-r--r--src/mame/drivers/calomega.c2
-rw-r--r--src/mame/drivers/calorie.c25
-rw-r--r--src/mame/drivers/canyon.c12
-rw-r--r--src/mame/drivers/capbowl.c27
-rw-r--r--src/mame/drivers/cardline.c10
-rw-r--r--src/mame/drivers/carjmbre.c10
-rw-r--r--src/mame/drivers/carpolo.c4
-rw-r--r--src/mame/drivers/carrera.c8
-rw-r--r--src/mame/drivers/caswin.c15
-rw-r--r--src/mame/drivers/cave.c152
-rw-r--r--src/mame/drivers/cb2001.c31
-rw-r--r--src/mame/drivers/cball.c36
-rw-r--r--src/mame/drivers/cbasebal.c57
-rw-r--r--src/mame/drivers/cbuster.c25
-rw-r--r--src/mame/drivers/ccastles.c45
-rw-r--r--src/mame/drivers/cchance.c30
-rw-r--r--src/mame/drivers/cchasm.c1
-rw-r--r--src/mame/drivers/cclimber.c23
-rw-r--r--src/mame/drivers/cd32.c4
-rw-r--r--src/mame/drivers/cdi.c130
-rw-r--r--src/mame/drivers/centiped.c45
-rw-r--r--src/mame/drivers/cesclass.c6
-rw-r--r--src/mame/drivers/chaknpop.c38
-rw-r--r--src/mame/drivers/cham24.c41
-rw-r--r--src/mame/drivers/champbas.c61
-rw-r--r--src/mame/drivers/champbwl.c43
-rw-r--r--src/mame/drivers/chanbara.c45
-rw-r--r--src/mame/drivers/chance32.c23
-rw-r--r--src/mame/drivers/changela.c129
-rw-r--r--src/mame/drivers/cheekyms.c10
-rw-r--r--src/mame/drivers/chihiro.c25
-rw-r--r--src/mame/drivers/chinagat.c74
-rw-r--r--src/mame/drivers/chinsan.c44
-rw-r--r--src/mame/drivers/chqflag.c53
-rw-r--r--src/mame/drivers/cinemat.c31
-rw-r--r--src/mame/drivers/circus.c36
-rw-r--r--src/mame/drivers/circusc.c20
-rw-r--r--src/mame/drivers/cischeat.c8
-rw-r--r--src/mame/drivers/citycon.c15
-rw-r--r--src/mame/drivers/clayshoo.c20
-rw-r--r--src/mame/drivers/cliffhgr.c18
-rw-r--r--src/mame/drivers/cloak.c1
-rw-r--r--src/mame/drivers/cloud9.c41
-rw-r--r--src/mame/drivers/clshroad.c15
-rw-r--r--src/mame/drivers/cmmb.c8
-rw-r--r--src/mame/drivers/cninja.c32
-rw-r--r--src/mame/drivers/cntsteer.c125
-rw-r--r--src/mame/drivers/cobra.c36
-rw-r--r--src/mame/drivers/coinmstr.c7
-rw-r--r--src/mame/drivers/coinmvga.c8
-rw-r--r--src/mame/drivers/combatsc.c85
-rw-r--r--src/mame/drivers/commando.c23
-rw-r--r--src/mame/drivers/compgolf.c30
-rw-r--r--src/mame/drivers/contra.c16
-rw-r--r--src/mame/drivers/coolpool.c18
-rw-r--r--src/mame/drivers/coolridr.c17
-rw-r--r--src/mame/drivers/cop01.c38
-rw-r--r--src/mame/drivers/copsnrob.c23
-rw-r--r--src/mame/drivers/corona.c23
-rw-r--r--src/mame/drivers/cosmic.c52
-rw-r--r--src/mame/drivers/cps1.c37
-rw-r--r--src/mame/drivers/cps2.c15
-rw-r--r--src/mame/drivers/cps3.c42
-rw-r--r--src/mame/drivers/crbaloon.c12
-rw-r--r--src/mame/drivers/crgolf.c36
-rw-r--r--src/mame/drivers/crimfght.c26
-rw-r--r--src/mame/drivers/crospang.c15
-rw-r--r--src/mame/drivers/crshrace.c27
-rw-r--r--src/mame/drivers/crystal.c74
-rw-r--r--src/mame/drivers/cshooter.c25
-rw-r--r--src/mame/drivers/csplayh5.c11
-rw-r--r--src/mame/drivers/cubeqst.c35
-rw-r--r--src/mame/drivers/cultures.c63
-rw-r--r--src/mame/drivers/cvs.c76
-rw-r--r--src/mame/drivers/cyberbal.c57
-rw-r--r--src/mame/drivers/cybertnk.c17
-rw-r--r--src/mame/drivers/cyclemb.c20
-rw-r--r--src/mame/drivers/d9final.c15
-rw-r--r--src/mame/drivers/dacholer.c55
-rw-r--r--src/mame/drivers/dai3wksi.c32
-rw-r--r--src/mame/drivers/dambustr.c6
-rw-r--r--src/mame/drivers/darius.c117
-rw-r--r--src/mame/drivers/darkmist.c2
-rw-r--r--src/mame/drivers/darkseal.c1
-rw-r--r--src/mame/drivers/dassault.c1
-rw-r--r--src/mame/drivers/dblewing.c138
-rw-r--r--src/mame/drivers/dbz.c43
-rw-r--r--src/mame/drivers/dcheese.c22
-rw-r--r--src/mame/drivers/dcon.c2
-rw-r--r--src/mame/drivers/dday.c26
-rw-r--r--src/mame/drivers/ddayjlc.c63
-rw-r--r--src/mame/drivers/ddealer.c35
-rw-r--r--src/mame/drivers/ddenlovr.c438
-rw-r--r--src/mame/drivers/ddragon.c66
-rw-r--r--src/mame/drivers/ddragon3.c45
-rw-r--r--src/mame/drivers/ddribble.c46
-rw-r--r--src/mame/drivers/ddz.c6
-rw-r--r--src/mame/drivers/deadang.c1
-rw-r--r--src/mame/drivers/dec0.c16
-rw-r--r--src/mame/drivers/dec8.c116
-rw-r--r--src/mame/drivers/deco156.c14
-rw-r--r--src/mame/drivers/deco32.c27
-rw-r--r--src/mame/drivers/deco_ld.c4
-rw-r--r--src/mame/drivers/deco_mlc.c15
-rw-r--r--src/mame/drivers/decocass.c96
-rw-r--r--src/mame/drivers/deniam.c49
-rw-r--r--src/mame/drivers/deshoros.c9
-rw-r--r--src/mame/drivers/destroyr.c68
-rw-r--r--src/mame/drivers/dfruit.c4
-rw-r--r--src/mame/drivers/dgpix.c20
-rw-r--r--src/mame/drivers/dietgo.c10
-rw-r--r--src/mame/drivers/discoboy.c36
-rw-r--r--src/mame/drivers/diverboy.c11
-rw-r--r--src/mame/drivers/djboy.c81
-rw-r--r--src/mame/drivers/djmain.c41
-rw-r--r--src/mame/drivers/dkong.c143
-rw-r--r--src/mame/drivers/dlair.c30
-rw-r--r--src/mame/drivers/dmndrby.c25
-rw-r--r--src/mame/drivers/docastle.c40
-rw-r--r--src/mame/drivers/dogfgt.c40
-rw-r--r--src/mame/drivers/dominob.c6
-rw-r--r--src/mame/drivers/dooyong.c47
-rw-r--r--src/mame/drivers/dorachan.c16
-rw-r--r--src/mame/drivers/dotrikun.c14
-rw-r--r--src/mame/drivers/dragrace.c56
-rw-r--r--src/mame/drivers/dreamwld.c45
-rw-r--r--src/mame/drivers/drgnmst.c41
-rw-r--r--src/mame/drivers/dribling.c37
-rw-r--r--src/mame/drivers/drmicro.c24
-rw-r--r--src/mame/drivers/drtomy.c25
-rw-r--r--src/mame/drivers/drw80pkr.c24
-rw-r--r--src/mame/drivers/dunhuang.c109
-rw-r--r--src/mame/drivers/dwarfd.c98
-rw-r--r--src/mame/drivers/dynadice.c31
-rw-r--r--src/mame/drivers/dynax.c286
-rw-r--r--src/mame/drivers/dynduke.c1
-rw-r--r--src/mame/drivers/ecoinfr.c59
-rw-r--r--src/mame/drivers/egghunt.c35
-rw-r--r--src/mame/drivers/embargo.c22
-rw-r--r--src/mame/drivers/enigma2.c40
-rw-r--r--src/mame/drivers/eolith.c10
-rw-r--r--src/mame/drivers/eolith16.c15
-rw-r--r--src/mame/drivers/epos.c33
-rw-r--r--src/mame/drivers/eprom.c31
-rw-r--r--src/mame/drivers/equites.c108
-rw-r--r--src/mame/drivers/ertictac.c14
-rw-r--r--src/mame/drivers/esd16.c21
-rw-r--r--src/mame/drivers/esh.c16
-rw-r--r--src/mame/drivers/espial.c26
-rw-r--r--src/mame/drivers/esripsys.c1
-rw-r--r--src/mame/drivers/ettrivia.c21
-rw-r--r--src/mame/drivers/exedexes.c26
-rw-r--r--src/mame/drivers/exerion.c40
-rw-r--r--src/mame/drivers/exidy.c8
-rw-r--r--src/mame/drivers/exidy440.c18
-rw-r--r--src/mame/drivers/expro02.c15
-rw-r--r--src/mame/drivers/exprraid.c23
-rw-r--r--src/mame/drivers/exterm.c1
-rw-r--r--src/mame/drivers/f1gp.c57
-rw-r--r--src/mame/drivers/famibox.c53
-rw-r--r--src/mame/drivers/fantland.c92
-rw-r--r--src/mame/drivers/fastfred.c13
-rw-r--r--src/mame/drivers/fastlane.c14
-rw-r--r--src/mame/drivers/fcombat.c50
-rw-r--r--src/mame/drivers/fcrash.c55
-rw-r--r--src/mame/drivers/feversoc.c4
-rw-r--r--src/mame/drivers/fgoal.c56
-rw-r--r--src/mame/drivers/finalizr.c32
-rw-r--r--src/mame/drivers/firebeat.c52
-rw-r--r--src/mame/drivers/firefox.c28
-rw-r--r--src/mame/drivers/firetrap.c82
-rw-r--r--src/mame/drivers/firetrk.c15
-rw-r--r--src/mame/drivers/fitfight.c16
-rw-r--r--src/mame/drivers/flipjack.c31
-rw-r--r--src/mame/drivers/flkatck.c33
-rw-r--r--src/mame/drivers/flower.c2
-rw-r--r--src/mame/drivers/flstory.c154
-rw-r--r--src/mame/drivers/flyball.c67
-rw-r--r--src/mame/drivers/foodf.c22
-rw-r--r--src/mame/drivers/forte2.c14
-rw-r--r--src/mame/drivers/fortecar.c21
-rw-r--r--src/mame/drivers/freekick.c67
-rw-r--r--src/mame/drivers/fromanc2.c64
-rw-r--r--src/mame/drivers/fromance.c78
-rw-r--r--src/mame/drivers/funkball.c40
-rw-r--r--src/mame/drivers/funkybee.c14
-rw-r--r--src/mame/drivers/funkyjet.c12
-rw-r--r--src/mame/drivers/funworld.c6
-rw-r--r--src/mame/drivers/funybubl.c17
-rw-r--r--src/mame/drivers/fuukifg2.c27
-rw-r--r--src/mame/drivers/fuukifg3.c31
-rw-r--r--src/mame/drivers/gaelco.c17
-rw-r--r--src/mame/drivers/gaelco2.c12
-rw-r--r--src/mame/drivers/gaelco3d.c57
-rw-r--r--src/mame/drivers/gaiden.c88
-rw-r--r--src/mame/drivers/gal3.c10
-rw-r--r--src/mame/drivers/galaga.c64
-rw-r--r--src/mame/drivers/galastrm.c1
-rw-r--r--src/mame/drivers/galaxi.c53
-rw-r--r--src/mame/drivers/galaxia.c8
-rw-r--r--src/mame/drivers/galaxian.c10
-rw-r--r--src/mame/drivers/galaxold.c58
-rw-r--r--src/mame/drivers/galgame.c23
-rw-r--r--src/mame/drivers/galivan.c80
-rw-r--r--src/mame/drivers/galpani2.c7
-rw-r--r--src/mame/drivers/galpani3.c9
-rw-r--r--src/mame/drivers/galpanic.c4
-rw-r--r--src/mame/drivers/galspnbl.c7
-rw-r--r--src/mame/drivers/gamecstl.c29
-rw-r--r--src/mame/drivers/gameplan.c36
-rw-r--r--src/mame/drivers/gaplus.c10
-rw-r--r--src/mame/drivers/gatron.c2
-rw-r--r--src/mame/drivers/gauntlet.c28
-rw-r--r--src/mame/drivers/gberet.c34
-rw-r--r--src/mame/drivers/gbusters.c39
-rw-r--r--src/mame/drivers/gcpinbal.c57
-rw-r--r--src/mame/drivers/gei.c13
-rw-r--r--src/mame/drivers/ghosteo.c9
-rw-r--r--src/mame/drivers/gijoe.c27
-rw-r--r--src/mame/drivers/ginganin.c19
-rw-r--r--src/mame/drivers/gladiatr.c23
-rw-r--r--src/mame/drivers/glass.c25
-rw-r--r--src/mame/drivers/gng.c43
-rw-r--r--src/mame/drivers/go2000.c17
-rw-r--r--src/mame/drivers/goal92.c27
-rw-r--r--src/mame/drivers/goindol.c21
-rw-r--r--src/mame/drivers/goldngam.c8
-rw-r--r--src/mame/drivers/goldnpkr.c59
-rw-r--r--src/mame/drivers/goldstar.c108
-rw-r--r--src/mame/drivers/gomoku.c2
-rw-r--r--src/mame/drivers/good.c11
-rw-r--r--src/mame/drivers/gotcha.c23
-rw-r--r--src/mame/drivers/gottlieb.c59
-rw-r--r--src/mame/drivers/gotya.c20
-rw-r--r--src/mame/drivers/gpworld.c4
-rw-r--r--src/mame/drivers/gradius3.c39
-rw-r--r--src/mame/drivers/grchamp.c7
-rw-r--r--src/mame/drivers/gridlee.c30
-rw-r--r--src/mame/drivers/groundfx.c1
-rw-r--r--src/mame/drivers/gstream.c61
-rw-r--r--src/mame/drivers/gstriker.c6
-rw-r--r--src/mame/drivers/gsword.c21
-rw-r--r--src/mame/drivers/gticlub.c28
-rw-r--r--src/mame/drivers/guab.c20
-rw-r--r--src/mame/drivers/gumbo.c1
-rw-r--r--src/mame/drivers/gunbustr.c1
-rw-r--r--src/mame/drivers/gundealr.c27
-rw-r--r--src/mame/drivers/gunpey.c15
-rw-r--r--src/mame/drivers/gunsmoke.c30
-rw-r--r--src/mame/drivers/gyruss.c10
-rw-r--r--src/mame/drivers/halleys.c53
-rw-r--r--src/mame/drivers/hanaawas.c14
-rw-r--r--src/mame/drivers/harddriv.c6
-rw-r--r--src/mame/drivers/hcastle.c40
-rw-r--r--src/mame/drivers/hexion.c1
-rw-r--r--src/mame/drivers/higemaru.c2
-rw-r--r--src/mame/drivers/highvdeo.c7
-rw-r--r--src/mame/drivers/hikaru.c8
-rw-r--r--src/mame/drivers/himesiki.c25
-rw-r--r--src/mame/drivers/hitme.c22
-rw-r--r--src/mame/drivers/hitpoker.c11
-rw-r--r--src/mame/drivers/hnayayoi.c33
-rw-r--r--src/mame/drivers/hng64.c49
-rw-r--r--src/mame/drivers/holeland.c5
-rw-r--r--src/mame/drivers/homedata.c170
-rw-r--r--src/mame/drivers/homerun.c49
-rw-r--r--src/mame/drivers/hornet.c60
-rw-r--r--src/mame/drivers/hotblock.c7
-rw-r--r--src/mame/drivers/hotstuff.c4
-rw-r--r--src/mame/drivers/hvyunit.c33
-rw-r--r--src/mame/drivers/hyhoo.c1
-rw-r--r--src/mame/drivers/hyperspt.c4
-rw-r--r--src/mame/drivers/hyprduel.c47
-rw-r--r--src/mame/drivers/igs009.c62
-rw-r--r--src/mame/drivers/igs011.c9
-rw-r--r--src/mame/drivers/igs017.c90
-rw-r--r--src/mame/drivers/igs_m027.c15
-rw-r--r--src/mame/drivers/igspoker.c30
-rw-r--r--src/mame/drivers/ikki.c18
-rw-r--r--src/mame/drivers/imolagp.c57
-rw-r--r--src/mame/drivers/intrscti.c4
-rw-r--r--src/mame/drivers/inufuku.c57
-rw-r--r--src/mame/drivers/iqblock.c1
-rw-r--r--src/mame/drivers/irobot.c3
-rw-r--r--src/mame/drivers/ironhors.c28
-rw-r--r--src/mame/drivers/istellar.c14
-rw-r--r--src/mame/drivers/itech32.c27
-rw-r--r--src/mame/drivers/itech8.c27
-rw-r--r--src/mame/drivers/itgambl2.c23
-rw-r--r--src/mame/drivers/itgambl3.c23
-rw-r--r--src/mame/drivers/jack.c35
-rw-r--r--src/mame/drivers/jackal.c34
-rw-r--r--src/mame/drivers/jackie.c34
-rw-r--r--src/mame/drivers/jackpool.c4
-rw-r--r--src/mame/drivers/jailbrek.c18
-rw-r--r--src/mame/drivers/jalmah.c122
-rw-r--r--src/mame/drivers/jangou.c107
-rw-r--r--src/mame/drivers/jantotsu.c55
-rw-r--r--src/mame/drivers/jchan.c25
-rw-r--r--src/mame/drivers/jclub2.c28
-rw-r--r--src/mame/drivers/jedi.c20
-rw-r--r--src/mame/drivers/jokrwild.c11
-rw-r--r--src/mame/drivers/jollyjgr.c51
-rw-r--r--src/mame/drivers/jongkyo.c32
-rw-r--r--src/mame/drivers/jpmimpct.c78
-rw-r--r--src/mame/drivers/jpmsys5.c52
-rw-r--r--src/mame/drivers/jrpacman.c4
-rw-r--r--src/mame/drivers/jubilee.c11
-rw-r--r--src/mame/drivers/junofrst.c60
-rw-r--r--src/mame/drivers/kaneko16.c36
-rw-r--r--src/mame/drivers/kangaroo.c26
-rw-r--r--src/mame/drivers/karnov.c58
-rw-r--r--src/mame/drivers/kas89.c16
-rw-r--r--src/mame/drivers/kchamp.c37
-rw-r--r--src/mame/drivers/kickgoal.c48
-rw-r--r--src/mame/drivers/kingdrby.c33
-rw-r--r--src/mame/drivers/kingobox.c32
-rw-r--r--src/mame/drivers/kinst.c24
-rw-r--r--src/mame/drivers/klax.c19
-rw-r--r--src/mame/drivers/kncljoe.c32
-rw-r--r--src/mame/drivers/koftball.c11
-rw-r--r--src/mame/drivers/koikoi.c45
-rw-r--r--src/mame/drivers/konamigq.c19
-rw-r--r--src/mame/drivers/konamigv.c29
-rw-r--r--src/mame/drivers/konamigx.c52
-rw-r--r--src/mame/drivers/konamim2.c4
-rw-r--r--src/mame/drivers/kontest.c8
-rw-r--r--src/mame/drivers/kopunch.c16
-rw-r--r--src/mame/drivers/ksayakyu.c26
-rw-r--r--src/mame/drivers/ksys573.c14
-rw-r--r--src/mame/drivers/kungfur.c22
-rw-r--r--src/mame/drivers/kyugo.c45
-rw-r--r--src/mame/drivers/labyrunr.c12
-rw-r--r--src/mame/drivers/ladybug.c75
-rw-r--r--src/mame/drivers/ladyfrog.c37
-rw-r--r--src/mame/drivers/laserbas.c27
-rw-r--r--src/mame/drivers/laserbat.c125
-rw-r--r--src/mame/drivers/lasso.c42
-rw-r--r--src/mame/drivers/lastbank.c6
-rw-r--r--src/mame/drivers/lastduel.c32
-rw-r--r--src/mame/drivers/lastfght.c91
-rw-r--r--src/mame/drivers/lazercmd.c49
-rw-r--r--src/mame/drivers/legionna.c14
-rw-r--r--src/mame/drivers/leland.c4
-rw-r--r--src/mame/drivers/lemmings.c7
-rw-r--r--src/mame/drivers/lethal.c47
-rw-r--r--src/mame/drivers/lethalj.c1
-rw-r--r--src/mame/drivers/lgp.c9
-rw-r--r--src/mame/drivers/liberate.c52
-rw-r--r--src/mame/drivers/limenko.c20
-rw-r--r--src/mame/drivers/littlerb.c17
-rw-r--r--src/mame/drivers/lkage.c108
-rw-r--r--src/mame/drivers/lockon.c100
-rw-r--r--src/mame/drivers/looping.c24
-rw-r--r--src/mame/drivers/lordgun.c2
-rw-r--r--src/mame/drivers/lsasquad.c96
-rw-r--r--src/mame/drivers/ltcasino.c7
-rw-r--r--src/mame/drivers/luckgrln.c33
-rw-r--r--src/mame/drivers/lucky74.c2
-rw-r--r--src/mame/drivers/lvcards.c28
-rw-r--r--src/mame/drivers/lwings.c55
-rw-r--r--src/mame/drivers/m10.c46
-rw-r--r--src/mame/drivers/m107.c4
-rw-r--r--src/mame/drivers/m14.c29
-rw-r--r--src/mame/drivers/m52.c16
-rw-r--r--src/mame/drivers/m57.c2
-rw-r--r--src/mame/drivers/m58.c2
-rw-r--r--src/mame/drivers/m62.c66
-rw-r--r--src/mame/drivers/m63.c77
-rw-r--r--src/mame/drivers/m72.c123
-rw-r--r--src/mame/drivers/m90.c11
-rw-r--r--src/mame/drivers/m92.c22
-rw-r--r--src/mame/drivers/macrossp.c29
-rw-r--r--src/mame/drivers/macs.c30
-rw-r--r--src/mame/drivers/madmotor.c17
-rw-r--r--src/mame/drivers/magic10.c15
-rw-r--r--src/mame/drivers/magicard.c15
-rw-r--r--src/mame/drivers/magicfly.c53
-rw-r--r--src/mame/drivers/magictg.c4
-rw-r--r--src/mame/drivers/magmax.c22
-rw-r--r--src/mame/drivers/magtouch.c14
-rw-r--r--src/mame/drivers/mainevt.c34
-rw-r--r--src/mame/drivers/mainsnk.c2
-rw-r--r--src/mame/drivers/majorpkr.c13
-rw-r--r--src/mame/drivers/malzak.c35
-rw-r--r--src/mame/drivers/mappy.c54
-rw-r--r--src/mame/drivers/marineb.c37
-rw-r--r--src/mame/drivers/marinedt.c115
-rw-r--r--src/mame/drivers/mario.c2
-rw-r--r--src/mame/drivers/markham.c2
-rw-r--r--src/mame/drivers/mastboy.c28
-rw-r--r--src/mame/drivers/matmania.c85
-rw-r--r--src/mame/drivers/maxaflex.c16
-rw-r--r--src/mame/drivers/maygay1b.c19
-rw-r--r--src/mame/drivers/maygayv1.c30
-rw-r--r--src/mame/drivers/mayumi.c31
-rw-r--r--src/mame/drivers/mazerbla.c156
-rw-r--r--src/mame/drivers/mcatadv.c19
-rw-r--r--src/mame/drivers/mcr.c8
-rw-r--r--src/mame/drivers/mcr3.c10
-rw-r--r--src/mame/drivers/mcr68.c12
-rw-r--r--src/mame/drivers/meadows.c12
-rw-r--r--src/mame/drivers/mediagx.c48
-rw-r--r--src/mame/drivers/megaplay.c23
-rw-r--r--src/mame/drivers/megasys1.c40
-rw-r--r--src/mame/drivers/megatech.c21
-rw-r--r--src/mame/drivers/megazone.c24
-rw-r--r--src/mame/drivers/meijinsn.c36
-rw-r--r--src/mame/drivers/merit.c36
-rw-r--r--src/mame/drivers/meritm.c95
-rw-r--r--src/mame/drivers/mermaid.c76
-rw-r--r--src/mame/drivers/metalmx.c13
-rw-r--r--src/mame/drivers/metlclsh.c23
-rw-r--r--src/mame/drivers/metro.c180
-rw-r--r--src/mame/drivers/mexico86.c88
-rw-r--r--src/mame/drivers/meyc8088.c12
-rw-r--r--src/mame/drivers/mgolf.c41
-rw-r--r--src/mame/drivers/mhavoc.c2
-rw-r--r--src/mame/drivers/micro3d.c3
-rw-r--r--src/mame/drivers/midas.c14
-rw-r--r--src/mame/drivers/midqslvr.c49
-rw-r--r--src/mame/drivers/midtunit.c4
-rw-r--r--src/mame/drivers/midvunit.c54
-rw-r--r--src/mame/drivers/midwunit.c4
-rw-r--r--src/mame/drivers/midxunit.c4
-rw-r--r--src/mame/drivers/midyunit.c18
-rw-r--r--src/mame/drivers/midzeus.c47
-rw-r--r--src/mame/drivers/mikie.c22
-rw-r--r--src/mame/drivers/mil4000.c21
-rw-r--r--src/mame/drivers/miniboy7.c17
-rw-r--r--src/mame/drivers/mirage.c20
-rw-r--r--src/mame/drivers/mirax.c10
-rw-r--r--src/mame/drivers/missb2.c34
-rw-r--r--src/mame/drivers/missile.c42
-rw-r--r--src/mame/drivers/mitchell.c60
-rw-r--r--src/mame/drivers/mjkjidai.c1
-rw-r--r--src/mame/drivers/mjsister.c93
-rw-r--r--src/mame/drivers/mlanding.c23
-rw-r--r--src/mame/drivers/model1.c46
-rw-r--r--src/mame/drivers/model2.c133
-rw-r--r--src/mame/drivers/model3.c58
-rw-r--r--src/mame/drivers/mogura.c28
-rw-r--r--src/mame/drivers/mole.c31
-rw-r--r--src/mame/drivers/momoko.c58
-rw-r--r--src/mame/drivers/monzagp.c13
-rw-r--r--src/mame/drivers/moo.c62
-rw-r--r--src/mame/drivers/mosaic.c13
-rw-r--r--src/mame/drivers/mouser.c21
-rw-r--r--src/mame/drivers/mpoker.c10
-rw-r--r--src/mame/drivers/mpu3.c41
-rw-r--r--src/mame/drivers/mpu4dealem.c47
-rw-r--r--src/mame/drivers/mpu4hw.c108
-rw-r--r--src/mame/drivers/mpu4vid.c76
-rw-r--r--src/mame/drivers/mpu5hw.c9
-rw-r--r--src/mame/drivers/mquake.c10
-rw-r--r--src/mame/drivers/mrdo.c2
-rw-r--r--src/mame/drivers/mrflea.c32
-rw-r--r--src/mame/drivers/mrjong.c2
-rw-r--r--src/mame/drivers/ms32.c14
-rw-r--r--src/mame/drivers/msisaac.c52
-rw-r--r--src/mame/drivers/mugsmash.c9
-rw-r--r--src/mame/drivers/multfish.c60
-rw-r--r--src/mame/drivers/multigam.c113
-rw-r--r--src/mame/drivers/munchmo.c26
-rw-r--r--src/mame/drivers/murogem.c4
-rw-r--r--src/mame/drivers/murogmbl.c12
-rw-r--r--src/mame/drivers/mustache.c8
-rw-r--r--src/mame/drivers/mw8080bw.c99
-rw-r--r--src/mame/drivers/mwarr.c41
-rw-r--r--src/mame/drivers/mystwarr.c69
-rw-r--r--src/mame/drivers/n8080.c97
-rw-r--r--src/mame/drivers/namcofl.c24
-rw-r--r--src/mame/drivers/namcona1.c15
-rw-r--r--src/mame/drivers/namconb1.c17
-rw-r--r--src/mame/drivers/namcond1.c2
-rw-r--r--src/mame/drivers/namcos1.c2
-rw-r--r--src/mame/drivers/namcos10.c7
-rw-r--r--src/mame/drivers/namcos11.c8
-rw-r--r--src/mame/drivers/namcos12.c84
-rw-r--r--src/mame/drivers/namcos2.c32
-rw-r--r--src/mame/drivers/namcos21.c22
-rw-r--r--src/mame/drivers/namcos22.c10
-rw-r--r--src/mame/drivers/namcos23.c49
-rw-r--r--src/mame/drivers/namcos86.c9
-rw-r--r--src/mame/drivers/naomi.c11
-rw-r--r--src/mame/drivers/naughtyb.c4
-rw-r--r--src/mame/drivers/nbmj8688.c20
-rw-r--r--src/mame/drivers/nbmj8891.c15
-rw-r--r--src/mame/drivers/nbmj8900.c1
-rw-r--r--src/mame/drivers/nbmj8991.c18
-rw-r--r--src/mame/drivers/nbmj9195.c15
-rw-r--r--src/mame/drivers/nemesis.c92
-rw-r--r--src/mame/drivers/neogeo.c90
-rw-r--r--src/mame/drivers/neoprint.c13
-rw-r--r--src/mame/drivers/news.c13
-rw-r--r--src/mame/drivers/nexus3d.c10
-rw-r--r--src/mame/drivers/nightgal.c59
-rw-r--r--src/mame/drivers/ninjakd2.c30
-rw-r--r--src/mame/drivers/ninjaw.c66
-rw-r--r--src/mame/drivers/nitedrvr.c3
-rw-r--r--src/mame/drivers/niyanpai.c11
-rw-r--r--src/mame/drivers/nmg5.c37
-rw-r--r--src/mame/drivers/nmk16.c86
-rw-r--r--src/mame/drivers/norautp.c25
-rw-r--r--src/mame/drivers/nova2001.c19
-rw-r--r--src/mame/drivers/nsmpoker.c11
-rw-r--r--src/mame/drivers/nss.c28
-rw-r--r--src/mame/drivers/nwk-tr.c17
-rw-r--r--src/mame/drivers/nycaptor.c130
-rw-r--r--src/mame/drivers/nyny.c40
-rw-r--r--src/mame/drivers/offtwall.c19
-rw-r--r--src/mame/drivers/ohmygod.c29
-rw-r--r--src/mame/drivers/ojankohs.c100
-rw-r--r--src/mame/drivers/olibochu.c31
-rw-r--r--src/mame/drivers/omegrace.c6
-rw-r--r--src/mame/drivers/oneshot.c47
-rw-r--r--src/mame/drivers/onetwo.c20
-rw-r--r--src/mame/drivers/opwolf.c58
-rw-r--r--src/mame/drivers/orbit.c21
-rw-r--r--src/mame/drivers/othello.c72
-rw-r--r--src/mame/drivers/othldrby.c25
-rw-r--r--src/mame/drivers/othunder.c57
-rw-r--r--src/mame/drivers/overdriv.c52
-rw-r--r--src/mame/drivers/pachifev.c32
-rw-r--r--src/mame/drivers/pacland.c2
-rw-r--r--src/mame/drivers/pacman.c39
-rw-r--r--src/mame/drivers/pandoras.c44
-rw-r--r--src/mame/drivers/pangofun.c10
-rw-r--r--src/mame/drivers/panicr.c29
-rw-r--r--src/mame/drivers/paradise.c27
-rw-r--r--src/mame/drivers/parodius.c48
-rw-r--r--src/mame/drivers/pasha2.c27
-rw-r--r--src/mame/drivers/pass.c1
-rw-r--r--src/mame/drivers/pastelg.c4
-rw-r--r--src/mame/drivers/pbaction.c17
-rw-r--r--src/mame/drivers/pcat_dyn.c10
-rw-r--r--src/mame/drivers/pcat_nit.c14
-rw-r--r--src/mame/drivers/pcktgal.c1
-rw-r--r--src/mame/drivers/pcxt.c19
-rw-r--r--src/mame/drivers/pengadvb.c24
-rw-r--r--src/mame/drivers/pengo.c6
-rw-r--r--src/mame/drivers/peplus.c52
-rw-r--r--src/mame/drivers/peyper.c7
-rw-r--r--src/mame/drivers/pgm.c21
-rw-r--r--src/mame/drivers/pgm2.c12
-rw-r--r--src/mame/drivers/phoenix.c18
-rw-r--r--src/mame/drivers/photon.c12
-rw-r--r--src/mame/drivers/photon2.c21
-rw-r--r--src/mame/drivers/photoply.c21
-rw-r--r--src/mame/drivers/pingpong.c2
-rw-r--r--src/mame/drivers/pinkiri8.c4
-rw-r--r--src/mame/drivers/pipedrm.c60
-rw-r--r--src/mame/drivers/pipeline.c23
-rw-r--r--src/mame/drivers/pirates.c1
-rw-r--r--src/mame/drivers/pitnrun.c3
-rw-r--r--src/mame/drivers/pkscram.c37
-rw-r--r--src/mame/drivers/pktgaldx.c11
-rw-r--r--src/mame/drivers/playch10.c8
-rw-r--r--src/mame/drivers/playmark.c102
-rw-r--r--src/mame/drivers/pluto5.c9
-rw-r--r--src/mame/drivers/plygonet.c10
-rw-r--r--src/mame/drivers/pokechmp.c1
-rw-r--r--src/mame/drivers/poker72.c18
-rw-r--r--src/mame/drivers/polepos.c23
-rw-r--r--src/mame/drivers/policetr.c1
-rw-r--r--src/mame/drivers/polyplay.c28
-rw-r--r--src/mame/drivers/poo.c12
-rw-r--r--src/mame/drivers/poolshrk.c12
-rw-r--r--src/mame/drivers/pooyan.c16
-rw-r--r--src/mame/drivers/popeye.c8
-rw-r--r--src/mame/drivers/popobear.c4
-rw-r--r--src/mame/drivers/popper.c24
-rw-r--r--src/mame/drivers/portrait.c2
-rw-r--r--src/mame/drivers/potgoldu.c8
-rw-r--r--src/mame/drivers/powerbal.c31
-rw-r--r--src/mame/drivers/powerins.c7
-rw-r--r--src/mame/drivers/ppmast93.c11
-rw-r--r--src/mame/drivers/prehisle.c1
-rw-r--r--src/mame/drivers/proconn.c7
-rw-r--r--src/mame/drivers/progolf.c23
-rw-r--r--src/mame/drivers/psattack.c12
-rw-r--r--src/mame/drivers/psikyo.c40
-rw-r--r--src/mame/drivers/psikyo4.c19
-rw-r--r--src/mame/drivers/psikyosh.c9
-rw-r--r--src/mame/drivers/psychic5.c17
-rw-r--r--src/mame/drivers/pturn.c22
-rw-r--r--src/mame/drivers/punchout.c11
-rw-r--r--src/mame/drivers/pushman.c45
-rw-r--r--src/mame/drivers/pzletime.c33
-rw-r--r--src/mame/drivers/qdrmfgp.c34
-rw-r--r--src/mame/drivers/qix.c3
-rw-r--r--src/mame/drivers/quakeat.c15
-rw-r--r--src/mame/drivers/quasar.c30
-rw-r--r--src/mame/drivers/queen.c49
-rw-r--r--src/mame/drivers/quizdna.c1
-rw-r--r--src/mame/drivers/quizo.c8
-rw-r--r--src/mame/drivers/quizpani.c1
-rw-r--r--src/mame/drivers/quizpun2.c20
-rw-r--r--src/mame/drivers/quizshow.c28
-rw-r--r--src/mame/drivers/r2dtank.c11
-rw-r--r--src/mame/drivers/r2dx_v33.c26
-rw-r--r--src/mame/drivers/rabbit.c43
-rw-r--r--src/mame/drivers/raiden.c5
-rw-r--r--src/mame/drivers/raiden2.c79
-rw-r--r--src/mame/drivers/rainbow.c15
-rw-r--r--src/mame/drivers/rallyx.c40
-rw-r--r--src/mame/drivers/rampart.c21
-rw-r--r--src/mame/drivers/rastan.c38
-rw-r--r--src/mame/drivers/rbmk.c4
-rw-r--r--src/mame/drivers/realbrk.c1
-rw-r--r--src/mame/drivers/redclash.c54
-rw-r--r--src/mame/drivers/relief.c27
-rw-r--r--src/mame/drivers/renegade.c25
-rw-r--r--src/mame/drivers/retofinv.c2
-rw-r--r--src/mame/drivers/rgum.c4
-rw-r--r--src/mame/drivers/rltennis.c27
-rw-r--r--src/mame/drivers/rmhaihai.c15
-rw-r--r--src/mame/drivers/rockrage.c29
-rw-r--r--src/mame/drivers/rocnrope.c2
-rw-r--r--src/mame/drivers/rohga.c8
-rw-r--r--src/mame/drivers/rollerg.c33
-rw-r--r--src/mame/drivers/rollrace.c1
-rw-r--r--src/mame/drivers/roul.c15
-rw-r--r--src/mame/drivers/royalmah.c21
-rw-r--r--src/mame/drivers/rpunch.c6
-rw-r--r--src/mame/drivers/runaway.c15
-rw-r--r--src/mame/drivers/rungun.c49
-rw-r--r--src/mame/drivers/safarir.c46
-rw-r--r--src/mame/drivers/sandscrp.c5
-rw-r--r--src/mame/drivers/sangho.c41
-rw-r--r--src/mame/drivers/saturn.c266
-rw-r--r--src/mame/drivers/sauro.c4
-rw-r--r--src/mame/drivers/savquest.c25
-rw-r--r--src/mame/drivers/sbasketb.c2
-rw-r--r--src/mame/drivers/sbowling.c19
-rw-r--r--src/mame/drivers/sbrkout.c33
-rw-r--r--src/mame/drivers/sbugger.c2
-rw-r--r--src/mame/drivers/scobra.c30
-rw-r--r--src/mame/drivers/scotrsht.c2
-rw-r--r--src/mame/drivers/scramble.c50
-rw-r--r--src/mame/drivers/scregg.c52
-rw-r--r--src/mame/drivers/sderby.c4
-rw-r--r--src/mame/drivers/seattle.c104
-rw-r--r--src/mame/drivers/segac2.c46
-rw-r--r--src/mame/drivers/segag80r.c4
-rw-r--r--src/mame/drivers/segag80v.c15
-rw-r--r--src/mame/drivers/segajw.c4
-rw-r--r--src/mame/drivers/segald.c4
-rw-r--r--src/mame/drivers/segas24.c44
-rw-r--r--src/mame/drivers/segas32.c19
-rw-r--r--src/mame/drivers/seibuspi.c90
-rw-r--r--src/mame/drivers/seicross.c7
-rw-r--r--src/mame/drivers/senjyo.c7
-rw-r--r--src/mame/drivers/seta.c138
-rw-r--r--src/mame/drivers/seta2.c25
-rw-r--r--src/mame/drivers/sf.c25
-rw-r--r--src/mame/drivers/sfbonus.c45
-rw-r--r--src/mame/drivers/sfcbox.c22
-rw-r--r--src/mame/drivers/sfkick.c25
-rw-r--r--src/mame/drivers/shadfrce.c1
-rw-r--r--src/mame/drivers/shangha3.c3
-rw-r--r--src/mame/drivers/shanghai.c15
-rw-r--r--src/mame/drivers/shangkid.c20
-rw-r--r--src/mame/drivers/shaolins.c2
-rw-r--r--src/mame/drivers/shisen.c1
-rw-r--r--src/mame/drivers/shootout.c4
-rw-r--r--src/mame/drivers/shougi.c10
-rw-r--r--src/mame/drivers/shtzone.c12
-rw-r--r--src/mame/drivers/shuuz.c19
-rw-r--r--src/mame/drivers/sidearms.c3
-rw-r--r--src/mame/drivers/sidepckt.c2
-rw-r--r--src/mame/drivers/sigmab52.c22
-rw-r--r--src/mame/drivers/sigmab98.c7
-rw-r--r--src/mame/drivers/silkroad.c1
-rw-r--r--src/mame/drivers/silvmil.c30
-rw-r--r--src/mame/drivers/simpl156.c1
-rw-r--r--src/mame/drivers/simpsons.c2
-rw-r--r--src/mame/drivers/skeetsht.c13
-rw-r--r--src/mame/drivers/skimaxx.c25
-rw-r--r--src/mame/drivers/skullxbo.c19
-rw-r--r--src/mame/drivers/skyarmy.c17
-rw-r--r--src/mame/drivers/skydiver.c7
-rw-r--r--src/mame/drivers/skyfox.c19
-rw-r--r--src/mame/drivers/skykid.c10
-rw-r--r--src/mame/drivers/skylncr.c29
-rw-r--r--src/mame/drivers/skyraid.c44
-rw-r--r--src/mame/drivers/slapfght.c16
-rw-r--r--src/mame/drivers/slapshot.c27
-rw-r--r--src/mame/drivers/sliver.c9
-rw-r--r--src/mame/drivers/slotcarn.c9
-rw-r--r--src/mame/drivers/sms.c45
-rw-r--r--src/mame/drivers/snk.c26
-rw-r--r--src/mame/drivers/snk6502.c40
-rw-r--r--src/mame/drivers/snk68.c3
-rw-r--r--src/mame/drivers/snookr10.c6
-rw-r--r--src/mame/drivers/snowbros.c18
-rw-r--r--src/mame/drivers/solomon.c1
-rw-r--r--src/mame/drivers/sonson.c16
-rw-r--r--src/mame/drivers/sothello.c4
-rw-r--r--src/mame/drivers/spacefb.c20
-rw-r--r--src/mame/drivers/spaceg.c40
-rw-r--r--src/mame/drivers/spbactn.c1
-rw-r--r--src/mame/drivers/spcforce.c5
-rw-r--r--src/mame/drivers/spdodgeb.c26
-rw-r--r--src/mame/drivers/speedatk.c2
-rw-r--r--src/mame/drivers/speedbal.c1
-rw-r--r--src/mame/drivers/speedspn.c1
-rw-r--r--src/mame/drivers/speglsht.c18
-rw-r--r--src/mame/drivers/spiders.c14
-rw-r--r--src/mame/drivers/splash.c23
-rw-r--r--src/mame/drivers/spoker.c22
-rw-r--r--src/mame/drivers/spool99.c7
-rw-r--r--src/mame/drivers/sprcros2.c10
-rw-r--r--src/mame/drivers/sprint2.c2
-rw-r--r--src/mame/drivers/sprint4.c22
-rw-r--r--src/mame/drivers/sprint8.c10
-rw-r--r--src/mame/drivers/spy.c47
-rw-r--r--src/mame/drivers/srmp2.c27
-rw-r--r--src/mame/drivers/srmp5.c2
-rw-r--r--src/mame/drivers/srmp6.c17
-rw-r--r--src/mame/drivers/srumbler.c9
-rw-r--r--src/mame/drivers/ssfindo.c6
-rw-r--r--src/mame/drivers/sshangha.c4
-rw-r--r--src/mame/drivers/sshot.c15
-rw-r--r--src/mame/drivers/ssingles.c7
-rw-r--r--src/mame/drivers/sslam.c4
-rw-r--r--src/mame/drivers/ssozumo.c2
-rw-r--r--src/mame/drivers/sspeedr.c6
-rw-r--r--src/mame/drivers/ssrj.c10
-rw-r--r--src/mame/drivers/ssv.c15
-rw-r--r--src/mame/drivers/st0016.c2
-rw-r--r--src/mame/drivers/stactics.c10
-rw-r--r--src/mame/drivers/stadhero.c1
-rw-r--r--src/mame/drivers/starcrus.c2
-rw-r--r--src/mame/drivers/starfire.c1
-rw-r--r--src/mame/drivers/starshp1.c2
-rw-r--r--src/mame/drivers/starwars.c16
-rw-r--r--src/mame/drivers/statriv2.c23
-rw-r--r--src/mame/drivers/stfight.c3
-rw-r--r--src/mame/drivers/stlforce.c1
-rw-r--r--src/mame/drivers/strnskil.c2
-rw-r--r--src/mame/drivers/su2000.c37
-rw-r--r--src/mame/drivers/sub.c20
-rw-r--r--src/mame/drivers/subs.c12
-rw-r--r--src/mame/drivers/subsino.c84
-rw-r--r--src/mame/drivers/subsino2.c93
-rw-r--r--src/mame/drivers/summit.c8
-rw-r--r--src/mame/drivers/suna16.c13
-rw-r--r--src/mame/drivers/suna8.c28
-rw-r--r--src/mame/drivers/supbtime.c11
-rw-r--r--src/mame/drivers/supdrapo.c23
-rw-r--r--src/mame/drivers/superchs.c1
-rw-r--r--src/mame/drivers/superdq.c32
-rw-r--r--src/mame/drivers/superqix.c28
-rw-r--r--src/mame/drivers/supertnk.c30
-rw-r--r--src/mame/drivers/superwng.c39
-rw-r--r--src/mame/drivers/suprgolf.c24
-rw-r--r--src/mame/drivers/suprloco.c2
-rw-r--r--src/mame/drivers/suprnova.c57
-rw-r--r--src/mame/drivers/suprridr.c2
-rw-r--r--src/mame/drivers/suprslam.c25
-rw-r--r--src/mame/drivers/surpratk.c44
-rw-r--r--src/mame/drivers/system1.c42
-rw-r--r--src/mame/drivers/system16.c14
-rw-r--r--src/mame/drivers/tagteam.c2
-rw-r--r--src/mame/drivers/tail2nos.c37
-rw-r--r--src/mame/drivers/taito_b.c106
-rw-r--r--src/mame/drivers/taito_f2.c93
-rw-r--r--src/mame/drivers/taito_f3.c13
-rw-r--r--src/mame/drivers/taito_h.c28
-rw-r--r--src/mame/drivers/taito_l.c187
-rw-r--r--src/mame/drivers/taito_o.c8
-rw-r--r--src/mame/drivers/taito_x.c26
-rw-r--r--src/mame/drivers/taito_z.c108
-rw-r--r--src/mame/drivers/taitoair.c39
-rw-r--r--src/mame/drivers/taitogn.c20
-rw-r--r--src/mame/drivers/taitojc.c35
-rw-r--r--src/mame/drivers/taitopjc.c4
-rw-r--r--src/mame/drivers/taitosj.c3
-rw-r--r--src/mame/drivers/taitotz.c39
-rw-r--r--src/mame/drivers/taitowlf.c37
-rw-r--r--src/mame/drivers/tank8.c8
-rw-r--r--src/mame/drivers/tankbatt.c2
-rw-r--r--src/mame/drivers/tankbust.c14
-rw-r--r--src/mame/drivers/taotaido.c1
-rw-r--r--src/mame/drivers/tapatune.c4
-rw-r--r--src/mame/drivers/targeth.c1
-rw-r--r--src/mame/drivers/tasman.c7
-rw-r--r--src/mame/drivers/tatsumi.c16
-rw-r--r--src/mame/drivers/tattack.c15
-rw-r--r--src/mame/drivers/tbowl.c11
-rw-r--r--src/mame/drivers/tceptor.c22
-rw-r--r--src/mame/drivers/tcl.c4
-rw-r--r--src/mame/drivers/tecmo.c17
-rw-r--r--src/mame/drivers/tecmo16.c5
-rw-r--r--src/mame/drivers/tecmosys.c7
-rw-r--r--src/mame/drivers/tehkanwc.c1
-rw-r--r--src/mame/drivers/tempest.c7
-rw-r--r--src/mame/drivers/terracre.c15
-rw-r--r--src/mame/drivers/tetrisp2.c12
-rw-r--r--src/mame/drivers/thayers.c40
-rw-r--r--src/mame/drivers/thedeep.c24
-rw-r--r--src/mame/drivers/thepit.c4
-rw-r--r--src/mame/drivers/thief.c3
-rw-r--r--src/mame/drivers/thoop2.c1
-rw-r--r--src/mame/drivers/thunderj.c22
-rw-r--r--src/mame/drivers/thunderx.c71
-rw-r--r--src/mame/drivers/tiamc1.c10
-rw-r--r--src/mame/drivers/tickee.c34
-rw-r--r--src/mame/drivers/tigeroad.c1
-rw-r--r--src/mame/drivers/timelimt.c12
-rw-r--r--src/mame/drivers/timeplt.c16
-rw-r--r--src/mame/drivers/timetrv.c4
-rw-r--r--src/mame/drivers/tmaster.c58
-rw-r--r--src/mame/drivers/tmmjprd.c13
-rw-r--r--src/mame/drivers/tmnt.c143
-rw-r--r--src/mame/drivers/tmspoker.c27
-rw-r--r--src/mame/drivers/tnzs.c32
-rw-r--r--src/mame/drivers/toaplan1.c32
-rw-r--r--src/mame/drivers/toaplan2.c125
-rw-r--r--src/mame/drivers/toki.c2
-rw-r--r--src/mame/drivers/tomcat.c25
-rw-r--r--src/mame/drivers/tonton.c8
-rw-r--r--src/mame/drivers/toobin.c17
-rw-r--r--src/mame/drivers/topspeed.c52
-rw-r--r--src/mame/drivers/toratora.c30
-rw-r--r--src/mame/drivers/toypop.c16
-rw-r--r--src/mame/drivers/tp84.c8
-rw-r--r--src/mame/drivers/trackfld.c44
-rw-r--r--src/mame/drivers/travrusa.c12
-rw-r--r--src/mame/drivers/triforce.c12
-rw-r--r--src/mame/drivers/triplhnt.c20
-rw-r--r--src/mame/drivers/truco.c33
-rw-r--r--src/mame/drivers/trucocl.c2
-rw-r--r--src/mame/drivers/trvmadns.c16
-rw-r--r--src/mame/drivers/trvquest.c28
-rw-r--r--src/mame/drivers/tryout.c2
-rw-r--r--src/mame/drivers/tsamurai.c7
-rw-r--r--src/mame/drivers/ttchamp.c9
-rw-r--r--src/mame/drivers/tubep.c44
-rw-r--r--src/mame/drivers/tugboat.c16
-rw-r--r--src/mame/drivers/tumbleb.c93
-rw-r--r--src/mame/drivers/tumblep.c10
-rw-r--r--src/mame/drivers/tunhunt.c2
-rw-r--r--src/mame/drivers/turbo.c19
-rw-r--r--src/mame/drivers/tutankhm.c30
-rw-r--r--src/mame/drivers/twin16.c31
-rw-r--r--src/mame/drivers/twincobr.c4
-rw-r--r--src/mame/drivers/twinkle.c9
-rw-r--r--src/mame/drivers/twins.c16
-rw-r--r--src/mame/drivers/tx1.c18
-rw-r--r--src/mame/drivers/uapce.c7
-rw-r--r--src/mame/drivers/ultraman.c37
-rw-r--r--src/mame/drivers/ultratnk.c7
-rw-r--r--src/mame/drivers/ultrsprt.c11
-rw-r--r--src/mame/drivers/umipoker.c31
-rw-r--r--src/mame/drivers/undrfire.c2
-rw-r--r--src/mame/drivers/unico.c18
-rw-r--r--src/mame/drivers/unkhorse.c6
-rw-r--r--src/mame/drivers/upscope.c6
-rw-r--r--src/mame/drivers/usgames.c2
-rw-r--r--src/mame/drivers/vaportra.c22
-rw-r--r--src/mame/drivers/vastar.c6
-rw-r--r--src/mame/drivers/vball.c1
-rw-r--r--src/mame/drivers/vcombat.c22
-rw-r--r--src/mame/drivers/vectrex.c3
-rw-r--r--src/mame/drivers/vega.c19
-rw-r--r--src/mame/drivers/vegaeo.c8
-rw-r--r--src/mame/drivers/vegas.c82
-rw-r--r--src/mame/drivers/vendetta.c50
-rw-r--r--src/mame/drivers/vertigo.c2
-rw-r--r--src/mame/drivers/vicdual.c2
-rw-r--r--src/mame/drivers/victory.c1
-rw-r--r--src/mame/drivers/videopin.c11
-rw-r--r--src/mame/drivers/videopkr.c70
-rw-r--r--src/mame/drivers/vigilant.c6
-rw-r--r--src/mame/drivers/vindictr.c19
-rw-r--r--src/mame/drivers/viper.c24
-rw-r--r--src/mame/drivers/vmetal.c20
-rw-r--r--src/mame/drivers/volfied.c18
-rw-r--r--src/mame/drivers/voyager.c25
-rw-r--r--src/mame/drivers/vpoker.c13
-rw-r--r--src/mame/drivers/vroulet.c7
-rw-r--r--src/mame/drivers/vsnes.c16
-rw-r--r--src/mame/drivers/vulgus.c2
-rw-r--r--src/mame/drivers/wallc.c17
-rw-r--r--src/mame/drivers/wardner.c4
-rw-r--r--src/mame/drivers/warpsped.c23
-rw-r--r--src/mame/drivers/warpwarp.c12
-rw-r--r--src/mame/drivers/warriorb.c50
-rw-r--r--src/mame/drivers/wc90.c3
-rw-r--r--src/mame/drivers/wc90b.c1
-rw-r--r--src/mame/drivers/wecleman.c19
-rw-r--r--src/mame/drivers/welltris.c1
-rw-r--r--src/mame/drivers/wgp.c47
-rw-r--r--src/mame/drivers/wheelfir.c40
-rw-r--r--src/mame/drivers/whitestar.c22
-rw-r--r--src/mame/drivers/wildpkr.c12
-rw-r--r--src/mame/drivers/williams.c30
-rw-r--r--src/mame/drivers/wink.c14
-rw-r--r--src/mame/drivers/wiping.c1
-rw-r--r--src/mame/drivers/witch.c23
-rw-r--r--src/mame/drivers/wiz.c8
-rw-r--r--src/mame/drivers/wolfpack.c7
-rw-r--r--src/mame/drivers/wrally.c1
-rw-r--r--src/mame/drivers/wwfsstar.c1
-rw-r--r--src/mame/drivers/wwfwfest.c3
-rw-r--r--src/mame/drivers/xain.c12
-rw-r--r--src/mame/drivers/xexex.c91
-rw-r--r--src/mame/drivers/xmen.c62
-rw-r--r--src/mame/drivers/xorworld.c2
-rw-r--r--src/mame/drivers/xtom3d.c49
-rw-r--r--src/mame/drivers/xxmissio.c8
-rw-r--r--src/mame/drivers/xybots.c19
-rw-r--r--src/mame/drivers/xyonix.c2
-rw-r--r--src/mame/drivers/yiear.c14
-rw-r--r--src/mame/drivers/yunsun16.c22
-rw-r--r--src/mame/drivers/yunsung8.c45
-rw-r--r--src/mame/drivers/zac2650.c12
-rw-r--r--src/mame/drivers/zaccaria.c2
-rw-r--r--src/mame/drivers/zaxxon.c16
-rw-r--r--src/mame/drivers/zn.c135
-rw-r--r--src/mame/drivers/zodiack.c2
-rw-r--r--src/mame/drivers/zr107.c37
1057 files changed, 14332 insertions, 17024 deletions
diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c
index f593d0763ab..4aaa35aab84 100644
--- a/src/mame/drivers/1942.c
+++ b/src/mame/drivers/1942.c
@@ -236,23 +236,21 @@ static GFXDECODE_START( 1942 )
GFXDECODE_END
-static MACHINE_START( 1942 )
+void _1942_state::machine_start()
{
- _1942_state *state = machine.driver_data<_1942_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_palette_bank));
- state->save_item(NAME(state->m_scroll));
+ save_item(NAME(m_palette_bank));
+ save_item(NAME(m_scroll));
}
-static MACHINE_RESET( 1942 )
+void _1942_state::machine_reset()
{
- _1942_state *state = machine.driver_data<_1942_state>();
- state->m_palette_bank = 0;
- state->m_scroll[0] = 0;
- state->m_scroll[1] = 0;
+ m_palette_bank = 0;
+ m_scroll[0] = 0;
+ m_scroll[1] = 0;
}
static MACHINE_CONFIG_START( 1942, _1942_state )
@@ -266,8 +264,6 @@ static MACHINE_CONFIG_START( 1942, _1942_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
- MCFG_MACHINE_START(1942)
- MCFG_MACHINE_RESET(1942)
/* video hardware */
MCFG_GFXDECODE(1942)
@@ -280,8 +276,6 @@ static MACHINE_CONFIG_START( 1942, _1942_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_STATIC(1942)
- MCFG_PALETTE_INIT(1942)
- MCFG_VIDEO_START(1942)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/1943.c b/src/mame/drivers/1943.c
index 19726e77a47..48e7a38c0ca 100644
--- a/src/mame/drivers/1943.c
+++ b/src/mame/drivers/1943.c
@@ -243,14 +243,13 @@ GFXDECODE_END
/* Machine Driver */
-static MACHINE_RESET( 1943 )
+void _1943_state::machine_reset()
{
- _1943_state *state = machine.driver_data<_1943_state>();
- state->m_char_on = 0;
- state->m_obj_on = 0;
- state->m_bg1_on = 0;
- state->m_bg2_on = 0;
+ m_char_on = 0;
+ m_obj_on = 0;
+ m_bg1_on = 0;
+ m_bg2_on = 0;
}
static MACHINE_CONFIG_START( 1943, _1943_state )
@@ -264,7 +263,6 @@ static MACHINE_CONFIG_START( 1943, _1943_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60)
- MCFG_MACHINE_RESET(1943)
// video hardware
MCFG_SCREEN_ADD("screen", RASTER)
@@ -277,8 +275,6 @@ static MACHINE_CONFIG_START( 1943, _1943_state )
MCFG_GFXDECODE(1943)
MCFG_PALETTE_LENGTH(32*4+16*16+16*16+16*16)
- MCFG_PALETTE_INIT(1943)
- MCFG_VIDEO_START(1943)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/1945kiii.c b/src/mame/drivers/1945kiii.c
index 137a80e0a0f..7f5f0562737 100644
--- a/src/mame/drivers/1945kiii.c
+++ b/src/mame/drivers/1945kiii.c
@@ -75,6 +75,8 @@ public:
DECLARE_WRITE16_MEMBER(k3_scrolly_w);
DECLARE_WRITE16_MEMBER(k3_soundbanks_w);
TILE_GET_INFO_MEMBER(get_k3_bg_tile_info);
+ virtual void machine_start();
+ virtual void video_start();
};
@@ -90,10 +92,9 @@ TILE_GET_INFO_MEMBER(k3_state::get_k3_bg_tile_info)
SET_TILE_INFO_MEMBER(1, tileno, 0, 0);
}
-static VIDEO_START(k3)
+void k3_state::video_start()
{
- k3_state *state = machine.driver_data<k3_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(k3_state::get_k3_bg_tile_info),state), TILEMAP_SCAN_ROWS, 16, 16, 32, 64);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k3_state::get_k3_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 64);
}
static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
@@ -248,7 +249,7 @@ static GFXDECODE_START( 1945kiii )
GFXDECODE_END
-static MACHINE_START( 1945kiii )
+void k3_state::machine_start()
{
}
@@ -258,7 +259,6 @@ static MACHINE_CONFIG_START( k3, k3_state )
MCFG_CPU_PROGRAM_MAP(k3_map)
MCFG_CPU_VBLANK_INT("screen", irq4_line_hold)
- MCFG_MACHINE_START(1945kiii)
MCFG_GFXDECODE(1945kiii)
@@ -271,7 +271,6 @@ static MACHINE_CONFIG_START( k3, k3_state )
MCFG_PALETTE_LENGTH(0x800)
- MCFG_VIDEO_START(k3)
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c
index 319a3fd4236..cbe14fb11fd 100644
--- a/src/mame/drivers/20pacgal.c
+++ b/src/mame/drivers/20pacgal.c
@@ -341,25 +341,23 @@ INPUT_PORTS_END
*
*************************************/
-static MACHINE_START( 20pacgal )
+void _20pacgal_state::machine_start()
{
- _20pacgal_state *state = machine.driver_data<_20pacgal_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_eeprom = machine.device("eeprom");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_eeprom = machine().device("eeprom");
- state->save_item(NAME(state->m_game_selected));
- state->save_item(NAME(state->m_ram_48000));
- state->save_item(NAME(state->m_irq_mask));
+ save_item(NAME(m_game_selected));
+ save_item(NAME(m_ram_48000));
+ save_item(NAME(m_irq_mask));
- machine.save().register_postload(save_prepost_delegate(FUNC(set_bankptr), &machine));
+ machine().save().register_postload(save_prepost_delegate(FUNC(set_bankptr), &machine()));
}
-static MACHINE_RESET( 20pacgal )
+void _20pacgal_state::machine_reset()
{
- _20pacgal_state *state = machine.driver_data<_20pacgal_state>();
- state->m_game_selected = 0;
+ m_game_selected = 0;
}
static INTERRUPT_GEN( vblank_irq )
@@ -378,8 +376,6 @@ static MACHINE_CONFIG_START( 20pacgal, _20pacgal_state )
MCFG_CPU_IO_MAP(20pacgal_io_map)
MCFG_CPU_VBLANK_INT("screen", vblank_irq)
- MCFG_MACHINE_START(20pacgal)
- MCFG_MACHINE_RESET(20pacgal)
MCFG_EEPROM_ADD("eeprom", _20pacgal_eeprom_intf)
diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c
index 0edc6a15e63..dd3d35f38ee 100644
--- a/src/mame/drivers/2mindril.c
+++ b/src/mame/drivers/2mindril.c
@@ -61,6 +61,9 @@ public:
DECLARE_READ16_MEMBER(drill_irq_r);
DECLARE_WRITE16_MEMBER(drill_irq_w);
DECLARE_DRIVER_INIT(drill);
+ DECLARE_MACHINE_START(drill);
+ DECLARE_MACHINE_RESET(drill);
+
};
@@ -422,23 +425,21 @@ static const ym2610_interface ym2610_config =
};
-static MACHINE_START( drill )
+MACHINE_START_MEMBER(_2mindril_state,drill)
{
- _2mindril_state *state = machine.driver_data<_2mindril_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
- state->save_item(NAME(state->m_defender_sensor));
- state->save_item(NAME(state->m_shutter_sensor));
+ save_item(NAME(m_defender_sensor));
+ save_item(NAME(m_shutter_sensor));
}
-static MACHINE_RESET( drill )
+MACHINE_RESET_MEMBER(_2mindril_state,drill)
{
- _2mindril_state *state = machine.driver_data<_2mindril_state>();
- state->m_defender_sensor = 0;
- state->m_shutter_sensor = 0;
- state->irq_reg = 0;
+ m_defender_sensor = 0;
+ m_shutter_sensor = 0;
+ irq_reg = 0;
}
static MACHINE_CONFIG_START( drill, _2mindril_state )
@@ -449,8 +450,8 @@ static MACHINE_CONFIG_START( drill, _2mindril_state )
//MCFG_CPU_PERIODIC_INT(drill_device_irq,60)
MCFG_GFXDECODE(2mindril)
- MCFG_MACHINE_START(drill)
- MCFG_MACHINE_RESET(drill)
+ MCFG_MACHINE_START_OVERRIDE(_2mindril_state,drill)
+ MCFG_MACHINE_RESET_OVERRIDE(_2mindril_state,drill)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@@ -462,7 +463,7 @@ static MACHINE_CONFIG_START( drill, _2mindril_state )
MCFG_PALETTE_LENGTH(0x2000)
- MCFG_VIDEO_START(f3)
+ MCFG_VIDEO_START_OVERRIDE(_2mindril_state,f3)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/30test.c b/src/mame/drivers/30test.c
index 41ba8e09189..62aba6d8d06 100644
--- a/src/mame/drivers/30test.c
+++ b/src/mame/drivers/30test.c
@@ -64,6 +64,8 @@ public:
DECLARE_WRITE8_MEMBER(hc11_mux_w);
DECLARE_READ8_MEMBER(hc11_okibank_r);
DECLARE_WRITE8_MEMBER(hc11_okibank_w);
+ virtual void machine_start();
+ virtual void machine_reset();
};
@@ -218,15 +220,14 @@ static INPUT_PORTS_START( 30test )
INPUT_PORTS_END
-static MACHINE_START( 30test )
+void namco_30test_state::machine_start()
{
- namco_30test_state *state = machine.driver_data<namco_30test_state>();
- state->save_item(NAME(state->m_mux_data));
- state->save_item(NAME(state->m_oki_bank));
+ save_item(NAME(m_mux_data));
+ save_item(NAME(m_oki_bank));
}
-static MACHINE_RESET( 30test )
+void namco_30test_state::machine_reset()
{
}
@@ -247,8 +248,6 @@ static MACHINE_CONFIG_START( 30test, namco_30test_state )
MCFG_CPU_IO_MAP(namco_30test_io)
MCFG_CPU_CONFIG(namco_30test_config)
- MCFG_MACHINE_START(30test)
- MCFG_MACHINE_RESET(30test)
/* no video! */
diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c
index 17d6f1a9bce..994b6e2f1ed 100644
--- a/src/mame/drivers/39in1.c
+++ b/src/mame/drivers/39in1.c
@@ -73,6 +73,7 @@ public:
DECLARE_WRITE32_MEMBER(cpld_w);
DECLARE_READ32_MEMBER(prot_cheater_r);
DECLARE_DRIVER_INIT(39in1);
+ virtual void machine_start();
};
@@ -1567,9 +1568,9 @@ static void pxa255_start(running_machine& machine)
//pxa255_register_state_save(device);
}
-static MACHINE_START(39in1)
+void _39in1_state::machine_start()
{
- UINT8 *ROM = machine.root_device().memregion("maincpu")->base();
+ UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
int i;
for (i = 0; i < 0x80000; i += 2)
@@ -1583,7 +1584,7 @@ static MACHINE_START(39in1)
// }
}
- pxa255_start(machine);
+ pxa255_start(machine());
}
static MACHINE_CONFIG_START( 39in1, _39in1_state )
@@ -1603,7 +1604,6 @@ static MACHINE_CONFIG_START( 39in1, _39in1_state )
MCFG_PALETTE_LENGTH(256)
- MCFG_MACHINE_START(39in1)
MCFG_EEPROM_93C66B_ADD("eeprom")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/3do.c b/src/mame/drivers/3do.c
index f65917ea3a0..b3e9653b783 100644
--- a/src/mame/drivers/3do.c
+++ b/src/mame/drivers/3do.c
@@ -129,24 +129,23 @@ static INPUT_PORTS_START( 3do )
INPUT_PORTS_END
-static MACHINE_RESET( 3do )
+void _3do_state::machine_reset()
{
- _3do_state *state = machine.driver_data<_3do_state>();
- state->m_maincpu = downcast<legacy_cpu_device*>( machine.device<cpu_device>("maincpu") );
+ m_maincpu = downcast<legacy_cpu_device*>( machine().device<cpu_device>("maincpu") );
- state->membank("bank2")->set_base(state->memregion("user1")->base());
+ membank("bank2")->set_base(memregion("user1")->base());
/* configure overlay */
- state->membank("bank1")->configure_entry(0, state->m_dram);
- state->membank("bank1")->configure_entry(1, state->memregion("user1")->base());
+ membank("bank1")->configure_entry(0, m_dram);
+ membank("bank1")->configure_entry(1, memregion("user1")->base());
/* start with overlay enabled */
- state->membank("bank1")->set_entry(1);
+ membank("bank1")->set_entry(1);
- _3do_slow2_init(machine);
- _3do_madam_init(machine);
- _3do_clio_init(machine, downcast<screen_device *>(machine.device("screen")));
+ _3do_slow2_init(machine());
+ _3do_madam_init(machine());
+ _3do_clio_init(machine(), downcast<screen_device *>(machine().device("screen")));
}
struct cdrom_interface _3do_cdrom =
@@ -161,9 +160,8 @@ static MACHINE_CONFIG_START( 3do, _3do_state )
MCFG_CPU_ADD( "maincpu", ARM7_BE, XTAL_50MHz/4 )
MCFG_CPU_PROGRAM_MAP( 3do_mem)
- MCFG_MACHINE_RESET( 3do )
- MCFG_VIDEO_START( _3do )
+ MCFG_VIDEO_START_OVERRIDE(_3do_state, _3do )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS( X2_CLOCK_NTSC / 2, 1592, 254, 1534, 263, 22, 262 )
@@ -179,7 +177,6 @@ static MACHINE_CONFIG_START( 3do_pal, _3do_state )
MCFG_CPU_ADD("maincpu", ARM7_BE, XTAL_50MHz/4 )
MCFG_CPU_PROGRAM_MAP( 3do_mem)
- MCFG_MACHINE_RESET( 3do )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_UPDATE_STATIC( _3do )
diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c
index 4da909fe01d..0ea5bf2d333 100644
--- a/src/mame/drivers/40love.c
+++ b/src/mame/drivers/40love.c
@@ -672,9 +672,8 @@ static ADDRESS_MAP_START( undoukai_map, AS_PROGRAM, 8, fortyl_state )
AM_RANGE(0xc000, 0xffff) AM_READWRITE(fortyl_pixram_r, fortyl_pixram_w)
ADDRESS_MAP_END
-static MACHINE_RESET( ta7630 )
+MACHINE_RESET_MEMBER(fortyl_state,ta7630)
{
- fortyl_state *state = machine.driver_data<fortyl_state>();
int i;
double db = 0.0;
@@ -683,8 +682,8 @@ static MACHINE_RESET( ta7630 )
for (i = 0; i < 16; i++)
{
double max = 100.0 / pow(10.0, db/20.0);
- state->m_vol_ctrl[15 - i] = max;
- /*logerror("vol_ctrl[%x] = %i (%f dB)\n", 15 - i, state->m_vol_ctrl[15 - i], db);*/
+ m_vol_ctrl[15 - i] = max;
+ /*logerror("vol_ctrl[%x] = %i (%f dB)\n", 15 - i, m_vol_ctrl[15 - i], db);*/
db += db_step;
db_step += db_step_inc;
}
@@ -974,88 +973,84 @@ static const msm5232_interface msm5232_config =
/*******************************************************************************/
-static MACHINE_START( 40love )
+MACHINE_START_MEMBER(fortyl_state,40love)
{
- fortyl_state *state = machine.driver_data<fortyl_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
/* video */
- state->save_item(NAME(state->m_pix1));
- state->save_item(NAME(state->m_pix2));
+ save_item(NAME(m_pix1));
+ save_item(NAME(m_pix2));
/* sound */
- state->save_item(NAME(state->m_sound_nmi_enable));
- state->save_item(NAME(state->m_pending_nmi));
- state->save_item(NAME(state->m_snd_data));
- state->save_item(NAME(state->m_snd_flag));
- state->save_item(NAME(state->m_vol_ctrl));
- state->save_item(NAME(state->m_snd_ctrl0));
- state->save_item(NAME(state->m_snd_ctrl1));
- state->save_item(NAME(state->m_snd_ctrl2));
- state->save_item(NAME(state->m_snd_ctrl3));
+ save_item(NAME(m_sound_nmi_enable));
+ save_item(NAME(m_pending_nmi));
+ save_item(NAME(m_snd_data));
+ save_item(NAME(m_snd_flag));
+ save_item(NAME(m_vol_ctrl));
+ save_item(NAME(m_snd_ctrl0));
+ save_item(NAME(m_snd_ctrl1));
+ save_item(NAME(m_snd_ctrl2));
+ save_item(NAME(m_snd_ctrl3));
}
-static MACHINE_START( undoukai )
+MACHINE_START_MEMBER(fortyl_state,undoukai)
{
- fortyl_state *state = machine.driver_data<fortyl_state>();
- MACHINE_START_CALL(40love);
+ MACHINE_START_CALL_MEMBER(40love);
/* fake mcu */
- state->save_item(NAME(state->m_from_mcu));
- state->save_item(NAME(state->m_mcu_cmd));
- state->save_item(NAME(state->m_mcu_in[0]));
- state->save_item(NAME(state->m_mcu_in[1]));
- state->save_item(NAME(state->m_mcu_out[0]));
- state->save_item(NAME(state->m_mcu_out[1]));
+ save_item(NAME(m_from_mcu));
+ save_item(NAME(m_mcu_cmd));
+ save_item(NAME(m_mcu_in[0]));
+ save_item(NAME(m_mcu_in[1]));
+ save_item(NAME(m_mcu_out[0]));
+ save_item(NAME(m_mcu_out[1]));
}
-static MACHINE_RESET( common )
+MACHINE_RESET_MEMBER(fortyl_state,common)
{
- fortyl_state *state = machine.driver_data<fortyl_state>();
- MACHINE_RESET_CALL(ta7630);
+ MACHINE_RESET_CALL_MEMBER(ta7630);
/* video */
- state->m_pix1 = 0;
- state->m_pix2[0] = 0;
- state->m_pix2[1] = 0;
+ m_pix1 = 0;
+ m_pix2[0] = 0;
+ m_pix2[1] = 0;
/* sound */
- state->m_sound_nmi_enable = 0;
- state->m_pending_nmi = 0;
- state->m_snd_data = 0;
- state->m_snd_flag = 0;
- state->m_snd_ctrl0 = 0;
- state->m_snd_ctrl1 = 0;
- state->m_snd_ctrl2 = 0;
- state->m_snd_ctrl3 = 0;
+ m_sound_nmi_enable = 0;
+ m_pending_nmi = 0;
+ m_snd_data = 0;
+ m_snd_flag = 0;
+ m_snd_ctrl0 = 0;
+ m_snd_ctrl1 = 0;
+ m_snd_ctrl2 = 0;
+ m_snd_ctrl3 = 0;
}
-static MACHINE_RESET( 40love )
+MACHINE_RESET_MEMBER(fortyl_state,40love)
{
- machine.device("mcu")->execute().set_input_line(0, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(0, CLEAR_LINE);
- MACHINE_RESET_CALL(common);
+ MACHINE_RESET_CALL_MEMBER(common);
}
-static MACHINE_RESET( undoukai )
+MACHINE_RESET_MEMBER(fortyl_state,undoukai)
{
- fortyl_state *state = machine.driver_data<fortyl_state>();
int i;
- MACHINE_RESET_CALL(common);
+ MACHINE_RESET_CALL_MEMBER(common);
/* fake mcu */
- state->m_from_mcu = 0xff;
- state->m_mcu_cmd = -1;
+ m_from_mcu = 0xff;
+ m_mcu_cmd = -1;
for (i = 0; i < 16; i++)
{
- state->m_mcu_in[0][i] = 0;
- state->m_mcu_in[1][i] = 0;
- state->m_mcu_out[0][i] = 0;
- state->m_mcu_out[1][i] = 0;
+ m_mcu_in[0][i] = 0;
+ m_mcu_in[1][i] = 0;
+ m_mcu_out[0][i] = 0;
+ m_mcu_out[1][i] = 0;
}
}
@@ -1075,8 +1070,8 @@ static MACHINE_CONFIG_START( 40love, fortyl_state )
MCFG_DEVICE_ADD("bmcu", BUGGYCHL_MCU, 0)
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* high interleave to ensure proper synchronization of CPUs */
- MCFG_MACHINE_START(40love)
- MCFG_MACHINE_RESET(40love)
+ MCFG_MACHINE_START_OVERRIDE(fortyl_state,40love)
+ MCFG_MACHINE_RESET_OVERRIDE(fortyl_state,40love)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1089,8 +1084,6 @@ static MACHINE_CONFIG_START( 40love, fortyl_state )
MCFG_GFXDECODE(40love)
MCFG_PALETTE_LENGTH(1024)
- MCFG_PALETTE_INIT(fortyl)
- MCFG_VIDEO_START(fortyl)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1132,8 +1125,8 @@ static MACHINE_CONFIG_START( undoukai, fortyl_state )
// MCFG_CPU_PROGRAM_MAP(buggychl_mcu_map)
// MCFG_DEVICE_ADD("bmcu", BUGGYCHL_MCU, 0)
- MCFG_MACHINE_START(undoukai)
- MCFG_MACHINE_RESET(undoukai) /* init machine */
+ MCFG_MACHINE_START_OVERRIDE(fortyl_state,undoukai)
+ MCFG_MACHINE_RESET_OVERRIDE(fortyl_state,undoukai) /* init machine */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1146,8 +1139,6 @@ static MACHINE_CONFIG_START( undoukai, fortyl_state )
MCFG_GFXDECODE(40love)
MCFG_PALETTE_LENGTH(1024)
- MCFG_PALETTE_INIT(fortyl)
- MCFG_VIDEO_START(fortyl)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/4enraya.c b/src/mame/drivers/4enraya.c
index d990715d565..d549a308d6a 100644
--- a/src/mame/drivers/4enraya.c
+++ b/src/mame/drivers/4enraya.c
@@ -292,29 +292,27 @@ static GFXDECODE_START( 4enraya )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 1 )
GFXDECODE_END
-static MACHINE_START( 4enraya )
+void _4enraya_state::machine_start()
{
- _4enraya_state *state = machine.driver_data<_4enraya_state>();
- state->save_item(NAME(state->m_soundlatch));
- state->save_item(NAME(state->m_last_snd_ctrl));
+ save_item(NAME(m_soundlatch));
+ save_item(NAME(m_last_snd_ctrl));
}
-static MACHINE_RESET( 4enraya )
+void _4enraya_state::machine_reset()
{
- _4enraya_state *state = machine.driver_data<_4enraya_state>();
- state->m_soundlatch = 0;
- state->m_last_snd_ctrl = 0;
+ m_soundlatch = 0;
+ m_last_snd_ctrl = 0;
}
-static PALETTE_INIT( 4enraya )
+void _4enraya_state::palette_init()
{
int i;
/* RGB format */
for(i=0;i<8;i++)
- palette_set_color(machine, i, MAKE_RGB(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
+ palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
}
static MACHINE_CONFIG_START( 4enraya, _4enraya_state )
@@ -325,8 +323,6 @@ static MACHINE_CONFIG_START( 4enraya, _4enraya_state )
MCFG_CPU_IO_MAP(main_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) // unknown timing
- MCFG_MACHINE_START(4enraya)
- MCFG_MACHINE_RESET(4enraya)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -338,10 +334,8 @@ static MACHINE_CONFIG_START( 4enraya, _4enraya_state )
MCFG_GFXDECODE(4enraya)
- MCFG_PALETTE_INIT(4enraya)
MCFG_PALETTE_LENGTH(8)
- MCFG_VIDEO_START(4enraya)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/4roses.c b/src/mame/drivers/4roses.c
index 297ebcc6532..d2656839b80 100644
--- a/src/mame/drivers/4roses.c
+++ b/src/mame/drivers/4roses.c
@@ -401,8 +401,8 @@ static MACHINE_CONFIG_START( 4roses, _4roses_state )
MCFG_GFXDECODE(4roses)
MCFG_PALETTE_LENGTH(0x1000)
- MCFG_PALETTE_INIT(funworld)
- MCFG_VIDEO_START(funworld)
+ MCFG_PALETTE_INIT_OVERRIDE(_4roses_state,funworld)
+ MCFG_VIDEO_START_OVERRIDE(_4roses_state,funworld)
// MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf) /* 2MHz, guess */
diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c
index 3f70cc9fc3e..914f6521abb 100644
--- a/src/mame/drivers/5clown.c
+++ b/src/mame/drivers/5clown.c
@@ -484,6 +484,8 @@ public:
DECLARE_WRITE8_MEMBER(fclown_ay8910_w);
DECLARE_DRIVER_INIT(fclown);
TILE_GET_INFO_MEMBER(get_fclown_tile_info);
+ virtual void video_start();
+ virtual void palette_init();
};
@@ -529,10 +531,9 @@ TILE_GET_INFO_MEMBER(_5clown_state::get_fclown_tile_info)
}
-static VIDEO_START(fclown)
+void _5clown_state::video_start()
{
- _5clown_state *state = machine.driver_data<_5clown_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(_5clown_state::get_fclown_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(_5clown_state::get_fclown_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
}
@@ -543,9 +544,9 @@ static SCREEN_UPDATE_IND16( fclown )
return 0;
}
-static PALETTE_INIT( fclown )
+void _5clown_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
/*
7654 3210
---- ---x RED component.
@@ -560,7 +561,7 @@ static PALETTE_INIT( fclown )
if (color_prom == 0) return;
- for (i = 0;i < machine.total_colors();i++)
+ for (i = 0;i < machine().total_colors();i++)
{
int bit0, bit1, bit2, bit3, r, g, b, bk;
@@ -580,7 +581,7 @@ static PALETTE_INIT( fclown )
bit2 = (color_prom[i] >> 2) & 0x01;
b = bk * (bit2 * 0xff);
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
}
}
@@ -1084,9 +1085,7 @@ static MACHINE_CONFIG_START( fclown, _5clown_state )
MCFG_GFXDECODE(fclown)
MCFG_PALETTE_LENGTH(256)
- MCFG_PALETTE_INIT(fclown)
- MCFG_VIDEO_START(fclown)
MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */
diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c
index e23d24af3b2..1b2804669d2 100644
--- a/src/mame/drivers/8080bw.c
+++ b/src/mame/drivers/8080bw.c
@@ -198,11 +198,11 @@
/* */
/*******************************************************/
-static MACHINE_START( extra_8080bw )
+MACHINE_START_MEMBER(_8080bw_state,extra_8080bw)
{
- MACHINE_START_CALL(extra_8080bw_sh);
- MACHINE_START_CALL(extra_8080bw_vh);
- MACHINE_START_CALL(mw8080bw);
+ MACHINE_START_CALL_MEMBER(extra_8080bw_sh);
+ MACHINE_START_CALL_MEMBER(extra_8080bw_vh);
+ MACHINE_START_CALL_MEMBER(mw8080bw);
}
/*******************************************************/
@@ -385,7 +385,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( invadpt2, mw8080bw_root, _8080bw_state )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(invadpt2_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* 60 Hz signal clocks two LS161. Ripple carry will */
/* reset circuit, if LS161 not cleared before. */
@@ -444,7 +444,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( spcewars, mw8080bw_root, _8080bw_state )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(spcewars_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -568,7 +568,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( cosmo, mw8080bw_root, _8080bw_state )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(cosmo_map)
MCFG_CPU_IO_MAP(cosmo_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
@@ -795,7 +795,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( lrescue, mw8080bw_root, _8080bw_state )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(lrescue_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1044,17 +1044,17 @@ static INPUT_PORTS_START( schaser )
PORT_ADJUSTER( 70, "VR3 - Dot Volume" )
INPUT_PORTS_END
-static MACHINE_START( schaser )
+MACHINE_START_MEMBER(_8080bw_state,schaser)
{
- MACHINE_START_CALL(schaser_sh);
- MACHINE_START_CALL(extra_8080bw_vh);
- MACHINE_START_CALL(mw8080bw);
+ MACHINE_START_CALL_MEMBER(schaser_sh);
+ MACHINE_START_CALL_MEMBER(extra_8080bw_vh);
+ MACHINE_START_CALL_MEMBER(mw8080bw);
}
-static MACHINE_RESET( schaser )
+MACHINE_RESET_MEMBER(_8080bw_state,schaser)
{
- MACHINE_RESET_CALL(schaser_sh);
- MACHINE_RESET_CALL(mw8080bw);
+ MACHINE_RESET_CALL_MEMBER(schaser_sh);
+ MACHINE_RESET_CALL_MEMBER(mw8080bw);
}
static MACHINE_CONFIG_DERIVED_CLASS( schaser, mw8080bw_root, _8080bw_state )
@@ -1064,8 +1064,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( schaser, mw8080bw_root, _8080bw_state )
MCFG_CPU_PROGRAM_MAP(schaser_map)
MCFG_CPU_IO_MAP(schaser_io_map)
MCFG_WATCHDOG_VBLANK_INIT(255)
- MCFG_MACHINE_START(schaser)
- MCFG_MACHINE_RESET(schaser)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,schaser)
+ MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state,schaser)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1134,7 +1134,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( schasercv, mw8080bw_root, _8080bw_state )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(schaser_map)
MCFG_CPU_IO_MAP(schasercv_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1215,7 +1215,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( sflush, mw8080bw_root, _8080bw_state )
MCFG_CPU_REPLACE("maincpu",M6800,1500000) // ?
MCFG_CPU_PROGRAM_MAP(sflush_map)
MCFG_CPU_VBLANK_INT("screen",irq0_line_hold)
- MCFG_MACHINE_START(mw8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,mw8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1322,7 +1322,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( lupin3, mw8080bw_root, _8080bw_state )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(lupin3_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1342,7 +1342,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( lupin3a, mw8080bw_root, _8080bw_state )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(schaser_map)
MCFG_CPU_IO_MAP(lupin3_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1375,13 +1375,12 @@ static INTERRUPT_GEN( polaris_interrupt )
}
}
-static MACHINE_START( polaris )
+MACHINE_START_MEMBER(_8080bw_state,polaris)
{
- _8080bw_state *state = machine.driver_data<_8080bw_state>();
- state->save_item(NAME(state->m_polaris_cloud_speed));
- state->save_item(NAME(state->m_polaris_cloud_pos));
+ save_item(NAME(m_polaris_cloud_speed));
+ save_item(NAME(m_polaris_cloud_pos));
- MACHINE_START_CALL(mw8080bw);
+ MACHINE_START_CALL_MEMBER(mw8080bw);
}
// Port 5 is used to reset the watchdog timer.
@@ -1463,7 +1462,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( polaris, mw8080bw_root, _8080bw_state )
MCFG_CPU_IO_MAP(polaris_io_map)
MCFG_WATCHDOG_VBLANK_INIT(255)
MCFG_CPU_VBLANK_INT("screen", polaris_interrupt)
- MCFG_MACHINE_START(polaris)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,polaris)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1586,7 +1585,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( ballbomb, mw8080bw_root, _8080bw_state )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(ballbomb_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1661,7 +1660,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( yosakdon, mw8080bw_root, _8080bw_state )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(yosakdon_map)
MCFG_CPU_IO_MAP(yosakdon_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* sound hardware */
MCFG_FRAGMENT_ADD(invaders_samples_audio)
@@ -1757,7 +1756,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( indianbt, mw8080bw_root, _8080bw_state )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(indianbt_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1831,7 +1830,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( steelwkr, mw8080bw_root, _8080bw_state )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(steelwkr_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1968,7 +1967,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( shuttlei, mw8080bw_root, _8080bw_state )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(shuttlei_map)
MCFG_CPU_IO_MAP(shuttlei_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
@@ -2005,13 +2004,13 @@ Another (same checksums) dump came from board labeled SI-7811M-2
*/
-static MACHINE_START( darthvdr )
+MACHINE_START_MEMBER(_8080bw_state,darthvdr)
{
/* do nothing for now - different interrupt system */
}
-static MACHINE_RESET( darthvdr )
+MACHINE_RESET_MEMBER(_8080bw_state,darthvdr)
{
/* do nothing for now - different interrupt system */
}
@@ -2077,8 +2076,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( darthvdr, mw8080bw_root, _8080bw_state )
MCFG_CPU_IO_MAP(darthvdr_io_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_MACHINE_START(darthvdr)
- MCFG_MACHINE_RESET(darthvdr)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,darthvdr)
+ MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state,darthvdr)
MACHINE_CONFIG_END
@@ -2148,7 +2147,7 @@ MACHINE_CONFIG_DERIVED_CLASS( vortex, mw8080bw_root, _8080bw_state )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(vortex_io_map)
- MCFG_MACHINE_START(extra_8080bw)
+ MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw)
MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* video hardware */
@@ -2529,13 +2528,12 @@ WRITE8_MEMBER(_8080bw_state::invmulti_bank_w)
membank("bank2")->set_base(memregion("maincpu")->base() + bank * 0x4000 + 0x2000);
}
-static MACHINE_RESET( invmulti )
+MACHINE_RESET_MEMBER(_8080bw_state,invmulti)
{
- _8080bw_state *state = machine.driver_data<_8080bw_state>();
- state->invmulti_bank_w(*state->m_maincpu->space(AS_PROGRAM), 0, 0);
+ invmulti_bank_w(*m_maincpu->space(AS_PROGRAM), 0, 0);
- MACHINE_RESET_CALL(mw8080bw);
+ MACHINE_RESET_CALL_MEMBER(mw8080bw);
}
MACHINE_CONFIG_DERIVED_CLASS( invmulti, invaders, _8080bw_state )
@@ -2546,7 +2544,7 @@ MACHINE_CONFIG_DERIVED_CLASS( invmulti, invaders, _8080bw_state )
MCFG_EEPROM_93C46_8BIT_ADD("eeprom")
- MCFG_MACHINE_RESET(invmulti)
+ MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state,invmulti)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c
index a741f630ad5..a58bc81b472 100644
--- a/src/mame/drivers/88games.c
+++ b/src/mame/drivers/88games.c
@@ -305,42 +305,40 @@ static KONAMI_SETLINES_CALLBACK( k88games_banking )
state->m_k88games_priority = lines & 0x80;
}
-static MACHINE_START( 88games )
+void _88games_state::machine_start()
{
- _88games_state *state = machine.driver_data<_88games_state>();
-
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_k052109 = machine.device("k052109");
- state->m_k051960 = machine.device("k051960");
- state->m_k051316 = machine.device("k051316");
- state->m_upd_1 = machine.device("upd1");
- state->m_upd_2 = machine.device("upd2");
-
- state->save_item(NAME(state->m_videobank));
- state->save_item(NAME(state->m_zoomreadroms));
- state->save_item(NAME(state->m_speech_chip));
- state->save_item(NAME(state->m_layer_colorbase));
- state->save_item(NAME(state->m_k88games_priority));
- state->save_item(NAME(state->m_sprite_colorbase));
- state->save_item(NAME(state->m_zoom_colorbase));
+
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_k052109 = machine().device("k052109");
+ m_k051960 = machine().device("k051960");
+ m_k051316 = machine().device("k051316");
+ m_upd_1 = machine().device("upd1");
+ m_upd_2 = machine().device("upd2");
+
+ save_item(NAME(m_videobank));
+ save_item(NAME(m_zoomreadroms));
+ save_item(NAME(m_speech_chip));
+ save_item(NAME(m_layer_colorbase));
+ save_item(NAME(m_k88games_priority));
+ save_item(NAME(m_sprite_colorbase));
+ save_item(NAME(m_zoom_colorbase));
}
-static MACHINE_RESET( 88games )
+void _88games_state::machine_reset()
{
- _88games_state *state = machine.driver_data<_88games_state>();
-
- konami_configure_set_lines(machine.device("maincpu"), k88games_banking);
- state->m_generic_paletteram_8.set_target(&state->memregion("maincpu")->base()[0x20000], 0x1000);
-
- state->m_videobank = 0;
- state->m_zoomreadroms = 0;
- state->m_speech_chip = 0;
- state->m_k88games_priority = 0;
- state->m_layer_colorbase[0] = 64;
- state->m_layer_colorbase[1] = 0;
- state->m_layer_colorbase[2] = 16;
- state->m_sprite_colorbase = 32;
- state->m_zoom_colorbase = 48;
+
+ konami_configure_set_lines(machine().device("maincpu"), k88games_banking);
+ m_generic_paletteram_8.set_target(&memregion("maincpu")->base()[0x20000], 0x1000);
+
+ m_videobank = 0;
+ m_zoomreadroms = 0;
+ m_speech_chip = 0;
+ m_k88games_priority = 0;
+ m_layer_colorbase[0] = 64;
+ m_layer_colorbase[1] = 0;
+ m_layer_colorbase[2] = 16;
+ m_sprite_colorbase = 32;
+ m_zoom_colorbase = 48;
}
static const k052109_interface _88games_k052109_intf =
@@ -377,8 +375,6 @@ static MACHINE_CONFIG_START( 88games, _88games_state )
MCFG_CPU_ADD("audiocpu", Z80, 3579545)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_MACHINE_START(88games)
- MCFG_MACHINE_RESET(88games)
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c
index 45c2a79655a..7bdef149339 100644
--- a/src/mame/drivers/ace.c
+++ b/src/mame/drivers/ace.c
@@ -64,6 +64,10 @@ public:
DECLARE_WRITE8_MEMBER(ace_characterram_w);
DECLARE_WRITE8_MEMBER(ace_scoreram_w);
DECLARE_READ8_MEMBER(unk_r);
+ virtual void machine_start();
+ virtual void machine_reset();
+ virtual void video_start();
+ virtual void palette_init();
};
@@ -79,13 +83,12 @@ READ8_MEMBER(aceal_state::ace_objpos_r)
}
#endif
-static VIDEO_START( ace )
+void aceal_state::video_start()
{
- aceal_state *state = machine.driver_data<aceal_state>();
- machine.gfx[1]->set_source(state->m_characterram);
- machine.gfx[2]->set_source(state->m_characterram);
- machine.gfx[3]->set_source(state->m_characterram);
- machine.gfx[4]->set_source(state->m_scoreram);
+ machine().gfx[1]->set_source(m_characterram);
+ machine().gfx[2]->set_source(m_characterram);
+ machine().gfx[3]->set_source(m_characterram);
+ machine().gfx[4]->set_source(m_scoreram);
}
static SCREEN_UPDATE_IND16( ace )
@@ -127,10 +130,10 @@ static SCREEN_UPDATE_IND16( ace )
}
-static PALETTE_INIT( ace )
+void aceal_state::palette_init()
{
- palette_set_color(machine, 0, MAKE_RGB(0x00,0x00,0x00)); /* black */
- palette_set_color(machine, 1, MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 0, MAKE_RGB(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 1, MAKE_RGB(0xff,0xff,0xff)); /* white */
}
@@ -329,20 +332,18 @@ static void ace_postload(running_machine &machine)
machine.gfx[4]->mark_dirty(0);
}
-static MACHINE_START( ace )
+void aceal_state::machine_start()
{
- aceal_state *state = machine.driver_data<aceal_state>();
- state->save_item(NAME(state->m_objpos));
- machine.save().register_postload(save_prepost_delegate(FUNC(ace_postload), &machine));
+ save_item(NAME(m_objpos));
+ machine().save().register_postload(save_prepost_delegate(FUNC(ace_postload), &machine()));
}
-static MACHINE_RESET( ace )
+void aceal_state::machine_reset()
{
- aceal_state *state = machine.driver_data<aceal_state>();
int i;
for (i = 0; i < 8; i++)
- state->m_objpos[i] = 0;
+ m_objpos[i] = 0;
}
static MACHINE_CONFIG_START( ace, aceal_state )
@@ -351,8 +352,6 @@ static MACHINE_CONFIG_START( ace, aceal_state )
MCFG_CPU_ADD("maincpu", I8080, MASTER_CLOCK/9) /* 2 MHz ? */
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_MACHINE_START(ace)
- MCFG_MACHINE_RESET(ace)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -365,8 +364,6 @@ static MACHINE_CONFIG_START( ace, aceal_state )
MCFG_GFXDECODE(ace)
MCFG_PALETTE_LENGTH(2)
- MCFG_PALETTE_INIT(ace)
- MCFG_VIDEO_START(ace)
/* sound hardware */
/* ???? */
diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c
index 8ea3225f422..8100daef70b 100644
--- a/src/mame/drivers/acefruit.c
+++ b/src/mame/drivers/acefruit.c
@@ -37,6 +37,8 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(starspnr_coinage_r);
DECLARE_CUSTOM_INPUT_MEMBER(starspnr_payout_r);
DECLARE_DRIVER_INIT(sidewndr);
+ virtual void video_start();
+ virtual void palette_init();
};
@@ -75,10 +77,9 @@ static TIMER_CALLBACK( acefruit_refresh )
state->m_refresh_timer->adjust( machine.primary_screen->time_until_pos(vpos) );
}
-static VIDEO_START( acefruit )
+void acefruit_state::video_start()
{
- acefruit_state *state = machine.driver_data<acefruit_state>();
- state->m_refresh_timer = machine.scheduler().timer_alloc(FUNC(acefruit_refresh));
+ m_refresh_timer = machine().scheduler().timer_alloc(FUNC(acefruit_refresh));
}
static INTERRUPT_GEN( acefruit_vblank )
@@ -262,27 +263,27 @@ WRITE8_MEMBER(acefruit_state::acefruit_solenoid_w)
}
}
-static PALETTE_INIT( acefruit )
+void acefruit_state::palette_init()
{
/* sprites */
- palette_set_color( machine, 0, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine, 1, MAKE_RGB(0x00, 0x00, 0xff) );
- palette_set_color( machine, 2, MAKE_RGB(0x00, 0xff, 0x00) );
- palette_set_color( machine, 3, MAKE_RGB(0xff, 0x7f, 0x00) );
- palette_set_color( machine, 4, MAKE_RGB(0xff, 0x00, 0x00) );
- palette_set_color( machine, 5, MAKE_RGB(0xff, 0xff, 0x00) );
- palette_set_color( machine, 6, MAKE_RGB(0xff, 0xff, 0xff) );
- palette_set_color( machine, 7, MAKE_RGB(0x7f, 0x3f, 0x1f) );
+ palette_set_color( machine(), 0, MAKE_RGB(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 1, MAKE_RGB(0x00, 0x00, 0xff) );
+ palette_set_color( machine(), 2, MAKE_RGB(0x00, 0xff, 0x00) );
+ palette_set_color( machine(), 3, MAKE_RGB(0xff, 0x7f, 0x00) );
+ palette_set_color( machine(), 4, MAKE_RGB(0xff, 0x00, 0x00) );
+ palette_set_color( machine(), 5, MAKE_RGB(0xff, 0xff, 0x00) );
+ palette_set_color( machine(), 6, MAKE_RGB(0xff, 0xff, 0xff) );
+ palette_set_color( machine(), 7, MAKE_RGB(0x7f, 0x3f, 0x1f) );
/* tiles */
- palette_set_color( machine, 8, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine, 9, MAKE_RGB(0xff, 0xff, 0xff) );
- palette_set_color( machine, 10, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine, 11, MAKE_RGB(0x00, 0x00, 0xff) );
- palette_set_color( machine, 12, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine, 13, MAKE_RGB(0x00, 0xff, 0x00) );
- palette_set_color( machine, 14, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine, 15, MAKE_RGB(0xff, 0x00, 0x00) );
+ palette_set_color( machine(), 8, MAKE_RGB(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 9, MAKE_RGB(0xff, 0xff, 0xff) );
+ palette_set_color( machine(), 10, MAKE_RGB(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 11, MAKE_RGB(0x00, 0x00, 0xff) );
+ palette_set_color( machine(), 12, MAKE_RGB(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 13, MAKE_RGB(0x00, 0xff, 0x00) );
+ palette_set_color( machine(), 14, MAKE_RGB(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 15, MAKE_RGB(0xff, 0x00, 0x00) );
}
static ADDRESS_MAP_START( acefruit_map, AS_PROGRAM, 8, acefruit_state )
@@ -597,8 +598,6 @@ static MACHINE_CONFIG_START( acefruit, acefruit_state )
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_PALETTE_INIT(acefruit)
- MCFG_VIDEO_START(acefruit)
/* sound hardware */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/aces1.c b/src/mame/drivers/aces1.c
index ac3130184ba..93f3441196c 100644
--- a/src/mame/drivers/aces1.c
+++ b/src/mame/drivers/aces1.c
@@ -144,6 +144,8 @@ public:
required_device<cpu_device> m_maincpu;
DECLARE_DRIVER_INIT(aces1);
+ virtual void machine_start();
+ virtual void machine_reset();
};
@@ -174,16 +176,15 @@ static void aces1_create_timers(running_machine &machine)
state->m_aces1_nmi_timer = machine.scheduler().timer_alloc(FUNC(m_aces1_nmi_timer_callback), 0);
}
-static MACHINE_START( aces1 )
+void aces1_state::machine_start()
{
- aces1_create_timers(machine);
+ aces1_create_timers(machine());
}
-static MACHINE_RESET( aces1 )
+void aces1_state::machine_reset()
{
- aces1_state *state = machine.driver_data<aces1_state>();
- state->aces1_reset_nmi_timer();
- state->aces1_reset_irq_timer();
+ aces1_reset_nmi_timer();
+ aces1_reset_irq_timer();
}
static ADDRESS_MAP_START( aces1_map, AS_PROGRAM, 8, aces1_state )
@@ -315,8 +316,6 @@ static MACHINE_CONFIG_START( aces1, aces1_state )
MCFG_I8255A_ADD( "ppi8255_ic25", ppi8255_ic25_intf )
MCFG_I8255A_ADD( "ppi8255_ic37", ppi8255_ic37_intf )
- MCFG_MACHINE_START( aces1 )
- MCFG_MACHINE_RESET( aces1 )
MCFG_DEFAULT_LAYOUT(layout_aces1)
/* sound hardware */
diff --git a/src/mame/drivers/acommand.c b/src/mame/drivers/acommand.c
index 1894ebbd7e2..610644229c3 100644
--- a/src/mame/drivers/acommand.c
+++ b/src/mame/drivers/acommand.c
@@ -91,6 +91,7 @@ public:
TILEMAP_MAPPER_MEMBER(bg_scan);
TILE_GET_INFO_MEMBER(ac_get_bg_tile_info);
TILE_GET_INFO_MEMBER(ac_get_tx_tile_info);
+ virtual void video_start();
};
@@ -180,15 +181,14 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r
}
-static VIDEO_START( acommand )
+void acommand_state::video_start()
{
- acommand_state *state = machine.driver_data<acommand_state>();
- state->m_tx_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(acommand_state::ac_get_tx_tile_info),state),TILEMAP_SCAN_COLS,8,8,512,32);
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(acommand_state::ac_get_bg_tile_info),state),tilemap_mapper_delegate(FUNC(acommand_state::bg_scan),state),16,16,256,16);
+ m_tx_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(acommand_state::ac_get_tx_tile_info),this),TILEMAP_SCAN_COLS,8,8,512,32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(acommand_state::ac_get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(acommand_state::bg_scan),this),16,16,256,16);
- state->m_ac_vregs = auto_alloc_array(machine, UINT16, 0x80/2);
+ m_ac_vregs = auto_alloc_array(machine(), UINT16, 0x80/2);
- state->m_tx_tilemap->set_transparent_pen(15);
+ m_tx_tilemap->set_transparent_pen(15);
}
@@ -614,7 +614,6 @@ static MACHINE_CONFIG_START( acommand, acommand_state )
MCFG_GFXDECODE(acommand)
MCFG_PALETTE_LENGTH(0x4000)
- MCFG_VIDEO_START(acommand)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c
index 10f56fc6118..8abb946a694 100644
--- a/src/mame/drivers/actfancr.c
+++ b/src/mame/drivers/actfancr.c
@@ -289,35 +289,31 @@ static const ym3812_interface ym3812_config =
/******************************************************************************/
-static MACHINE_START( actfancr )
+MACHINE_START_MEMBER(actfancr_state,actfancr)
{
- actfancr_state *state = machine.driver_data<actfancr_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
}
-static MACHINE_START( triothep )
+MACHINE_START_MEMBER(actfancr_state,triothep)
{
- actfancr_state *state = machine.driver_data<actfancr_state>();
- MACHINE_START_CALL(actfancr);
+ MACHINE_START_CALL_MEMBER(actfancr);
- state->save_item(NAME(state->m_trio_control_select));
+ save_item(NAME(m_trio_control_select));
}
-static MACHINE_RESET( actfancr )
+MACHINE_RESET_MEMBER(actfancr_state,actfancr)
{
- actfancr_state *state = machine.driver_data<actfancr_state>();
- state->m_flipscreen = 0;
+ m_flipscreen = 0;
}
-static MACHINE_RESET( triothep )
+MACHINE_RESET_MEMBER(actfancr_state,triothep)
{
- actfancr_state *state = machine.driver_data<actfancr_state>();
- MACHINE_RESET_CALL(actfancr);
- state->m_trio_control_select = 0;
+ MACHINE_RESET_CALL_MEMBER(actfancr);
+ m_trio_control_select = 0;
}
/******************************************************************************/
@@ -332,8 +328,8 @@ static MACHINE_CONFIG_START( actfancr, actfancr_state )
MCFG_CPU_ADD("audiocpu",M6502, 1500000) /* Should be accurate */
MCFG_CPU_PROGRAM_MAP(dec0_s_map)
- MCFG_MACHINE_START(actfancr)
- MCFG_MACHINE_RESET(actfancr)
+ MCFG_MACHINE_START_OVERRIDE(actfancr_state,actfancr)
+ MCFG_MACHINE_RESET_OVERRIDE(actfancr_state,actfancr)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -354,7 +350,6 @@ static MACHINE_CONFIG_START( actfancr, actfancr_state )
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
deco_mxc06_device::set_gfx_region(*device, 1);
- MCFG_VIDEO_START(actfancr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -383,8 +378,8 @@ static MACHINE_CONFIG_START( triothep, actfancr_state )
MCFG_CPU_ADD("audiocpu",M6502, XTAL_12MHz/8) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(dec0_s_map)
- MCFG_MACHINE_START(triothep)
- MCFG_MACHINE_RESET(triothep)
+ MCFG_MACHINE_START_OVERRIDE(actfancr_state,triothep)
+ MCFG_MACHINE_RESET_OVERRIDE(actfancr_state,triothep)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -405,7 +400,6 @@ static MACHINE_CONFIG_START( triothep, actfancr_state )
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
deco_mxc06_device::set_gfx_region(*device, 1);
- MCFG_VIDEO_START(actfancr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c
index e68a9ca6f13..5fa12f6cbf9 100644
--- a/src/mame/drivers/adp.c
+++ b/src/mame/drivers/adp.c
@@ -180,6 +180,9 @@ public:
DECLARE_WRITE8_MEMBER(ramdac_io_w);
DECLARE_READ8_MEMBER(h63484_rom_r);
DECLARE_READ8_MEMBER(t2_r);
+ DECLARE_MACHINE_START(skattv);
+ DECLARE_MACHINE_RESET(skattv);
+ DECLARE_PALETTE_INIT(adp);
};
@@ -297,16 +300,15 @@ static const microtouch_interface adb_microtouch_config =
NULL
};
-static MACHINE_START( skattv )
+MACHINE_START_MEMBER(adp_state,skattv)
{
- adp_state *state = machine.driver_data<adp_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_duart = machine.device("duart68681");
- //state->m_h63484 = machine.device("h63484");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_duart = machine().device("duart68681");
+ //m_h63484 = machine().device("h63484");
- state->save_item(NAME(state->m_mux_data));
- state->save_item(NAME(state->m_register_active));
+ save_item(NAME(m_mux_data));
+ save_item(NAME(m_register_active));
#if 0
/*
@@ -320,10 +322,10 @@ static MACHINE_START( skattv )
// hack to handle acrt rom
{
- UINT16 *rom = (UINT16*)state->memregion("gfx1")->base();
+ UINT16 *rom = (UINT16*)memregion("gfx1")->base();
int i;
- device_t *hd63484 = machine.device("hd63484");
+ device_t *hd63484 = machine().device("hd63484");
for(i = 0; i < 0x40000/2; ++i)
{
@@ -336,12 +338,11 @@ static MACHINE_START( skattv )
#endif
}
-static MACHINE_RESET( skattv )
+MACHINE_RESET_MEMBER(adp_state,skattv)
{
- adp_state *state = machine.driver_data<adp_state>();
- state->m_mux_data = 0;
- state->m_register_active = 0;
+ m_mux_data = 0;
+ m_register_active = 0;
}
static const duart68681_config skattv_duart68681_config =
@@ -352,11 +353,11 @@ static const duart68681_config skattv_duart68681_config =
NULL
};
-static PALETTE_INIT( adp )
+PALETTE_INIT_MEMBER(adp_state,adp)
{
int i;
- for (i = 0; i < machine.total_colors(); i++)
+ for (i = 0; i < machine().total_colors(); i++)
{
int bit0, bit1, bit2, r, g, b;
@@ -377,7 +378,7 @@ static PALETTE_INIT( adp )
bit2 = (i >> 2) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine, i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, MAKE_RGB(r,g,b));
}
}
@@ -665,8 +666,8 @@ static MACHINE_CONFIG_START( quickjac, adp_state )
MCFG_CPU_PROGRAM_MAP(quickjac_mem)
// MCFG_CPU_VBLANK_INT("screen", adp_int)
- MCFG_MACHINE_START(skattv)
- MCFG_MACHINE_RESET(skattv)
+ MCFG_MACHINE_START_OVERRIDE(adp_state,skattv)
+ MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv)
MCFG_DUART68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config )
MCFG_MICROTOUCH_ADD( "microtouch", adb_microtouch_config )
@@ -680,7 +681,7 @@ static MACHINE_CONFIG_START( quickjac, adp_state )
MCFG_PALETTE_LENGTH(0x10)
- MCFG_PALETTE_INIT(adp)
+ MCFG_PALETTE_INIT_OVERRIDE(adp_state,adp)
MCFG_H63484_ADD("h63484", 0, adp_h63484_intf, adp_h63484_map)
@@ -697,8 +698,8 @@ static MACHINE_CONFIG_START( skattv, adp_state )
MCFG_CPU_PROGRAM_MAP(skattv_mem)
// MCFG_CPU_VBLANK_INT("screen", adp_int)
- MCFG_MACHINE_START(skattv)
- MCFG_MACHINE_RESET(skattv)
+ MCFG_MACHINE_START_OVERRIDE(adp_state,skattv)
+ MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv)
MCFG_DUART68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config )
MCFG_MICROTOUCH_ADD( "microtouch", adb_microtouch_config )
@@ -712,7 +713,7 @@ static MACHINE_CONFIG_START( skattv, adp_state )
MCFG_PALETTE_LENGTH(0x10)
- MCFG_PALETTE_INIT(adp)
+ MCFG_PALETTE_INIT_OVERRIDE(adp_state,adp)
MCFG_H63484_ADD("h63484", 0, adp_h63484_intf, adp_h63484_map)
@@ -731,8 +732,8 @@ static MACHINE_CONFIG_START( backgamn, adp_state )
MCFG_DUART68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config )
MCFG_MICROTOUCH_ADD( "microtouch", adb_microtouch_config )
- MCFG_MACHINE_START(skattv)
- MCFG_MACHINE_RESET(skattv)
+ MCFG_MACHINE_START_OVERRIDE(adp_state,skattv)
+ MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@@ -743,7 +744,7 @@ static MACHINE_CONFIG_START( backgamn, adp_state )
MCFG_PALETTE_LENGTH(0x10)
-// MCFG_PALETTE_INIT(adp)
+// MCFG_PALETTE_INIT_OVERRIDE(adp_state,adp)
MCFG_H63484_ADD("h63484", 0, adp_h63484_intf, adp_h63484_map)
diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c
index 3e8cbe50c79..03453cfd449 100644
--- a/src/mame/drivers/aeroboto.c
+++ b/src/mame/drivers/aeroboto.c
@@ -223,30 +223,28 @@ static const ay8910_interface ay8910_config =
DEVCB_NULL
};
-static MACHINE_START( formatz )
+void aeroboto_state::machine_start()
{
- aeroboto_state *state = machine.driver_data<aeroboto_state>();
- state->m_stars_rom = state->memregion("gfx2")->base();
- state->m_stars_length = state->memregion("gfx2")->bytes();
+ m_stars_rom = memregion("gfx2")->base();
+ m_stars_length = memregion("gfx2")->bytes();
- state->save_item(NAME(state->m_disable_irq));
- state->save_item(NAME(state->m_count));
+ save_item(NAME(m_disable_irq));
+ save_item(NAME(m_count));
}
-static MACHINE_RESET( formatz )
+void aeroboto_state::machine_reset()
{
- aeroboto_state *state = machine.driver_data<aeroboto_state>();
- state->m_disable_irq = 0;
- state->m_count = 0;
+ m_disable_irq = 0;
+ m_count = 0;
- state->m_charbank = 0;
- state->m_starsoff = 0;
- state->m_ox = 0;
- state->m_oy = 0;
- state->m_sx = 0;
- state->m_sy = 0;
+ m_charbank = 0;
+ m_starsoff = 0;
+ m_ox = 0;
+ m_oy = 0;
+ m_sx = 0;
+ m_sy = 0;
}
static MACHINE_CONFIG_START( formatz, aeroboto_state )
@@ -260,8 +258,6 @@ static MACHINE_CONFIG_START( formatz, aeroboto_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_MACHINE_START(formatz)
- MCFG_MACHINE_RESET(formatz)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -276,7 +272,6 @@ static MACHINE_CONFIG_START( formatz, aeroboto_state )
MCFG_PALETTE_LENGTH(256)
MCFG_PALETTE_INIT(RRRR_GGGG_BBBB)
- MCFG_VIDEO_START(aeroboto)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c
index d04578c14d5..7bb74c18671 100644
--- a/src/mame/drivers/aerofgt.c
+++ b/src/mame/drivers/aerofgt.c
@@ -1294,34 +1294,32 @@ static const ym3812_interface ym3812_config =
};
-static MACHINE_START( common )
+MACHINE_START_MEMBER(aerofgt_state,common)
{
- aerofgt_state *state = machine.driver_data<aerofgt_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_pending_command));
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ save_item(NAME(m_pending_command));
}
-static MACHINE_START( aerofgt )
+MACHINE_START_MEMBER(aerofgt_state,aerofgt)
{
- UINT8 *rom = machine.root_device().memregion("audiocpu")->base();
+ UINT8 *rom = machine().root_device().memregion("audiocpu")->base();
- machine.root_device().membank("bank1")->configure_entries(0, 4, &rom[0x10000], 0x8000);
+ machine().root_device().membank("bank1")->configure_entries(0, 4, &rom[0x10000], 0x8000);
- MACHINE_START_CALL(common);
+ MACHINE_START_CALL_MEMBER(common);
}
-static MACHINE_RESET( common )
+MACHINE_RESET_MEMBER(aerofgt_state,common)
{
- aerofgt_state *state = machine.driver_data<aerofgt_state>();
- state->m_pending_command = 0;
+ m_pending_command = 0;
}
-static MACHINE_RESET( aerofgt )
+MACHINE_RESET_MEMBER(aerofgt_state,aerofgt)
{
- MACHINE_RESET_CALL(common);
+ MACHINE_RESET_CALL_MEMBER(common);
- machine.root_device().membank("bank1")->set_entry(0); /* needed by spinlbrk */
+ machine().root_device().membank("bank1")->set_entry(0); /* needed by spinlbrk */
}
static MACHINE_CONFIG_START( pspikes, aerofgt_state )
@@ -1336,8 +1334,8 @@ static MACHINE_CONFIG_START( pspikes, aerofgt_state )
MCFG_CPU_IO_MAP(turbofrc_sound_portmap)
/* IRQs are triggered by the YM2610 */
- MCFG_MACHINE_START(aerofgt)
- MCFG_MACHINE_RESET(aerofgt)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1350,7 +1348,7 @@ static MACHINE_CONFIG_START( pspikes, aerofgt_state )
MCFG_GFXDECODE(pspikes)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(pspikes)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1372,8 +1370,8 @@ static MACHINE_CONFIG_START( spikes91, aerofgt_state )
/* + Z80 for sound */
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1386,7 +1384,7 @@ static MACHINE_CONFIG_START( spikes91, aerofgt_state )
MCFG_GFXDECODE(spikes91)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(pspikes)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes)
/* sound hardware */
/* the sound hardware is completely different on this:
@@ -1404,8 +1402,8 @@ static MACHINE_CONFIG_START( pspikesb, aerofgt_state )
MCFG_CPU_PROGRAM_MAP(pspikesb_map)
MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1418,7 +1416,7 @@ static MACHINE_CONFIG_START( pspikesb, aerofgt_state )
MCFG_GFXDECODE(pspikesb)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(pspikes)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1434,8 +1432,8 @@ static MACHINE_CONFIG_START( pspikesc, aerofgt_state )
MCFG_CPU_PROGRAM_MAP(pspikesc_map)
MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1448,7 +1446,7 @@ static MACHINE_CONFIG_START( pspikesc, aerofgt_state )
MCFG_GFXDECODE(pspikes)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(pspikes)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1469,8 +1467,8 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state )
MCFG_CPU_IO_MAP(turbofrc_sound_portmap)
/* IRQs are triggered by the YM2610 */
- MCFG_MACHINE_START(aerofgt)
- MCFG_MACHINE_RESET(aerofgt)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1483,7 +1481,7 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state )
MCFG_GFXDECODE(turbofrc)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(karatblz)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1508,8 +1506,8 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state )
MCFG_CPU_IO_MAP(turbofrc_sound_portmap)
/* IRQs are triggered by the YM2610 */
- MCFG_MACHINE_START(aerofgt)
- MCFG_MACHINE_RESET(aerofgt)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1522,7 +1520,7 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state )
MCFG_GFXDECODE(turbofrc)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(spinlbrk)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,spinlbrk)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1547,8 +1545,8 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state )
MCFG_CPU_IO_MAP(turbofrc_sound_portmap)
/* IRQs are triggered by the YM2610 */
- MCFG_MACHINE_START(aerofgt)
- MCFG_MACHINE_RESET(aerofgt)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1561,7 +1559,7 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state )
MCFG_GFXDECODE(turbofrc)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(turbofrc)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1586,8 +1584,8 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state )
MCFG_CPU_IO_MAP(aerofgt_sound_portmap)
/* IRQs are triggered by the YM2610 */
- MCFG_MACHINE_START(aerofgt)
- MCFG_MACHINE_RESET(aerofgt)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1601,7 +1599,7 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state )
MCFG_GFXDECODE(aerofgtb)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(turbofrc)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1626,8 +1624,8 @@ static MACHINE_CONFIG_START( aerofgt, aerofgt_state )
MCFG_CPU_IO_MAP(aerofgt_sound_portmap)
/* IRQs are triggered by the YM2610 */
- MCFG_MACHINE_START(aerofgt)
- MCFG_MACHINE_RESET(aerofgt)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1641,7 +1639,7 @@ static MACHINE_CONFIG_START( aerofgt, aerofgt_state )
MCFG_GFXDECODE(aerofgt)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(turbofrc)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1664,8 +1662,8 @@ static MACHINE_CONFIG_START( aerfboot, aerofgt_state )
MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(aerfboot_sound_map)
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1679,7 +1677,7 @@ static MACHINE_CONFIG_START( aerfboot, aerofgt_state )
MCFG_GFXDECODE(aerfboot)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(turbofrc)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1695,8 +1693,8 @@ static MACHINE_CONFIG_START( aerfboo2, aerofgt_state )
MCFG_CPU_PROGRAM_MAP(aerfboo2_map)
MCFG_CPU_VBLANK_INT("screen", irq2_line_hold)
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1710,7 +1708,7 @@ static MACHINE_CONFIG_START( aerfboo2, aerofgt_state )
MCFG_GFXDECODE(aerfboo2)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(turbofrc)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1729,8 +1727,8 @@ static MACHINE_CONFIG_START( wbbc97, aerofgt_state )
MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(wbbc97_sound_map)
/* IRQs are triggered by the YM3812 */
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1743,7 +1741,7 @@ static MACHINE_CONFIG_START( wbbc97, aerofgt_state )
MCFG_GFXDECODE(wbbc97)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(wbbc97)
+ MCFG_VIDEO_START_OVERRIDE(aerofgt_state,wbbc97)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c
index 6dd11b69e95..6932b2a06ab 100644
--- a/src/mame/drivers/airbustr.c
+++ b/src/mame/drivers/airbustr.c
@@ -568,48 +568,46 @@ static INTERRUPT_GEN( slave_interrupt )
/* Machine Initialization */
-static MACHINE_START( airbustr )
+void airbustr_state::machine_start()
{
- airbustr_state *state = machine.driver_data<airbustr_state>();
- UINT8 *MASTER = state->memregion("master")->base();
- UINT8 *SLAVE = state->memregion("slave")->base();
- UINT8 *AUDIO = state->memregion("audiocpu")->base();
-
- state->membank("bank1")->configure_entries(0, 3, &MASTER[0x00000], 0x4000);
- state->membank("bank1")->configure_entries(3, 5, &MASTER[0x10000], 0x4000);
- state->membank("bank2")->configure_entries(0, 3, &SLAVE[0x00000], 0x4000);
- state->membank("bank2")->configure_entries(3, 5, &SLAVE[0x10000], 0x4000);
- state->membank("bank3")->configure_entries(0, 3, &AUDIO[0x00000], 0x4000);
- state->membank("bank3")->configure_entries(3, 5, &AUDIO[0x10000], 0x4000);
-
- state->m_master = machine.device("master");
- state->m_slave = machine.device("slave");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_pandora = machine.device("pandora");
-
- state->save_item(NAME(state->m_soundlatch_status));
- state->save_item(NAME(state->m_soundlatch2_status));
- state->save_item(NAME(state->m_bg_scrollx));
- state->save_item(NAME(state->m_bg_scrolly));
- state->save_item(NAME(state->m_fg_scrollx));
- state->save_item(NAME(state->m_fg_scrolly));
- state->save_item(NAME(state->m_highbits));
+ UINT8 *MASTER = memregion("master")->base();
+ UINT8 *SLAVE = memregion("slave")->base();
+ UINT8 *AUDIO = memregion("audiocpu")->base();
+
+ membank("bank1")->configure_entries(0, 3, &MASTER[0x00000], 0x4000);
+ membank("bank1")->configure_entries(3, 5, &MASTER[0x10000], 0x4000);
+ membank("bank2")->configure_entries(0, 3, &SLAVE[0x00000], 0x4000);
+ membank("bank2")->configure_entries(3, 5, &SLAVE[0x10000], 0x4000);
+ membank("bank3")->configure_entries(0, 3, &AUDIO[0x00000], 0x4000);
+ membank("bank3")->configure_entries(3, 5, &AUDIO[0x10000], 0x4000);
+
+ m_master = machine().device("master");
+ m_slave = machine().device("slave");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_pandora = machine().device("pandora");
+
+ save_item(NAME(m_soundlatch_status));
+ save_item(NAME(m_soundlatch2_status));
+ save_item(NAME(m_bg_scrollx));
+ save_item(NAME(m_bg_scrolly));
+ save_item(NAME(m_fg_scrollx));
+ save_item(NAME(m_fg_scrolly));
+ save_item(NAME(m_highbits));
}
-static MACHINE_RESET( airbustr )
+void airbustr_state::machine_reset()
{
- airbustr_state *state = machine.driver_data<airbustr_state>();
-
- state->m_soundlatch_status = state->m_soundlatch2_status = 0;
- state->m_bg_scrollx = 0;
- state->m_bg_scrolly = 0;
- state->m_fg_scrollx = 0;
- state->m_fg_scrolly = 0;
- state->m_highbits = 0;
-
- state->membank("bank1")->set_entry(0x02);
- state->membank("bank2")->set_entry(0x02);
- state->membank("bank3")->set_entry(0x02);
+
+ m_soundlatch_status = m_soundlatch2_status = 0;
+ m_bg_scrollx = 0;
+ m_bg_scrolly = 0;
+ m_fg_scrollx = 0;
+ m_fg_scrolly = 0;
+ m_highbits = 0;
+
+ membank("bank1")->set_entry(0x02);
+ membank("bank2")->set_entry(0x02);
+ membank("bank3")->set_entry(0x02);
}
/* Machine Driver */
@@ -641,8 +639,6 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // Palette RAM is filled by sub cpu with data supplied by main cpu
// Maybe a high value is safer in order to avoid glitches
- MCFG_MACHINE_START(airbustr)
- MCFG_MACHINE_RESET(airbustr)
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
/* video hardware */
@@ -659,7 +655,6 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
MCFG_KANEKO_PANDORA_ADD("pandora", airbustr_pandora_config)
- MCFG_VIDEO_START(airbustr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c
index 250d58a5c25..54360ba3260 100644
--- a/src/mame/drivers/ajax.c
+++ b/src/mame/drivers/ajax.c
@@ -220,8 +220,6 @@ static MACHINE_CONFIG_START( ajax, ajax_state )
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_MACHINE_RESET(ajax)
- MCFG_MACHINE_START(ajax)
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
@@ -235,7 +233,6 @@ static MACHINE_CONFIG_START( ajax, ajax_state )
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(ajax)
MCFG_K052109_ADD("k052109", ajax_k052109_intf)
MCFG_K051960_ADD("k051960", ajax_k051960_intf)
diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c
index a7d55daeb42..e79e9c8da27 100644
--- a/src/mame/drivers/albazc.c
+++ b/src/mame/drivers/albazc.c
@@ -32,15 +32,17 @@ public:
DECLARE_WRITE8_MEMBER(hanaroku_out_1_w);
DECLARE_WRITE8_MEMBER(hanaroku_out_2_w);
DECLARE_WRITE8_MEMBER(albazc_vregs_w);
+ virtual void video_start();
+ virtual void palette_init();
};
/* video */
-static PALETTE_INIT( hanaroku )
+void albazc_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
int i;
int r, g, b;
@@ -50,12 +52,12 @@ static PALETTE_INIT( hanaroku )
g = ((color_prom[i * 2 + 1] & 0xe0) | ((color_prom[i * 2 + 0]& 0x03) <<8)) >> 5;
r = (color_prom[i * 2 + 0] & 0x7c) >> 2;
- palette_set_color_rgb(machine, i, pal5bit(r), pal5bit(g), pal5bit(b));
+ palette_set_color_rgb(machine(), i, pal5bit(r), pal5bit(g), pal5bit(b));
}
}
-static VIDEO_START( hanaroku )
+void albazc_state::video_start()
{
}
@@ -281,8 +283,6 @@ static MACHINE_CONFIG_START( hanaroku, albazc_state )
MCFG_GFXDECODE(hanaroku)
MCFG_PALETTE_LENGTH(0x200)
- MCFG_PALETTE_INIT(hanaroku)
- MCFG_VIDEO_START(hanaroku)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/albazg.c b/src/mame/drivers/albazg.c
index 20ed3544c06..8680b0a3f7f 100644
--- a/src/mame/drivers/albazg.c
+++ b/src/mame/drivers/albazg.c
@@ -73,6 +73,9 @@ public:
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_WRITE8_MEMBER(yumefuda_output_w);
TILE_GET_INFO_MEMBER(y_get_bg_tile_info);
+ virtual void machine_start();
+ virtual void machine_reset();
+ virtual void video_start();
};
TILE_GET_INFO_MEMBER(albazg_state::y_get_bg_tile_info)
@@ -88,10 +91,9 @@ TILE_GET_INFO_MEMBER(albazg_state::y_get_bg_tile_info)
}
-static VIDEO_START( yumefuda )
+void albazg_state::video_start()
{
- albazg_state *state = machine.driver_data<albazg_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(albazg_state::y_get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(albazg_state::y_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
}
static SCREEN_UPDATE_IND16( yumefuda )
@@ -354,24 +356,22 @@ INPUT_PORTS_END
/***************************************************************************************/
-static MACHINE_START( yumefuda )
+void albazg_state::machine_start()
{
- albazg_state *state = machine.driver_data<albazg_state>();
- UINT8 *ROM = state->memregion("maincpu")->base();
+ UINT8 *ROM = memregion("maincpu")->base();
- state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
+ membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
- state->save_item(NAME(state->m_mux_data));
- state->save_item(NAME(state->m_bank));
- state->save_item(NAME(state->m_prot_lock));
+ save_item(NAME(m_mux_data));
+ save_item(NAME(m_bank));
+ save_item(NAME(m_prot_lock));
}
-static MACHINE_RESET( yumefuda )
+void albazg_state::machine_reset()
{
- albazg_state *state = machine.driver_data<albazg_state>();
- state->m_mux_data = 0;
- state->m_bank = -1;
- state->m_prot_lock = 0;
+ m_mux_data = 0;
+ m_bank = -1;
+ m_prot_lock = 0;
}
static MACHINE_CONFIG_START( yumefuda, albazg_state )
@@ -382,8 +382,6 @@ static MACHINE_CONFIG_START( yumefuda, albazg_state )
MCFG_CPU_IO_MAP(port_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_MACHINE_START(yumefuda)
- MCFG_MACHINE_RESET(yumefuda)
MCFG_EEPROM_93C46_ADD("eeprom")
@@ -404,7 +402,6 @@ static MACHINE_CONFIG_START( yumefuda, albazg_state )
MCFG_GFXDECODE( yumefuda )
MCFG_PALETTE_LENGTH(0x80)
- MCFG_VIDEO_START( yumefuda )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/aleck64.c b/src/mame/drivers/aleck64.c
index 4c64c5c5fd1..66e8acab5b0 100644
--- a/src/mame/drivers/aleck64.c
+++ b/src/mame/drivers/aleck64.c
@@ -811,8 +811,6 @@ static MACHINE_CONFIG_START( aleck64, n64_state )
MCFG_CPU_CONFIG(n64_rsp_config)
MCFG_CPU_PROGRAM_MAP(rsp_map)
- MCFG_MACHINE_START( n64 )
- MCFG_MACHINE_RESET( n64 )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@@ -823,7 +821,6 @@ static MACHINE_CONFIG_START( aleck64, n64_state )
MCFG_PALETTE_LENGTH(0x1000)
- MCFG_VIDEO_START(n64)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c
index 1f89e1b978b..97472725efc 100644
--- a/src/mame/drivers/alg.c
+++ b/src/mame/drivers/alg.c
@@ -56,6 +56,9 @@ public:
DECLARE_DRIVER_INIT(palr1);
DECLARE_DRIVER_INIT(none);
DECLARE_DRIVER_INIT(palr6);
+ DECLARE_MACHINE_START(alg);
+ DECLARE_MACHINE_RESET(alg);
+ DECLARE_VIDEO_START(alg);
};
static TIMER_CALLBACK( response_timer );
@@ -91,14 +94,14 @@ static int get_lightgun_pos(screen_device &screen, int player, int *x, int *y)
*
*************************************/
-static VIDEO_START( alg )
+VIDEO_START_MEMBER(alg_state,alg)
{
/* standard video start */
- VIDEO_START_CALL(amiga);
+ VIDEO_START_CALL_MEMBER(amiga);
/* configure pen 4096 as transparent in the renderer and use it for the genlock color */
- palette_set_color(machine, 4096, MAKE_ARGB(0,0,0,0));
- amiga_set_genlock_color(machine, 4096);
+ palette_set_color(machine(), 4096, MAKE_ARGB(0,0,0,0));
+ amiga_set_genlock_color(machine(), 4096);
}
@@ -109,18 +112,17 @@ static VIDEO_START( alg )
*
*************************************/
-static MACHINE_START( alg )
+MACHINE_START_MEMBER(alg_state,alg)
{
- alg_state *state = machine.driver_data<alg_state>();
- state->m_serial_timer = machine.scheduler().timer_alloc(FUNC(response_timer));
- state->m_serial_timer_active = FALSE;
+ m_serial_timer = machine().scheduler().timer_alloc(FUNC(response_timer));
+ m_serial_timer_active = FALSE;
}
-static MACHINE_RESET( alg )
+MACHINE_RESET_MEMBER(alg_state,alg)
{
- MACHINE_RESET_CALL(amiga);
+ MACHINE_RESET_CALL_MEMBER(amiga);
}
@@ -440,8 +442,8 @@ static MACHINE_CONFIG_START( alg_r1, alg_state )
MCFG_CPU_ADD("maincpu", M68000, AMIGA_68000_NTSC_CLOCK)
MCFG_CPU_PROGRAM_MAP(main_map_r1)
- MCFG_MACHINE_START(alg)
- MCFG_MACHINE_RESET(alg)
+ MCFG_MACHINE_START_OVERRIDE(alg_state,alg)
+ MCFG_MACHINE_RESET_OVERRIDE(alg_state,alg)
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_LASERDISC_LDP1450_ADD("laserdisc")
@@ -455,9 +457,9 @@ static MACHINE_CONFIG_START( alg_r1, alg_state )
MCFG_SCREEN_VISIBLE_AREA((129-8)*2, (449+8-1)*2, 44-8, 244+8-1)
MCFG_PALETTE_LENGTH(4097)
- MCFG_PALETTE_INIT(amiga)
+ MCFG_PALETTE_INIT_OVERRIDE(alg_state,amiga)
- MCFG_VIDEO_START(alg)
+ MCFG_VIDEO_START_OVERRIDE(alg_state,alg)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c
index b796a8452c2..1cefcb3cbef 100644
--- a/src/mame/drivers/aliens.c
+++ b/src/mame/drivers/aliens.c
@@ -226,30 +226,28 @@ static const k051960_interface aliens_k051960_intf =
aliens_sprite_callback
};
-static MACHINE_START( aliens )
+void aliens_state::machine_start()
{
- aliens_state *state = machine.driver_data<aliens_state>();
- UINT8 *ROM = state->memregion("maincpu")->base();
+ UINT8 *ROM = memregion("maincpu")->base();
- state->membank("bank1")->configure_entries(0, 20, &ROM[0x10000], 0x2000);
- state->membank("bank1")->set_entry(0);
+ membank("bank1")->configure_entries(0, 20, &ROM[0x10000], 0x2000);
+ membank("bank1")->set_entry(0);
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_k007232 = machine.device("k007232");
- state->m_k052109 = machine.device("k052109");
- state->m_k051960 = machine.device("k051960");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_k007232 = machine().device("k007232");
+ m_k052109 = machine().device("k052109");
+ m_k051960 = machine().device("k051960");
- state->save_item(NAME(state->m_palette_selected));
+ save_item(NAME(m_palette_selected));
}
-static MACHINE_RESET( aliens )
+void aliens_state::machine_reset()
{
- aliens_state *state = machine.driver_data<aliens_state>();
- konami_configure_set_lines(machine.device("maincpu"), aliens_banking);
+ konami_configure_set_lines(machine().device("maincpu"), aliens_banking);
- state->m_palette_selected = 0;
+ m_palette_selected = 0;
}
static MACHINE_CONFIG_START( aliens, aliens_state )
@@ -263,8 +261,6 @@ static MACHINE_CONFIG_START( aliens, aliens_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(aliens_sound_map)
- MCFG_MACHINE_START(aliens)
- MCFG_MACHINE_RESET(aliens)
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
@@ -278,7 +274,6 @@ static MACHINE_CONFIG_START( aliens, aliens_state )
MCFG_PALETTE_LENGTH(512)
- MCFG_VIDEO_START(aliens)
MCFG_K052109_ADD("k052109", aliens_k052109_intf)
MCFG_K051960_ADD("k051960", aliens_k051960_intf)
diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c
index c9dd15f2737..b44ce979eb5 100644
--- a/src/mame/drivers/alpha68k.c
+++ b/src/mame/drivers/alpha68k.c
@@ -1863,86 +1863,80 @@ static const ym3812_interface ym3812_config =
/******************************************************************************/
-static MACHINE_START( common )
+MACHINE_START_MEMBER(alpha68k_state,common)
{
- alpha68k_state *state = machine.driver_data<alpha68k_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_trigstate));
- state->save_item(NAME(state->m_deposits1));
- state->save_item(NAME(state->m_deposits2));
- state->save_item(NAME(state->m_credits));
- state->save_item(NAME(state->m_coinvalue));
- state->save_item(NAME(state->m_microcontroller_data));
- state->save_item(NAME(state->m_latch));
- state->save_item(NAME(state->m_flipscreen));
+ save_item(NAME(m_trigstate));
+ save_item(NAME(m_deposits1));
+ save_item(NAME(m_deposits2));
+ save_item(NAME(m_credits));
+ save_item(NAME(m_coinvalue));
+ save_item(NAME(m_microcontroller_data));
+ save_item(NAME(m_latch));
+ save_item(NAME(m_flipscreen));
}
-static MACHINE_RESET( common )
+MACHINE_RESET_MEMBER(alpha68k_state,common)
{
- alpha68k_state *state = machine.driver_data<alpha68k_state>();
- state->m_trigstate = 0;
- state->m_deposits1 = 0;
- state->m_deposits2 = 0;
- state->m_credits = 0;
- state->m_coinvalue = 0;
- state->m_microcontroller_data = 0;
- state->m_latch = 0;
- state->m_flipscreen = 0;
+ m_trigstate = 0;
+ m_deposits1 = 0;
+ m_deposits2 = 0;
+ m_credits = 0;
+ m_coinvalue = 0;
+ m_microcontroller_data = 0;
+ m_latch = 0;
+ m_flipscreen = 0;
}
-static MACHINE_START( alpha68k_V )
+MACHINE_START_MEMBER(alpha68k_state,alpha68k_V)
{
- alpha68k_state *state = machine.driver_data<alpha68k_state>();
- UINT8 *ROM = state->memregion("audiocpu")->base();
+ UINT8 *ROM = memregion("audiocpu")->base();
- state->membank("bank7")->configure_entries(0, 32, &ROM[0x10000], 0x4000);
+ membank("bank7")->configure_entries(0, 32, &ROM[0x10000], 0x4000);
- MACHINE_START_CALL(common);
+ MACHINE_START_CALL_MEMBER(common);
- state->save_item(NAME(state->m_bank_base));
- state->save_item(NAME(state->m_last_bank));
+ save_item(NAME(m_bank_base));
+ save_item(NAME(m_last_bank));
}
-static MACHINE_RESET( alpha68k_V )
+MACHINE_RESET_MEMBER(alpha68k_state,alpha68k_V)
{
- alpha68k_state *state = machine.driver_data<alpha68k_state>();
- MACHINE_RESET_CALL(common);
+ MACHINE_RESET_CALL_MEMBER(common);
- state->m_bank_base = 0;
- state->m_last_bank = 0;
+ m_bank_base = 0;
+ m_last_bank = 0;
}
-static MACHINE_RESET( alpha68k_II )
+MACHINE_RESET_MEMBER(alpha68k_state,alpha68k_II)
{
- alpha68k_state *state = machine.driver_data<alpha68k_state>();
- MACHINE_RESET_CALL(common);
+ MACHINE_RESET_CALL_MEMBER(common);
- state->m_bank_base = 0;
- state->m_last_bank = 0;
- state->m_buffer_28 = 0;
- state->m_buffer_60 = 0;
- state->m_buffer_68 = 0;
+ m_bank_base = 0;
+ m_last_bank = 0;
+ m_buffer_28 = 0;
+ m_buffer_60 = 0;
+ m_buffer_68 = 0;
}
-static MACHINE_START( alpha68k_II )
+MACHINE_START_MEMBER(alpha68k_state,alpha68k_II)
{
- alpha68k_state *state = machine.driver_data<alpha68k_state>();
- UINT8 *ROM = state->memregion("audiocpu")->base();
+ UINT8 *ROM = memregion("audiocpu")->base();
- state->membank("bank7")->configure_entries(0, 28, &ROM[0x10000], 0x4000);
+ membank("bank7")->configure_entries(0, 28, &ROM[0x10000], 0x4000);
- MACHINE_START_CALL(common);
+ MACHINE_START_CALL_MEMBER(common);
- state->save_item(NAME(state->m_bank_base));
- state->save_item(NAME(state->m_last_bank));
- state->save_item(NAME(state->m_buffer_28));
- state->save_item(NAME(state->m_buffer_60));
- state->save_item(NAME(state->m_buffer_68));
+ save_item(NAME(m_bank_base));
+ save_item(NAME(m_last_bank));
+ save_item(NAME(m_buffer_28));
+ save_item(NAME(m_buffer_60));
+ save_item(NAME(m_buffer_68));
}
@@ -1975,8 +1969,8 @@ static MACHINE_CONFIG_START( sstingry, alpha68k_state )
MCFG_CPU_IO_MAP(i8748_portmap)
MCFG_DEVICE_DISABLE()
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1988,7 +1982,7 @@ static MACHINE_CONFIG_START( sstingry, alpha68k_state )
MCFG_GFXDECODE(sstingry)
MCFG_PALETTE_LENGTH(256 + 1)
- MCFG_PALETTE_INIT(kyros)
+ MCFG_PALETTE_INIT_OVERRIDE(alpha68k_state,kyros)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2020,8 +2014,8 @@ static MACHINE_CONFIG_START( kyros, alpha68k_state )
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60)
MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 4000)
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2034,7 +2028,7 @@ static MACHINE_CONFIG_START( kyros, alpha68k_state )
MCFG_GFXDECODE(kyros)
MCFG_PALETTE_LENGTH(256 + 1)
- MCFG_PALETTE_INIT(kyros)
+ MCFG_PALETTE_INIT_OVERRIDE(alpha68k_state,kyros)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2065,8 +2059,8 @@ static MACHINE_CONFIG_START( jongbou, alpha68k_state )
MCFG_CPU_IO_MAP(jongbou_sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 160*60)
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2079,7 +2073,7 @@ static MACHINE_CONFIG_START( jongbou, alpha68k_state )
MCFG_GFXDECODE(jongbou)
MCFG_PALETTE_LENGTH(256 + 1)
- MCFG_PALETTE_INIT(kyros)
+ MCFG_PALETTE_INIT_OVERRIDE(alpha68k_state,kyros)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2099,8 +2093,8 @@ static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) // 4Mhz seems to yield the correct tone
MCFG_CPU_PROGRAM_MAP(alpha68k_I_s_map)
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2113,7 +2107,7 @@ static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state )
MCFG_GFXDECODE(paddle)
MCFG_PALETTE_LENGTH(1024)
- MCFG_PALETTE_INIT(paddlem)
+ MCFG_PALETTE_INIT_OVERRIDE(alpha68k_state,paddlem)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2143,8 +2137,8 @@ static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(alpha68k_sound_nmi, 7500)
- MCFG_MACHINE_START(alpha68k_II)
- MCFG_MACHINE_RESET(alpha68k_II)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,alpha68k_II)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,alpha68k_II)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2157,7 +2151,7 @@ static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state )
MCFG_GFXDECODE(alpha68k_II)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(alpha68k)
+ MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2192,8 +2186,8 @@ static MACHINE_CONFIG_START( alpha68k_II_gm, alpha68k_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(alpha68k_sound_nmi, 7500)
- MCFG_MACHINE_START(alpha68k_II)
- MCFG_MACHINE_RESET(alpha68k_II)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,alpha68k_II)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,alpha68k_II)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2206,7 +2200,7 @@ static MACHINE_CONFIG_START( alpha68k_II_gm, alpha68k_state )
MCFG_GFXDECODE(alpha68k_II)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(alpha68k)
+ MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2235,8 +2229,8 @@ static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(alpha68k_sound_nmi, 8500)
- MCFG_MACHINE_START(alpha68k_V)
- MCFG_MACHINE_RESET(alpha68k_V)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,alpha68k_V)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,alpha68k_V)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2249,7 +2243,7 @@ static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state )
MCFG_GFXDECODE(alpha68k_V)
MCFG_PALETTE_LENGTH(4096)
- MCFG_VIDEO_START(alpha68k)
+ MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2277,8 +2271,8 @@ static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(alpha68k_sound_nmi, 8500)
- MCFG_MACHINE_START(alpha68k_V)
- MCFG_MACHINE_RESET(alpha68k_V)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,alpha68k_V)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,alpha68k_V)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2291,7 +2285,7 @@ static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state )
MCFG_GFXDECODE(alpha68k_V)
MCFG_PALETTE_LENGTH(4096)
- MCFG_VIDEO_START(alpha68k)
+ MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2318,8 +2312,8 @@ static MACHINE_CONFIG_START( tnextspc, alpha68k_state )
MCFG_CPU_PROGRAM_MAP(tnextspc_sound_map)
MCFG_CPU_IO_MAP(tnextspc_sound_portmap)
- MCFG_MACHINE_START(common)
- MCFG_MACHINE_RESET(common)
+ MCFG_MACHINE_START_OVERRIDE(alpha68k_state,common)
+ MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,common)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2332,7 +2326,7 @@ static MACHINE_CONFIG_START( tnextspc, alpha68k_state )
MCFG_GFXDECODE(tnextspc)
MCFG_PALETTE_LENGTH(1024)
- MCFG_PALETTE_INIT(paddlem)
+ MCFG_PALETTE_INIT_OVERRIDE(alpha68k_state,paddlem)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/amaticmg.c b/src/mame/drivers/amaticmg.c
index 0a33e4400eb..f20f73dfc8e 100644
--- a/src/mame/drivers/amaticmg.c
+++ b/src/mame/drivers/amaticmg.c
@@ -447,6 +447,11 @@ public:
DECLARE_DRIVER_INIT(ama8000_2_i);
DECLARE_DRIVER_INIT(ama8000_2_v);
DECLARE_DRIVER_INIT(ama8000_1_x);
+ virtual void machine_start();
+ virtual void machine_reset();
+ virtual void video_start();
+ virtual void palette_init();
+ DECLARE_PALETTE_INIT(amaticmg2);
};
@@ -454,7 +459,7 @@ public:
* Video Hardware *
************************************/
-static VIDEO_START( amaticmg )
+void amaticmg_state::video_start()
{
}
@@ -509,9 +514,9 @@ static SCREEN_UPDATE_IND16( amaticmg2 )
return 0;
}
-static PALETTE_INIT( amaticmg )
+void amaticmg_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
int bit0, bit1, bit2 , r, g, b;
int i;
@@ -530,25 +535,25 @@ static PALETTE_INIT( amaticmg )
bit2 = (color_prom[0] >> 5) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
color_prom++;
}
}
-static PALETTE_INIT( amaticmg2 )
+PALETTE_INIT_MEMBER(amaticmg_state,amaticmg2)
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
int r, g, b;
int i;
- for (i = 0; i < machine.root_device().memregion("proms")->bytes(); i+=2)
+ for (i = 0; i < machine().root_device().memregion("proms")->bytes(); i+=2)
{
b = ((color_prom[1] & 0xf8) >> 3);
g = ((color_prom[0] & 0xc0) >> 6) | ((color_prom[1] & 0x7) << 2);
r = ((color_prom[0] & 0x3e) >> 1);
- palette_set_color_rgb(machine, i >> 1, pal5bit(r), pal5bit(g), pal5bit(b));
+ palette_set_color_rgb(machine(), i >> 1, pal5bit(r), pal5bit(g), pal5bit(b));
color_prom+=2;
}
}
@@ -837,19 +842,18 @@ static I8255A_INTERFACE( ppi8255_intf_1 )
* Machine Start & Reset *
************************************/
-static MACHINE_START( amaticmg )
+void amaticmg_state::machine_start()
{
- UINT8 *rombank = machine.root_device().memregion("maincpu")->base();
+ UINT8 *rombank = machine().root_device().memregion("maincpu")->base();
- machine.root_device().membank("bank1")->configure_entries(0, 0x10, &rombank[0x8000], 0x4000);
+ machine().root_device().membank("bank1")->configure_entries(0, 0x10, &rombank[0x8000], 0x4000);
}
-static MACHINE_RESET( amaticmg )
+void amaticmg_state::machine_reset()
{
- amaticmg_state *state = machine.driver_data<amaticmg_state>();
- state->membank("bank1")->set_entry(0);
- state->m_nmi_mask = 0;
+ membank("bank1")->set_entry(0);
+ m_nmi_mask = 0;
}
@@ -883,12 +887,8 @@ static MACHINE_CONFIG_START( amaticmg, amaticmg_state )
MCFG_GFXDECODE(amaticmg)
- MCFG_PALETTE_INIT(amaticmg)
MCFG_PALETTE_LENGTH(0x200)
- MCFG_VIDEO_START(amaticmg)
- MCFG_MACHINE_START(amaticmg)
- MCFG_MACHINE_RESET(amaticmg)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -922,7 +922,7 @@ static MACHINE_CONFIG_DERIVED( amaticmg2, amaticmg )
MCFG_SCREEN_UPDATE_STATIC(amaticmg2)
MCFG_GFXDECODE(amaticmg2)
- MCFG_PALETTE_INIT(amaticmg2)
+ MCFG_PALETTE_INIT_OVERRIDE(amaticmg_state,amaticmg2)
MCFG_PALETTE_LENGTH(0x10000)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ambush.c b/src/mame/drivers/ambush.c
index 26c4b955da6..ff17cb4fc6e 100644
--- a/src/mame/drivers/ambush.c
+++ b/src/mame/drivers/ambush.c
@@ -245,7 +245,6 @@ static MACHINE_CONFIG_START( ambush, ambush_state )
MCFG_GFXDECODE(ambush)
MCFG_PALETTE_LENGTH(256)
- MCFG_PALETTE_INIT(ambush)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/ampoker2.c b/src/mame/drivers/ampoker2.c
index 1b022c260a0..3722ebcd6d0 100644
--- a/src/mame/drivers/ampoker2.c
+++ b/src/mame/drivers/ampoker2.c
@@ -1187,8 +1187,6 @@ static MACHINE_CONFIG_START( ampoker2, ampoker2_state )
MCFG_GFXDECODE(ampoker2)
MCFG_PALETTE_LENGTH(512)
- MCFG_PALETTE_INIT(ampoker2)
- MCFG_VIDEO_START(ampoker2)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1203,7 +1201,7 @@ static MACHINE_CONFIG_DERIVED( sigma2k, ampoker2 )
/* video hardware */
MCFG_GFXDECODE(sigma2k)
- MCFG_VIDEO_START(sigma2k)
+ MCFG_VIDEO_START_OVERRIDE(ampoker2_state,sigma2k)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/amspdwy.c b/src/mame/drivers/amspdwy.c
index 7337b6f82f2..a7cf7e6818e 100644
--- a/src/mame/drivers/amspdwy.c
+++ b/src/mame/drivers/amspdwy.c
@@ -250,25 +250,23 @@ static const ym2151_interface amspdwy_ym2151_interface =
DEVCB_LINE(irq_handler)
};
-static MACHINE_START( amspdwy )
+void amspdwy_state::machine_start()
{
- amspdwy_state *state = machine.driver_data<amspdwy_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_flipscreen));
- state->save_item(NAME(state->m_wheel_old));
- state->save_item(NAME(state->m_wheel_return));
+ save_item(NAME(m_flipscreen));
+ save_item(NAME(m_wheel_old));
+ save_item(NAME(m_wheel_return));
}
-static MACHINE_RESET( amspdwy )
+void amspdwy_state::machine_reset()
{
- amspdwy_state *state = machine.driver_data<amspdwy_state>();
- state->m_flipscreen = 0;
- state->m_wheel_old[0] = 0;
- state->m_wheel_old[1] = 0;
- state->m_wheel_return[0] = 0;
- state->m_wheel_return[1] = 0;
+ m_flipscreen = 0;
+ m_wheel_old[0] = 0;
+ m_wheel_old[1] = 0;
+ m_wheel_return[0] = 0;
+ m_wheel_return[1] = 0;
}
static MACHINE_CONFIG_START( amspdwy, amspdwy_state )
@@ -283,8 +281,6 @@ static MACHINE_CONFIG_START( amspdwy, amspdwy_state )
MCFG_CPU_PROGRAM_MAP(amspdwy_sound_map)
MCFG_QUANTUM_PERFECT_CPU("maincpu")
- MCFG_MACHINE_START(amspdwy)
- MCFG_MACHINE_RESET(amspdwy)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -297,7 +293,6 @@ static MACHINE_CONFIG_START( amspdwy, amspdwy_state )
MCFG_GFXDECODE(amspdwy)
MCFG_PALETTE_LENGTH(32)
- MCFG_VIDEO_START(amspdwy)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c
index 1d30f634d68..68b0f6ec85d 100644
--- a/src/mame/drivers/angelkds.c
+++ b/src/mame/drivers/angelkds.c
@@ -568,35 +568,33 @@ GFXDECODE_END
*/
-static MACHINE_START( angelkds )
+void angelkds_state::machine_start()
{
- angelkds_state *state = machine.driver_data<angelkds_state>();
- state->m_subcpu = machine.device<cpu_device>("sub");
+ m_subcpu = machine().device<cpu_device>("sub");
- state->save_item(NAME(state->m_layer_ctrl));
- state->save_item(NAME(state->m_txbank));
- state->save_item(NAME(state->m_bgbotbank));
- state->save_item(NAME(state->m_bgtopbank));
- state->save_item(NAME(state->m_sound));
- state->save_item(NAME(state->m_sound2));
+ save_item(NAME(m_layer_ctrl));
+ save_item(NAME(m_txbank));
+ save_item(NAME(m_bgbotbank));
+ save_item(NAME(m_bgtopbank));
+ save_item(NAME(m_sound));
+ save_item(NAME(m_sound2));
}
-static MACHINE_RESET( angelkds )
+void angelkds_state::machine_reset()
{
- angelkds_state *state = machine.driver_data<angelkds_state>();
int i;
for (i = 0; i < 4; i++)
{
- state->m_sound[i] = 0;
- state->m_sound2[i] = 0;
+ m_sound[i] = 0;
+ m_sound2[i] = 0;
}
- state->m_layer_ctrl = 0;
- state->m_txbank = 0;
- state->m_bgbotbank = 0;
- state->m_bgtopbank = 0;
+ m_layer_ctrl = 0;
+ m_txbank = 0;
+ m_bgbotbank = 0;
+ m_bgtopbank = 0;
}
static MACHINE_CONFIG_START( angelkds, angelkds_state )
@@ -610,8 +608,6 @@ static MACHINE_CONFIG_START( angelkds, angelkds_state )
MCFG_CPU_PROGRAM_MAP(sub_map)
MCFG_CPU_IO_MAP(sub_portmap)
- MCFG_MACHINE_START(angelkds)
- MCFG_MACHINE_RESET(angelkds)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
@@ -626,7 +622,6 @@ static MACHINE_CONFIG_START( angelkds, angelkds_state )
MCFG_GFXDECODE(angelkds)
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(angelkds)
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c
index b16a5364172..a24952b099d 100644
--- a/src/mame/drivers/appoooh.c
+++ b/src/mame/drivers/appoooh.c
@@ -410,25 +410,23 @@ static const sn76496_config psg_intf =
*
*************************************/
-static MACHINE_START( appoooh )
+void appoooh_state::machine_start()
{
- appoooh_state *state = machine.driver_data<appoooh_state>();
- state->m_adpcm = machine.device("msm");
+ m_adpcm = machine().device("msm");
- state->save_item(NAME(state->m_adpcm_data));
- state->save_item(NAME(state->m_adpcm_address));
+ save_item(NAME(m_adpcm_data));
+ save_item(NAME(m_adpcm_address));
}
-static MACHINE_RESET( appoooh )
+void appoooh_state::machine_reset()
{
- appoooh_state *state = machine.driver_data<appoooh_state>();
- state->m_adpcm_address = 0xffffffff;
- state->m_adpcm_data = 0;
- state->m_scroll_x = 0;
- state->m_priority = 0;
+ m_adpcm_address = 0xffffffff;
+ m_adpcm_data = 0;
+ m_scroll_x = 0;
+ m_priority = 0;
}
static INTERRUPT_GEN( vblank_irq )
@@ -447,8 +445,6 @@ static MACHINE_CONFIG_START( appoooh_common, appoooh_state )
MCFG_CPU_IO_MAP(main_portmap)
MCFG_CPU_VBLANK_INT("screen", vblank_irq)
- MCFG_MACHINE_START(appoooh)
- MCFG_MACHINE_RESET(appoooh)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -484,8 +480,8 @@ static MACHINE_CONFIG_DERIVED( appoooh, appoooh_common )
MCFG_GFXDECODE(appoooh)
MCFG_PALETTE_LENGTH(32*8+32*8)
- MCFG_PALETTE_INIT(appoooh)
- MCFG_VIDEO_START(appoooh)
+ MCFG_PALETTE_INIT_OVERRIDE(appoooh_state,appoooh)
+ MCFG_VIDEO_START_OVERRIDE(appoooh_state,appoooh)
MACHINE_CONFIG_END
@@ -502,8 +498,8 @@ static MACHINE_CONFIG_DERIVED( robowres, appoooh_common )
MCFG_GFXDECODE(robowres)
MCFG_PALETTE_LENGTH(32*8+32*8)
- MCFG_PALETTE_INIT(robowres)
- MCFG_VIDEO_START(appoooh)
+ MCFG_PALETTE_INIT_OVERRIDE(appoooh_state,robowres)
+ MCFG_VIDEO_START_OVERRIDE(appoooh_state,appoooh)
MACHINE_CONFIG_END
/*************************************
diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c
index 7b6aa06f537..7b222739b16 100644
--- a/src/mame/drivers/aquarium.c
+++ b/src/mame/drivers/aquarium.c
@@ -300,19 +300,17 @@ static const ym2151_interface ym2151_config =
};
-static MACHINE_START( aquarium )
+void aquarium_state::machine_start()
{
- aquarium_state *state = machine.driver_data<aquarium_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_aquarium_snd_ack));
+ save_item(NAME(m_aquarium_snd_ack));
}
-static MACHINE_RESET( aquarium )
+void aquarium_state::machine_reset()
{
- aquarium_state *state = machine.driver_data<aquarium_state>();
- state->m_aquarium_snd_ack = 0;
+ m_aquarium_snd_ack = 0;
}
static MACHINE_CONFIG_START( aquarium, aquarium_state )
@@ -326,8 +324,6 @@ static MACHINE_CONFIG_START( aquarium, aquarium_state )
MCFG_CPU_PROGRAM_MAP(snd_map)
MCFG_CPU_IO_MAP(snd_portmap)
- MCFG_MACHINE_START(aquarium)
- MCFG_MACHINE_RESET(aquarium)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -340,7 +336,6 @@ static MACHINE_CONFIG_START( aquarium, aquarium_state )
MCFG_GFXDECODE(aquarium)
MCFG_PALETTE_LENGTH(0x1000/2)
- MCFG_VIDEO_START(aquarium)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/arabian.c b/src/mame/drivers/arabian.c
index 4e5f73e99cb..5ceab530ee3 100644
--- a/src/mame/drivers/arabian.c
+++ b/src/mame/drivers/arabian.c
@@ -340,20 +340,18 @@ static const ay8910_interface ay8910_config =
*
*************************************/
-static MACHINE_START( arabian )
+void arabian_state::machine_start()
{
- arabian_state *state = machine.driver_data<arabian_state>();
- state->save_item(NAME(state->m_mcu_port_o));
- state->save_item(NAME(state->m_mcu_port_p));
- state->save_item(NAME(state->m_mcu_port_r));
+ save_item(NAME(m_mcu_port_o));
+ save_item(NAME(m_mcu_port_p));
+ save_item(NAME(m_mcu_port_r));
}
-static MACHINE_RESET( arabian )
+void arabian_state::machine_reset()
{
- arabian_state *state = machine.driver_data<arabian_state>();
- state->m_video_control = 0;
+ m_video_control = 0;
}
static MACHINE_CONFIG_START( arabian, arabian_state )
@@ -369,8 +367,6 @@ static MACHINE_CONFIG_START( arabian, arabian_state )
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
- MCFG_MACHINE_START(arabian)
- MCFG_MACHINE_RESET(arabian)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -382,8 +378,6 @@ static MACHINE_CONFIG_START( arabian, arabian_state )
MCFG_PALETTE_LENGTH(256*32)
- MCFG_PALETTE_INIT(arabian)
- MCFG_VIDEO_START(arabian)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/arcadecl.c b/src/mame/drivers/arcadecl.c
index 77a0317d940..ac026539275 100644
--- a/src/mame/drivers/arcadecl.c
+++ b/src/mame/drivers/arcadecl.c
@@ -104,19 +104,18 @@ static void scanline_update(screen_device &screen, int scanline)
*
*************************************/
-static MACHINE_START( arcadecl )
+MACHINE_START_MEMBER(arcadecl_state,arcadecl)
{
- atarigen_init(machine);
+ atarigen_init(machine());
}
-static MACHINE_RESET( arcadecl )
+MACHINE_RESET_MEMBER(arcadecl_state,arcadecl)
{
- arcadecl_state *state = machine.driver_data<arcadecl_state>();
- atarigen_eeprom_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_scanline_timer_reset(*machine.primary_screen, scanline_update, 32);
+ atarigen_eeprom_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 32);
}
@@ -331,8 +330,8 @@ static MACHINE_CONFIG_START( arcadecl, arcadecl_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
- MCFG_MACHINE_START(arcadecl)
- MCFG_MACHINE_RESET(arcadecl)
+ MCFG_MACHINE_START_OVERRIDE(arcadecl_state,arcadecl)
+ MCFG_MACHINE_RESET_OVERRIDE(arcadecl_state,arcadecl)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -346,7 +345,7 @@ static MACHINE_CONFIG_START( arcadecl, arcadecl_state )
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 456, 0+12, 336+12, 262, 0, 240)
MCFG_SCREEN_UPDATE_STATIC(arcadecl)
- MCFG_VIDEO_START(arcadecl)
+ MCFG_VIDEO_START_OVERRIDE(arcadecl_state,arcadecl)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/arcadia.c b/src/mame/drivers/arcadia.c
index deec7d946a6..46060a6b935 100644
--- a/src/mame/drivers/arcadia.c
+++ b/src/mame/drivers/arcadia.c
@@ -314,7 +314,7 @@ static MACHINE_CONFIG_START( arcadia, arcadia_amiga_state )
MCFG_CPU_ADD("maincpu", M68000, AMIGA_68000_NTSC_CLOCK)
MCFG_CPU_PROGRAM_MAP(amiga_map)
- MCFG_MACHINE_RESET(amiga)
+ MCFG_MACHINE_RESET_OVERRIDE(arcadia_amiga_state,amiga)
MCFG_NVRAM_ADD_0FILL("nvram")
/* video hardware */
@@ -328,9 +328,9 @@ static MACHINE_CONFIG_START( arcadia, arcadia_amiga_state )
MCFG_SCREEN_UPDATE_STATIC(amiga)
MCFG_PALETTE_LENGTH(4096)
- MCFG_PALETTE_INIT(amiga)
+ MCFG_PALETTE_INIT_OVERRIDE(arcadia_amiga_state,amiga)
- MCFG_VIDEO_START(amiga)
+ MCFG_VIDEO_START_OVERRIDE(arcadia_amiga_state,amiga)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c
index 811c17b687c..98bc279163f 100644
--- a/src/mame/drivers/argus.c
+++ b/src/mame/drivers/argus.c
@@ -564,8 +564,8 @@ static MACHINE_CONFIG_START( argus, argus_state )
MCFG_GFXDECODE(argus)
MCFG_PALETTE_LENGTH(896)
- MCFG_VIDEO_START(argus)
- MCFG_VIDEO_RESET(argus)
+ MCFG_VIDEO_START_OVERRIDE(argus_state,argus)
+ MCFG_VIDEO_RESET_OVERRIDE(argus_state,argus)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -608,8 +608,8 @@ static MACHINE_CONFIG_START( valtric, argus_state )
MCFG_GFXDECODE(valtric)
MCFG_PALETTE_LENGTH(768)
- MCFG_VIDEO_START(valtric)
- MCFG_VIDEO_RESET(valtric)
+ MCFG_VIDEO_START_OVERRIDE(argus_state,valtric)
+ MCFG_VIDEO_RESET_OVERRIDE(argus_state,valtric)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -652,8 +652,8 @@ static MACHINE_CONFIG_START( butasan, argus_state )
MCFG_GFXDECODE(butasan)
MCFG_PALETTE_LENGTH(768)
- MCFG_VIDEO_START(butasan)
- MCFG_VIDEO_RESET(butasan)
+ MCFG_VIDEO_START_OVERRIDE(argus_state,butasan)
+ MCFG_VIDEO_RESET_OVERRIDE(argus_state,butasan)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c
index 26f5eb2f12b..12f516c57d9 100644
--- a/src/mame/drivers/aristmk4.c
+++ b/src/mame/drivers/aristmk4.c
@@ -316,17 +316,22 @@ public:
DECLARE_READ8_MEMBER(pb1_r);
DECLARE_READ8_MEMBER(pc1_r);
DECLARE_DRIVER_INIT(aristmk4);
+ virtual void machine_start();
+ virtual void machine_reset();
+ virtual void video_start();
+ virtual void palette_init();
+ DECLARE_PALETTE_INIT(lions);
};
/* Partial Cashcade protocol */
static const UINT8 cashcade_p[] ={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0};
-static VIDEO_START(aristmk4)
+void aristmk4_state::video_start()
{
int tile;
- for (tile = 0; tile < machine.gfx[0]->elements(); tile++)
+ for (tile = 0; tile < machine().gfx[0]->elements(); tile++)
{
- machine.gfx[0]->decode(tile);
+ machine().gfx[0]->decode(tile);
}
}
@@ -1597,12 +1602,12 @@ static I8255A_INTERFACE( ppi8255_intf )
/* same as Casino Winner HW */
-static PALETTE_INIT( aristmk4 )
+void aristmk4_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
int i;
- for (i = 0;i < machine.total_colors();i++)
+ for (i = 0;i < machine().total_colors();i++)
{
int bit0,bit1,bit2,r,g,b;
@@ -1618,7 +1623,7 @@ static PALETTE_INIT( aristmk4 )
bit2 = (color_prom[0] >> 7) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
color_prom++;
}
}
@@ -1630,24 +1635,23 @@ DRIVER_INIT_MEMBER(aristmk4_state,aristmk4)
m_nvram = auto_alloc_array(machine(), UINT8, 0x1000);
}
-static MACHINE_START( aristmk4 )
+void aristmk4_state::machine_start()
{
- aristmk4_state *state = machine.driver_data<aristmk4_state>();
- state->m_samples = machine.device<samples_device>("samples");
- state_save_register_global_pointer(machine, state->m_nvram, 0x1000); // state->m_nvram
+ m_samples = machine().device<samples_device>("samples");
+ state_save_register_global_pointer(machine(), m_nvram, 0x1000); // m_nvram
}
-static MACHINE_RESET( aristmk4 )
+void aristmk4_state::machine_reset()
{
/* mark 4 has a link on the motherboard to switch between 1.5MHz and 3MHz clock speed */
- switch(machine.root_device().ioport("LK13")->read()) // CPU speed control... 3mhz or 1.5MHz
+ switch(machine().root_device().ioport("LK13")->read()) // CPU speed control... 3mhz or 1.5MHz
{
case 0x00:
- machine.device("maincpu")->set_unscaled_clock(MAIN_CLOCK/4); // 3 MHz
+ machine().device("maincpu")->set_unscaled_clock(MAIN_CLOCK/4); // 3 MHz
break;
case 0x10:
- machine.device("maincpu")->set_unscaled_clock(MAIN_CLOCK/8); // 1.5 MHz
+ machine().device("maincpu")->set_unscaled_clock(MAIN_CLOCK/8); // 1.5 MHz
break;
}
}
@@ -1682,8 +1686,6 @@ static MACHINE_CONFIG_START( aristmk4, aristmk4_state )
MCFG_CPU_PROGRAM_MAP(aristmk4_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_MACHINE_START(aristmk4)
- MCFG_MACHINE_RESET(aristmk4 )
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_TIMER_ADD_PERIODIC("power_fail", aristmk4_pf,attotime::from_hz(1)) // not real but required to simulate power failure to access robot test. How else can we do this ?
@@ -1696,9 +1698,7 @@ static MACHINE_CONFIG_START( aristmk4, aristmk4_state )
MCFG_GFXDECODE(aristmk4)
MCFG_PALETTE_LENGTH(512)
- MCFG_PALETTE_INIT(aristmk4)
- MCFG_VIDEO_START(aristmk4)
MCFG_SCREEN_UPDATE_STATIC(aristmk4)
MCFG_I8255A_ADD( "ppi8255_0", ppi8255_intf )
@@ -1731,11 +1731,11 @@ static MACHINE_CONFIG_DERIVED( aristmk4_poker, aristmk4 )
MACHINE_CONFIG_END
/* same as Aristocrat Mark-IV HW color offset 7 */
-static PALETTE_INIT( lions )
+PALETTE_INIT_MEMBER(aristmk4_state,lions)
{
int i;
- for (i = 0;i < machine.total_colors();i++)
+ for (i = 0;i < machine().total_colors();i++)
{
int bit0,bit1,r,g,b;
@@ -1749,12 +1749,12 @@ static PALETTE_INIT( lions )
bit1 = (i >> 5) & 0x01;
r = 0x4f * bit0 + 0xa8 * bit1;
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
}
}
static MACHINE_CONFIG_DERIVED( 86lions, aristmk4 )
- MCFG_PALETTE_INIT(lions)
+ MCFG_PALETTE_INIT_OVERRIDE(aristmk4_state,lions)
MACHINE_CONFIG_END
ROM_START( 3bagflvt )
diff --git a/src/mame/drivers/aristmk5.c b/src/mame/drivers/aristmk5.c
index 15970e84a25..1af554f2472 100644
--- a/src/mame/drivers/aristmk5.c
+++ b/src/mame/drivers/aristmk5.c
@@ -81,6 +81,8 @@ public:
DECLARE_READ32_MEMBER(Ns5r50);
DECLARE_WRITE32_MEMBER(sram_banksel_w);
DECLARE_DRIVER_INIT(aristmk5);
+ virtual void machine_start();
+ virtual void machine_reset();
};
@@ -370,38 +372,36 @@ DRIVER_INIT_MEMBER(aristmk5_state,aristmk5)
}
-static MACHINE_START( aristmk5 )
+void aristmk5_state::machine_start()
{
- aristmk5_state *state = machine.driver_data<aristmk5_state>();
- archimedes_init(machine);
+ archimedes_init(machine());
// reset the DAC to centerline
- //machine.device<dac_device>("dac")->write_signed8(0x80);
+ //machine().device<dac_device>("dac")->write_signed8(0x80);
- state->m_mk5_2KHz_timer = machine.scheduler().timer_alloc(FUNC(mk5_2KHz_callback));
- state->m_mk5_VSYNC_timer = machine.scheduler().timer_alloc(FUNC(mk5_VSYNC_callback));
+ m_mk5_2KHz_timer = machine().scheduler().timer_alloc(FUNC(mk5_2KHz_callback));
+ m_mk5_VSYNC_timer = machine().scheduler().timer_alloc(FUNC(mk5_VSYNC_callback));
}
-static MACHINE_RESET( aristmk5 )
+void aristmk5_state::machine_reset()
{
- aristmk5_state *state = machine.driver_data<aristmk5_state>();
- archimedes_reset(machine);
- state->m_mk5_2KHz_timer->adjust(attotime::from_hz(1953.125)); // 8MHz / 4096
- state->m_mk5_VSYNC_timer->adjust(attotime::from_hz(50000)); // default bit 1 & bit 2 == 0
+ archimedes_reset(machine());
+ m_mk5_2KHz_timer->adjust(attotime::from_hz(1953.125)); // 8MHz / 4096
+ m_mk5_VSYNC_timer->adjust(attotime::from_hz(50000)); // default bit 1 & bit 2 == 0
ioc_regs[IRQ_STATUS_B] |= 0x40; //hack, set keyboard irq empty to be ON
/* load the roms according to what the operator wants */
{
- UINT8 *ROM = state->memregion("maincpu")->base();
- UINT8 *PRG;// = state->memregion("prg_code")->base();
+ UINT8 *ROM = memregion("maincpu")->base();
+ UINT8 *PRG;// = memregion("prg_code")->base();
int i;
UINT8 op_mode;
static const char *const rom_region[] = { "set_chip_4.04", "set_chip_4.4", "clear_chip", "game_prg" };
- op_mode = machine.root_device().ioport("ROM_LOAD")->read();
+ op_mode = machine().root_device().ioport("ROM_LOAD")->read();
- PRG = machine.root_device().memregion(rom_region[op_mode & 3])->base();
+ PRG = machine().root_device().memregion(rom_region[op_mode & 3])->base();
if(PRG!=NULL)
@@ -424,8 +424,6 @@ static MACHINE_CONFIG_START( aristmk5, aristmk5_state )
MCFG_CPU_ADD("maincpu", ARM, 12000000)
MCFG_CPU_PROGRAM_MAP(aristmk5_drame_map)
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2)) /* 1.6 - 2 seconds */
- MCFG_MACHINE_START( aristmk5 )
- MCFG_MACHINE_RESET( aristmk5 )
// MCFG_I2CMEM_ADD("i2cmem",i2cmem_interface)
@@ -437,7 +435,6 @@ static MACHINE_CONFIG_START( aristmk5, aristmk5_state )
MCFG_PALETTE_LENGTH(0x200)
- MCFG_VIDEO_START(archimds_vidc)
MCFG_SCREEN_UPDATE_STATIC(archimds_vidc)
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -470,8 +467,6 @@ static MACHINE_CONFIG_START( aristmk5_usa, aristmk5_state )
MCFG_CPU_ADD("maincpu", ARM, 12000000)
MCFG_CPU_PROGRAM_MAP(aristmk5_map)
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2)) /* 1.6 - 2 seconds */
- MCFG_MACHINE_START( aristmk5 )
- MCFG_MACHINE_RESET( aristmk5 )
// MCFG_I2CMEM_ADD("i2cmem",i2cmem_interface)
diff --git a/src/mame/drivers/aristmk6.c b/src/mame/drivers/aristmk6.c
index ebf807da47a..adeccbdf856 100644
--- a/src/mame/drivers/aristmk6.c
+++ b/src/mame/drivers/aristmk6.c
@@ -17,10 +17,11 @@ public:
UINT32 m_test_x,m_test_y,m_start_offs;
UINT8 m_type;
DECLARE_READ64_MEMBER(test_r);
+ virtual void video_start();
};
-VIDEO_START(aristmk6)
+void aristmk6_state::video_start()
{
}
@@ -146,7 +147,6 @@ static MACHINE_CONFIG_START( aristmk6, aristmk6_state )
MCFG_PALETTE_LENGTH(0x1000)
- MCFG_VIDEO_START(aristmk6)
MACHINE_CONFIG_END
ROM_START( aristmk6 )
diff --git a/src/mame/drivers/arkanoid.c b/src/mame/drivers/arkanoid.c
index 7e4a7072482..773f5a06a52 100644
--- a/src/mame/drivers/arkanoid.c
+++ b/src/mame/drivers/arkanoid.c
@@ -972,49 +972,47 @@ static const ay8910_interface hexa_ay8910_config =
/* Machine Drivers */
-static MACHINE_START( arkanoid )
+MACHINE_START_MEMBER(arkanoid_state,arkanoid)
{
- arkanoid_state *state = machine.driver_data<arkanoid_state>();
- state->m_mcu = machine.device("mcu");
+ m_mcu = machine().device("mcu");
- state->save_item(NAME(state->m_bootleg_cmd));
+ save_item(NAME(m_bootleg_cmd));
- state->save_item(NAME(state->m_paddle_select));
- state->save_item(NAME(state->m_z80write));
- state->save_item(NAME(state->m_fromz80));
- state->save_item(NAME(state->m_m68705write));
- state->save_item(NAME(state->m_toz80));
+ save_item(NAME(m_paddle_select));
+ save_item(NAME(m_z80write));
+ save_item(NAME(m_fromz80));
+ save_item(NAME(m_m68705write));
+ save_item(NAME(m_toz80));
- state->save_item(NAME(state->m_port_a_in));
- state->save_item(NAME(state->m_port_a_out));
- state->save_item(NAME(state->m_ddr_a));
+ save_item(NAME(m_port_a_in));
+ save_item(NAME(m_port_a_out));
+ save_item(NAME(m_ddr_a));
- state->save_item(NAME(state->m_port_c_out));
- state->save_item(NAME(state->m_ddr_c));
+ save_item(NAME(m_port_c_out));
+ save_item(NAME(m_ddr_c));
- state->save_item(NAME(state->m_gfxbank));
- state->save_item(NAME(state->m_palettebank));
+ save_item(NAME(m_gfxbank));
+ save_item(NAME(m_palettebank));
}
-static MACHINE_RESET( arkanoid )
+MACHINE_RESET_MEMBER(arkanoid_state,arkanoid)
{
- arkanoid_state *state = machine.driver_data<arkanoid_state>();
- state->m_port_a_in = 0;
- state->m_port_a_out = 0;
- state->m_z80write = 0;
- state->m_m68705write = 0;
-
- state->m_bootleg_cmd = 0;
- state->m_paddle_select = 0;
- state->m_fromz80 = 0;
- state->m_toz80 = 0;
- state->m_ddr_a = 0;
- state->m_ddr_c = 0;
- state->m_port_c_out = 0;
- state->m_gfxbank = 0;
- state->m_palettebank = 0;
+ m_port_a_in = 0;
+ m_port_a_out = 0;
+ m_z80write = 0;
+ m_m68705write = 0;
+
+ m_bootleg_cmd = 0;
+ m_paddle_select = 0;
+ m_fromz80 = 0;
+ m_toz80 = 0;
+ m_ddr_a = 0;
+ m_ddr_c = 0;
+ m_port_c_out = 0;
+ m_gfxbank = 0;
+ m_palettebank = 0;
}
static MACHINE_CONFIG_START( arkanoid, arkanoid_state )
@@ -1029,8 +1027,8 @@ static MACHINE_CONFIG_START( arkanoid, arkanoid_state )
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per second to synchronize between the MCU and the main CPU
- MCFG_MACHINE_START(arkanoid)
- MCFG_MACHINE_RESET(arkanoid)
+ MCFG_MACHINE_START_OVERRIDE(arkanoid_state,arkanoid)
+ MCFG_MACHINE_RESET_OVERRIDE(arkanoid_state,arkanoid)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1044,7 +1042,7 @@ static MACHINE_CONFIG_START( arkanoid, arkanoid_state )
MCFG_PALETTE_LENGTH(512)
MCFG_PALETTE_INIT(RRRR_GGGG_BBBB)
- MCFG_VIDEO_START(arkanoid)
+ MCFG_VIDEO_START_OVERRIDE(arkanoid_state,arkanoid)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1062,8 +1060,8 @@ static MACHINE_CONFIG_START( hexa, arkanoid_state )
MCFG_CPU_PROGRAM_MAP(hexa_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_MACHINE_START(arkanoid)
- MCFG_MACHINE_RESET(arkanoid)
+ MCFG_MACHINE_START_OVERRIDE(arkanoid_state,arkanoid)
+ MCFG_MACHINE_RESET_OVERRIDE(arkanoid_state,arkanoid)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1077,7 +1075,7 @@ static MACHINE_CONFIG_START( hexa, arkanoid_state )
MCFG_PALETTE_LENGTH(256)
MCFG_PALETTE_INIT(RRRR_GGGG_BBBB)
- MCFG_VIDEO_START(arkanoid)
+ MCFG_VIDEO_START_OVERRIDE(arkanoid_state,arkanoid)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/armedf.c b/src/mame/drivers/armedf.c
index 7a5fdeaf905..bbc27cc8f5c 100644
--- a/src/mame/drivers/armedf.c
+++ b/src/mame/drivers/armedf.c
@@ -1147,32 +1147,30 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_START( armedf )
+MACHINE_START_MEMBER(armedf_state,armedf)
{
- armedf_state *state = machine.driver_data<armedf_state>();
-
- state->save_item(NAME(state->m_old_mcu_mode));
- state->save_item(NAME(state->m_scroll_msb));
- state->save_item(NAME(state->m_waiting_msb));
- state->save_item(NAME(state->m_vreg));
- state->save_item(NAME(state->m_fg_scrollx));
- state->save_item(NAME(state->m_fg_scrolly));
- state->save_item(NAME(state->m_bg_scrollx));
- state->save_item(NAME(state->m_bg_scrolly));
+
+ save_item(NAME(m_old_mcu_mode));
+ save_item(NAME(m_scroll_msb));
+ save_item(NAME(m_waiting_msb));
+ save_item(NAME(m_vreg));
+ save_item(NAME(m_fg_scrollx));
+ save_item(NAME(m_fg_scrolly));
+ save_item(NAME(m_bg_scrollx));
+ save_item(NAME(m_bg_scrolly));
}
-static MACHINE_RESET( armedf )
+MACHINE_RESET_MEMBER(armedf_state,armedf)
{
- armedf_state *state = machine.driver_data<armedf_state>();
-
- state->m_old_mcu_mode = 0;
- state->m_scroll_msb = 0;
- state->m_waiting_msb = 0;
- state->m_vreg = 0;
- state->m_fg_scrollx = 0;
- state->m_fg_scrolly = 0;
- state->m_bg_scrollx = 0;
- state->m_bg_scrolly = 0;
+
+ m_old_mcu_mode = 0;
+ m_scroll_msb = 0;
+ m_waiting_msb = 0;
+ m_vreg = 0;
+ m_fg_scrollx = 0;
+ m_fg_scrolly = 0;
+ m_bg_scrollx = 0;
+ m_bg_scrolly = 0;
}
@@ -1188,8 +1186,8 @@ static MACHINE_CONFIG_START( terraf, armedf_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ?
- MCFG_MACHINE_START(armedf)
- MCFG_MACHINE_RESET(armedf)
+ MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
+ MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1198,7 +1196,7 @@ static MACHINE_CONFIG_START( terraf, armedf_state )
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 )
- MCFG_VIDEO_START(terraf)
+ MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf)
MCFG_SCREEN_UPDATE_STATIC(armedf)
MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising)
@@ -1237,8 +1235,8 @@ static MACHINE_CONFIG_START( terrafb, armedf_state )
MCFG_CPU_PROGRAM_MAP(terrafb_extraz80_map)
MCFG_CPU_IO_MAP(terrafb_extraz80_portmap)
- MCFG_MACHINE_START(armedf)
- MCFG_MACHINE_RESET(armedf)
+ MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
+ MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1247,7 +1245,7 @@ static MACHINE_CONFIG_START( terrafb, armedf_state )
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 )
- MCFG_VIDEO_START(terraf)
+ MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf)
MCFG_SCREEN_UPDATE_STATIC(armedf)
MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising)
@@ -1281,8 +1279,8 @@ static MACHINE_CONFIG_START( kozure, armedf_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ?
- MCFG_MACHINE_START(armedf)
- MCFG_MACHINE_RESET(armedf)
+ MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
+ MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1291,7 +1289,7 @@ static MACHINE_CONFIG_START( kozure, armedf_state )
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 ) // 320 x 240, trusted
- MCFG_VIDEO_START(terraf)
+ MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf)
MCFG_SCREEN_UPDATE_STATIC(armedf)
MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising)
@@ -1325,8 +1323,8 @@ static MACHINE_CONFIG_START( armedf, armedf_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ?
- MCFG_MACHINE_START(armedf)
- MCFG_MACHINE_RESET(armedf)
+ MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
+ MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1335,7 +1333,7 @@ static MACHINE_CONFIG_START( armedf, armedf_state )
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 )
- MCFG_VIDEO_START(armedf)
+ MCFG_VIDEO_START_OVERRIDE(armedf_state,armedf)
MCFG_SCREEN_UPDATE_STATIC(armedf)
MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising)
@@ -1369,8 +1367,8 @@ static MACHINE_CONFIG_START( cclimbr2, armedf_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ?
- MCFG_MACHINE_START(armedf)
- MCFG_MACHINE_RESET(armedf)
+ MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
+ MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1379,7 +1377,7 @@ static MACHINE_CONFIG_START( cclimbr2, armedf_state )
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 )
- MCFG_VIDEO_START(terraf)
+ MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf)
MCFG_SCREEN_UPDATE_STATIC(armedf)
MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising)
@@ -1413,8 +1411,8 @@ static MACHINE_CONFIG_START( legion, armedf_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ?
- MCFG_MACHINE_START(armedf)
- MCFG_MACHINE_RESET(armedf)
+ MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
+ MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1423,7 +1421,7 @@ static MACHINE_CONFIG_START( legion, armedf_state )
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 )
- MCFG_VIDEO_START(terraf)
+ MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf)
MCFG_SCREEN_UPDATE_STATIC(armedf)
MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising)
@@ -1457,8 +1455,8 @@ static MACHINE_CONFIG_START( legiono, armedf_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ?
- MCFG_MACHINE_START(armedf)
- MCFG_MACHINE_RESET(armedf)
+ MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
+ MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1467,7 +1465,7 @@ static MACHINE_CONFIG_START( legiono, armedf_state )
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 )
- MCFG_VIDEO_START(terraf)
+ MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf)
MCFG_SCREEN_UPDATE_STATIC(armedf)
MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising)
@@ -1489,20 +1487,18 @@ static MACHINE_CONFIG_START( legiono, armedf_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
-static MACHINE_START( bigfghtr )
+MACHINE_START_MEMBER(bigfghtr_state,bigfghtr)
{
- bigfghtr_state *state = machine.driver_data<bigfghtr_state>();
- MACHINE_START_CALL(armedf);
- state->save_item(NAME(state->m_read_latch));
+ MACHINE_START_CALL_MEMBER(armedf);
+ save_item(NAME(m_read_latch));
}
-static MACHINE_RESET( bigfghtr )
+MACHINE_RESET_MEMBER(bigfghtr_state,bigfghtr)
{
- bigfghtr_state *state = machine.driver_data<bigfghtr_state>();
- MACHINE_RESET_CALL(armedf);
- state->m_read_latch = 0;
+ MACHINE_RESET_CALL_MEMBER(armedf);
+ m_read_latch = 0;
}
static MACHINE_CONFIG_START( bigfghtr, bigfghtr_state )
@@ -1516,8 +1512,8 @@ static MACHINE_CONFIG_START( bigfghtr, bigfghtr_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ?
- MCFG_MACHINE_START(bigfghtr)
- MCFG_MACHINE_RESET(bigfghtr)
+ MCFG_MACHINE_START_OVERRIDE(bigfghtr_state,bigfghtr)
+ MCFG_MACHINE_RESET_OVERRIDE(bigfghtr_state,bigfghtr)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1526,7 +1522,7 @@ static MACHINE_CONFIG_START( bigfghtr, bigfghtr_state )
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 )
- MCFG_VIDEO_START(armedf)
+ MCFG_VIDEO_START_OVERRIDE(armedf_state,armedf)
MCFG_SCREEN_UPDATE_STATIC(armedf)
MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising)
diff --git a/src/mame/drivers/artmagic.c b/src/mame/drivers/artmagic.c
index 7753cd3e8f7..28d80cf0871 100644
--- a/src/mame/drivers/artmagic.c
+++ b/src/mame/drivers/artmagic.c
@@ -65,25 +65,23 @@ static void m68k_gen_int(device_t *device, int state)
*
*************************************/
-static MACHINE_START( artmagic )
+void artmagic_state::machine_start()
{
- artmagic_state *state = machine.driver_data<artmagic_state>();
- state_save_register_global(machine, state->m_tms_irq);
- state_save_register_global(machine, state->m_hack_irq);
- state_save_register_global(machine, state->m_prot_input_index);
- state_save_register_global(machine, state->m_prot_output_index);
- state_save_register_global(machine, state->m_prot_output_bit);
- state_save_register_global(machine, state->m_prot_bit_index);
- state_save_register_global(machine, state->m_prot_save);
- state_save_register_global_array(machine, state->m_prot_input);
- state_save_register_global_array(machine, state->m_prot_output);
+ state_save_register_global(machine(), m_tms_irq);
+ state_save_register_global(machine(), m_hack_irq);
+ state_save_register_global(machine(), m_prot_input_index);
+ state_save_register_global(machine(), m_prot_output_index);
+ state_save_register_global(machine(), m_prot_output_bit);
+ state_save_register_global(machine(), m_prot_bit_index);
+ state_save_register_global(machine(), m_prot_save);
+ state_save_register_global_array(machine(), m_prot_input);
+ state_save_register_global_array(machine(), m_prot_output);
}
-static MACHINE_RESET( artmagic )
+void artmagic_state::machine_reset()
{
- artmagic_state *state = machine.driver_data<artmagic_state>();
- state->m_tms_irq = state->m_hack_irq = 0;
- update_irq_state(machine);
+ m_tms_irq = m_hack_irq = 0;
+ update_irq_state(machine());
}
@@ -843,15 +841,12 @@ static MACHINE_CONFIG_START( artmagic, artmagic_state )
MCFG_CPU_CONFIG(tms_config)
MCFG_CPU_PROGRAM_MAP(tms_map)
- MCFG_MACHINE_START(artmagic)
- MCFG_MACHINE_RESET(artmagic)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_NVRAM_ADD_1FILL("nvram")
/* video hardware */
MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
- MCFG_VIDEO_START(artmagic)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_40MHz/6, 428, 0, 320, 313, 0, 256)
diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c
index 1069985986b..6bed7ee151e 100644
--- a/src/mame/drivers/ashnojoe.c
+++ b/src/mame/drivers/ashnojoe.c
@@ -327,24 +327,22 @@ static const msm5205_interface msm5205_config =
};
-static MACHINE_START( ashnojoe )
+void ashnojoe_state::machine_start()
{
- ashnojoe_state *state = machine.driver_data<ashnojoe_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_adpcm_byte));
- state->save_item(NAME(state->m_soundlatch_status));
- state->save_item(NAME(state->m_msm5205_vclk_toggle));
+ save_item(NAME(m_adpcm_byte));
+ save_item(NAME(m_soundlatch_status));
+ save_item(NAME(m_msm5205_vclk_toggle));
}
-static MACHINE_RESET( ashnojoe )
+void ashnojoe_state::machine_reset()
{
- ashnojoe_state *state = machine.driver_data<ashnojoe_state>();
- state->m_adpcm_byte = 0;
- state->m_soundlatch_status = 0;
- state->m_msm5205_vclk_toggle = 0;
+ m_adpcm_byte = 0;
+ m_soundlatch_status = 0;
+ m_msm5205_vclk_toggle = 0;
}
@@ -359,8 +357,6 @@ static MACHINE_CONFIG_START( ashnojoe, ashnojoe_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_IO_MAP(sound_portmap)
- MCFG_MACHINE_START(ashnojoe)
- MCFG_MACHINE_RESET(ashnojoe)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -373,7 +369,6 @@ static MACHINE_CONFIG_START( ashnojoe, ashnojoe_state )
MCFG_GFXDECODE(ashnojoe)
MCFG_PALETTE_LENGTH(0x1000/2)
- MCFG_VIDEO_START(ashnojoe)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c
index d0ac20aa339..826e1c0fbb5 100644
--- a/src/mame/drivers/asterix.c
+++ b/src/mame/drivers/asterix.c
@@ -243,48 +243,46 @@ static const k05324x_interface asterix_k05324x_intf =
asterix_sprite_callback
};
-static MACHINE_START( asterix )
+void asterix_state::machine_start()
{
- asterix_state *state = machine.driver_data<asterix_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_k053260 = machine.device("k053260");
- state->m_k056832 = machine.device("k056832");
- state->m_k053244 = machine.device("k053244");
- state->m_k053251 = machine.device("k053251");
-
- state->save_item(NAME(state->m_cur_control2));
- state->save_item(NAME(state->m_prot));
-
- state->save_item(NAME(state->m_sprite_colorbase));
- state->save_item(NAME(state->m_spritebank));
- state->save_item(NAME(state->m_layerpri));
- state->save_item(NAME(state->m_layer_colorbase));
- state->save_item(NAME(state->m_tilebanks));
- state->save_item(NAME(state->m_spritebanks));
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_k053260 = machine().device("k053260");
+ m_k056832 = machine().device("k056832");
+ m_k053244 = machine().device("k053244");
+ m_k053251 = machine().device("k053251");
+
+ save_item(NAME(m_cur_control2));
+ save_item(NAME(m_prot));
+
+ save_item(NAME(m_sprite_colorbase));
+ save_item(NAME(m_spritebank));
+ save_item(NAME(m_layerpri));
+ save_item(NAME(m_layer_colorbase));
+ save_item(NAME(m_tilebanks));
+ save_item(NAME(m_spritebanks));
}
-static MACHINE_RESET( asterix )
+void asterix_state::machine_reset()
{
- asterix_state *state = machine.driver_data<asterix_state>();
int i;
- state->m_cur_control2 = 0;
- state->m_prot[0] = 0;
- state->m_prot[1] = 0;
+ m_cur_control2 = 0;
+ m_prot[0] = 0;
+ m_prot[1] = 0;
- state->m_sprite_colorbase = 0;
- state->m_spritebank = 0;
- state->m_layerpri[0] = 0;
- state->m_layerpri[1] = 0;
- state->m_layerpri[2] = 0;
+ m_sprite_colorbase = 0;
+ m_spritebank = 0;
+ m_layerpri[0] = 0;
+ m_layerpri[1] = 0;
+ m_layerpri[2] = 0;
for (i = 0; i < 4; i++)
{
- state->m_layer_colorbase[i] = 0;
- state->m_tilebanks[i] = 0;
- state->m_spritebanks[i] = 0;
+ m_layer_colorbase[i] = 0;
+ m_tilebanks[i] = 0;
+ m_spritebanks[i] = 0;
}
}
@@ -298,8 +296,6 @@ static MACHINE_CONFIG_START( asterix, asterix_state )
MCFG_CPU_ADD("audiocpu", Z80, 8000000)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_MACHINE_START(asterix)
- MCFG_MACHINE_RESET(asterix)
MCFG_EEPROM_ADD("eeprom", eeprom_intf)
diff --git a/src/mame/drivers/asteroid.c b/src/mame/drivers/asteroid.c
index b71d4b081d7..466dc1e137d 100644
--- a/src/mame/drivers/asteroid.c
+++ b/src/mame/drivers/asteroid.c
@@ -617,7 +617,6 @@ static MACHINE_CONFIG_START( asteroid, asteroid_state )
MCFG_CPU_PROGRAM_MAP(asteroid_map)
MCFG_CPU_PERIODIC_INT(asteroid_interrupt, (double)MASTER_CLOCK/4096/12)
- MCFG_MACHINE_RESET(asteroid)
/* video hardware */
MCFG_SCREEN_ADD("screen", VECTOR)
diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c
index 7cc5c206a38..c01646523f0 100644
--- a/src/mame/drivers/astinvad.c
+++ b/src/mame/drivers/astinvad.c
@@ -76,6 +76,11 @@ public:
DECLARE_WRITE8_MEMBER(astinvad_sound2_w);
DECLARE_DRIVER_INIT(kamikaze);
DECLARE_DRIVER_INIT(spcking2);
+ DECLARE_MACHINE_START(kamikaze);
+ DECLARE_MACHINE_RESET(kamikaze);
+ DECLARE_MACHINE_START(spaceint);
+ DECLARE_MACHINE_RESET(spaceint);
+ DECLARE_VIDEO_START(spaceint);
};
@@ -116,13 +121,12 @@ static I8255A_INTERFACE( ppi8255_1_intf )
*
*************************************/
-static VIDEO_START( spaceint )
+VIDEO_START_MEMBER(astinvad_state,spaceint)
{
- astinvad_state *state = machine.driver_data<astinvad_state>();
- state->m_colorram = auto_alloc_array(machine, UINT8, state->m_videoram.bytes());
+ m_colorram = auto_alloc_array(machine(), UINT8, m_videoram.bytes());
- state->save_item(NAME(state->m_color_latch));
- state->save_pointer(NAME(state->m_colorram), state->m_videoram.bytes());
+ save_item(NAME(m_color_latch));
+ save_pointer(NAME(m_colorram), m_videoram.bytes());
}
@@ -235,49 +239,45 @@ static TIMER_CALLBACK( kamizake_int_gen )
}
-static MACHINE_START( kamikaze )
+MACHINE_START_MEMBER(astinvad_state,kamikaze)
{
- astinvad_state *state = machine.driver_data<astinvad_state>();
- state->m_samples = machine.device<samples_device>("samples");
+ m_samples = machine().device<samples_device>("samples");
- state->m_int_timer = machine.scheduler().timer_alloc(FUNC(kamizake_int_gen));
- state->m_int_timer->adjust(machine.primary_screen->time_until_pos(128), 128);
+ m_int_timer = machine().scheduler().timer_alloc(FUNC(kamizake_int_gen));
+ m_int_timer->adjust(machine().primary_screen->time_until_pos(128), 128);
- state->save_item(NAME(state->m_screen_flip));
- state->save_item(NAME(state->m_screen_red));
- state->save_item(NAME(state->m_sound_state));
+ save_item(NAME(m_screen_flip));
+ save_item(NAME(m_screen_red));
+ save_item(NAME(m_sound_state));
}
-static MACHINE_RESET( kamikaze )
+MACHINE_RESET_MEMBER(astinvad_state,kamikaze)
{
- astinvad_state *state = machine.driver_data<astinvad_state>();
- state->m_screen_flip = 0;
- state->m_screen_red = 0;
- state->m_sound_state[0] = 0;
- state->m_sound_state[1] = 0;
+ m_screen_flip = 0;
+ m_screen_red = 0;
+ m_sound_state[0] = 0;
+ m_sound_state[1] = 0;
}
-static MACHINE_START( spaceint )
+MACHINE_START_MEMBER(astinvad_state,spaceint)
{
- astinvad_state *state = machine.driver_data<astinvad_state>();
- state->m_samples = machine.device<samples_device>("samples");
+ m_samples = machine().device<samples_device>("samples");
- state->save_item(NAME(state->m_screen_flip));
- state->save_item(NAME(state->m_sound_state));
+ save_item(NAME(m_screen_flip));
+ save_item(NAME(m_sound_state));
}
-static MACHINE_RESET( spaceint )
+MACHINE_RESET_MEMBER(astinvad_state,spaceint)
{
- astinvad_state *state = machine.driver_data<astinvad_state>();
- state->m_screen_flip = 0;
- state->m_sound_state[0] = 0;
- state->m_sound_state[1] = 0;
- state->m_color_latch = 0;
+ m_screen_flip = 0;
+ m_sound_state[0] = 0;
+ m_sound_state[1] = 0;
+ m_color_latch = 0;
}
@@ -592,8 +592,8 @@ static MACHINE_CONFIG_START( kamikaze, astinvad_state )
MCFG_CPU_PROGRAM_MAP(kamikaze_map)
MCFG_CPU_IO_MAP(kamikaze_portmap)
- MCFG_MACHINE_START(kamikaze)
- MCFG_MACHINE_RESET(kamikaze)
+ MCFG_MACHINE_START_OVERRIDE(astinvad_state,kamikaze)
+ MCFG_MACHINE_RESET_OVERRIDE(astinvad_state,kamikaze)
MCFG_I8255A_ADD( "ppi8255_0", ppi8255_0_intf )
MCFG_I8255A_ADD( "ppi8255_1", ppi8255_1_intf )
@@ -627,11 +627,11 @@ static MACHINE_CONFIG_START( spaceint, astinvad_state )
MCFG_CPU_IO_MAP(spaceint_portmap)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_MACHINE_START(spaceint)
- MCFG_MACHINE_RESET(spaceint)
+ MCFG_MACHINE_START_OVERRIDE(astinvad_state,spaceint)
+ MCFG_MACHINE_RESET_OVERRIDE(astinvad_state,spaceint)
/* video hardware */
- MCFG_VIDEO_START(spaceint)
+ MCFG_VIDEO_START_OVERRIDE(astinvad_state,spaceint)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_SIZE(32*8, 32*8)
diff --git a/src/mame/drivers/astrafr.c b/src/mame/drivers/astrafr.c
index 6fe2205c0a5..6c8a453683c 100644
--- a/src/mame/drivers/astrafr.c
+++ b/src/mame/drivers/astrafr.c
@@ -120,6 +120,10 @@ public:
DECLARE_DRIVER_INIT(astradec);
DECLARE_DRIVER_INIT(astradec_dual);
DECLARE_DRIVER_INIT(astradec_sml_dual);
+ DECLARE_MACHINE_START(astra_common);
+ DECLARE_MACHINE_START(astra_2e);
+ DECLARE_MACHINE_START(astra_37);
+ DECLARE_MACHINE_START(astra_57);
};
@@ -260,38 +264,35 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( astrafr )
INPUT_PORTS_END
-static MACHINE_START( astra_common )
+MACHINE_START_MEMBER(astrafr_state,astra_common)
{
- astrafr_state *state = machine.driver_data<astrafr_state>();
- state->m_cpuregion = (UINT32*)state->memregion( "maincpu" )->base();
- state->m_cpuregion_size = state->memregion( "maincpu" )->bytes()/4;
- state->m_mainram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000);
+ m_cpuregion = (UINT32*)memregion( "maincpu" )->base();
+ m_cpuregion_size = memregion( "maincpu" )->bytes()/4;
+ m_mainram = (UINT32*)auto_alloc_array_clear(machine(), UINT32, 0x10000);
- state->m_slavecpuregion = (UINT32*)state->memregion( "slavecpu" )->base();
- state->m_slavecpuregion_size = state->memregion( "slavecpu" )->bytes()/4;
- state->m_slaveram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000);
+ m_slavecpuregion = (UINT32*)memregion( "slavecpu" )->base();
+ m_slavecpuregion_size = memregion( "slavecpu" )->bytes()/4;
+ m_slaveram = (UINT32*)auto_alloc_array_clear(machine(), UINT32, 0x10000);
}
/* the FPGA area read/write addresses move around ... */
-static MACHINE_START( astra_37 )
+MACHINE_START_MEMBER(astrafr_state,astra_37)
{
- astrafr_state *state = machine.driver_data<astrafr_state>();
- state->fgpa_after_rom_write_addr = 0x30;
- state->fgpa_first_read_addr = 0x33;
- state->fgpa_rom_write_addr = 0x37;
- MACHINE_START_CALL(astra_common);
+ fgpa_after_rom_write_addr = 0x30;
+ fgpa_first_read_addr = 0x33;
+ fgpa_rom_write_addr = 0x37;
+ MACHINE_START_CALL_MEMBER(astra_common);
}
-static MACHINE_START( astra_2e )
+MACHINE_START_MEMBER(astrafr_state,astra_2e)
{
- astrafr_state *state = machine.driver_data<astrafr_state>();
- state->fgpa_after_rom_write_addr = 0x20;
- state->fgpa_first_read_addr = 0x23;
- state->fgpa_rom_write_addr = 0x2e;
- MACHINE_START_CALL(astra_common);
+ fgpa_after_rom_write_addr = 0x20;
+ fgpa_first_read_addr = 0x23;
+ fgpa_rom_write_addr = 0x2e;
+ MACHINE_START_CALL_MEMBER(astra_common);
}
@@ -302,15 +303,15 @@ static MACHINE_CONFIG_START( astrafr_dual, astrafr_state )
MCFG_CPU_ADD("slavecpu", M68340, 16000000)
MCFG_CPU_PROGRAM_MAP(astrafr_slave_map)
- MCFG_MACHINE_START( astra_common )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_common )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( astrafr_dual_2e, astrafr_dual )
- MCFG_MACHINE_START( astra_2e )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_2e )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( astrafr_dual_37, astrafr_dual )
- MCFG_MACHINE_START( astra_37 )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_37 )
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( astrafr_dual_alt, astrafr_state )
@@ -322,7 +323,7 @@ static MACHINE_CONFIG_START( astrafr_dual_alt, astrafr_state )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( astrafr_dual_alt_37, astrafr_dual_alt )
- MCFG_MACHINE_START( astra_37 )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_37 )
MACHINE_CONFIG_END
@@ -330,39 +331,38 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_START( astra_single, astrafr_state )
MCFG_CPU_ADD("maincpu", M68340, 16000000)
MCFG_CPU_PROGRAM_MAP(astra_map)
- MCFG_MACHINE_START( astra_common )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_common )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( astra_single_37, astra_single )
- MCFG_MACHINE_START( astra_37 )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_37 )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( astra_single_2e, astra_single )
- MCFG_MACHINE_START( astra_2e )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_2e )
MACHINE_CONFIG_END
-static MACHINE_START( astra_57 )
+MACHINE_START_MEMBER(astrafr_state,astra_57)
{
- astrafr_state *state = machine.driver_data<astrafr_state>();
-// state->fgpa_after_rom_write_addr = 0x20;
-// state->fgpa_first_read_addr = 0x23;
- state->fgpa_rom_write_addr = 0x57;
- MACHINE_START_CALL(astra_common);
+// fgpa_after_rom_write_addr = 0x20;
+// fgpa_first_read_addr = 0x23;
+ fgpa_rom_write_addr = 0x57;
+ MACHINE_START_CALL_MEMBER(astra_common);
}
static MACHINE_CONFIG_START( astra_single_alt, astrafr_state )
MCFG_CPU_ADD("maincpu", M68340, 16000000)
MCFG_CPU_PROGRAM_MAP(astra_map)
- MCFG_MACHINE_START( astra_common )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_common )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( astra_single_alt_57, astra_single_alt )
- MCFG_MACHINE_START( astra_57 )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_57 )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( astra_single_alt_37, astra_single_alt )
- MCFG_MACHINE_START( astra_37 )
+ MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_37 )
MACHINE_CONFIG_END
/* are the ptM roms Master and ptS roms Slave?
diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c
index e056eb712a8..f291cc0b532 100644
--- a/src/mame/drivers/astrocde.c
+++ b/src/mame/drivers/astrocde.c
@@ -1300,8 +1300,6 @@ static MACHINE_CONFIG_START( astrocade_base, astrocde_state )
MCFG_SCREEN_DEFAULT_POSITION(1.1, 0.0, 1.18, -0.018) /* clip out borders */
MCFG_SCREEN_UPDATE_STATIC(astrocde)
- MCFG_PALETTE_INIT(astrocde)
- MCFG_VIDEO_START(astrocde)
MACHINE_CONFIG_END
@@ -1313,8 +1311,8 @@ static MACHINE_CONFIG_DERIVED( astrocade_16color_base, astrocade_base )
/* video hardware */
MCFG_PALETTE_LENGTH(4096)
- MCFG_PALETTE_INIT(profpac)
- MCFG_VIDEO_START(profpac)
+ MCFG_PALETTE_INIT_OVERRIDE(astrocde_state,profpac)
+ MCFG_VIDEO_START_OVERRIDE(astrocde_state,profpac)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_STATIC(profpac)
diff --git a/src/mame/drivers/astrocorp.c b/src/mame/drivers/astrocorp.c
index 7446a151d0f..db0bda7a4f9 100644
--- a/src/mame/drivers/astrocorp.c
+++ b/src/mame/drivers/astrocorp.c
@@ -63,21 +63,21 @@ public:
DECLARE_WRITE16_MEMBER(skilldrp_sound_bank_w);
DECLARE_DRIVER_INIT(showhanc);
DECLARE_DRIVER_INIT(showhand);
+ DECLARE_VIDEO_START(astrocorp);
};
/***************************************************************************
Video
***************************************************************************/
-static VIDEO_START( astrocorp )
+VIDEO_START_MEMBER(astrocorp_state,astrocorp)
{
- astrocorp_state *state = machine.driver_data<astrocorp_state>();
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
- state->save_item(NAME(state->m_bitmap));
- state->save_item (NAME(state->m_screen_enable));
- state->save_item (NAME(state->m_draw_sprites));
+ save_item(NAME(m_bitmap));
+ save_item (NAME(m_screen_enable));
+ save_item (NAME(m_draw_sprites));
}
/***************************************************************************
@@ -492,7 +492,7 @@ static MACHINE_CONFIG_START( showhand, astrocorp_state )
MCFG_GFXDECODE(astrocorp)
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(astrocorp)
+ MCFG_VIDEO_START_OVERRIDE(astrocorp_state,astrocorp)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -543,7 +543,7 @@ static MACHINE_CONFIG_START( skilldrp, astrocorp_state )
MCFG_GFXDECODE(astrocorp)
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(astrocorp)
+ MCFG_VIDEO_START_OVERRIDE(astrocorp_state,astrocorp)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c
index 1932d383b8b..7039cec625a 100644
--- a/src/mame/drivers/astrof.c
+++ b/src/mame/drivers/astrof.c
@@ -168,13 +168,12 @@ CUSTOM_INPUT_MEMBER(astrof_state::tomahawk_controls_r)
#define TOMAHAWK_NUM_PENS (0x20)
-static VIDEO_START( astrof )
+void astrof_state::video_start()
{
- astrof_state *state = machine.driver_data<astrof_state>();
/* allocate the color RAM -- half the size of the video RAM as A0 is not connected */
- state->m_colorram = auto_alloc_array(machine, UINT8, state->m_videoram.bytes() / 2);
- state->save_pointer(NAME(state->m_colorram), state->m_videoram.bytes() / 2);
+ m_colorram = auto_alloc_array(machine(), UINT8, m_videoram.bytes() / 2);
+ save_pointer(NAME(m_colorram), m_videoram.bytes() / 2);
}
@@ -483,73 +482,69 @@ READ8_MEMBER(astrof_state::tomahawk_protection_r)
*
*************************************/
-static MACHINE_START( astrof )
+MACHINE_START_MEMBER(astrof_state,astrof)
{
- astrof_state *state = machine.driver_data<astrof_state>();
/* the 74175 outputs all HI's if not otherwise set */
- astrof_set_video_control_2(machine, 0xff);
+ astrof_set_video_control_2(machine(), 0xff);
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_samples = machine.device<samples_device>("samples");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_samples = machine().device<samples_device>("samples");
/* register for state saving */
- state->save_item(NAME(state->m_red_on));
- state->save_item(NAME(state->m_flipscreen));
- state->save_item(NAME(state->m_screen_off));
- state->save_item(NAME(state->m_astrof_palette_bank));
- state->save_item(NAME(state->m_port_1_last));
- state->save_item(NAME(state->m_port_2_last));
- state->save_item(NAME(state->m_astrof_start_explosion));
- state->save_item(NAME(state->m_astrof_death_playing));
- state->save_item(NAME(state->m_astrof_bosskill_playing));
+ save_item(NAME(m_red_on));
+ save_item(NAME(m_flipscreen));
+ save_item(NAME(m_screen_off));
+ save_item(NAME(m_astrof_palette_bank));
+ save_item(NAME(m_port_1_last));
+ save_item(NAME(m_port_2_last));
+ save_item(NAME(m_astrof_start_explosion));
+ save_item(NAME(m_astrof_death_playing));
+ save_item(NAME(m_astrof_bosskill_playing));
}
-static MACHINE_START( abattle )
+MACHINE_START_MEMBER(astrof_state,abattle)
{
- astrof_state *state = machine.driver_data<astrof_state>();
/* register for state saving */
- state->save_item(NAME(state->m_abattle_count));
+ save_item(NAME(m_abattle_count));
- MACHINE_START_CALL(astrof);
+ MACHINE_START_CALL_MEMBER(astrof);
}
-static MACHINE_START( spfghmk2 )
+MACHINE_START_MEMBER(astrof_state,spfghmk2)
{
- astrof_state *state = machine.driver_data<astrof_state>();
/* the 74175 outputs all HI's if not otherwise set */
- spfghmk2_set_video_control_2(machine, 0xff);
+ spfghmk2_set_video_control_2(machine(), 0xff);
- state->m_maincpu = machine.device<cpu_device>("maincpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
/* the red background circuit is disabled */
- state->m_red_on = FALSE;
+ m_red_on = FALSE;
/* register for state saving */
- state->save_item(NAME(state->m_flipscreen));
- state->save_item(NAME(state->m_screen_off));
- state->save_item(NAME(state->m_astrof_palette_bank));
+ save_item(NAME(m_flipscreen));
+ save_item(NAME(m_screen_off));
+ save_item(NAME(m_astrof_palette_bank));
}
-static MACHINE_START( tomahawk )
+MACHINE_START_MEMBER(astrof_state,tomahawk)
{
- astrof_state *state = machine.driver_data<astrof_state>();
/* the 74175 outputs all HI's if not otherwise set */
- tomahawk_set_video_control_2(machine, 0xff);
+ tomahawk_set_video_control_2(machine(), 0xff);
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_sn = machine.device("snsnd");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_sn = machine().device("snsnd");
/* register for state saving */
- state->save_item(NAME(state->m_red_on));
- state->save_item(NAME(state->m_flipscreen));
- state->save_item(NAME(state->m_screen_off));
+ save_item(NAME(m_red_on));
+ save_item(NAME(m_flipscreen));
+ save_item(NAME(m_screen_off));
}
@@ -560,10 +555,9 @@ static MACHINE_START( tomahawk )
*
*************************************/
-static MACHINE_RESET( abattle )
+MACHINE_RESET_MEMBER(astrof_state,abattle)
{
- astrof_state *state = machine.driver_data<astrof_state>();
- state->m_abattle_count = 0;
+ m_abattle_count = 0;
}
@@ -952,7 +946,6 @@ static MACHINE_CONFIG_START( base, astrof_state )
MCFG_TIMER_ADD_SCANLINE("vblank", irq_callback, "screen", VBSTART, 0)
/* video hardware */
- MCFG_VIDEO_START(astrof)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
@@ -965,7 +958,7 @@ static MACHINE_CONFIG_DERIVED( astrof, base )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(astrof_map)
- MCFG_MACHINE_START(astrof)
+ MCFG_MACHINE_START_OVERRIDE(astrof_state,astrof)
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
@@ -980,8 +973,8 @@ static MACHINE_CONFIG_DERIVED( abattle, astrof )
/* basic machine hardware */
- MCFG_MACHINE_START(abattle)
- MCFG_MACHINE_RESET(abattle)
+ MCFG_MACHINE_START_OVERRIDE(astrof_state,abattle)
+ MCFG_MACHINE_RESET_OVERRIDE(astrof_state,abattle)
MACHINE_CONFIG_END
@@ -991,7 +984,7 @@ static MACHINE_CONFIG_DERIVED( spfghmk2, base )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(spfghmk2_map)
- MCFG_MACHINE_START(spfghmk2)
+ MCFG_MACHINE_START_OVERRIDE(astrof_state,spfghmk2)
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
@@ -1008,7 +1001,7 @@ static MACHINE_CONFIG_DERIVED( tomahawk, base )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(tomahawk_map)
- MCFG_MACHINE_START(tomahawk)
+ MCFG_MACHINE_START_OVERRIDE(astrof_state,tomahawk)
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c
index de793b3dd9b..e4aca9360e0 100644
--- a/src/mame/drivers/asuka.c
+++ b/src/mame/drivers/asuka.c
@@ -831,45 +831,43 @@ static const tc0110pcr_interface asuka_tc0110pcr_intf =
};
-static MACHINE_START( asuka )
+void asuka_state::machine_start()
{
- asuka_state *state = machine.driver_data<asuka_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_pc090oj = machine.device("pc090oj");
- state->m_tc0100scn = machine.device("tc0100scn");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_pc090oj = machine().device("pc090oj");
+ m_tc0100scn = machine().device("tc0100scn");
/* configure the banks */
- state->membank("bank1")->configure_entry(0, state->memregion("audiocpu")->base());
- state->membank("bank1")->configure_entries(1, 3, state->memregion("audiocpu")->base() + 0x10000, 0x04000);
-
- state->save_item(NAME(state->m_adpcm_pos));
- state->save_item(NAME(state->m_adpcm_data));
-
- state->save_item(NAME(state->m_current_round));
- state->save_item(NAME(state->m_current_bank));
- state->save_item(NAME(state->m_video_ctrl));
- state->save_item(NAME(state->m_video_mask));
- state->save_item(NAME(state->m_cc_port));
- state->save_item(NAME(state->m_restart_status));
- state->save_item(NAME(state->m_cval));
+ membank("bank1")->configure_entry(0, memregion("audiocpu")->base());
+ membank("bank1")->configure_entries(1, 3, memregion("audiocpu")->base() + 0x10000, 0x04000);
+
+ save_item(NAME(m_adpcm_pos));
+ save_item(NAME(m_adpcm_data));
+
+ save_item(NAME(m_current_round));
+ save_item(NAME(m_current_bank));
+ save_item(NAME(m_video_ctrl));
+ save_item(NAME(m_video_mask));
+ save_item(NAME(m_cc_port));
+ save_item(NAME(m_restart_status));
+ save_item(NAME(m_cval));
}
-static MACHINE_RESET( asuka )
+void asuka_state::machine_reset()
{
- asuka_state *state = machine.driver_data<asuka_state>();
- state->m_adpcm_pos = 0;
- state->m_adpcm_data = -1;
- state->m_current_round = 0;
- state->m_current_bank = 0;
- state->m_video_ctrl = 0;
- state->m_video_mask = 0;
- state->m_cc_port = 0;
- state->m_restart_status = 0;
+ m_adpcm_pos = 0;
+ m_adpcm_data = -1;
+ m_current_round = 0;
+ m_current_bank = 0;
+ m_video_ctrl = 0;
+ m_video_mask = 0;
+ m_cc_port = 0;
+ m_restart_status = 0;
- memset(state->m_cval, 0, 26);
+ memset(m_cval, 0, 26);
}
static SCREEN_VBLANK( asuka )
@@ -904,8 +902,6 @@ static MACHINE_CONFIG_START( bonzeadv, asuka_state )
MCFG_CPU_ADD("audiocpu", Z80,4000000) /* sound CPU, also required for test mode */
MCFG_CPU_PROGRAM_MAP(bonzeadv_z80_map)
- MCFG_MACHINE_START(asuka)
- MCFG_MACHINE_RESET(asuka)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
@@ -947,8 +943,6 @@ static MACHINE_CONFIG_START( asuka, asuka_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(z80_map)
- MCFG_MACHINE_START(asuka)
- MCFG_MACHINE_RESET(asuka)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
@@ -999,8 +993,6 @@ static MACHINE_CONFIG_START( cadash, asuka_state )
MCFG_CPU_PROGRAM_MAP(cadash_sub_map)
MCFG_CPU_IO_MAP(cadash_sub_io)
- MCFG_MACHINE_START(asuka)
- MCFG_MACHINE_RESET(asuka)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
@@ -1043,8 +1035,6 @@ static MACHINE_CONFIG_START( mofflott, asuka_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(z80_map)
- MCFG_MACHINE_START(asuka)
- MCFG_MACHINE_RESET(asuka)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
@@ -1091,8 +1081,6 @@ static MACHINE_CONFIG_START( galmedes, asuka_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(cadash_z80_map)
- MCFG_MACHINE_START(asuka)
- MCFG_MACHINE_RESET(asuka)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
@@ -1135,8 +1123,6 @@ static MACHINE_CONFIG_START( eto, asuka_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(cadash_z80_map)
- MCFG_MACHINE_START(asuka)
- MCFG_MACHINE_RESET(asuka)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
diff --git a/src/mame/drivers/atarifb.c b/src/mame/drivers/atarifb.c
index 0c20f665b02..b59119ce99b 100644
--- a/src/mame/drivers/atarifb.c
+++ b/src/mame/drivers/atarifb.c
@@ -117,25 +117,25 @@
*
*************************************/
-static PALETTE_INIT( atarifb )
+void atarifb_state::palette_init()
{
/* chars */
- palette_set_color(machine, 0, MAKE_RGB(0xff,0xff,0xff)); /* white */
- palette_set_color(machine, 1, MAKE_RGB(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 0, MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 1, MAKE_RGB(0x00,0x00,0x00)); /* black */
/* sprites */
- palette_set_color(machine, 2, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine, 3, MAKE_RGB(0xff,0xff,0xff)); /* white */
- palette_set_color(machine, 4, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine, 5, MAKE_RGB(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 2, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 3, MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 4, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 5, MAKE_RGB(0x00,0x00,0x00)); /* black */
/* sprite masks */
- palette_set_color(machine, 6, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine, 7, MAKE_RGB(0x80,0x80,0x80)); /* grey */
- palette_set_color(machine, 8, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine, 9, MAKE_RGB(0x00,0x00,0x00)); /* black */
- palette_set_color(machine, 10, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine, 11, MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 6, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 7, MAKE_RGB(0x80,0x80,0x80)); /* grey */
+ palette_set_color(machine(), 8, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 9, MAKE_RGB(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 10, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 11, MAKE_RGB(0xff,0xff,0xff)); /* white */
}
@@ -504,52 +504,50 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_START( atarifb )
+void atarifb_state::machine_start()
{
- atarifb_state *state = machine.driver_data<atarifb_state>();
-
- state->m_maincpu = machine.device<cpu_device>("maincpu");
-
- state->save_item(NAME(state->m_CTRLD));
- state->save_item(NAME(state->m_sign_x_1));
- state->save_item(NAME(state->m_sign_x_2));
- state->save_item(NAME(state->m_sign_x_3));
- state->save_item(NAME(state->m_sign_x_4));
- state->save_item(NAME(state->m_sign_y_1));
- state->save_item(NAME(state->m_sign_y_2));
- state->save_item(NAME(state->m_sign_y_3));
- state->save_item(NAME(state->m_sign_y_4));
- state->save_item(NAME(state->m_counter_x_in0));
- state->save_item(NAME(state->m_counter_y_in0));
- state->save_item(NAME(state->m_counter_x_in0b));
- state->save_item(NAME(state->m_counter_y_in0b));
- state->save_item(NAME(state->m_counter_x_in2));
- state->save_item(NAME(state->m_counter_y_in2));
- state->save_item(NAME(state->m_counter_x_in2b));
- state->save_item(NAME(state->m_counter_y_in2b));
+
+ m_maincpu = machine().device<cpu_device>("maincpu");
+
+ save_item(NAME(m_CTRLD));
+ save_item(NAME(m_sign_x_1));
+ save_item(NAME(m_sign_x_2));
+ save_item(NAME(m_sign_x_3));
+ save_item(NAME(m_sign_x_4));
+ save_item(NAME(m_sign_y_1));
+ save_item(NAME(m_sign_y_2));
+ save_item(NAME(m_sign_y_3));
+ save_item(NAME(m_sign_y_4));
+ save_item(NAME(m_counter_x_in0));
+ save_item(NAME(m_counter_y_in0));
+ save_item(NAME(m_counter_x_in0b));
+ save_item(NAME(m_counter_y_in0b));
+ save_item(NAME(m_counter_x_in2));
+ save_item(NAME(m_counter_y_in2));
+ save_item(NAME(m_counter_x_in2b));
+ save_item(NAME(m_counter_y_in2b));
}
-static MACHINE_RESET( atarifb )
+void atarifb_state::machine_reset()
{
- atarifb_state *state = machine.driver_data<atarifb_state>();
-
- state->m_CTRLD = 0;
- state->m_sign_x_1 = 0;
- state->m_sign_y_1 = 0;
- state->m_sign_x_2 = 0;
- state->m_sign_y_2 = 0;
- state->m_sign_x_3 = 0;
- state->m_sign_y_3 = 0;
- state->m_sign_x_4 = 0;
- state->m_sign_y_4 = 0;
- state->m_counter_x_in0 = 0;
- state->m_counter_y_in0 = 0;
- state->m_counter_x_in0b = 0;
- state->m_counter_y_in0b = 0;
- state->m_counter_x_in2 = 0;
- state->m_counter_y_in2 = 0;
- state->m_counter_x_in2b = 0;
- state->m_counter_y_in2b = 0;
+
+ m_CTRLD = 0;
+ m_sign_x_1 = 0;
+ m_sign_y_1 = 0;
+ m_sign_x_2 = 0;
+ m_sign_y_2 = 0;
+ m_sign_x_3 = 0;
+ m_sign_y_3 = 0;
+ m_sign_x_4 = 0;
+ m_sign_y_4 = 0;
+ m_counter_x_in0 = 0;
+ m_counter_y_in0 = 0;
+ m_counter_x_in0b = 0;
+ m_counter_y_in0b = 0;
+ m_counter_x_in2 = 0;
+ m_counter_y_in2 = 0;
+ m_counter_x_in2b = 0;
+ m_counter_y_in2b = 0;
}
static MACHINE_CONFIG_START( atarifb, atarifb_state )
@@ -559,8 +557,6 @@ static MACHINE_CONFIG_START( atarifb, atarifb_state )
MCFG_CPU_PROGRAM_MAP(atarifb_map)
MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
- MCFG_MACHINE_START(atarifb)
- MCFG_MACHINE_RESET(atarifb)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -573,8 +569,6 @@ static MACHINE_CONFIG_START( atarifb, atarifb_state )
MCFG_GFXDECODE(atarifb)
MCFG_PALETTE_LENGTH(12)
- MCFG_PALETTE_INIT(atarifb)
- MCFG_VIDEO_START(atarifb)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/atarig1.c b/src/mame/drivers/atarig1.c
index eca5cc3d8cb..09618e0f558 100644
--- a/src/mame/drivers/atarig1.c
+++ b/src/mame/drivers/atarig1.c
@@ -40,22 +40,20 @@ static void update_interrupts(running_machine &machine)
}
-static MACHINE_START( atarig1 )
+MACHINE_START_MEMBER(atarig1_state,atarig1)
{
- atarig1_state *state = machine.driver_data<atarig1_state>();
- atarigen_init(machine);
- state->save_item(NAME(state->m_which_input));
+ atarigen_init(machine());
+ save_item(NAME(m_which_input));
}
-static MACHINE_RESET( atarig1 )
+MACHINE_RESET_MEMBER(atarig1_state,atarig1)
{
- atarig1_state *state = machine.driver_data<atarig1_state>();
- atarigen_eeprom_reset(state);
- atarigen_slapstic_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_scanline_timer_reset(*machine.primary_screen, atarig1_scanline_update, 8);
+ atarigen_eeprom_reset(this);
+ atarigen_slapstic_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_scanline_timer_reset(*machine().primary_screen, atarig1_scanline_update, 8);
atarijsa_reset();
}
@@ -453,8 +451,8 @@ static MACHINE_CONFIG_START( atarig1, atarig1_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
- MCFG_MACHINE_START(atarig1)
- MCFG_MACHINE_RESET(atarig1)
+ MCFG_MACHINE_START_OVERRIDE(atarig1_state,atarig1)
+ MCFG_MACHINE_RESET_OVERRIDE(atarig1_state,atarig1)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -468,7 +466,7 @@ static MACHINE_CONFIG_START( atarig1, atarig1_state )
MCFG_SCREEN_UPDATE_STATIC(atarig1)
MCFG_SCREEN_VBLANK_STATIC(atarig1)
- MCFG_VIDEO_START(atarig1)
+ MCFG_VIDEO_START_OVERRIDE(atarig1_state,atarig1)
/* sound hardware */
MCFG_FRAGMENT_ADD(jsa_ii_mono)
diff --git a/src/mame/drivers/atarig42.c b/src/mame/drivers/atarig42.c
index bcd249ca82d..fc2d3b16c80 100644
--- a/src/mame/drivers/atarig42.c
+++ b/src/mame/drivers/atarig42.c
@@ -39,26 +39,24 @@ static void update_interrupts(running_machine &machine)
}
-static MACHINE_START( atarig42 )
+MACHINE_START_MEMBER(atarig42_state,atarig42)
{
- atarig42_state *state = machine.driver_data<atarig42_state>();
- atarigen_init(machine);
+ atarigen_init(machine());
- state->save_item(NAME(state->m_analog_data));
- state->save_item(NAME(state->m_sloop_bank));
- state->save_item(NAME(state->m_sloop_next_bank));
- state->save_item(NAME(state->m_sloop_offset));
- state->save_item(NAME(state->m_sloop_state));
+ save_item(NAME(m_analog_data));
+ save_item(NAME(m_sloop_bank));
+ save_item(NAME(m_sloop_next_bank));
+ save_item(NAME(m_sloop_offset));
+ save_item(NAME(m_sloop_state));
}
-static MACHINE_RESET( atarig42 )
+MACHINE_RESET_MEMBER(atarig42_state,atarig42)
{
- atarig42_state *state = machine.driver_data<atarig42_state>();
- atarigen_eeprom_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_scanline_timer_reset(*machine.primary_screen, atarig42_scanline_update, 8);
+ atarigen_eeprom_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_scanline_timer_reset(*machine().primary_screen, atarig42_scanline_update, 8);
atarijsa_reset();
}
@@ -558,8 +556,8 @@ static MACHINE_CONFIG_START( atarig42, atarig42_state )
/* ASIC65 */
MCFG_FRAGMENT_ADD(asic65)
- MCFG_MACHINE_START(atarig42)
- MCFG_MACHINE_RESET(atarig42)
+ MCFG_MACHINE_START_OVERRIDE(atarig42_state,atarig42)
+ MCFG_MACHINE_RESET_OVERRIDE(atarig42_state,atarig42)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -574,7 +572,7 @@ static MACHINE_CONFIG_START( atarig42, atarig42_state )
MCFG_SCREEN_UPDATE_STATIC(atarig42)
MCFG_SCREEN_VBLANK_STATIC(atarig42)
- MCFG_VIDEO_START(atarig42)
+ MCFG_VIDEO_START_OVERRIDE(atarig42_state,atarig42)
/* sound hardware */
MCFG_FRAGMENT_ADD(jsa_iii_mono)
diff --git a/src/mame/drivers/atarigt.c b/src/mame/drivers/atarigt.c
index 2c6c3a71f0f..6855d359f83 100644
--- a/src/mame/drivers/atarigt.c
+++ b/src/mame/drivers/atarigt.c
@@ -56,19 +56,18 @@ static void update_interrupts(running_machine &machine)
}
-static MACHINE_START( atarigt )
+MACHINE_START_MEMBER(atarigt_state,atarigt)
{
- atarigen_init(machine);
+ atarigen_init(machine());
}
-static MACHINE_RESET( atarigt )
+MACHINE_RESET_MEMBER(atarigt_state,atarigt)
{
- atarigt_state *state = machine.driver_data<atarigt_state>();
- atarigen_eeprom_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_scanline_timer_reset(*machine.primary_screen, atarigt_scanline_update, 8);
+ atarigen_eeprom_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_scanline_timer_reset(*machine().primary_screen, atarigt_scanline_update, 8);
}
@@ -814,8 +813,8 @@ static MACHINE_CONFIG_START( atarigt, atarigt_state )
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
MCFG_CPU_PERIODIC_INT(atarigen_scanline_int_gen, 250)
- MCFG_MACHINE_START(atarigt)
- MCFG_MACHINE_RESET(atarigt)
+ MCFG_MACHINE_START_OVERRIDE(atarigt_state,atarigt)
+ MCFG_MACHINE_RESET_OVERRIDE(atarigt_state,atarigt)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -830,7 +829,7 @@ static MACHINE_CONFIG_START( atarigt, atarigt_state )
MCFG_SCREEN_UPDATE_STATIC(atarigt)
MCFG_SCREEN_VBLANK_STATIC(atarigt)
- MCFG_VIDEO_START(atarigt)
+ MCFG_VIDEO_START_OVERRIDE(atarigt_state,atarigt)
MCFG_ATARIRLE_ADD("rle", modesc)
diff --git a/src/mame/drivers/atarigx2.c b/src/mame/drivers/atarigx2.c
index 2d694213191..326dea91a2c 100644
--- a/src/mame/drivers/atarigx2.c
+++ b/src/mame/drivers/atarigx2.c
@@ -41,19 +41,18 @@ static void update_interrupts(running_machine &machine)
}
-static MACHINE_START( atarigx2 )
+MACHINE_START_MEMBER(atarigx2_state,atarigx2)
{
- atarigen_init(machine);
+ atarigen_init(machine());
}
-static MACHINE_RESET( atarigx2 )
+MACHINE_RESET_MEMBER(atarigx2_state,atarigx2)
{
- atarigx2_state *state = machine.driver_data<atarigx2_state>();
- atarigen_eeprom_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_scanline_timer_reset(*machine.primary_screen, atarigx2_scanline_update, 8);
+ atarigen_eeprom_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_scanline_timer_reset(*machine().primary_screen, atarigx2_scanline_update, 8);
atarijsa_reset();
}
@@ -1434,8 +1433,8 @@ static MACHINE_CONFIG_START( atarigx2, atarigx2_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
- MCFG_MACHINE_START(atarigx2)
- MCFG_MACHINE_RESET(atarigx2)
+ MCFG_MACHINE_START_OVERRIDE(atarigx2_state,atarigx2)
+ MCFG_MACHINE_RESET_OVERRIDE(atarigx2_state,atarigx2)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -1450,7 +1449,7 @@ static MACHINE_CONFIG_START( atarigx2, atarigx2_state )
MCFG_SCREEN_UPDATE_STATIC(atarigx2)
MCFG_SCREEN_VBLANK_STATIC(atarigx2)
- MCFG_VIDEO_START(atarigx2)
+ MCFG_VIDEO_START_OVERRIDE(atarigx2_state,atarigx2)
/* sound hardware */
MCFG_FRAGMENT_ADD(jsa_iiis_stereo)
diff --git a/src/mame/drivers/atarisy1.c b/src/mame/drivers/atarisy1.c
index 5c37513c45f..823ae9eef54 100644
--- a/src/mame/drivers/atarisy1.c
+++ b/src/mame/drivers/atarisy1.c
@@ -217,31 +217,29 @@ static void update_interrupts(running_machine &machine)
}
-static MACHINE_START( atarisy1 )
+MACHINE_START_MEMBER(atarisy1_state,atarisy1)
{
- atarisy1_state *state = machine.driver_data<atarisy1_state>();
- atarigen_init(machine);
+ atarigen_init(machine());
- state->save_item(NAME(state->m_joystick_int));
- state->save_item(NAME(state->m_joystick_int_enable));
- state->save_item(NAME(state->m_joystick_value));
+ save_item(NAME(m_joystick_int));
+ save_item(NAME(m_joystick_int_enable));
+ save_item(NAME(m_joystick_value));
}
-static MACHINE_RESET( atarisy1 )
+MACHINE_RESET_MEMBER(atarisy1_state,atarisy1)
{
- atarisy1_state *state = machine.driver_data<atarisy1_state>();
/* initialize the system */
- atarigen_eeprom_reset(state);
- atarigen_slapstic_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_sound_io_reset(machine.device("audiocpu"));
+ atarigen_eeprom_reset(this);
+ atarigen_slapstic_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_sound_io_reset(machine().device("audiocpu"));
/* reset the joystick parameters */
- state->m_joystick_value = 0;
- state->m_joystick_int = 0;
- state->m_joystick_int_enable = 0;
+ m_joystick_value = 0;
+ m_joystick_int = 0;
+ m_joystick_int_enable = 0;
}
@@ -769,8 +767,8 @@ static MACHINE_CONFIG_START( atarisy1, atarisy1_state )
MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_MACHINE_START(atarisy1)
- MCFG_MACHINE_RESET(atarisy1)
+ MCFG_MACHINE_START_OVERRIDE(atarisy1_state,atarisy1)
+ MCFG_MACHINE_RESET_OVERRIDE(atarisy1_state,atarisy1)
MCFG_NVRAM_ADD_1FILL("eeprom")
MCFG_TIMER_ADD("joystick_timer", delayed_joystick_int)
@@ -789,7 +787,7 @@ static MACHINE_CONFIG_START( atarisy1, atarisy1_state )
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
MCFG_SCREEN_UPDATE_STATIC(atarisy1)
- MCFG_VIDEO_START(atarisy1)
+ MCFG_VIDEO_START_OVERRIDE(atarisy1_state,atarisy1)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/atarisy2.c b/src/mame/drivers/atarisy2.c
index 6bbf86a5828..c9152a31413 100644
--- a/src/mame/drivers/atarisy2.c
+++ b/src/mame/drivers/atarisy2.c
@@ -220,37 +220,35 @@ DIRECT_UPDATE_MEMBER( atarisy2_state::atarisy2_direct_handler )
}
-static MACHINE_START( atarisy2 )
+MACHINE_START_MEMBER(atarisy2_state,atarisy2)
{
- atarisy2_state *state = machine.driver_data<atarisy2_state>();
- atarigen_init(machine);
-
- state->save_item(NAME(state->m_interrupt_enable));
- state->save_item(NAME(state->m_which_adc));
- state->save_item(NAME(state->m_p2portwr_state));
- state->save_item(NAME(state->m_p2portrd_state));
- machine.save().register_postload(save_prepost_delegate(FUNC(bankselect_postload), &machine));
- state->save_item(NAME(state->m_sound_reset_state));
+ atarigen_init(machine());
+
+ save_item(NAME(m_interrupt_enable));
+ save_item(NAME(m_which_adc));
+ save_item(NAME(m_p2portwr_state));
+ save_item(NAME(m_p2portrd_state));
+ machine().save().register_postload(save_prepost_delegate(FUNC(bankselect_postload), &machine()));
+ save_item(NAME(m_sound_reset_state));
}
-static MACHINE_RESET( atarisy2 )
+MACHINE_RESET_MEMBER(atarisy2_state,atarisy2)
{
- atarisy2_state *state = machine.driver_data<atarisy2_state>();
- atarigen_eeprom_reset(state);
+ atarigen_eeprom_reset(this);
slapstic_reset();
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_sound_io_reset(machine.device("soundcpu"));
- atarigen_scanline_timer_reset(*machine.primary_screen, scanline_update, 64);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_sound_io_reset(machine().device("soundcpu"));
+ atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 64);
- address_space *main = machine.device<t11_device>("maincpu")->space(AS_PROGRAM);
- main->set_direct_update_handler(direct_update_delegate(FUNC(atarisy2_state::atarisy2_direct_handler), state));
+ address_space *main = machine().device<t11_device>("maincpu")->space(AS_PROGRAM);
+ main->set_direct_update_handler(direct_update_delegate(FUNC(atarisy2_state::atarisy2_direct_handler), this));
- state->m_p2portwr_state = 0;
- state->m_p2portrd_state = 0;
+ m_p2portwr_state = 0;
+ m_p2portrd_state = 0;
- state->m_which_adc = 0;
+ m_which_adc = 0;
}
@@ -1270,8 +1268,8 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)MASTER_CLOCK/2/16/16/16/10)
- MCFG_MACHINE_START(atarisy2)
- MCFG_MACHINE_RESET(atarisy2)
+ MCFG_MACHINE_START_OVERRIDE(atarisy2_state,atarisy2)
+ MCFG_MACHINE_RESET_OVERRIDE(atarisy2_state,atarisy2)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -1283,7 +1281,7 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state )
MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 640, 0, 512, 416, 0, 384)
MCFG_SCREEN_UPDATE_STATIC(atarisy2)
- MCFG_VIDEO_START(atarisy2)
+ MCFG_VIDEO_START_OVERRIDE(atarisy2_state,atarisy2)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c
index a19c95d6e28..42e38aaf249 100644
--- a/src/mame/drivers/atarisy4.c
+++ b/src/mame/drivers/atarisy4.c
@@ -54,6 +54,10 @@ public:
DECLARE_READ16_MEMBER(analog_r);
DECLARE_DRIVER_INIT(airrace);
DECLARE_DRIVER_INIT(laststar);
+ virtual void machine_reset();
+ virtual void video_start();
+ virtual void video_reset();
+ DECLARE_MACHINE_RESET(airrace);
};
@@ -132,8 +136,8 @@ struct _poly_extra_data
*************************************/
-static MACHINE_RESET( atarisy4 );
-static MACHINE_RESET( airrace );
+
+
/*************************************
@@ -142,13 +146,12 @@ static MACHINE_RESET( airrace );
*
*************************************/
-static VIDEO_START( atarisy4 )
+void atarisy4_state::video_start()
{
- atarisy4_state *state = machine.driver_data<atarisy4_state>();
- state->m_poly = poly_alloc(machine, 1024, sizeof(poly_extra_data), POLYFLAG_NO_WORK_QUEUE);
+ m_poly = poly_alloc(machine(), 1024, sizeof(poly_extra_data), POLYFLAG_NO_WORK_QUEUE);
}
-static VIDEO_RESET( atarisy4 )
+void atarisy4_state::video_reset()
{
gpu.vblank_wait = 0;
}
@@ -734,8 +737,6 @@ static MACHINE_CONFIG_START( atarisy4, atarisy4_state )
MCFG_CPU_PROGRAM_MAP(dsp0_map)
MCFG_CPU_IO_MAP(dsp0_io_map)
- MCFG_VIDEO_RESET(atarisy4)
- MCFG_MACHINE_RESET(atarisy4)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(32000000/2, 660, 0, 512, 404, 0, 384)
@@ -743,7 +744,6 @@ static MACHINE_CONFIG_START( atarisy4, atarisy4_state )
MCFG_SCREEN_UPDATE_STATIC(atarisy4)
MCFG_PALETTE_LENGTH(256)
- MCFG_VIDEO_START(atarisy4)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( airrace, atarisy4 )
@@ -752,7 +752,7 @@ static MACHINE_CONFIG_DERIVED( airrace, atarisy4 )
MCFG_CPU_PROGRAM_MAP(dsp1_map)
MCFG_CPU_IO_MAP(dsp1_io_map)
- MCFG_MACHINE_RESET(airrace)
+ MCFG_MACHINE_RESET_OVERRIDE(atarisy4_state,airrace)
MACHINE_CONFIG_END
@@ -999,15 +999,15 @@ DRIVER_INIT_MEMBER(atarisy4_state,airrace)
load_ldafile(machine().device("dsp1")->memory().space(AS_PROGRAM), memregion("dsp")->base());
}
-static MACHINE_RESET( atarisy4 )
+void atarisy4_state::machine_reset()
{
- machine.device("dsp0")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("dsp0")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
-static MACHINE_RESET( airrace )
+MACHINE_RESET_MEMBER(atarisy4_state,airrace)
{
- machine.device("dsp0")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
- machine.device("dsp1")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("dsp0")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("dsp1")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
diff --git a/src/mame/drivers/ataxx.c b/src/mame/drivers/ataxx.c
index c4ff2d27f3a..5a7f8e0e750 100644
--- a/src/mame/drivers/ataxx.c
+++ b/src/mame/drivers/ataxx.c
@@ -325,8 +325,8 @@ static MACHINE_CONFIG_START( ataxx, leland_state )
MCFG_CPU_PROGRAM_MAP(leland_80186_map_program)
MCFG_CPU_IO_MAP(ataxx_80186_map_io)
- MCFG_MACHINE_START(ataxx)
- MCFG_MACHINE_RESET(ataxx)
+ MCFG_MACHINE_START_OVERRIDE(leland_state,ataxx)
+ MCFG_MACHINE_RESET_OVERRIDE(leland_state,ataxx)
MCFG_EEPROM_ADD("eeprom", eeprom_intf)
MCFG_NVRAM_ADD_0FILL("battery")
diff --git a/src/mame/drivers/atetris.c b/src/mame/drivers/atetris.c
index 6048e2310b2..f78b2bc97c3 100644
--- a/src/mame/drivers/atetris.c
+++ b/src/mame/drivers/atetris.c
@@ -103,31 +103,29 @@ static void reset_bank(running_machine &machine)
}
-static MACHINE_START( atetris )
+void atetris_state::machine_start()
{
- atetris_state *state = machine.driver_data<atetris_state>();
/* Allocate interrupt timer */
- state->m_interrupt_timer = machine.scheduler().timer_alloc(FUNC(interrupt_gen));
+ m_interrupt_timer = machine().scheduler().timer_alloc(FUNC(interrupt_gen));
/* Set up save state */
- state->save_item(NAME(state->m_current_bank));
- state->save_item(NAME(state->m_nvram_write_enable));
- machine.save().register_postload(save_prepost_delegate(FUNC(reset_bank), &machine));
+ save_item(NAME(m_current_bank));
+ save_item(NAME(m_nvram_write_enable));
+ machine().save().register_postload(save_prepost_delegate(FUNC(reset_bank), &machine()));
}
-static MACHINE_RESET( atetris )
+void atetris_state::machine_reset()
{
- atetris_state *state = machine.driver_data<atetris_state>();
/* reset the slapstic */
slapstic_reset();
- state->m_current_bank = slapstic_bank() & 1;
- reset_bank(machine);
+ m_current_bank = slapstic_bank() & 1;
+ reset_bank(machine());
/* start interrupts going (32V clocked by 16V) */
- state->m_interrupt_timer->adjust(machine.primary_screen->time_until_pos(48), 48);
+ m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(48), 48);
}
@@ -346,8 +344,6 @@ static MACHINE_CONFIG_START( atetris, atetris_state )
MCFG_CPU_ADD("maincpu", M6502,MASTER_CLOCK/8)
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_MACHINE_START(atetris)
- MCFG_MACHINE_RESET(atetris)
MCFG_NVRAM_ADD_1FILL("nvram")
/* video hardware */
@@ -360,7 +356,6 @@ static MACHINE_CONFIG_START( atetris, atetris_state )
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 456, 0, 336, 262, 0, 240)
MCFG_SCREEN_UPDATE_STATIC(atetris)
- MCFG_VIDEO_START(atetris)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -381,8 +376,6 @@ static MACHINE_CONFIG_START( atetrisb2, atetris_state )
MCFG_CPU_ADD("maincpu", M6502,BOOTLEG_CLOCK/8)
MCFG_CPU_PROGRAM_MAP(atetrisb2_map)
- MCFG_MACHINE_START(atetris)
- MCFG_MACHINE_RESET(atetris)
MCFG_NVRAM_ADD_1FILL("nvram")
/* video hardware */
@@ -395,7 +388,6 @@ static MACHINE_CONFIG_START( atetrisb2, atetris_state )
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 456, 0, 336, 262, 0, 240)
MCFG_SCREEN_UPDATE_STATIC(atetris)
- MCFG_VIDEO_START(atetris)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/atlantis.c b/src/mame/drivers/atlantis.c
index 59649eab3f8..cfec190a0c7 100644
--- a/src/mame/drivers/atlantis.c
+++ b/src/mame/drivers/atlantis.c
@@ -46,6 +46,8 @@ public:
atlantis_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) {}
DECLARE_DRIVER_INIT(mwskins);
+ virtual void machine_start();
+ virtual void machine_reset();
};
@@ -55,11 +57,10 @@ public:
*
*************************************/
-static MACHINE_START( mwskins )
+void atlantis_state::machine_start()
{
-// atlantis_state *state = machine.driver_data<atlantis_state>();
/* set the fastest DRC options */
- mips3drc_set_options(machine.device("maincpu"), MIPS3DRC_FASTEST_OPTIONS);
+ mips3drc_set_options(machine().device("maincpu"), MIPS3DRC_FASTEST_OPTIONS);
}
@@ -70,10 +71,10 @@ static MACHINE_START( mwskins )
*
*************************************/
-static MACHINE_RESET( mwskins )
+void atlantis_state::machine_reset()
{
- dcs_reset_w(machine, 1);
- dcs_reset_w(machine, 0);
+ dcs_reset_w(machine(), 1);
+ dcs_reset_w(machine(), 0);
}
@@ -154,8 +155,6 @@ static MACHINE_CONFIG_START( mwskins, atlantis_state )
MCFG_CPU_CONFIG(r4310_config)
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_MACHINE_START(mwskins)
- MCFG_MACHINE_RESET(mwskins)
MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
diff --git a/src/mame/drivers/atvtrack.c b/src/mame/drivers/atvtrack.c
index 77c00d3131a..9e60ee416c1 100644
--- a/src/mame/drivers/atvtrack.c
+++ b/src/mame/drivers/atvtrack.c
@@ -82,6 +82,9 @@ public:
DECLARE_WRITE64_MEMBER(area4_w);
DECLARE_READ64_MEMBER(ioport_r);
DECLARE_WRITE64_MEMBER(ioport_w);
+ virtual void machine_start();
+ virtual void machine_reset();
+ virtual void video_start();
};
static void logbinary(UINT32 data,int high=31,int low=0)
@@ -311,7 +314,7 @@ WRITE64_MEMBER(atvtrack_state::ioport_w)
#endif
}
-VIDEO_START(atvtrack)
+void atvtrack_state::video_start()
{
}
@@ -320,21 +323,21 @@ SCREEN_UPDATE_RGB32(atvtrack)
return 0;
}
-static MACHINE_START(atvtrack)
+void atvtrack_state::machine_start()
{
UINT8 *src, *dst;
address_space *as;
nandaddressstep = 0;
- nandregion = machine.root_device().memregion("maincpu");
- as = machine.device("maincpu")->memory().space(AS_PROGRAM);
+ nandregion = machine().root_device().memregion("maincpu");
+ as = machine().device("maincpu")->memory().space(AS_PROGRAM);
dst = (UINT8 *)(as->get_write_ptr(0x0c7f0000));
src = nandregion->base()+0x10;
// copy 0x10000 bytes from region "maincpu" offset 0x10 to 0x0c7f0000
memcpy(dst, src, 0x10000);
}
-static MACHINE_RESET(atvtrack)
+void atvtrack_state::machine_reset()
{
address_space *as;
@@ -342,12 +345,12 @@ static MACHINE_RESET(atvtrack)
// The routine initializes the cpu, copies the boot program from the flash memories into the cpu sdram
// and finally executes it.
// Here there is the setup of the cpu, the boot program is copied in machine_start
- as = machine.device("maincpu")->memory().space(AS_PROGRAM);
+ as = machine().device("maincpu")->memory().space(AS_PROGRAM);
// set cpu PC register to 0x0c7f0000
- machine.device("maincpu")->state().set_pc(0x0c7f0000);
+ machine().device("maincpu")->state().set_pc(0x0c7f0000);
// set BCR2 to 1
sh4_internal_w(as, 0x3001, 1, 0xffffffff);
- device_execute_interface *exec = dynamic_cast<device_execute_interface *>(machine.device("subcpu"));
+ device_execute_interface *exec = dynamic_cast<device_execute_interface *>(machine().device("subcpu"));
exec->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
@@ -404,9 +407,6 @@ static MACHINE_CONFIG_START( atvtrack, atvtrack_state )
MCFG_PALETTE_LENGTH(0x1000)
- MCFG_MACHINE_RESET(atvtrack)
- MCFG_MACHINE_START(atvtrack)
- MCFG_VIDEO_START(atvtrack)
MACHINE_CONFIG_END
ROM_START( atvtrack )
diff --git a/src/mame/drivers/avalnche.c b/src/mame/drivers/avalnche.c
index c9913392430..635b8b7c1af 100644
--- a/src/mame/drivers/avalnche.c
+++ b/src/mame/drivers/avalnche.c
@@ -232,18 +232,16 @@ INPUT_PORTS_END
*
*************************************/
-static MACHINE_START( avalnche )
+void avalnche_state::machine_start()
{
- avalnche_state *state = machine.driver_data<avalnche_state>();
- state->save_item(NAME(state->m_avalance_video_inverted));
+ save_item(NAME(m_avalance_video_inverted));
}
-static MACHINE_RESET( avalnche )
+void avalnche_state::machine_reset()
{
- avalnche_state *state = machine.driver_data<avalnche_state>();
- state->m_avalance_video_inverted = 0;
+ m_avalance_video_inverted = 0;
}
static MACHINE_CONFIG_START( avalnche, avalnche_state )
@@ -253,8 +251,6 @@ static MACHINE_CONFIG_START( avalnche, avalnche_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_PERIODIC_INT(nmi_line_pulse,8*60)
- MCFG_MACHINE_START(avalnche)
- MCFG_MACHINE_RESET(avalnche)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c
index 4b208680a26..477a6c82b65 100644
--- a/src/mame/drivers/avt.c
+++ b/src/mame/drivers/avt.c
@@ -442,6 +442,8 @@ public:
DECLARE_WRITE8_MEMBER(debug_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
+ virtual void video_start();
+ virtual void palette_init();
};
#define mc6845_h_char_total (state->m_crtc_vreg[0])
@@ -496,10 +498,9 @@ TILE_GET_INFO_MEMBER(avt_state::get_bg_tile_info)
}
-static VIDEO_START( avt )
+void avt_state::video_start()
{
- avt_state *state = machine.driver_data<avt_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(avt_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 28, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(avt_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 28, 32);
}
@@ -529,9 +530,9 @@ static SCREEN_UPDATE_IND16( avt )
}
-static PALETTE_INIT( avt )
+void avt_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
/* prom bits
7654 3210
---- ---x Intensity?.
@@ -545,7 +546,7 @@ static PALETTE_INIT( avt )
/* 0000BGRI */
if (color_prom == 0) return;
- for (j = 0; j < machine.total_colors(); j++)
+ for (j = 0; j < machine().total_colors(); j++)
{
int bit1, bit2, bit3, r, g, b, inten, intenmin, intenmax, i;
@@ -574,9 +575,9 @@ static PALETTE_INIT( avt )
/* hack to switch cyan->magenta for highlighted background */
if (j == 0x40)
- palette_set_color(machine, j, MAKE_RGB(g, r, b)); // Why this one has R-G swapped?...
+ palette_set_color(machine(), j, MAKE_RGB(g, r, b)); // Why this one has R-G swapped?...
else
- palette_set_color(machine, j, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), j, MAKE_RGB(r, g, b));
}
}
@@ -905,10 +906,8 @@ static MACHINE_CONFIG_START( avt, avt_state )
MCFG_GFXDECODE(avt)
- MCFG_PALETTE_INIT(avt)
MCFG_PALETTE_LENGTH(8*16)
- MCFG_VIDEO_START(avt)
MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf) /* guess */
diff --git a/src/mame/drivers/aztarac.c b/src/mame/drivers/aztarac.c
index 944cb38d599..cc589560ab4 100644
--- a/src/mame/drivers/aztarac.c
+++ b/src/mame/drivers/aztarac.c
@@ -35,9 +35,9 @@ static IRQ_CALLBACK(aztarac_irq_callback)
}
-static MACHINE_RESET( aztarac )
+void aztarac_state::machine_reset()
{
- machine.device("maincpu")->execute().set_irq_acknowledge_callback(aztarac_irq_callback);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(aztarac_irq_callback);
}
@@ -155,7 +155,6 @@ static MACHINE_CONFIG_START( aztarac, aztarac_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_PERIODIC_INT(aztarac_snd_timed_irq, 100)
- MCFG_MACHINE_RESET(aztarac)
MCFG_NVRAM_ADD_1FILL("nvram")
/* video hardware */
@@ -165,7 +164,6 @@ static MACHINE_CONFIG_START( aztarac, aztarac_state )
MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 768-1)
MCFG_SCREEN_UPDATE_STATIC(vector)
- MCFG_VIDEO_START(aztarac)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c
index 2874fad2e74..1b841dd01d4 100644
--- a/src/mame/drivers/backfire.c
+++ b/src/mame/drivers/backfire.c
@@ -77,32 +77,33 @@ public:
DECLARE_READ32_MEMBER(backfire_eeprom_r);
DECLARE_WRITE32_MEMBER(backfire_eeprom_w);
DECLARE_DRIVER_INIT(backfire);
+ virtual void machine_start();
+ virtual void video_start();
};
//UINT32 *backfire_180010, *backfire_188010;
/* I'm using the functions in deco16ic.c ... same chips, why duplicate code? */
-static VIDEO_START( backfire )
+void backfire_state::video_start()
{
- backfire_state *state = machine.driver_data<backfire_state>();
- state->m_spriteram_1 = auto_alloc_array(machine, UINT16, 0x2000/2);
- state->m_spriteram_2 = auto_alloc_array(machine, UINT16, 0x2000/2);
+ m_spriteram_1 = auto_alloc_array(machine(), UINT16, 0x2000/2);
+ m_spriteram_2 = auto_alloc_array(machine(), UINT16, 0x2000/2);
/* and register the allocated ram so that save states still work */
- state->save_item(NAME(state->m_pf1_rowscroll));
- state->save_item(NAME(state->m_pf2_rowscroll));
- state->save_item(NAME(state->m_pf3_rowscroll));
- state->save_item(NAME(state->m_pf4_rowscroll));
+ save_item(NAME(m_pf1_rowscroll));
+ save_item(NAME(m_pf2_rowscroll));
+ save_item(NAME(m_pf3_rowscroll));
+ save_item(NAME(m_pf4_rowscroll));
- state->m_left = auto_bitmap_ind16_alloc(machine, 80*8, 32*8);
- state->m_right = auto_bitmap_ind16_alloc(machine, 80*8, 32*8);
+ m_left = auto_bitmap_ind16_alloc(machine(), 80*8, 32*8);
+ m_right = auto_bitmap_ind16_alloc(machine(), 80*8, 32*8);
- state->save_pointer(NAME(state->m_spriteram_1), 0x2000/2);
- state->save_pointer(NAME(state->m_spriteram_2), 0x2000/2);
+ save_pointer(NAME(m_spriteram_1), 0x2000/2);
+ save_pointer(NAME(m_spriteram_2), 0x2000/2);
- state->save_item(NAME(*state->m_left));
- state->save_item(NAME(*state->m_right));
+ save_item(NAME(*m_left));
+ save_item(NAME(*m_right));
}
@@ -471,16 +472,15 @@ static const deco16ic_interface backfire_deco16ic_tilegen2_intf =
2,3
};
-static MACHINE_START( backfire )
+void backfire_state::machine_start()
{
- backfire_state *state = machine.driver_data<backfire_state>();
-
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_deco_tilegen1 = machine.device("tilegen1");
- state->m_deco_tilegen2 = machine.device("tilegen2");
- state->m_lscreen = machine.device("lscreen");
- state->m_rscreen = machine.device("rscreen");
- state->m_eeprom = machine.device<eeprom_device>("eeprom");
+
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_deco_tilegen1 = machine().device("tilegen1");
+ m_deco_tilegen2 = machine().device("tilegen2");
+ m_lscreen = machine().device("lscreen");
+ m_rscreen = machine().device("rscreen");
+ m_eeprom = machine().device<eeprom_device>("eeprom");
}
UINT16 backfire_pri_callback(UINT16 x)
@@ -504,7 +504,6 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_EEPROM_93C46_ADD("eeprom")
- MCFG_MACHINE_START(backfire)
/* video hardware */
MCFG_PALETTE_LENGTH(2048)
@@ -525,7 +524,6 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
MCFG_SCREEN_UPDATE_STATIC(backfire_right)
- MCFG_VIDEO_START(backfire)
MCFG_DECO16IC_ADD("tilegen1", backfire_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", backfire_deco16ic_tilegen2_intf)
diff --git a/src/mame/drivers/badlands.c b/src/mame/drivers/badlands.c
index 0c8c378bcfd..3ed13d7e18e 100644
--- a/src/mame/drivers/badlands.c
+++ b/src/mame/drivers/badlands.c
@@ -197,28 +197,26 @@ static void scanline_update(screen_device &screen, int scanline)
}
-static MACHINE_START( badlands )
+MACHINE_START_MEMBER(badlands_state,badlands)
{
- badlands_state *state = machine.driver_data<badlands_state>();
- atarigen_init(machine);
+ atarigen_init(machine());
- state->save_item(NAME(state->m_pedal_value));
+ save_item(NAME(m_pedal_value));
}
-static MACHINE_RESET( badlands )
+MACHINE_RESET_MEMBER(badlands_state,badlands)
{
- badlands_state *state = machine.driver_data<badlands_state>();
- state->m_pedal_value[0] = state->m_pedal_value[1] = 0x80;
+ m_pedal_value[0] = m_pedal_value[1] = 0x80;
- atarigen_eeprom_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_scanline_timer_reset(*machine.primary_screen, scanline_update, 32);
+ atarigen_eeprom_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 32);
- atarigen_sound_io_reset(machine.device("audiocpu"));
- memcpy(state->m_bank_base, &state->m_bank_source_data[0x0000], 0x1000);
+ atarigen_sound_io_reset(machine().device("audiocpu"));
+ memcpy(m_bank_base, &m_bank_source_data[0x0000], 0x1000);
}
@@ -509,8 +507,8 @@ static MACHINE_CONFIG_START( badlands, badlands_state )
MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
MCFG_CPU_PROGRAM_MAP(audio_map)
- MCFG_MACHINE_START(badlands)
- MCFG_MACHINE_RESET(badlands)
+ MCFG_MACHINE_START_OVERRIDE(badlands_state,badlands)
+ MCFG_MACHINE_RESET_OVERRIDE(badlands_state,badlands)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -524,7 +522,7 @@ static MACHINE_CONFIG_START( badlands, badlands_state )
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
MCFG_SCREEN_UPDATE_STATIC(badlands)
- MCFG_VIDEO_START(badlands)
+ MCFG_VIDEO_START_OVERRIDE(badlands_state,badlands)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -693,17 +691,16 @@ static void scanline_update_bootleg(screen_device &screen, int scanline)
-static MACHINE_RESET( badlandsb )
+MACHINE_RESET_MEMBER(badlands_state,badlandsb)
{
- badlands_state *state = machine.driver_data<badlands_state>();
-// state->m_pedal_value[0] = state->m_pedal_value[1] = 0x80;
+// m_pedal_value[0] = m_pedal_value[1] = 0x80;
- atarigen_eeprom_reset(state);
- atarigen_interrupt_reset(state, update_interrupts_bootleg);
- atarigen_scanline_timer_reset(*machine.primary_screen, scanline_update_bootleg, 32);
+ atarigen_eeprom_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts_bootleg);
+ atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update_bootleg, 32);
-// atarigen_sound_io_reset(machine.device("audiocpu"));
-// memcpy(state->m_bank_base, &state->m_bank_source_data[0x0000], 0x1000);
+// atarigen_sound_io_reset(machine().device("audiocpu"));
+// memcpy(m_bank_base, &m_bank_source_data[0x0000], 0x1000);
}
static MACHINE_CONFIG_START( badlandsb, badlands_state )
@@ -716,8 +713,8 @@ static MACHINE_CONFIG_START( badlandsb, badlands_state )
// MCFG_CPU_ADD("audiocpu", Z80, XTAL_20MHz/12) /* Divisor estimated */
// MCFG_CPU_PROGRAM_MAP(bootleg_soundmap)
- MCFG_MACHINE_START(badlands)
- MCFG_MACHINE_RESET(badlandsb)
+ MCFG_MACHINE_START_OVERRIDE(badlands_state,badlands)
+ MCFG_MACHINE_RESET_OVERRIDE(badlands_state,badlandsb)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -731,7 +728,7 @@ static MACHINE_CONFIG_START( badlandsb, badlands_state )
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
MCFG_SCREEN_UPDATE_STATIC(badlands)
- MCFG_VIDEO_START(badlands)
+ MCFG_VIDEO_START_OVERRIDE(badlands_state,badlands)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/bagman.c b/src/mame/drivers/bagman.c
index 5eb87cfd2a4..12bbb8e79c7 100644
--- a/src/mame/drivers/bagman.c
+++ b/src/mame/drivers/bagman.c
@@ -479,7 +479,7 @@ static MACHINE_CONFIG_START( bagman, bagman_state )
MCFG_CPU_IO_MAP(main_portmap)
MCFG_CPU_VBLANK_INT("screen", vblank_irq)
- MCFG_MACHINE_RESET(bagman)
+ MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -489,8 +489,8 @@ static MACHINE_CONFIG_START( bagman, bagman_state )
MCFG_GFXDECODE(bagman)
MCFG_PALETTE_LENGTH(64)
- MCFG_PALETTE_INIT(bagman)
- MCFG_VIDEO_START(bagman)
+ MCFG_PALETTE_INIT_OVERRIDE(bagman_state,bagman)
+ MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman)
MCFG_DEVICE_ADD("tmsprom", TMSPROM, 640000 / 2) /* rom clock */
MCFG_DEVICE_CONFIG(prom_intf)
@@ -515,7 +515,7 @@ static MACHINE_CONFIG_START( pickin, bagman_state )
MCFG_CPU_IO_MAP(main_portmap)
MCFG_CPU_VBLANK_INT("screen", vblank_irq)
- MCFG_MACHINE_RESET(bagman)
+ MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -525,8 +525,8 @@ static MACHINE_CONFIG_START( pickin, bagman_state )
MCFG_GFXDECODE(pickin)
MCFG_PALETTE_LENGTH(64)
- MCFG_PALETTE_INIT(bagman)
- MCFG_VIDEO_START(bagman)
+ MCFG_PALETTE_INIT_OVERRIDE(bagman_state,bagman)
+ MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -567,7 +567,7 @@ static MACHINE_CONFIG_START( botanic, bagman_state )
MCFG_CPU_IO_MAP(main_portmap)
MCFG_CPU_VBLANK_INT("screen", vblank_irq)
- MCFG_MACHINE_RESET(bagman)
+ MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -577,8 +577,8 @@ static MACHINE_CONFIG_START( botanic, bagman_state )
MCFG_GFXDECODE(bagman)
MCFG_PALETTE_LENGTH(64)
- MCFG_PALETTE_INIT(bagman)
- MCFG_VIDEO_START(bagman)
+ MCFG_PALETTE_INIT_OVERRIDE(bagman_state,bagman)
+ MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/balsente.c b/src/mame/drivers/balsente.c
index 28ca52de413..9286cf2bf7d 100644
--- a/src/mame/drivers/balsente.c
+++ b/src/mame/drivers/balsente.c
@@ -1210,8 +1210,6 @@ static MACHINE_CONFIG_START( balsente, balsente_state )
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_MACHINE_START(balsente)
- MCFG_MACHINE_RESET(balsente)
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_TIMER_ADD("scan_timer", balsente_interrupt_timer)
@@ -1228,7 +1226,6 @@ static MACHINE_CONFIG_START( balsente, balsente_state )
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(balsente)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/bankp.c b/src/mame/drivers/bankp.c
index d085b507989..47bde28cf22 100644
--- a/src/mame/drivers/bankp.c
+++ b/src/mame/drivers/bankp.c
@@ -282,12 +282,11 @@ static const sn76496_config psg_intf =
*
*************************************/
-static MACHINE_RESET( bankp )
+void bankp_state::machine_reset()
{
- bankp_state *state = machine.driver_data<bankp_state>();
- state->m_scroll_x = 0;
- state->m_priority = 0;
+ m_scroll_x = 0;
+ m_priority = 0;
}
static INTERRUPT_GEN( vblank_irq )
@@ -306,7 +305,6 @@ static MACHINE_CONFIG_START( bankp, bankp_state )
MCFG_CPU_IO_MAP(bankp_io_map)
MCFG_CPU_VBLANK_INT("screen", vblank_irq)
- MCFG_MACHINE_RESET(bankp)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -316,8 +314,6 @@ static MACHINE_CONFIG_START( bankp, bankp_state )
MCFG_GFXDECODE(bankp)
MCFG_PALETTE_LENGTH(32*4+16*8)
- MCFG_PALETTE_INIT(bankp)
- MCFG_VIDEO_START(bankp)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/baraduke.c b/src/mame/drivers/baraduke.c
index 6794c056ae5..c0fcae8e5ba 100644
--- a/src/mame/drivers/baraduke.c
+++ b/src/mame/drivers/baraduke.c
@@ -400,8 +400,6 @@ static MACHINE_CONFIG_START( baraduke, baraduke_state )
MCFG_GFXDECODE(baraduke)
MCFG_PALETTE_LENGTH(2048)
- MCFG_PALETTE_INIT(baraduke)
- MCFG_VIDEO_START(baraduke)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/batman.c b/src/mame/drivers/batman.c
index accadf81652..a5c53f052cd 100644
--- a/src/mame/drivers/batman.c
+++ b/src/mame/drivers/batman.c
@@ -39,24 +39,22 @@ static void update_interrupts(running_machine &machine)
}
-static MACHINE_START( batman )
+MACHINE_START_MEMBER(batman_state,batman)
{
- batman_state *state = machine.driver_data<batman_state>();
- atarigen_init(machine);
+ atarigen_init(machine());
- state->save_item(NAME(state->m_latch_data));
- state->save_item(NAME(state->m_alpha_tile_bank));
+ save_item(NAME(m_latch_data));
+ save_item(NAME(m_alpha_tile_bank));
}
-static MACHINE_RESET( batman )
+MACHINE_RESET_MEMBER(batman_state,batman)
{
- batman_state *state = machine.driver_data<batman_state>();
- atarigen_eeprom_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarivc_reset(*machine.primary_screen, state->m_atarivc_eof_data, 2);
- atarigen_scanline_timer_reset(*machine.primary_screen, batman_scanline_update, 8);
+ atarigen_eeprom_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarivc_reset(*machine().primary_screen, m_atarivc_eof_data, 2);
+ atarigen_scanline_timer_reset(*machine().primary_screen, batman_scanline_update, 8);
atarijsa_reset();
}
@@ -237,8 +235,8 @@ static MACHINE_CONFIG_START( batman, batman_state )
MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz)
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_MACHINE_START(batman)
- MCFG_MACHINE_RESET(batman)
+ MCFG_MACHINE_START_OVERRIDE(batman_state,batman)
+ MCFG_MACHINE_RESET_OVERRIDE(batman_state,batman)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -252,7 +250,7 @@ static MACHINE_CONFIG_START( batman, batman_state )
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
MCFG_SCREEN_UPDATE_STATIC(batman)
- MCFG_VIDEO_START(batman)
+ MCFG_VIDEO_START_OVERRIDE(batman_state,batman)
/* sound hardware */
MCFG_FRAGMENT_ADD(jsa_iii_mono)
diff --git a/src/mame/drivers/battlane.c b/src/mame/drivers/battlane.c
index ae38679f403..b801bc1c609 100644
--- a/src/mame/drivers/battlane.c
+++ b/src/mame/drivers/battlane.c
@@ -267,23 +267,21 @@ static const ym3526_interface ym3526_config =
*
*************************************/
-static MACHINE_START( battlane )
+void battlane_state::machine_start()
{
- battlane_state *state = machine.driver_data<battlane_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_subcpu = machine.device<cpu_device>("sub");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_subcpu = machine().device<cpu_device>("sub");
- state->save_item(NAME(state->m_video_ctrl));
- state->save_item(NAME(state->m_cpu_control));
+ save_item(NAME(m_video_ctrl));
+ save_item(NAME(m_cpu_control));
}
-static MACHINE_RESET( battlane )
+void battlane_state::machine_reset()
{
- battlane_state *state = machine.driver_data<battlane_state>();
- state->m_video_ctrl = 0;
- state->m_cpu_control = 0;
+ m_video_ctrl = 0;
+ m_cpu_control = 0;
}
static MACHINE_CONFIG_START( battlane, battlane_state )
@@ -298,8 +296,6 @@ static MACHINE_CONFIG_START( battlane, battlane_state )
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
- MCFG_MACHINE_START(battlane)
- MCFG_MACHINE_RESET(battlane)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -312,7 +308,6 @@ static MACHINE_CONFIG_START( battlane, battlane_state )
MCFG_GFXDECODE(battlane)
MCFG_PALETTE_LENGTH(64)
- MCFG_VIDEO_START(battlane)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/battlera.c b/src/mame/drivers/battlera.c
index 59de81e8bfd..e3de7eedbcf 100644
--- a/src/mame/drivers/battlera.c
+++ b/src/mame/drivers/battlera.c
@@ -250,7 +250,6 @@ static MACHINE_CONFIG_START( battlera, battlera_state )
MCFG_GFXDECODE(battlera)
MCFG_PALETTE_LENGTH(512)
- MCFG_VIDEO_START(battlera)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/battlex.c b/src/mame/drivers/battlex.c
index 9b79911ad99..4ff9b742cad 100644
--- a/src/mame/drivers/battlex.c
+++ b/src/mame/drivers/battlex.c
@@ -225,25 +225,23 @@ static const ay8910_interface battlex_ay8910_interface =
DEVCB_NULL
};
-static MACHINE_START( battlex )
+void battlex_state::machine_start()
{
- battlex_state *state = machine.driver_data<battlex_state>();
/* register for save states */
- state->save_item(NAME(state->m_scroll_lsb));
- state->save_item(NAME(state->m_scroll_msb));
- state->save_item(NAME(state->m_starfield_enabled));
- state->save_item(NAME(state->m_in0_b4));
+ save_item(NAME(m_scroll_lsb));
+ save_item(NAME(m_scroll_msb));
+ save_item(NAME(m_starfield_enabled));
+ save_item(NAME(m_in0_b4));
}
-static MACHINE_RESET( battlex )
+void battlex_state::machine_reset()
{
- battlex_state *state = machine.driver_data<battlex_state>();
- state->m_scroll_lsb = 0;
- state->m_scroll_msb = 0;
- state->m_starfield_enabled = 0;
- state->m_in0_b4 = 0;
+ m_scroll_lsb = 0;
+ m_scroll_msb = 0;
+ m_starfield_enabled = 0;
+ m_in0_b4 = 0;
}
static MACHINE_CONFIG_START( battlex, battlex_state )
@@ -254,8 +252,6 @@ static MACHINE_CONFIG_START( battlex, battlex_state )
MCFG_CPU_IO_MAP(io_map)
MCFG_CPU_PERIODIC_INT(battlex_interrupt,400) /* controls game speed? */
- MCFG_MACHINE_START(battlex)
- MCFG_MACHINE_RESET(battlex)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -267,7 +263,6 @@ static MACHINE_CONFIG_START( battlex, battlex_state )
MCFG_GFXDECODE(battlex)
MCFG_PALETTE_LENGTH(64)
- MCFG_VIDEO_START(battlex)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/battlnts.c b/src/mame/drivers/battlnts.c
index a3feee626ac..a1dd2153f81 100644
--- a/src/mame/drivers/battlnts.c
+++ b/src/mame/drivers/battlnts.c
@@ -221,28 +221,26 @@ static const k007420_interface bladestl_k007420_intf =
};
-static MACHINE_START( battlnts )
+void battlnts_state::machine_start()
{
- battlnts_state *state = machine.driver_data<battlnts_state>();
- UINT8 *ROM = state->memregion("maincpu")->base();
+ UINT8 *ROM = memregion("maincpu")->base();
- state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
+ membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_k007342 = machine.device("k007342");
- state->m_k007420 = machine.device("k007420");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_k007342 = machine().device("k007342");
+ m_k007420 = machine().device("k007420");
- state->save_item(NAME(state->m_spritebank));
- state->save_item(NAME(state->m_layer_colorbase));
+ save_item(NAME(m_spritebank));
+ save_item(NAME(m_layer_colorbase));
}
-static MACHINE_RESET( battlnts )
+void battlnts_state::machine_reset()
{
- battlnts_state *state = machine.driver_data<battlnts_state>();
- state->m_layer_colorbase[0] = 0;
- state->m_layer_colorbase[1] = 0;
- state->m_spritebank = 0;
+ m_layer_colorbase[0] = 0;
+ m_layer_colorbase[1] = 0;
+ m_spritebank = 0;
}
static MACHINE_CONFIG_START( battlnts, battlnts_state )
@@ -255,8 +253,6 @@ static MACHINE_CONFIG_START( battlnts, battlnts_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz / 6 /* 3579545? */)
MCFG_CPU_PROGRAM_MAP(battlnts_sound_map)
- MCFG_MACHINE_START(battlnts)
- MCFG_MACHINE_RESET(battlnts)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c
index 15aff6dcdc5..dfe6f82070b 100644
--- a/src/mame/drivers/bbusters.c
+++ b/src/mame/drivers/bbusters.c
@@ -690,7 +690,7 @@ static MACHINE_CONFIG_START( bbusters, bbusters_state )
MCFG_GFXDECODE(bbusters)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(bbuster)
+ MCFG_VIDEO_START_OVERRIDE(bbusters_state,bbuster)
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
@@ -728,7 +728,7 @@ static MACHINE_CONFIG_START( mechatt, bbusters_state )
MCFG_GFXDECODE(mechatt)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(mechatt)
+ MCFG_VIDEO_START_OVERRIDE(bbusters_state,mechatt)
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c
index 86c621828fa..7bc565902af 100644
--- a/src/mame/drivers/beaminv.c
+++ b/src/mame/drivers/beaminv.c
@@ -77,6 +77,8 @@ public:
DECLARE_READ8_MEMBER(v128_r);
DECLARE_WRITE8_MEMBER(controller_select_w);
DECLARE_READ8_MEMBER(controller_r);
+ virtual void machine_start();
+ virtual void machine_reset();
};
@@ -133,15 +135,14 @@ static void start_interrupt_timer( running_machine &machine )
*
*************************************/
-static MACHINE_START( beaminv )
+void beaminv_state::machine_start()
{
- beaminv_state *state = machine.driver_data<beaminv_state>();
- create_interrupt_timer(machine);
+ create_interrupt_timer(machine());
- state->m_maincpu = machine.device<cpu_device>("maincpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
/* setup for save states */
- state->save_item(NAME(state->m_controller_select));
+ save_item(NAME(m_controller_select));
}
@@ -152,12 +153,11 @@ static MACHINE_START( beaminv )
*
*************************************/
-static MACHINE_RESET( beaminv )
+void beaminv_state::machine_reset()
{
- beaminv_state *state = machine.driver_data<beaminv_state>();
- start_interrupt_timer(machine);
+ start_interrupt_timer(machine());
- state->m_controller_select = 0;
+ m_controller_select = 0;
}
@@ -336,8 +336,6 @@ static MACHINE_CONFIG_START( beaminv, beaminv_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_IO_MAP(main_io_map)
- MCFG_MACHINE_START(beaminv)
- MCFG_MACHINE_RESET(beaminv)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/beezer.c b/src/mame/drivers/beezer.c
index ef4f2dc38ca..1fcb02f381f 100644
--- a/src/mame/drivers/beezer.c
+++ b/src/mame/drivers/beezer.c
@@ -77,11 +77,10 @@ static INPUT_PORTS_START( beezer )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
INPUT_PORTS_END
-static MACHINE_START(beezer)
+void beezer_state::machine_start()
{
- beezer_state *state = machine.driver_data<beezer_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
}
static MACHINE_CONFIG_START( beezer, beezer_state )
@@ -104,7 +103,6 @@ static MACHINE_CONFIG_START( beezer, beezer_state )
MCFG_PALETTE_LENGTH(16)
- MCFG_MACHINE_START(beezer)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c
index 1381f8c639d..e84438e7415 100644
--- a/src/mame/drivers/berzerk.c
+++ b/src/mame/drivers/berzerk.c
@@ -55,6 +55,9 @@ public:
DECLARE_READ8_MEMBER(moonwarp_p1_r);
DECLARE_READ8_MEMBER(moonwarp_p2_r);
DECLARE_DRIVER_INIT(moonwarp);
+ virtual void machine_start();
+ virtual void machine_reset();
+ virtual void video_start();
};
@@ -302,18 +305,17 @@ static void start_nmi_timer(running_machine &machine)
*
*************************************/
-static MACHINE_START( berzerk )
+void berzerk_state::machine_start()
{
- berzerk_state *state = machine.driver_data<berzerk_state>();
- create_irq_timer(machine);
- create_nmi_timer(machine);
+ create_irq_timer(machine());
+ create_nmi_timer(machine());
/* register for state saving */
- state_save_register_global(machine, state->m_magicram_control);
- state_save_register_global(machine, state->m_last_shift_data);
- state_save_register_global(machine, state->m_intercept);
- state_save_register_global(machine, state->m_irq_enabled);
- state_save_register_global(machine, state->m_nmi_enabled);
+ state_save_register_global(machine(), m_magicram_control);
+ state_save_register_global(machine(), m_last_shift_data);
+ state_save_register_global(machine(), m_intercept);
+ state_save_register_global(machine(), m_irq_enabled);
+ state_save_register_global(machine(), m_nmi_enabled);
}
@@ -324,16 +326,15 @@ static MACHINE_START( berzerk )
*
*************************************/
-static MACHINE_RESET( berzerk )
+void berzerk_state::machine_reset()
{
- berzerk_state *state = machine.driver_data<berzerk_state>();
- state->m_irq_enabled = 0;
- state->m_nmi_enabled = 0;
- set_led_status(machine, 0, 0);
- state->m_magicram_control = 0;
+ m_irq_enabled = 0;
+ m_nmi_enabled = 0;
+ set_led_status(machine(), 0, 0);
+ m_magicram_control = 0;
- start_irq_timer(machine);
- start_nmi_timer(machine);
+ start_irq_timer(machine());
+ start_nmi_timer(machine());
}
@@ -350,12 +351,12 @@ static MACHINE_RESET( berzerk )
#define LS181_10C (1)
-static VIDEO_START( berzerk )
+void berzerk_state::video_start()
{
- TTL74181_config(machine, LS181_12C, 0);
+ TTL74181_config(machine(), LS181_12C, 0);
TTL74181_write(LS181_12C, TTL74181_INPUT_M, 1, 1);
- TTL74181_config(machine, LS181_10C, 0);
+ TTL74181_config(machine(), LS181_10C, 0);
TTL74181_write(LS181_10C, TTL74181_INPUT_M, 1, 1);
}
@@ -1084,13 +1085,10 @@ static MACHINE_CONFIG_START( berzerk, berzerk_state )
MCFG_CPU_PROGRAM_MAP(berzerk_map)
MCFG_CPU_IO_MAP(berzerk_io_map)
- MCFG_MACHINE_START(berzerk)
- MCFG_MACHINE_RESET(berzerk)
MCFG_NVRAM_ADD_0FILL("nvram")
/* video hardware */
- MCFG_VIDEO_START(berzerk)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
diff --git a/src/mame/drivers/bestleag.c b/src/mame/drivers/bestleag.c
index 84a390819ec..a9756a05c5d 100644
--- a/src/mame/drivers/bestleag.c
+++ b/src/mame/drivers/bestleag.c
@@ -50,6 +50,7 @@ public:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILEMAP_MAPPER_MEMBER(bsb_bg_scan);
+ virtual void video_start();
};
@@ -100,15 +101,14 @@ TILEMAP_MAPPER_MEMBER(bestleag_state::bsb_bg_scan)
return offset;
}
-static VIDEO_START(bestleag)
+void bestleag_state::video_start()
{
- bestleag_state *state = machine.driver_data<bestleag_state>();
- state->m_tx_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bestleag_state::get_tx_tile_info),state),TILEMAP_SCAN_COLS,8,8,256, 32);
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bestleag_state::get_bg_tile_info),state),tilemap_mapper_delegate(FUNC(bestleag_state::bsb_bg_scan),state),16,16,128, 64);
- state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bestleag_state::get_fg_tile_info),state),tilemap_mapper_delegate(FUNC(bestleag_state::bsb_bg_scan),state),16,16,128, 64);
+ m_tx_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bestleag_state::get_tx_tile_info),this),TILEMAP_SCAN_COLS,8,8,256, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bestleag_state::get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(bestleag_state::bsb_bg_scan),this),16,16,128, 64);
+ m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bestleag_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(bestleag_state::bsb_bg_scan),this),16,16,128, 64);
- state->m_tx_tilemap->set_transparent_pen(15);
- state->m_fg_tilemap->set_transparent_pen(15);
+ m_tx_tilemap->set_transparent_pen(15);
+ m_fg_tilemap->set_transparent_pen(15);
}
/*
@@ -377,7 +377,6 @@ static MACHINE_CONFIG_START( bestleag, bestleag_state )
MCFG_GFXDECODE(bestleag)
MCFG_PALETTE_LENGTH(0x800)
- MCFG_VIDEO_START(bestleag)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index aa378719e25..e8162756c42 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -297,6 +297,8 @@ public:
DECLARE_READ_LINE_MEMBER(data_acia_rx_r);
DECLARE_WRITE_LINE_MEMBER(data_acia_tx_w);
DECLARE_DRIVER_INIT(bfcobra);
+ virtual void machine_reset();
+ virtual void video_start();
};
@@ -343,25 +345,24 @@ static const UINT8 col3bit_default[16]=
static const UINT8 col76index[] = {0, 2, 4, 7};
-static VIDEO_START( bfcobra )
+void bfcobra_state::video_start()
{
- bfcobra_state *state = machine.driver_data<bfcobra_state>();
int i;
- memcpy(state->m_col4bit, col4bit_default, sizeof(state->m_col4bit));
- memcpy(state->m_col3bit, col3bit_default, sizeof(state->m_col3bit));
+ memcpy(m_col4bit, col4bit_default, sizeof(m_col4bit));
+ memcpy(m_col3bit, col3bit_default, sizeof(m_col3bit));
for (i = 0; i < 256; ++i)
{
UINT8 col;
- state->m_col8bit[i] = i;
+ m_col8bit[i] = i;
col = i & 0x7f;
col = (col & 0x1f) | (col76index[ ( (col & 0x60) >> 5 ) & 3] << 5);
- state->m_col7bit[i] = col;
+ m_col7bit[i] = col;
col = (col & 3) | (col76index[( (col & 0x0c) >> 2) & 3] << 2 ) |
(col76index[( (col & 0x30) >> 4) & 3] << 5 );
- state->m_col6bit[i] = col;
+ m_col6bit[i] = col;
}
}
@@ -1320,21 +1321,20 @@ WRITE8_MEMBER(bfcobra_state::fd_ctrl_w)
}
#endif
-static MACHINE_RESET( bfcobra )
+void bfcobra_state::machine_reset()
{
- bfcobra_state *state = machine.driver_data<bfcobra_state>();
unsigned int pal;
for (pal = 0; pal < 256; ++pal)
{
- palette_set_color_rgb(machine, pal, pal3bit((pal>>5)&7), pal3bit((pal>>2)&7), pal2bit(pal&3));
+ palette_set_color_rgb(machine(), pal, pal3bit((pal>>5)&7), pal3bit((pal>>2)&7), pal2bit(pal&3));
}
- state->m_bank_data[0] = 1;
- memset(&state->m_ramdac, 0, sizeof(state->m_ramdac));
- reset_fdc(machine);
+ m_bank_data[0] = 1;
+ memset(&m_ramdac, 0, sizeof(m_ramdac));
+ reset_fdc(machine());
- state->m_irq_state = state->m_blitter_irq = state->m_vblank_irq = state->m_acia_irq = 0;
+ m_irq_state = m_blitter_irq = m_vblank_irq = m_acia_irq = 0;
}
/***************************************************************************
@@ -1787,7 +1787,6 @@ static MACHINE_CONFIG_START( bfcobra, bfcobra_state )
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_MACHINE_RESET(bfcobra)
/* TODO */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1807,7 +1806,6 @@ static MACHINE_CONFIG_START( bfcobra, bfcobra_state )
MCFG_SOUND_ADD("upd", UPD7759, UPD7759_STANDARD_CLOCK)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
- MCFG_VIDEO_START(bfcobra)
/* ACIAs */
MCFG_ACIA6850_ADD("acia6850_0", z80_acia_if)
diff --git a/src/mame/drivers/bfm_sc1.c b/src/mame/drivers/bfm_sc1.c
index 3b6793ec4da..c629d961d69 100644
--- a/src/mame/drivers/bfm_sc1.c
+++ b/src/mame/drivers/bfm_sc1.c
@@ -174,6 +174,7 @@ public:
DECLARE_DRIVER_INIT(clatt);
DECLARE_DRIVER_INIT(rou029);
DECLARE_DRIVER_INIT(nocrypt);
+ virtual void machine_reset();
};
#define VFD_RESET 0x20
@@ -637,25 +638,24 @@ READ8_MEMBER(bfm_sc1_state::vid_uart_ctrl_r)
// machine start (called only once) /////////////////////////////////////////////////
-static MACHINE_RESET( bfm_sc1 )
+void bfm_sc1_state::machine_reset()
{
- bfm_sc1_state *state = machine.driver_data<bfm_sc1_state>();
- state->m_vfd_latch = 0;
- state->m_mmtr_latch = 0;
- state->m_triac_latch = 0;
- state->m_irq_status = 0;
- state->m_is_timer_enabled = 1;
- state->m_coin_inhibits = 0;
- state->m_mux1_outputlatch = 0x08; // clock HIGH
- state->m_mux1_datalo = 0;
- state->m_mux1_datahi = 0;
- state->m_mux1_input = 0;
- state->m_mux2_outputlatch = 0x08; // clock HIGH
- state->m_mux2_datalo = 0;
- state->m_mux2_datahi = 0;
- state->m_mux2_input = 0;
-
- state->m_vfd0->reset();
+ m_vfd_latch = 0;
+ m_mmtr_latch = 0;
+ m_triac_latch = 0;
+ m_irq_status = 0;
+ m_is_timer_enabled = 1;
+ m_coin_inhibits = 0;
+ m_mux1_outputlatch = 0x08; // clock HIGH
+ m_mux1_datalo = 0;
+ m_mux1_datahi = 0;
+ m_mux1_input = 0;
+ m_mux2_outputlatch = 0x08; // clock HIGH
+ m_mux2_datalo = 0;
+ m_mux2_datahi = 0;
+ m_mux2_input = 0;
+
+ m_vfd0->reset();
// reset stepper motors /////////////////////////////////////////////////////////////
{
@@ -667,19 +667,19 @@ static MACHINE_RESET( bfm_sc1 )
if ( stepper_optic_state(i) ) pattern |= 1<<i;
}
- state->m_optic_pattern = pattern;
+ m_optic_pattern = pattern;
}
- state->m_acia_status = 0x02; // MC6850 transmit buffer empty !!!
- state->m_locked = 0x07; // hardware is locked
+ m_acia_status = 0x02; // MC6850 transmit buffer empty !!!
+ m_locked = 0x07; // hardware is locked
// init rom bank ////////////////////////////////////////////////////////////////////
{
- UINT8 *rom = machine.root_device().memregion("maincpu")->base();
+ UINT8 *rom = machine().root_device().memregion("maincpu")->base();
- state->membank("bank1")->configure_entries(0, 4, &rom[0x0000], 0x02000);
- state->membank("bank1")->set_entry(state->m_defaultbank);
+ membank("bank1")->configure_entries(0, 4, &rom[0x0000], 0x02000);
+ membank("bank1")->set_entry(m_defaultbank);
}
}
@@ -1093,7 +1093,6 @@ INPUT_PORTS_END
/////////////////////////////////////////////////////////////////////////////////////
static MACHINE_CONFIG_START( scorpion1, bfm_sc1_state )
- MCFG_MACHINE_RESET(bfm_sc1) // main scorpion1 board initialisation
MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4) // 6809 CPU at 1 Mhz
MCFG_CPU_PROGRAM_MAP(sc1_base) // setup read and write memorymap
MCFG_CPU_PERIODIC_INT(timer_irq, 1000 ) // generate 1000 IRQ's per second
diff --git a/src/mame/drivers/bfm_sc2.c b/src/mame/drivers/bfm_sc2.c
index bd2aa0d28a0..a8d2d9086a1 100644
--- a/src/mame/drivers/bfm_sc2.c
+++ b/src/mame/drivers/bfm_sc2.c
@@ -298,6 +298,10 @@ public:
DECLARE_DRIVER_INIT(focus);
DECLARE_DRIVER_INIT(drwho);
DECLARE_DRIVER_INIT(drwho_common);
+ DECLARE_MACHINE_RESET(init);
+ DECLARE_MACHINE_RESET(awp_init);
+ DECLARE_MACHINE_START(sc2dmd);
+ DECLARE_MACHINE_RESET(dm01_init);
};
@@ -1416,15 +1420,14 @@ static int read_e2ram(running_machine &machine)
// machine init (called only once) ////////////////////////////////////////
-static MACHINE_RESET( init )
+MACHINE_RESET_MEMBER(bfm_sc2_state,init)
{
- bfm_sc2_state *state = machine.driver_data<bfm_sc2_state>();
// reset the board //////////////////////////////////////////////////////
- on_scorpion2_reset(machine);
- state->m_vfd0->reset();
- state->m_vfd1->reset();
+ on_scorpion2_reset(machine());
+ m_vfd0->reset();
+ m_vfd1->reset();
}
@@ -2150,7 +2153,7 @@ INPUT_PORTS_END
///////////////////////////////////////////////////////////////////////////
static MACHINE_CONFIG_START( scorpion2_vid, bfm_sc2_state )
- MCFG_MACHINE_RESET( init ) // main scorpion2 board initialisation
+ MCFG_MACHINE_RESET_OVERRIDE(bfm_sc2_state, init ) // main scorpion2 board initialisation
MCFG_QUANTUM_TIME(attotime::from_hz(960)) // needed for serial communication !!
MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 ) // 6809 CPU at 2 Mhz
MCFG_CPU_PROGRAM_MAP(memmap_vid) // setup scorpion2 board memorymap
@@ -2598,19 +2601,18 @@ static const bfmdm01_interface dm01_interface =
};
/* machine init (called only once) */
-static MACHINE_RESET( awp_init )
+MACHINE_RESET_MEMBER(bfm_sc2_state,awp_init)
{
- bfm_sc2_state *state = machine.driver_data<bfm_sc2_state>();
- on_scorpion2_reset(machine);
- state->m_vfd0->reset();
- state->m_vfd1->reset();
+ on_scorpion2_reset(machine());
+ m_vfd0->reset();
+ m_vfd1->reset();
}
-static MACHINE_RESET( dm01_init )
+MACHINE_RESET_MEMBER(bfm_sc2_state,dm01_init)
{
- on_scorpion2_reset(machine);
+ on_scorpion2_reset(machine());
}
@@ -3689,19 +3691,18 @@ WRITE8_MEMBER(bfm_sc2_state::dmd_reset_w)
//TODO: Reset callback for DMD
}
-static MACHINE_START( sc2dmd )
+MACHINE_START_MEMBER(bfm_sc2_state,sc2dmd)
{
- bfm_sc2_state *state = machine.driver_data<bfm_sc2_state>();
- address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
- space->install_write_handler(0x2800, 0x2800, 0, 0, write8_delegate(FUNC(bfm_sc2_state::vfd1_dmd_w),state));
- space->install_write_handler(0x2900, 0x2900, 0, 0, write8_delegate(FUNC(bfm_sc2_state::dmd_reset_w),state));
+ address_space *space = machine().device("maincpu")->memory().space(AS_PROGRAM);
+ space->install_write_handler(0x2800, 0x2800, 0, 0, write8_delegate(FUNC(bfm_sc2_state::vfd1_dmd_w),this));
+ space->install_write_handler(0x2900, 0x2900, 0, 0, write8_delegate(FUNC(bfm_sc2_state::dmd_reset_w),this));
}
/* machine driver for scorpion2 board */
static MACHINE_CONFIG_START( scorpion2, bfm_sc2_state )
- MCFG_MACHINE_RESET(awp_init)
+ MCFG_MACHINE_RESET_OVERRIDE(bfm_sc2_state,awp_init)
MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 )
MCFG_CPU_PROGRAM_MAP(sc2_basemap)
MCFG_CPU_PERIODIC_INT(timer_irq, 1000 )
@@ -3734,7 +3735,7 @@ MACHINE_CONFIG_END
/* machine driver for scorpion2 board + matrix board */
static MACHINE_CONFIG_START( scorpion2_dm01, bfm_sc2_state )
- MCFG_MACHINE_RESET(dm01_init)
+ MCFG_MACHINE_RESET_OVERRIDE(bfm_sc2_state,dm01_init)
MCFG_QUANTUM_TIME(attotime::from_hz(960)) // needed for serial communication !!
MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 )
MCFG_CPU_PROGRAM_MAP(sc2_basemap)
@@ -3745,7 +3746,7 @@ static MACHINE_CONFIG_START( scorpion2_dm01, bfm_sc2_state )
MCFG_SOUND_ADD("ymsnd",YM2413, XTAL_3_579545MHz)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_MACHINE_START(sc2dmd)
+ MCFG_MACHINE_START_OVERRIDE(bfm_sc2_state,sc2dmd)
MCFG_SOUND_ADD("upd",UPD7759, UPD7759_STANDARD_CLOCK)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
diff --git a/src/mame/drivers/bfm_sc4h.c b/src/mame/drivers/bfm_sc4h.c
index 8df89405220..9bb15d8182a 100644
--- a/src/mame/drivers/bfm_sc4h.c
+++ b/src/mame/drivers/bfm_sc4h.c
@@ -586,22 +586,21 @@ UINT16 bfm_sc4_68307_portb_r(address_space *space, bool dedicated, UINT16 line_m
}
}
-static MACHINE_RESET( sc4 )
+MACHINE_RESET_MEMBER(sc4_state,sc4)
{
- sc4_state *state = machine.driver_data<sc4_state>();
int pattern =0, i;
- for ( i = 0; i < state->m_reels; i++)
+ for ( i = 0; i < m_reels; i++)
{
stepper_reset_position(i);
if ( stepper_optic_state(i) ) pattern |= 1<<i;
}
- state->m_dochk41 = true;
+ m_dochk41 = true;
- state->m_optic_pattern = pattern;
- state->sec.reset();
+ m_optic_pattern = pattern;
+ sec.reset();
}
static NVRAM_HANDLER( bfm_sc4 )
@@ -622,26 +621,25 @@ static NVRAM_HANDLER( bfm_sc4 )
-static MACHINE_START( sc4 )
+MACHINE_START_MEMBER(sc4_state,sc4)
{
- sc4_state *state = machine.driver_data<sc4_state>();
- state->m_cpuregion = (UINT16*)state->memregion( "maincpu" )->base();
- state->m_mainram = (UINT16*)auto_alloc_array_clear(machine, UINT16, 0x10000);
- state->m_duart = machine.device("duart68681");
- state->m_ymz = machine.device("ymz");
- m68307_set_port_callbacks(machine.device("maincpu"),
+ m_cpuregion = (UINT16*)memregion( "maincpu" )->base();
+ m_mainram = (UINT16*)auto_alloc_array_clear(machine(), UINT16, 0x10000);
+ m_duart = machine().device("duart68681");
+ m_ymz = machine().device("ymz");
+ m68307_set_port_callbacks(machine().device("maincpu"),
bfm_sc4_68307_porta_r,
bfm_sc4_68307_porta_w,
bfm_sc4_68307_portb_r,
bfm_sc4_68307_portb_w );
- m68307_set_duart68681(machine.device("maincpu"),machine.device("m68307_68681"));
+ m68307_set_duart68681(machine().device("maincpu"),machine().device("m68307_68681"));
int reels = 6;
- state->m_reels=reels;
+ m_reels=reels;
for ( int n = 0; n < reels; n++ )
{
- if (state->m_reel_setup[n]) stepper_config(machine, n, state->m_reel_setup[n]);
+ if (m_reel_setup[n]) stepper_config(machine(), n, m_reel_setup[n]);
}
}
@@ -764,8 +762,8 @@ MACHINE_CONFIG_START( sc4, sc4_state )
// internal duart of the 68307... paired in machine start
MCFG_DUART68681_ADD("m68307_68681", 16000000/4, m68307_duart68681_config) // ?? Mhz
- MCFG_MACHINE_START( sc4 )
- MCFG_MACHINE_RESET( sc4 )
+ MCFG_MACHINE_START_OVERRIDE(sc4_state, sc4 )
+ MCFG_MACHINE_RESET_OVERRIDE(sc4_state, sc4 )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -785,19 +783,18 @@ MACHINE_CONFIG_END
-static MACHINE_START( adder4 )
+MACHINE_START_MEMBER(sc4_adder4_state,adder4)
{
- sc4_adder4_state *state = machine.driver_data<sc4_adder4_state>();
- state->m_adder4cpuregion = (UINT32*)state->memregion( "adder4" )->base();
- state->m_adder4ram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000);
- MACHINE_START_CALL(sc4);
+ m_adder4cpuregion = (UINT32*)memregion( "adder4" )->base();
+ m_adder4ram = (UINT32*)auto_alloc_array_clear(machine(), UINT32, 0x10000);
+ MACHINE_START_CALL_MEMBER(sc4);
}
MACHINE_CONFIG_DERIVED_CLASS( sc4_adder4, sc4, sc4_adder4_state )
MCFG_CPU_ADD("adder4", M68340, 25175000) // 68340 (CPU32 core)
MCFG_CPU_PROGRAM_MAP(sc4_adder4_map)
- MCFG_MACHINE_START( adder4 )
+ MCFG_MACHINE_START_OVERRIDE(sc4_adder4_state, adder4 )
MACHINE_CONFIG_END
MACHINE_CONFIG_DERIVED_CLASS( sc4dmd, sc4, sc4_state )
@@ -808,7 +805,7 @@ MACHINE_CONFIG_DERIVED_CLASS( sc4dmd, sc4, sc4_state )
MCFG_CPU_PROGRAM_MAP(bfm_dm01_memmap)
MCFG_CPU_PERIODIC_INT(bfm_dm01_vbl, 1500 ) /* generate 1500 NMI's per second ?? what is the exact freq?? */
- MCFG_MACHINE_START( sc4 )
+ MCFG_MACHINE_START_OVERRIDE(sc4_state, sc4 )
MACHINE_CONFIG_END
INPUT_PORTS_START( sc4_base )
diff --git a/src/mame/drivers/bfm_swp.c b/src/mame/drivers/bfm_swp.c
index f594b0bc49f..378ca27ff46 100644
--- a/src/mame/drivers/bfm_swp.c
+++ b/src/mame/drivers/bfm_swp.c
@@ -139,6 +139,7 @@ protected:
// devices
required_device<cpu_device> m_maincpu;
+ virtual void machine_start();
};
@@ -199,11 +200,10 @@ static INPUT_PORTS_START( bfm_swp )
INPUT_PORTS_END
-static MACHINE_START( bfm_swp )
+void bfm_swp_state::machine_start()
{
- bfm_swp_state *state = machine.driver_data<bfm_swp_state>();
- state->m_cpuregion = (UINT32*)state->memregion( "maincpu" )->base();
- state->m_mainram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000);
+ m_cpuregion = (UINT32*)memregion( "maincpu" )->base();
+ m_mainram = (UINT32*)auto_alloc_array_clear(machine(), UINT32, 0x10000);
}
@@ -214,7 +214,6 @@ static MACHINE_CONFIG_START( bfm_swp, bfm_swp_state )
MCFG_CPU_ADD("maincpu", M68340, 16000000)
MCFG_CPU_PROGRAM_MAP(bfm_swp_map)
- MCFG_MACHINE_START( bfm_swp )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
diff --git a/src/mame/drivers/bfmsys85.c b/src/mame/drivers/bfmsys85.c
index 8e52f53f5f0..d117e747d35 100644
--- a/src/mame/drivers/bfmsys85.c
+++ b/src/mame/drivers/bfmsys85.c
@@ -110,6 +110,8 @@ public:
DECLARE_READ_LINE_MEMBER(sys85_data_r);
DECLARE_WRITE_LINE_MEMBER(sys85_data_w);
DECLARE_DRIVER_INIT(decode);
+ virtual void machine_start();
+ virtual void machine_reset();
};
@@ -147,20 +149,19 @@ static ACIA6850_INTERFACE( m6809_acia_if )
// called if board is reset ///////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
-static MACHINE_RESET( bfm_sys85 )
+void bfmsys85_state::machine_reset()
{
- bfmsys85_state *state = machine.driver_data<bfmsys85_state>();
- state->m_alpha_clock = 0;
- state->m_mmtr_latch = 0;
- state->m_triac_latch = 0;
- state->m_irq_status = 0;
- state->m_is_timer_enabled = 1;
- state->m_coin_inhibits = 0;
- state->m_mux_output_strobe = 0;
- state->m_mux_input_strobe = 0;
- state->m_mux_input = 0;
-
- state->m_vfd->reset(); // reset display1
+ m_alpha_clock = 0;
+ m_mmtr_latch = 0;
+ m_triac_latch = 0;
+ m_irq_status = 0;
+ m_is_timer_enabled = 1;
+ m_coin_inhibits = 0;
+ m_mux_output_strobe = 0;
+ m_mux_input_strobe = 0;
+ m_mux_input = 0;
+
+ m_vfd->reset(); // reset display1
// reset stepper motors ///////////////////////////////////////////////////
{
@@ -171,9 +172,9 @@ static MACHINE_RESET( bfm_sys85 )
stepper_reset_position(i);
if ( stepper_optic_state(i) ) pattern |= 1<<i;
}
- state->m_optic_pattern = pattern;
+ m_optic_pattern = pattern;
}
- state->m_locked = 0x00; // hardware is open
+ m_locked = 0x00; // hardware is open
}
///////////////////////////////////////////////////////////////////////////
@@ -368,12 +369,12 @@ READ8_MEMBER(bfmsys85_state::triac_r)
// machine start (called only once) ////////////////////////////////////////
-static MACHINE_START( bfm_sys85 )
+void bfmsys85_state::machine_start()
{
int i;
for ( i = 0; i < 4; i++ )
{
- stepper_config(machine, i, &starpoint_interface_48step);
+ stepper_config(machine(), i, &starpoint_interface_48step);
}
}
@@ -415,8 +416,6 @@ ADDRESS_MAP_END
// machine driver for system85 board //////////////////////////////////////
static MACHINE_CONFIG_START( bfmsys85, bfmsys85_state )
- MCFG_MACHINE_START(bfm_sys85) // main system85 board initialisation
- MCFG_MACHINE_RESET(bfm_sys85)
MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4) // 6809 CPU at 1 Mhz
MCFG_CPU_PROGRAM_MAP(memmap) // setup read and write memorymap
MCFG_CPU_PERIODIC_INT(timer_irq, 1000 ) // generate 1000 IRQ's per second
diff --git a/src/mame/drivers/big10.c b/src/mame/drivers/big10.c
index 9f52d765de2..bd608fbcca8 100644
--- a/src/mame/drivers/big10.c
+++ b/src/mame/drivers/big10.c
@@ -74,6 +74,7 @@ public:
UINT8 m_mux_data;
DECLARE_READ8_MEMBER(mux_r);
DECLARE_WRITE8_MEMBER(mux_w);
+ virtual void machine_reset();
};
@@ -100,7 +101,7 @@ static TIMER_DEVICE_CALLBACK( big10_interrupt )
* Machine Reset *
*************************************/
-static MACHINE_RESET(big10)
+void big10_state::machine_reset()
{
}
@@ -248,7 +249,6 @@ static MACHINE_CONFIG_START( big10, big10_state )
MCFG_CPU_IO_MAP(main_io)
MCFG_TIMER_ADD_SCANLINE("scantimer", big10_interrupt, "screen", 0, 1)
- MCFG_MACHINE_RESET(big10)
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/bigevglf.c b/src/mame/drivers/bigevglf.c
index fda5173534d..f80d0cfb797 100644
--- a/src/mame/drivers/bigevglf.c
+++ b/src/mame/drivers/bigevglf.c
@@ -416,76 +416,74 @@ static const msm5232_interface msm5232_config =
{ 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6 } /* 0.65 (???) uF capacitors */
};
-static MACHINE_START( bigevglf )
+void bigevglf_state::machine_start()
{
- bigevglf_state *state = machine.driver_data<bigevglf_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_mcu = machine.device("mcu");
-
- state->save_item(NAME(state->m_vidram_bank));
- state->save_item(NAME(state->m_plane_selected));
- state->save_item(NAME(state->m_plane_visible));
-
- state->save_item(NAME(state->m_beg13_ls74));
- state->save_item(NAME(state->m_beg_bank));
- state->save_item(NAME(state->m_port_select));
-
- state->save_item(NAME(state->m_sound_nmi_enable));
- state->save_item(NAME(state->m_pending_nmi));
- state->save_item(NAME(state->m_for_sound));
- state->save_item(NAME(state->m_from_sound));
- state->save_item(NAME(state->m_sound_state));
-
- state->save_item(NAME(state->m_main_sent));
- state->save_item(NAME(state->m_mcu_sent));
- state->save_item(NAME(state->m_mcu_coin_bit5));
-
- state->save_item(NAME(state->m_port_a_in));
- state->save_item(NAME(state->m_port_a_out));
- state->save_item(NAME(state->m_ddr_a));
- state->save_item(NAME(state->m_port_b_in));
- state->save_item(NAME(state->m_port_b_out));
- state->save_item(NAME(state->m_ddr_b));
- state->save_item(NAME(state->m_port_c_in));
- state->save_item(NAME(state->m_port_c_out));
- state->save_item(NAME(state->m_ddr_c));
- state->save_item(NAME(state->m_from_mcu));
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_mcu = machine().device("mcu");
+
+ save_item(NAME(m_vidram_bank));
+ save_item(NAME(m_plane_selected));
+ save_item(NAME(m_plane_visible));
+
+ save_item(NAME(m_beg13_ls74));
+ save_item(NAME(m_beg_bank));
+ save_item(NAME(m_port_select));
+
+ save_item(NAME(m_sound_nmi_enable));
+ save_item(NAME(m_pending_nmi));
+ save_item(NAME(m_for_sound));
+ save_item(NAME(m_from_sound));
+ save_item(NAME(m_sound_state));
+
+ save_item(NAME(m_main_sent));
+ save_item(NAME(m_mcu_sent));
+ save_item(NAME(m_mcu_coin_bit5));
+
+ save_item(NAME(m_port_a_in));
+ save_item(NAME(m_port_a_out));
+ save_item(NAME(m_ddr_a));
+ save_item(NAME(m_port_b_in));
+ save_item(NAME(m_port_b_out));
+ save_item(NAME(m_ddr_b));
+ save_item(NAME(m_port_c_in));
+ save_item(NAME(m_port_c_out));
+ save_item(NAME(m_ddr_c));
+ save_item(NAME(m_from_mcu));
}
-static MACHINE_RESET( bigevglf )
+void bigevglf_state::machine_reset()
{
- bigevglf_state *state = machine.driver_data<bigevglf_state>();
- state->m_vidram_bank = 0;
- state->m_plane_selected = 0;
- state->m_plane_visible = 0;
-
- state->m_beg13_ls74[0] = 0;
- state->m_beg13_ls74[1] = 0;
- state->m_beg_bank = 0;
- state->m_port_select = 0;
-
- state->m_sound_nmi_enable = 0;
- state->m_pending_nmi = 0;
- state->m_for_sound = 0;
- state->m_from_sound = 0;
- state->m_sound_state = 0;
-
- state->m_main_sent = 0;
- state->m_mcu_sent = 0;
- state->m_mcu_coin_bit5 = 0;
-
- state->m_port_a_in = 0;
- state->m_port_a_out = 0;
- state->m_ddr_a = 0;
- state->m_port_b_in = 0;
- state->m_port_b_out = 0;
- state->m_ddr_b = 0;
- state->m_port_c_in = 0;
- state->m_port_c_out = 0;
- state->m_ddr_c = 0;
- state->m_from_mcu = 0;
+ m_vidram_bank = 0;
+ m_plane_selected = 0;
+ m_plane_visible = 0;
+
+ m_beg13_ls74[0] = 0;
+ m_beg13_ls74[1] = 0;
+ m_beg_bank = 0;
+ m_port_select = 0;
+
+ m_sound_nmi_enable = 0;
+ m_pending_nmi = 0;
+ m_for_sound = 0;
+ m_from_sound = 0;
+ m_sound_state = 0;
+
+ m_main_sent = 0;
+ m_mcu_sent = 0;
+ m_mcu_coin_bit5 = 0;
+
+ m_port_a_in = 0;
+ m_port_a_out = 0;
+ m_ddr_a = 0;
+ m_port_b_in = 0;
+ m_port_b_out = 0;
+ m_ddr_b = 0;
+ m_port_c_in = 0;
+ m_port_c_out = 0;
+ m_ddr_c = 0;
+ m_from_mcu = 0;
}
@@ -513,8 +511,6 @@ static MACHINE_CONFIG_START( bigevglf, bigevglf_state )
MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - interleaving is forced on the fly */
- MCFG_MACHINE_START(bigevglf)
- MCFG_MACHINE_RESET(bigevglf)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -526,7 +522,6 @@ static MACHINE_CONFIG_START( bigevglf, bigevglf_state )
MCFG_GFXDECODE(bigevglf)
MCFG_PALETTE_LENGTH(0x800)
- MCFG_VIDEO_START(bigevglf)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/bigstrkb.c b/src/mame/drivers/bigstrkb.c
index 968dbe2d396..b3d496b7098 100644
--- a/src/mame/drivers/bigstrkb.c
+++ b/src/mame/drivers/bigstrkb.c
@@ -211,7 +211,6 @@ static MACHINE_CONFIG_START( bigstrkb, bigstrkb_state )
MCFG_PALETTE_LENGTH(0x400)
- MCFG_VIDEO_START(bigstrkb)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
// MCFG_SOUND_ADD("ymsnd", YM2151, ym2151_config)
diff --git a/src/mame/drivers/bingoc.c b/src/mame/drivers/bingoc.c
index 3981e3fac30..8715e85627b 100644
--- a/src/mame/drivers/bingoc.c
+++ b/src/mame/drivers/bingoc.c
@@ -45,12 +45,13 @@ public:
DECLARE_READ8_MEMBER(sound_test_r);
DECLARE_WRITE16_MEMBER(main_sound_latch_w);
DECLARE_WRITE8_MEMBER(bingoc_play_w);
+ virtual void video_start();
};
#define SOUND_TEST 0
-static VIDEO_START(bingoc)
+void bingoc_state::video_start()
{
}
@@ -163,7 +164,6 @@ static MACHINE_CONFIG_START( bingoc, bingoc_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(bingoc)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") //might just be mono...
diff --git a/src/mame/drivers/bingor.c b/src/mame/drivers/bingor.c
index ccc18592925..f74486fe2f4 100644
--- a/src/mame/drivers/bingor.c
+++ b/src/mame/drivers/bingor.c
@@ -453,10 +453,11 @@ public:
required_shared_ptr<UINT16> m_blit_ram;
DECLARE_READ16_MEMBER(test_r);
DECLARE_READ8_MEMBER(test8_r);
+ virtual void video_start();
};
-static VIDEO_START(bingor)
+void bingor_state::video_start()
{
}
@@ -638,7 +639,6 @@ static MACHINE_CONFIG_START( bingor, bingor_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(bingor)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("saa", SAA1099, 6000000 )
diff --git a/src/mame/drivers/bionicc.c b/src/mame/drivers/bionicc.c
index 19f599a6e79..04e4785a47a 100644
--- a/src/mame/drivers/bionicc.c
+++ b/src/mame/drivers/bionicc.c
@@ -328,27 +328,25 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_START( bionicc )
+void bionicc_state::machine_start()
{
- bionicc_state *state = machine.driver_data<bionicc_state>();
- state->save_item(NAME(state->m_soundcommand));
- state->save_item(NAME(state->m_inp));
- state->save_item(NAME(state->m_scroll));
+ save_item(NAME(m_soundcommand));
+ save_item(NAME(m_inp));
+ save_item(NAME(m_scroll));
}
-static MACHINE_RESET( bionicc )
+void bionicc_state::machine_reset()
{
- bionicc_state *state = machine.driver_data<bionicc_state>();
-
- state->m_inp[0] = 0;
- state->m_inp[1] = 0;
- state->m_inp[2] = 0;
- state->m_scroll[0] = 0;
- state->m_scroll[1] = 0;
- state->m_scroll[2] = 0;
- state->m_scroll[3] = 0;
- state->m_soundcommand = 0;
+
+ m_inp[0] = 0;
+ m_inp[1] = 0;
+ m_inp[2] = 0;
+ m_scroll[0] = 0;
+ m_scroll[1] = 0;
+ m_scroll[2] = 0;
+ m_scroll[3] = 0;
+ m_soundcommand = 0;
}
static MACHINE_CONFIG_START( bionicc, bionicc_state )
@@ -366,8 +364,6 @@ static MACHINE_CONFIG_START( bionicc, bionicc_state )
*/
MCFG_CPU_PERIODIC_INT(nmi_line_pulse,4*60)
- MCFG_MACHINE_START(bionicc)
- MCFG_MACHINE_RESET(bionicc)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -381,7 +377,6 @@ static MACHINE_CONFIG_START( bionicc, bionicc_state )
MCFG_GFXDECODE(bionicc)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(bionicc)
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
diff --git a/src/mame/drivers/bishi.c b/src/mame/drivers/bishi.c
index 28ff0f899ce..a5edbb3ddf9 100644
--- a/src/mame/drivers/bishi.c
+++ b/src/mame/drivers/bishi.c
@@ -388,24 +388,22 @@ static const k054338_interface bishi_k054338_intf =
"none"
};
-static MACHINE_START( bishi )
+void bishi_state::machine_start()
{
- bishi_state *state = machine.driver_data<bishi_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_k056832 = machine.device("k056832");
- state->m_k054338 = machine.device("k054338");
- state->m_k055555 = machine.device("k055555");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_k056832 = machine().device("k056832");
+ m_k054338 = machine().device("k054338");
+ m_k055555 = machine().device("k055555");
- state->save_item(NAME(state->m_cur_control));
- state->save_item(NAME(state->m_cur_control2));
+ save_item(NAME(m_cur_control));
+ save_item(NAME(m_cur_control2));
}
-static MACHINE_RESET( bishi )
+void bishi_state::machine_reset()
{
- bishi_state *state = machine.driver_data<bishi_state>();
- state->m_cur_control = 0;
- state->m_cur_control2 = 0;
+ m_cur_control = 0;
+ m_cur_control2 = 0;
}
static MACHINE_CONFIG_START( bishi, bishi_state )
@@ -415,8 +413,6 @@ static MACHINE_CONFIG_START( bishi, bishi_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_TIMER_ADD_SCANLINE("scantimer", bishi_scanline, "screen", 0, 1)
- MCFG_MACHINE_START(bishi)
- MCFG_MACHINE_RESET(bishi)
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK)
@@ -430,7 +426,6 @@ static MACHINE_CONFIG_START( bishi, bishi_state )
MCFG_PALETTE_LENGTH(4096)
- MCFG_VIDEO_START(bishi)
MCFG_K056832_ADD("k056832", bishi_k056832_intf)
MCFG_K054338_ADD("k054338", bishi_k054338_intf)
diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c
index 897e915470b..f136636ba05 100644
--- a/src/mame/drivers/bking.c
+++ b/src/mame/drivers/bking.c
@@ -388,82 +388,78 @@ static const ay8910_interface ay8910_config =
DEVCB_DRIVER_MEMBER(bking_state,port_b_w)
};
-static MACHINE_START( bking )
+void bking_state::machine_start()
{
- bking_state *state = machine.driver_data<bking_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
/* video */
- state->save_item(NAME(state->m_pc3259_output));
- state->save_item(NAME(state->m_pc3259_mask));
- state->save_item(NAME(state->m_xld1));
- state->save_item(NAME(state->m_xld2));
- state->save_item(NAME(state->m_xld3));
- state->save_item(NAME(state->m_yld1));
- state->save_item(NAME(state->m_yld2));
- state->save_item(NAME(state->m_yld3));
- state->save_item(NAME(state->m_ball1_pic));
- state->save_item(NAME(state->m_ball2_pic));
- state->save_item(NAME(state->m_crow_pic));
- state->save_item(NAME(state->m_crow_flip));
- state->save_item(NAME(state->m_palette_bank));
- state->save_item(NAME(state->m_controller));
- state->save_item(NAME(state->m_hit));
+ save_item(NAME(m_pc3259_output));
+ save_item(NAME(m_pc3259_mask));
+ save_item(NAME(m_xld1));
+ save_item(NAME(m_xld2));
+ save_item(NAME(m_xld3));
+ save_item(NAME(m_yld1));
+ save_item(NAME(m_yld2));
+ save_item(NAME(m_yld3));
+ save_item(NAME(m_ball1_pic));
+ save_item(NAME(m_ball2_pic));
+ save_item(NAME(m_crow_pic));
+ save_item(NAME(m_crow_flip));
+ save_item(NAME(m_palette_bank));
+ save_item(NAME(m_controller));
+ save_item(NAME(m_hit));
/* sound */
- state->save_item(NAME(state->m_sound_nmi_enable));
+ save_item(NAME(m_sound_nmi_enable));
}
-static MACHINE_START( bking3 )
+MACHINE_START_MEMBER(bking_state,bking3)
{
- bking_state *state = machine.driver_data<bking_state>();
- MACHINE_START_CALL(bking);
+ bking_state::machine_start();
/* misc */
- state->save_item(NAME(state->m_addr_h));
- state->save_item(NAME(state->m_addr_l));
+ save_item(NAME(m_addr_h));
+ save_item(NAME(m_addr_l));
}
-static MACHINE_RESET( bking )
+void bking_state::machine_reset()
{
- bking_state *state = machine.driver_data<bking_state>();
/* video */
- state->m_pc3259_output[0] = 0;
- state->m_pc3259_output[1] = 0;
- state->m_pc3259_output[2] = 0;
- state->m_pc3259_output[3] = 0;
- state->m_pc3259_mask = 0;
- state->m_xld1 = 0;
- state->m_xld2 = 0;
- state->m_xld3 = 0;
- state->m_yld1 = 0;
- state->m_yld2 = 0;
- state->m_yld3 = 0;
- state->m_ball1_pic = 0;
- state->m_ball2_pic = 0;
- state->m_crow_pic = 0;
- state->m_crow_flip = 0;
- state->m_palette_bank = 0;
- state->m_controller = 0;
- state->m_hit = 0;
+ m_pc3259_output[0] = 0;
+ m_pc3259_output[1] = 0;
+ m_pc3259_output[2] = 0;
+ m_pc3259_output[3] = 0;
+ m_pc3259_mask = 0;
+ m_xld1 = 0;
+ m_xld2 = 0;
+ m_xld3 = 0;
+ m_yld1 = 0;
+ m_yld2 = 0;
+ m_yld3 = 0;
+ m_ball1_pic = 0;
+ m_ball2_pic = 0;
+ m_crow_pic = 0;
+ m_crow_flip = 0;
+ m_palette_bank = 0;
+ m_controller = 0;
+ m_hit = 0;
/* sound */
- state->m_sound_nmi_enable = 1;
+ m_sound_nmi_enable = 1;
}
-static MACHINE_RESET( bking3 )
+MACHINE_RESET_MEMBER(bking_state,bking3)
{
- bking_state *state = machine.driver_data<bking_state>();
- machine.device("mcu")->execute().set_input_line(0, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(0, CLEAR_LINE);
- MACHINE_RESET_CALL(bking);
+ bking_state::machine_reset();
/* misc */
- state->m_addr_h = 0;
- state->m_addr_l = 0;
+ m_addr_h = 0;
+ m_addr_l = 0;
}
static MACHINE_CONFIG_START( bking, bking_state )
@@ -482,8 +478,6 @@ static MACHINE_CONFIG_START( bking, bking_state )
/* - periodic IRQ, with frequency 6000000/(4*16*16*10*16) = 36.621 Hz, */
MCFG_CPU_PERIODIC_INT(irq0_line_hold, (double)6000000/(4*16*16*10*16))
- MCFG_MACHINE_START(bking)
- MCFG_MACHINE_RESET(bking)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -497,8 +491,6 @@ static MACHINE_CONFIG_START( bking, bking_state )
MCFG_GFXDECODE(bking)
MCFG_PALETTE_LENGTH(4*8+4*4+4*2+4*2)
- MCFG_PALETTE_INIT(bking)
- MCFG_VIDEO_START(bking)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -523,8 +515,8 @@ static MACHINE_CONFIG_DERIVED( bking3, bking )
MCFG_CPU_PROGRAM_MAP(buggychl_mcu_map)
MCFG_DEVICE_ADD("bmcu", BUGGYCHL_MCU, 0)
- MCFG_MACHINE_START(bking3)
- MCFG_MACHINE_RESET(bking3)
+ MCFG_MACHINE_START_OVERRIDE(bking_state,bking3)
+ MCFG_MACHINE_RESET_OVERRIDE(bking_state,bking3)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/blackt96.c b/src/mame/drivers/blackt96.c
index 55941f860b6..352d4215baa 100644
--- a/src/mame/drivers/blackt96.c
+++ b/src/mame/drivers/blackt96.c
@@ -130,6 +130,7 @@ public:
TILE_GET_INFO_MEMBER(get_bg5_tile_info);
TILE_GET_INFO_MEMBER(get_bg6_tile_info);
TILE_GET_INFO_MEMBER(get_bg7_tile_info);
+ virtual void video_start();
};
#define GET_INFO( ram ) \
@@ -159,27 +160,26 @@ WRITE16_MEMBER(blackt96_state::bg_videoram5_w) { COMBINE_DATA(&m_spriteram5[offs
WRITE16_MEMBER(blackt96_state::bg_videoram6_w) { COMBINE_DATA(&m_spriteram6[offset]); m_bg_tilemap[6]->mark_tile_dirty(offset/2); }
WRITE16_MEMBER(blackt96_state::bg_videoram7_w) { COMBINE_DATA(&m_spriteram7[offset]); m_bg_tilemap[7]->mark_tile_dirty(offset/2); }
-static VIDEO_START( blackt96 )
+void blackt96_state::video_start()
{
- blackt96_state *state = machine.driver_data<blackt96_state>();
- state->m_bg_tilemap[0] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg0_tile_info),state), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
- state->m_bg_tilemap[1] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg1_tile_info),state), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
- state->m_bg_tilemap[2] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg2_tile_info),state), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
- state->m_bg_tilemap[3] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg3_tile_info),state), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
- state->m_bg_tilemap[4] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg4_tile_info),state), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
- state->m_bg_tilemap[5] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg5_tile_info),state), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
- state->m_bg_tilemap[6] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg6_tile_info),state), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
- state->m_bg_tilemap[7] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg7_tile_info),state), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
-
- state->m_spriteram[0] = state->m_spriteram0;
- state->m_spriteram[1] = state->m_spriteram1;
- state->m_spriteram[2] = state->m_spriteram2;
- state->m_spriteram[3] = state->m_spriteram3;
- state->m_spriteram[4] = state->m_spriteram4;
- state->m_spriteram[5] = state->m_spriteram5;
- state->m_spriteram[6] = state->m_spriteram6;
- state->m_spriteram[7] = state->m_spriteram7;
+ m_bg_tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg0_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
+ m_bg_tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg1_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
+ m_bg_tilemap[2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg2_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
+ m_bg_tilemap[3] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg3_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
+ m_bg_tilemap[4] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg4_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
+ m_bg_tilemap[5] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg5_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
+ m_bg_tilemap[6] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg6_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
+ m_bg_tilemap[7] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blackt96_state::get_bg7_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 32, 32);
+
+ m_spriteram[0] = m_spriteram0;
+ m_spriteram[1] = m_spriteram1;
+ m_spriteram[2] = m_spriteram2;
+ m_spriteram[3] = m_spriteram3;
+ m_spriteram[4] = m_spriteram4;
+ m_spriteram[5] = m_spriteram5;
+ m_spriteram[6] = m_spriteram6;
+ m_spriteram[7] = m_spriteram7;
}
static void draw_strip(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int page, int column, int bg)
@@ -625,7 +625,6 @@ static MACHINE_CONFIG_START( blackt96, blackt96_state )
MCFG_PALETTE_LENGTH(0x800)
- MCFG_VIDEO_START(blackt96)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c
index 7d5a9296c3c..2e612ac28e5 100644
--- a/src/mame/drivers/bladestl.c
+++ b/src/mame/drivers/bladestl.c
@@ -301,33 +301,31 @@ static const k007420_interface bladestl_k007420_intf =
};
-static MACHINE_START( bladestl )
+void bladestl_state::machine_start()
{
- bladestl_state *state = machine.driver_data<bladestl_state>();
- UINT8 *ROM = state->memregion("maincpu")->base();
+ UINT8 *ROM = memregion("maincpu")->base();
- state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
+ membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_k007342 = machine.device("k007342");
- state->m_k007420 = machine.device("k007420");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_k007342 = machine().device("k007342");
+ m_k007420 = machine().device("k007420");
- state->save_item(NAME(state->m_spritebank));
- state->save_item(NAME(state->m_layer_colorbase));
- state->save_item(NAME(state->m_last_track));
+ save_item(NAME(m_spritebank));
+ save_item(NAME(m_layer_colorbase));
+ save_item(NAME(m_last_track));
}
-static MACHINE_RESET( bladestl )
+void bladestl_state::machine_reset()
{
- bladestl_state *state = machine.driver_data<bladestl_state>();
int i;
- state->m_layer_colorbase[0] = 0;
- state->m_layer_colorbase[1] = 1;
- state->m_spritebank = 0;
+ m_layer_colorbase[0] = 0;
+ m_layer_colorbase[1] = 1;
+ m_spritebank = 0;
for (i = 0; i < 4 ; i++)
- state->m_last_track[i] = 0;
+ m_last_track[i] = 0;
}
static MACHINE_CONFIG_START( bladestl, bladestl_state )
@@ -342,8 +340,6 @@ static MACHINE_CONFIG_START( bladestl, bladestl_state )
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_MACHINE_START(bladestl)
- MCFG_MACHINE_RESET(bladestl)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -354,7 +350,6 @@ static MACHINE_CONFIG_START( bladestl, bladestl_state )
MCFG_SCREEN_UPDATE_STATIC(bladestl)
MCFG_GFXDECODE(bladestl)
- MCFG_PALETTE_INIT(bladestl)
MCFG_PALETTE_LENGTH(32 + 16*16)
MCFG_K007342_ADD("k007342", bladestl_k007342_intf)
diff --git a/src/mame/drivers/blitz.c b/src/mame/drivers/blitz.c
index 9cd27e039b6..53fd019dfb2 100644
--- a/src/mame/drivers/blitz.c
+++ b/src/mame/drivers/blitz.c
@@ -311,6 +311,8 @@ public:
DECLARE_WRITE8_MEMBER(lamps_a_w);
DECLARE_WRITE8_MEMBER(sound_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
+ virtual void video_start();
+ virtual void palette_init();
};
@@ -352,10 +354,9 @@ TILE_GET_INFO_MEMBER(blitz_state::get_bg_tile_info)
}
-static VIDEO_START( megadpkr )
+void blitz_state::video_start()
{
- blitz_state *state = machine.driver_data<blitz_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(blitz_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(blitz_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
}
static SCREEN_UPDATE_IND16( megadpkr )
@@ -366,9 +367,9 @@ static SCREEN_UPDATE_IND16( megadpkr )
}
-static PALETTE_INIT( megadpkr )
+void blitz_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
/*
This hardware has a feature called BLUE KILLER.
Using the original intensity line, the PCB has a bridge
@@ -387,7 +388,7 @@ static PALETTE_INIT( megadpkr )
if (color_prom == 0) return;
- for (i = 0;i < machine.total_colors();i++)
+ for (i = 0;i < machine().total_colors();i++)
{
int bit0, bit1, bit2, bit3, r, g, b, bk;
@@ -407,7 +408,7 @@ static PALETTE_INIT( megadpkr )
bit2 = (color_prom[i] >> 2) & 0x01;
b = bk * (bit2 * 0xff);
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
}
}
@@ -814,9 +815,7 @@ static MACHINE_CONFIG_START( megadpkr, blitz_state )
MCFG_MC6845_ADD("crtc", MC6845, CPU_CLOCK, mc6845_intf)
MCFG_GFXDECODE(megadpkr)
- MCFG_PALETTE_INIT(megadpkr)
MCFG_PALETTE_LENGTH(256)
- MCFG_VIDEO_START(megadpkr)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c
index e42343d09a8..6e701be6207 100644
--- a/src/mame/drivers/blitz68k.c
+++ b/src/mame/drivers/blitz68k.c
@@ -171,6 +171,8 @@ public:
DECLARE_DRIVER_INIT(megadblj);
DECLARE_DRIVER_INIT(hermit);
DECLARE_DRIVER_INIT(dualgame);
+ DECLARE_VIDEO_START(blitz68k);
+ DECLARE_VIDEO_START(blitz68k_addr_factor1);
};
/*************************************************************************************************************
@@ -192,16 +194,15 @@ struct blit_t
int addr_factor;
} blit;
-static VIDEO_START(blitz68k)
+VIDEO_START_MEMBER(blitz68k_state,blitz68k)
{
- blitz68k_state *state = machine.driver_data<blitz68k_state>();
- state->m_blit_buffer = auto_alloc_array(machine, UINT8, 512*256);
+ m_blit_buffer = auto_alloc_array(machine(), UINT8, 512*256);
blit.addr_factor = 2;
}
-static VIDEO_START(blitz68k_addr_factor1)
+VIDEO_START_MEMBER(blitz68k_state,blitz68k_addr_factor1)
{
- VIDEO_START_CALL(blitz68k);
+ VIDEO_START_CALL_MEMBER(blitz68k);
blit.addr_factor = 1;
}
@@ -1727,7 +1728,7 @@ static MACHINE_CONFIG_START( ilpag, blitz68k_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(blitz68k)
+ MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)
@@ -1802,7 +1803,7 @@ static MACHINE_CONFIG_START( cjffruit, blitz68k_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(blitz68k)
+ MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1834,7 +1835,7 @@ static MACHINE_CONFIG_START( bankrob, blitz68k_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(blitz68k)
+ MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1864,7 +1865,7 @@ static MACHINE_CONFIG_START( bankroba, blitz68k_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(blitz68k_addr_factor1)
+ MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k_addr_factor1)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1893,7 +1894,7 @@ static MACHINE_CONFIG_START( deucesw2, blitz68k_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(blitz68k)
+ MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1924,7 +1925,7 @@ static MACHINE_CONFIG_START( dualgame, blitz68k_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(blitz68k)
+ MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1953,7 +1954,7 @@ static MACHINE_CONFIG_START( hermit, blitz68k_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(blitz68k)
+ MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/blktiger.c b/src/mame/drivers/blktiger.c
index 570ad95a5d2..4ea40332110 100644
--- a/src/mame/drivers/blktiger.c
+++ b/src/mame/drivers/blktiger.c
@@ -275,42 +275,40 @@ static const ym2203_interface ym2203_config =
DEVCB_LINE(irqhandler)
};
-static MACHINE_START( blktiger )
+void blktiger_state::machine_start()
{
- blktiger_state *state = machine.driver_data<blktiger_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_mcu = machine.device("mcu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_mcu = machine().device("mcu");
/* configure bankswitching */
- state->membank("bank1")->configure_entries(0, 16, state->memregion("maincpu")->base() + 0x10000, 0x4000);
-
- state->save_item(NAME(state->m_scroll_bank));
- state->save_item(NAME(state->m_screen_layout));
- state->save_item(NAME(state->m_chon));
- state->save_item(NAME(state->m_objon));
- state->save_item(NAME(state->m_bgon));
- state->save_item(NAME(state->m_z80_latch));
- state->save_item(NAME(state->m_i8751_latch));
- state->save_item(NAME(state->m_scroll_x));
- state->save_item(NAME(state->m_scroll_y));
+ membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000);
+
+ save_item(NAME(m_scroll_bank));
+ save_item(NAME(m_screen_layout));
+ save_item(NAME(m_chon));
+ save_item(NAME(m_objon));
+ save_item(NAME(m_bgon));
+ save_item(NAME(m_z80_latch));
+ save_item(NAME(m_i8751_latch));
+ save_item(NAME(m_scroll_x));
+ save_item(NAME(m_scroll_y));
}
-static MACHINE_RESET( blktiger )
+void blktiger_state::machine_reset()
{
- blktiger_state *state = machine.driver_data<blktiger_state>();
/* configure bankswitching */
- state->membank("bank1")->configure_entries(0, 16, state->memregion("maincpu")->base() + 0x10000, 0x4000);
-
- state->m_scroll_x[0] = 0;
- state->m_scroll_x[1] = 0;
- state->m_scroll_y[0] = 0;
- state->m_scroll_y[1] = 0;
- state->m_scroll_bank = 0;
- state->m_screen_layout = 0;
- state->m_z80_latch = 0;
- state->m_i8751_latch = 0;
+ membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000);
+
+ m_scroll_x[0] = 0;
+ m_scroll_x[1] = 0;
+ m_scroll_y[0] = 0;
+ m_scroll_y[1] = 0;
+ m_scroll_bank = 0;
+ m_screen_layout = 0;
+ m_z80_latch = 0;
+ m_i8751_latch = 0;
}
static MACHINE_CONFIG_START( blktiger, blktiger_state )
@@ -329,8 +327,6 @@ static MACHINE_CONFIG_START( blktiger, blktiger_state )
MCFG_CPU_IO_MAP(blktiger_mcu_io_map)
//MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_MACHINE_START(blktiger)
- MCFG_MACHINE_RESET(blktiger)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -344,7 +340,6 @@ static MACHINE_CONFIG_START( blktiger, blktiger_state )
MCFG_GFXDECODE(blktiger)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(blktiger)
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
diff --git a/src/mame/drivers/blmbycar.c b/src/mame/drivers/blmbycar.c
index 9f5acc4d0a4..840572d22d7 100644
--- a/src/mame/drivers/blmbycar.c
+++ b/src/mame/drivers/blmbycar.c
@@ -335,20 +335,18 @@ GFXDECODE_END
***************************************************************************/
-static MACHINE_START( blmbycar )
+MACHINE_START_MEMBER(blmbycar_state,blmbycar)
{
- blmbycar_state *state = machine.driver_data<blmbycar_state>();
- state->save_item(NAME(state->m_pot_wheel));
- state->save_item(NAME(state->m_old_val));
+ save_item(NAME(m_pot_wheel));
+ save_item(NAME(m_old_val));
}
-static MACHINE_RESET( blmbycar )
+MACHINE_RESET_MEMBER(blmbycar_state,blmbycar)
{
- blmbycar_state *state = machine.driver_data<blmbycar_state>();
- state->m_pot_wheel = 0;
- state->m_old_val = 0;
+ m_pot_wheel = 0;
+ m_old_val = 0;
}
@@ -359,8 +357,8 @@ static MACHINE_CONFIG_START( blmbycar, blmbycar_state )
MCFG_CPU_PROGRAM_MAP(blmbycar_map)
MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)
- MCFG_MACHINE_START(blmbycar)
- MCFG_MACHINE_RESET(blmbycar)
+ MCFG_MACHINE_START_OVERRIDE(blmbycar_state,blmbycar)
+ MCFG_MACHINE_RESET_OVERRIDE(blmbycar_state,blmbycar)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -373,7 +371,6 @@ static MACHINE_CONFIG_START( blmbycar, blmbycar_state )
MCFG_GFXDECODE(blmbycar)
MCFG_PALETTE_LENGTH(0x300)
- MCFG_VIDEO_START(blmbycar)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -384,18 +381,16 @@ static MACHINE_CONFIG_START( blmbycar, blmbycar_state )
MACHINE_CONFIG_END
-static MACHINE_START( watrball )
+MACHINE_START_MEMBER(blmbycar_state,watrball)
{
- blmbycar_state *state = machine.driver_data<blmbycar_state>();
- state->save_item(NAME(state->m_retvalue));
+ save_item(NAME(m_retvalue));
}
-static MACHINE_RESET( watrball )
+MACHINE_RESET_MEMBER(blmbycar_state,watrball)
{
- blmbycar_state *state = machine.driver_data<blmbycar_state>();
- state->m_retvalue = 0;
+ m_retvalue = 0;
}
static MACHINE_CONFIG_START( watrball, blmbycar_state )
@@ -405,8 +400,8 @@ static MACHINE_CONFIG_START( watrball, blmbycar_state )
MCFG_CPU_PROGRAM_MAP(watrball_map)
MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)
- MCFG_MACHINE_START(watrball)
- MCFG_MACHINE_RESET(watrball)
+ MCFG_MACHINE_START_OVERRIDE(blmbycar_state,watrball)
+ MCFG_MACHINE_RESET_OVERRIDE(blmbycar_state,watrball)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -419,7 +414,6 @@ static MACHINE_CONFIG_START( watrball, blmbycar_state )
MCFG_GFXDECODE(blmbycar)
MCFG_PALETTE_LENGTH(0x300)
- MCFG_VIDEO_START(blmbycar)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/blockade.c b/src/mame/drivers/blockade.c
index 49ee1fc5965..a19d7cc77e6 100644
--- a/src/mame/drivers/blockade.c
+++ b/src/mame/drivers/blockade.c
@@ -439,10 +439,10 @@ static GFXDECODE_START( blasto )
GFXDECODE_ENTRY( "gfx1", 0x0000, blasto_layout, 0, 1 )
GFXDECODE_END
-static PALETTE_INIT( blockade )
+void blockade_state::palette_init()
{
- palette_set_color(machine,0,MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
- palette_set_color(machine,1,MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
+ palette_set_color(machine(),0,MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
+ palette_set_color(machine(),1,MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
}
@@ -452,20 +452,18 @@ static PALETTE_INIT( blockade )
*
*************************************/
-static MACHINE_START( blockade )
+void blockade_state::machine_start()
{
- blockade_state *state = machine.driver_data<blockade_state>();
- state->save_item(NAME(state->m_coin_latch));
- state->save_item(NAME(state->m_just_been_reset));
+ save_item(NAME(m_coin_latch));
+ save_item(NAME(m_just_been_reset));
}
-static MACHINE_RESET( blockade )
+void blockade_state::machine_reset()
{
- blockade_state *state = machine.driver_data<blockade_state>();
- state->m_coin_latch = 1;
- state->m_just_been_reset = 0;
+ m_coin_latch = 1;
+ m_just_been_reset = 0;
}
static MACHINE_CONFIG_START( blockade, blockade_state )
@@ -476,8 +474,6 @@ static MACHINE_CONFIG_START( blockade, blockade_state )
MCFG_CPU_IO_MAP(main_io_map)
MCFG_CPU_VBLANK_INT("screen", blockade_interrupt)
- MCFG_MACHINE_START(blockade)
- MCFG_MACHINE_RESET(blockade)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -490,8 +486,6 @@ static MACHINE_CONFIG_START( blockade, blockade_state )
MCFG_GFXDECODE(blockade)
MCFG_PALETTE_LENGTH(2)
- MCFG_PALETTE_INIT(blockade)
- MCFG_VIDEO_START(blockade)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/blockhl.c b/src/mame/drivers/blockhl.c
index fa53f9e224a..05aaf75c538 100644
--- a/src/mame/drivers/blockhl.c
+++ b/src/mame/drivers/blockhl.c
@@ -186,30 +186,28 @@ static const k051960_interface blockhl_k051960_intf =
blockhl_sprite_callback
};
-static MACHINE_START( blockhl )
+void blockhl_state::machine_start()
{
- blockhl_state *state = machine.driver_data<blockhl_state>();
- UINT8 *ROM = state->memregion("maincpu")->base();
+ UINT8 *ROM = memregion("maincpu")->base();
- state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
+ membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_k052109 = machine.device("k052109");
- state->m_k051960 = machine.device("k051960");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_k052109 = machine().device("k052109");
+ m_k051960 = machine().device("k051960");
- state->save_item(NAME(state->m_palette_selected));
- state->save_item(NAME(state->m_rombank));
+ save_item(NAME(m_palette_selected));
+ save_item(NAME(m_rombank));
}
-static MACHINE_RESET( blockhl )
+void blockhl_state::machine_reset()
{
- blockhl_state *state = machine.driver_data<blockhl_state>();
- konami_configure_set_lines(machine.device("maincpu"), blockhl_banking);
+ konami_configure_set_lines(machine().device("maincpu"), blockhl_banking);
- state->m_palette_selected = 0;
- state->m_rombank = 0;
+ m_palette_selected = 0;
+ m_rombank = 0;
}
static MACHINE_CONFIG_START( blockhl, blockhl_state )
@@ -222,8 +220,6 @@ static MACHINE_CONFIG_START( blockhl, blockhl_state )
MCFG_CPU_ADD("audiocpu", Z80, 3579545)
MCFG_CPU_PROGRAM_MAP(audio_map)
- MCFG_MACHINE_START(blockhl)
- MCFG_MACHINE_RESET(blockhl)
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
@@ -237,7 +233,6 @@ static MACHINE_CONFIG_START( blockhl, blockhl_state )
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(blockhl)
MCFG_K052109_ADD("k052109", blockhl_k052109_intf)
MCFG_K051960_ADD("k051960", blockhl_k051960_intf)
diff --git a/src/mame/drivers/blockout.c b/src/mame/drivers/blockout.c
index 1ea6719df85..00633d433b3 100644
--- a/src/mame/drivers/blockout.c
+++ b/src/mame/drivers/blockout.c
@@ -278,21 +278,19 @@ static const ym2151_interface ym2151_config =
*
*************************************/
-static MACHINE_START( blockout )
+void blockout_state::machine_start()
{
- blockout_state *state = machine.driver_data<blockout_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_color));
+ save_item(NAME(m_color));
}
-static MACHINE_RESET( blockout )
+void blockout_state::machine_reset()
{
- blockout_state *state = machine.driver_data<blockout_state>();
- state->m_color = 0;
+ m_color = 0;
}
static TIMER_DEVICE_CALLBACK( blockout_scanline )
@@ -317,8 +315,6 @@ static MACHINE_CONFIG_START( blockout, blockout_state )
MCFG_CPU_ADD("audiocpu", Z80, AUDIO_CLOCK) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(audio_map)
- MCFG_MACHINE_START(blockout)
- MCFG_MACHINE_RESET(blockout)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -330,7 +326,6 @@ static MACHINE_CONFIG_START( blockout, blockout_state )
MCFG_PALETTE_LENGTH(513)
- MCFG_VIDEO_START(blockout)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/bloodbro.c b/src/mame/drivers/bloodbro.c
index b39c8a9c7ef..d5d462376f7 100644
--- a/src/mame/drivers/bloodbro.c
+++ b/src/mame/drivers/bloodbro.c
@@ -454,7 +454,6 @@ static MACHINE_CONFIG_START( bloodbro, bloodbro_state )
MCFG_GFXDECODE(bloodbro)
MCFG_PALETTE_LENGTH(2048)
- MCFG_VIDEO_START(bloodbro)
// sound hardware
SEIBU_SOUND_SYSTEM_YM3812_RAIDEN_INTERFACE(XTAL_7_15909MHz/2, XTAL_12MHz/12)
diff --git a/src/mame/drivers/blstroid.c b/src/mame/drivers/blstroid.c
index bbd838cf680..4cc18aa8220 100644
--- a/src/mame/drivers/blstroid.c
+++ b/src/mame/drivers/blstroid.c
@@ -47,19 +47,18 @@ WRITE16_MEMBER(blstroid_state::blstroid_halt_until_hblank_0_w)
}
-static MACHINE_START( blstroid )
+MACHINE_START_MEMBER(blstroid_state,blstroid)
{
- atarigen_init(machine);
+ atarigen_init(machine());
}
-static MACHINE_RESET( blstroid )
+MACHINE_RESET_MEMBER(blstroid_state,blstroid)
{
- blstroid_state *state = machine.driver_data<blstroid_state>();
- atarigen_eeprom_reset(state);
- atarigen_interrupt_reset(state, update_interrupts);
- atarigen_scanline_timer_reset(*machine.primary_screen, blstroid_scanline_update, 8);
+ atarigen_eeprom_reset(this);
+ atarigen_interrupt_reset(this, update_interrupts);
+ atarigen_scanline_timer_reset(*machine().primary_screen, blstroid_scanline_update, 8);
atarijsa_reset();
}
@@ -207,8 +206,8 @@ static MACHINE_CONFIG_START( blstroid, blstroid_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
- MCFG_MACHINE_START(blstroid)
- MCFG_MACHINE_RESET(blstroid)
+ MCFG_MACHINE_START_OVERRIDE(blstroid_state,blstroid)
+ MCFG_MACHINE_RESET_OVERRIDE(blstroid_state,blstroid)
MCFG_NVRAM_ADD_1FILL("eeprom")
/* video hardware */
@@ -222,7 +221,7 @@ static MACHINE_CONFIG_START( blstroid, blstroid_state )
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 320*2, 262, 0, 240)
MCFG_SCREEN_UPDATE_STATIC(blstroid)
- MCFG_VIDEO_START(blstroid)
+ MCFG_VIDEO_START_OVERRIDE(blstroid_state,blstroid)
/* sound hardware */
MCFG_FRAGMENT_ADD(jsa_i_stereo)
diff --git a/src/mame/drivers/blueprnt.c b/src/mame/drivers/blueprnt.c
index 4ca76660a32..be92f5ebdb4 100644
--- a/src/mame/drivers/blueprnt.c
+++ b/src/mame/drivers/blueprnt.c
@@ -275,21 +275,19 @@ static const ay8910_interface ay8910_interface_2 =
*
*************************************/
-static MACHINE_START( blueprnt )
+void blueprnt_state::machine_start()
{
- blueprnt_state *state = machine.driver_data<blueprnt_state>();
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_dipsw));
+ save_item(NAME(m_dipsw));
}
-static MACHINE_RESET( blueprnt )
+void blueprnt_state::machine_reset()
{
- blueprnt_state *state = machine.driver_data<blueprnt_state>();
- state->m_gfx_bank = 0;
- state->m_dipsw = 0;
+ m_gfx_bank = 0;
+ m_dipsw = 0;
}
@@ -305,8 +303,6 @@ static MACHINE_CONFIG_START( blueprnt, blueprnt_state )
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) // IRQs connected to 32V
// NMIs are caused by the main CPU
- MCFG_MACHINE_START(blueprnt)
- MCFG_MACHINE_RESET(blueprnt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -319,8 +315,6 @@ static MACHINE_CONFIG_START( blueprnt, blueprnt_state )
MCFG_GFXDECODE(blueprnt)
MCFG_PALETTE_LENGTH(128*4+8)
- MCFG_PALETTE_INIT(blueprnt)
- MCFG_VIDEO_START(blueprnt)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c
index 0e374573a19..804ebdc30d1 100644
--- a/src/mame/drivers/bmcbowl.c
+++ b/src/mame/drivers/bmcbowl.c
@@ -135,6 +135,8 @@ public:
DECLARE_READ8_MEMBER(dips1_r);
DECLARE_WRITE8_MEMBER(input_mux_w);
DECLARE_DRIVER_INIT(bmcbowl);
+ virtual void machine_reset();
+ virtual void video_start();
};
@@ -142,7 +144,7 @@ public:
#define NVRAM_HACK
-static VIDEO_START( bmcbowl )
+void bmcbowl_state::video_start()
{
}
@@ -494,7 +496,7 @@ static const via6522_interface via_interface =
/*irq */ DEVCB_DRIVER_MEMBER(bmcbowl_state,via_irq)
};
-static MACHINE_RESET( bmcbowl )
+void bmcbowl_state::machine_reset()
{
}
@@ -512,10 +514,8 @@ static MACHINE_CONFIG_START( bmcbowl, bmcbowl_state )
MCFG_PALETTE_LENGTH(256)
- MCFG_VIDEO_START(bmcbowl)
MCFG_NVRAM_HANDLER(bmcbowl)
- MCFG_MACHINE_RESET(bmcbowl)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/bmcpokr.c b/src/mame/drivers/bmcpokr.c
index 2111acc7d9f..b9dc2ccca9a 100644
--- a/src/mame/drivers/bmcpokr.c
+++ b/src/mame/drivers/bmcpokr.c
@@ -59,6 +59,7 @@ public:
required_device<cpu_device> m_maincpu;
required_shared_ptr<UINT16> m_videoram;
+ virtual void video_start();
};
@@ -220,7 +221,7 @@ SCREEN_UPDATE_IND16( bmcpokr )
return 0;
}
-VIDEO_START(bmcpokr)
+void bmcpokr_state::video_start()
{
}
@@ -242,7 +243,6 @@ static MACHINE_CONFIG_START( bmcpokr, bmcpokr_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1)
MCFG_PALETTE_LENGTH(256)
- MCFG_VIDEO_START(bmcpokr)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index ed86bd1a57b..e5203e771ac 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -153,6 +153,8 @@ public:
TILE_GET_INFO_MEMBER(get_ms32_bg1_tile_info);
TILE_GET_INFO_MEMBER(get_ms32_roz0_tile_info);
TILE_GET_INFO_MEMBER(get_ms32_roz1_tile_info);
+ virtual void machine_reset();
+ virtual void video_start();
};
@@ -504,23 +506,22 @@ WRITE32_MEMBER(bnstars_state::ms32_spramx_w)
}
-static VIDEO_START(bnstars)
+void bnstars_state::video_start()
{
- bnstars_state *state = machine.driver_data<bnstars_state>();
- state->m_ms32_tx_tilemap[0] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_tx0_tile_info),state),TILEMAP_SCAN_ROWS, 8, 8,64,64);
- state->m_ms32_tx_tilemap[1] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_tx1_tile_info),state),TILEMAP_SCAN_ROWS, 8, 8,64,64);
- state->m_ms32_tx_tilemap[0]->set_transparent_pen(0);
- state->m_ms32_tx_tilemap[1]->set_transparent_pen(0);
+ m_ms32_tx_tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_tx0_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,64);
+ m_ms32_tx_tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_tx1_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,64);
+ m_ms32_tx_tilemap[0]->set_transparent_pen(0);
+ m_ms32_tx_tilemap[1]->set_transparent_pen(0);
- state->m_ms32_bg_tilemap[0] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_bg0_tile_info),state),TILEMAP_SCAN_ROWS,16,16,64,64);
- state->m_ms32_bg_tilemap[1] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_bg1_tile_info),state),TILEMAP_SCAN_ROWS,16,16,64,64);
- state->m_ms32_bg_tilemap[0]->set_transparent_pen(0);
- state->m_ms32_bg_tilemap[1]->set_transparent_pen(0);
+ m_ms32_bg_tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_bg0_tile_info),this),TILEMAP_SCAN_ROWS,16,16,64,64);
+ m_ms32_bg_tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_bg1_tile_info),this),TILEMAP_SCAN_ROWS,16,16,64,64);
+ m_ms32_bg_tilemap[0]->set_transparent_pen(0);
+ m_ms32_bg_tilemap[1]->set_transparent_pen(0);
- state->m_ms32_roz_tilemap[0] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_roz0_tile_info),state),TILEMAP_SCAN_ROWS,16,16,128,128);
- state->m_ms32_roz_tilemap[1] = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_roz1_tile_info),state),TILEMAP_SCAN_ROWS,16,16,128,128);
- state->m_ms32_roz_tilemap[0]->set_transparent_pen(0);
- state->m_ms32_roz_tilemap[1]->set_transparent_pen(0);
+ m_ms32_roz_tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_roz0_tile_info),this),TILEMAP_SCAN_ROWS,16,16,128,128);
+ m_ms32_roz_tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bnstars_state::get_ms32_roz1_tile_info),this),TILEMAP_SCAN_ROWS,16,16,128,128);
+ m_ms32_roz_tilemap[0]->set_transparent_pen(0);
+ m_ms32_roz_tilemap[1]->set_transparent_pen(0);
}
@@ -1366,9 +1367,9 @@ static TIMER_DEVICE_CALLBACK(ms32_interrupt)
if( (scanline % 8) == 0 && scanline <= 224 ) irq_raise(timer.machine(), 0);
}
-static MACHINE_RESET( ms32 )
+void bnstars_state::machine_reset()
{
- irq_init(machine);
+ irq_init(machine());
}
@@ -1384,7 +1385,6 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state )
MCFG_QUANTUM_TIME(attotime::from_hz(60000))
- MCFG_MACHINE_RESET(ms32)
MCFG_GFXDECODE(bnstars)
MCFG_PALETTE_LENGTH(0x8000*2)
@@ -1405,7 +1405,6 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
MCFG_SCREEN_UPDATE_STATIC(bnstars_right)
- MCFG_VIDEO_START(bnstars)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/bogeyman.c b/src/mame/drivers/bogeyman.c
index e947d5dd261..80ea4db1bdd 100644
--- a/src/mame/drivers/bogeyman.c
+++ b/src/mame/drivers/bogeyman.c
@@ -202,20 +202,18 @@ GFXDECODE_END
/* Machine Driver */
-static MACHINE_START( bogeyman )
+void bogeyman_state::machine_start()
{
- bogeyman_state *state = machine.driver_data<bogeyman_state>();
- state->save_item(NAME(state->m_psg_latch));
- state->save_item(NAME(state->m_last_write));
+ save_item(NAME(m_psg_latch));
+ save_item(NAME(m_last_write));
}
-static MACHINE_RESET( bogeyman )
+void bogeyman_state::machine_reset()
{
- bogeyman_state *state = machine.driver_data<bogeyman_state>();
- state->m_psg_latch = 0;
- state->m_last_write = 0;
+ m_psg_latch = 0;
+ m_last_write = 0;
}
WRITE8_MEMBER(bogeyman_state::bogeyman_colbank_w)
@@ -245,8 +243,6 @@ static MACHINE_CONFIG_START( bogeyman, bogeyman_state )
MCFG_CPU_PROGRAM_MAP(bogeyman_map)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 16*60) // Controls sound
- MCFG_MACHINE_START(bogeyman)
- MCFG_MACHINE_RESET(bogeyman)
// video hardware
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
@@ -261,8 +257,6 @@ static MACHINE_CONFIG_START( bogeyman, bogeyman_state )
MCFG_GFXDECODE(bogeyman)
MCFG_PALETTE_LENGTH(16+256)
- MCFG_PALETTE_INIT(bogeyman)
- MCFG_VIDEO_START(bogeyman)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/bombjack.c b/src/mame/drivers/bombjack.c
index fa3b91586f2..7d712f285a6 100644
--- a/src/mame/drivers/bombjack.c
+++ b/src/mame/drivers/bombjack.c
@@ -331,21 +331,19 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_START( bombjack )
+void bombjack_state::machine_start()
{
- bombjack_state *state = machine.driver_data<bombjack_state>();
- state->save_item(NAME(state->m_latch));
- state->save_item(NAME(state->m_background_image));
+ save_item(NAME(m_latch));
+ save_item(NAME(m_background_image));
}
-static MACHINE_RESET( bombjack )
+void bombjack_state::machine_reset()
{
- bombjack_state *state = machine.driver_data<bombjack_state>();
- state->m_latch = 0;
- state->m_background_image = 0;
+ m_latch = 0;
+ m_background_image = 0;
}
@@ -369,8 +367,6 @@ static MACHINE_CONFIG_START( bombjack, bombjack_state )
MCFG_CPU_IO_MAP(audio_io_map)
MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse)
- MCFG_MACHINE_START(bombjack)
- MCFG_MACHINE_RESET(bombjack)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -383,7 +379,6 @@ static MACHINE_CONFIG_START( bombjack, bombjack_state )
MCFG_GFXDECODE(bombjack)
MCFG_PALETTE_LENGTH(128)
- MCFG_VIDEO_START(bombjack)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c
index 040be8d428b..7bc6501d96c 100644
--- a/src/mame/drivers/boogwing.c
+++ b/src/mame/drivers/boogwing.c
@@ -359,7 +359,6 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state )
MCFG_PALETTE_LENGTH(2048)
MCFG_GFXDECODE(boogwing)
- MCFG_VIDEO_START(boogwing)
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c
index 4ae64346731..aec462323cf 100644
--- a/src/mame/drivers/bottom9.c
+++ b/src/mame/drivers/bottom9.c
@@ -319,35 +319,33 @@ static const k051316_interface bottom9_k051316_intf =
bottom9_zoom_callback
};
-static MACHINE_START( bottom9 )
+void bottom9_state::machine_start()
{
- bottom9_state *state = machine.driver_data<bottom9_state>();
- UINT8 *ROM = state->memregion("maincpu")->base();
-
- state->membank("bank1")->configure_entries(0, 12, &ROM[0x10000], 0x2000);
-
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_k052109 = machine.device("k052109");
- state->m_k051960 = machine.device("k051960");
- state->m_k051316 = machine.device("k051316");
- state->m_k007232_1 = machine.device("k007232_1");
- state->m_k007232_2 = machine.device("k007232_2");
-
- state->save_item(NAME(state->m_video_enable));
- state->save_item(NAME(state->m_zoomreadroms));
- state->save_item(NAME(state->m_k052109_selected));
- state->save_item(NAME(state->m_nmienable));
+ UINT8 *ROM = memregion("maincpu")->base();
+
+ membank("bank1")->configure_entries(0, 12, &ROM[0x10000], 0x2000);
+
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_k052109 = machine().device("k052109");
+ m_k051960 = machine().device("k051960");
+ m_k051316 = machine().device("k051316");
+ m_k007232_1 = machine().device("k007232_1");
+ m_k007232_2 = machine().device("k007232_2");
+
+ save_item(NAME(m_video_enable));
+ save_item(NAME(m_zoomreadroms));
+ save_item(NAME(m_k052109_selected));
+ save_item(NAME(m_nmienable));
}
-static MACHINE_RESET( bottom9 )
+void bottom9_state::machine_reset()
{
- bottom9_state *state = machine.driver_data<bottom9_state>();
- state->m_video_enable = 0;
- state->m_zoomreadroms = 0;
- state->m_k052109_selected = 0;
- state->m_nmienable = 0;
+ m_video_enable = 0;
+ m_zoomreadroms = 0;
+ m_k052109_selected = 0;
+ m_nmienable = 0;
}
static MACHINE_CONFIG_START( bottom9, bottom9_state )
@@ -361,8 +359,6 @@ static MACHINE_CONFIG_START( bottom9, bottom9_state )
MCFG_CPU_PROGRAM_MAP(audio_map)
MCFG_CPU_PERIODIC_INT(bottom9_sound_interrupt,8*60) /* irq is triggered by the main CPU */
- MCFG_MACHINE_START(bottom9)
- MCFG_MACHINE_RESET(bottom9)
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
@@ -376,7 +372,6 @@ static MACHINE_CONFIG_START( bottom9, bottom9_state )
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(bottom9)
MCFG_K052109_ADD("k052109", bottom9_k052109_intf)
MCFG_K051960_ADD("k051960", bottom9_k051960_intf)
diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c
index beabae8fdb6..39d033416b7 100644
--- a/src/mame/drivers/boxer.c
+++ b/src/mame/drivers/boxer.c
@@ -46,6 +46,9 @@ public:
DECLARE_WRITE8_MEMBER(boxer_irq_reset_w);
DECLARE_WRITE8_MEMBER(boxer_crowd_w);
DECLARE_WRITE8_MEMBER(boxer_led_w);
+ virtual void machine_start();
+ virtual void machine_reset();
+ virtual void palette_init();
};
/*************************************
@@ -110,13 +113,13 @@ static TIMER_CALLBACK( periodic_callback )
*
*************************************/
-static PALETTE_INIT( boxer )
+void boxer_state::palette_init()
{
- palette_set_color(machine,0, MAKE_RGB(0x00,0x00,0x00));
- palette_set_color(machine,1, MAKE_RGB(0xff,0xff,0xff));
+ palette_set_color(machine(),0, MAKE_RGB(0x00,0x00,0x00));
+ palette_set_color(machine(),1, MAKE_RGB(0xff,0xff,0xff));
- palette_set_color(machine,2, MAKE_RGB(0xff,0xff,0xff));
- palette_set_color(machine,3, MAKE_RGB(0x00,0x00,0x00));
+ palette_set_color(machine(),2, MAKE_RGB(0xff,0xff,0xff));
+ palette_set_color(machine(),3, MAKE_RGB(0x00,0x00,0x00));
}
static void draw_boxer( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
@@ -422,23 +425,21 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_START( boxer )
+void boxer_state::machine_start()
{
- boxer_state *state = machine.driver_data<boxer_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
- state->save_item(NAME(state->m_pot_state));
- state->save_item(NAME(state->m_pot_latch));
+ save_item(NAME(m_pot_state));
+ save_item(NAME(m_pot_latch));
}
-static MACHINE_RESET( boxer )
+void boxer_state::machine_reset()
{
- boxer_state *state = machine.driver_data<boxer_state>();
- machine.scheduler().timer_set(machine.primary_screen->time_until_pos(0), FUNC(periodic_callback));
+ machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), FUNC(periodic_callback));
- state->m_pot_state = 0;
- state->m_pot_latch = 0;
+ m_pot_state = 0;
+ m_pot_latch = 0;
}
@@ -448,8 +449,6 @@ static MACHINE_CONFIG_START( boxer, boxer_state )
MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 16)
MCFG_CPU_PROGRAM_MAP(boxer_map)
- MCFG_MACHINE_START(boxer)
- MCFG_MACHINE_RESET(boxer)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -460,7 +459,6 @@ static MACHINE_CONFIG_START( boxer, boxer_state )
MCFG_GFXDECODE(boxer)
MCFG_PALETTE_LENGTH(4)
- MCFG_PALETTE_INIT(boxer)
/* sound hardware */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c
index 39a26245eed..7bebce964b9 100644
--- a/src/mame/drivers/brkthru.c
+++ b/src/mame/drivers/brkthru.c
@@ -362,25 +362,23 @@ static const ym3526_interface ym3526_config =
*
*************************************/
-static MACHINE_START( brkthru )
+void brkthru_state::machine_start()
{
- brkthru_state *state = machine.driver_data<brkthru_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_bgscroll));
- state->save_item(NAME(state->m_bgbasecolor));
- state->save_item(NAME(state->m_flipscreen));
+ save_item(NAME(m_bgscroll));
+ save_item(NAME(m_bgbasecolor));
+ save_item(NAME(m_flipscreen));
}
-static MACHINE_RESET( brkthru )
+void brkthru_state::machine_reset()
{
- brkthru_state *state = machine.driver_data<brkthru_state>();
- state->m_bgscroll = 0;
- state->m_bgbasecolor = 0;
- state->m_flipscreen = 0;
+ m_bgscroll = 0;
+ m_bgbasecolor = 0;
+ m_flipscreen = 0;
}
static INTERRUPT_GEN( vblank_irq )
@@ -401,8 +399,6 @@ static MACHINE_CONFIG_START( brkthru, brkthru_state )
MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK/8) /* 1.5 MHz ? */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_MACHINE_START(brkthru)
- MCFG_MACHINE_RESET(brkthru)
/* video hardware */
MCFG_GFXDECODE(brkthru)
@@ -413,8 +409,6 @@ static MACHINE_CONFIG_START( brkthru, brkthru_state )
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 384, 8, 248, 272, 8, 248)
MCFG_SCREEN_UPDATE_STATIC(brkthru)
- MCFG_PALETTE_INIT(brkthru)
- MCFG_VIDEO_START(brkthru)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -441,8 +435,6 @@ static MACHINE_CONFIG_START( darwin, brkthru_state )
MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK/8) /* 1.5 MHz ? */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_MACHINE_START(brkthru)
- MCFG_MACHINE_RESET(brkthru)
/* video hardware */
MCFG_GFXDECODE(brkthru)
@@ -464,8 +456,6 @@ static MACHINE_CONFIG_START( darwin, brkthru_state )
tuned by Shingo SUZUKI(VSyncMAME Project) 2000/10/19 */
MCFG_SCREEN_UPDATE_STATIC(brkthru)
- MCFG_PALETTE_INIT(brkthru)
- MCFG_VIDEO_START(brkthru)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/bsktball.c b/src/mame/drivers/bsktball.c
index a91246c628f..5aa482356e3 100644
--- a/src/mame/drivers/bsktball.c
+++ b/src/mame/drivers/bsktball.c
@@ -35,33 +35,33 @@
*
*************************************/
-static PALETTE_INIT( bsktball )
+void bsktball_state::palette_init()
{
int i;
- machine.colortable = colortable_alloc(machine, 4);
+ machine().colortable = colortable_alloc(machine(), 4);
- colortable_palette_set_color(machine.colortable,0,MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
- colortable_palette_set_color(machine.colortable,1,MAKE_RGB(0x80,0x80,0x80)); /* LIGHT GREY */
- colortable_palette_set_color(machine.colortable,2,MAKE_RGB(0x50,0x50,0x50)); /* DARK GREY */
- colortable_palette_set_color(machine.colortable,3,MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
+ colortable_palette_set_color(machine().colortable,0,MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
+ colortable_palette_set_color(machine().colortable,1,MAKE_RGB(0x80,0x80,0x80)); /* LIGHT GREY */
+ colortable_palette_set_color(machine().colortable,2,MAKE_RGB(0x50,0x50,0x50)); /* DARK GREY */
+ colortable_palette_set_color(machine().colortable,3,MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
/* playfield */
for (i = 0; i < 2; i++)
{
- colortable_entry_set_value(machine.colortable, i*4 + 0, 1);
- colortable_entry_set_value(machine.colortable, i*4 + 1, 3 * i);
- colortable_entry_set_value(machine.colortable, i*4 + 2, 3 * i);
- colortable_entry_set_value(machine.colortable, i*4 + 3, 3 * i);
+ colortable_entry_set_value(machine().colortable, i*4 + 0, 1);
+ colortable_entry_set_value(machine().colortable, i*4 + 1, 3 * i);
+ colortable_entry_set_value(machine().colortable, i*4 + 2, 3 * i);
+ colortable_entry_set_value(machine().colortable, i*4 + 3, 3 * i);
}
/* motion */
for (i = 0; i < 4*4*4; i++)
{
- colortable_entry_set_value(machine.colortable, 2*4 + i*4 + 0, 1);
- colortable_entry_set_value(machine.colortable, 2*4 + i*4 + 1, (i >> 2) & 3);
- colortable_entry_set_value(machine.colortable, 2*4 + i*4 + 2, (i >> 0) & 3);
- colortable_entry_set_value(machine.colortable, 2*4 + i*4 + 3, (i >> 4) & 3);
+ colortable_entry_set_value(machine().colortable, 2*4 + i*4 + 0, 1);
+ colortable_entry_set_value(machine().colortable, 2*4 + i*4 + 1, (i >> 2) & 3);
+ colortable_entry_set_value(machine().colortable, 2*4 + i*4 + 2, (i >> 0) & 3);
+ colortable_entry_set_value(machine().colortable, 2*4 + i*4 + 3, (i >> 4) & 3);
}
}
@@ -209,40 +209,38 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_START( bsktball )
+void bsktball_state::machine_start()
{
- bsktball_state *state = machine.driver_data<bsktball_state>();
-
- state->save_item(NAME(state->m_nmi_on));
-// state->save_item(NAME(state->m_i256v));
- state->save_item(NAME(state->m_ld1));
- state->save_item(NAME(state->m_ld2));
- state->save_item(NAME(state->m_dir0));
- state->save_item(NAME(state->m_dir1));
- state->save_item(NAME(state->m_dir2));
- state->save_item(NAME(state->m_dir3));
- state->save_item(NAME(state->m_last_p1_horiz));
- state->save_item(NAME(state->m_last_p1_vert));
- state->save_item(NAME(state->m_last_p2_horiz));
- state->save_item(NAME(state->m_last_p2_vert));
+
+ save_item(NAME(m_nmi_on));
+// save_item(NAME(m_i256v));
+ save_item(NAME(m_ld1));
+ save_item(NAME(m_ld2));
+ save_item(NAME(m_dir0));
+ save_item(NAME(m_dir1));
+ save_item(NAME(m_dir2));
+ save_item(NAME(m_dir3));
+ save_item(NAME(m_last_p1_horiz));
+ save_item(NAME(m_last_p1_vert));
+ save_item(NAME(m_last_p2_horiz));
+ save_item(NAME(m_last_p2_vert));
}
-static MACHINE_RESET( bsktball )
+void bsktball_state::machine_reset()
{
- bsktball_state *state = machine.driver_data<bsktball_state>();
-
- state->m_nmi_on = 0;
-// state->m_i256v = 0;
- state->m_ld1 = 0;
- state->m_ld2 = 0;
- state->m_dir0 = 0;
- state->m_dir1 = 0;
- state->m_dir2 = 0;
- state->m_dir3 = 0;
- state->m_last_p1_horiz = 0;
- state->m_last_p1_vert = 0;
- state->m_last_p2_horiz = 0;
- state->m_last_p2_vert = 0;
+
+ m_nmi_on = 0;
+// m_i256v = 0;
+ m_ld1 = 0;
+ m_ld2 = 0;
+ m_dir0 = 0;
+ m_dir1 = 0;
+ m_dir2 = 0;
+ m_dir3 = 0;
+ m_last_p1_horiz = 0;
+ m_last_p1_vert = 0;
+ m_last_p2_horiz = 0;
+ m_last_p2_vert = 0;
}
@@ -253,8 +251,6 @@ static MACHINE_CONFIG_START( bsktball, bsktball_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_TIMER_ADD_SCANLINE("scantimer", bsktball_scanline, "screen", 0, 1)
- MCFG_MACHINE_START(bsktball)
- MCFG_MACHINE_RESET(bsktball)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -267,8 +263,6 @@ static MACHINE_CONFIG_START( bsktball, bsktball_state )
MCFG_GFXDECODE(bsktball)
MCFG_PALETTE_LENGTH(2*4 + 4*4*4*4)
- MCFG_PALETTE_INIT(bsktball)
- MCFG_VIDEO_START(bsktball)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/btime.c b/src/mame/drivers/btime.c
index 9a806d4f2ca..3dd318c9e42 100644
--- a/src/mame/drivers/btime.c
+++ b/src/mame/drivers/btime.c
@@ -1396,68 +1396,63 @@ static DISCRETE_SOUND_START( btime_sound )
DISCRETE_SOUND_END
-static MACHINE_START( btime )
+MACHINE_START_MEMBER(btime_state,btime)
{
- btime_state *state = machine.driver_data<btime_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_btime_palette));
- state->save_item(NAME(state->m_bnj_scroll1));
- state->save_item(NAME(state->m_bnj_scroll2));
- state->save_item(NAME(state->m_btime_tilemap));
- state->save_item(NAME(state->m_audio_nmi_enabled));
- state->save_item(NAME(state->m_audio_nmi_state));
+ save_item(NAME(m_btime_palette));
+ save_item(NAME(m_bnj_scroll1));
+ save_item(NAME(m_bnj_scroll2));
+ save_item(NAME(m_btime_tilemap));
+ save_item(NAME(m_audio_nmi_enabled));
+ save_item(NAME(m_audio_nmi_state));
}
-static MACHINE_START( mmonkey )
+MACHINE_START_MEMBER(btime_state,mmonkey)
{
- btime_state *state = machine.driver_data<btime_state>();
- MACHINE_START_CALL(btime);
+ MACHINE_START_CALL_MEMBER(btime);
- state->save_item(NAME(state->m_protection_command));
- state->save_item(NAME(state->m_protection_status));
- state->save_item(NAME(state->m_protection_value));
- state->save_item(NAME(state->m_protection_ret));
+ save_item(NAME(m_protection_command));
+ save_item(NAME(m_protection_status));
+ save_item(NAME(m_protection_value));
+ save_item(NAME(m_protection_ret));
}
-static MACHINE_RESET( btime )
+MACHINE_RESET_MEMBER(btime_state,btime)
{
- btime_state *state = machine.driver_data<btime_state>();
/* by default, the audio NMI is disabled, except for bootlegs which don't use the enable */
- state->m_audio_nmi_enabled = (state->m_audio_nmi_enable_type == AUDIO_ENABLE_NONE);
-
- state->m_btime_palette = 0;
- state->m_bnj_scroll1 = 0;
- state->m_bnj_scroll2 = 0;
- state->m_btime_tilemap[0] = 0;
- state->m_btime_tilemap[1] = 0;
- state->m_btime_tilemap[2] = 0;
- state->m_btime_tilemap[3] = 0;
- state->m_audio_nmi_state = 0;
+ m_audio_nmi_enabled = (m_audio_nmi_enable_type == AUDIO_ENABLE_NONE);
+
+ m_btime_palette = 0;
+ m_bnj_scroll1 = 0;
+ m_bnj_scroll2 = 0;
+ m_btime_tilemap[0] = 0;
+ m_btime_tilemap[1] = 0;
+ m_btime_tilemap[2] = 0;
+ m_btime_tilemap[3] = 0;
+ m_audio_nmi_state = 0;
}
-static MACHINE_RESET( lnc )
+MACHINE_RESET_MEMBER(btime_state,lnc)
{
- btime_state *state = machine.driver_data<btime_state>();
- *state->m_lnc_charbank = 1;
+ *m_lnc_charbank = 1;
- MACHINE_RESET_CALL(btime);
+ MACHINE_RESET_CALL_MEMBER(btime);
}
-static MACHINE_RESET( mmonkey )
+MACHINE_RESET_MEMBER(btime_state,mmonkey)
{
- btime_state *state = machine.driver_data<btime_state>();
- MACHINE_RESET_CALL(lnc);
+ MACHINE_RESET_CALL_MEMBER(lnc);
- state->m_protection_command = 0;
- state->m_protection_status = 0;
- state->m_protection_value = 0;
- state->m_protection_ret = 0;
+ m_protection_command = 0;
+ m_protection_status = 0;
+ m_protection_value = 0;
+ m_protection_ret = 0;
}
static MACHINE_CONFIG_START( btime, btime_state )
@@ -1475,14 +1470,14 @@ static MACHINE_CONFIG_START( btime, btime_state )
MCFG_SCREEN_RAW_PARAMS(HCLK, 384, 8, 248, 272, 8, 248)
MCFG_SCREEN_UPDATE_STATIC(btime)
- MCFG_MACHINE_START(btime)
- MCFG_MACHINE_RESET(btime)
+ MCFG_MACHINE_START_OVERRIDE(btime_state,btime)
+ MCFG_MACHINE_RESET_OVERRIDE(btime_state,btime)
MCFG_GFXDECODE(btime)
MCFG_PALETTE_LENGTH(16)
- MCFG_PALETTE_INIT(btime)
- MCFG_VIDEO_START(btime)
+ MCFG_PALETTE_INIT_OVERRIDE(btime_state,btime)
+ MCFG_VIDEO_START_OVERRIDE(btime_state,btime)
/* audio hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1529,13 +1524,13 @@ static MACHINE_CONFIG_DERIVED( lnc, btime )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(lnc_map)
- MCFG_MACHINE_RESET(lnc)
+ MCFG_MACHINE_RESET_OVERRIDE(btime_state,lnc)
/* video hardware */
MCFG_GFXDECODE(lnc)
MCFG_PALETTE_LENGTH(8)
- MCFG_PALETTE_INIT(lnc)
+ MCFG_PALETTE_INIT_OVERRIDE(btime_state,lnc)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_STATIC(lnc)
MACHINE_CONFIG_END
@@ -1557,8 +1552,8 @@ static MACHINE_CONFIG_DERIVED( mmonkey, wtennis )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(mmonkey_map)
- MCFG_MACHINE_START(mmonkey)
- MCFG_MACHINE_RESET(mmonkey)
+ MCFG_MACHINE_START_OVERRIDE(btime_state,mmonkey)
+ MCFG_MACHINE_RESET_OVERRIDE(btime_state,mmonkey)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sdtennis, btime )
@@ -1572,7 +1567,7 @@ static MACHINE_CONFIG_DERIVED( sdtennis, btime )
MCFG_GFXDECODE(bnj)
MCFG_PALETTE_LENGTH(16)
- MCFG_VIDEO_START(bnj)
+ MCFG_VIDEO_START_OVERRIDE(btime_state,bnj)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_STATIC(bnj)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c
index ad26d6a9935..5642dd0addf 100644
--- a/src/mame/drivers/bublbobl.c
+++ b/src/mame/drivers/bublbobl.c
@@ -720,47 +720,43 @@ static const ym2203_interface ym2203_config =
*
*************************************/
-static MACHINE_START( common )
+MACHINE_START_MEMBER(bublbobl_state,common)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_mcu = machine.device("mcu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
- state->m_slave = machine.device("slave");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_mcu = machine().device("mcu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
+ m_slave = machine().device("slave");
- state->save_item(NAME(state->m_sound_nmi_enable));
- state->save_item(NAME(state->m_pending_nmi));
- state->save_item(NAME(state->m_sound_status));
- state->save_item(NAME(state->m_video_enable));
+ save_item(NAME(m_sound_nmi_enable));
+ save_item(NAME(m_pending_nmi));
+ save_item(NAME(m_sound_status));
+ save_item(NAME(m_video_enable));
}
-static MACHINE_RESET( common )
+MACHINE_RESET_MEMBER(bublbobl_state,common)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
- state->m_sound_nmi_enable = 0;
- state->m_pending_nmi = 0;
- state->m_sound_status = 0;
+ m_sound_nmi_enable = 0;
+ m_pending_nmi = 0;
+ m_sound_status = 0;
}
-static MACHINE_START( tokio )
+MACHINE_START_MEMBER(bublbobl_state,tokio)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
- MACHINE_START_CALL(common);
+ MACHINE_START_CALL_MEMBER(common);
- state->save_item(NAME(state->m_tokio_prot_count));
+ save_item(NAME(m_tokio_prot_count));
}
-static MACHINE_RESET( tokio )
+MACHINE_RESET_MEMBER(bublbobl_state,tokio)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
- MACHINE_RESET_CALL(common);
+ MACHINE_RESET_CALL_MEMBER(common);
- state->m_tokio_prot_count = 0;
+ m_tokio_prot_count = 0;
}
static MACHINE_CONFIG_START( tokio, bublbobl_state )
@@ -779,8 +775,8 @@ static MACHINE_CONFIG_START( tokio, bublbobl_state )
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
- MCFG_MACHINE_START(tokio)
- MCFG_MACHINE_RESET(tokio)
+ MCFG_MACHINE_START_OVERRIDE(bublbobl_state,tokio)
+ MCFG_MACHINE_RESET_OVERRIDE(bublbobl_state,tokio)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -802,44 +798,42 @@ static MACHINE_CONFIG_START( tokio, bublbobl_state )
MACHINE_CONFIG_END
-static MACHINE_START( bublbobl )
+MACHINE_START_MEMBER(bublbobl_state,bublbobl)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
-
- MACHINE_START_CALL(common);
-
- state->save_item(NAME(state->m_ddr1));
- state->save_item(NAME(state->m_ddr2));
- state->save_item(NAME(state->m_ddr3));
- state->save_item(NAME(state->m_ddr4));
- state->save_item(NAME(state->m_port1_in));
- state->save_item(NAME(state->m_port2_in));
- state->save_item(NAME(state->m_port3_in));
- state->save_item(NAME(state->m_port4_in));
- state->save_item(NAME(state->m_port1_out));
- state->save_item(NAME(state->m_port2_out));
- state->save_item(NAME(state->m_port3_out));
- state->save_item(NAME(state->m_port4_out));
+
+ MACHINE_START_CALL_MEMBER(common);
+
+ save_item(NAME(m_ddr1));
+ save_item(NAME(m_ddr2));
+ save_item(NAME(m_ddr3));
+ save_item(NAME(m_ddr4));
+ save_item(NAME(m_port1_in));
+ save_item(NAME(m_port2_in));
+ save_item(NAME(m_port3_in));
+ save_item(NAME(m_port4_in));
+ save_item(NAME(m_port1_out));
+ save_item(NAME(m_port2_out));
+ save_item(NAME(m_port3_out));
+ save_item(NAME(m_port4_out));
}
-static MACHINE_RESET( bublbobl )
+MACHINE_RESET_MEMBER(bublbobl_state,bublbobl)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
-
- MACHINE_RESET_CALL(common);
-
- state->m_ddr1 = 0;
- state->m_ddr2 = 0;
- state->m_ddr3 = 0;
- state->m_ddr4 = 0;
- state->m_port1_in = 0;
- state->m_port2_in = 0;
- state->m_port3_in = 0;
- state->m_port4_in = 0;
- state->m_port1_out = 0;
- state->m_port2_out = 0;
- state->m_port3_out = 0;
- state->m_port4_out = 0;
+
+ MACHINE_RESET_CALL_MEMBER(common);
+
+ m_ddr1 = 0;
+ m_ddr2 = 0;
+ m_ddr3 = 0;
+ m_ddr4 = 0;
+ m_port1_in = 0;
+ m_port2_in = 0;
+ m_port3_in = 0;
+ m_port4_in = 0;
+ m_port1_out = 0;
+ m_port2_out = 0;
+ m_port3_out = 0;
+ m_port4_out = 0;
}
static MACHINE_CONFIG_START( bublbobl, bublbobl_state )
@@ -862,8 +856,8 @@ static MACHINE_CONFIG_START( bublbobl, bublbobl_state )
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
- MCFG_MACHINE_START(bublbobl)
- MCFG_MACHINE_RESET(bublbobl)
+ MCFG_MACHINE_START_OVERRIDE(bublbobl_state,bublbobl)
+ MCFG_MACHINE_RESET_OVERRIDE(bublbobl_state,bublbobl)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -885,24 +879,22 @@ static MACHINE_CONFIG_START( bublbobl, bublbobl_state )
MACHINE_CONFIG_END
-static MACHINE_START( boblbobl )
+MACHINE_START_MEMBER(bublbobl_state,boblbobl)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
- MACHINE_START_CALL(common);
+ MACHINE_START_CALL_MEMBER(common);
- state->save_item(NAME(state->m_ic43_a));
- state->save_item(NAME(state->m_ic43_b));
+ save_item(NAME(m_ic43_a));
+ save_item(NAME(m_ic43_b));
}
-static MACHINE_RESET( boblbobl )
+MACHINE_RESET_MEMBER(bublbobl_state,boblbobl)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
- MACHINE_RESET_CALL(common);
+ MACHINE_RESET_CALL_MEMBER(common);
- state->m_ic43_a = 0;
- state->m_ic43_b = 0;
+ m_ic43_a = 0;
+ m_ic43_b = 0;
}
static MACHINE_CONFIG_DERIVED( boblbobl, bublbobl )
@@ -911,43 +903,41 @@ static MACHINE_CONFIG_DERIVED( boblbobl, bublbobl )
MCFG_CPU_PROGRAM_MAP(bootleg_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) // interrupt mode 1, unlike Bubble Bobble
- MCFG_MACHINE_START(boblbobl)
- MCFG_MACHINE_RESET(boblbobl)
+ MCFG_MACHINE_START_OVERRIDE(bublbobl_state,boblbobl)
+ MCFG_MACHINE_RESET_OVERRIDE(bublbobl_state,boblbobl)
MCFG_DEVICE_REMOVE("mcu")
MACHINE_CONFIG_END
-static MACHINE_START( bub68705 )
+MACHINE_START_MEMBER(bublbobl_state,bub68705)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
-
- MACHINE_START_CALL(common);
-
- state->save_item(NAME(state->m_port_a_in));
- state->save_item(NAME(state->m_port_a_out));
- state->save_item(NAME(state->m_ddr_a));
- state->save_item(NAME(state->m_port_b_in));
- state->save_item(NAME(state->m_port_b_out));
- state->save_item(NAME(state->m_ddr_b));
- state->save_item(NAME(state->m_address));
- state->save_item(NAME(state->m_latch));
+
+ MACHINE_START_CALL_MEMBER(common);
+
+ save_item(NAME(m_port_a_in));
+ save_item(NAME(m_port_a_out));
+ save_item(NAME(m_ddr_a));
+ save_item(NAME(m_port_b_in));
+ save_item(NAME(m_port_b_out));
+ save_item(NAME(m_ddr_b));
+ save_item(NAME(m_address));
+ save_item(NAME(m_latch));
}
-static MACHINE_RESET( bub68705 )
+MACHINE_RESET_MEMBER(bublbobl_state,bub68705)
{
- bublbobl_state *state = machine.driver_data<bublbobl_state>();
-
- MACHINE_RESET_CALL(common);
-
- state->m_port_a_in = 0;
- state->m_port_a_out = 0;
- state->m_ddr_a = 0;
- state->m_port_b_in = 0;
- state->m_port_b_out = 0;
- state->m_ddr_b = 0;
- state->m_address = 0;
- state->m_latch = 0;
+
+ MACHINE_RESET_CALL_MEMBER(common);
+
+ m_port_a_in = 0;
+ m_port_a_out = 0;
+ m_ddr_a = 0;
+ m_port_b_in = 0;
+ m_port_b_out = 0;
+ m_ddr_b = 0;
+ m_address = 0;
+ m_latch = 0;
}
static MACHINE_CONFIG_DERIVED( bub68705, bublbobl )
@@ -957,8 +947,8 @@ static MACHINE_CONFIG_DERIVED( bub68705, bublbobl )
MCFG_CPU_PROGRAM_MAP(bootlegmcu_map)
MCFG_CPU_VBLANK_INT("screen",bublbobl_m68705_interrupt) // ??? should come from the same clock which latches the INT pin on the second Z80
- MCFG_MACHINE_START(bub68705)
- MCFG_MACHINE_RESET(bub68705)
+ MCFG_MACHINE_START_OVERRIDE(bublbobl_state,bub68705)
+ MCFG_MACHINE_RESET_OVERRIDE(bublbobl_state,bub68705)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c
index b4b89ee9202..61e29f667ff 100644
--- a/src/mame/drivers/buggychl.c
+++ b/src/mame/drivers/buggychl.c
@@ -356,38 +356,36 @@ static const msm5232_interface msm5232_config =
};
-static MACHINE_START( buggychl )
+void buggychl_state::machine_start()
{
- buggychl_state *state = machine.driver_data<buggychl_state>();
- UINT8 *ROM = state->memregion("maincpu")->base();
+ UINT8 *ROM = memregion("maincpu")->base();
- state->membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x2000);
+ membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x2000);
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_sound_nmi_enable));
- state->save_item(NAME(state->m_pending_nmi));
- state->save_item(NAME(state->m_sprite_lookup));
- state->save_item(NAME(state->m_sl_bank));
- state->save_item(NAME(state->m_bg_on));
- state->save_item(NAME(state->m_sky_on));
- state->save_item(NAME(state->m_sprite_color_base));
- state->save_item(NAME(state->m_bg_scrollx));
+ save_item(NAME(m_sound_nmi_enable));
+ save_item(NAME(m_pending_nmi));
+ save_item(NAME(m_sprite_lookup));
+ save_item(NAME(m_sl_bank));
+ save_item(NAME(m_bg_on));
+ save_item(NAME(m_sky_on));
+ save_item(NAME(m_sprite_color_base));
+ save_item(NAME(m_bg_scrollx));
}
-static MACHINE_RESET( buggychl )
+void buggychl_state::machine_reset()
{
- buggychl_state *state = machine.driver_data<buggychl_state>();
- machine.device("mcu")->execute().set_input_line(0, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(0, CLEAR_LINE);
- state->m_sound_nmi_enable = 0;
- state->m_pending_nmi = 0;
- state->m_sl_bank = 0;
- state->m_bg_on = 0;
- state->m_sky_on = 0;
- state->m_sprite_color_base = 0;
- state->m_bg_scrollx = 0;
+ m_sound_nmi_enable = 0;
+ m_pending_nmi = 0;
+ m_sl_bank = 0;
+ m_bg_on = 0;
+ m_sky_on = 0;
+ m_sprite_color_base = 0;
+ m_bg_scrollx = 0;
}
static MACHINE_CONFIG_START( buggychl, buggychl_state )
@@ -406,8 +404,6 @@ static MACHINE_CONFIG_START( buggychl, buggychl_state )
MCFG_CPU_PROGRAM_MAP(buggychl_mcu_map)
MCFG_DEVICE_ADD("bmcu", BUGGYCHL_MCU, 0)
- MCFG_MACHINE_START(buggychl)
- MCFG_MACHINE_RESET(buggychl)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -420,8 +416,6 @@ static MACHINE_CONFIG_START( buggychl, buggychl_state )
MCFG_GFXDECODE(buggychl)
MCFG_PALETTE_LENGTH(128+128)
- MCFG_PALETTE_INIT(buggychl)
- MCFG_VIDEO_START(buggychl)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/buster.c b/src/mame/drivers/buster.c
index 9d8a82d528a..c4e1d726470 100644
--- a/src/mame/drivers/buster.c
+++ b/src/mame/drivers/buster.c
@@ -21,10 +21,12 @@ public:
required_shared_ptr<UINT8> m_vram;
DECLARE_READ8_MEMBER(test_r);
+ virtual void video_start();
+ virtual void palette_init();
};
-static VIDEO_START(buster)
+void buster_state::video_start()
{
}
@@ -318,13 +320,13 @@ static const mc6845_interface mc6845_intf =
NULL /* update address callback */
};
-static PALETTE_INIT( buster )
+void buster_state::palette_init()
{
int i;
/* RGB format */
for(i=0;i<8;i++)
- palette_set_color(machine, i, MAKE_RGB(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
+ palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
}
static MACHINE_CONFIG_START( buster, buster_state )
@@ -344,9 +346,7 @@ static MACHINE_CONFIG_START( buster, buster_state )
MCFG_GFXDECODE(buster)
MCFG_PALETTE_LENGTH(8)
- MCFG_PALETTE_INIT(buster)
- MCFG_VIDEO_START(buster)
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/bwing.c b/src/mame/drivers/bwing.c
index 19b91872b5f..2e4c2ee086c 100644
--- a/src/mame/drivers/bwing.c
+++ b/src/mame/drivers/bwing.c
@@ -333,35 +333,33 @@ GFXDECODE_END
//****************************************************************************
// Hardware Definitions
-static MACHINE_START( bwing )
+void bwing_state::machine_start()
{
- bwing_state *state = machine.driver_data<bwing_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_subcpu = machine.device<cpu_device>("sub");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_subcpu = machine().device<cpu_device>("sub");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_palatch));
- state->save_item(NAME(state->m_srbank));
- state->save_item(NAME(state->m_mapmask));
- state->save_item(NAME(state->m_mapflip));
- state->save_item(NAME(state->m_bwp3_nmimask));
- state->save_item(NAME(state->m_bwp3_u8F_d));
+ save_item(NAME(m_palatch));
+ save_item(NAME(m_srbank));
+ save_item(NAME(m_mapmask));
+ save_item(NAME(m_mapflip));
+ save_item(NAME(m_bwp3_nmimask));
+ save_item(NAME(m_bwp3_u8F_d));
- state->save_item(NAME(state->m_sreg));
+ save_item(NAME(m_sreg));
}
-static MACHINE_RESET( bwing )
+void bwing_state::machine_reset()
{
- bwing_state *state = machine.driver_data<bwing_state>();
- state->m_palatch = 0;
- state->m_srbank = 0;
- state->m_mapmask = 0;
- state->m_mapflip = 0;
+ m_palatch = 0;
+ m_srbank = 0;
+ m_mapmask = 0;
+ m_mapflip = 0;
- state->m_bwp3_nmimask = 0;
- state->m_bwp3_u8F_d = 0;
+ m_bwp3_nmimask = 0;
+ m_bwp3_u8F_d = 0;
}
static MACHINE_CONFIG_START( bwing, bwing_state )
@@ -380,8 +378,6 @@ static MACHINE_CONFIG_START( bwing, bwing_state )
MCFG_QUANTUM_TIME(attotime::from_hz(18000)) // high enough?
- MCFG_MACHINE_START(bwing)
- MCFG_MACHINE_RESET(bwing)
// video hardware
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
@@ -396,7 +392,6 @@ static MACHINE_CONFIG_START( bwing, bwing_state )
MCFG_GFXDECODE(bwing)
MCFG_PALETTE_LENGTH(64)
- MCFG_VIDEO_START(bwing)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/byvid.c b/src/mame/drivers/byvid.c
index 9f4a466c6a5..ee3d80aa5a5 100644
--- a/src/mame/drivers/byvid.c
+++ b/src/mame/drivers/byvid.c
@@ -39,6 +39,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(by133_cb2);
DECLARE_READ8_MEMBER(by133_portb_r);
DECLARE_WRITE8_MEMBER(by133_portb_w);
+ virtual void machine_reset();
};
@@ -154,10 +155,9 @@ static const pia6821_interface videopia_intf =
};
-static MACHINE_RESET( by133 )
+void by133_state::machine_reset()
{
- by133_state *state = machine.driver_data<by133_state>();
- state->m_sound_port2 = 2; // forced to 010 on /reset
+ m_sound_port2 = 2; // forced to 010 on /reset
}
static MACHINE_CONFIG_START( by133, by133_state )
@@ -175,7 +175,6 @@ static MACHINE_CONFIG_START( by133, by133_state )
MCFG_PIA6821_ADD("videopia", videopia_intf)
- MCFG_MACHINE_RESET(by133)
/* video hardware */
MCFG_TMS9928A_ADD( "tms9928a", TMS9928A, byvid_tms9928a_interface )
diff --git a/src/mame/drivers/bzone.c b/src/mame/drivers/bzone.c
index d6239f068a2..1c467ce3992 100644
--- a/src/mame/drivers/bzone.c
+++ b/src/mame/drivers/bzone.c
@@ -224,18 +224,16 @@
*
*************************************/
-static MACHINE_START( bzone )
+void bzone_state::machine_start()
{
- bzone_state *state = machine.driver_data<bzone_state>();
- state_save_register_global(machine, state->m_analog_data);
+ state_save_register_global(machine(), m_analog_data);
}
-static MACHINE_START( redbaron )
+MACHINE_START_MEMBER(bzone_state,redbaron)
{
- bzone_state *state = machine.driver_data<bzone_state>();
- state_save_register_global(machine, state->m_analog_data);
- state_save_register_global(machine, state->m_rb_input_select);
+ state_save_register_global(machine(), m_analog_data);
+ state_save_register_global(machine(), m_rb_input_select);
}
@@ -557,7 +555,6 @@ static MACHINE_CONFIG_START( bzone_base, bzone_state )
MCFG_CPU_PROGRAM_MAP(bzone_map)
MCFG_CPU_PERIODIC_INT(bzone_interrupt, (double)BZONE_MASTER_CLOCK / 4096 / 12)
- MCFG_MACHINE_START(bzone)
/* video hardware */
MCFG_SCREEN_ADD("screen", VECTOR)
@@ -589,7 +586,7 @@ static MACHINE_CONFIG_DERIVED( redbaron, bzone_base )
MCFG_CPU_PROGRAM_MAP(redbaron_map)
MCFG_CPU_PERIODIC_INT(bzone_interrupt, (double)BZONE_MASTER_CLOCK / 4096 / 12)
- MCFG_MACHINE_START(redbaron)
+ MCFG_MACHINE_START_OVERRIDE(bzone_state,redbaron)
MCFG_ATARIVGEAROM_ADD("earom")
@@ -598,7 +595,6 @@ static MACHINE_CONFIG_DERIVED( redbaron, bzone_base )
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VISIBLE_AREA(0, 520, 0, 400)
- MCFG_VIDEO_START(avg_bzone)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c
index 599782c41d0..43a963cb8d6 100644
--- a/src/mame/drivers/cabal.c
+++ b/src/mame/drivers/cabal.c
@@ -52,10 +52,9 @@ Dip locations verified with Fabtek manual for the trackball version
#include "audio/seibu.h"
#include "includes/cabal.h"
-static MACHINE_RESET( cabalbl )
+MACHINE_RESET_MEMBER(cabal_state,cabalbl)
{
- cabal_state *state = machine.driver_data<cabal_state>();
- state->m_sound_command1 = state->m_sound_command2 = 0xff;
+ m_sound_command1 = m_sound_command2 = 0xff;
}
@@ -511,7 +510,6 @@ static MACHINE_CONFIG_START( cabal, cabal_state )
MCFG_GFXDECODE(cabal)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(cabal)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -554,7 +552,7 @@ static MACHINE_CONFIG_START( cabalbl, cabal_state )
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_MACHINE_RESET(cabalbl)
+ MCFG_MACHINE_RESET_OVERRIDE(cabal_state,cabalbl)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -567,7 +565,6 @@ static MACHINE_CONFIG_START( cabalbl, cabal_state )
MCFG_GFXDECODE(cabal)
MCFG_PALETTE_LENGTH(1024)
- MCFG_VIDEO_START(cabal)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/cabaret.c b/src/mame/drivers/cabaret.c
index 6a3082502b9..fd04fcdfa08 100644
--- a/src/mame/drivers/cabaret.c
+++ b/src/mame/drivers/cabaret.c
@@ -53,6 +53,8 @@ public:
DECLARE_DRIVER_INIT(cabaret);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
+ virtual void machine_reset();
+ virtual void video_start();
};
@@ -101,13 +103,12 @@ WRITE8_MEMBER(cabaret_state::fg_color_w)
m_fg_tilemap->mark_tile_dirty(offset);
}
-static VIDEO_START(cabaret)
+void cabaret_state::video_start()
{
- cabaret_state *state = machine.driver_data<cabaret_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(cabaret_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
- state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(cabaret_state::get_fg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- state->m_fg_tilemap->set_transparent_pen(0);
- state->m_bg_tilemap->set_scroll_cols(64);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(cabaret_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
+ m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(cabaret_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_fg_tilemap->set_transparent_pen(0);
+ m_bg_tilemap->set_scroll_cols(64);
}
@@ -318,10 +319,9 @@ GFXDECODE_END
Machine Drivers
***************************************************************************/
-static MACHINE_RESET( cabaret )
+void cabaret_state::machine_reset()
{
- cabaret_state *state = machine.driver_data<cabaret_state>();
- state->m_nmi_enable = 0;
+ m_nmi_enable = 0;
}
static INTERRUPT_GEN( cabaret_interrupt )
@@ -338,7 +338,6 @@ static MACHINE_CONFIG_START( cabaret, cabaret_state )
MCFG_CPU_IO_MAP(cabaret_portmap)
MCFG_CPU_VBLANK_INT("screen",cabaret_interrupt)
- MCFG_MACHINE_RESET(cabaret)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -351,7 +350,6 @@ static MACHINE_CONFIG_START( cabaret, cabaret_state )
MCFG_GFXDECODE(cabaret)
MCFG_PALETTE_LENGTH(0x800)
- MCFG_VIDEO_START(cabaret)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/calchase.c b/src/mame/drivers/calchase.c
index 989b16ef466..61f36b29f5b 100644
--- a/src/mame/drivers/calchase.c
+++ b/src/mame/drivers/calchase.c
@@ -173,6 +173,8 @@ public:
DECLARE_WRITE_LINE_MEMBER(calchase_pic8259_1_set_int_line);
DECLARE_READ8_MEMBER(get_slave_ack);
DECLARE_DRIVER_INIT(calchase);
+ virtual void machine_start();
+ virtual void machine_reset();
};
@@ -804,16 +806,15 @@ static IRQ_CALLBACK(irq_callback)
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
-static MACHINE_START(calchase)
+void calchase_state::machine_start()
{
- calchase_state *state = machine.driver_data<calchase_state>();
- machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
- state->m_pit8254 = machine.device( "pit8254" );
- state->m_pic8259_1 = machine.device( "pic8259_1" );
- state->m_pic8259_2 = machine.device( "pic8259_2" );
- state->m_dma8237_1 = machine.device( "dma8237_1" );
- state->m_dma8237_2 = machine.device( "dma8237_2" );
+ m_pit8254 = machine().device( "pit8254" );
+ m_pic8259_1 = machine().device( "pic8259_1" );
+ m_pic8259_2 = machine().device( "pic8259_2" );
+ m_dma8237_1 = machine().device( "dma8237_1" );
+ m_dma8237_2 = machine().device( "dma8237_2" );
}
/*************************************************************
@@ -877,10 +878,10 @@ static const struct pit8253_config calchase_pit8254_config =
}
};
-static MACHINE_RESET(calchase)
+void calchase_state::machine_reset()
{
- //machine.root_device().membank("bank1")->set_base(machine.root_device().memregion("bios")->base() + 0x10000);
- machine.root_device().membank("bank1")->set_base(machine.root_device().memregion("bios")->base());
+ //machine().root_device().membank("bank1")->set_base(machine().root_device().memregion("bios")->base() + 0x10000);
+ machine().root_device().membank("bank1")->set_base(machine().root_device().memregion("bios")->base());
}
static void set_gate_a20(running_machine &machine, int a20)
@@ -929,8 +930,6 @@ static MACHINE_CONFIG_START( calchase, calchase_state )
MCFG_CPU_PROGRAM_MAP(calchase_map)
MCFG_CPU_IO_MAP(calchase_io)
- MCFG_MACHINE_START(calchase)
- MCFG_MACHINE_RESET(calchase)
MCFG_PIT8254_ADD( "pit8254", calchase_pit8254_config )
MCFG_I8237_ADD( "dma8237_1", XTAL_14_31818MHz/3, dma8237_1_config )
diff --git a/src/mame/drivers/calomega.c b/src/mame/drivers/calomega.c
index 218ec2cea7c..30ff79fb27c 100644
--- a/src/mame/drivers/calomega.c
+++ b/src/mame/drivers/calomega.c
@@ -2754,8 +2754,6 @@ static MACHINE_CONFIG_START( sys903, calomega_state )
MCFG_GFXDECODE(calomega)
MCFG_PALETTE_LENGTH(1024)
- MCFG_PALETTE_INIT(calomega)
- MCFG_VIDEO_START(calomega)
MCFG_MC6845_ADD("crtc", MC6845, CPU_CLOCK, mc6845_intf) /* 6845 @ CPU clock */
diff --git a/src/mame/drivers/calorie.c b/src/mame/drivers/calorie.c
index 5b462e0360b..64680a501cc 100644
--- a/src/mame/drivers/calorie.c
+++ b/src/mame/drivers/calorie.c
@@ -109,6 +109,9 @@ public:
DECLARE_DRIVER_INIT(calorieb);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
+ virtual void machine_start();
+ virtual void machine_reset();
+ virtual void video_start();
};
@@ -138,14 +141,13 @@ TILE_GET_INFO_MEMBER(calorie_state::get_fg_tile_info)
}
-static VIDEO_START( calorie )
+void calorie_state::video_start()
{
- calorie_state *state = machine.driver_data<calorie_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(calorie_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);
- state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(calorie_state::get_fg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(calorie_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);
+ m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(calorie_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
- state->m_fg_tilemap->set_transparent_pen(0);
+ m_fg_tilemap->set_transparent_pen(0);
}
static SCREEN_UPDATE_IND16( calorie )
@@ -422,18 +424,16 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_START( calorie )
+void calorie_state::machine_start()
{
- calorie_state *state = machine.driver_data<calorie_state>();
- state->save_item(NAME(state->m_bg_bank));
+ save_item(NAME(m_bg_bank));
}
-static MACHINE_RESET( calorie )
+void calorie_state::machine_reset()
{
- calorie_state *state = machine.driver_data<calorie_state>();
- state->m_bg_bank = 0;
+ m_bg_bank = 0;
}
@@ -449,8 +449,6 @@ static MACHINE_CONFIG_START( calorie, calorie_state )
MCFG_CPU_IO_MAP(calorie_sound_io_map)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 64)
- MCFG_MACHINE_START(calorie)
- MCFG_MACHINE_RESET(calorie)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -463,7 +461,6 @@ static MACHINE_CONFIG_START( calorie, calorie_state )
MCFG_GFXDECODE(calorie)
MCFG_PALETTE_LENGTH(0x100)
- MCFG_VIDEO_START(calorie)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/canyon.c b/src/mame/drivers/canyon.c
index d99fee011be..09aae521a08 100644
--- a/src/mame/drivers/canyon.c
+++ b/src/mame/drivers/canyon.c
@@ -48,12 +48,12 @@
*
*************************************/
-static PALETTE_INIT( canyon )
+void canyon_state::palette_init()
{
- palette_set_color(machine, 0, MAKE_RGB(0x80, 0x80, 0x80)); /* GREY */
- palette_set_color(machine, 1, MAKE_RGB(0x00, 0x00, 0x00)); /* BLACK */
- palette_set_color(machine, 2, MAKE_RGB(0x80, 0x80, 0x80)); /* GREY */
- palette_set_color(machine, 3, MAKE_RGB(0xff, 0xff, 0xff)); /* WHITE */
+ palette_set_color(machine(), 0, MAKE_RGB(0x80, 0x80, 0x80)); /* GREY */
+ palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00)); /* BLACK */
+ palette_set_color(machine(), 2, MAKE_RGB(0x80, 0x80, 0x80)); /* GREY */
+ palette_set_color(machine(), 3, MAKE_RGB(0xff, 0xff, 0xff)); /* WHITE */
}
@@ -253,8 +253,6 @@ static MACHINE_CONFIG_START( canyon, canyon_state )
MCFG_GFXDECODE(canyon)
MCFG_PALETTE_LENGTH(4)
- MCFG_PALETTE_INIT(canyon)
- MCFG_VIDEO_START(canyon)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c
index 9a8cb5a1b42..f8cc53d2da5 100644
--- a/src/mame/drivers/capbowl.c
+++ b/src/mame/drivers/capbowl.c
@@ -334,27 +334,25 @@ static const ym2203_interface ym2203_config =
*
*************************************/
-static MACHINE_START( capbowl )
+void capbowl_state::machine_start()
{
- capbowl_state *state = machine.driver_data<capbowl_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_blitter_addr));
- state->save_item(NAME(state->m_last_trackball_val[0]));
- state->save_item(NAME(state->m_last_trackball_val[1]));
+ save_item(NAME(m_blitter_addr));
+ save_item(NAME(m_last_trackball_val[0]));
+ save_item(NAME(m_last_trackball_val[1]));
}
-static MACHINE_RESET( capbowl )
+void capbowl_state::machine_reset()
{
- capbowl_state *state = machine.driver_data<capbowl_state>();
- machine.scheduler().timer_set(machine.primary_screen->time_until_pos(32), FUNC(capbowl_update), 32);
+ machine().scheduler().timer_set(machine().primary_screen->time_until_pos(32), FUNC(capbowl_update), 32);
- state->m_blitter_addr = 0;
- state->m_last_trackball_val[0] = 0;
- state->m_last_trackball_val[1] = 0;
+ m_blitter_addr = 0;
+ m_last_trackball_val[0] = 0;
+ m_last_trackball_val[1] = 0;
}
@@ -368,14 +366,11 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state )
MCFG_CPU_ADD("audiocpu", M6809E, MASTER_CLOCK)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_MACHINE_START(capbowl)
- MCFG_MACHINE_RESET(capbowl)
MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", capbowl_state, init_nvram)
MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
/* video hardware */
- MCFG_VIDEO_START(capbowl)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_SIZE(360, 256)
diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c
index f74dfebe529..4cdb0bc2043 100644
--- a/src/mame/drivers/cardline.c
+++ b/src/mame/drivers/cardline.c
@@ -40,6 +40,7 @@ public:
DECLARE_WRITE8_MEMBER(video_w);
DECLARE_READ8_MEMBER(unk_r);
DECLARE_WRITE8_MEMBER(lamps_w);
+ virtual void palette_init();
};
@@ -184,12 +185,12 @@ static GFXDECODE_START( cardline )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 2 )
GFXDECODE_END
-static PALETTE_INIT(cardline)
+void cardline_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
int i,r,g,b,data;
int bit0,bit1,bit2;
- for (i = 0;i < machine.total_colors();i++)
+ for (i = 0;i < machine().total_colors();i++)
{
data=color_prom[i];
@@ -207,7 +208,7 @@ static PALETTE_INIT(cardline)
bit0 = (data >> 0) & 0x01;
bit1 = (data >> 1) & 0x01;
b = 0x55 * bit0 + 0xaa * bit1;
- palette_set_color(machine,i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,MAKE_RGB(r,g,b));
}
}
@@ -229,7 +230,6 @@ static MACHINE_CONFIG_START( cardline, cardline_state )
MCFG_GFXDECODE(cardline)
MCFG_PALETTE_LENGTH(512)
- MCFG_PALETTE_INIT(cardline)
MCFG_DEFAULT_LAYOUT(layout_cardline)
diff --git a/src/mame/drivers/carjmbre.c b/src/mame/drivers/carjmbre.c
index 6dfda72e84e..fed4d4e807a 100644
--- a/src/mame/drivers/carjmbre.c
+++ b/src/mame/drivers/carjmbre.c
@@ -183,12 +183,11 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_RESET( carjmbre )
+void carjmbre_state::machine_reset()
{
- carjmbre_state *state = machine.driver_data<carjmbre_state>();
- state->m_flipscreen = 0;
- state->m_bgcolor = 0;
+ m_flipscreen = 0;
+ m_bgcolor = 0;
}
static INTERRUPT_GEN( vblank_irq )
@@ -206,7 +205,6 @@ static MACHINE_CONFIG_START( carjmbre, carjmbre_state )
MCFG_CPU_PROGRAM_MAP(carjmbre_map)
MCFG_CPU_VBLANK_INT("screen", vblank_irq)
- MCFG_MACHINE_RESET(carjmbre)
MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6/2)
MCFG_CPU_PROGRAM_MAP(carjmbre_sound_map)
@@ -224,8 +222,6 @@ static MACHINE_CONFIG_START( carjmbre, carjmbre_state )
MCFG_GFXDECODE(carjmbre)
MCFG_PALETTE_LENGTH(64)
- MCFG_PALETTE_INIT(carjmbre)
- MCFG_VIDEO_START(carjmbre)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/carpolo.c b/src/mame/drivers/carpolo.c
index 82345dc4245..91db6b1802b 100644
--- a/src/mame/drivers/carpolo.c
+++ b/src/mame/drivers/carpolo.c
@@ -247,8 +247,6 @@ static MACHINE_CONFIG_START( carpolo, carpolo_state )
MCFG_CPU_VBLANK_INT("screen", carpolo_timer_interrupt) /* this not strictly VBLANK,
but it's supposed to happen 60
times a sec, so it's a good place */
- MCFG_MACHINE_START(carpolo)
- MCFG_MACHINE_RESET(carpolo)
MCFG_PIA6821_ADD("pia0", carpolo_pia0_intf)
MCFG_PIA6821_ADD("pia1", carpolo_pia1_intf)
@@ -281,8 +279,6 @@ static MACHINE_CONFIG_START( carpolo, carpolo_state )
MCFG_GFXDECODE(carpolo)
MCFG_PALETTE_LENGTH(12*2+2*16+4*2)
- MCFG_PALETTE_INIT(carpolo)
- MCFG_VIDEO_START(carpolo)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c
index b20fe4d6287..7d61aac220a 100644
--- a/src/mame/drivers/carrera.c
+++ b/src/mame/drivers/carrera.c
@@ -61,6 +61,7 @@ public:
required_shared_ptr<UINT8> m_tileram;
DECLARE_READ8_MEMBER(unknown_r);
+ virtual void palette_init();
};
@@ -282,9 +283,9 @@ static const ay8910_interface ay8910_config =
DEVCB_NULL
};
-static PALETTE_INIT(carrera)
+void carrera_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
int br_bit0, br_bit1, bit0, bit1, r, g, b;
int i;
@@ -303,7 +304,7 @@ static PALETTE_INIT(carrera)
bit1 = (color_prom[0] >> 5) & 0x01;
r = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1;
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
color_prom++;
}
}
@@ -343,7 +344,6 @@ static MACHINE_CONFIG_START( carrera, carrera_state )
MCFG_GFXDECODE(carrera)
MCFG_PALETTE_LENGTH(32)
- MCFG_PALETTE_INIT(carrera)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/caswin.c b/src/mame/drivers/caswin.c
index 6b8f3a5b8e8..eaa9e087458 100644
--- a/src/mame/drivers/caswin.c
+++ b/src/mame/drivers/caswin.c
@@ -66,6 +66,8 @@ public:
DECLARE_WRITE8_MEMBER(vvillage_output_w);
DECLARE_WRITE8_MEMBER(vvillage_lamps_w);
TILE_GET_INFO_MEMBER(get_sc0_tile_info);
+ virtual void video_start();
+ virtual void palette_init();
};
@@ -82,10 +84,9 @@ TILE_GET_INFO_MEMBER(caswin_state::get_sc0_tile_info)
0);
}
-static VIDEO_START(vvillage)
+void caswin_state::video_start()
{
- caswin_state *state = machine.driver_data<caswin_state>();
- state->m_sc0_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(caswin_state::get_sc0_tile_info),state),TILEMAP_SCAN_ROWS,8,8,32,32);
+ m_sc0_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(caswin_state::get_sc0_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
}
static SCREEN_UPDATE_IND16(vvillage)
@@ -272,9 +273,9 @@ static const ay8910_interface ay8910_config =
DEVCB_NULL
};
-static PALETTE_INIT( caswin )
+void caswin_state::palette_init()
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
int bit0, bit1, bit2 , r, g, b;
int i;
@@ -293,7 +294,7 @@ static PALETTE_INIT( caswin )
bit2 = (color_prom[0] >> 7) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
color_prom++;
}
}
@@ -318,9 +319,7 @@ static MACHINE_CONFIG_START( vvillage, caswin_state )
MCFG_GFXDECODE(vvillage)
MCFG_PALETTE_LENGTH(0x40)
- MCFG_PALETTE_INIT(caswin)
- MCFG_VIDEO_START(vvillage)
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c
index 3de198c3c61..97f209465a8 100644
--- a/src/mame/drivers/cave.c
+++ b/src/mame/drivers/cave.c
@@ -1793,33 +1793,31 @@ GFXDECODE_END
***************************************************************************/
-static MACHINE_START( cave )
+MACHINE_START_MEMBER(cave_state,cave)
{
- cave_state *state = machine.driver_data<cave_state>();
- state->m_maincpu = machine.device<cpu_device>("maincpu");
- state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ m_audiocpu = machine().device<cpu_device>("audiocpu");
- state->save_item(NAME(state->m_soundbuf_len));
- state->save_item(NAME(state->m_soundbuf_data));
+ save_item(NAME(m_soundbuf_len));
+ save_item(NAME(m_soundbuf_data));
- state->save_item(NAME(state->m_vblank_irq));
- state->save_item(NAME(state->m_sound_irq));
- state->save_item(NAME(state->m_unknown_irq));
- state->save_item(NAME(state->m_agallet_vblank_irq));
+ save_item(NAME(m_vblank_irq));
+ save_item(NAME(m_sound_irq));
+ save_item(NAME(m_unknown_irq));
+ save_item(NAME(m_agallet_vblank_irq));
}
-static MACHINE_RESET( cave )
+MACHINE_RESET_MEMBER(cave_state,cave)
{
- cave_state *state = machine.driver_data<cave_state>();
- memset(state->m_soundbuf_data, 0, 32);
- state->m_soundbuf_len = 0;
+ memset(m_soundbuf_data, 0, 32);
+ m_soundbuf_len = 0;
- state->m_vblank_irq = 0;
- state->m_sound_irq = 0;
- state->m_unknown_irq = 0;
- state->m_agallet_vblank_irq = 0;
+ m_vblank_irq = 0;
+ m_sound_irq = 0;
+ m_unknown_irq = 0;
+ m_agallet_vblank_irq = 0;
}
static const ymz280b_interface ymz280b_intf =
@@ -1858,8 +1856,8 @@ static MACHINE_CONFIG_START( dfeveron, cave_state )
MCFG_CPU_PROGRAM_MAP(dfeveron_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -1874,9 +1872,9 @@ static MACHINE_CONFIG_START( dfeveron, cave_state )
MCFG_GFXDECODE(dfeveron)
MCFG_PALETTE_LENGTH(0x8000) /* $8000 palette entries for consistency with the other games */
- MCFG_PALETTE_INIT(dfeveron)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,dfeveron)
- MCFG_VIDEO_START(cave_2_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_2_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1900,8 +1898,8 @@ static MACHINE_CONFIG_START( ddonpach, cave_state )
MCFG_CPU_PROGRAM_MAP(ddonpach_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -1916,9 +1914,9 @@ static MACHINE_CONFIG_START( ddonpach, cave_state )
MCFG_GFXDECODE(ddonpach)
MCFG_PALETTE_LENGTH(0x8000 + 0x40*16) // $400 extra entries for layers 1&2
- MCFG_PALETTE_INIT(ddonpach)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,ddonpach)
- MCFG_VIDEO_START(cave_3_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1946,8 +1944,8 @@ static MACHINE_CONFIG_START( donpachi, cave_state )
MCFG_CPU_PROGRAM_MAP(donpachi_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -1962,9 +1960,9 @@ static MACHINE_CONFIG_START( donpachi, cave_state )
MCFG_GFXDECODE(donpachi)
MCFG_PALETTE_LENGTH(0x8000) /* $8000 palette entries for consistency with the other games */
- MCFG_PALETTE_INIT(dfeveron)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,dfeveron)
- MCFG_VIDEO_START(cave_3_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -1992,8 +1990,8 @@ static MACHINE_CONFIG_START( esprade, cave_state )
MCFG_CPU_PROGRAM_MAP(esprade_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2008,9 +2006,9 @@ static MACHINE_CONFIG_START( esprade, cave_state )
MCFG_GFXDECODE(esprade)
MCFG_PALETTE_LENGTH(0x8000)
- MCFG_PALETTE_INIT(cave)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,cave)
- MCFG_VIDEO_START(cave_3_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2033,8 +2031,8 @@ static MACHINE_CONFIG_START( gaia, cave_state )
MCFG_CPU_PROGRAM_MAP(gaia_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2048,9 +2046,9 @@ static MACHINE_CONFIG_START( gaia, cave_state )
MCFG_GFXDECODE(esprade)
MCFG_PALETTE_LENGTH(0x8000)
- MCFG_PALETTE_INIT(cave)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,cave)
- MCFG_VIDEO_START(cave_3_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2073,8 +2071,8 @@ static MACHINE_CONFIG_START( guwange, cave_state )
MCFG_CPU_PROGRAM_MAP(guwange_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2089,9 +2087,9 @@ static MACHINE_CONFIG_START( guwange, cave_state )
MCFG_GFXDECODE(esprade)
MCFG_PALETTE_LENGTH(0x8000)
- MCFG_PALETTE_INIT(cave)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,cave)
- MCFG_VIDEO_START(cave_3_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2117,8 +2115,8 @@ static MACHINE_CONFIG_START( hotdogst, cave_state )
MCFG_CPU_PROGRAM_MAP(hotdogst_sound_map)
MCFG_CPU_IO_MAP(hotdogst_sound_portmap)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2133,9 +2131,9 @@ static MACHINE_CONFIG_START( hotdogst, cave_state )
MCFG_GFXDECODE(hotdogst)
MCFG_PALETTE_LENGTH(0x8000) /* $8000 palette entries for consistency with the other games */
- MCFG_PALETTE_INIT(dfeveron)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,dfeveron)
- MCFG_VIDEO_START(cave_3_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2169,8 +2167,8 @@ static MACHINE_CONFIG_START( korokoro, cave_state )
MCFG_CPU_PROGRAM_MAP(korokoro_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_8BIT_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2185,9 +2183,9 @@ static MACHINE_CONFIG_START( korokoro, cave_state )
MCFG_GFXDECODE(korokoro)
MCFG_PALETTE_LENGTH(0x8000) /* $8000 palette entries for consistency with the other games */
- MCFG_PALETTE_INIT(korokoro)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,korokoro)
- MCFG_VIDEO_START(cave_1_layer)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2223,8 +2221,8 @@ static MACHINE_CONFIG_START( mazinger, cave_state )
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2239,9 +2237,9 @@ static MACHINE_CONFIG_START( mazinger, cave_state )
MCFG_GFXDECODE(mazinger)
MCFG_PALETTE_LENGTH(0x8000) /* $8000 palette entries for consistency with the other games */
- MCFG_PALETTE_INIT(mazinger)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,mazinger)
- MCFG_VIDEO_START(cave_2_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_2_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2281,8 +2279,8 @@ static MACHINE_CONFIG_START( metmqstr, cave_state )
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave) /* start with the watchdog armed */
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) /* start with the watchdog armed */
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2297,9 +2295,9 @@ static MACHINE_CONFIG_START( metmqstr, cave_state )
MCFG_GFXDECODE(donpachi)
MCFG_PALETTE_LENGTH(0x8000) /* $8000 palette entries for consistency with the other games */
- MCFG_PALETTE_INIT(dfeveron)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,dfeveron)
- MCFG_VIDEO_START(cave_3_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2336,8 +2334,8 @@ static MACHINE_CONFIG_START( pacslot, cave_state )
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_ADD("eeprom", eeprom_interface_93C46_pacslot)
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2352,9 +2350,9 @@ static MACHINE_CONFIG_START( pacslot, cave_state )
MCFG_GFXDECODE(tjumpman)
MCFG_PALETTE_LENGTH(0x8000)
- MCFG_PALETTE_INIT(cave)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,cave)
- MCFG_VIDEO_START(cave_1_layer)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2392,8 +2390,8 @@ static MACHINE_CONFIG_START( pwrinst2, cave_state )
MCFG_CPU_PROGRAM_MAP(pwrinst2_sound_map)
MCFG_CPU_IO_MAP(pwrinst2_sound_portmap)
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2408,9 +2406,9 @@ static MACHINE_CONFIG_START( pwrinst2, cave_state )
MCFG_GFXDECODE(pwrinst2)
MCFG_PALETTE_LENGTH(0x8000+0x2800)
- MCFG_PALETTE_INIT(pwrinst2)
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,pwrinst2)
- MCFG_VIDEO_START(cave_4_layers)
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_4_layers)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -2455,8 +2453,8 @@ static MACHINE_CONFIG_START( sailormn, cave_state )
// MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_MACHINE_START(cave)
- MCFG_MACHINE_RESET(cave)
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
@@ -2471,9 +2469,9 @@ static MACHINE_CONFIG_START( sailormn, cave_state )
MCFG_GFXDECODE(sailormn)
MCFG_PALETTE_LENGTH(0x8000) /* $8000 palette entries for consistency with the other games */
- MCFG_PALETTE_INIT(sailormn) // 4 bit sprites, 6 bit tiles
+ MCFG_PALETTE_INIT_OVERRIDE(cave_state,sailormn) // 4 bit sprites, 6 bit tiles
- MCFG_VIDEO_START(sailormn_3_layers) /* Layer 2 has 1 banked ROM */
+ MCFG_VIDEO_START_OVERRIDE(c