From bb84877a2f61621ae2fed56cfa744590782ba114 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 9 Apr 2013 10:00:03 +0000 Subject: [PATCH] moved cpu_device * to required_device in existing driver state classes (nw) --- src/mame/drivers/1942.c | 1 - src/mame/drivers/20pacgal.c | 1 - src/mame/drivers/2mindril.c | 6 +++--- src/mame/drivers/40love.c | 1 - src/mame/drivers/88games.c | 1 - src/mame/drivers/actfancr.c | 2 -- src/mame/drivers/adp.c | 8 ++++---- src/mame/drivers/aerofgt.c | 1 - src/mame/drivers/airbustr.c | 1 - src/mame/drivers/aliens.c | 2 -- src/mame/drivers/alpha68k.c | 1 - src/mame/drivers/amspdwy.c | 1 - src/mame/drivers/angelkds.c | 1 - src/mame/drivers/aquarium.c | 1 - src/mame/drivers/ashnojoe.c | 1 - src/mame/drivers/asterix.c | 2 -- src/mame/drivers/astrof.c | 3 --- src/mame/drivers/asuka.c | 2 -- src/mame/drivers/atarifb.c | 1 - src/mame/drivers/battlane.c | 2 -- src/mame/drivers/battlnts.c | 1 - src/mame/drivers/beaminv.c | 6 +++--- src/mame/drivers/beezer.c | 1 - src/mame/drivers/bigevglf.c | 1 - src/mame/drivers/bishi.c | 1 - src/mame/drivers/bking.c | 1 - src/mame/drivers/bladestl.c | 1 - src/mame/drivers/blktiger.c | 1 - src/mame/drivers/blockhl.c | 2 -- src/mame/drivers/blockout.c | 2 -- src/mame/drivers/bottom9.c | 2 -- src/mame/drivers/boxer.c | 6 +++--- src/mame/drivers/brkthru.c | 2 -- src/mame/drivers/btime.c | 2 -- src/mame/drivers/bublbobl.c | 2 -- src/mame/drivers/buggychl.c | 1 - src/mame/drivers/bwing.c | 3 --- src/mame/drivers/capbowl.c | 2 -- src/mame/drivers/cave.c | 2 -- src/mame/drivers/cball.c | 6 +++--- src/mame/drivers/cbuster.c | 2 -- src/mame/drivers/champbas.c | 2 -- src/mame/drivers/chanbara.c | 6 +++--- src/mame/drivers/cheekyms.c | 1 - src/mame/drivers/chinagat.c | 1 - src/mame/drivers/chqflag.c | 2 -- src/mame/drivers/circus.c | 1 - src/mame/drivers/circusc.c | 1 - src/mame/drivers/citycon.c | 1 - src/mame/drivers/cntsteer.c | 15 +++++++-------- src/mame/drivers/combatsc.c | 1 - src/mame/drivers/commando.c | 1 - src/mame/drivers/contra.c | 1 - src/mame/drivers/coolpool.c | 1 - src/mame/drivers/cop01.c | 2 -- src/mame/drivers/cps1.c | 2 -- src/mame/drivers/cps2.c | 2 -- src/mame/drivers/crgolf.c | 2 -- src/mame/drivers/crimfght.c | 2 -- src/mame/drivers/crospang.c | 1 - src/mame/drivers/crystal.c | 6 +++--- src/mame/drivers/cvs.c | 2 -- src/mame/drivers/darius.c | 2 -- src/mame/drivers/dblewing.c | 10 +++++----- src/mame/drivers/dbz.c | 2 -- src/mame/drivers/dcheese.c | 2 -- src/mame/drivers/ddayjlc.c | 6 +++--- src/mame/drivers/ddenlovr.c | 2 -- src/mame/drivers/ddragon.c | 1 - src/mame/drivers/ddragon3.c | 2 -- src/mame/drivers/dec8.c | 3 --- src/mame/drivers/destroyr.c | 6 +++--- src/mame/drivers/dietgo.c | 2 -- src/mame/drivers/discoboy.c | 6 +++--- src/mame/drivers/diverboy.c | 6 +++--- src/mame/drivers/djboy.c | 1 - src/mame/drivers/docastle.c | 3 --- src/mame/drivers/dogfgt.c | 1 - src/mame/drivers/dreambal.c | 6 +++--- src/mame/drivers/dynax.c | 2 -- src/mame/drivers/egghunt.c | 6 +++--- src/mame/drivers/enigma2.c | 10 +++++----- src/mame/drivers/espial.c | 2 -- src/mame/drivers/exerion.c | 1 - src/mame/drivers/exprraid.c | 1 - src/mame/drivers/f1gp.c | 1 - src/mame/drivers/fcombat.c | 1 - src/mame/drivers/fcrash.c | 19 ------------------- src/mame/drivers/fgoal.c | 1 - src/mame/drivers/firetrap.c | 2 -- src/mame/drivers/flkatck.c | 1 - src/mame/drivers/flstory.c | 2 -- src/mame/drivers/flyball.c | 6 +++--- src/mame/drivers/fromanc2.c | 2 -- src/mame/drivers/fromance.c | 1 - src/mame/drivers/funkyjet.c | 2 -- src/mame/drivers/funybubl.c | 1 - src/mame/drivers/fuukifg2.c | 2 -- src/mame/drivers/fuukifg3.c | 5 +---- src/mame/drivers/gaelco.c | 1 - src/mame/drivers/gaiden.c | 1 - src/mame/drivers/galspnbl.c | 1 - src/mame/drivers/gameplan.c | 2 -- src/mame/drivers/gbusters.c | 2 -- src/mame/drivers/gijoe.c | 2 -- src/mame/drivers/ginganin.c | 1 - src/mame/drivers/go2000.c | 6 +++--- src/mame/drivers/goal92.c | 1 - src/mame/drivers/gotcha.c | 1 - src/mame/drivers/gradius3.c | 3 --- src/mame/drivers/gridlee.c | 1 - src/mame/drivers/hcastle.c | 1 - src/mame/drivers/himesiki.c | 1 - src/mame/drivers/homedata.c | 2 -- src/mame/drivers/hyprduel.c | 2 -- src/mame/drivers/inufuku.c | 1 - src/mame/drivers/ironhors.c | 2 -- src/mame/drivers/jackal.c | 3 --- src/mame/drivers/junofrst.c | 11 +++++------ src/mame/drivers/karnov.c | 2 -- src/mame/drivers/kas89.c | 10 +++++----- src/mame/drivers/kchamp.c | 1 - src/mame/drivers/kncljoe.c | 1 - src/mame/drivers/kopunch.c | 1 - src/mame/drivers/kyugo.c | 2 -- src/mame/drivers/ladybug.c | 2 -- src/mame/drivers/ladyfrog.c | 1 - src/mame/drivers/lasso.c | 2 -- src/mame/drivers/lemmings.c | 1 - src/mame/drivers/lethal.c | 8 +++----- src/mame/drivers/liberate.c | 2 -- src/mame/drivers/lkage.c | 2 -- src/mame/drivers/lockon.c | 2 -- src/mame/drivers/lsasquad.c | 2 -- src/mame/drivers/m10.c | 1 - src/mame/drivers/m14.c | 6 +++--- src/mame/drivers/m63.c | 6 +++--- src/mame/drivers/macrossp.c | 2 -- src/mame/drivers/madmotor.c | 2 -- src/mame/drivers/mainevt.c | 2 -- src/mame/drivers/marineb.c | 3 --- src/mame/drivers/matmania.c | 2 -- src/mame/drivers/mazerbla.c | 10 +++++----- src/mame/drivers/mcatadv.c | 2 -- src/mame/drivers/megazone.c | 4 ---- src/mame/drivers/mermaid.c | 1 - src/mame/drivers/metlclsh.c | 2 -- src/mame/drivers/mexico86.c | 3 --- src/mame/drivers/mgolf.c | 6 +++--- src/mame/drivers/mikie.c | 2 -- src/mame/drivers/missb2.c | 2 -- src/mame/drivers/mjsister.c | 6 +++--- src/mame/drivers/mogura.c | 6 +++--- src/mame/drivers/moo.c | 4 +--- src/mame/drivers/mouser.c | 2 -- src/mame/drivers/mrflea.c | 2 -- src/mame/drivers/msisaac.c | 1 - src/mame/drivers/mugsmash.c | 2 -- src/mame/drivers/munchmo.c | 2 -- src/mame/drivers/n8080.c | 1 - src/mame/drivers/nemesis.c | 2 -- src/mame/drivers/nightgal.c | 8 ++++---- src/mame/drivers/ninjaw.c | 3 --- src/mame/drivers/nmg5.c | 10 +++++----- src/mame/drivers/nycaptor.c | 3 --- src/mame/drivers/nyny.c | 10 +++++----- src/mame/drivers/ojankohs.c | 1 - src/mame/drivers/oneshot.c | 2 -- src/mame/drivers/onetwo.c | 10 +++++----- src/mame/drivers/opwolf.c | 2 -- src/mame/drivers/orbit.c | 1 - src/mame/drivers/othello.c | 6 +++--- src/mame/drivers/othunder.c | 2 -- src/mame/drivers/overdriv.c | 3 --- src/mame/drivers/pandoras.c | 5 ----- src/mame/drivers/parodius.c | 2 -- src/mame/drivers/pbaction.c | 2 -- src/mame/drivers/pgm.c | 2 -- src/mame/drivers/pipedrm.c | 1 - src/mame/drivers/pktgaldx.c | 1 - src/mame/drivers/pooyan.c | 1 - src/mame/drivers/popper.c | 1 - src/mame/drivers/psikyo.c | 1 - src/mame/drivers/psikyo4.c | 1 - src/mame/drivers/psikyosh.c | 1 - src/mame/drivers/pushman.c | 2 -- src/mame/drivers/rainbow.c | 2 -- src/mame/drivers/rallyx.c | 1 - src/mame/drivers/rastan.c | 2 -- src/mame/drivers/redclash.c | 1 - src/mame/drivers/rltennis.c | 1 - src/mame/drivers/rockrage.c | 1 - src/mame/drivers/rollerg.c | 2 -- src/mame/drivers/rungun.c | 6 ++---- src/mame/drivers/scregg.c | 3 --- src/mame/drivers/sf.c | 2 -- src/mame/drivers/skyfox.c | 1 - src/mame/drivers/slapshot.c | 2 -- src/mame/drivers/sonson.c | 1 - src/mame/drivers/spy.c | 2 -- src/mame/drivers/supbtime.c | 2 -- src/mame/drivers/suprslam.c | 1 - src/mame/drivers/surpratk.c | 1 - src/mame/drivers/system16.c | 2 -- src/mame/drivers/tail2nos.c | 2 -- src/mame/drivers/taito_b.c | 2 -- src/mame/drivers/taito_f2.c | 2 -- src/mame/drivers/taito_h.c | 1 - src/mame/drivers/taito_l.c | 2 -- src/mame/drivers/taito_o.c | 1 - src/mame/drivers/taito_z.c | 3 --- src/mame/drivers/taitoair.c | 1 - src/mame/drivers/thunderx.c | 2 -- src/mame/drivers/tmnt.c | 2 -- src/mame/drivers/topspeed.c | 3 --- src/mame/drivers/toratora.c | 6 +++--- src/mame/drivers/tp84.c | 1 - src/mame/drivers/trvquest.c | 1 - src/mame/drivers/tumbleb.c | 2 -- src/mame/drivers/tumblep.c | 2 -- src/mame/drivers/tutankhm.c | 1 - src/mame/drivers/ultraman.c | 2 -- src/mame/drivers/vaportra.c | 2 -- src/mame/drivers/vendetta.c | 2 -- src/mame/drivers/volfied.c | 2 -- src/mame/drivers/warriorb.c | 2 -- src/mame/drivers/wgp.c | 3 --- src/mame/drivers/wheelfir.c | 16 ++++++++-------- src/mame/drivers/xexex.c | 2 -- src/mame/drivers/xmen.c | 2 -- src/mame/drivers/yunsun16.c | 1 - src/mame/drivers/yunsung8.c | 1 - src/mame/includes/1942.h | 5 +++-- src/mame/includes/20pacgal.h | 5 +++-- src/mame/includes/40love.h | 5 +++-- src/mame/includes/88games.h | 5 +++-- src/mame/includes/actfancr.h | 8 +++++--- src/mame/includes/aerofgt.h | 5 +++-- src/mame/includes/airbustr.h | 5 +++-- src/mame/includes/ajax.h | 11 +++++++---- src/mame/includes/aliens.h | 8 +++++--- src/mame/includes/alpha68k.h | 5 +++-- src/mame/includes/amspdwy.h | 5 +++-- src/mame/includes/angelkds.h | 5 +++-- src/mame/includes/aquarium.h | 5 +++-- src/mame/includes/ashnojoe.h | 5 +++-- src/mame/includes/asterix.h | 8 +++++--- src/mame/includes/astrof.h | 5 +++-- src/mame/includes/asuka.h | 8 +++++--- src/mame/includes/atarifb.h | 5 +++-- src/mame/includes/battlane.h | 8 +++++--- src/mame/includes/battlnts.h | 5 +++-- src/mame/includes/beezer.h | 5 +++-- src/mame/includes/bigevglf.h | 5 +++-- src/mame/includes/bishi.h | 8 +++++--- src/mame/includes/bking.h | 5 +++-- src/mame/includes/bladestl.h | 5 +++-- src/mame/includes/blktiger.h | 5 +++-- src/mame/includes/blockhl.h | 8 +++++--- src/mame/includes/blockout.h | 8 +++++--- src/mame/includes/bottom9.h | 8 +++++--- src/mame/includes/brkthru.h | 8 +++++--- src/mame/includes/btime.h | 8 +++++--- src/mame/includes/bublbobl.h | 8 +++++--- src/mame/includes/buggychl.h | 5 +++-- src/mame/includes/bwing.h | 11 +++++++---- src/mame/includes/capbowl.h | 8 +++++--- src/mame/includes/cave.h | 6 ++++-- src/mame/includes/cbuster.h | 8 +++++--- src/mame/includes/champbas.h | 8 +++++--- src/mame/includes/cheekyms.h | 5 +++-- src/mame/includes/chqflag.h | 8 +++++--- src/mame/includes/circus.h | 3 ++- src/mame/includes/circusc.h | 3 ++- src/mame/includes/citycon.h | 5 +++-- src/mame/includes/combatsc.h | 5 +++-- src/mame/includes/commando.h | 5 +++-- src/mame/includes/contra.h | 5 +++-- src/mame/includes/coolpool.h | 5 +++-- src/mame/includes/cop01.h | 8 +++++--- src/mame/includes/cps1.h | 8 +++++--- src/mame/includes/crgolf.h | 8 +++++--- src/mame/includes/crimfght.h | 8 +++++--- src/mame/includes/crospang.h | 5 +++-- src/mame/includes/cvs.h | 8 +++++--- src/mame/includes/darius.h | 8 +++++--- src/mame/includes/dbz.h | 8 +++++--- src/mame/includes/dcheese.h | 8 +++++--- src/mame/includes/ddragon.h | 5 +++-- src/mame/includes/ddragon3.h | 8 +++++--- src/mame/includes/dec8.h | 11 +++++++---- src/mame/includes/dietgo.h | 8 +++++--- src/mame/includes/djboy.h | 5 +++-- src/mame/includes/docastle.h | 8 +++++--- src/mame/includes/dogfgt.h | 5 +++-- src/mame/includes/dynax.h | 8 +++++--- src/mame/includes/espial.h | 8 +++++--- src/mame/includes/exerion.h | 5 +++-- src/mame/includes/exprraid.h | 5 +++-- src/mame/includes/f1gp.h | 5 +++-- src/mame/includes/fcombat.h | 5 +++-- src/mame/includes/fgoal.h | 5 +++-- src/mame/includes/firetrap.h | 8 +++++--- src/mame/includes/flkatck.h | 5 +++-- src/mame/includes/flstory.h | 8 +++++--- src/mame/includes/fromanc2.h | 8 +++++--- src/mame/includes/fromance.h | 5 +++-- src/mame/includes/funkyjet.h | 8 +++++--- src/mame/includes/funybubl.h | 5 +++-- src/mame/includes/fuukifg2.h | 8 +++++--- src/mame/includes/fuukifg3.h | 8 +++++--- src/mame/includes/gaelco.h | 5 +++-- src/mame/includes/gaiden.h | 5 +++-- src/mame/includes/galspnbl.h | 5 +++-- src/mame/includes/gameplan.h | 6 ++++-- src/mame/includes/gbusters.h | 8 +++++--- src/mame/includes/gijoe.h | 8 +++++--- src/mame/includes/ginganin.h | 5 +++-- src/mame/includes/goal92.h | 5 +++-- src/mame/includes/gotcha.h | 5 +++-- src/mame/includes/gradius3.h | 11 +++++++---- src/mame/includes/gridlee.h | 5 +++-- src/mame/includes/hcastle.h | 5 +++-- src/mame/includes/himesiki.h | 5 +++-- src/mame/includes/homedata.h | 8 +++++--- src/mame/includes/hyprduel.h | 8 +++++--- src/mame/includes/inufuku.h | 5 +++-- src/mame/includes/ironhors.h | 8 +++++--- src/mame/includes/jackal.h | 8 +++++--- src/mame/includes/karnov.h | 8 +++++--- src/mame/includes/kchamp.h | 5 +++-- src/mame/includes/kncljoe.h | 5 +++-- src/mame/includes/kopunch.h | 5 +++-- src/mame/includes/kyugo.h | 8 +++++--- src/mame/includes/ladybug.h | 5 +++-- src/mame/includes/ladyfrog.h | 5 +++-- src/mame/includes/lasso.h | 6 ++++-- src/mame/includes/lemmings.h | 9 +++++---- src/mame/includes/lethal.h | 8 +++++--- src/mame/includes/liberate.h | 8 +++++--- src/mame/includes/lkage.h | 8 +++++--- src/mame/includes/lockon.h | 8 +++++--- src/mame/includes/lsasquad.h | 8 +++++--- src/mame/includes/m10.h | 5 +++-- src/mame/includes/macrossp.h | 8 +++++--- src/mame/includes/madmotor.h | 8 +++++--- src/mame/includes/mainevt.h | 8 +++++--- src/mame/includes/marineb.h | 8 +++++--- src/mame/includes/matmania.h | 8 +++++--- src/mame/includes/mcatadv.h | 8 +++++--- src/mame/includes/megazone.h | 11 +++++++---- src/mame/includes/mermaid.h | 5 +++-- src/mame/includes/metlclsh.h | 8 +++++--- src/mame/includes/mexico86.h | 11 +++++++---- src/mame/includes/mikie.h | 8 +++++--- src/mame/includes/moo.h | 8 +++++--- src/mame/includes/mouser.h | 8 +++++--- src/mame/includes/mrflea.h | 8 +++++--- src/mame/includes/msisaac.h | 5 +++-- src/mame/includes/mugsmash.h | 8 +++++--- src/mame/includes/munchmo.h | 8 +++++--- src/mame/includes/n8080.h | 5 +++-- src/mame/includes/nemesis.h | 8 +++++--- src/mame/includes/ninjaw.h | 11 +++++++---- src/mame/includes/nitedrvr.h | 3 ++- src/mame/includes/nycaptor.h | 11 +++++++---- src/mame/includes/ojankohs.h | 5 +++-- src/mame/includes/oneshot.h | 8 +++++--- src/mame/includes/opwolf.h | 8 +++++--- src/mame/includes/orbit.h | 5 +++-- src/mame/includes/othunder.h | 8 +++++--- src/mame/includes/overdriv.h | 11 +++++++---- src/mame/includes/pandoras.h | 14 +++++++++----- src/mame/includes/parodius.h | 8 +++++--- src/mame/includes/pbaction.h | 8 +++++--- src/mame/includes/pgm.h | 23 ++++++++++++++--------- src/mame/includes/pktgaldx.h | 5 +++-- src/mame/includes/pooyan.h | 5 +++-- src/mame/includes/popper.h | 5 +++-- src/mame/includes/psikyo.h | 5 +++-- src/mame/includes/psikyo4.h | 5 +++-- src/mame/includes/psikyosh.h | 5 +++-- src/mame/includes/pushman.h | 8 +++++--- src/mame/includes/rainbow.h | 8 +++++--- src/mame/includes/rallyx.h | 5 +++-- src/mame/includes/rastan.h | 8 +++++--- src/mame/includes/rltennis.h | 3 ++- src/mame/includes/rockrage.h | 5 +++-- src/mame/includes/rollerg.h | 8 +++++--- src/mame/includes/rungun.h | 8 +++++--- src/mame/includes/sf.h | 8 +++++--- src/mame/includes/simpsons.h | 8 +++++--- src/mame/includes/skyfox.h | 5 +++-- src/mame/includes/slapshot.h | 8 +++++--- src/mame/includes/sonson.h | 5 +++-- src/mame/includes/spy.h | 8 +++++--- src/mame/includes/supbtime.h | 8 +++++--- src/mame/includes/suprslam.h | 5 +++-- src/mame/includes/surpratk.h | 5 +++-- src/mame/includes/system16.h | 8 +++++--- src/mame/includes/tail2nos.h | 8 +++++--- src/mame/includes/taito_b.h | 8 +++++--- src/mame/includes/taito_f2.h | 6 ++++-- src/mame/includes/taito_h.h | 8 +++++--- src/mame/includes/taito_l.h | 8 +++++--- src/mame/includes/taito_o.h | 5 +++-- src/mame/includes/taito_z.h | 11 +++++++---- src/mame/includes/taitoair.h | 3 ++- src/mame/includes/thunderx.h | 8 +++++--- src/mame/includes/tmnt.h | 8 +++++--- src/mame/includes/tnzs.h | 8 +++++--- src/mame/includes/topspeed.h | 11 +++++++---- src/mame/includes/tp84.h | 5 +++-- src/mame/includes/tumbleb.h | 8 +++++--- src/mame/includes/tumblep.h | 8 +++++--- src/mame/includes/tutankhm.h | 5 +++-- src/mame/includes/ultraman.h | 8 +++++--- src/mame/includes/vaportra.h | 8 +++++--- src/mame/includes/vendetta.h | 8 +++++--- src/mame/includes/volfied.h | 8 +++++--- src/mame/includes/warriorb.h | 8 +++++--- src/mame/includes/wgp.h | 11 +++++++---- src/mame/includes/xexex.h | 8 +++++--- src/mame/includes/xmen.h | 8 +++++--- src/mame/includes/yunsun16.h | 5 +++-- src/mame/includes/yunsung8.h | 5 +++-- src/mame/machine/ajax.c | 3 --- src/mame/machine/nitedrvr.c | 1 - src/mame/machine/pgmprot1.c | 5 ----- src/mame/machine/pgmprot2.c | 4 ---- src/mame/machine/pgmprot3.c | 3 --- src/mame/machine/simpsons.c | 2 -- src/mame/machine/tnzs.c | 2 -- 433 files changed, 969 insertions(+), 1019 deletions(-) diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c index ec76d5ef6dc..41f2499e977 100644 --- a/src/mame/drivers/1942.c +++ b/src/mame/drivers/1942.c @@ -238,7 +238,6 @@ GFXDECODE_END void _1942_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_palette_bank)); save_item(NAME(m_scroll)); diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c index 17b6e96b566..e6870a343e3 100644 --- a/src/mame/drivers/20pacgal.c +++ b/src/mame/drivers/20pacgal.c @@ -339,7 +339,6 @@ INPUT_PORTS_END void _20pacgal_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_eeprom = machine().device("eeprom"); save_item(NAME(m_game_selected)); diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c index 992bedc4b14..783594d1840 100644 --- a/src/mame/drivers/2mindril.c +++ b/src/mame/drivers/2mindril.c @@ -43,7 +43,8 @@ class _2mindril_state : public taito_f3_state public: _2mindril_state(const machine_config &mconfig, device_type type, const char *tag) : taito_f3_state(mconfig, type, tag), - m_iodata(*this, "iodata") { } + m_iodata(*this, "iodata"), + m_maincpu(*this, "maincpu") { } /* memory pointers */ required_shared_ptr m_iodata; @@ -54,7 +55,7 @@ public: UINT16 irq_reg; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ16_MEMBER(drill_io_r); DECLARE_WRITE16_MEMBER(drill_io_w); DECLARE_WRITE16_MEMBER(sensors_w); @@ -422,7 +423,6 @@ static const ym2610_interface ym2610_config = MACHINE_START_MEMBER(_2mindril_state,drill) { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_defender_sensor)); save_item(NAME(m_shutter_sensor)); diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c index 7e92145feb1..4e7c097f3cb 100644 --- a/src/mame/drivers/40love.c +++ b/src/mame/drivers/40love.c @@ -974,7 +974,6 @@ static const msm5232_interface msm5232_config = MACHINE_START_MEMBER(fortyl_state,40love) { - m_audiocpu = machine().device("audiocpu"); /* video */ save_item(NAME(m_pix1)); diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c index eca79cd9d70..46a0c28f3ee 100644 --- a/src/mame/drivers/88games.c +++ b/src/mame/drivers/88games.c @@ -300,7 +300,6 @@ static KONAMI_SETLINES_CALLBACK( k88games_banking ) void _88games_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); m_k051316 = machine().device("k051316"); diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c index 269a0fce827..a917cd03a7b 100644 --- a/src/mame/drivers/actfancr.c +++ b/src/mame/drivers/actfancr.c @@ -289,8 +289,6 @@ static const ym3812_interface ym3812_config = MACHINE_START_MEMBER(actfancr_state,actfancr) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); } MACHINE_START_MEMBER(actfancr_state,triothep) diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c index 9671c44c7f7..b14e1e36816 100644 --- a/src/mame/drivers/adp.c +++ b/src/mame/drivers/adp.c @@ -157,8 +157,9 @@ class adp_state : public driver_device public: adp_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_h63484(*this, "h63484"), - m_microtouch(*this, "microtouch") + m_h63484(*this, "h63484"), + m_microtouch(*this, "microtouch"), + m_maincpu(*this, "maincpu") { } required_device m_h63484; @@ -173,7 +174,7 @@ public: struct { int r,g,b,offs,offs_internal; } m_pal; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_duart; DECLARE_READ16_MEMBER(test_r); DECLARE_WRITE16_MEMBER(wh2_w); @@ -301,7 +302,6 @@ static const microtouch_interface adb_microtouch_config = MACHINE_START_MEMBER(adp_state,skattv) { - m_maincpu = machine().device("maincpu"); m_duart = machine().device("duart68681"); //m_h63484 = machine().device("h63484"); diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c index 34111ecfad6..d11d109dc46 100644 --- a/src/mame/drivers/aerofgt.c +++ b/src/mame/drivers/aerofgt.c @@ -1293,7 +1293,6 @@ static const ym3812_interface ym3812_config = MACHINE_START_MEMBER(aerofgt_state,common) { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_pending_command)); } diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c index 414f41394bc..de065ddd381 100644 --- a/src/mame/drivers/airbustr.c +++ b/src/mame/drivers/airbustr.c @@ -580,7 +580,6 @@ void airbustr_state::machine_start() m_master = machine().device("master"); m_slave = machine().device("slave"); - m_audiocpu = machine().device("audiocpu"); m_pandora = machine().device("pandora"); save_item(NAME(m_soundlatch_status)); diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c index 4a2277f6a95..98192cbae61 100644 --- a/src/mame/drivers/aliens.c +++ b/src/mame/drivers/aliens.c @@ -220,8 +220,6 @@ void aliens_state::machine_start() membank("bank1")->configure_entries(0, 20, &ROM[0x10000], 0x2000); membank("bank1")->set_entry(0); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k007232 = machine().device("k007232"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c index 8097e1a1eb6..2ea274463bc 100644 --- a/src/mame/drivers/alpha68k.c +++ b/src/mame/drivers/alpha68k.c @@ -1862,7 +1862,6 @@ static const ym3812_interface ym3812_config = MACHINE_START_MEMBER(alpha68k_state,common) { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_trigstate)); save_item(NAME(m_deposits1)); diff --git a/src/mame/drivers/amspdwy.c b/src/mame/drivers/amspdwy.c index a46d66a6eb9..7a20395a8fa 100644 --- a/src/mame/drivers/amspdwy.c +++ b/src/mame/drivers/amspdwy.c @@ -240,7 +240,6 @@ GFXDECODE_END void amspdwy_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_flipscreen)); save_item(NAME(m_wheel_old)); diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c index 4138479f219..6ed0bd31ba3 100644 --- a/src/mame/drivers/angelkds.c +++ b/src/mame/drivers/angelkds.c @@ -569,7 +569,6 @@ GFXDECODE_END void angelkds_state::machine_start() { - m_subcpu = machine().device("sub"); save_item(NAME(m_layer_ctrl)); save_item(NAME(m_txbank)); diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c index d60ef0d54ec..38ca0276e80 100644 --- a/src/mame/drivers/aquarium.c +++ b/src/mame/drivers/aquarium.c @@ -289,7 +289,6 @@ GFXDECODE_END void aquarium_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_aquarium_snd_ack)); } diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c index b7f01e63a42..7889f50dc78 100644 --- a/src/mame/drivers/ashnojoe.c +++ b/src/mame/drivers/ashnojoe.c @@ -327,7 +327,6 @@ static const msm5205_interface msm5205_config = void ashnojoe_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_adpcm_byte)); save_item(NAME(m_soundlatch_status)); diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c index e63db4fadcc..cd495341f43 100644 --- a/src/mame/drivers/asterix.c +++ b/src/mame/drivers/asterix.c @@ -240,8 +240,6 @@ static const k05324x_interface asterix_k05324x_intf = void asterix_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k053260 = machine().device("k053260"); m_k056832 = machine().device("k056832"); m_k053244 = machine().device("k053244"); diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c index 3e1fdc065a8..1de541ce46d 100644 --- a/src/mame/drivers/astrof.c +++ b/src/mame/drivers/astrof.c @@ -467,7 +467,6 @@ MACHINE_START_MEMBER(astrof_state,astrof) /* the 74175 outputs all HI's if not otherwise set */ astrof_set_video_control_2(0xff); - m_maincpu = machine().device("maincpu"); m_samples = machine().device("samples"); /* register for state saving */ @@ -497,7 +496,6 @@ MACHINE_START_MEMBER(astrof_state,spfghmk2) /* the 74175 outputs all HI's if not otherwise set */ spfghmk2_set_video_control_2(0xff); - m_maincpu = machine().device("maincpu"); /* the red background circuit is disabled */ m_red_on = FALSE; @@ -514,7 +512,6 @@ MACHINE_START_MEMBER(astrof_state,tomahawk) /* the 74175 outputs all HI's if not otherwise set */ tomahawk_set_video_control_2(0xff); - m_maincpu = machine().device("maincpu"); m_sn = machine().device("snsnd"); /* register for state saving */ diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c index 9546663aa8c..65c0c2c013b 100644 --- a/src/mame/drivers/asuka.c +++ b/src/mame/drivers/asuka.c @@ -824,8 +824,6 @@ static const tc0110pcr_interface asuka_tc0110pcr_intf = void asuka_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_pc090oj = machine().device("pc090oj"); m_tc0100scn = machine().device("tc0100scn"); diff --git a/src/mame/drivers/atarifb.c b/src/mame/drivers/atarifb.c index 7404fc9969e..3e82b28f43a 100644 --- a/src/mame/drivers/atarifb.c +++ b/src/mame/drivers/atarifb.c @@ -506,7 +506,6 @@ GFXDECODE_END void atarifb_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_CTRLD)); save_item(NAME(m_sign_x_1)); diff --git a/src/mame/drivers/battlane.c b/src/mame/drivers/battlane.c index dc558d4a9c3..86d6da3f0f4 100644 --- a/src/mame/drivers/battlane.c +++ b/src/mame/drivers/battlane.c @@ -266,8 +266,6 @@ static const ym3526_interface ym3526_config = void battlane_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); save_item(NAME(m_video_ctrl)); save_item(NAME(m_cpu_control)); diff --git a/src/mame/drivers/battlnts.c b/src/mame/drivers/battlnts.c index d618d8e8859..8f85cdff2d4 100644 --- a/src/mame/drivers/battlnts.c +++ b/src/mame/drivers/battlnts.c @@ -226,7 +226,6 @@ void battlnts_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000); - m_audiocpu = machine().device("audiocpu"); m_k007342 = machine().device("k007342"); m_k007420 = machine().device("k007420"); diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c index f3eae9510b9..e502cdbce53 100644 --- a/src/mame/drivers/beaminv.c +++ b/src/mame/drivers/beaminv.c @@ -61,7 +61,8 @@ class beaminv_state : public driver_device public: beaminv_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -73,7 +74,7 @@ public: UINT8 m_controller_select; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(v128_r); DECLARE_WRITE8_MEMBER(controller_select_w); DECLARE_READ8_MEMBER(controller_r); @@ -140,7 +141,6 @@ void beaminv_state::machine_start() { create_interrupt_timer(); - m_maincpu = machine().device("maincpu"); /* setup for save states */ save_item(NAME(m_controller_select)); diff --git a/src/mame/drivers/beezer.c b/src/mame/drivers/beezer.c index e04f77579b6..6cbe42e4fb9 100644 --- a/src/mame/drivers/beezer.c +++ b/src/mame/drivers/beezer.c @@ -79,7 +79,6 @@ INPUT_PORTS_END void beezer_state::machine_start() { - m_maincpu = machine().device("maincpu"); } static MACHINE_CONFIG_START( beezer, beezer_state ) diff --git a/src/mame/drivers/bigevglf.c b/src/mame/drivers/bigevglf.c index f6e75559084..8ee8cb486e8 100644 --- a/src/mame/drivers/bigevglf.c +++ b/src/mame/drivers/bigevglf.c @@ -414,7 +414,6 @@ static const msm5232_interface msm5232_config = void bigevglf_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); save_item(NAME(m_vidram_bank)); diff --git a/src/mame/drivers/bishi.c b/src/mame/drivers/bishi.c index f02e97167db..cb62d4771f8 100644 --- a/src/mame/drivers/bishi.c +++ b/src/mame/drivers/bishi.c @@ -387,7 +387,6 @@ static const k054338_interface bishi_k054338_intf = void bishi_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_k056832 = machine().device("k056832"); m_k054338 = machine().device("k054338"); m_k055555 = machine().device("k055555"); diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c index 7e4051f26be..1a7f091103e 100644 --- a/src/mame/drivers/bking.c +++ b/src/mame/drivers/bking.c @@ -390,7 +390,6 @@ static const ay8910_interface ay8910_config = void bking_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); /* video */ save_item(NAME(m_pc3259_output)); diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c index 8377078c116..60fc9d96812 100644 --- a/src/mame/drivers/bladestl.c +++ b/src/mame/drivers/bladestl.c @@ -304,7 +304,6 @@ void bladestl_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000); - m_audiocpu = machine().device("audiocpu"); m_k007342 = machine().device("k007342"); m_k007420 = machine().device("k007420"); diff --git a/src/mame/drivers/blktiger.c b/src/mame/drivers/blktiger.c index 70841932b79..622a6f7df88 100644 --- a/src/mame/drivers/blktiger.c +++ b/src/mame/drivers/blktiger.c @@ -276,7 +276,6 @@ static const ym2203_interface ym2203_config = void blktiger_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); /* configure bankswitching */ diff --git a/src/mame/drivers/blockhl.c b/src/mame/drivers/blockhl.c index 55c22655846..4ce25cd70db 100644 --- a/src/mame/drivers/blockhl.c +++ b/src/mame/drivers/blockhl.c @@ -186,8 +186,6 @@ void blockhl_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); diff --git a/src/mame/drivers/blockout.c b/src/mame/drivers/blockout.c index e5af89bfa40..27cbb527004 100644 --- a/src/mame/drivers/blockout.c +++ b/src/mame/drivers/blockout.c @@ -271,8 +271,6 @@ WRITE_LINE_MEMBER(blockout_state::irq_handler) void blockout_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_color)); } diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c index 816ae15e9f5..6051bd8afb9 100644 --- a/src/mame/drivers/bottom9.c +++ b/src/mame/drivers/bottom9.c @@ -315,8 +315,6 @@ void bottom9_state::machine_start() membank("bank1")->configure_entries(0, 12, &ROM[0x10000], 0x2000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); m_k051316 = machine().device("k051316"); diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c index 0835abed1c2..1ff0b6b0a44 100644 --- a/src/mame/drivers/boxer.c +++ b/src/mame/drivers/boxer.c @@ -26,7 +26,8 @@ public: boxer_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_tile_ram(*this, "tile_ram"), - m_sprite_ram(*this, "sprite_ram"){ } + m_sprite_ram(*this, "sprite_ram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_tile_ram; @@ -37,7 +38,7 @@ public: UINT8 m_pot_latch; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(boxer_input_r); DECLARE_READ8_MEMBER(boxer_misc_r); DECLARE_WRITE8_MEMBER(boxer_bell_w); @@ -427,7 +428,6 @@ GFXDECODE_END void boxer_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_pot_state)); save_item(NAME(m_pot_latch)); diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c index f7532155553..32ec9b2e80a 100644 --- a/src/mame/drivers/brkthru.c +++ b/src/mame/drivers/brkthru.c @@ -363,8 +363,6 @@ static const ym3526_interface ym3526_config = void brkthru_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_bgscroll)); save_item(NAME(m_bgbasecolor)); diff --git a/src/mame/drivers/btime.c b/src/mame/drivers/btime.c index c76dbb220f8..523ae268ce4 100644 --- a/src/mame/drivers/btime.c +++ b/src/mame/drivers/btime.c @@ -1240,8 +1240,6 @@ DISCRETE_SOUND_END MACHINE_START_MEMBER(btime_state,btime) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_btime_palette)); save_item(NAME(m_bnj_scroll1)); diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c index 265d0bba9ea..14206c4333a 100644 --- a/src/mame/drivers/bublbobl.c +++ b/src/mame/drivers/bublbobl.c @@ -721,9 +721,7 @@ static const ym2203_interface ym2203_config = MACHINE_START_MEMBER(bublbobl_state,common) { - m_maincpu = machine().device("maincpu"); m_mcu = machine().device("mcu"); - m_audiocpu = machine().device("audiocpu"); m_slave = machine().device("slave"); save_item(NAME(m_sound_nmi_enable)); diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c index 67f766ab73d..696ffe31385 100644 --- a/src/mame/drivers/buggychl.c +++ b/src/mame/drivers/buggychl.c @@ -361,7 +361,6 @@ void buggychl_state::machine_start() membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x2000); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_sound_nmi_enable)); save_item(NAME(m_pending_nmi)); diff --git a/src/mame/drivers/bwing.c b/src/mame/drivers/bwing.c index aab008aac84..e69b935987b 100644 --- a/src/mame/drivers/bwing.c +++ b/src/mame/drivers/bwing.c @@ -331,9 +331,6 @@ GFXDECODE_END void bwing_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_palatch)); save_item(NAME(m_srbank)); diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c index 5afea3241c2..4a8ef6e1e0b 100644 --- a/src/mame/drivers/capbowl.c +++ b/src/mame/drivers/capbowl.c @@ -334,8 +334,6 @@ static const ym2203_interface ym2203_config = void capbowl_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_blitter_addr)); save_item(NAME(m_last_trackball_val[0])); diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c index 8b81268b1a4..a2fd3937d5b 100644 --- a/src/mame/drivers/cave.c +++ b/src/mame/drivers/cave.c @@ -1791,8 +1791,6 @@ GFXDECODE_END MACHINE_START_MEMBER(cave_state,cave) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_soundbuf_len)); save_item(NAME(m_soundbuf_data)); diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c index 95f51d8f75f..5794d5b44f3 100644 --- a/src/mame/drivers/cball.c +++ b/src/mame/drivers/cball.c @@ -13,7 +13,8 @@ class cball_state : public driver_device public: cball_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram") + m_video_ram(*this, "video_ram"), + m_maincpu(*this, "maincpu") { } /* memory pointers */ @@ -23,7 +24,7 @@ public: tilemap_t* m_bg_tilemap; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(cball_vram_w); DECLARE_READ8_MEMBER(cball_wram_r); DECLARE_WRITE8_MEMBER(cball_wram_w); @@ -91,7 +92,6 @@ TIMER_CALLBACK_MEMBER(cball_state::interrupt_callback) void cball_state::machine_start() { - m_maincpu = machine().device("maincpu"); } void cball_state::machine_reset() diff --git a/src/mame/drivers/cbuster.c b/src/mame/drivers/cbuster.c index d4088aa51de..ea67e5a0312 100644 --- a/src/mame/drivers/cbuster.c +++ b/src/mame/drivers/cbuster.c @@ -291,8 +291,6 @@ static const deco16ic_interface twocrude_deco16ic_tilegen2_intf = void cbuster_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_deco_tilegen1 = machine().device("tilegen1"); m_deco_tilegen2 = machine().device("tilegen2"); diff --git a/src/mame/drivers/champbas.c b/src/mame/drivers/champbas.c index b293346c39b..63740a97f50 100644 --- a/src/mame/drivers/champbas.c +++ b/src/mame/drivers/champbas.c @@ -574,7 +574,6 @@ GFXDECODE_END MACHINE_START_MEMBER(champbas_state,champbas) { - m_maincpu = machine().device("maincpu"); m_mcu = machine().device(CPUTAG_MCU); save_item(NAME(m_watchdog_count)); @@ -584,7 +583,6 @@ MACHINE_START_MEMBER(champbas_state,champbas) MACHINE_START_MEMBER(champbas_state,exctsccr) { - m_audiocpu = machine().device("audiocpu"); // FIXME machine().scheduler().timer_pulse(attotime::from_hz(75), timer_expired_delegate(FUNC(champbas_state::exctsccr_fm_callback),this)); /* updates fm */ diff --git a/src/mame/drivers/chanbara.c b/src/mame/drivers/chanbara.c index 5adfaa14a17..60118e894fa 100644 --- a/src/mame/drivers/chanbara.c +++ b/src/mame/drivers/chanbara.c @@ -62,7 +62,8 @@ public: m_colorram(*this, "colorram"), m_spriteram(*this, "spriteram"), m_videoram2(*this, "videoram2"), - m_colorram2(*this, "colorram2"){ } + m_colorram2(*this, "colorram2"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -78,7 +79,7 @@ public: UINT8 m_scrollhi; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(chanbara_videoram_w); DECLARE_WRITE8_MEMBER(chanbara_colorram_w); DECLARE_WRITE8_MEMBER(chanbara_videoram2_w); @@ -384,7 +385,6 @@ static const ym2203_interface ym2203_config = void chanbara_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_scroll)); save_item(NAME(m_scrollhi)); diff --git a/src/mame/drivers/cheekyms.c b/src/mame/drivers/cheekyms.c index b9732cc6ee4..0a8f5786b13 100644 --- a/src/mame/drivers/cheekyms.c +++ b/src/mame/drivers/cheekyms.c @@ -109,7 +109,6 @@ GFXDECODE_END void cheekyms_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_dac = machine().device("dac"); } diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c index 2720e1d869a..d9dd3b7dc42 100644 --- a/src/mame/drivers/chinagat.c +++ b/src/mame/drivers/chinagat.c @@ -531,7 +531,6 @@ static const ym2203_interface ym2203_config = MACHINE_START_MEMBER(chinagat_state,chinagat) { - m_maincpu = machine().device("maincpu"); m_sub_cpu = machine().device("sub"); m_snd_cpu = machine().device("audiocpu"); diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c index ca8633f8782..7d9eb67e143 100644 --- a/src/mame/drivers/chqflag.c +++ b/src/mame/drivers/chqflag.c @@ -311,8 +311,6 @@ void chqflag_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k051316_1 = machine().device("k051316_1"); m_k051316_2 = machine().device("k051316_2"); m_k051960 = machine().device("k051960"); diff --git a/src/mame/drivers/circus.c b/src/mame/drivers/circus.c index 072b5cbf4f7..297e766ce1a 100644 --- a/src/mame/drivers/circus.c +++ b/src/mame/drivers/circus.c @@ -263,7 +263,6 @@ GFXDECODE_END ***************************************************************************/ void circus_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_samples = machine().device("samples"); save_item(NAME(m_clown_x)); diff --git a/src/mame/drivers/circusc.c b/src/mame/drivers/circusc.c index 81ed0974a5b..af68034a612 100644 --- a/src/mame/drivers/circusc.c +++ b/src/mame/drivers/circusc.c @@ -58,7 +58,6 @@ To enter service mode, keep 1&2 pressed on reset void circusc_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); m_dac = machine().device("dac"); save_item(NAME(m_sn_latch)); diff --git a/src/mame/drivers/citycon.c b/src/mame/drivers/citycon.c index 254dc543817..86347ac549b 100644 --- a/src/mame/drivers/citycon.c +++ b/src/mame/drivers/citycon.c @@ -188,7 +188,6 @@ static const ym2203_interface ym2203_config = void citycon_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_bg_image)); } diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c index 3ee4670c83c..d5917978cf8 100644 --- a/src/mame/drivers/cntsteer.c +++ b/src/mame/drivers/cntsteer.c @@ -37,7 +37,10 @@ public: m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_videoram2(*this, "videoram2"){ } + m_videoram2(*this, "videoram2"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "subcpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -63,9 +66,9 @@ public: int m_nmimask; // zerotrgt only /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; DECLARE_WRITE8_MEMBER(zerotrgt_vregs_w); DECLARE_WRITE8_MEMBER(cntsteer_vregs_w); DECLARE_WRITE8_MEMBER(cntsteer_foreground_vram_w); @@ -817,10 +820,6 @@ GFXDECODE_END MACHINE_START_MEMBER(cntsteer_state,cntsteer) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("subcpu"); - save_item(NAME(m_flipscreen)); save_item(NAME(m_bg_bank)); save_item(NAME(m_scrolly)); diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c index f64ba08fac4..da09f210bd2 100644 --- a/src/mame/drivers/combatsc.c +++ b/src/mame/drivers/combatsc.c @@ -678,7 +678,6 @@ MACHINE_START_MEMBER(combatsc_state,combatsc) m_interleave_timer = machine().scheduler().timer_alloc(FUNC_NULL); - m_audiocpu = machine().device("audiocpu"); m_k007121_1 = machine().device("k007121_1"); m_k007121_2 = machine().device("k007121_2"); diff --git a/src/mame/drivers/commando.c b/src/mame/drivers/commando.c index eabd484091f..608a0d2dda9 100644 --- a/src/mame/drivers/commando.c +++ b/src/mame/drivers/commando.c @@ -225,7 +225,6 @@ INTERRUPT_GEN_MEMBER(commando_state::commando_interrupt) void commando_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_scroll_x)); save_item(NAME(m_scroll_y)); diff --git a/src/mame/drivers/contra.c b/src/mame/drivers/contra.c index 59ff73bb364..61f7becd8eb 100644 --- a/src/mame/drivers/contra.c +++ b/src/mame/drivers/contra.c @@ -181,7 +181,6 @@ void contra_state::machine_start() membank("bank1")->configure_entries(0, 16, &ROM[0x10000], 0x2000); - m_audiocpu = machine().device("audiocpu"); m_k007121_1 = machine().device("k007121_1"); m_k007121_2 = machine().device("k007121_2"); } diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c index 514f1f88d17..f3ee7ac2083 100644 --- a/src/mame/drivers/coolpool.c +++ b/src/mame/drivers/coolpool.c @@ -134,7 +134,6 @@ static void coolpool_from_shiftreg(address_space &space, UINT32 address, UINT16 MACHINE_RESET_MEMBER(coolpool_state,amerdart) { - m_maincpu = machine().device("maincpu"); m_dsp = machine().device("dsp"); m_nvram_write_enable = 0; diff --git a/src/mame/drivers/cop01.c b/src/mame/drivers/cop01.c index 797e36a6932..12628c2e2c4 100644 --- a/src/mame/drivers/cop01.c +++ b/src/mame/drivers/cop01.c @@ -425,8 +425,6 @@ GFXDECODE_END void cop01_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_pulse)); save_item(NAME(m_timer)); diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index 2d3739478cd..0c748b1c86b 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -3156,8 +3156,6 @@ GFXDECODE_END MACHINE_START_MEMBER(cps_state,common) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); } MACHINE_START_MEMBER(cps_state,cps1) diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c index 4b936f297cb..2a2b8d0dee7 100644 --- a/src/mame/drivers/cps2.c +++ b/src/mame/drivers/cps2.c @@ -1240,8 +1240,6 @@ GFXDECODE_END MACHINE_START_MEMBER(cps_state,cps2) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); if (m_audiocpu != NULL) // gigaman2 has no audiocpu membank("bank1")->configure_entries(0, (QSOUND_SIZE - 0x10000) / 0x4000, memregion("audiocpu")->base() + 0x10000, 0x4000); diff --git a/src/mame/drivers/crgolf.c b/src/mame/drivers/crgolf.c index efe1595a510..3c5e62c0c80 100644 --- a/src/mame/drivers/crgolf.c +++ b/src/mame/drivers/crgolf.c @@ -73,8 +73,6 @@ WRITE8_MEMBER(crgolf_state::rom_bank_select_w) void crgolf_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); /* configure the banking */ membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x2000); diff --git a/src/mame/drivers/crimfght.c b/src/mame/drivers/crimfght.c index 7c979676722..ca4a40b7a42 100644 --- a/src/mame/drivers/crimfght.c +++ b/src/mame/drivers/crimfght.c @@ -255,8 +255,6 @@ void crimfght_state::machine_start() membank("bank2")->configure_entries(0, 12, &ROM[0x10000], 0x2000); membank("bank2")->set_entry(0); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); m_k007232 = machine().device("k007232"); diff --git a/src/mame/drivers/crospang.c b/src/mame/drivers/crospang.c index 8e79d77006d..432c26c9409 100644 --- a/src/mame/drivers/crospang.c +++ b/src/mame/drivers/crospang.c @@ -328,7 +328,6 @@ static const ym3812_interface ym3812_config = void crospang_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_bestri_tilebank)); diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c index 9abaaf05ad4..d39592d09f9 100644 --- a/src/mame/drivers/crystal.c +++ b/src/mame/drivers/crystal.c @@ -135,7 +135,8 @@ public: m_vidregs(*this, "vidregs"), m_textureram(*this, "textureram"), m_frameram(*this, "frameram"), - m_reset_patch(*this, "reset_patch"){ } + m_reset_patch(*this, "reset_patch"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_sysregs; @@ -160,7 +161,7 @@ public: UINT32 m_DMActrl[2]; UINT8 m_OldPort4; - cpu_device *m_maincpu; + required_device m_maincpu; ds1302_device *m_ds1302; device_t *m_vr0video; DECLARE_READ32_MEMBER(FlipCount_r); @@ -577,7 +578,6 @@ void crystal_state::machine_start() { int i; - m_maincpu = machine().device("maincpu"); m_ds1302 = machine().device("rtc"); m_vr0video = machine().device("vr0"); diff --git a/src/mame/drivers/cvs.c b/src/mame/drivers/cvs.c index 0e276b2ef17..8f619510455 100644 --- a/src/mame/drivers/cvs.c +++ b/src/mame/drivers/cvs.c @@ -982,8 +982,6 @@ MACHINE_START_MEMBER(cvs_state,cvs) start_393hz_timer(); /* set devices */ - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_speech = machine().device("speech"); m_dac3 = machine().device("dac3"); m_tms = machine().device("tms"); diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c index e01ca8382c8..e03a09cd97e 100644 --- a/src/mame/drivers/darius.c +++ b/src/mame/drivers/darius.c @@ -822,8 +822,6 @@ void darius_state::machine_start() membank("bank1")->configure_entry(4, memregion("audiocpu")->base()); membank("bank1")->set_entry(4); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_cpub = machine().device("cpub"); m_adpcm = machine().device("adpcm"); m_pc080sn = machine().device("pc080sn"); diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index e0c4c38fb5c..3820f8459a0 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -34,7 +34,9 @@ public: m_pf1_rowscroll(*this, "pf1_rowscroll"), m_pf2_rowscroll(*this, "pf2_rowscroll"), m_spriteram(*this, "spriteram"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -77,8 +79,8 @@ public: UINT8 m_sound_irq; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_deco_tilegen1; DECLARE_WRITE_LINE_MEMBER(sound_irq); DECLARE_READ16_MEMBER(dblewing_prot_r); @@ -560,8 +562,6 @@ static const deco16ic_interface dblewing_deco16ic_tilegen1_intf = void dblewing_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_deco_tilegen1 = machine().device("tilegen1"); save_item(NAME(m_008_data)); diff --git a/src/mame/drivers/dbz.c b/src/mame/drivers/dbz.c index 62712f6930f..deedd1de317 100644 --- a/src/mame/drivers/dbz.c +++ b/src/mame/drivers/dbz.c @@ -335,8 +335,6 @@ static const k053252_interface dbz_k053252_intf = void dbz_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k053936_1 = machine().device("k053936_1"); m_k053936_2 = machine().device("k053936_2"); m_k056832 = machine().device("k056832"); diff --git a/src/mame/drivers/dcheese.c b/src/mame/drivers/dcheese.c index 76d48e46057..bf8c9d3ca7e 100644 --- a/src/mame/drivers/dcheese.c +++ b/src/mame/drivers/dcheese.c @@ -89,8 +89,6 @@ INTERRUPT_GEN_MEMBER(dcheese_state::dcheese_vblank) void dcheese_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_bsmt = machine().device("bsmt"); m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(dcheese_state::irq_callback),this)); diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c index edee6ee3608..5a25715fbbd 100644 --- a/src/mame/drivers/ddayjlc.c +++ b/src/mame/drivers/ddayjlc.c @@ -64,7 +64,8 @@ public: m_mainram(*this, "mainram"), m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), - m_bgram(*this, "bgram"){ } + m_bgram(*this, "bgram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_mainram; @@ -85,7 +86,7 @@ public: UINT8 m_prot_addr; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(prot_w); DECLARE_WRITE8_MEMBER(char_bank_w); DECLARE_WRITE8_MEMBER(ddayjlc_bgram_w); @@ -447,7 +448,6 @@ INTERRUPT_GEN_MEMBER(ddayjlc_state::ddayjlc_snd_interrupt) void ddayjlc_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_char_bank)); save_item(NAME(m_bgadr)); diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c index a1c84abfd8d..812dd3f0211 100644 --- a/src/mame/drivers/ddenlovr.c +++ b/src/mame/drivers/ddenlovr.c @@ -9292,8 +9292,6 @@ INPUT_PORTS_END MACHINE_START_MEMBER(ddenlovr_state,ddenlovr) { - m_maincpu = machine().device("maincpu"); - m_soundcpu = machine().device("soundcpu"); m_oki = machine().device("oki"); save_item(NAME(m_input_sel)); diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c index 5d1f289327a..ef767e0f040 100644 --- a/src/mame/drivers/ddragon.c +++ b/src/mame/drivers/ddragon.c @@ -149,7 +149,6 @@ MACHINE_START_MEMBER(ddragon_state,ddragon) /* configure banks */ membank("bank1")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x4000); - m_maincpu = machine().device("maincpu"); m_sub_cpu = machine().device("sub"); m_snd_cpu = machine().device("soundcpu"); m_adpcm_1 = machine().device("adpcm1"); diff --git a/src/mame/drivers/ddragon3.c b/src/mame/drivers/ddragon3.c index 6f694cfd4f9..d8379ce81b6 100644 --- a/src/mame/drivers/ddragon3.c +++ b/src/mame/drivers/ddragon3.c @@ -542,8 +542,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(ddragon3_state::ddragon3_scanline) void ddragon3_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_vreg)); save_item(NAME(m_bg_scrollx)); diff --git a/src/mame/drivers/dec8.c b/src/mame/drivers/dec8.c index 2758d107f4f..5dd3b2344e5 100644 --- a/src/mame/drivers/dec8.c +++ b/src/mame/drivers/dec8.c @@ -1949,9 +1949,6 @@ INTERRUPT_GEN_MEMBER(dec8_state::oscar_interrupt) void dec8_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); save_item(NAME(m_latch)); diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c index 129b74261c5..6206cfa2334 100644 --- a/src/mame/drivers/destroyr.c +++ b/src/mame/drivers/destroyr.c @@ -22,7 +22,8 @@ public: : driver_device(mconfig, type, tag) , m_alpha_num_ram(*this, "alpha_nuram"), m_major_obj_ram(*this, "major_obj_ram"), - m_minor_obj_ram(*this, "minor_obj_ram"){ } + m_minor_obj_ram(*this, "minor_obj_ram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_alpha_num_ram; @@ -41,7 +42,7 @@ public: int m_noise; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(destroyr_misc_w); DECLARE_WRITE8_MEMBER(destroyr_cursor_load_w); DECLARE_WRITE8_MEMBER(destroyr_interrupt_ack_w); @@ -432,7 +433,6 @@ void destroyr_state::palette_init() void destroyr_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_cursor)); save_item(NAME(m_wavemod)); diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c index 8af72cedaf3..64384a76bd4 100644 --- a/src/mame/drivers/dietgo.c +++ b/src/mame/drivers/dietgo.c @@ -184,8 +184,6 @@ static const deco16ic_interface dietgo_deco16ic_tilegen1_intf = void dietgo_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_deco_tilegen1 = machine().device("tilegen1"); } diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c index 2a943ad6def..9533c25476c 100644 --- a/src/mame/drivers/discoboy.c +++ b/src/mame/drivers/discoboy.c @@ -50,7 +50,8 @@ class discoboy_state : public driver_device { public: discoboy_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_audiocpu(*this, "audiocpu") { } /* video-related */ UINT8 m_ram_bank; @@ -60,7 +61,7 @@ public: UINT8 m_toggle; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; /* memory */ UINT8 m_ram_1[0x800]; @@ -452,7 +453,6 @@ GFXDECODE_END void discoboy_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_ram_bank)); save_item(NAME(m_port_00)); diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c index 0e59e6a0bae..65cd2aacea5 100644 --- a/src/mame/drivers/diverboy.c +++ b/src/mame/drivers/diverboy.c @@ -58,14 +58,15 @@ class diverboy_state : public driver_device public: diverboy_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; // UINT16 * m_paletteram; // currently this uses generic palette handling /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(soundcmd_w); DECLARE_WRITE8_MEMBER(okibank_w); virtual void machine_start(); @@ -248,7 +249,6 @@ GFXDECODE_END void diverboy_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); } static MACHINE_CONFIG_START( diverboy, diverboy_state ) diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c index b08469e1dc0..786a719d65b 100644 --- a/src/mame/drivers/djboy.c +++ b/src/mame/drivers/djboy.c @@ -524,7 +524,6 @@ void djboy_state::machine_start() membank("bank3")->configure_entries(3, 5, &CPU2[0x10000], 0x4000); membank("bank4")->configure_entry(0, &MAIN[0x10000]); /* unsure if/how this area is banked */ - m_maincpu = machine().device("maincpu"); m_cpu1 = machine().device("cpu1"); m_cpu2 = machine().device("cpu2"); m_beast = machine().device("beast"); diff --git a/src/mame/drivers/docastle.c b/src/mame/drivers/docastle.c index fdea7f4b778..7712f3e1aca 100644 --- a/src/mame/drivers/docastle.c +++ b/src/mame/drivers/docastle.c @@ -584,9 +584,6 @@ void docastle_state::machine_reset() void docastle_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_slave = machine().device("slave"); - save_item(NAME(m_adpcm_pos)); save_item(NAME(m_adpcm_data)); save_item(NAME(m_adpcm_idle)); diff --git a/src/mame/drivers/dogfgt.c b/src/mame/drivers/dogfgt.c index 8f582415fbc..96ff2abcf25 100644 --- a/src/mame/drivers/dogfgt.c +++ b/src/mame/drivers/dogfgt.c @@ -207,7 +207,6 @@ GFXDECODE_END void dogfgt_state::machine_start() { - m_subcpu = machine().device("sub"); save_item(NAME(m_bm_plane)); save_item(NAME(m_lastflip)); diff --git a/src/mame/drivers/dreambal.c b/src/mame/drivers/dreambal.c index 4f4c479d51f..68eda3cb991 100644 --- a/src/mame/drivers/dreambal.c +++ b/src/mame/drivers/dreambal.c @@ -32,13 +32,14 @@ class dreambal_state : public driver_device public: dreambal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_eeprom(*this, "eeprom") + m_eeprom(*this, "eeprom"), + m_maincpu(*this, "maincpu") { } required_device m_eeprom; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_deco_tilegen1; DECLARE_DRIVER_INIT(dreambal); @@ -282,7 +283,6 @@ static const deco16ic_interface dreambal_deco16ic_tilegen1_intf = void dreambal_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_deco_tilegen1 = machine().device("tilegen1"); diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c index cece02fe93b..8f10217ae78 100644 --- a/src/mame/drivers/dynax.c +++ b/src/mame/drivers/dynax.c @@ -3972,8 +3972,6 @@ INPUT_PORTS_END MACHINE_START_MEMBER(dynax_state,dynax) { - m_maincpu = machine().device("maincpu"); - m_soundcpu = machine().device("soundcpu"); m_rtc = machine().device("rtc"); m_ymsnd = machine().device("ymsnd"); diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c index 9d37d6653ee..891883d2d09 100644 --- a/src/mame/drivers/egghunt.c +++ b/src/mame/drivers/egghunt.c @@ -49,7 +49,8 @@ class egghunt_state : public driver_device { public: egghunt_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) , + : driver_device(mconfig, type, tag), + m_audiocpu(*this, "audiocpu"), m_atram(*this, "atram"){ } /* video-related */ @@ -61,7 +62,7 @@ public: UINT8 m_gfx_banking; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; /* memory */ required_shared_ptr m_atram; @@ -390,7 +391,6 @@ GFXDECODE_END void egghunt_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_gfx_banking)); save_item(NAME(m_okibanking)); diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c index 78ab4f9c701..cb18b25dcb6 100644 --- a/src/mame/drivers/enigma2.c +++ b/src/mame/drivers/enigma2.c @@ -61,7 +61,9 @@ class enigma2_state : public driver_device public: enigma2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -77,8 +79,8 @@ public: emu_timer *m_interrupt_assert_timer; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_READ8_MEMBER(dip_switch_r); DECLARE_WRITE8_MEMBER(sound_data_w); DECLARE_WRITE8_MEMBER(enigma2_flip_screen_w); @@ -168,8 +170,6 @@ void enigma2_state::machine_start() { create_interrupt_timers(); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_blink_count)); save_item(NAME(m_sound_latch)); diff --git a/src/mame/drivers/espial.c b/src/mame/drivers/espial.c index d8ee1db9344..a1e229a2da3 100644 --- a/src/mame/drivers/espial.c +++ b/src/mame/drivers/espial.c @@ -54,8 +54,6 @@ void espial_state::machine_reset() void espial_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); //state_save_register_global_array(machine(), mcu_out[1]); save_item(NAME(m_sound_nmi_enabled)); diff --git a/src/mame/drivers/exerion.c b/src/mame/drivers/exerion.c index 06abae52b13..3ecc0ee60c4 100644 --- a/src/mame/drivers/exerion.c +++ b/src/mame/drivers/exerion.c @@ -379,7 +379,6 @@ static const ay8910_interface ay8910_config = void exerion_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_porta)); save_item(NAME(m_portb)); diff --git a/src/mame/drivers/exprraid.c b/src/mame/drivers/exprraid.c index da7d5722aef..708b5706cec 100644 --- a/src/mame/drivers/exprraid.c +++ b/src/mame/drivers/exprraid.c @@ -467,7 +467,6 @@ INTERRUPT_GEN_MEMBER(exprraid_state::exprraid_interrupt) void exprraid_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_slave = machine().device("slave"); save_item(NAME(m_bg_index)); diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c index f62d6c5b743..0eec5442119 100644 --- a/src/mame/drivers/f1gp.c +++ b/src/mame/drivers/f1gp.c @@ -426,7 +426,6 @@ MACHINE_START_MEMBER(f1gp_state,f1gp) membank("bank1")->configure_entries(0, 2, &ROM[0x10000], 0x8000); - m_audiocpu = machine().device("audiocpu"); m_k053936 = machine().device("k053936"); MACHINE_START_CALL_MEMBER(f1gpb); diff --git a/src/mame/drivers/fcombat.c b/src/mame/drivers/fcombat.c index b8e71119dd6..abc82df0258 100644 --- a/src/mame/drivers/fcombat.c +++ b/src/mame/drivers/fcombat.c @@ -257,7 +257,6 @@ GFXDECODE_END void fcombat_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_cocktail_flip)); save_item(NAME(m_char_palette)); diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 8f665f6d797..a0743d2fe22 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -1356,8 +1356,6 @@ MACHINE_START_MEMBER(cps_state,fcrash) membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_msm_1 = machine().device("msm1"); m_msm_2 = machine().device("msm2"); @@ -1390,8 +1388,6 @@ MACHINE_START_MEMBER(cps_state,sgyxz) MACHINE_START_MEMBER(cps_state,kodb) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_layer_enable_reg = 0x20; m_layer_mask_reg[0] = 0x2e; @@ -1427,8 +1423,6 @@ MACHINE_START_MEMBER(cps_state, sf2mdt) membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_msm_1 = machine().device("msm1"); m_msm_2 = machine().device("msm2"); @@ -1456,8 +1450,6 @@ MACHINE_START_MEMBER(cps_state, knightsb) membank("bank1")->configure_entries(0, 16, &ROM[0x10000], 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_msm_1 = machine().device("msm1"); m_msm_2 = machine().device("msm2"); m_layer_enable_reg = 0x30; @@ -1479,8 +1471,6 @@ MACHINE_START_MEMBER(cps_state, sf2m1) membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_layer_enable_reg = 0x26; m_layer_mask_reg[0] = 0x28; m_layer_mask_reg[1] = 0x2a; @@ -1947,9 +1937,6 @@ DRIVER_INIT_MEMBER(cps_state, cawingbl) MACHINE_START_MEMBER(cps_state, dinopic) { - m_maincpu = machine().device("maincpu"); - //m_audiocpu = machine().device("audiocpu"); - m_layer_enable_reg = 0x0a; m_layer_mask_reg[0] = 0x0c; m_layer_mask_reg[1] = 0x0e; @@ -2196,9 +2183,6 @@ ROM_END MACHINE_START_MEMBER(cps_state, punipic) { - m_maincpu = machine().device("maincpu"); - //m_audiocpu = machine().device("audiocpu"); - m_layer_enable_reg = 0x12; m_layer_mask_reg[0] = 0x14; m_layer_mask_reg[1] = 0x16; @@ -2588,9 +2572,6 @@ DRIVER_INIT_MEMBER(cps_state, sf2mdta) MACHINE_START_MEMBER(cps_state, slampic) { - m_maincpu = machine().device("maincpu"); - //m_audiocpu = machine().device("audiocpu"); - m_layer_enable_reg = 0x16; m_layer_mask_reg[0] = 0x00; m_layer_mask_reg[1] = 0x02; diff --git a/src/mame/drivers/fgoal.c b/src/mame/drivers/fgoal.c index f1557c65304..56fc792ac33 100644 --- a/src/mame/drivers/fgoal.c +++ b/src/mame/drivers/fgoal.c @@ -326,7 +326,6 @@ GFXDECODE_END void fgoal_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_mb14241 = machine().device("mb14241"); save_item(NAME(m_xpos)); diff --git a/src/mame/drivers/firetrap.c b/src/mame/drivers/firetrap.c index 4eaecbed65c..54dafbdde8c 100644 --- a/src/mame/drivers/firetrap.c +++ b/src/mame/drivers/firetrap.c @@ -590,8 +590,6 @@ void firetrap_state::machine_start() UINT8 *MAIN = memregion("maincpu")->base(); UINT8 *SOUND = memregion("audiocpu")->base(); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_msm = machine().device("msm"); membank("bank1")->configure_entries(0, 4, &MAIN[0x10000], 0x4000); diff --git a/src/mame/drivers/flkatck.c b/src/mame/drivers/flkatck.c index 018bbada5a3..2df44ccc797 100644 --- a/src/mame/drivers/flkatck.c +++ b/src/mame/drivers/flkatck.c @@ -195,7 +195,6 @@ void flkatck_state::machine_start() membank("bank1")->configure_entries(0, 3, &ROM[0x10000], 0x2000); - m_audiocpu = machine().device("audiocpu"); m_k007121 = machine().device("k007121"); save_item(NAME(m_irq_enabled)); diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c index a54959f6f53..e6293856d6b 100644 --- a/src/mame/drivers/flstory.c +++ b/src/mame/drivers/flstory.c @@ -1002,8 +1002,6 @@ static const msm5232_interface msm5232_config = void flstory_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); /* video */ diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c index 9360620ce4a..ca232baa940 100644 --- a/src/mame/drivers/flyball.c +++ b/src/mame/drivers/flyball.c @@ -24,7 +24,8 @@ public: flyball_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_playfield_ram(*this, "playfield_ram"), - m_rombase(*this, "rombase"){ } + m_rombase(*this, "rombase"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_playfield_ram; @@ -43,7 +44,7 @@ public: UINT8 m_potsense; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(flyball_input_r); DECLARE_READ8_MEMBER(flyball_scanline_r); DECLARE_READ8_MEMBER(flyball_potsense_r); @@ -374,7 +375,6 @@ void flyball_state::palette_init() void flyball_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_pitcher_vert)); save_item(NAME(m_pitcher_horz)); diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c index 98812a76fb5..f0bf72899c0 100644 --- a/src/mame/drivers/fromanc2.c +++ b/src/mame/drivers/fromanc2.c @@ -501,8 +501,6 @@ static const ym2610_interface ym2610_config = MACHINE_START_MEMBER(fromanc2_state,fromanc4) { - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("sub"); m_eeprom = machine().device("eeprom"); m_left_screen = machine().device("lscreen"); m_right_screen = machine().device("rscreen"); diff --git a/src/mame/drivers/fromance.c b/src/mame/drivers/fromance.c index 54612234381..458180b221e 100644 --- a/src/mame/drivers/fromance.c +++ b/src/mame/drivers/fromance.c @@ -952,7 +952,6 @@ MACHINE_START_MEMBER(fromance_state,fromance) membank("bank1")->configure_entries(0, 0x100, &ROM[0x10000], 0x4000); - m_subcpu = machine().device("sub"); save_item(NAME(m_directionflag)); save_item(NAME(m_commanddata)); diff --git a/src/mame/drivers/funkyjet.c b/src/mame/drivers/funkyjet.c index b90e12492d7..cf1f9c050ae 100644 --- a/src/mame/drivers/funkyjet.c +++ b/src/mame/drivers/funkyjet.c @@ -288,8 +288,6 @@ static const deco16ic_interface funkyjet_deco16ic_tilegen1_intf = void funkyjet_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_deco_tilegen1 = machine().device("tilegen1"); decoprot_reset(machine()); diff --git a/src/mame/drivers/funybubl.c b/src/mame/drivers/funybubl.c index ba6364ba87f..8b0ee6c0819 100644 --- a/src/mame/drivers/funybubl.c +++ b/src/mame/drivers/funybubl.c @@ -204,7 +204,6 @@ void funybubl_state::machine_start() { UINT8 *ROM = memregion("maincpu")->base(); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_banked_vram)); diff --git a/src/mame/drivers/fuukifg2.c b/src/mame/drivers/fuukifg2.c index 172b0f14abb..6386ebcc68b 100644 --- a/src/mame/drivers/fuukifg2.c +++ b/src/mame/drivers/fuukifg2.c @@ -441,8 +441,6 @@ void fuuki16_state::machine_start() membank("bank1")->configure_entries(0, 3, &ROM[0x10000], 0x8000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_raster_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fuuki16_state::raster_interrupt_callback),this)); } diff --git a/src/mame/drivers/fuukifg3.c b/src/mame/drivers/fuukifg3.c index 2dfd55029db..4ff2bb6d015 100644 --- a/src/mame/drivers/fuukifg3.c +++ b/src/mame/drivers/fuukifg3.c @@ -549,9 +549,6 @@ void fuuki32_state::machine_start() membank("bank1")->configure_entries(0, 0x10, &ROM[0x10000], 0x8000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("soundcpu"); - m_raster_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fuuki32_state::raster_interrupt_callback),this)); save_item(NAME(m_spr_buffered_tilebank)); @@ -571,7 +568,7 @@ void fuuki32_state::machine_reset() WRITE_LINE_MEMBER(fuuki32_state::irqhandler) { - m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); + m_soundcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); } static const ymf278b_interface fuuki32_ymf278b_interface = diff --git a/src/mame/drivers/gaelco.c b/src/mame/drivers/gaelco.c index 00a8f4a0e58..8bebfe11ed0 100644 --- a/src/mame/drivers/gaelco.c +++ b/src/mame/drivers/gaelco.c @@ -492,7 +492,6 @@ GFXDECODEINFO(0x100000,64) void gaelco_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); } static MACHINE_CONFIG_START( bigkarnk, gaelco_state ) diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c index 4562d0efaf4..12bd7eb82bb 100644 --- a/src/mame/drivers/gaiden.c +++ b/src/mame/drivers/gaiden.c @@ -306,7 +306,6 @@ MACHINE_RESET_MEMBER(gaiden_state,raiga) MACHINE_START_MEMBER(gaiden_state,raiga) { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_prot)); save_item(NAME(m_jumpcode)); diff --git a/src/mame/drivers/galspnbl.c b/src/mame/drivers/galspnbl.c index 8cb225e818a..38a8bb3fe2b 100644 --- a/src/mame/drivers/galspnbl.c +++ b/src/mame/drivers/galspnbl.c @@ -218,7 +218,6 @@ static const ym3812_interface ym3812_config = void galspnbl_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); } static MACHINE_CONFIG_START( galspnbl, galspnbl_state ) diff --git a/src/mame/drivers/gameplan.c b/src/mame/drivers/gameplan.c index 4b070959fde..e66fc1d4a25 100644 --- a/src/mame/drivers/gameplan.c +++ b/src/mame/drivers/gameplan.c @@ -973,8 +973,6 @@ static const ay8910_interface ay8910_config = MACHINE_START_MEMBER(gameplan_state,gameplan) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_riot = machine().device("riot"); /* register for save states */ diff --git a/src/mame/drivers/gbusters.c b/src/mame/drivers/gbusters.c index a82d4ede309..2f4e5b096a8 100644 --- a/src/mame/drivers/gbusters.c +++ b/src/mame/drivers/gbusters.c @@ -267,8 +267,6 @@ void gbusters_state::machine_start() m_generic_paletteram_8.allocate(0x800); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); m_k007232 = machine().device("k007232"); diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c index 77e468551c8..3caf91eccb1 100644 --- a/src/mame/drivers/gijoe.c +++ b/src/mame/drivers/gijoe.c @@ -267,8 +267,6 @@ static const k053247_interface gijoe_k053247_intf = void gijoe_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k054539 = machine().device("k054539"); m_k056832 = machine().device("k056832"); m_k053246 = machine().device("k053246"); diff --git a/src/mame/drivers/ginganin.c b/src/mame/drivers/ginganin.c index 2923a214a77..e80d893b38e 100644 --- a/src/mame/drivers/ginganin.c +++ b/src/mame/drivers/ginganin.c @@ -228,7 +228,6 @@ GFXDECODE_END void ginganin_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_layers_ctrl)); save_item(NAME(m_flipscreen)); diff --git a/src/mame/drivers/go2000.c b/src/mame/drivers/go2000.c index 1574b7d83f1..b818b7ccf85 100644 --- a/src/mame/drivers/go2000.c +++ b/src/mame/drivers/go2000.c @@ -40,7 +40,8 @@ public: go2000_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_videoram2(*this, "videoram2"){ } + m_videoram2(*this, "videoram2"), + m_soundcpu(*this, "soundcpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -48,7 +49,7 @@ public: // UINT16 * m_paletteram; // currently this uses generic palette handling /* devices */ - cpu_device *m_soundcpu; + required_device m_soundcpu; DECLARE_WRITE16_MEMBER(sound_cmd_w); DECLARE_WRITE8_MEMBER(go2000_pcm_1_bankswitch_w); virtual void machine_start(); @@ -313,7 +314,6 @@ void go2000_state::machine_start() membank("bank1")->set_entry(0); - m_soundcpu = machine().device("soundcpu"); } static MACHINE_CONFIG_START( go2000, go2000_state ) diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c index 10355ca2a7d..1a480540422 100644 --- a/src/mame/drivers/goal92.c +++ b/src/mame/drivers/goal92.c @@ -293,7 +293,6 @@ void goal92_state::machine_start() membank("bank1")->configure_entries(0, 2, &ROM[0x10000], 0x4000); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_fg_bank)); save_item(NAME(m_msm5205next)); diff --git a/src/mame/drivers/gotcha.c b/src/mame/drivers/gotcha.c index 947c49a84fe..d3a357c9f6f 100644 --- a/src/mame/drivers/gotcha.c +++ b/src/mame/drivers/gotcha.c @@ -238,7 +238,6 @@ GFXDECODE_END void gotcha_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_banksel)); save_item(NAME(m_gfxbank)); diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c index 23afcf9fe90..785b780222f 100644 --- a/src/mame/drivers/gradius3.c +++ b/src/mame/drivers/gradius3.c @@ -281,9 +281,6 @@ static const k051960_interface gradius3_k051960_intf = void gradius3_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("sub"); m_k007232 = machine().device("k007232"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); diff --git a/src/mame/drivers/gridlee.c b/src/mame/drivers/gridlee.c index e18ab66c27c..7f282994221 100644 --- a/src/mame/drivers/gridlee.c +++ b/src/mame/drivers/gridlee.c @@ -135,7 +135,6 @@ TIMER_CALLBACK_MEMBER(gridlee_state::firq_timer_tick) void gridlee_state::machine_start() { - m_maincpu = machine().device("maincpu"); /* create the polynomial tables */ poly17_init(); diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c index 1939c56ea5f..186de331cbd 100644 --- a/src/mame/drivers/hcastle.c +++ b/src/mame/drivers/hcastle.c @@ -183,7 +183,6 @@ void hcastle_state::machine_start() membank("bank1")->configure_entries(0, 16, &ROM[0x10000], 0x2000); - m_audiocpu = machine().device("audiocpu"); m_k007121_1 = machine().device("k007121_1"); m_k007121_2 = machine().device("k007121_2"); diff --git a/src/mame/drivers/himesiki.c b/src/mame/drivers/himesiki.c index b86eaf9ea61..5ea5135d775 100644 --- a/src/mame/drivers/himesiki.c +++ b/src/mame/drivers/himesiki.c @@ -272,7 +272,6 @@ void himesiki_state::machine_start() membank("bank1")->configure_entries(0, 2, &ROM[0x10000], 0x4000); - m_subcpu = machine().device("sub"); save_item(NAME(m_scrollx)); save_item(NAME(m_flipscreen)); diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c index 91be83bb5b2..0f2f79e3783 100644 --- a/src/mame/drivers/homedata.c +++ b/src/mame/drivers/homedata.c @@ -1140,8 +1140,6 @@ static const sn76496_config psg_intf = MACHINE_START_MEMBER(homedata_state,homedata) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_ym = machine().device("ymsnd"); m_sn = machine().device("snsnd"); m_dac = machine().device("dac"); diff --git a/src/mame/drivers/hyprduel.c b/src/mame/drivers/hyprduel.c index 758531319e6..2bf9829212c 100644 --- a/src/mame/drivers/hyprduel.c +++ b/src/mame/drivers/hyprduel.c @@ -628,8 +628,6 @@ void hyprduel_state::machine_reset() MACHINE_START_MEMBER(hyprduel_state,hyprduel) { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); save_item(NAME(m_blitter_bit)); save_item(NAME(m_requested_int)); diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c index 9cc788dcb42..133dd87b3ef 100644 --- a/src/mame/drivers/inufuku.c +++ b/src/mame/drivers/inufuku.c @@ -344,7 +344,6 @@ void inufuku_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0x00000], 0x8000); membank("bank1")->set_entry(0); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_pending_command)); save_item(NAME(m_bg_scrollx)); diff --git a/src/mame/drivers/ironhors.c b/src/mame/drivers/ironhors.c index b2b3c3ddc30..24673984eca 100644 --- a/src/mame/drivers/ironhors.c +++ b/src/mame/drivers/ironhors.c @@ -356,8 +356,6 @@ static const ym2203_interface ym2203_config = void ironhors_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_soundcpu = machine().device("soundcpu"); save_item(NAME(m_palettebank)); save_item(NAME(m_charbank)); diff --git a/src/mame/drivers/jackal.c b/src/mame/drivers/jackal.c index d5d97206db5..2345380173a 100644 --- a/src/mame/drivers/jackal.c +++ b/src/mame/drivers/jackal.c @@ -330,9 +330,6 @@ void jackal_state::machine_start() membank("bank1")->configure_entry(1, &ROM[0x14000]); membank("bank1")->set_entry(0); - m_mastercpu = machine().device("master"); - m_slavecpu = machine().device("slave"); - save_item(NAME(m_irq_enable)); } diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c index 4b62ffa1a17..81262b71478 100644 --- a/src/mame/drivers/junofrst.c +++ b/src/mame/drivers/junofrst.c @@ -93,13 +93,14 @@ class junofrst_state : public tutankhm_state { public: junofrst_state(const machine_config &mconfig, device_type type, const char *tag) - : tutankhm_state(mconfig, type, tag) { } + : tutankhm_state(mconfig, type, tag), + m_audiocpu(*this, "audiocpu") { } UINT8 m_blitterdata[4]; int m_i8039_status; int m_last_irq; - cpu_device *m_soundcpu; + required_device m_audiocpu; device_t *m_i8039; device_t *m_filter_0_0; @@ -207,7 +208,7 @@ READ8_MEMBER(junofrst_state::junofrst_portA_r) /* divided by 1024 to get this timer */ /* (divide by (1024/2), and not 1024, because the CPU cycle counter is */ /* incremented every other state change of the clock) */ - timer = (m_soundcpu->total_cycles() / (1024 / 2)) & 0x0f; + timer = (m_audiocpu->total_cycles() / (1024 / 2)) & 0x0f; /* low three bits come from the 8039 */ @@ -240,7 +241,7 @@ WRITE8_MEMBER(junofrst_state::junofrst_sh_irqtrigger_w) if (m_last_irq == 0 && data == 1) { /* setting bit 0 low then high triggers IRQ on the sound CPU */ - m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); } m_last_irq = data; @@ -380,9 +381,7 @@ static const ay8910_interface ay8910_config = MACHINE_START_MEMBER(junofrst_state,junofrst) { - m_maincpu = machine().device("maincpu"); m_i8039 = machine().device("mcu"); - m_soundcpu = machine().device("audiocpu"); m_filter_0_0 = machine().device("filter.0.0"); m_filter_0_1 = machine().device("filter.0.1"); m_filter_0_2 = machine().device("filter.0.2"); diff --git a/src/mame/drivers/karnov.c b/src/mame/drivers/karnov.c index 0b0db6f13fe..5fe94f8d517 100644 --- a/src/mame/drivers/karnov.c +++ b/src/mame/drivers/karnov.c @@ -758,8 +758,6 @@ static const ym3526_interface ym3526_config = void karnov_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_flipscreen)); save_item(NAME(m_scroll)); diff --git a/src/mame/drivers/kas89.c b/src/mame/drivers/kas89.c index 0098bc8396a..42f792bc922 100644 --- a/src/mame/drivers/kas89.c +++ b/src/mame/drivers/kas89.c @@ -204,7 +204,9 @@ class kas89_state : public driver_device public: kas89_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_v9938(*this, "v9938") + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_v9938(*this, "v9938") { } UINT8 m_mux_data; @@ -214,8 +216,8 @@ public: UINT8 m_leds_mux_data; UINT8 m_outdata; /* Muxed with the sound latch. Output to a sign? */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; required_device m_v9938; DECLARE_WRITE8_MEMBER(mux_w); @@ -261,8 +263,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(kas89_state::kas89_interrupt) void kas89_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); output_set_lamp_value(37, 0); /* turning off the operator led */ } diff --git a/src/mame/drivers/kchamp.c b/src/mame/drivers/kchamp.c index 5de2fa8cba4..0958df8e0b4 100644 --- a/src/mame/drivers/kchamp.c +++ b/src/mame/drivers/kchamp.c @@ -380,7 +380,6 @@ INTERRUPT_GEN_MEMBER(kchamp_state::sound_int) MACHINE_START_MEMBER(kchamp_state,kchamp) { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_nmi_enable)); save_item(NAME(m_sound_nmi_enable)); diff --git a/src/mame/drivers/kncljoe.c b/src/mame/drivers/kncljoe.c index 0ce9a0eb6ee..06e3308221f 100644 --- a/src/mame/drivers/kncljoe.c +++ b/src/mame/drivers/kncljoe.c @@ -263,7 +263,6 @@ INTERRUPT_GEN_MEMBER(kncljoe_state::sound_nmi) void kncljoe_state::machine_start() { - m_soundcpu = machine().device("soundcpu"); save_item(NAME(m_port1)); save_item(NAME(m_port2)); diff --git a/src/mame/drivers/kopunch.c b/src/mame/drivers/kopunch.c index 204f43b999b..51e5fa9c246 100644 --- a/src/mame/drivers/kopunch.c +++ b/src/mame/drivers/kopunch.c @@ -169,7 +169,6 @@ GFXDECODE_END void kopunch_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_gfxbank)); } diff --git a/src/mame/drivers/kyugo.c b/src/mame/drivers/kyugo.c index e807ec33204..e005d8393c1 100644 --- a/src/mame/drivers/kyugo.c +++ b/src/mame/drivers/kyugo.c @@ -495,8 +495,6 @@ static const ay8910_interface ay8910_config = void kyugo_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); save_item(NAME(m_scroll_x_lo)); save_item(NAME(m_scroll_x_hi)); diff --git a/src/mame/drivers/ladybug.c b/src/mame/drivers/ladybug.c index 58f83586222..783420f8abf 100644 --- a/src/mame/drivers/ladybug.c +++ b/src/mame/drivers/ladybug.c @@ -725,12 +725,10 @@ static const sn76496_config psg_intf = MACHINE_START_MEMBER(ladybug_state,ladybug) { - m_maincpu = machine().device("maincpu"); } MACHINE_START_MEMBER(ladybug_state,sraider) { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_grid_color)); save_item(NAME(m_sound_low)); diff --git a/src/mame/drivers/ladyfrog.c b/src/mame/drivers/ladyfrog.c index d238b2bf426..0ab6712a241 100644 --- a/src/mame/drivers/ladyfrog.c +++ b/src/mame/drivers/ladyfrog.c @@ -275,7 +275,6 @@ GFXDECODE_END void ladyfrog_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_tilebank)); save_item(NAME(m_palette_bank)); diff --git a/src/mame/drivers/lasso.c b/src/mame/drivers/lasso.c index ba9495fd33d..1db03e9f168 100644 --- a/src/mame/drivers/lasso.c +++ b/src/mame/drivers/lasso.c @@ -470,8 +470,6 @@ static const sn76496_config psg_intf = void lasso_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_gfxbank)); } diff --git a/src/mame/drivers/lemmings.c b/src/mame/drivers/lemmings.c index 6e15a03d9f7..a681c87658c 100644 --- a/src/mame/drivers/lemmings.c +++ b/src/mame/drivers/lemmings.c @@ -241,7 +241,6 @@ GFXDECODE_END void lemmings_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); } static MACHINE_CONFIG_START( lemmings, lemmings_state ) diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c index c37e0c69db0..f287acf4696 100644 --- a/src/mame/drivers/lethal.c +++ b/src/mame/drivers/lethal.c @@ -216,7 +216,7 @@ WRITE8_MEMBER(lethal_state::sound_cmd_w) WRITE8_MEMBER(lethal_state::sound_irq_w) { - m_audiocpu->set_input_line(0, HOLD_LINE); + m_soundcpu->set_input_line(0, HOLD_LINE); } READ8_MEMBER(lethal_state::sound_status_r) @@ -227,7 +227,7 @@ READ8_MEMBER(lethal_state::sound_status_r) static void sound_nmi( device_t *device ) { lethal_state *state = device->machine().driver_data(); - state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + state->m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(lethal_state::le_bankswitch_w) @@ -580,9 +580,7 @@ void lethal_state::machine_start() membank("bank1")->set_entry(0); m_generic_paletteram_8.allocate(0x3800 + 0x02); - - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("soundcpu"); + m_k054539 = machine().device("k054539"); m_k053244 = machine().device("k053244"); m_k056832 = machine().device("k056832"); diff --git a/src/mame/drivers/liberate.c b/src/mame/drivers/liberate.c index 7d061545e8f..40448ca4df5 100644 --- a/src/mame/drivers/liberate.c +++ b/src/mame/drivers/liberate.c @@ -793,8 +793,6 @@ INTERRUPT_GEN_MEMBER(liberate_state::prosport_interrupt) MACHINE_START_MEMBER(liberate_state,liberate) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_background_disable)); save_item(NAME(m_background_color)); diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c index 99d6ff5ab5c..2f368e56909 100644 --- a/src/mame/drivers/lkage.c +++ b/src/mame/drivers/lkage.c @@ -491,8 +491,6 @@ static const ym2203_interface ym2203_config = void lkage_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); save_item(NAME(m_bg_tile_bank)); diff --git a/src/mame/drivers/lockon.c b/src/mame/drivers/lockon.c index 682a93b200c..0c3245a9174 100644 --- a/src/mame/drivers/lockon.c +++ b/src/mame/drivers/lockon.c @@ -451,8 +451,6 @@ static const ym2203_interface ym2203_config = void lockon_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_ground = machine().device("ground"); m_object = machine().device("object"); m_f2203_1l = machine().device("f2203.1l"); diff --git a/src/mame/drivers/lsasquad.c b/src/mame/drivers/lsasquad.c index 10ea8d744f2..249592acb28 100644 --- a/src/mame/drivers/lsasquad.c +++ b/src/mame/drivers/lsasquad.c @@ -568,8 +568,6 @@ MACHINE_START_MEMBER(lsasquad_state,lsasquad) membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x2000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); save_item(NAME(m_port_a_in)); diff --git a/src/mame/drivers/m10.c b/src/mame/drivers/m10.c index f330b0cb150..f6ca5e13fd0 100644 --- a/src/mame/drivers/m10.c +++ b/src/mame/drivers/m10.c @@ -191,7 +191,6 @@ PALETTE_INIT_MEMBER(m10_state,m10) MACHINE_START_MEMBER(m10_state,m10) { - m_maincpu = machine().device("maincpu"); m_ic8j1 = machine().device("ic8j1"); m_ic8j2 = machine().device("ic8j2"); m_samples = machine().device("samples"); diff --git a/src/mame/drivers/m14.c b/src/mame/drivers/m14.c index 226e82cf5ed..d6c009fea96 100644 --- a/src/mame/drivers/m14.c +++ b/src/mame/drivers/m14.c @@ -60,7 +60,8 @@ public: m14_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_video_ram(*this, "video_ram"), - m_color_ram(*this, "color_ram"){ } + m_color_ram(*this, "color_ram"), + m_maincpu(*this, "maincpu"){ } /* video-related */ tilemap_t *m_m14_tilemap; @@ -71,7 +72,7 @@ public: UINT8 m_hop_mux; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(m14_vram_w); DECLARE_WRITE8_MEMBER(m14_cram_w); DECLARE_READ8_MEMBER(m14_rng_r); @@ -315,7 +316,6 @@ INTERRUPT_GEN_MEMBER(m14_state::m14_irq) void m14_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_hop_mux)); } diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c index 8a137923d2d..c71425b4898 100644 --- a/src/mame/drivers/m63.c +++ b/src/mame/drivers/m63.c @@ -130,7 +130,8 @@ public: m_scrollram(*this, "scrollram"), m_videoram2(*this, "videoram2"), m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"){ } + m_colorram(*this, "colorram"), + m_soundcpu(*this, "soundcpu"){ } required_shared_ptr m_spriteram; required_shared_ptr m_scrollram; @@ -155,7 +156,7 @@ public: INT16 *m_samplebuf; /* sound devices */ - cpu_device *m_soundcpu; + required_device m_soundcpu; device_t *m_ay1; device_t *m_ay2; samples_device *m_samples; @@ -713,7 +714,6 @@ INTERRUPT_GEN_MEMBER(m63_state::snd_irq) MACHINE_START_MEMBER(m63_state,m63) { - m_soundcpu = machine().device("soundcpu"); m_ay1 = machine().device("ay1"); m_ay2 = machine().device("ay2"); m_samples = machine().device("samples"); diff --git a/src/mame/drivers/macrossp.c b/src/mame/drivers/macrossp.c index 667ea33bd64..dca2aa910c0 100644 --- a/src/mame/drivers/macrossp.c +++ b/src/mame/drivers/macrossp.c @@ -593,8 +593,6 @@ static const es5506_interface es5506_config = void macrossp_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_sndpending)); save_item(NAME(m_snd_toggle)); diff --git a/src/mame/drivers/madmotor.c b/src/mame/drivers/madmotor.c index aeee081b44b..42fb6723836 100644 --- a/src/mame/drivers/madmotor.c +++ b/src/mame/drivers/madmotor.c @@ -220,8 +220,6 @@ GFXDECODE_END void madmotor_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_flipscreen)); } diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c index 6c4fd17bdc6..9c28f11a226 100644 --- a/src/mame/drivers/mainevt.c +++ b/src/mame/drivers/mainevt.c @@ -408,8 +408,6 @@ void mainevt_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_upd = machine().device("upd"); m_k007232 = machine().device("k007232"); m_k052109 = machine().device("k052109"); diff --git a/src/mame/drivers/marineb.c b/src/mame/drivers/marineb.c index 126e12899ff..a5eb624c099 100644 --- a/src/mame/drivers/marineb.c +++ b/src/mame/drivers/marineb.c @@ -59,9 +59,6 @@ MACHINE_RESET_MEMBER(marineb_state,springer) void marineb_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = NULL; - save_item(NAME(m_marineb_active_low_flipscreen)); } diff --git a/src/mame/drivers/matmania.c b/src/mame/drivers/matmania.c index d8eaad6a295..42d5b82e9c2 100644 --- a/src/mame/drivers/matmania.c +++ b/src/mame/drivers/matmania.c @@ -298,8 +298,6 @@ GFXDECODE_END MACHINE_START_MEMBER(matmania_state,matmania) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); } diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c index d9595795e02..061700180bf 100644 --- a/src/mame/drivers/mazerbla.c +++ b/src/mame/drivers/mazerbla.c @@ -54,7 +54,9 @@ public: mazerbla_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_cfb_ram(*this, "cfb_ram"){ } + m_cfb_ram(*this, "cfb_ram"), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -98,8 +100,8 @@ public: UINT8 m_soundlatch; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_subcpu; #if 0 int m_dbg_info; @@ -1427,8 +1429,6 @@ INTERRUPT_GEN_MEMBER(mazerbla_state::sound_interrupt) void mazerbla_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); save_item(NAME(m_vcu_video_reg)); save_item(NAME(m_vcu_gfx_addr)); diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c index d6890576b00..9d98d5875b6 100644 --- a/src/mame/drivers/mcatadv.c +++ b/src/mame/drivers/mcatadv.c @@ -430,8 +430,6 @@ void mcatadv_state::machine_start() membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); membank("bank1")->set_entry(1); - m_maincpu = machine().device("maincpu"); - m_soundcpu = machine().device("soundcpu"); save_item(NAME(m_palette_bank1)); save_item(NAME(m_palette_bank2)); diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c index ddbfcb4dbae..1446c7fc065 100644 --- a/src/mame/drivers/megazone.c +++ b/src/mame/drivers/megazone.c @@ -226,10 +226,6 @@ static const ay8910_interface ay8910_config = void megazone_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_daccpu = machine().device("daccpu"); - save_item(NAME(m_flipscreen)); save_item(NAME(m_i8039_status)); } diff --git a/src/mame/drivers/mermaid.c b/src/mame/drivers/mermaid.c index 5bb124d7236..44b51b8ef5e 100644 --- a/src/mame/drivers/mermaid.c +++ b/src/mame/drivers/mermaid.c @@ -360,7 +360,6 @@ GFXDECODE_END void mermaid_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_ay1 = machine().device("ay1"); m_ay2 = machine().device("ay2"); diff --git a/src/mame/drivers/metlclsh.c b/src/mame/drivers/metlclsh.c index 3b5a2a3fe53..b257a7eb73c 100644 --- a/src/mame/drivers/metlclsh.c +++ b/src/mame/drivers/metlclsh.c @@ -262,8 +262,6 @@ static const ym3526_interface ym3526_config = void metlclsh_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); save_item(NAME(m_write_mask)); save_item(NAME(m_gfxbank)); diff --git a/src/mame/drivers/mexico86.c b/src/mame/drivers/mexico86.c index f9be0bb057a..47f5655c419 100644 --- a/src/mame/drivers/mexico86.c +++ b/src/mame/drivers/mexico86.c @@ -425,9 +425,6 @@ void mexico86_state::machine_start() membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("sub"); m_mcu = machine().device("mcu"); save_item(NAME(m_port_a_in)); diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c index 53371f236b3..baebe6f70dd 100644 --- a/src/mame/drivers/mgolf.c +++ b/src/mame/drivers/mgolf.c @@ -12,7 +12,8 @@ class mgolf_state : public driver_device public: mgolf_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_video_ram(*this, "video_ram"){ } + m_video_ram(*this, "video_ram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_video_ram; @@ -27,7 +28,7 @@ public: attotime m_time_released; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(mgolf_vram_w); DECLARE_READ8_MEMBER(mgolf_wram_r); DECLARE_READ8_MEMBER(mgolf_dial_r); @@ -307,7 +308,6 @@ GFXDECODE_END void mgolf_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_prev)); save_item(NAME(m_mask)); diff --git a/src/mame/drivers/mikie.c b/src/mame/drivers/mikie.c index f042cb6d7bd..0b687bfde04 100644 --- a/src/mame/drivers/mikie.c +++ b/src/mame/drivers/mikie.c @@ -247,8 +247,6 @@ static const sn76496_config psg_intf = void mikie_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_palettebank)); save_item(NAME(m_last_irq)); diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c index a776af666ff..08b6ba7205c 100644 --- a/src/mame/drivers/missb2.c +++ b/src/mame/drivers/missb2.c @@ -438,8 +438,6 @@ INTERRUPT_GEN_MEMBER(missb2_state::missb2_interrupt) MACHINE_START_MEMBER(missb2_state,missb2) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_slave = machine().device("slave"); m_mcu = NULL; diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c index 84d1fecb7c9..26f97e0919a 100644 --- a/src/mame/drivers/mjsister.c +++ b/src/mame/drivers/mjsister.c @@ -18,7 +18,8 @@ class mjsister_state : public driver_device { public: mjsister_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu") { } /* video-related */ bitmap_ind16 *m_tmpbitmap0; @@ -43,7 +44,7 @@ public: UINT32 m_dac_busy; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; dac_device *m_dac; /* memory */ @@ -454,7 +455,6 @@ void mjsister_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x8000); - m_maincpu = machine().device("maincpu"); m_dac = machine().device("dac"); save_item(NAME(m_dac_busy)); diff --git a/src/mame/drivers/mogura.c b/src/mame/drivers/mogura.c index a6bd40bad97..4c1ac545b28 100644 --- a/src/mame/drivers/mogura.c +++ b/src/mame/drivers/mogura.c @@ -11,7 +11,8 @@ public: mogura_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_gfxram(*this, "gfxram"), - m_tileram(*this, "tileram"){ } + m_tileram(*this, "tileram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_gfxram; @@ -21,7 +22,7 @@ public: tilemap_t *m_tilemap; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; dac_device *m_dac1; dac_device *m_dac2; DECLARE_WRITE8_MEMBER(mogura_tileram_w); @@ -192,7 +193,6 @@ GFXDECODE_END void mogura_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_dac1 = machine().device("dac1"); m_dac2 = machine().device("dac2"); } diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c index 0ee15da5409..54ddea16970 100644 --- a/src/mame/drivers/moo.c +++ b/src/mame/drivers/moo.c @@ -173,7 +173,7 @@ WRITE16_MEMBER(moo_state::sound_cmd2_w) WRITE16_MEMBER(moo_state::sound_irq_w) { - m_audiocpu->set_input_line(0, HOLD_LINE); + m_soundcpu->set_input_line(0, HOLD_LINE); } READ16_MEMBER(moo_state::sound_status_r) @@ -426,8 +426,6 @@ INPUT_PORTS_END MACHINE_START_MEMBER(moo_state,moo) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("soundcpu"); m_k054539 = machine().device("k054539"); m_k053246 = machine().device("k053246"); m_k053251 = machine().device("k053251"); diff --git a/src/mame/drivers/mouser.c b/src/mame/drivers/mouser.c index 498d2663665..cfe1a70c025 100644 --- a/src/mame/drivers/mouser.c +++ b/src/mame/drivers/mouser.c @@ -182,8 +182,6 @@ GFXDECODE_END void mouser_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_sound_byte)); save_item(NAME(m_nmi_enable)); diff --git a/src/mame/drivers/mrflea.c b/src/mame/drivers/mrflea.c index 485abfd2271..85c65c506d4 100644 --- a/src/mame/drivers/mrflea.c +++ b/src/mame/drivers/mrflea.c @@ -327,8 +327,6 @@ static const ay8910_interface mrflea_ay8910_interface_1 = void mrflea_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); save_item(NAME(m_gfx_bank)); save_item(NAME(m_io)); diff --git a/src/mame/drivers/msisaac.c b/src/mame/drivers/msisaac.c index f57bb136a7b..cb3b5fa4c34 100644 --- a/src/mame/drivers/msisaac.c +++ b/src/mame/drivers/msisaac.c @@ -432,7 +432,6 @@ static const msm5232_interface msm5232_config = void msisaac_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); /* video */ save_item(NAME(m_bg2_textbank)); diff --git a/src/mame/drivers/mugsmash.c b/src/mame/drivers/mugsmash.c index 474f0675e39..0c437cb2233 100644 --- a/src/mame/drivers/mugsmash.c +++ b/src/mame/drivers/mugsmash.c @@ -389,8 +389,6 @@ GFXDECODE_END void mugsmash_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); } static MACHINE_CONFIG_START( mugsmash, mugsmash_state ) diff --git a/src/mame/drivers/munchmo.c b/src/mame/drivers/munchmo.c index b0082c8c82b..45d7fbc1e4b 100644 --- a/src/mame/drivers/munchmo.c +++ b/src/mame/drivers/munchmo.c @@ -303,8 +303,6 @@ GFXDECODE_END void munchmo_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_palette_bank)); save_item(NAME(m_flipscreen)); diff --git a/src/mame/drivers/n8080.c b/src/mame/drivers/n8080.c index 46a1d76ebc6..676170337a8 100644 --- a/src/mame/drivers/n8080.c +++ b/src/mame/drivers/n8080.c @@ -469,7 +469,6 @@ static I8085_CONFIG( n8080_cpu_config ) MACHINE_START_MEMBER(n8080_state,n8080) { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_shift_data)); save_item(NAME(m_shift_bits)); diff --git a/src/mame/drivers/nemesis.c b/src/mame/drivers/nemesis.c index 2afd79bfdc7..bc530fb0e38 100644 --- a/src/mame/drivers/nemesis.c +++ b/src/mame/drivers/nemesis.c @@ -1507,8 +1507,6 @@ static const k007232_interface k007232_config = void nemesis_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_vlm = machine().device("vlm"); save_item(NAME(m_irq_on)); diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c index 8faee633db6..29bdd14d278 100644 --- a/src/mame/drivers/nightgal.c +++ b/src/mame/drivers/nightgal.c @@ -33,6 +33,8 @@ public: nightgal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_comms_ram(*this, "comms_ram") + , m_maincpu(*this, "maincpu") + , m_subcpu(*this, "sub") , m_region_gfx1(*this, "gfx1") , m_io_cr_clear(*this, "CR_CLEAR") , m_io_coins(*this, "COINS") @@ -70,8 +72,8 @@ public: required_shared_ptr m_comms_ram; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_subcpu; /* memory */ UINT8 m_blit_buffer[256*256]; @@ -876,8 +878,6 @@ static const ay8910_interface ay8910_config = void nightgal_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); save_item(NAME(m_nsc_latch)); save_item(NAME(m_z80_latch)); diff --git a/src/mame/drivers/ninjaw.c b/src/mame/drivers/ninjaw.c index 97ce5b585b0..642b6c86645 100644 --- a/src/mame/drivers/ninjaw.c +++ b/src/mame/drivers/ninjaw.c @@ -796,9 +796,6 @@ void ninjaw_state::machine_start() { membank("bank10")->configure_entries(0, 8, memregion("audiocpu")->base() + 0xc000, 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("sub"); m_tc0140syt = machine().device("tc0140syt"); m_tc0100scn_1 = machine().device("tc0100scn_1"); m_tc0100scn_2 = machine().device("tc0100scn_2"); diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index 87ba5cdf759..0c8fda93559 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -236,7 +236,9 @@ public: m_bg_videoram(*this, "bg_videoram"), m_fg_videoram(*this, "fg_videoram"), m_bitmap(*this, "bitmap"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu") { } /* memory pointers */ @@ -259,8 +261,8 @@ public: UINT8 m_gfx_bank; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_soundcpu; + required_device m_maincpu; + required_device m_soundcpu; DECLARE_WRITE16_MEMBER(fg_videoram_w); DECLARE_WRITE16_MEMBER(bg_videoram_w); DECLARE_WRITE16_MEMBER(nmg5_soundlatch_w); @@ -984,8 +986,6 @@ static const ym3812_interface ym3812_intf = void nmg5_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_soundcpu = machine().device("soundcpu"); save_item(NAME(m_gfx_bank)); save_item(NAME(m_priority_reg)); diff --git a/src/mame/drivers/nycaptor.c b/src/mame/drivers/nycaptor.c index bb269efc6cb..e46be1c82cd 100644 --- a/src/mame/drivers/nycaptor.c +++ b/src/mame/drivers/nycaptor.c @@ -762,9 +762,6 @@ GFXDECODE_END void nycaptor_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("sub"); m_mcu = machine().device("mcu"); save_item(NAME(m_generic_control_reg)); diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index d985ae60ffa..aac44dd4366 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -92,7 +92,9 @@ public: m_videoram1(*this, "videoram1"), m_colorram1(*this, "colorram1"), m_videoram2(*this, "videoram2"), - m_colorram2(*this, "colorram2"){ } + m_colorram2(*this, "colorram2"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram1; @@ -107,8 +109,8 @@ public: UINT16 m_star_shift_reg; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_audiocpu2; device_t *m_ic48_1; mc6845_device *m_mc6845; @@ -672,8 +674,6 @@ INPUT_PORTS_END void nyny_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_audiocpu2 = machine().device("audio2"); m_ic48_1 = machine().device("ic48_1"); m_mc6845 = machine().device("crtc"); diff --git a/src/mame/drivers/ojankohs.c b/src/mame/drivers/ojankohs.c index ec149c87316..1c5aeb1bb44 100644 --- a/src/mame/drivers/ojankohs.c +++ b/src/mame/drivers/ojankohs.c @@ -787,7 +787,6 @@ static const msm5205_interface msm5205_config = MACHINE_START_MEMBER(ojankohs_state,common) { - m_maincpu = machine().device("maincpu"); m_msm = machine().device("msm"); save_item(NAME(m_gfxreg)); diff --git a/src/mame/drivers/oneshot.c b/src/mame/drivers/oneshot.c index b80bebca7a8..510bd90661f 100644 --- a/src/mame/drivers/oneshot.c +++ b/src/mame/drivers/oneshot.c @@ -339,8 +339,6 @@ static const ym3812_interface ym3812_config = void oneshot_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_gun_x_p1)); save_item(NAME(m_gun_y_p1)); diff --git a/src/mame/drivers/onetwo.c b/src/mame/drivers/onetwo.c index bcaa3e58ee5..3c010c57d32 100644 --- a/src/mame/drivers/onetwo.c +++ b/src/mame/drivers/onetwo.c @@ -53,7 +53,9 @@ public: : driver_device(mconfig, type, tag) , m_paletteram(*this, "paletteram"), m_paletteram2(*this, "paletteram2"), - m_fgram(*this, "fgram"){ } + m_fgram(*this, "fgram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_paletteram; @@ -64,8 +66,8 @@ public: tilemap_t *m_fg_tilemap; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(onetwo_fgram_w); DECLARE_WRITE8_MEMBER(onetwo_cpubank_w); DECLARE_WRITE8_MEMBER(onetwo_coin_counters_w); @@ -352,8 +354,6 @@ void onetwo_state::machine_start() membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); } static MACHINE_CONFIG_START( onetwo, onetwo_state ) diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index ec92fccf135..ebfe5d19a97 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -428,8 +428,6 @@ ADDRESS_MAP_END void opwolf_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_pc080sn = machine().device("pc080sn"); m_pc090oj = machine().device("pc090oj"); m_msm1 = machine().device("msm1"); diff --git a/src/mame/drivers/orbit.c b/src/mame/drivers/orbit.c index a5e9056a264..5541b450f32 100644 --- a/src/mame/drivers/orbit.c +++ b/src/mame/drivers/orbit.c @@ -269,7 +269,6 @@ GFXDECODE_END void orbit_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_misc_flags)); save_item(NAME(m_flip_screen)); diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c index 3204c170c2e..e890e909bd9 100644 --- a/src/mame/drivers/othello.c +++ b/src/mame/drivers/othello.c @@ -52,7 +52,8 @@ class othello_state : public driver_device public: othello_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -69,7 +70,7 @@ public: int m_n7751_busy; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; mc6845_device *m_mc6845; device_t *m_n7751; device_t *m_ay1; @@ -382,7 +383,6 @@ static MC6845_INTERFACE( h46505_intf ) void othello_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_mc6845 = machine().device("crtc"); m_n7751 = machine().device("n7751"); m_ay1 = machine().device("ay1"); diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c index 41b4c419e71..d67f2525beb 100644 --- a/src/mame/drivers/othunder.c +++ b/src/mame/drivers/othunder.c @@ -664,8 +664,6 @@ void othunder_state::machine_start() { membank("bank10")->configure_entries(0, 4, memregion("audiocpu")->base() + 0xc000, 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_eeprom = machine().device("eeprom"); m_tc0220ioc = machine().device("tc0220ioc"); m_tc0100scn = machine().device("tc0100scn"); diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c index d93af07c80e..b9ac116a10c 100644 --- a/src/mame/drivers/overdriv.c +++ b/src/mame/drivers/overdriv.c @@ -279,9 +279,6 @@ static const k051316_interface overdriv_k051316_intf_2 = void overdriv_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("sub"); m_k051316_1 = machine().device("k051316_1"); m_k051316_2 = machine().device("k051316_2"); m_k053260_1 = machine().device("k053260_1"); diff --git a/src/mame/drivers/pandoras.c b/src/mame/drivers/pandoras.c index 5893aa5065a..4f858027292 100644 --- a/src/mame/drivers/pandoras.c +++ b/src/mame/drivers/pandoras.c @@ -287,11 +287,6 @@ GFXDECODE_END void pandoras_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); - m_audiocpu = machine().device("audiocpu"); - m_mcu = machine().device("mcu"); - save_item(NAME(m_firq_old_data_a)); save_item(NAME(m_firq_old_data_b)); save_item(NAME(m_irq_enable_a)); diff --git a/src/mame/drivers/parodius.c b/src/mame/drivers/parodius.c index 1c1124125db..ba3a3d24d96 100644 --- a/src/mame/drivers/parodius.c +++ b/src/mame/drivers/parodius.c @@ -246,8 +246,6 @@ void parodius_state::machine_start() m_generic_paletteram_8.allocate(0x1000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k053260 = machine().device("k053260"); m_k053245 = machine().device("k053245"); m_k053251 = machine().device("k053251"); diff --git a/src/mame/drivers/pbaction.c b/src/mame/drivers/pbaction.c index fbd1c109414..ef8e405cb3c 100644 --- a/src/mame/drivers/pbaction.c +++ b/src/mame/drivers/pbaction.c @@ -256,8 +256,6 @@ INTERRUPT_GEN_MEMBER(pbaction_state::pbaction_interrupt) void pbaction_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_scroll)); } diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index 654f497cdc6..9e81030fd7b 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -493,8 +493,6 @@ MACHINE_START_MEMBER(pgm_state,pgm) { // machine().base_datetime(m_systime); - m_maincpu = machine().device("maincpu"); - m_soundcpu = machine().device("soundcpu"); m_ics = machine().device("ics"); } diff --git a/src/mame/drivers/pipedrm.c b/src/mame/drivers/pipedrm.c index 10e3c405daa..cce4c107b0c 100644 --- a/src/mame/drivers/pipedrm.c +++ b/src/mame/drivers/pipedrm.c @@ -607,7 +607,6 @@ static const ym2610_interface ym2610_config = MACHINE_START_MEMBER(pipedrm_state,pipedrm) { - m_subcpu = machine().device("sub"); /* initialize main Z80 bank */ membank("bank1")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x2000); diff --git a/src/mame/drivers/pktgaldx.c b/src/mame/drivers/pktgaldx.c index e16bf00f21f..f764ec00cb9 100644 --- a/src/mame/drivers/pktgaldx.c +++ b/src/mame/drivers/pktgaldx.c @@ -315,7 +315,6 @@ static const deco16ic_interface pktgaldx_deco16ic_tilegen1_intf = void pktgaldx_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_deco_tilegen1 = machine().device("tilegen1"); decoprot_reset(machine()); diff --git a/src/mame/drivers/pooyan.c b/src/mame/drivers/pooyan.c index 2adca048b7a..d5ed38007a1 100644 --- a/src/mame/drivers/pooyan.c +++ b/src/mame/drivers/pooyan.c @@ -172,7 +172,6 @@ GFXDECODE_END void pooyan_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_irq_enable)); } diff --git a/src/mame/drivers/popper.c b/src/mame/drivers/popper.c index e4e5f3a4b90..8ed96edc0d7 100644 --- a/src/mame/drivers/popper.c +++ b/src/mame/drivers/popper.c @@ -311,7 +311,6 @@ GFXDECODE_END void popper_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_flipscreen)); save_item(NAME(m_e002)); diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c index 07dc9dacfac..9e7db1b11d0 100644 --- a/src/mame/drivers/psikyo.c +++ b/src/mame/drivers/psikyo.c @@ -1011,7 +1011,6 @@ GFXDECODE_END void psikyo_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_soundlatch)); save_item(NAME(m_z80_nmi)); diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c index f796eaf97ea..02423de90c5 100644 --- a/src/mame/drivers/psikyo4.c +++ b/src/mame/drivers/psikyo4.c @@ -658,7 +658,6 @@ static const ymf278b_interface ymf278b_config = void psikyo4_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_oldbrt1)); save_item(NAME(m_oldbrt2)); diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c index 55e1d184cfd..a1b5d178fdd 100644 --- a/src/mame/drivers/psikyosh.c +++ b/src/mame/drivers/psikyosh.c @@ -795,7 +795,6 @@ static const ymf278b_interface ymf278b_config = void psikyosh_state::machine_start() { - m_maincpu = machine().device("maincpu"); membank("bank2")->configure_entries(0, 0x1000, memregion("gfx1")->base(), 0x20000); } diff --git a/src/mame/drivers/pushman.c b/src/mame/drivers/pushman.c index 890b2d1ff5a..a15feefcc43 100644 --- a/src/mame/drivers/pushman.c +++ b/src/mame/drivers/pushman.c @@ -396,8 +396,6 @@ static const ym2203_interface ym2203_config = void pushman_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); save_item(NAME(m_control)); diff --git a/src/mame/drivers/rainbow.c b/src/mame/drivers/rainbow.c index 0e6d05485a4..11cf9684020 100644 --- a/src/mame/drivers/rainbow.c +++ b/src/mame/drivers/rainbow.c @@ -644,8 +644,6 @@ static const tc0140syt_interface rbisland_tc0140syt_intf = void rbisland_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_pc080sn = machine().device("pc080sn"); m_pc090oj = machine().device("pc090oj"); } diff --git a/src/mame/drivers/rallyx.c b/src/mame/drivers/rallyx.c index 1dcfa880426..7c9f93283dd 100644 --- a/src/mame/drivers/rallyx.c +++ b/src/mame/drivers/rallyx.c @@ -871,7 +871,6 @@ static const samples_interface rallyx_samples_interface = MACHINE_START_MEMBER(rallyx_state,rallyx) { - m_maincpu = machine().device("maincpu"); m_samples = machine().device("samples"); save_item(NAME(m_last_bang)); diff --git a/src/mame/drivers/rastan.c b/src/mame/drivers/rastan.c index 2e8dd8301ea..0d9e9dc1dda 100644 --- a/src/mame/drivers/rastan.c +++ b/src/mame/drivers/rastan.c @@ -350,8 +350,6 @@ void rastan_state::machine_start() membank("bank1")->configure_entry(0, &ROM[0x00000]); membank("bank1")->configure_entries(1, 3, &ROM[0x10000], 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_pc080sn = machine().device("pc080sn"); m_pc090oj = machine().device("pc090oj"); diff --git a/src/mame/drivers/redclash.c b/src/mame/drivers/redclash.c index 439ae01e55c..8e2ac9057f8 100644 --- a/src/mame/drivers/redclash.c +++ b/src/mame/drivers/redclash.c @@ -325,7 +325,6 @@ GFXDECODE_END MACHINE_START_MEMBER(ladybug_state,redclash) { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_star_speed)); save_item(NAME(m_gfxbank)); diff --git a/src/mame/drivers/rltennis.c b/src/mame/drivers/rltennis.c index 96400b15236..92e9efb51ee 100644 --- a/src/mame/drivers/rltennis.c +++ b/src/mame/drivers/rltennis.c @@ -153,7 +153,6 @@ INTERRUPT_GEN_MEMBER(rltennis_state::rltennis_interrupt) void rltennis_state::machine_start() { - m_maincpu = machine().device( "maincpu"); m_screen = machine().device( "screen"); m_dac_1 = machine().device("dac1"); m_dac_2 = machine().device("dac2"); diff --git a/src/mame/drivers/rockrage.c b/src/mame/drivers/rockrage.c index 661f45f2532..5118f1d99d0 100644 --- a/src/mame/drivers/rockrage.c +++ b/src/mame/drivers/rockrage.c @@ -241,7 +241,6 @@ void rockrage_state::machine_start() membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x2000); - m_audiocpu = machine().device("audiocpu"); m_k007342 = machine().device("k007342"); m_k007420 = machine().device("k007420"); diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c index b788fd94fc4..75f212648f7 100644 --- a/src/mame/drivers/rollerg.c +++ b/src/mame/drivers/rollerg.c @@ -253,8 +253,6 @@ void rollerg_state::machine_start() membank("bank1")->configure_entries(6, 2, &ROM[0x10000], 0x4000); membank("bank1")->set_entry(0); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k053244 = machine().device("k053244"); m_k051316 = machine().device("k051316"); m_k053260 = machine().device("k053260"); diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index 7b610e49b11..5d1ddc4cd76 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -157,7 +157,7 @@ WRITE16_MEMBER(rungun_state::sound_cmd2_w) WRITE16_MEMBER(rungun_state::sound_irq_w) { if (ACCESSING_BITS_8_15) - m_audiocpu->set_input_line(0, HOLD_LINE); + m_soundcpu->set_input_line(0, HOLD_LINE); } READ16_MEMBER(rungun_state::sound_status_msb_r) @@ -217,7 +217,7 @@ WRITE8_MEMBER(rungun_state::z80ctrl_w) membank("bank2")->set_entry(data & 0x07); if (data & 0x10) - m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + m_soundcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } INTERRUPT_GEN_MEMBER(rungun_state::audio_interrupt) @@ -361,8 +361,6 @@ void rungun_state::machine_start() membank("bank2")->configure_entries(0, 8, &ROM[0x10000], 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("soundcpu"); m_k053936 = machine().device("k053936"); m_k055673 = machine().device("k055673"); m_k053252 = machine().device("k053252"); diff --git a/src/mame/drivers/scregg.c b/src/mame/drivers/scregg.c index d0dcedc91ca..b07e64cd32e 100644 --- a/src/mame/drivers/scregg.c +++ b/src/mame/drivers/scregg.c @@ -235,9 +235,6 @@ GFXDECODE_END MACHINE_START_MEMBER(scregg_state,scregg) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = NULL; - save_item(NAME(m_btime_palette)); save_item(NAME(m_bnj_scroll1)); save_item(NAME(m_bnj_scroll2)); diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c index 981a540ceab..72ef3d0ebfa 100644 --- a/src/mame/drivers/sf.c +++ b/src/mame/drivers/sf.c @@ -804,8 +804,6 @@ static const msm5205_interface msm5205_config = void sf_state::machine_start() { /* devices */ - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_sf_active)); save_item(NAME(m_bgscroll)); diff --git a/src/mame/drivers/skyfox.c b/src/mame/drivers/skyfox.c index 5acda6f8ba6..20512acb640 100644 --- a/src/mame/drivers/skyfox.c +++ b/src/mame/drivers/skyfox.c @@ -219,7 +219,6 @@ INTERRUPT_GEN_MEMBER(skyfox_state::skyfox_interrupt) void skyfox_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_bg_pos)); save_item(NAME(m_bg_ctrl)); diff --git a/src/mame/drivers/slapshot.c b/src/mame/drivers/slapshot.c index c305acf8c0b..a575ce31f1e 100644 --- a/src/mame/drivers/slapshot.c +++ b/src/mame/drivers/slapshot.c @@ -516,8 +516,6 @@ void slapshot_state::machine_start() { membank("bank10")->configure_entries(0, 4, memregion("audiocpu")->base() + 0xc000, 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_tc0140syt = machine().device("tc0140syt"); m_tc0480scp = machine().device("tc0480scp"); m_tc0360pri = machine().device("tc0360pri"); diff --git a/src/mame/drivers/sonson.c b/src/mame/drivers/sonson.c index eca7f1b7b65..70fb6690dcb 100644 --- a/src/mame/drivers/sonson.c +++ b/src/mame/drivers/sonson.c @@ -227,7 +227,6 @@ GFXDECODE_END void sonson_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_last_irq)); } diff --git a/src/mame/drivers/spy.c b/src/mame/drivers/spy.c index 0fd900d25f7..e6d7077aed8 100644 --- a/src/mame/drivers/spy.c +++ b/src/mame/drivers/spy.c @@ -505,8 +505,6 @@ void spy_state::machine_start() m_generic_paletteram_8.allocate(0x800); memset(m_pmcram, 0, sizeof(m_pmcram)); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); m_k007232_1 = machine().device("k007232_1"); diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c index 4875c0a8470..5791dae740e 100644 --- a/src/mame/drivers/supbtime.c +++ b/src/mame/drivers/supbtime.c @@ -320,8 +320,6 @@ static const deco16ic_interface supbtime_deco16ic_tilegen1_intf = void supbtime_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_deco_tilegen1 = machine().device("tilegen1"); } diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c index 2ce9ce10ac7..0a4cc3993dc 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -295,7 +295,6 @@ static const k053936_interface suprslam_k053936_intf = void suprslam_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); m_k053936 = machine().device("k053936"); save_item(NAME(m_screen_bank)); diff --git a/src/mame/drivers/surpratk.c b/src/mame/drivers/surpratk.c index b991c625d60..dcd895daeff 100644 --- a/src/mame/drivers/surpratk.c +++ b/src/mame/drivers/surpratk.c @@ -180,7 +180,6 @@ void surpratk_state::machine_start() m_generic_paletteram_8.allocate(0x1000); - m_maincpu = machine().device("maincpu"); m_k053244 = machine().device("k053244"); m_k053251 = machine().device("k053251"); m_k052109 = machine().device("k052109"); diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c index 650dcebab6a..c69f753a440 100644 --- a/src/mame/drivers/system16.c +++ b/src/mame/drivers/system16.c @@ -3232,8 +3232,6 @@ DRIVER_INIT_MEMBER(segas1x_bootleg_state,common) m_beautyb_unkx = 0; - m_maincpu = machine().device("maincpu"); - m_soundcpu = machine().device("soundcpu"); } /* Sys16A */ diff --git a/src/mame/drivers/tail2nos.c b/src/mame/drivers/tail2nos.c index 3c824dfdb7f..661b5b5ea83 100644 --- a/src/mame/drivers/tail2nos.c +++ b/src/mame/drivers/tail2nos.c @@ -210,8 +210,6 @@ void tail2nos_state::machine_start() membank("bank3")->configure_entries(0, 2, &ROM[0x10000], 0x8000); membank("bank3")->set_entry(0); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k051316 = machine().device("k051316"); save_item(NAME(m_charbank)); diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c index a3b36ad5aa4..b79838f87cc 100644 --- a/src/mame/drivers/taito_b.c +++ b/src/mame/drivers/taito_b.c @@ -2001,8 +2001,6 @@ static const tc0140syt_interface taitob_tc0140syt_intf = void taitob_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_mb87078 = machine().device("mb87078"); m_ym = machine().device("ymsnd"); m_tc0180vcu = machine().device("tc0180vcu"); diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c index 0ad46ca0dd6..21d484408e0 100644 --- a/src/mame/drivers/taito_f2.c +++ b/src/mame/drivers/taito_f2.c @@ -3011,8 +3011,6 @@ static const tc0140syt_interface taitof2_tc0140syt_intf = MACHINE_START_MEMBER(taitof2_state,common) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu");; m_tc0100scn = machine().device("tc0100scn");; m_tc0100scn_1 = machine().device("tc0100scn_1");; m_tc0100scn_2 = machine().device("tc0100scn_2");; diff --git a/src/mame/drivers/taito_h.c b/src/mame/drivers/taito_h.c index 966b8a29384..11586936c62 100644 --- a/src/mame/drivers/taito_h.c +++ b/src/mame/drivers/taito_h.c @@ -525,7 +525,6 @@ void taitoh_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0xc000], 0x4000); - m_audiocpu = machine().device("audiocpu"); m_tc0220ioc = machine().device("tc0220ioc"); m_tc0080vco = machine().device("tc0080vco"); diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c index 7f1e82a6d6d..4ec4ef64284 100644 --- a/src/mame/drivers/taito_l.c +++ b/src/mame/drivers/taito_l.c @@ -139,8 +139,6 @@ void taitol_state::state_register( ) MACHINE_START_MEMBER(taitol_state,taito_l) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_rambanks)); save_item(NAME(m_palette_ram)); diff --git a/src/mame/drivers/taito_o.c b/src/mame/drivers/taito_o.c index 3ffba879d68..71f058f949c 100644 --- a/src/mame/drivers/taito_o.c +++ b/src/mame/drivers/taito_o.c @@ -243,7 +243,6 @@ static const tc0080vco_interface parentj_intf = void taitoo_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_tc0080vco = machine().device("tc0080vco"); } diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c index e85645b754b..5af15229d32 100644 --- a/src/mame/drivers/taito_z.c +++ b/src/mame/drivers/taito_z.c @@ -3029,9 +3029,6 @@ void taitoz_state::taitoz_postload() MACHINE_START_MEMBER(taitoz_state,bshark) { - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("sub"); - m_audiocpu = machine().device("audiocpu"); m_eeprom = machine().device("eeprom"); m_tc0100scn = machine().device("tc0100scn"); m_tc0150rod = machine().device("tc0150rod"); diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c index 37e418060fd..58769c41dca 100644 --- a/src/mame/drivers/taitoair.c +++ b/src/mame/drivers/taitoair.c @@ -666,7 +666,6 @@ void taitoair_state::machine_start() membank("bank1")->configure_entries(0, 4, &ROM[0xc000], 0x4000); - m_audiocpu = machine().device("audiocpu"); m_dsp = machine().device("dsp"); m_tc0080vco = machine().device("tc0080vco"); diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c index a7161ff0c4a..42414223873 100644 --- a/src/mame/drivers/thunderx.c +++ b/src/mame/drivers/thunderx.c @@ -599,8 +599,6 @@ MACHINE_START_MEMBER(thunderx_state,scontra) { m_generic_paletteram_8.allocate(0x800); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k007232 = machine().device("k007232"); m_k052109 = machine().device("k052109"); m_k051960 = machine().device("k051960"); diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index d87b9ab4c42..35d00008df8 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -2171,8 +2171,6 @@ static const k053936_interface prmrsocr_k053936_interface = MACHINE_START_MEMBER(tmnt_state,common) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k007232 = machine().device("k007232"); m_k053260 = machine().device("k053260"); m_k054539 = machine().device("k054539"); diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c index 71db1dca43f..d714d3efd60 100644 --- a/src/mame/drivers/topspeed.c +++ b/src/mame/drivers/topspeed.c @@ -679,9 +679,6 @@ void topspeed_state::machine_start() { membank("bank10")->configure_entries(0, 4, memregion("audiocpu")->base() + 0xc000, 0x4000); - m_maincpu = machine().device("maincpu"); - m_subcpu = machine().device("subcpu"); - m_audiocpu = machine().device("audiocpu"); m_tc0220ioc = machine().device("tc0220ioc"); m_pc080sn_1 = machine().device("pc080sn_1"); m_pc080sn_2 = machine().device("pc080sn_2"); diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c index d539a843525..88c8d41bd13 100644 --- a/src/mame/drivers/toratora.c +++ b/src/mame/drivers/toratora.c @@ -28,7 +28,8 @@ class toratora_state : public driver_device public: toratora_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -39,7 +40,7 @@ public: UINT8 m_clear_tv; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; pia6821_device *m_pia_u1; pia6821_device *m_pia_u2; pia6821_device *m_pia_u3; @@ -425,7 +426,6 @@ INPUT_PORTS_END void toratora_state::machine_start() { - m_maincpu = machine().device("maincpu"); m_pia_u1 = machine().device("pia_u1"); m_pia_u2 = machine().device("pia_u2"); m_pia_u3 = machine().device("pia_u3"); diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index 0e998c6e262..09858d265a0 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -76,7 +76,6 @@ C004 76489 #4 trigger void tp84_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); } diff --git a/src/mame/drivers/trvquest.c b/src/mame/drivers/trvquest.c index 9efc934f8dc..fa0e7da5cc1 100644 --- a/src/mame/drivers/trvquest.c +++ b/src/mame/drivers/trvquest.c @@ -166,7 +166,6 @@ static const via6522_interface via_2_interface = MACHINE_START_MEMBER(gameplan_state,trvquest) { - m_maincpu = machine().device("maincpu"); /* register for save states */ save_item(NAME(m_video_x)); diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c index 96e17a439a2..e76a701fbaa 100644 --- a/src/mame/drivers/tumbleb.c +++ b/src/mame/drivers/tumbleb.c @@ -1944,8 +1944,6 @@ GFXDECODE_END MACHINE_START_MEMBER(tumbleb_state,tumbleb) { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_oki = machine().device("oki"); save_item(NAME(m_music_command)); diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c index 9629c443d2b..467131c0f1b 100644 --- a/src/mame/drivers/tumblep.c +++ b/src/mame/drivers/tumblep.c @@ -285,8 +285,6 @@ static const deco16ic_interface tumblep_deco16ic_tilegen1_intf = void tumblep_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_deco_tilegen1 = machine().device("tilegen1"); } diff --git a/src/mame/drivers/tutankhm.c b/src/mame/drivers/tutankhm.c index 5cbef2b1db9..ab0dde9694b 100644 --- a/src/mame/drivers/tutankhm.c +++ b/src/mame/drivers/tutankhm.c @@ -195,7 +195,6 @@ MACHINE_START_MEMBER(tutankhm_state,tutankhm) { membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x1000); - m_maincpu = machine().device("maincpu"); save_item(NAME(m_irq_toggle)); save_item(NAME(m_irq_enable)); diff --git a/src/mame/drivers/ultraman.c b/src/mame/drivers/ultraman.c index 85bd4afc7d4..34d286d6616 100644 --- a/src/mame/drivers/ultraman.c +++ b/src/mame/drivers/ultraman.c @@ -191,8 +191,6 @@ static const k051316_interface ultraman_k051316_intf_2 = void ultraman_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k051960 = machine().device("k051960"); m_k051316_1 = machine().device("k051316_1"); m_k051316_2 = machine().device("k051316_2"); diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c index ffb404289a2..09432122206 100644 --- a/src/mame/drivers/vaportra.c +++ b/src/mame/drivers/vaportra.c @@ -230,8 +230,6 @@ static const deco16ic_interface vaportra_deco16ic_tilegen2_intf = void vaportra_state::machine_start() { - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_deco_tilegen1 = machine().device("tilegen1"); m_deco_tilegen2 = machine().device("tilegen2"); diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c index 2817031baa2..feec59ce8ab 100644 --- a/src/mame/drivers/vendetta.c +++ b/src/mame/drivers/vendetta.c @@ -460,8 +460,6 @@ void vendetta_state::machine_start() m_generic_paletteram_8.allocate(0x1000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k053246 = machine().device("k053246"); m_k053251 = machine().device("k053251"); m_k052109 = machine().device("k052109"); diff --git a/src/mame/drivers/volfied.c b/src/mame/drivers/volfied.c index 66977699261..5a4e8a13de0 100644 --- a/src/mame/drivers/volfied.c +++ b/src/mame/drivers/volfied.c @@ -234,8 +234,6 @@ void volfied_state::machine_start() { volfied_cchip_init(); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_pc090oj = machine().device("pc090oj"); } diff --git a/src/mame/drivers/warriorb.c b/src/mame/drivers/warriorb.c index c29565be794..e0d37de8c20 100644 --- a/src/mame/drivers/warriorb.c +++ b/src/mame/drivers/warriorb.c @@ -506,8 +506,6 @@ void warriorb_state::machine_start() { membank("bank10")->configure_entries(0, 8, memregion("audiocpu")->base() + 0xc000, 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_tc0140syt = machine().device("tc0140syt"); m_tc0100scn_1 = machine().device("tc0100scn_1"); m_tc0100scn_2 = machine().device("tc0100scn_2"); diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c index 209d109900f..7ad57f39e2b 100644 --- a/src/mame/drivers/wgp.c +++ b/src/mame/drivers/wgp.c @@ -936,9 +936,6 @@ void wgp_state::machine_start() { membank("bank10")->configure_entries(0, 4, memregion("audiocpu")->base() + 0xc000, 0x4000); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("sub"); m_tc0140syt = machine().device("tc0140syt"); m_tc0100scn = machine().device("tc0100scn"); diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c index b2d50ea52be..a5560f6a83e 100644 --- a/src/mame/drivers/wheelfir.c +++ b/src/mame/drivers/wheelfir.c @@ -229,10 +229,12 @@ class wheelfir_state : public driver_device { public: wheelfir_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "subcpu") { } - cpu_device *m_maincpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_subcpu; device_t *m_screen; device_t *m_eeprom; @@ -638,7 +640,7 @@ WRITE16_MEMBER(wheelfir_state::wheelfir_7c0000_w) WRITE16_MEMBER(wheelfir_state::wheelfir_snd_w) { COMBINE_DATA(&m_soundlatch); - machine().device("subcpu")->execute().set_input_line(1, HOLD_LINE); /* guess, tested also with periodic interrupts and latch clear*/ + m_subcpu->set_input_line(1, HOLD_LINE); /* guess, tested also with periodic interrupts and latch clear*/ machine().scheduler().synchronize(); } @@ -763,10 +765,8 @@ void wheelfir_state::machine_reset() void wheelfir_state::machine_start() { - m_maincpu = machine().device( "maincpu"); - m_subcpu = machine().device( "subcpu"); - m_screen = machine().device( "screen"); - m_eeprom = machine().device( "eeprom"); + m_screen = machine().device("screen"); + m_eeprom = machine().device("eeprom"); m_zoom_table = auto_alloc_array(machine(), INT32, ZOOM_TABLE_SIZE); m_blitter_data = auto_alloc_array(machine(), UINT16, 16); diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c index 9ca8f4849e9..7b4685426e8 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -449,8 +449,6 @@ void xexex_state::machine_start() membank("bank2")->configure_entries(0, 8, &ROM[0x10000], 0x4000); membank("bank2")->set_entry(0); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k053246 = machine().device("k053246"); m_k053250 = machine().device("k053250"); m_k053251 = machine().device("k053251"); diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c index fa8eb91d762..fffd49747fe 100644 --- a/src/mame/drivers/xmen.c +++ b/src/mame/drivers/xmen.c @@ -296,8 +296,6 @@ void xmen_state::machine_start() membank("bank4")->configure_entries(0, 8, &ROM[0x10000], 0x4000); membank("bank4")->set_entry(0); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k053246 = machine().device("k053246"); m_k053251 = machine().device("k053251"); m_k052109 = machine().device("k052109"); diff --git a/src/mame/drivers/yunsun16.c b/src/mame/drivers/yunsun16.c index 1a83c0f4488..91553f246ae 100644 --- a/src/mame/drivers/yunsun16.c +++ b/src/mame/drivers/yunsun16.c @@ -556,7 +556,6 @@ GFXDECODE_END void yunsun16_state::machine_start() { - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_sprites_scrolldx)); save_item(NAME(m_sprites_scrolldy)); diff --git a/src/mame/drivers/yunsung8.c b/src/mame/drivers/yunsung8.c index 6216e14b7ab..c2365a88bf3 100644 --- a/src/mame/drivers/yunsung8.c +++ b/src/mame/drivers/yunsung8.c @@ -473,7 +473,6 @@ void yunsung8_state::machine_start() membank("bank2")->configure_entries(0, 3, &AUDIO[0x00000], 0x4000); membank("bank2")->configure_entries(3, 5, &AUDIO[0x10000], 0x4000); - m_audiocpu = machine().device("audiocpu"); save_item(NAME(m_videoram)); save_item(NAME(m_layers_ctrl)); diff --git a/src/mame/includes/1942.h b/src/mame/includes/1942.h index db1c010f453..47c52d17f6d 100644 --- a/src/mame/includes/1942.h +++ b/src/mame/includes/1942.h @@ -11,7 +11,8 @@ public: : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram"), m_fg_videoram(*this, "fg_videoram"), - m_bg_videoram(*this, "bg_videoram"){ } + m_bg_videoram(*this, "bg_videoram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -25,7 +26,7 @@ public: UINT8 m_scroll[2]; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(c1942_bankswitch_w); DECLARE_WRITE8_MEMBER(c1942_fgvideoram_w); DECLARE_WRITE8_MEMBER(c1942_bgvideoram_w); diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h index 29b5cefdde7..49c89b1a021 100644 --- a/src/mame/includes/20pacgal.h +++ b/src/mame/includes/20pacgal.h @@ -16,7 +16,8 @@ public: m_char_gfx_ram(*this, "char_gfx_ram"), m_stars_seed(*this, "stars_seed"), m_stars_ctrl(*this, "stars_ctrl"), - m_flip(*this, "flip"){ } + m_flip(*this, "flip"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_video_ram; @@ -29,7 +30,7 @@ public: UINT8 m_game_selected; /* 0 = Ms. Pac-Man, 1 = Galaga */ /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_eeprom; /* memory */ diff --git a/src/mame/includes/40love.h b/src/mame/includes/40love.h index 11991ff9bab..65a6c9ceae1 100644 --- a/src/mame/includes/40love.h +++ b/src/mame/includes/40love.h @@ -8,7 +8,8 @@ public: m_spriteram(*this, "spriteram"), m_colorram(*this, "colorram"), m_spriteram2(*this, "spriteram2"), - m_mcu_ram(*this, "mcu_ram"){ } + m_mcu_ram(*this, "mcu_ram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -56,7 +57,7 @@ public: UINT8 m_snd_ctrl3; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(nmi_disable_w); DECLARE_WRITE8_MEMBER(nmi_enable_w); diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index cb344629c79..a6bf7c49dfa 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -11,7 +11,8 @@ public: : driver_device(mconfig, type, tag) , m_banked_rom(*this, "banked_rom"), m_paletteram_1000(*this, "paletteram_1000"), - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_banked_rom; @@ -30,7 +31,7 @@ public: int m_speech_chip; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k052109; device_t *m_k051960; device_t *m_k051316; diff --git a/src/mame/includes/actfancr.h b/src/mame/includes/actfancr.h index 3ac900958fe..8c17ecd5775 100644 --- a/src/mame/includes/actfancr.h +++ b/src/mame/includes/actfancr.h @@ -9,7 +9,9 @@ class actfancr_state : public driver_device public: actfancr_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_main_ram(*this, "main_ram"){ } + m_main_ram(*this, "main_ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_main_ram; @@ -22,8 +24,8 @@ public: int m_trio_control_select; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(triothep_control_select_w); DECLARE_READ8_MEMBER(triothep_control_r); DECLARE_WRITE8_MEMBER(actfancr_sound_w); diff --git a/src/mame/includes/aerofgt.h b/src/mame/includes/aerofgt.h index 6d4687e3e58..201424941ed 100644 --- a/src/mame/includes/aerofgt.h +++ b/src/mame/includes/aerofgt.h @@ -16,7 +16,8 @@ public: m_tx_tilemap_ram(*this, "tx_tilemap_ram"), m_spr(*this, "vsystem_spr"), m_spr_old(*this, "vsystem_spr_old"), - m_spr_old2(*this, "vsystem_spr_ol2") + m_spr_old2(*this, "vsystem_spr_ol2"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -59,7 +60,7 @@ public: int m_pending_command; /* other devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; /* handlers */ DECLARE_WRITE16_MEMBER(sound_command_w); diff --git a/src/mame/includes/airbustr.h b/src/mame/includes/airbustr.h index 5d62bda2677..ead269ae222 100644 --- a/src/mame/includes/airbustr.h +++ b/src/mame/includes/airbustr.h @@ -14,7 +14,8 @@ public: m_colorram2(*this, "colorram2"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_devram; @@ -41,7 +42,7 @@ public: /* devices */ device_t *m_master; device_t *m_slave; - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_pandora; DECLARE_READ8_MEMBER(devram_r); DECLARE_WRITE8_MEMBER(master_nmi_trigger_w); diff --git a/src/mame/includes/ajax.h b/src/mame/includes/ajax.h index aa8462c4d7d..25274979924 100644 --- a/src/mame/includes/ajax.h +++ b/src/mame/includes/ajax.h @@ -3,7 +3,10 @@ class ajax_state : public driver_device { public: ajax_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub") { } /* memory pointers */ // UINT8 * m_paletteram; // currently this uses generic palette handling @@ -18,9 +21,9 @@ public: int m_firq_enable; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; device_t *m_k007232_1; device_t *m_k007232_2; device_t *m_k052109; diff --git a/src/mame/includes/aliens.h b/src/mame/includes/aliens.h index fcedc70a866..6f170021537 100644 --- a/src/mame/includes/aliens.h +++ b/src/mame/includes/aliens.h @@ -9,7 +9,9 @@ class aliens_state : public driver_device public: aliens_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_ram; @@ -23,8 +25,8 @@ public: int m_palette_selected; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/alpha68k.h b/src/mame/includes/alpha68k.h index 0ae6f7401b3..f140e9b0f6a 100644 --- a/src/mame/includes/alpha68k.h +++ b/src/mame/includes/alpha68k.h @@ -12,7 +12,8 @@ public: m_shared_ram(*this, "shared_ram"), m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ optional_shared_ptr m_shared_ram; @@ -43,7 +44,7 @@ public: unsigned m_game_id; // see below /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; UINT8 m_sound_nmi_mask; UINT8 m_sound_pa_latch; DECLARE_WRITE16_MEMBER(tnextspc_coin_counters_w); diff --git a/src/mame/includes/amspdwy.h b/src/mame/includes/amspdwy.h index 66a18222d86..5b01e0139e7 100644 --- a/src/mame/includes/amspdwy.h +++ b/src/mame/includes/amspdwy.h @@ -11,7 +11,8 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), - m_colorram(*this, "colorram"){ } + m_colorram(*this, "colorram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -28,7 +29,7 @@ public: UINT8 m_wheel_return[2]; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_READ8_MEMBER(amspdwy_wheel_0_r); DECLARE_READ8_MEMBER(amspdwy_wheel_1_r); DECLARE_WRITE8_MEMBER(amspdwy_sound_w); diff --git a/src/mame/includes/angelkds.h b/src/mame/includes/angelkds.h index 2cbaacdd1ac..538bbe45484 100644 --- a/src/mame/includes/angelkds.h +++ b/src/mame/includes/angelkds.h @@ -13,7 +13,8 @@ public: m_bgbotvideoram(*this, "bgbotvideoram"), m_txvideoram(*this, "txvideoram"), m_spriteram(*this, "spriteram"), - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_bgtopvideoram; @@ -34,7 +35,7 @@ public: UINT8 m_layer_ctrl; /* devices */ - cpu_device *m_subcpu; + required_device m_subcpu; DECLARE_WRITE8_MEMBER(angelkds_cpu_bank_write); DECLARE_READ8_MEMBER(angelkds_input_r); DECLARE_WRITE8_MEMBER(angelkds_main_sound_w); diff --git a/src/mame/includes/aquarium.h b/src/mame/includes/aquarium.h index d0b90f2c451..208806d00cf 100644 --- a/src/mame/includes/aquarium.h +++ b/src/mame/includes/aquarium.h @@ -10,7 +10,8 @@ public: m_bak_videoram(*this, "bak_videoram"), m_txt_videoram(*this, "txt_videoram"), m_spriteram(*this, "spriteram"), - m_scroll(*this, "scroll"){ } + m_scroll(*this, "scroll"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_mid_videoram; @@ -29,7 +30,7 @@ public: int m_aquarium_snd_ack; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_READ16_MEMBER(aquarium_coins_r); DECLARE_WRITE8_MEMBER(aquarium_snd_ack_w); DECLARE_WRITE16_MEMBER(aquarium_sound_w); diff --git a/src/mame/includes/ashnojoe.h b/src/mame/includes/ashnojoe.h index 65b6d0491d6..532cdf838d0 100644 --- a/src/mame/includes/ashnojoe.h +++ b/src/mame/includes/ashnojoe.h @@ -16,7 +16,8 @@ public: m_tileram_6(*this, "tileram_6"), m_tileram_7(*this, "tileram_7"), m_tileram(*this, "tileram"), - m_tilemap_reg(*this, "tilemap_reg"){ } + m_tilemap_reg(*this, "tilemap_reg"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ UINT16 * m_tileram_1; @@ -45,7 +46,7 @@ public: int m_msm5205_vclk_toggle; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_READ16_MEMBER(fake_4a00a_r); DECLARE_WRITE16_MEMBER(ashnojoe_soundlatch_w); DECLARE_WRITE8_MEMBER(adpcm_w); diff --git a/src/mame/includes/asterix.h b/src/mame/includes/asterix.h index fbd51400a93..8d49b0b336c 100644 --- a/src/mame/includes/asterix.h +++ b/src/mame/includes/asterix.h @@ -8,7 +8,9 @@ class asterix_state : public driver_device { public: asterix_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT16 * m_paletteram; // currently this uses generic palette handling @@ -26,8 +28,8 @@ public: UINT16 m_prot[2]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k053260; device_t *m_k056832; device_t *m_k053244; diff --git a/src/mame/includes/astrof.h b/src/mame/includes/astrof.h index 68d42d046f3..a9bab087916 100644 --- a/src/mame/includes/astrof.h +++ b/src/mame/includes/astrof.h @@ -13,7 +13,8 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_astrof_color(*this, "astrof_color"), - m_tomahawk_protection(*this, "tomahawk_prot"){ } + m_tomahawk_protection(*this, "tomahawk_prot"), + m_maincpu(*this, "maincpu"){ } /* video-related */ required_shared_ptr m_videoram; @@ -36,7 +37,7 @@ public: UINT8 m_astrof_bosskill_playing; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; samples_device *m_samples; // astrof & abattle device_t *m_sn; // tomahawk DECLARE_READ8_MEMBER(irq_clear_r); diff --git a/src/mame/includes/asuka.h b/src/mame/includes/asuka.h index 49d76be0d4f..f50d7a2804f 100644 --- a/src/mame/includes/asuka.h +++ b/src/mame/includes/asuka.h @@ -9,7 +9,9 @@ class asuka_state : public driver_device public: asuka_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_cadash_shared_ram(*this, "sharedram") { } + m_cadash_shared_ram(*this, "sharedram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT16 * paletteram; // this currently uses generic palette handlers @@ -33,8 +35,8 @@ public: optional_shared_ptr m_cadash_shared_ram; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_pc090oj; device_t *m_tc0100scn; DECLARE_WRITE8_MEMBER(sound_bankswitch_w); diff --git a/src/mame/includes/atarifb.h b/src/mame/includes/atarifb.h index f08ee3aa895..1154acfc5d5 100644 --- a/src/mame/includes/atarifb.h +++ b/src/mame/includes/atarifb.h @@ -24,7 +24,8 @@ public: m_alphap2_videoram(*this, "p2_videoram"), m_field_videoram(*this, "field_videoram"), m_spriteram(*this, "spriteram"), - m_scroll_register(*this, "scroll_register"){ } + m_scroll_register(*this, "scroll_register"), + m_maincpu(*this, "maincpu"){ } /* video-related */ required_shared_ptr m_alphap1_videoram; @@ -57,7 +58,7 @@ public: int m_counter_y_in2b; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(atarifb_out1_w); DECLARE_WRITE8_MEMBER(atarifb4_out1_w); DECLARE_WRITE8_MEMBER(abaseb_out1_w); diff --git a/src/mame/includes/battlane.h b/src/mame/includes/battlane.h index 7db769be25d..830c0503220 100644 --- a/src/mame/includes/battlane.h +++ b/src/mame/includes/battlane.h @@ -10,7 +10,9 @@ public: battlane_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_tileram(*this, "tileram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_tileram; @@ -23,8 +25,8 @@ public: int m_cpu_control; /* CPU interrupt control register */ /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_subcpu; DECLARE_WRITE8_MEMBER(battlane_cpu_command_w); DECLARE_WRITE8_MEMBER(battlane_palette_w); DECLARE_WRITE8_MEMBER(battlane_scrollx_w); diff --git a/src/mame/includes/battlnts.h b/src/mame/includes/battlnts.h index d5ffb68384b..f9c9d30167b 100644 --- a/src/mame/includes/battlnts.h +++ b/src/mame/includes/battlnts.h @@ -8,7 +8,8 @@ class battlnts_state : public driver_device { public: battlnts_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT8 * paletteram; // this currently uses generic palette handling @@ -19,7 +20,7 @@ public: /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k007342; device_t *m_k007420; DECLARE_WRITE8_MEMBER(battlnts_sh_irqtrigger_w); diff --git a/src/mame/includes/beezer.h b/src/mame/includes/beezer.h index 984ec09466c..a137c972a60 100644 --- a/src/mame/includes/beezer.h +++ b/src/mame/includes/beezer.h @@ -5,13 +5,14 @@ class beezer_state : public driver_device public: beezer_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"){ } required_shared_ptr m_videoram; int m_pbus; int m_banklatch; - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(beezer_bankswitch_w); DECLARE_WRITE8_MEMBER(beezer_map_w); DECLARE_READ8_MEMBER(beezer_line_r); diff --git a/src/mame/includes/bigevglf.h b/src/mame/includes/bigevglf.h index 77a1255ea7b..b1a3813bf13 100644 --- a/src/mame/includes/bigevglf.h +++ b/src/mame/includes/bigevglf.h @@ -6,7 +6,8 @@ public: : driver_device(mconfig, type, tag) , m_paletteram(*this, "paletteram"), m_spriteram1(*this, "spriteram1"), - m_spriteram2(*this, "spriteram2"){ } + m_spriteram2(*this, "spriteram2"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_paletteram; @@ -48,7 +49,7 @@ public: UINT8 m_port_select; /* for muxed controls */ /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(beg_banking_w); DECLARE_WRITE8_MEMBER(beg_fromsound_w); diff --git a/src/mame/includes/bishi.h b/src/mame/includes/bishi.h index 1f076274fab..018597eccc4 100644 --- a/src/mame/includes/bishi.h +++ b/src/mame/includes/bishi.h @@ -11,7 +11,9 @@ class bishi_state : public driver_device { public: bishi_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ UINT8 * m_ram; @@ -25,8 +27,8 @@ public: UINT16 m_cur_control2; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232; device_t *m_k056832; device_t *m_k054338; diff --git a/src/mame/includes/bking.h b/src/mame/includes/bking.h index 3d5beff0058..353839a1f0e 100644 --- a/src/mame/includes/bking.h +++ b/src/mame/includes/bking.h @@ -3,7 +3,8 @@ class bking_state : public driver_device public: bking_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_playfield_ram(*this, "playfield_ram"){ } + m_playfield_ram(*this, "playfield_ram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_playfield_ram; @@ -37,7 +38,7 @@ public: int m_addr_l; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; #if 0 /* 68705 */ diff --git a/src/mame/includes/bladestl.h b/src/mame/includes/bladestl.h index c2faf414876..f7d01a75822 100644 --- a/src/mame/includes/bladestl.h +++ b/src/mame/includes/bladestl.h @@ -9,7 +9,8 @@ class bladestl_state : public driver_device public: bladestl_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_paletteram; @@ -22,7 +23,7 @@ public: int m_last_track[4]; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k007342; device_t *m_k007420; DECLARE_READ8_MEMBER(trackball_r); diff --git a/src/mame/includes/blktiger.h b/src/mame/includes/blktiger.h index 3eaa78110c8..79f7d07717e 100644 --- a/src/mame/includes/blktiger.h +++ b/src/mame/includes/blktiger.h @@ -12,7 +12,8 @@ public: blktiger_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_spriteram(*this, "spriteram") , - m_txvideoram(*this, "txvideoram"){ } + m_txvideoram(*this, "txvideoram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_device m_spriteram; @@ -39,7 +40,7 @@ public: /* devices */ device_t *m_mcu; - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_READ8_MEMBER(blktiger_from_mcu_r); DECLARE_WRITE8_MEMBER(blktiger_to_mcu_w); DECLARE_READ8_MEMBER(blktiger_from_main_r); diff --git a/src/mame/includes/blockhl.h b/src/mame/includes/blockhl.h index d4bd2d65d58..d11a89708f3 100644 --- a/src/mame/includes/blockhl.h +++ b/src/mame/includes/blockhl.h @@ -9,7 +9,9 @@ class blockhl_state : public driver_device public: blockhl_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_ram; @@ -24,8 +26,8 @@ public: int m_rombank; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k052109; device_t *m_k051960; DECLARE_READ8_MEMBER(bankedram_r); diff --git a/src/mame/includes/blockout.h b/src/mame/includes/blockout.h index fd42bc03caf..70354beed51 100644 --- a/src/mame/includes/blockout.h +++ b/src/mame/includes/blockout.h @@ -11,7 +11,9 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_frontvideoram(*this, "frontvideoram"), - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -23,8 +25,8 @@ public: UINT16 m_color; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE_LINE_MEMBER(irq_handler); DECLARE_WRITE16_MEMBER(blockout_sound_command_w); DECLARE_WRITE16_MEMBER(blockout_irq6_ack_w); diff --git a/src/mame/includes/bottom9.h b/src/mame/includes/bottom9.h index 688b3f0a043..122fc86efe7 100644 --- a/src/mame/includes/bottom9.h +++ b/src/mame/includes/bottom9.h @@ -8,7 +8,9 @@ class bottom9_state : public driver_device { public: bottom9_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT8 * m_paletteram; // currently this uses generic palette handling @@ -25,8 +27,8 @@ public: int m_nmienable; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232_1; device_t *m_k007232_2; device_t *m_k052109; diff --git a/src/mame/includes/brkthru.h b/src/mame/includes/brkthru.h index b3efb7e5ae5..548e725761b 100644 --- a/src/mame/includes/brkthru.h +++ b/src/mame/includes/brkthru.h @@ -11,7 +11,9 @@ public: : driver_device(mconfig, type, tag) , m_fg_videoram(*this, "fg_videoram"), m_videoram(*this, "videoram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_fg_videoram; @@ -27,8 +29,8 @@ public: //UINT8 *m_brkthru_nmi_enable; /* needs to be tracked down */ /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; UINT8 m_nmi_mask; DECLARE_WRITE8_MEMBER(brkthru_1803_w); diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index 23b66a3dcf8..0d26d875a44 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -18,7 +18,9 @@ public: m_lnc_charbank(*this, "lnc_charbank"), m_deco_charram(*this, "deco_charram"), m_spriteram(*this, "spriteram"), - m_audio_rambase(*this, "audio_rambase") + m_audio_rambase(*this, "audio_rambase"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -53,8 +55,8 @@ public: int m_protection_ret; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(audio_nmi_enable_w); DECLARE_WRITE8_MEMBER(lnc_w); diff --git a/src/mame/includes/bublbobl.h b/src/mame/includes/bublbobl.h index 5e82d403e11..66a519d2522 100644 --- a/src/mame/includes/bublbobl.h +++ b/src/mame/includes/bublbobl.h @@ -6,7 +6,9 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_objectram(*this, "objectram"), - m_mcu_sharedram(*this, "mcu_sharedram"){ } + m_mcu_sharedram(*this, "mcu_sharedram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -52,9 +54,9 @@ public: int m_ic43_b; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_mcu; - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_slave; DECLARE_WRITE8_MEMBER(bublbobl_bankswitch_w); DECLARE_WRITE8_MEMBER(tokio_bankswitch_w); diff --git a/src/mame/includes/buggychl.h b/src/mame/includes/buggychl.h index f5f63ee5bad..619a2e18fd3 100644 --- a/src/mame/includes/buggychl.h +++ b/src/mame/includes/buggychl.h @@ -11,7 +11,8 @@ public: m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), m_scrollv(*this, "scrollv"), - m_scrollh(*this, "scrollh"){ } + m_scrollh(*this, "scrollh"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_charram; @@ -36,7 +37,7 @@ public: int m_pending_nmi; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(bankswitch_w); DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(nmi_disable_w); diff --git a/src/mame/includes/bwing.h b/src/mame/includes/bwing.h index edbdbf3e060..a0e3b89cec9 100644 --- a/src/mame/includes/bwing.h +++ b/src/mame/includes/bwing.h @@ -16,7 +16,10 @@ public: m_spriteram(*this, "spriteram"), m_paletteram(*this, "paletteram"), m_bwp2_sharedram1(*this, "bwp2_sharedram1"), - m_bwp3_rombase(*this, "bwp3_rombase"){ } + m_bwp3_rombase(*this, "bwp3_rombase"), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_bwp1_sharedram1; @@ -48,9 +51,9 @@ public: UINT8 *m_bwp123_membase[3]; /* device */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_subcpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(bwp12_sharedram1_w); DECLARE_WRITE8_MEMBER(bwp3_u8F_w); DECLARE_WRITE8_MEMBER(bwp3_nmimask_w); diff --git a/src/mame/includes/capbowl.h b/src/mame/includes/capbowl.h index 9535a9d7b2d..6caf37f80a6 100644 --- a/src/mame/includes/capbowl.h +++ b/src/mame/includes/capbowl.h @@ -11,7 +11,9 @@ class capbowl_state : public driver_device public: capbowl_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_rowaddress(*this, "rowaddress"){ } + m_rowaddress(*this, "rowaddress"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } void init_nvram(nvram_device &nvram, void *base, size_t size); @@ -25,8 +27,8 @@ public: UINT8 m_last_trackball_val[2]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(capbowl_rom_select_w); DECLARE_READ8_MEMBER(track_0_r); DECLARE_READ8_MEMBER(track_1_r); diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h index 4be75acafa3..4c022151dd1 100644 --- a/src/mame/includes/cave.h +++ b/src/mame/includes/cave.h @@ -33,6 +33,8 @@ public: m_spriteram_2(*this, "spriteram_2"), m_paletteram(*this, "paletteram"), m_mirror_ram(*this, "mirror_ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), m_int_timer(*this, "int_timer") { } /* memory pointers */ @@ -110,8 +112,8 @@ public: int m_hopper; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; required_device m_int_timer; int m_rasflag; int m_old_rasflag; diff --git a/src/mame/includes/cbuster.h b/src/mame/includes/cbuster.h index 1913cc98712..145582202cf 100644 --- a/src/mame/includes/cbuster.h +++ b/src/mame/includes/cbuster.h @@ -17,7 +17,9 @@ public: m_pf3_rowscroll(*this, "pf3_rowscroll"), m_pf4_rowscroll(*this, "pf4_rowscroll"), m_spriteram16(*this, "spriteram16"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -36,8 +38,8 @@ public: int m_pri; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_deco_tilegen1; device_t *m_deco_tilegen2; DECLARE_WRITE16_MEMBER(twocrude_control_w); diff --git a/src/mame/includes/champbas.h b/src/mame/includes/champbas.h index 480c87d0922..7850b6513aa 100644 --- a/src/mame/includes/champbas.h +++ b/src/mame/includes/champbas.h @@ -15,7 +15,9 @@ public: : driver_device(mconfig, type, tag) , m_bg_videoram(*this, "bg_videoram"), m_spriteram(*this, "spriteram"), - m_spriteram_2(*this, "spriteram_2"){ } + m_spriteram_2(*this, "spriteram_2"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_bg_videoram; @@ -31,8 +33,8 @@ public: int m_watchdog_count; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_mcu; UINT8 m_irq_mask; diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h index 9b13e05d789..a4b9eab25be 100644 --- a/src/mame/includes/cheekyms.h +++ b/src/mame/includes/cheekyms.h @@ -12,7 +12,8 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), - m_port_80(*this, "port_80"){ } + m_port_80(*this, "port_80"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -24,7 +25,7 @@ public: bitmap_ind16 *m_bitmap_buffer; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; dac_device *m_dac; UINT8 m_irq_mask; diff --git a/src/mame/includes/chqflag.h b/src/mame/includes/chqflag.h index 78b27b88367..a2563483ec2 100644 --- a/src/mame/includes/chqflag.h +++ b/src/mame/includes/chqflag.h @@ -8,7 +8,9 @@ class chqflag_state : public driver_device { public: chqflag_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ UINT8 * m_ram; @@ -26,8 +28,8 @@ public: int m_wheel; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232_1; device_t *m_k007232_2; device_t *m_k051960; diff --git a/src/mame/includes/circus.h b/src/mame/includes/circus.h index 99990382a5d..5801e34bc6a 100644 --- a/src/mame/includes/circus.h +++ b/src/mame/includes/circus.h @@ -6,6 +6,7 @@ public: circus_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), m_discrete(*this, "discrete"){ } /* memory pointers */ @@ -18,7 +19,7 @@ public: int m_clown_z; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; samples_device *m_samples; required_device m_discrete; diff --git a/src/mame/includes/circusc.h b/src/mame/includes/circusc.h index 45fb7ed7d33..6d4e98fd68f 100644 --- a/src/mame/includes/circusc.h +++ b/src/mame/includes/circusc.h @@ -18,6 +18,7 @@ public: m_videoram(*this, "videoram"), m_spriteram_2(*this, "spriteram_2"), m_spriteram(*this, "spriteram"), + m_audiocpu(*this, "audiocpu"), m_sn_1(*this, "sn1"), m_sn_2(*this, "sn2"), m_discrete(*this, "fltdisc"){ } @@ -37,7 +38,7 @@ public: UINT8 m_sn_latch; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; required_device m_sn_1; required_device m_sn_2; dac_device *m_dac; diff --git a/src/mame/includes/citycon.h b/src/mame/includes/citycon.h index 8dafe22cd66..6d6b16a105f 100644 --- a/src/mame/includes/citycon.h +++ b/src/mame/includes/citycon.h @@ -12,7 +12,8 @@ public: m_videoram(*this, "videoram"), m_linecolor(*this, "linecolor"), m_spriteram(*this, "spriteram"), - m_scroll(*this, "scroll"){ } + m_scroll(*this, "scroll"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -27,7 +28,7 @@ public: int m_bg_image; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(citycon_in_r); DECLARE_READ8_MEMBER(citycon_irq_ack_r); DECLARE_WRITE8_MEMBER(citycon_videoram_w); diff --git a/src/mame/includes/combatsc.h b/src/mame/includes/combatsc.h index 5a9570adc75..338e5af2e32 100644 --- a/src/mame/includes/combatsc.h +++ b/src/mame/includes/combatsc.h @@ -9,7 +9,8 @@ class combatsc_state : public driver_device public: combatsc_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ UINT8 * m_videoram; @@ -39,7 +40,7 @@ public: /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k007121_1; device_t *m_k007121_2; DECLARE_WRITE8_MEMBER(combatsc_vreg_w); diff --git a/src/mame/includes/commando.h b/src/mame/includes/commando.h index c4bc6e0b2cf..7c65c69a9e5 100644 --- a/src/mame/includes/commando.h +++ b/src/mame/includes/commando.h @@ -15,7 +15,8 @@ public: m_videoram2(*this, "videoram2"), m_colorram2(*this, "colorram2"), m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"){ } + m_colorram(*this, "colorram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_device m_spriteram; @@ -31,7 +32,7 @@ public: UINT8 m_scroll_y[2]; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(commando_videoram_w); DECLARE_WRITE8_MEMBER(commando_colorram_w); DECLARE_WRITE8_MEMBER(commando_videoram2_w); diff --git a/src/mame/includes/contra.h b/src/mame/includes/contra.h index cd6edc624c8..17b3cd4aada 100644 --- a/src/mame/includes/contra.h +++ b/src/mame/includes/contra.h @@ -16,7 +16,8 @@ public: m_tx_vram(*this, "tx_vram"), m_spriteram(*this, "spriteram"), m_bg_cram(*this, "bg_cram"), - m_bg_vram(*this, "bg_vram"){ } + m_bg_vram(*this, "bg_vram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ UINT8 * m_buffered_spriteram; @@ -39,7 +40,7 @@ public: rectangle m_tx_clip; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k007121_1; device_t *m_k007121_2; DECLARE_WRITE8_MEMBER(contra_bankswitch_w); diff --git a/src/mame/includes/coolpool.h b/src/mame/includes/coolpool.h index a8bea8fe898..099817c925d 100644 --- a/src/mame/includes/coolpool.h +++ b/src/mame/includes/coolpool.h @@ -7,7 +7,8 @@ public: : driver_device(mconfig, type, tag) , m_tlc34076(*this, "tlc34076"), m_vram_base(*this, "vram_base"), - m_nvram(*this, "nvram"){ } + m_nvram(*this, "nvram"), + m_maincpu(*this, "maincpu"){ } optional_device m_tlc34076; required_shared_ptr m_vram_base; @@ -28,7 +29,7 @@ public: UINT16 m_result; UINT16 m_lastresult; - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_dsp; UINT16 m_nvram_write_seq[NVRAM_UNLOCK_SEQ_LEN]; UINT8 m_nvram_write_enable; diff --git a/src/mame/includes/cop01.h b/src/mame/includes/cop01.h index b305b3dcd58..c47894c4c34 100644 --- a/src/mame/includes/cop01.h +++ b/src/mame/includes/cop01.h @@ -11,7 +11,9 @@ public: : driver_device(mconfig, type, tag) , m_bgvideoram(*this, "bgvideoram"), m_spriteram(*this, "spriteram"), - m_fgvideoram(*this, "fgvideoram"){ } + m_fgvideoram(*this, "fgvideoram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_bgvideoram; @@ -28,8 +30,8 @@ public: int m_timer; // kludge for ym3526 in mightguy /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(cop01_sound_command_w); DECLARE_READ8_MEMBER(cop01_sound_command_r); DECLARE_WRITE8_MEMBER(cop01_irq_ack_w); diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h index 3214d64f8ff..1bdfd7497e1 100644 --- a/src/mame/includes/cps1.h +++ b/src/mame/includes/cps1.h @@ -73,7 +73,9 @@ public: m_qsound_sharedram2(*this, "qsound_ram2"), m_objram1(*this, "objram1"), m_objram2(*this, "objram2"), - m_output(*this, "output") + m_output(*this, "output"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -160,8 +162,8 @@ public: UINT16 *m_bootleg_work_ram; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; msm5205_device *m_msm_1; // fcrash msm5205_device *m_msm_2; // fcrash DECLARE_READ16_MEMBER(cps1_hack_dsw_r); diff --git a/src/mame/includes/crgolf.h b/src/mame/includes/crgolf.h index 4c55cb3e92f..2c2a983f077 100644 --- a/src/mame/includes/crgolf.h +++ b/src/mame/includes/crgolf.h @@ -16,7 +16,9 @@ public: m_screen_flip(*this, "screen_flip"), m_screen_select(*this, "screen_select"), m_screenb_enable(*this, "screenb_enable"), - m_screena_enable(*this, "screena_enable"){ } + m_screena_enable(*this, "screena_enable"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ UINT8 * m_videoram_a; @@ -35,8 +37,8 @@ public: UINT8 m_sample_count; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(rom_bank_select_w); DECLARE_READ8_MEMBER(switch_input_r); DECLARE_READ8_MEMBER(analog_input_r); diff --git a/src/mame/includes/crimfght.h b/src/mame/includes/crimfght.h index 6ced24803d4..176c0463073 100644 --- a/src/mame/includes/crimfght.h +++ b/src/mame/includes/crimfght.h @@ -8,7 +8,9 @@ class crimfght_state : public driver_device { public: crimfght_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT8 * m_paletteram; // currently this uses generic palette handling @@ -18,8 +20,8 @@ public: int m_sprite_colorbase; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/crospang.h b/src/mame/includes/crospang.h index 553a3bd8fd2..111bd2eef2d 100644 --- a/src/mame/includes/crospang.h +++ b/src/mame/includes/crospang.h @@ -14,7 +14,8 @@ public: m_fg_videoram(*this, "fg_videoram"), m_bg_videoram(*this, "bg_videoram"), m_spriteram(*this, "spriteram"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -30,7 +31,7 @@ public: int m_bestri_tilebank; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(crospang_soundlatch_w); DECLARE_WRITE16_MEMBER(bestri_tilebank_w); DECLARE_WRITE16_MEMBER(bestri_bg_scrolly_w); diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h index 47ffd006105..39aae57af6b 100644 --- a/src/mame/includes/cvs.h +++ b/src/mame/includes/cvs.h @@ -25,7 +25,9 @@ public: m_fo_state(*this, "fo_state"), m_cvs_4_bit_dac_data(*this, "4bit_dac"), m_tms5110_ctl_data(*this, "tms5110_ctl"), - m_dac3_state(*this, "dac3_state") { } + m_dac3_state(*this, "dac3_state"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ required_shared_ptr m_video_ram; @@ -55,8 +57,8 @@ public: UINT16 m_speech_rom_bit_address; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_speech; dac_device *m_dac3; device_t *m_tms; diff --git a/src/mame/includes/darius.h b/src/mame/includes/darius.h index 0b2673b5f77..9ddf9aa2401 100644 --- a/src/mame/includes/darius.h +++ b/src/mame/includes/darius.h @@ -16,7 +16,9 @@ public: darius_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram"), - m_fg_ram(*this, "fg_ram"){ } + m_fg_ram(*this, "fg_ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -36,8 +38,8 @@ public: UINT8 m_pan[DARIUS_PAN_MAX]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_cpub; device_t *m_adpcm; tc0140syt_device *m_tc0140syt; diff --git a/src/mame/includes/dbz.h b/src/mame/includes/dbz.h index fd243aaed10..0cc08aa113a 100644 --- a/src/mame/includes/dbz.h +++ b/src/mame/includes/dbz.h @@ -10,7 +10,9 @@ public: dbz_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_bg1_videoram(*this, "bg1_videoram"), - m_bg2_videoram(*this, "bg2_videoram"){ } + m_bg2_videoram(*this, "bg2_videoram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_bg1_videoram; @@ -28,8 +30,8 @@ public: int m_control; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k053246; device_t *m_k053251; device_t *m_k056832; diff --git a/src/mame/includes/dcheese.h b/src/mame/includes/dcheese.h index 898ec44e351..bdd3c643a5c 100644 --- a/src/mame/includes/dcheese.h +++ b/src/mame/includes/dcheese.h @@ -9,7 +9,9 @@ class dcheese_state : public driver_device { public: dcheese_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* video-related */ UINT16 m_blitter_color[2]; @@ -27,8 +29,8 @@ public: UINT8 m_sound_msb_latch; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_bsmt; DECLARE_WRITE16_MEMBER(eeprom_control_w); DECLARE_WRITE16_MEMBER(sound_command_w); diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index b5b072dcb5f..c56f2ac39b9 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -16,7 +16,8 @@ public: m_spriteram(*this, "spriteram"), m_scrollx_lo(*this, "scrollx_lo"), m_scrolly_lo(*this, "scrolly_lo"), - m_darktowr_mcu_ports(*this, "darktowr_mcu"){ } + m_darktowr_mcu_ports(*this, "darktowr_mcu"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ optional_shared_ptr m_rambase; @@ -59,7 +60,7 @@ public: #endif /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_snd_cpu; device_t *m_sub_cpu; device_t *m_adpcm_1; diff --git a/src/mame/includes/ddragon3.h b/src/mame/includes/ddragon3.h index d8d599c936a..5c12dd7bb83 100644 --- a/src/mame/includes/ddragon3.h +++ b/src/mame/includes/ddragon3.h @@ -12,7 +12,9 @@ public: : driver_device(mconfig, type, tag) , m_bg_videoram(*this, "bg_videoram"), m_fg_videoram(*this, "fg_videoram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_bg_videoram; @@ -34,8 +36,8 @@ public: UINT16 m_io_reg[8]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(ddragon3_io_w); DECLARE_WRITE16_MEMBER(ddragon3_scroll_w); DECLARE_READ16_MEMBER(ddragon3_scroll_r); diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h index 5eeb3245db1..2a279fe8744 100644 --- a/src/mame/includes/dec8.h +++ b/src/mame/includes/dec8.h @@ -5,14 +5,17 @@ class dec8_state : public driver_device public: dec8_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_spriteram(*this, "spriteram") , + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"), + m_audiocpu(*this, "audiocpu"), + m_spriteram(*this, "spriteram") , m_videoram(*this, "videoram"), m_bg_data(*this, "bg_data"){ } /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_subcpu; + required_device m_audiocpu; device_t *m_mcu; required_device m_spriteram; diff --git a/src/mame/includes/dietgo.h b/src/mame/includes/dietgo.h index 17940d675d2..fed8b80679b 100644 --- a/src/mame/includes/dietgo.h +++ b/src/mame/includes/dietgo.h @@ -14,7 +14,9 @@ public: m_pf1_rowscroll(*this, "pf1_rowscroll"), m_pf2_rowscroll(*this, "pf2_rowscroll"), m_spriteram(*this, "spriteram"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -25,8 +27,8 @@ public: // UINT16 * m_paletteram; // currently this uses generic palette handling (in decocomn.c) /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_deco_tilegen1; DECLARE_DRIVER_INIT(dietgo); virtual void machine_start(); diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h index 018d4ebf312..01921660aff 100644 --- a/src/mame/includes/djboy.h +++ b/src/mame/includes/djboy.h @@ -12,7 +12,8 @@ public: djboy_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -39,7 +40,7 @@ public: UINT8 m_beast_p3; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_cpu1; device_t *m_cpu2; device_t *m_pandora; diff --git a/src/mame/includes/docastle.h b/src/mame/includes/docastle.h index c5c7ed98e1f..c7a90ba32c1 100644 --- a/src/mame/includes/docastle.h +++ b/src/mame/includes/docastle.h @@ -7,7 +7,9 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_slave(*this, "slave"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -26,8 +28,8 @@ public: UINT8 m_buffer1[9]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_slave; + required_device m_maincpu; + required_device m_slave; DECLARE_READ8_MEMBER(docastle_shared0_r); DECLARE_READ8_MEMBER(docastle_shared1_r); DECLARE_WRITE8_MEMBER(docastle_shared0_w); diff --git a/src/mame/includes/dogfgt.h b/src/mame/includes/dogfgt.h index 64af4f9239b..72b934b600f 100644 --- a/src/mame/includes/dogfgt.h +++ b/src/mame/includes/dogfgt.h @@ -10,7 +10,8 @@ public: : driver_device(mconfig, type, tag) , m_bgvideoram(*this, "bgvideoram"), m_spriteram(*this, "spriteram"), - m_sharedram(*this, "sharedram") { } + m_sharedram(*this, "sharedram"), + m_subcpu(*this, "sub") { } /* memory pointers */ required_shared_ptr m_bgvideoram; @@ -33,7 +34,7 @@ public: int m_last_snd_ctrl; /* devices */ - cpu_device *m_subcpu; + required_device m_subcpu; DECLARE_READ8_MEMBER(sharedram_r); DECLARE_WRITE8_MEMBER(sharedram_w); DECLARE_WRITE8_MEMBER(subirqtrigger_w); diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h index 1cc377123b6..437c5f1dbeb 100644 --- a/src/mame/includes/dynax.h +++ b/src/mame/includes/dynax.h @@ -13,7 +13,9 @@ public: : driver_device(mconfig, type, tag), m_dsw_sel16(*this, "dsw_sel16"), m_protection1(*this, "protection1"), - m_protection2(*this, "protection2") + m_protection2(*this, "protection2"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu") { } // up to 8 layers, 2 images per layer (interleaved on screen) @@ -154,8 +156,8 @@ public: /* devices */ - cpu_device *m_maincpu; - cpu_device *m_soundcpu; + required_device m_maincpu; + required_device m_soundcpu; device_t *m_rtc; device_t *m_ymsnd; okim6295_device *m_oki; diff --git a/src/mame/includes/espial.h b/src/mame/includes/espial.h index 49573052877..8627d975614 100644 --- a/src/mame/includes/espial.h +++ b/src/mame/includes/espial.h @@ -15,7 +15,9 @@ public: m_spriteram_1(*this, "spriteram_1"), m_spriteram_2(*this, "spriteram_2"), m_spriteram_3(*this, "spriteram_3"), - m_colorram(*this, "colorram"){ } + m_colorram(*this, "colorram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } required_shared_ptr m_videoram; required_shared_ptr m_attributeram; @@ -35,8 +37,8 @@ public: UINT8 m_sound_nmi_enabled; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(espial_master_interrupt_mask_w); DECLARE_WRITE8_MEMBER(espial_master_soundlatch_w); DECLARE_WRITE8_MEMBER(espial_sound_nmi_mask_w); diff --git a/src/mame/includes/exerion.h b/src/mame/includes/exerion.h index cb03c18cbba..729b01534aa 100644 --- a/src/mame/includes/exerion.h +++ b/src/mame/includes/exerion.h @@ -25,7 +25,8 @@ public: : driver_device(mconfig, type, tag) , m_main_ram(*this, "main_ram"), m_videoram(*this, "videoram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_main_ram; @@ -46,7 +47,7 @@ public: UINT8 m_portb; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(exerion_protection_r); DECLARE_WRITE8_MEMBER(exerion_videoreg_w); DECLARE_WRITE8_MEMBER(exerion_video_latch_w); diff --git a/src/mame/includes/exprraid.h b/src/mame/includes/exprraid.h index 4382c8ff90a..1f02c823c34 100644 --- a/src/mame/includes/exprraid.h +++ b/src/mame/includes/exprraid.h @@ -13,7 +13,8 @@ public: m_main_ram(*this, "main_ram"), m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"){ } + m_colorram(*this, "colorram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_main_ram; @@ -30,7 +31,7 @@ public: //int m_coin; // used in the commented out INTERRUPT_GEN - can this be removed? /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_slave; DECLARE_READ8_MEMBER(exprraid_protection_r); DECLARE_WRITE8_MEMBER(sound_cpu_command_w); diff --git a/src/mame/includes/f1gp.h b/src/mame/includes/f1gp.h index 75199aa561e..4c87d417427 100644 --- a/src/mame/includes/f1gp.h +++ b/src/mame/includes/f1gp.h @@ -20,7 +20,8 @@ public: m_rozregs(*this, "rozregs"), m_spr_old(*this, "vsystem_spr_old"), m_spr_old2(*this, "vsystem_spr_ol2"), - m_spr(*this, "vsystem_spr") + m_spr(*this, "vsystem_spr"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -61,7 +62,7 @@ public: int m_pending_command; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k053936; DECLARE_READ16_MEMBER(sharedram_r); DECLARE_WRITE16_MEMBER(sharedram_w); diff --git a/src/mame/includes/fcombat.h b/src/mame/includes/fcombat.h index fa21aca7ae9..d5089dea9ee 100644 --- a/src/mame/includes/fcombat.h +++ b/src/mame/includes/fcombat.h @@ -28,7 +28,8 @@ public: fcombat_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -48,7 +49,7 @@ public: int m_ty; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(fcombat_protection_r); DECLARE_READ8_MEMBER(fcombat_port01_r); DECLARE_WRITE8_MEMBER(e900_w); diff --git a/src/mame/includes/fgoal.h b/src/mame/includes/fgoal.h index 2f5520345de..c5b81b8da43 100644 --- a/src/mame/includes/fgoal.h +++ b/src/mame/includes/fgoal.h @@ -5,7 +5,8 @@ class fgoal_state : public driver_device public: fgoal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_video_ram(*this, "video_ram"){ } + m_video_ram(*this, "video_ram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_video_ram; @@ -24,7 +25,7 @@ public: int m_prev_coin; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_mb14241; DECLARE_READ8_MEMBER(fgoal_analog_r); DECLARE_READ8_MEMBER(fgoal_nmi_reset_r); diff --git a/src/mame/includes/firetrap.h b/src/mame/includes/firetrap.h index 9004e9e2fc4..05af1c1a409 100644 --- a/src/mame/includes/firetrap.h +++ b/src/mame/includes/firetrap.h @@ -12,7 +12,9 @@ public: m_bg1videoram(*this, "bg1videoram"), m_bg2videoram(*this, "bg2videoram"), m_fgvideoram(*this, "fgvideoram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_bg1videoram; @@ -40,8 +42,8 @@ public: int m_coin_command_pending; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_msm; DECLARE_WRITE8_MEMBER(firetrap_nmi_disable_w); DECLARE_WRITE8_MEMBER(firetrap_bankselect_w); diff --git a/src/mame/includes/flkatck.h b/src/mame/includes/flkatck.h index 4117323f632..bc5a8e157cc 100644 --- a/src/mame/includes/flkatck.h +++ b/src/mame/includes/flkatck.h @@ -9,7 +9,8 @@ class flkatck_state : public driver_device public: flkatck_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_k007121_ram(*this, "k007121_ram"){ } + m_k007121_ram(*this, "k007121_ram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_k007121_ram; @@ -24,7 +25,7 @@ public: int m_multiply_reg[2]; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k007121; DECLARE_WRITE8_MEMBER(flkatck_bankswitch_w); DECLARE_READ8_MEMBER(flkatck_ls138_r); diff --git a/src/mame/includes/flstory.h b/src/mame/includes/flstory.h index 922581e5d85..11e5dab1c94 100644 --- a/src/mame/includes/flstory.h +++ b/src/mame/includes/flstory.h @@ -7,7 +7,9 @@ public: m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), m_scrlram(*this, "scrlram"), - m_workram(*this, "workram"){ } + m_workram(*this, "workram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -52,8 +54,8 @@ public: int m_mcu_select; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_mcu; /* mcu */ diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h index 0a6497ece7a..f6c04d44308 100644 --- a/src/mame/includes/fromanc2.h +++ b/src/mame/includes/fromanc2.h @@ -3,7 +3,9 @@ class fromanc2_state : public driver_device { public: fromanc2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub") { } /* memory pointers */ UINT16 *m_paletteram[2]; @@ -26,8 +28,8 @@ public: UINT8 m_datalatch_2l; /* devices */ - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_audiocpu; + required_device m_subcpu; device_t *m_eeprom; device_t *m_left_screen; device_t *m_right_screen; diff --git a/src/mame/includes/fromance.h b/src/mame/includes/fromance.h index 3cd454b2317..31197692c8a 100644 --- a/src/mame/includes/fromance.h +++ b/src/mame/includes/fromance.h @@ -16,7 +16,8 @@ public: : driver_device(mconfig, type, tag), m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), - m_spr_old(*this, "vsystem_spr_old") + m_spr_old(*this, "vsystem_spr_old"), + m_subcpu(*this, "sub") { } /* memory pointers (used by pipedrm) */ @@ -56,7 +57,7 @@ public: UINT8 m_sound_command; /* devices */ - cpu_device *m_subcpu; + required_device m_subcpu; DECLARE_READ8_MEMBER(fromance_commanddata_r); DECLARE_WRITE8_MEMBER(fromance_commanddata_w); DECLARE_READ8_MEMBER(fromance_busycheck_main_r); diff --git a/src/mame/includes/funkyjet.h b/src/mame/includes/funkyjet.h index e47c1f8cb3f..63dfa2f4f65 100644 --- a/src/mame/includes/funkyjet.h +++ b/src/mame/includes/funkyjet.h @@ -14,7 +14,9 @@ public: m_spriteram(*this, "spriteram"), m_pf1_rowscroll(*this, "pf1_rowscroll"), m_pf2_rowscroll(*this, "pf2_rowscroll"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -25,8 +27,8 @@ public: // UINT16 * paletteram; // currently this uses generic palette handling (in decocomn.c) /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_deco_tilegen1; DECLARE_DRIVER_INIT(funkyjet); virtual void machine_start(); diff --git a/src/mame/includes/funybubl.h b/src/mame/includes/funybubl.h index e09b476af1c..f34cde3fcf0 100644 --- a/src/mame/includes/funybubl.h +++ b/src/mame/includes/funybubl.h @@ -5,13 +5,14 @@ class funybubl_state : public driver_device public: funybubl_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_paletteram; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; /* memory */ UINT8 m_banked_vram[0x2000]; diff --git a/src/mame/includes/fuukifg2.h b/src/mame/includes/fuukifg2.h index e96ea93a40d..96b02243f38 100644 --- a/src/mame/includes/fuukifg2.h +++ b/src/mame/includes/fuukifg2.h @@ -9,7 +9,9 @@ public: m_spriteram(*this, "spriteram"), m_vregs(*this, "vregs"), m_unknown(*this, "unknown"), - m_priority(*this, "priority"){ } + m_priority(*this, "priority"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr_array m_vram; @@ -26,8 +28,8 @@ public: emu_timer *m_raster_interrupt_timer; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(fuuki16_vregs_w); DECLARE_WRITE16_MEMBER(fuuki16_sound_command_w); DECLARE_WRITE8_MEMBER(fuuki16_sound_rombank_w); diff --git a/src/mame/includes/fuukifg3.h b/src/mame/includes/fuukifg3.h index f4dd90c7685..e7a68f5d0ae 100644 --- a/src/mame/includes/fuukifg3.h +++ b/src/mame/includes/fuukifg3.h @@ -19,7 +19,9 @@ public: m_paletteram(*this, "paletteram"), m_vregs(*this, "vregs"), m_priority(*this, "priority"), - m_tilebank(*this, "tilebank"){ } + m_tilebank(*this, "tilebank"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu"){ } /* memory pointers */ required_shared_ptr_array m_vram; @@ -40,8 +42,8 @@ public: UINT8 m_shared_ram[16]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_soundcpu; DECLARE_WRITE32_MEMBER(paletteram32_xRRRRRGGGGGBBBBB_dword_w); DECLARE_READ32_MEMBER(snd_020_r); DECLARE_WRITE32_MEMBER(snd_020_w); diff --git a/src/mame/includes/gaelco.h b/src/mame/includes/gaelco.h index 1af44aafdc7..dad34f94d7a 100644 --- a/src/mame/includes/gaelco.h +++ b/src/mame/includes/gaelco.h @@ -12,7 +12,8 @@ public: m_videoram(*this, "videoram"), m_vregs(*this, "vregs"), m_spriteram(*this, "spriteram"), - m_screen(*this, "screen"){ } + m_screen(*this, "screen"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -25,7 +26,7 @@ public: tilemap_t *m_tilemap[2]; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(bigkarnk_sound_command_w); DECLARE_WRITE16_MEMBER(bigkarnk_coin_w); DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w); diff --git a/src/mame/includes/gaiden.h b/src/mame/includes/gaiden.h index 7ca233b42ec..8123fa19a37 100644 --- a/src/mame/includes/gaiden.h +++ b/src/mame/includes/gaiden.h @@ -14,7 +14,8 @@ public: m_videoram(*this, "videoram"), m_videoram2(*this, "videoram2"), m_videoram3(*this, "videoram3"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -47,7 +48,7 @@ public: const int *m_raiga_jumppoints; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(gaiden_sound_command_w); DECLARE_WRITE16_MEMBER(drgnbowl_sound_command_w); DECLARE_WRITE16_MEMBER(wildfang_protection_w); diff --git a/src/mame/includes/galspnbl.h b/src/mame/includes/galspnbl.h index 81d30e0556e..abf0eeca79d 100644 --- a/src/mame/includes/galspnbl.h +++ b/src/mame/includes/galspnbl.h @@ -16,7 +16,8 @@ public: m_colorram(*this, "colorram"), m_videoram(*this, "videoram"), m_bgvideoram(*this, "bgvideoram"), - m_scroll(*this, "scroll"){ } + m_scroll(*this, "scroll"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -27,7 +28,7 @@ public: // UINT16 * paletteram; // currently this uses generic palette handling /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(soundcommand_w); virtual void machine_start(); virtual void palette_init(); diff --git a/src/mame/includes/gameplan.h b/src/mame/includes/gameplan.h index 3da7f25b880..3c56d421982 100644 --- a/src/mame/includes/gameplan.h +++ b/src/mame/includes/gameplan.h @@ -27,6 +27,8 @@ public: gameplan_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_trvquest_question(*this, "trvquest_q"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), m_via_0(*this, "via6522_0"), m_via_1(*this, "via6522_1"), m_via_2(*this, "via6522_2") { } @@ -45,8 +47,8 @@ public: emu_timer *m_via_0_ca1_timer; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_riot; required_device m_via_0; required_device m_via_1; diff --git a/src/mame/includes/gbusters.h b/src/mame/includes/gbusters.h index 77af8470870..181627f99e0 100644 --- a/src/mame/includes/gbusters.h +++ b/src/mame/includes/gbusters.h @@ -9,7 +9,9 @@ class gbusters_state : public driver_device public: gbusters_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_ram; @@ -23,8 +25,8 @@ public: int m_priority; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/gijoe.h b/src/mame/includes/gijoe.h index c2259727629..d59ad251bfa 100644 --- a/src/mame/includes/gijoe.h +++ b/src/mame/includes/gijoe.h @@ -10,7 +10,9 @@ public: gijoe_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram"), - m_workram(*this, "workram"){ } + m_workram(*this, "workram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -30,8 +32,8 @@ public: emu_timer *m_dmadelay_timer; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k054539; device_t *m_k056832; device_t *m_k053246; diff --git a/src/mame/includes/ginganin.h b/src/mame/includes/ginganin.h index cd54a1fa0f3..d43d7ac0d9b 100644 --- a/src/mame/includes/ginganin.h +++ b/src/mame/includes/ginganin.h @@ -12,7 +12,8 @@ public: m_txtram(*this, "txtram"), m_spriteram(*this, "spriteram"), m_vregs(*this, "vregs"), - m_fgram(*this, "fgram"){ } + m_fgram(*this, "fgram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_txtram; @@ -33,7 +34,7 @@ public: #endif /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(ginganin_fgram16_w); DECLARE_WRITE16_MEMBER(ginganin_txtram16_w); DECLARE_WRITE16_MEMBER(ginganin_vregs16_w); diff --git a/src/mame/includes/goal92.h b/src/mame/includes/goal92.h index 0c8554d5761..e6394d8f8f4 100644 --- a/src/mame/includes/goal92.h +++ b/src/mame/includes/goal92.h @@ -13,7 +13,8 @@ public: m_fg_data(*this, "fg_data"), m_tx_data(*this, "tx_data"), m_spriteram(*this, "spriteram"), - m_scrollram(*this, "scrollram"){ } + m_scrollram(*this, "scrollram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_bg_data; @@ -35,7 +36,7 @@ public: int m_adpcm_toggle; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(goal92_sound_command_w); DECLARE_READ16_MEMBER(goal92_inputs_r); DECLARE_WRITE8_MEMBER(adpcm_data_w); diff --git a/src/mame/includes/gotcha.h b/src/mame/includes/gotcha.h index 69f55af2c02..34af3eb392c 100644 --- a/src/mame/includes/gotcha.h +++ b/src/mame/includes/gotcha.h @@ -14,7 +14,8 @@ public: m_fgvideoram(*this, "fgvideoram"), m_bgvideoram(*this, "bgvideoram"), m_spriteram(*this, "spriteram"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -32,7 +33,7 @@ public: UINT16 m_scroll[4]; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(gotcha_lamps_w); DECLARE_WRITE16_MEMBER(gotcha_fgvideoram_w); DECLARE_WRITE16_MEMBER(gotcha_bgvideoram_w); diff --git a/src/mame/includes/gradius3.h b/src/mame/includes/gradius3.h index 5a21d6116ca..d65c29f188e 100644 --- a/src/mame/includes/gradius3.h +++ b/src/mame/includes/gradius3.h @@ -9,7 +9,10 @@ class gradius3_state : public driver_device public: gradius3_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_gfxram(*this, "gfxram"){ } + m_gfxram(*this, "gfxram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_gfxram; @@ -25,9 +28,9 @@ public: int m_irqBmask; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/gridlee.h b/src/mame/includes/gridlee.h index 7b2bc2d7499..f7aad1306b4 100644 --- a/src/mame/includes/gridlee.h +++ b/src/mame/includes/gridlee.h @@ -26,11 +26,12 @@ public: gridlee_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram"), - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"){ } required_shared_ptr m_spriteram; required_shared_ptr m_videoram; - cpu_device *m_maincpu; + required_device m_maincpu; UINT8 m_last_analog_input[2]; UINT8 m_last_analog_output[2]; UINT8 *m_poly17; diff --git a/src/mame/includes/hcastle.h b/src/mame/includes/hcastle.h index 9450891b82c..e388a52fb40 100644 --- a/src/mame/includes/hcastle.h +++ b/src/mame/includes/hcastle.h @@ -15,7 +15,8 @@ public: m_spriteram2(*this, "spriteram2") , m_paletteram(*this, "paletteram"), m_pf1_videoram(*this, "pf1_videoram"), - m_pf2_videoram(*this, "pf2_videoram"){ } + m_pf2_videoram(*this, "pf2_videoram"), + m_audiocpu(*this, "audiocpu"){ } required_device m_spriteram; required_device m_spriteram2; @@ -34,7 +35,7 @@ public: int m_gfx_bank; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k007121_1; device_t *m_k007121_2; diff --git a/src/mame/includes/himesiki.h b/src/mame/includes/himesiki.h index 8c50198f889..ec7703fafe0 100644 --- a/src/mame/includes/himesiki.h +++ b/src/mame/includes/himesiki.h @@ -10,7 +10,8 @@ public: himesiki_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_bg_ram(*this, "bg_ram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_bg_ram; @@ -23,7 +24,7 @@ public: int m_flipscreen; /* devices */ - cpu_device *m_subcpu; + required_device m_subcpu; DECLARE_WRITE8_MEMBER(himesiki_rombank_w); DECLARE_WRITE8_MEMBER(himesiki_sound_w); DECLARE_WRITE8_MEMBER(himesiki_bg_ram_w); diff --git a/src/mame/includes/homedata.h b/src/mame/includes/homedata.h index 5abd5b61e81..db0934e8af2 100644 --- a/src/mame/includes/homedata.h +++ b/src/mame/includes/homedata.h @@ -7,7 +7,9 @@ public: homedata_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_vreg(*this, "vreg"), - m_videoram(*this, "videoram") {} + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") {} /* memory pointers */ optional_shared_ptr m_vreg; @@ -36,8 +38,8 @@ public: int m_from_cpu; /* device */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; dac_device *m_dac; device_t *m_ym; sn76489a_device *m_sn; diff --git a/src/mame/includes/hyprduel.h b/src/mame/includes/hyprduel.h index efb56fcd5b3..642810339e2 100644 --- a/src/mame/includes/hyprduel.h +++ b/src/mame/includes/hyprduel.h @@ -21,7 +21,9 @@ public: m_screenctrl(*this, "screenctrl"), m_videoregs(*this, "videoregs"), m_sharedram1(*this, "sharedram1"), - m_sharedram3(*this, "sharedram3"){ } + m_sharedram3(*this, "sharedram3"), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_vram_0; @@ -59,8 +61,8 @@ public: int m_int_num; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_subcpu; DECLARE_READ16_MEMBER(hyprduel_irq_cause_r); DECLARE_WRITE16_MEMBER(hyprduel_irq_cause_w); DECLARE_WRITE16_MEMBER(hyprduel_subcpu_control_w); diff --git a/src/mame/includes/inufuku.h b/src/mame/includes/inufuku.h index a06c7692315..ab4c10c3320 100644 --- a/src/mame/includes/inufuku.h +++ b/src/mame/includes/inufuku.h @@ -9,7 +9,8 @@ public: m_tx_videoram(*this, "tx_videoram"), m_spriteram1(*this, "spriteram1"), m_spriteram2(*this, "spriteram2"), - m_spr(*this, "vsystem_spr") + m_spr(*this, "vsystem_spr"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -38,7 +39,7 @@ public: UINT16 m_pending_command; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(inufuku_soundcommand_w); DECLARE_WRITE8_MEMBER(pending_command_clear_w); DECLARE_WRITE8_MEMBER(inufuku_soundrombank_w); diff --git a/src/mame/includes/ironhors.h b/src/mame/includes/ironhors.h index ceee3ab3d27..fe7394a94a6 100644 --- a/src/mame/includes/ironhors.h +++ b/src/mame/includes/ironhors.h @@ -14,7 +14,9 @@ public: m_colorram(*this, "colorram"), m_videoram(*this, "videoram"), m_spriteram2(*this, "spriteram2"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu"){ } /* memory pointers */ required_shared_ptr m_interrupt_enable; @@ -31,8 +33,8 @@ public: int m_spriterambank; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_soundcpu; + required_device m_maincpu; + required_device m_soundcpu; DECLARE_WRITE8_MEMBER(ironhors_sh_irqtrigger_w); DECLARE_WRITE8_MEMBER(ironhors_videoram_w); DECLARE_WRITE8_MEMBER(ironhors_colorram_w); diff --git a/src/mame/includes/jackal.h b/src/mame/includes/jackal.h index f60540acc2c..569c0c5f5a0 100644 --- a/src/mame/includes/jackal.h +++ b/src/mame/includes/jackal.h @@ -10,7 +10,9 @@ public: jackal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoctrl(*this, "videoctrl"), - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_mastercpu(*this, "master"), + m_slavecpu(*this, "slave"){ } /* memory pointers */ required_shared_ptr m_videoctrl; @@ -26,8 +28,8 @@ public: UINT8 *m_spritebank; /* devices */ - cpu_device *m_mastercpu; - cpu_device *m_slavecpu; + required_device m_mastercpu; + required_device m_slavecpu; DECLARE_READ8_MEMBER(topgunbl_rotary_r); DECLARE_WRITE8_MEMBER(jackal_flipscreen_w); DECLARE_READ8_MEMBER(jackal_zram_r); diff --git a/src/mame/includes/karnov.h b/src/mame/includes/karnov.h index 5e62fd2eb4f..60682846221 100644 --- a/src/mame/includes/karnov.h +++ b/src/mame/includes/karnov.h @@ -14,7 +14,9 @@ public: m_spriteram(*this, "spriteram") , m_ram(*this, "ram"), m_videoram(*this, "videoram"), - m_pf_data(*this, "pf_data"){ } + m_pf_data(*this, "pf_data"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } required_device m_spriteram; /* memory pointers */ @@ -39,8 +41,8 @@ public: int m_latch; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(karnov_control_w); DECLARE_READ16_MEMBER(karnov_control_r); DECLARE_WRITE16_MEMBER(karnov_videoram_w); diff --git a/src/mame/includes/kchamp.h b/src/mame/includes/kchamp.h index c7e24a02557..7244fd00d50 100644 --- a/src/mame/includes/kchamp.h +++ b/src/mame/includes/kchamp.h @@ -11,7 +11,8 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -29,7 +30,7 @@ public: int m_counter; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(control_w); DECLARE_WRITE8_MEMBER(sound_reset_w); DECLARE_WRITE8_MEMBER(sound_command_w); diff --git a/src/mame/includes/kncljoe.h b/src/mame/includes/kncljoe.h index a8e2df70aa0..517bda3be7b 100644 --- a/src/mame/includes/kncljoe.h +++ b/src/mame/includes/kncljoe.h @@ -11,7 +11,8 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_scrollregs(*this, "scrollregs"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_soundcpu(*this, "soundcpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -29,7 +30,7 @@ public: UINT8 m_port2; /* devices */ - cpu_device *m_soundcpu; + required_device m_soundcpu; DECLARE_WRITE8_MEMBER(sound_cmd_w); DECLARE_WRITE8_MEMBER(sound_irq_ack_w); DECLARE_WRITE8_MEMBER(kncljoe_videoram_w); diff --git a/src/mame/includes/kopunch.h b/src/mame/includes/kopunch.h index 48b61a38904..e3441edb099 100644 --- a/src/mame/includes/kopunch.h +++ b/src/mame/includes/kopunch.h @@ -10,7 +10,8 @@ public: kopunch_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_videoram2(*this, "videoram2"){ } + m_videoram2(*this, "videoram2"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -25,7 +26,7 @@ public: int m_gfxbank; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(kopunch_in_r); DECLARE_WRITE8_MEMBER(kopunch_lamp_w); DECLARE_WRITE8_MEMBER(kopunch_coin_w); diff --git a/src/mame/includes/kyugo.h b/src/mame/includes/kyugo.h index ce61dd4b5cc..e441a87b64f 100644 --- a/src/mame/includes/kyugo.h +++ b/src/mame/includes/kyugo.h @@ -14,7 +14,9 @@ public: m_bgattribram(*this, "bgattribram"), m_spriteram_1(*this, "spriteram_1"), m_spriteram_2(*this, "spriteram_2"), - m_shared_ram(*this, "shared_ram"){ } + m_shared_ram(*this, "shared_ram"), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_fgvideoram; @@ -36,8 +38,8 @@ public: const UINT8 *m_color_codes; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_subcpu; UINT8 m_nmi_mask; DECLARE_WRITE8_MEMBER(kyugo_nmi_mask_w); diff --git a/src/mame/includes/ladybug.h b/src/mame/includes/ladybug.h index 57294ee6080..b4ca11898e4 100644 --- a/src/mame/includes/ladybug.h +++ b/src/mame/includes/ladybug.h @@ -14,7 +14,8 @@ public: m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_spriteram(*this, "spriteram"), - m_grid_data(*this, "grid_data"){ } + m_grid_data(*this, "grid_data"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -43,7 +44,7 @@ public: UINT8 m_sraider_0x38; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(sraider_sound_low_r); DECLARE_READ8_MEMBER(sraider_sound_high_r); DECLARE_WRITE8_MEMBER(sraider_sound_low_w); diff --git a/src/mame/includes/ladyfrog.h b/src/mame/includes/ladyfrog.h index 92defae4b17..ac65d267f45 100644 --- a/src/mame/includes/ladyfrog.h +++ b/src/mame/includes/ladyfrog.h @@ -10,7 +10,8 @@ public: ladyfrog_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_scrlram(*this, "scrlram"){ } + m_scrlram(*this, "scrlram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -32,7 +33,7 @@ public: UINT8 m_snd_data; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_READ8_MEMBER(from_snd_r); DECLARE_WRITE8_MEMBER(to_main_w); DECLARE_WRITE8_MEMBER(sound_cpu_reset_w); diff --git a/src/mame/includes/lasso.h b/src/mame/includes/lasso.h index b10012b0652..e35bc406987 100644 --- a/src/mame/includes/lasso.h +++ b/src/mame/includes/lasso.h @@ -19,6 +19,8 @@ public: m_bitmap_ram(*this, "bitmap_ram"), m_last_colors(*this, "last_colors"), m_track_scroll(*this, "track_scroll"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), m_sn_1(*this, "sn76489.1"), m_sn_2(*this, "sn76489.2"){ } @@ -39,8 +41,8 @@ public: UINT8 m_track_enable; /* used by wwjgtin */ /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; optional_device m_sn_1; optional_device m_sn_2; DECLARE_WRITE8_MEMBER(sound_command_w); diff --git a/src/mame/includes/lemmings.h b/src/mame/includes/lemmings.h index bde3dcf646a..bd3e1551389 100644 --- a/src/mame/includes/lemmings.h +++ b/src/mame/includes/lemmings.h @@ -6,9 +6,10 @@ class lemmings_state : public driver_device public: lemmings_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_bitmap0(2048, 256), - m_spriteram(*this, "spriteram"), - m_spriteram2(*this, "spriteram2") , + m_bitmap0(2048, 256), + m_audiocpu(*this, "audiocpu"), + m_spriteram(*this, "spriteram"), + m_spriteram2(*this, "spriteram2") , m_paletteram(*this, "paletteram"), m_control_data(*this, "control_data"), m_vram_data(*this, "vram_data"), @@ -25,7 +26,7 @@ public: UINT16 m_sprite_triple_buffer_1[0x800]; UINT8 m_vram_buffer[2048 * 64]; // 64 bytes per VRAM character /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; required_device m_spriteram; required_device m_spriteram2; /* memory pointers */ diff --git a/src/mame/includes/lethal.h b/src/mame/includes/lethal.h index 9ee62ba5afd..fb6006effa0 100644 --- a/src/mame/includes/lethal.h +++ b/src/mame/includes/lethal.h @@ -8,7 +8,9 @@ class lethal_state : public driver_device { public: lethal_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu") { } /* video-related */ int m_layer_colorbase[4]; @@ -18,8 +20,8 @@ public: UINT8 m_cur_control2; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_soundcpu; device_t *m_k054539; device_t *m_k056832; device_t *m_k053244; diff --git a/src/mame/includes/liberate.h b/src/mame/includes/liberate.h index 56f56bd9903..93eef6e9956 100644 --- a/src/mame/includes/liberate.h +++ b/src/mame/includes/liberate.h @@ -8,7 +8,9 @@ public: m_colorram(*this, "colorram"), m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), - m_scratchram(*this, "scratchram"){ } + m_scratchram(*this, "scratchram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } optional_shared_ptr m_paletteram; optional_shared_ptr m_bg_vram; /* prosport */ @@ -29,8 +31,8 @@ public: tilemap_t *m_back_tilemap; tilemap_t *m_fix_tilemap; - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_READ8_MEMBER(deco16_bank_r); DECLARE_READ8_MEMBER(deco16_io_r); DECLARE_WRITE8_MEMBER(deco16_bank_w); diff --git a/src/mame/includes/lkage.h b/src/mame/includes/lkage.h index 07c60fe704a..bad5fd91190 100644 --- a/src/mame/includes/lkage.h +++ b/src/mame/includes/lkage.h @@ -7,7 +7,9 @@ public: m_vreg(*this, "vreg"), m_scroll(*this, "scroll"), m_spriteram(*this, "spriteram"), - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } required_shared_ptr m_vreg; required_shared_ptr m_scroll; @@ -49,8 +51,8 @@ public: int m_mcu_ready; /* cpu data/mcu ready status */ /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(lkage_sound_command_w); DECLARE_WRITE8_MEMBER(lkage_sh_nmi_disable_w); diff --git a/src/mame/includes/lockon.h b/src/mame/includes/lockon.h index b95203de3e5..895688dc798 100644 --- a/src/mame/includes/lockon.h +++ b/src/mame/includes/lockon.h @@ -26,7 +26,9 @@ public: m_hud_ram(*this, "hud_ram"), m_scene_ram(*this, "scene_ram"), m_ground_ram(*this, "ground_ram"), - m_object_ram(*this, "object_ram"){ } + m_object_ram(*this, "object_ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_char_ram; @@ -66,8 +68,8 @@ public: UINT32 m_main_inten; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_ground; device_t *m_object; filter_volume_device *m_f2203_1l; diff --git a/src/mame/includes/lsasquad.h b/src/mame/includes/lsasquad.h index c22bf66bac4..d57c5ff614e 100644 --- a/src/mame/includes/lsasquad.h +++ b/src/mame/includes/lsasquad.h @@ -6,7 +6,9 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_scrollram(*this, "scrollram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -33,8 +35,8 @@ public: UINT8 m_ddr_b; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(lsasquad_bankswitch_w); DECLARE_WRITE8_MEMBER(lsasquad_sh_nmi_disable_w); diff --git a/src/mame/includes/m10.h b/src/mame/includes/m10.h index 675b899f040..2360cfc2ed4 100644 --- a/src/mame/includes/m10.h +++ b/src/mame/includes/m10.h @@ -37,7 +37,8 @@ public: m_rom(*this, "rom"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_chargen(*this, "chargen"){ } + m_chargen(*this, "chargen"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_memory; @@ -61,7 +62,7 @@ public: int m_last; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_ic8j1; device_t *m_ic8j2; samples_device *m_samples; diff --git a/src/mame/includes/macrossp.h b/src/mame/includes/macrossp.h index 5f65516c37d..4e0dd715d98 100644 --- a/src/mame/includes/macrossp.h +++ b/src/mame/includes/macrossp.h @@ -19,7 +19,9 @@ public: m_text_videoram(*this, "text_videoram"), m_text_videoregs(*this, "text_videoregs"), m_paletteram(*this, "paletteram"), - m_mainram(*this, "mainram"){ } + m_mainram(*this, "mainram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -49,8 +51,8 @@ public: INT32 m_old_fade; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE32_MEMBER(paletteram32_macrossp_w); DECLARE_READ32_MEMBER(macrossp_soundstatus_r); DECLARE_WRITE32_MEMBER(macrossp_soundcmd_w); diff --git a/src/mame/includes/madmotor.h b/src/mame/includes/madmotor.h index c1cb4be6162..d21a35aed9c 100644 --- a/src/mame/includes/madmotor.h +++ b/src/mame/includes/madmotor.h @@ -9,7 +9,9 @@ class madmotor_state : public driver_device public: madmotor_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -19,8 +21,8 @@ public: int m_flipscreen; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(madmotor_sound_w); DECLARE_DRIVER_INIT(madmotor); virtual void machine_start(); diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h index 8191688b9f7..70119e2b7ca 100644 --- a/src/mame/includes/mainevt.h +++ b/src/mame/includes/mainevt.h @@ -8,7 +8,9 @@ class mainevt_state : public driver_device { public: mainevt_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT8 * m_paletteram; // currently this uses generic palette handling @@ -22,8 +24,8 @@ public: UINT8 m_sound_irq_mask; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_upd; device_t *m_k007232; device_t *m_k052109; diff --git a/src/mame/includes/marineb.h b/src/mame/includes/marineb.h index 22d72780f8b..1160da72b9d 100644 --- a/src/mame/includes/marineb.h +++ b/src/mame/includes/marineb.h @@ -5,7 +5,9 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), - m_colorram(*this, "colorram"){ } + m_colorram(*this, "colorram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } required_shared_ptr m_videoram; required_shared_ptr m_spriteram; @@ -21,8 +23,8 @@ public: UINT8 m_marineb_active_low_flipscreen; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; UINT8 m_irq_mask; DECLARE_WRITE8_MEMBER(irq_mask_w); diff --git a/src/mame/includes/matmania.h b/src/mame/includes/matmania.h index bcb47975d2d..0f3cdd6c907 100644 --- a/src/mame/includes/matmania.h +++ b/src/mame/includes/matmania.h @@ -13,7 +13,9 @@ public: m_scroll(*this, "scroll"), m_pageselect(*this, "pageselect"), m_spriteram(*this, "spriteram"), - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -48,8 +50,8 @@ public: int m_main_sent; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(matmania_sh_command_w); DECLARE_WRITE8_MEMBER(maniach_sh_command_w); diff --git a/src/mame/includes/mcatadv.h b/src/mame/includes/mcatadv.h index 6ae77c7ab0d..c7a160650e6 100644 --- a/src/mame/includes/mcatadv.h +++ b/src/mame/includes/mcatadv.h @@ -9,7 +9,9 @@ public: m_scroll1(*this, "scroll1"), m_scroll2(*this, "scroll2"), m_spriteram(*this, "spriteram"), - m_vidregs(*this, "vidregs"){ } + m_vidregs(*this, "vidregs"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu"){ } /* memory pointers */ required_shared_ptr m_videoram1; @@ -29,8 +31,8 @@ public: int m_palette_bank2; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_soundcpu; + required_device m_maincpu; + required_device m_soundcpu; DECLARE_WRITE16_MEMBER(mcat_soundlatch_w); DECLARE_WRITE16_MEMBER(mcat_coin_w); DECLARE_READ16_MEMBER(mcat_wd_r); diff --git a/src/mame/includes/megazone.h b/src/mame/includes/megazone.h index fc2602cf804..aca262b95ac 100644 --- a/src/mame/includes/megazone.h +++ b/src/mame/includes/megazone.h @@ -15,7 +15,10 @@ public: m_videoram2(*this, "videoram2"), m_colorram(*this, "colorram"), m_colorram2(*this, "colorram2"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_daccpu(*this, "daccpu"){ } /* memory pointers */ required_shared_ptr m_scrolly; @@ -34,9 +37,9 @@ public: int m_i8039_status; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_daccpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_daccpu; UINT8 m_irq_mask; DECLARE_WRITE8_MEMBER(megazone_i8039_irq_w); diff --git a/src/mame/includes/mermaid.h b/src/mame/includes/mermaid.h index ee05e3558ad..25b93518ada 100644 --- a/src/mame/includes/mermaid.h +++ b/src/mame/includes/mermaid.h @@ -15,7 +15,8 @@ public: m_fg_scrollram(*this, "fg_scrollram"), m_spriteram(*this, "spriteram"), m_colorram(*this, "colorram"), - m_ay8910_enable(*this, "ay8910_enable"){ } + m_ay8910_enable(*this, "ay8910_enable"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram2; @@ -49,7 +50,7 @@ public: UINT8 m_adpcm_play_reg; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_ay1; device_t *m_ay2; diff --git a/src/mame/includes/metlclsh.h b/src/mame/includes/metlclsh.h index a9f2159b52d..dc5b2a5c1c1 100644 --- a/src/mame/includes/metlclsh.h +++ b/src/mame/includes/metlclsh.h @@ -12,7 +12,9 @@ public: m_fgram(*this, "fgram"), m_spriteram(*this, "spriteram"), m_bgram(*this, "bgram"), - m_scrollx(*this, "scrollx"){ } + m_scrollx(*this, "scrollx"), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_fgram; @@ -30,8 +32,8 @@ public: UINT8 m_gfxbank; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_subcpu; DECLARE_WRITE8_MEMBER(metlclsh_cause_irq); DECLARE_WRITE8_MEMBER(metlclsh_ack_nmi); DECLARE_WRITE8_MEMBER(metlclsh_cause_nmi2); diff --git a/src/mame/includes/mexico86.h b/src/mame/includes/mexico86.h index 94c60a8c0d1..b0fbb4564a4 100644 --- a/src/mame/includes/mexico86.h +++ b/src/mame/includes/mexico86.h @@ -6,7 +6,10 @@ public: : driver_device(mconfig, type, tag) , m_objectram(*this, "objectram"), m_protection_ram(*this, "protection_ram"), - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_objectram; @@ -32,9 +35,9 @@ public: int m_coin_last; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; device_t *m_mcu; /* queue */ diff --git a/src/mame/includes/mikie.h b/src/mame/includes/mikie.h index 4b39a4915be..55b2dd22aee 100644 --- a/src/mame/includes/mikie.h +++ b/src/mame/includes/mikie.h @@ -11,7 +11,9 @@ public: : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram"), m_colorram(*this, "colorram"), - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -26,8 +28,8 @@ public: int m_last_irq; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; UINT8 m_irq_mask; DECLARE_READ8_MEMBER(mikie_sh_timer_r); diff --git a/src/mame/includes/moo.h b/src/mame/includes/moo.h index dfedc6008a6..5021837b9e2 100644 --- a/src/mame/includes/moo.h +++ b/src/mame/includes/moo.h @@ -10,7 +10,9 @@ public: moo_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_workram(*this, "workram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu"){ } /* memory pointers */ optional_shared_ptr m_workram; @@ -29,8 +31,8 @@ public: UINT16 m_cur_control2; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_soundcpu; device_t *m_k054539; device_t *m_k053246; device_t *m_k053251; diff --git a/src/mame/includes/mouser.h b/src/mame/includes/mouser.h index 7357be6aef8..432b4f0dfe5 100644 --- a/src/mame/includes/mouser.h +++ b/src/mame/includes/mouser.h @@ -11,7 +11,9 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -23,8 +25,8 @@ public: UINT8 m_nmi_enable; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(mouser_nmi_enable_w); DECLARE_WRITE8_MEMBER(mouser_sound_interrupt_w); DECLARE_READ8_MEMBER(mouser_sound_byte_r); diff --git a/src/mame/includes/mrflea.h b/src/mame/includes/mrflea.h index b0dc2f586b5..39c616b0fb9 100644 --- a/src/mame/includes/mrflea.h +++ b/src/mame/includes/mrflea.h @@ -10,7 +10,9 @@ public: mrflea_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -27,8 +29,8 @@ public: int m_select1; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_subcpu; DECLARE_WRITE8_MEMBER(mrflea_main_w); DECLARE_WRITE8_MEMBER(mrflea_io_w); DECLARE_READ8_MEMBER(mrflea_main_r); diff --git a/src/mame/includes/msisaac.h b/src/mame/includes/msisaac.h index 3c90cbb97b1..9d4aa618936 100644 --- a/src/mame/includes/msisaac.h +++ b/src/mame/includes/msisaac.h @@ -9,7 +9,8 @@ public: m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), m_videoram3(*this, "videoram3"), - m_videoram2(*this, "videoram2"){ } + m_videoram2(*this, "videoram2"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -42,7 +43,7 @@ public: UINT8 m_snd_ctrl3; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(nmi_disable_w); DECLARE_WRITE8_MEMBER(nmi_enable_w); diff --git a/src/mame/includes/mugsmash.h b/src/mame/includes/mugsmash.h index f306a9b0835..1dace4a1a92 100644 --- a/src/mame/includes/mugsmash.h +++ b/src/mame/includes/mugsmash.h @@ -8,7 +8,9 @@ public: m_videoram2(*this, "videoram2"), m_regs1(*this, "regs1"), m_regs2(*this, "regs2"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } required_shared_ptr m_videoram1; required_shared_ptr m_videoram2; @@ -19,8 +21,8 @@ public: tilemap_t *m_tilemap1; tilemap_t *m_tilemap2; - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(mugsmash_reg2_w); DECLARE_READ16_MEMBER(mugsmash_input_ports_r); DECLARE_WRITE16_MEMBER(mugsmash_videoram1_w); diff --git a/src/mame/includes/munchmo.h b/src/mame/includes/munchmo.h index 07046e73926..5fde85e2f83 100644 --- a/src/mame/includes/munchmo.h +++ b/src/mame/includes/munchmo.h @@ -14,7 +14,9 @@ public: m_sprite_attr(*this, "sprite_attr"), m_videoram(*this, "videoram"), m_status_vram(*this, "status_vram"), - m_vreg(*this, "vreg"){ } + m_vreg(*this, "vreg"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_sprite_xpos; @@ -33,8 +35,8 @@ public: int m_nmi_enable; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(mnchmobl_nmi_enable_w); DECLARE_WRITE8_MEMBER(mnchmobl_soundlatch_w); DECLARE_WRITE8_MEMBER(sound_nmi_ack_w); diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h index d54115d312b..d3fbc616b1b 100644 --- a/src/mame/includes/n8080.h +++ b/src/mame/includes/n8080.h @@ -5,7 +5,8 @@ public: n8080_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"){ } + m_colorram(*this, "colorram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -39,7 +40,7 @@ public: int m_inte; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(n8080_shift_bits_w); DECLARE_WRITE8_MEMBER(n8080_shift_data_w); DECLARE_READ8_MEMBER(n8080_shift_r); diff --git a/src/mame/includes/nemesis.h b/src/mame/includes/nemesis.h index aae745163cd..a58feebba3b 100644 --- a/src/mame/includes/nemesis.h +++ b/src/mame/includes/nemesis.h @@ -14,7 +14,9 @@ public: m_colorram2(*this, "colorram2"), m_spriteram(*this, "spriteram"), m_paletteram(*this, "paletteram"), - m_gx400_shared_ram(*this, "gx400_shared"){ } + m_gx400_shared_ram(*this, "gx400_shared"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_charram; @@ -49,8 +51,8 @@ public: UINT8 m_frame_counter; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_vlm; DECLARE_WRITE16_MEMBER(gx400_irq1_enable_word_w); DECLARE_WRITE16_MEMBER(gx400_irq2_enable_word_w); diff --git a/src/mame/includes/ninjaw.h b/src/mame/includes/ninjaw.h index e96e332764f..85347a54df6 100644 --- a/src/mame/includes/ninjaw.h +++ b/src/mame/includes/ninjaw.h @@ -12,7 +12,10 @@ class ninjaw_state : public driver_device public: ninjaw_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -23,9 +26,9 @@ public: int m_pandata[4]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; tc0140syt_device *m_tc0140syt; device_t *m_tc0100scn_1; device_t *m_tc0100scn_2; diff --git a/src/mame/includes/nitedrvr.h b/src/mame/includes/nitedrvr.h index 4f3f1eb1a7b..fe6dfb7eb02 100644 --- a/src/mame/includes/nitedrvr.h +++ b/src/mame/includes/nitedrvr.h @@ -22,6 +22,7 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_hvc(*this, "hvc"), + m_maincpu(*this, "maincpu"), m_discrete(*this, "discrete"){ } /* memory pointers */ @@ -43,7 +44,7 @@ public: INT32 m_last_steering_val; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; required_device m_discrete; DECLARE_READ8_MEMBER(nitedrvr_steering_reset_r); DECLARE_WRITE8_MEMBER(nitedrvr_steering_reset_w); diff --git a/src/mame/includes/nycaptor.h b/src/mame/includes/nycaptor.h index 0c0e1a223ea..80d1776bb8f 100644 --- a/src/mame/includes/nycaptor.h +++ b/src/mame/includes/nycaptor.h @@ -6,7 +6,10 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_scrlram(*this, "scrlram"), - m_sharedram(*this, "sharedram"){ } + m_sharedram(*this, "sharedram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -46,9 +49,9 @@ public: int m_mask; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(sub_cpu_halt_w); DECLARE_READ8_MEMBER(from_snd_r); diff --git a/src/mame/includes/ojankohs.h b/src/mame/includes/ojankohs.h index ccb43efc03f..5f6d27ac7bb 100644 --- a/src/mame/includes/ojankohs.h +++ b/src/mame/includes/ojankohs.h @@ -11,7 +11,8 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ optional_shared_ptr m_videoram; @@ -35,7 +36,7 @@ public: int m_vclk_left; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_msm; DECLARE_WRITE8_MEMBER(ojankohs_rombank_w); DECLARE_WRITE8_MEMBER(ojankoy_rombank_w); diff --git a/src/mame/includes/oneshot.h b/src/mame/includes/oneshot.h index 35bf78a971b..63823c82d9b 100644 --- a/src/mame/includes/oneshot.h +++ b/src/mame/includes/oneshot.h @@ -8,7 +8,9 @@ public: m_bg_videoram(*this, "bg_videoram"), m_mid_videoram(*this, "mid_videoram"), m_fg_videoram(*this, "fg_videoram"), - m_scroll(*this, "scroll"){ } + m_scroll(*this, "scroll"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_sprites; @@ -32,8 +34,8 @@ public: int m_p2_wobble; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_READ16_MEMBER(oneshot_in0_word_r); DECLARE_READ16_MEMBER(oneshot_gun_x_p1_r); DECLARE_READ16_MEMBER(oneshot_gun_y_p1_r); diff --git a/src/mame/includes/opwolf.h b/src/mame/includes/opwolf.h index e69dd22fc2a..ee35ad06516 100644 --- a/src/mame/includes/opwolf.h +++ b/src/mame/includes/opwolf.h @@ -9,7 +9,9 @@ class opwolf_state : public driver_device public: opwolf_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_cchip_ram(*this, "cchip_ram"){ } + m_cchip_ram(*this, "cchip_ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ optional_shared_ptr m_cchip_ram; @@ -44,8 +46,8 @@ public: UINT8 m_c58a; // These variables derived from the bootleg /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_pc080sn; device_t *m_pc090oj; device_t *m_msm1; diff --git a/src/mame/includes/orbit.h b/src/mame/includes/orbit.h index 97b95b437b2..58a87720851 100644 --- a/src/mame/includes/orbit.h +++ b/src/mame/includes/orbit.h @@ -22,7 +22,8 @@ public: : driver_device(mconfig, type, tag) , m_playfield_ram(*this, "playfield_ram"), m_sprite_ram(*this, "sprite_ram"), - m_discrete(*this, "discrete"){ } + m_discrete(*this, "discrete"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_playfield_ram; @@ -38,7 +39,7 @@ public: UINT8 m_misc_flags; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(orbit_misc_w); DECLARE_WRITE8_MEMBER(orbit_playfield_w); TILE_GET_INFO_MEMBER(get_tile_info); diff --git a/src/mame/includes/othunder.h b/src/mame/includes/othunder.h index c305cc65cce..432a5a3bb9b 100644 --- a/src/mame/includes/othunder.h +++ b/src/mame/includes/othunder.h @@ -24,7 +24,9 @@ class othunder_state : public driver_device public: othunder_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_spriteram(*this,"spriteram") { } + m_spriteram(*this,"spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ required_shared_ptr m_spriteram; @@ -39,8 +41,8 @@ public: int m_pan[4]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; eeprom_device *m_eeprom; device_t *m_tc0220ioc; device_t *m_tc0100scn; diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h index e603bca5163..d2d733dacd5 100644 --- a/src/mame/includes/overdriv.h +++ b/src/mame/includes/overdriv.h @@ -8,7 +8,10 @@ class overdriv_state : public driver_device { public: overdriv_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT16 * m_paletteram; // currently this uses generic palette handling @@ -22,9 +25,9 @@ public: UINT16 m_cpuB_ctrl; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_subcpu; + required_device m_audiocpu; device_t *m_k053260_1; device_t *m_k053260_2; device_t *m_k051316_1; diff --git a/src/mame/includes/pandoras.h b/src/mame/includes/pandoras.h index f76b1ce52df..4408094589d 100644 --- a/src/mame/includes/pandoras.h +++ b/src/mame/includes/pandoras.h @@ -11,7 +11,11 @@ public: : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram"), m_colorram(*this, "colorram"), - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_subcpu(*this, "sub"), + m_audiocpu(*this, "audiocpu"), + m_mcu(*this, "mcu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -29,10 +33,10 @@ public: int m_i8039_status; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_subcpu; - cpu_device *m_audiocpu; - cpu_device *m_mcu; + required_device m_maincpu; + required_device m_subcpu; + required_device m_audiocpu; + required_device m_mcu; DECLARE_WRITE8_MEMBER(pandoras_int_control_w); DECLARE_WRITE8_MEMBER(pandoras_cpua_irqtrigger_w); DECLARE_WRITE8_MEMBER(pandoras_cpub_irqtrigger_w); diff --git a/src/mame/includes/parodius.h b/src/mame/includes/parodius.h index 5a1515666f3..1ac0034f28e 100644 --- a/src/mame/includes/parodius.h +++ b/src/mame/includes/parodius.h @@ -9,7 +9,9 @@ class parodius_state : public driver_device public: parodius_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_ram; @@ -25,8 +27,8 @@ public: //int m_nmi_enabled; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k053260; device_t *m_k052109; device_t *m_k053245; diff --git a/src/mame/includes/pbaction.h b/src/mame/includes/pbaction.h index 0a5c0ea3fc2..80b077a1152 100644 --- a/src/mame/includes/pbaction.h +++ b/src/mame/includes/pbaction.h @@ -14,7 +14,9 @@ public: m_colorram(*this, "colorram"), m_colorram2(*this, "colorram2"), m_work_ram(*this, "work_ram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -31,8 +33,8 @@ public: int m_scroll; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; UINT8 m_nmi_mask; DECLARE_WRITE8_MEMBER(pbaction_sh_command_w); diff --git a/src/mame/includes/pgm.h b/src/mame/includes/pgm.h index 8d47bee5fff..0d7302f20ae 100644 --- a/src/mame/includes/pgm.h +++ b/src/mame/includes/pgm.h @@ -18,7 +18,9 @@ public: m_videoregs(*this, "videoregs"), m_videoram(*this, "videoram"), m_z80_mainram(*this, "z80_mainram"), - m_mainram(*this, "sram") + m_mainram(*this, "sram"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu") { m_irq4_disabled = 0; } @@ -43,8 +45,8 @@ public: bitmap_rgb32 m_tmppgmbitmap; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_soundcpu; + required_device m_maincpu; + required_device m_soundcpu; device_t *m_ics; /* used by rendering */ @@ -179,7 +181,8 @@ class pgm_arm_type1_state : public pgm_state public: pgm_arm_type1_state(const machine_config &mconfig, device_type type, const char *tag) : pgm_state(mconfig, type, tag), - m_arm7_shareram(*this, "arm7_shareram") { + m_arm7_shareram(*this, "arm7_shareram"), + m_prot(*this, "prot") { m_curslots = 0; m_puzzli_54_trigger = 0; } @@ -216,7 +219,7 @@ public: UINT32 m_pgm_arm_type1_counter; optional_shared_ptr m_arm7_shareram; - cpu_device *m_prot; + required_device m_prot; DECLARE_DRIVER_INIT(photoy2k); DECLARE_DRIVER_INIT(kovsh); @@ -273,7 +276,8 @@ public: pgm_arm_type2_state(const machine_config &mconfig, device_type type, const char *tag) : pgm_state(mconfig, type, tag), m_arm_ram(*this, "arm_ram"), - m_arm7_shareram(*this, "arm7_shareram") { + m_arm7_shareram(*this, "arm7_shareram"), + m_prot(*this, "prot") { } // kov2 UINT32 m_kov2_latchdata_68k_w; @@ -282,7 +286,7 @@ public: required_shared_ptr m_arm_ram; required_shared_ptr m_arm7_shareram; - cpu_device *m_prot; + required_device m_prot; DECLARE_DRIVER_INIT(kov2); DECLARE_DRIVER_INIT(kov2p); @@ -315,7 +319,8 @@ class pgm_arm_type3_state : public pgm_state public: pgm_arm_type3_state(const machine_config &mconfig, device_type type, const char *tag) : pgm_state(mconfig, type, tag), - m_arm_ram(*this, "arm_ram") { + m_arm_ram(*this, "arm_ram"), + m_prot(*this, "prot") { } // svg int m_svg_ram_sel; @@ -325,7 +330,7 @@ public: UINT32 m_svg_latchdata_arm_w; required_shared_ptr m_arm_ram; - cpu_device *m_prot; + required_device m_prot; DECLARE_DRIVER_INIT(theglad); DECLARE_DRIVER_INIT(svg); diff --git a/src/mame/includes/pktgaldx.h b/src/mame/includes/pktgaldx.h index 944f4f8c98c..0905fe8ea93 100644 --- a/src/mame/includes/pktgaldx.h +++ b/src/mame/includes/pktgaldx.h @@ -16,7 +16,8 @@ public: m_spriteram(*this, "spriteram"), m_pktgaldb_fgram(*this, "pktgaldb_fgram"), m_pktgaldb_sprites(*this, "pktgaldb_spr"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu") { } /* memory pointers */ @@ -30,7 +31,7 @@ public: optional_device m_sprgen; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_deco_tilegen1; DECLARE_READ16_MEMBER(pckgaldx_unknown_r); DECLARE_READ16_MEMBER(pckgaldx_protection_r); diff --git a/src/mame/includes/pooyan.h b/src/mame/includes/pooyan.h index d7b8189f177..98e8263fe97 100644 --- a/src/mame/includes/pooyan.h +++ b/src/mame/includes/pooyan.h @@ -6,7 +6,8 @@ public: m_colorram(*this, "colorram"), m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), - m_spriteram2(*this, "spriteram2"){ } + m_spriteram2(*this, "spriteram2"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_colorram; @@ -22,7 +23,7 @@ public: UINT8 m_irq_enable; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(irq_enable_w); DECLARE_WRITE8_MEMBER(pooyan_videoram_w); DECLARE_WRITE8_MEMBER(pooyan_colorram_w); diff --git a/src/mame/includes/popper.h b/src/mame/includes/popper.h index 93b44869f94..77e69bf3784 100644 --- a/src/mame/includes/popper.h +++ b/src/mame/includes/popper.h @@ -13,7 +13,8 @@ public: m_videoram(*this, "videoram"), m_ol_attribram(*this, "ol_attribram"), m_attribram(*this, "attribram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_ol_videoram; @@ -33,7 +34,7 @@ public: rectangle m_tilemap_clip; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; UINT8 m_nmi_mask; DECLARE_READ8_MEMBER(popper_input_ports_r); diff --git a/src/mame/includes/psikyo.h b/src/mame/includes/psikyo.h index 80ed299368f..08ac3b698bf 100644 --- a/src/mame/includes/psikyo.h +++ b/src/mame/includes/psikyo.h @@ -13,7 +13,8 @@ public: m_vram_0(*this, "vram_0"), m_vram_1(*this, "vram_1"), m_vregs(*this, "vregs"), - m_bootleg_spritebuffer(*this, "boot_spritebuf"){ } + m_bootleg_spritebuffer(*this, "boot_spritebuf"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -44,7 +45,7 @@ public: int m_mcu_status; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; /* game-specific */ // 1945 MCU diff --git a/src/mame/includes/psikyo4.h b/src/mame/includes/psikyo4.h index 7f97e9fe39c..9480e673181 100644 --- a/src/mame/includes/psikyo4.h +++ b/src/mame/includes/psikyo4.h @@ -18,7 +18,8 @@ public: m_bgpen_2(*this, "bgpen_2"), m_paletteram(*this, "paletteram"), m_io_select(*this, "io_select"), - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -34,7 +35,7 @@ public: double m_oldbrt2; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE32_MEMBER(ps4_paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w); DECLARE_WRITE32_MEMBER(ps4_bgpen_1_dword_w); DECLARE_WRITE32_MEMBER(ps4_bgpen_2_dword_w); diff --git a/src/mame/includes/psikyosh.h b/src/mame/includes/psikyosh.h index 041fa02123f..641fe2c93c6 100644 --- a/src/mame/includes/psikyosh.h +++ b/src/mame/includes/psikyosh.h @@ -27,7 +27,8 @@ public: m_paletteram(*this, "paletteram"), m_zoomram(*this, "zoomram"), m_vidregs(*this, "vidregs"), - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_device m_spriteram; @@ -45,7 +46,7 @@ public: UINT8 m_alphatable[256]; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE32_MEMBER(psikyosh_irqctrl_w); DECLARE_WRITE32_MEMBER(paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w); diff --git a/src/mame/includes/pushman.h b/src/mame/includes/pushman.h index cdd7db6f509..09145b2adef 100644 --- a/src/mame/includes/pushman.h +++ b/src/mame/includes/pushman.h @@ -10,7 +10,9 @@ public: pushman_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram"), - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -28,8 +30,8 @@ public: UINT16 m_new_latch; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_mcu; DECLARE_WRITE16_MEMBER(pushman_flipscreen_w); DECLARE_WRITE16_MEMBER(pushman_control_w); diff --git a/src/mame/includes/rainbow.h b/src/mame/includes/rainbow.h index 63df8389f7a..8c82b168190 100644 --- a/src/mame/includes/rainbow.h +++ b/src/mame/includes/rainbow.h @@ -9,7 +9,9 @@ class rbisland_state : public driver_device public: rbisland_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ optional_shared_ptr m_spriteram; @@ -28,8 +30,8 @@ public: UINT8 m_current_bank; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_pc080sn; device_t *m_pc090oj; DECLARE_WRITE16_MEMBER(jumping_sound_w); diff --git a/src/mame/includes/rallyx.h b/src/mame/includes/rallyx.h index 5142dcaa220..b861b8f35a9 100644 --- a/src/mame/includes/rallyx.h +++ b/src/mame/includes/rallyx.h @@ -13,7 +13,8 @@ public: rallyx_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_videoram(*this, "videoram"), - m_radarattr(*this, "radarattr") { } + m_radarattr(*this, "radarattr"), + m_maincpu(*this, "maincpu") { } /* memory pointers */ required_shared_ptr m_videoram; @@ -36,7 +37,7 @@ public: struct jungler_star m_stars[JUNGLER_MAX_STARS]; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; samples_device *m_samples; UINT8 m_main_irq_mask; diff --git a/src/mame/includes/rastan.h b/src/mame/includes/rastan.h index bf545e80336..d0f02da3ae8 100644 --- a/src/mame/includes/rastan.h +++ b/src/mame/includes/rastan.h @@ -8,7 +8,9 @@ class rastan_state : public driver_device { public: rastan_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT16 * paletteram; // this currently uses generic palette handlers @@ -22,8 +24,8 @@ public: int m_adpcm_data; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_pc090oj; device_t *m_pc080sn; DECLARE_WRITE8_MEMBER(rastan_msm5205_address_w); diff --git a/src/mame/includes/rltennis.h b/src/mame/includes/rltennis.h index a851409f32e..003ba9292b9 100644 --- a/src/mame/includes/rltennis.h +++ b/src/mame/includes/rltennis.h @@ -9,10 +9,11 @@ class rltennis_state : public driver_device public: rltennis_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), m_data760000(0), m_data740000(0), m_dac_counter(0), m_sample_rom_offset_1(0), m_sample_rom_offset_2(0), m_offset_shift(0){ } - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_screen; UINT16 m_blitter[RLT_NUM_BLITTER_REGS]; diff --git a/src/mame/includes/rockrage.h b/src/mame/includes/rockrage.h index 4137230d67d..1c8e2c21938 100644 --- a/src/mame/includes/rockrage.h +++ b/src/mame/includes/rockrage.h @@ -9,7 +9,8 @@ class rockrage_state : public driver_device public: rockrage_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_paletteram(*this, "paletteram"){ } + m_paletteram(*this, "paletteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_paletteram; @@ -19,7 +20,7 @@ public: int m_vreg; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k007342; device_t *m_k007420; DECLARE_WRITE8_MEMBER(rockrage_bankswitch_w); diff --git a/src/mame/includes/rollerg.h b/src/mame/includes/rollerg.h index c4c972132a1..174e2cf14f2 100644 --- a/src/mame/includes/rollerg.h +++ b/src/mame/includes/rollerg.h @@ -8,7 +8,9 @@ class rollerg_state : public driver_device { public: rollerg_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT8 * m_paletteram; // currently this uses generic palette handling @@ -21,8 +23,8 @@ public: int m_readzoomroms; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k053260; device_t *m_k053244; device_t *m_k051316; diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index bb6bdae3c02..e913cab7887 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -10,7 +10,9 @@ public: rungun_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_sysreg(*this, "sysreg"), - m_936_videoram(*this, "936_videoram"){ } + m_936_videoram(*this, "936_videoram"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu"){ } /* memory pointers */ required_shared_ptr m_sysreg; @@ -29,8 +31,8 @@ public: int m_sound_status; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_soundcpu; device_t *m_k054539_1; device_t *m_k054539_2; device_t *m_k053936; diff --git a/src/mame/includes/sf.h b/src/mame/includes/sf.h index bc0827787fb..7067abb6b67 100644 --- a/src/mame/includes/sf.h +++ b/src/mame/includes/sf.h @@ -10,7 +10,9 @@ public: sf_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), - m_objectram(*this, "objectram"){ } + m_objectram(*this, "objectram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -26,8 +28,8 @@ public: UINT16 m_fgscroll; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; DECLARE_READ16_MEMBER(dummy_r); DECLARE_WRITE16_MEMBER(sf_coin_w); DECLARE_WRITE16_MEMBER(soundcmd_w); diff --git a/src/mame/includes/simpsons.h b/src/mame/includes/simpsons.h index 0dbc96a3e22..9dee6a6ecb0 100644 --- a/src/mame/includes/simpsons.h +++ b/src/mame/includes/simpsons.h @@ -3,7 +3,9 @@ class simpsons_state : public driver_device { public: simpsons_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ UINT8 * m_ram; @@ -22,8 +24,8 @@ public: //int m_nmi_enabled; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k053260; device_t *m_k052109; device_t *m_k053246; diff --git a/src/mame/includes/skyfox.h b/src/mame/includes/skyfox.h index 9ea72fe9782..308669a4d25 100644 --- a/src/mame/includes/skyfox.h +++ b/src/mame/includes/skyfox.h @@ -9,7 +9,8 @@ class skyfox_state : public driver_device public: skyfox_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -23,7 +24,7 @@ public: int m_palette_selected; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_READ8_MEMBER(skyfox_vregs_r); DECLARE_WRITE8_MEMBER(skyfox_vregs_w); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); diff --git a/src/mame/includes/slapshot.h b/src/mame/includes/slapshot.h index b9639486d82..b22e3a71b75 100644 --- a/src/mame/includes/slapshot.h +++ b/src/mame/includes/slapshot.h @@ -23,7 +23,9 @@ public: : driver_device(mconfig, type, tag), m_color_ram(*this,"color_ram"), m_spriteram(*this,"spriteram"), - m_spriteext(*this,"spriteext") { } + m_spriteext(*this,"spriteext"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ required_shared_ptr m_color_ram; @@ -49,8 +51,8 @@ public: INT32 m_banknum; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; tc0140syt_device *m_tc0140syt; device_t *m_tc0480scp; device_t *m_tc0360pri; diff --git a/src/mame/includes/sonson.h b/src/mame/includes/sonson.h index 9dc39344027..449388f7693 100644 --- a/src/mame/includes/sonson.h +++ b/src/mame/includes/sonson.h @@ -11,7 +11,8 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -25,7 +26,7 @@ public: int m_last_irq; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE8_MEMBER(sonson_sh_irqtrigger_w); DECLARE_WRITE8_MEMBER(sonson_coin1_counter_w); DECLARE_WRITE8_MEMBER(sonson_coin2_counter_w); diff --git a/src/mame/includes/spy.h b/src/mame/includes/spy.h index 5541ac6ef33..441304ae2cd 100644 --- a/src/mame/includes/spy.h +++ b/src/mame/includes/spy.h @@ -9,7 +9,9 @@ class spy_state : public driver_device public: spy_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_ram; @@ -27,8 +29,8 @@ public: int m_old_3f90; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232_1; device_t *m_k007232_2; device_t *m_k052109; diff --git a/src/mame/includes/supbtime.h b/src/mame/includes/supbtime.h index 1d16f005027..864d91fbcac 100644 --- a/src/mame/includes/supbtime.h +++ b/src/mame/includes/supbtime.h @@ -14,7 +14,9 @@ public: m_spriteram(*this, "spriteram"), m_pf1_rowscroll(*this, "pf1_rowscroll"), m_pf2_rowscroll(*this, "pf2_rowscroll"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -27,8 +29,8 @@ public: /* video-related */ /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_deco_tilegen1; DECLARE_READ16_MEMBER(supbtime_controls_r); DECLARE_WRITE16_MEMBER(sound_w); diff --git a/src/mame/includes/suprslam.h b/src/mame/includes/suprslam.h index 601c0d8bb83..f3fd334ffc7 100644 --- a/src/mame/includes/suprslam.h +++ b/src/mame/includes/suprslam.h @@ -15,7 +15,8 @@ public: m_spriteram(*this, "spriteram"), m_spr_ctrl(*this, "spr_ctrl"), m_screen_vregs(*this, "screen_vregs"), - m_spr(*this, "vsystem_spr") + m_spr(*this, "vsystem_spr"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -39,7 +40,7 @@ public: int m_pending_command; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_k053936; DECLARE_WRITE16_MEMBER(sound_command_w); DECLARE_READ16_MEMBER(pending_command_r); diff --git a/src/mame/includes/surpratk.h b/src/mame/includes/surpratk.h index 6bc9f19b90e..69b38c87b00 100644 --- a/src/mame/includes/surpratk.h +++ b/src/mame/includes/surpratk.h @@ -9,7 +9,8 @@ class surpratk_state : public driver_device public: surpratk_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_ram; @@ -24,7 +25,7 @@ public: int m_videobank; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_k052109; device_t *m_k053244; device_t *m_k053251; diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index 483a32a5d9d..3a4066f5544 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -15,7 +15,9 @@ public: m_tileram(*this, "tileram"), m_goldnaxeb2_bgpage(*this, "gab2_bgpage"), m_goldnaxeb2_fgpage(*this, "gab2_fgpage"), - m_sprites(*this, "sprites") + m_sprites(*this, "sprites"), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu") { } required_shared_ptr m_textram; @@ -108,8 +110,8 @@ public: UINT8 *m_decrypted_region; // goldnaxeb1 & bayrouteb1 /* devices */ - cpu_device *m_maincpu; - cpu_device *m_soundcpu; + required_device m_maincpu; + required_device m_soundcpu; DECLARE_WRITE16_MEMBER(sound_command_nmi_w); DECLARE_WRITE16_MEMBER(sound_command_w); DECLARE_WRITE16_MEMBER(sys16_coinctrl_w); diff --git a/src/mame/includes/tail2nos.h b/src/mame/includes/tail2nos.h index 5c5d488828d..9a4065d47c9 100644 --- a/src/mame/includes/tail2nos.h +++ b/src/mame/includes/tail2nos.h @@ -10,7 +10,9 @@ public: tail2nos_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_bgvideoram(*this, "bgvideoram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_bgvideoram; @@ -25,8 +27,8 @@ public: int m_video_enable; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k051316; DECLARE_WRITE16_MEMBER(sound_command_w); DECLARE_WRITE16_MEMBER(tail2nos_bgvideoram_w); diff --git a/src/mame/includes/taito_b.h b/src/mame/includes/taito_b.h index 801887b4426..952aa8aa9f1 100644 --- a/src/mame/includes/taito_b.h +++ b/src/mame/includes/taito_b.h @@ -5,7 +5,9 @@ public: taitob_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram"), - m_pixelram(*this, "pixelram"){ } + m_pixelram(*this, "pixelram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -30,8 +32,8 @@ public: UINT16 m_realpunc_video_ctrl; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_mb87078; device_t *m_ym; device_t *m_tc0180vcu; diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index 0eaea47759f..26f589e973c 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -18,6 +18,8 @@ public: m_sprite_extension(*this, "sprite_ext"), m_spriteram(*this, "spriteram"), m_cchip2_ram(*this, "cchip2_ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), m_oki(*this, "oki") { } /* memory pointers */ @@ -71,8 +73,8 @@ public: INT32 m_oki_bank; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; optional_device m_oki; device_t *m_tc0100scn; device_t *m_tc0100scn_1; diff --git a/src/mame/includes/taito_h.h b/src/mame/includes/taito_h.h index 4b5078a27d3..ef5af705af8 100644 --- a/src/mame/includes/taito_h.h +++ b/src/mame/includes/taito_h.h @@ -9,7 +9,9 @@ class taitoh_state : public driver_device public: taitoh_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_m68000_mainram(*this, "m68000_mainram"){ } + m_m68000_mainram(*this, "m68000_mainram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_m68000_mainram; @@ -19,8 +21,8 @@ public: INT32 m_banknum; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_tc0080vco; device_t *m_tc0220ioc; DECLARE_READ8_MEMBER(syvalion_input_bypass_r); diff --git a/src/mame/includes/taito_l.h b/src/mame/includes/taito_l.h index 774f4eea35f..8777ec42cf4 100644 --- a/src/mame/includes/taito_l.h +++ b/src/mame/includes/taito_l.h @@ -5,7 +5,9 @@ class taitol_state : public driver_device { public: taitol_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ UINT8 * m_shared_ram; @@ -52,8 +54,8 @@ public: const char *m_portf1_tag; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; /* memory buffers */ UINT8 m_rambanks[0x1000 * 12]; diff --git a/src/mame/includes/taito_o.h b/src/mame/includes/taito_o.h index 43b6ef839c6..dddb1a611ee 100644 --- a/src/mame/includes/taito_o.h +++ b/src/mame/includes/taito_o.h @@ -8,13 +8,14 @@ class taitoo_state : public driver_device { public: taitoo_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu") { } /* memory pointers */ // UINT16 * paletteram; // currently this uses generic palette handling /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; device_t *m_tc0080vco; DECLARE_WRITE16_MEMBER(io_w); DECLARE_READ16_MEMBER(io_r); diff --git a/src/mame/includes/taito_z.h b/src/mame/includes/taito_z.h index a47d4f7b465..ec0b262f6f0 100644 --- a/src/mame/includes/taito_z.h +++ b/src/mame/includes/taito_z.h @@ -13,7 +13,10 @@ class taitoz_state : public driver_device public: taitoz_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_spriteram(*this, "spriteram") + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub") { } /* memory pointers */ @@ -31,9 +34,9 @@ public: UINT16 m_eep_latch; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; eeprom_device *m_eeprom; device_t *m_tc0480scp; device_t *m_tc0150rod; diff --git a/src/mame/includes/taitoair.h b/src/mame/includes/taitoair.h index 00c9ba582a5..c1103c2e714 100644 --- a/src/mame/includes/taitoair.h +++ b/src/mame/includes/taitoair.h @@ -26,6 +26,7 @@ public: m_line_ram(*this, "line_ram"), m_dsp_ram(*this, "dsp_ram"), m_paletteram(*this, "paletteram"), + m_audiocpu(*this, "audiocpu"), m_gradram(*this, "gradram"), m_backregs(*this, "backregs") { } @@ -43,7 +44,7 @@ public: INT32 m_banknum; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; device_t *m_dsp; device_t *m_tc0080vco; diff --git a/src/mame/includes/thunderx.h b/src/mame/includes/thunderx.h index 65bbab78e71..7f6e601b58f 100644 --- a/src/mame/includes/thunderx.h +++ b/src/mame/includes/thunderx.h @@ -9,7 +9,9 @@ class thunderx_state : public driver_device public: thunderx_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_ram(*this, "ram"){ } + m_ram(*this, "ram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_ram; @@ -28,8 +30,8 @@ public: int m_pmcbank; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h index fd58fce51be..7dd6dba404a 100644 --- a/src/mame/includes/tmnt.h +++ b/src/mame/includes/tmnt.h @@ -8,7 +8,9 @@ public: m_spriteram(*this, "spriteram"), m_tmnt2_rom(*this, "tmnt2_rom"), m_sunset_104000(*this, "sunset_104000"), - m_tmnt2_1c0800(*this, "tmnt2_1c0800"){ } + m_tmnt2_1c0800(*this, "tmnt2_1c0800"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ optional_shared_ptr m_spriteram; @@ -47,8 +49,8 @@ public: UINT16 m_cuebrick_nvram[0x400 * 0x20]; // 32k paged in a 1k window /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k007232; device_t *m_k053260; device_t *m_k054539; diff --git a/src/mame/includes/tnzs.h b/src/mame/includes/tnzs.h index 74fd964e019..4a507353fd3 100644 --- a/src/mame/includes/tnzs.h +++ b/src/mame/includes/tnzs.h @@ -19,7 +19,9 @@ class tnzs_state : public driver_device { public: tnzs_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub") { } /* memory pointers */ // UINT8 * m_paletteram; // currently this uses generic palette handling @@ -52,8 +54,8 @@ public: UINT8* m_ROM; /* devices */ - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_audiocpu; + required_device m_subcpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(tnzsb_sound_command_w); DECLARE_WRITE8_MEMBER(jpopnics_palette_w); diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h index c87c95671e0..94ccda0af2d 100644 --- a/src/mame/includes/topspeed.h +++ b/src/mame/includes/topspeed.h @@ -12,7 +12,10 @@ public: m_spritemap(*this, "spritemap"), m_raster_ctrl(*this, "raster_ctrl"), m_spriteram(*this, "spriteram"), - m_sharedram(*this, "sharedram") + m_sharedram(*this, "sharedram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "subcpu") { } /* memory pointers */ @@ -35,9 +38,9 @@ public: INT32 m_banknum; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; device_t *m_pc080sn_1; device_t *m_pc080sn_2; device_t *m_tc0220ioc; diff --git a/src/mame/includes/tp84.h b/src/mame/includes/tp84.h index 9c40c149e3d..79fb4407ce9 100644 --- a/src/mame/includes/tp84.h +++ b/src/mame/includes/tp84.h @@ -2,7 +2,8 @@ class tp84_state : public driver_device { public: tp84_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) , + : driver_device(mconfig, type, tag), + m_audiocpu(*this, "audiocpu"), m_palette_bank(*this, "palette_bank"), m_flipscreen_x(*this, "flipscreen_x"), m_flipscreen_y(*this, "flipscreen_y"), @@ -14,7 +15,7 @@ public: m_fg_colorram(*this, "fg_colorram"), m_spriteram(*this, "spriteram"){ } - cpu_device *m_audiocpu; + required_device m_audiocpu; required_shared_ptr m_palette_bank; required_shared_ptr m_flipscreen_x; required_shared_ptr m_flipscreen_y; diff --git a/src/mame/includes/tumbleb.h b/src/mame/includes/tumbleb.h index bdfa9a07807..77ac2d93dd2 100644 --- a/src/mame/includes/tumbleb.h +++ b/src/mame/includes/tumbleb.h @@ -12,7 +12,9 @@ public: m_pf1_data(*this, "pf1_data"), m_pf2_data(*this, "pf2_data"), m_control(*this, "control"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -39,8 +41,8 @@ public: UINT16 m_tilebank; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_oki; UINT8 m_semicom_prot_offset; UINT16 m_protbase; diff --git a/src/mame/includes/tumblep.h b/src/mame/includes/tumblep.h index f497fd86382..3501fc7b39e 100644 --- a/src/mame/includes/tumblep.h +++ b/src/mame/includes/tumblep.h @@ -14,7 +14,9 @@ public: m_spriteram(*this, "spriteram"), m_pf1_rowscroll(*this, "pf1_rowscroll"), m_pf2_rowscroll(*this, "pf2_rowscroll"), - m_sprgen(*this, "spritegen") + m_sprgen(*this, "spritegen"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ @@ -25,8 +27,8 @@ public: // UINT16 * m_paletteram; // currently this uses generic palette handling (in decocomn.c) /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_deco_tilegen1; DECLARE_READ16_MEMBER(tumblep_prot_r); DECLARE_WRITE16_MEMBER(tumblep_sound_w); diff --git a/src/mame/includes/tutankhm.h b/src/mame/includes/tutankhm.h index 37b08b2df00..75c317cb8d4 100644 --- a/src/mame/includes/tutankhm.h +++ b/src/mame/includes/tutankhm.h @@ -5,7 +5,8 @@ public: : driver_device(mconfig, type, tag) , m_videoram(*this, "videoram"), m_paletteram(*this, "paletteram"), - m_scroll(*this, "scroll"){ } + m_scroll(*this, "scroll"), + m_maincpu(*this, "maincpu"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -22,7 +23,7 @@ public: UINT8 m_irq_enable; /* devices */ - cpu_device *m_maincpu; + required_device m_maincpu; DECLARE_WRITE8_MEMBER(irq_enable_w); DECLARE_WRITE8_MEMBER(tutankhm_bankselect_w); DECLARE_WRITE8_MEMBER(sound_mute_w); diff --git a/src/mame/includes/ultraman.h b/src/mame/includes/ultraman.h index 16c9599c808..be16e2e5fe0 100644 --- a/src/mame/includes/ultraman.h +++ b/src/mame/includes/ultraman.h @@ -8,7 +8,9 @@ class ultraman_state : public driver_device { public: ultraman_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT16 * m_paletteram; // currently this uses generic palette handling @@ -21,8 +23,8 @@ public: int m_bank2; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k051316_1; device_t *m_k051316_2; device_t *m_k051316_3; diff --git a/src/mame/includes/vaportra.h b/src/mame/includes/vaportra.h index c7a95f50838..6d394596ffb 100644 --- a/src/mame/includes/vaportra.h +++ b/src/mame/includes/vaportra.h @@ -11,7 +11,9 @@ class vaportra_state : public driver_device public: vaportra_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_spriteram(*this, "spriteram") { } + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_spriteram(*this, "spriteram") { } /* memory pointers */ UINT16 * m_pf1_rowscroll; @@ -23,8 +25,8 @@ public: UINT16 m_priority[2]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_deco_tilegen1; device_t *m_deco_tilegen2; required_device m_spriteram; diff --git a/src/mame/includes/vendetta.h b/src/mame/includes/vendetta.h index 607a13ffc8b..8e1d2af7a29 100644 --- a/src/mame/includes/vendetta.h +++ b/src/mame/includes/vendetta.h @@ -8,7 +8,9 @@ class vendetta_state : public driver_device { public: vendetta_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ UINT8 * m_ram; @@ -24,8 +26,8 @@ public: offs_t m_video_banking_base; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k053260; device_t *m_k052109; device_t *m_k053246; diff --git a/src/mame/includes/volfied.h b/src/mame/includes/volfied.h index b731bc71a30..ac5fce0e24e 100644 --- a/src/mame/includes/volfied.h +++ b/src/mame/includes/volfied.h @@ -8,7 +8,9 @@ class volfied_state : public driver_device { public: volfied_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ UINT16 * m_video_ram; @@ -26,8 +28,8 @@ public: UINT8 m_current_cmd; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_pc090oj; DECLARE_WRITE16_MEMBER(volfied_cchip_ctrl_w); DECLARE_WRITE16_MEMBER(volfied_cchip_bank_w); diff --git a/src/mame/includes/warriorb.h b/src/mame/includes/warriorb.h index e51afe09582..af7b0571fb8 100644 --- a/src/mame/includes/warriorb.h +++ b/src/mame/includes/warriorb.h @@ -12,7 +12,9 @@ class warriorb_state : public driver_device public: warriorb_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_spriteram; @@ -22,8 +24,8 @@ public: int m_pandata[4]; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; tc0140syt_device *m_tc0140syt; device_t *m_tc0100scn_1; device_t *m_tc0100scn_2; diff --git a/src/mame/includes/wgp.h b/src/mame/includes/wgp.h index dd7d48b92fc..56056517549 100644 --- a/src/mame/includes/wgp.h +++ b/src/mame/includes/wgp.h @@ -15,7 +15,10 @@ public: m_spriteram(*this, "spriteram"), m_pivram(*this, "pivram"), m_piv_ctrlram(*this, "piv_ctrlram"), - m_sharedram(*this, "sharedram"){ } + m_sharedram(*this, "sharedram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_subcpu(*this, "sub"){ } /* memory pointers */ required_shared_ptr m_spritemap; @@ -42,9 +45,9 @@ public: INT32 m_banknum; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; - cpu_device *m_subcpu; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; device_t *m_tc0100scn; tc0140syt_device *m_tc0140syt; DECLARE_READ16_MEMBER(sharedram_r); diff --git a/src/mame/includes/xexex.h b/src/mame/includes/xexex.h index 367bd4b3280..d49abdeddb4 100644 --- a/src/mame/includes/xexex.h +++ b/src/mame/includes/xexex.h @@ -13,7 +13,9 @@ public: xexex_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_workram(*this, "workram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_workram; @@ -36,8 +38,8 @@ public: int m_frame; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k054539; filter_volume_device *m_filter1l; filter_volume_device *m_filter1r; diff --git a/src/mame/includes/xmen.h b/src/mame/includes/xmen.h index 29296a16cfa..851fd2c823e 100644 --- a/src/mame/includes/xmen.h +++ b/src/mame/includes/xmen.h @@ -7,7 +7,9 @@ public: m_xmen6p_spriteramleft(*this, "spriteramleft"), m_xmen6p_spriteramright(*this, "spriteramright"), m_xmen6p_tilemapleft(*this, "tilemapleft"), - m_xmen6p_tilemapright(*this, "tilemapright"){ } + m_xmen6p_tilemapright(*this, "tilemapright"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } /* memory pointers */ // UINT16 * m_paletteram; // currently this uses generic palette handling @@ -31,8 +33,8 @@ public: UINT8 m_vblank_irq_mask; /* devices */ - cpu_device *m_maincpu; - cpu_device *m_audiocpu; + required_device m_maincpu; + required_device m_audiocpu; device_t *m_k054539; device_t *m_k052109; device_t *m_k053246; diff --git a/src/mame/includes/yunsun16.h b/src/mame/includes/yunsun16.h index 3a859bf0de9..a87418175c3 100644 --- a/src/mame/includes/yunsun16.h +++ b/src/mame/includes/yunsun16.h @@ -14,7 +14,8 @@ public: m_scrollram_0(*this, "scrollram_0"), m_scrollram_1(*this, "scrollram_1"), m_priorityram(*this, "priorityram"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_audiocpu(*this, "audiocpu"){ } /* memory pointers */ required_shared_ptr m_vram_0; @@ -32,7 +33,7 @@ public: int m_sprites_scrolldy; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; DECLARE_WRITE16_MEMBER(yunsun16_sound_bank_w); DECLARE_WRITE16_MEMBER(magicbub_sound_command_w); DECLARE_WRITE16_MEMBER(yunsun16_vram_0_w); diff --git a/src/mame/includes/yunsung8.h b/src/mame/includes/yunsung8.h index e50779ec087..c927adc8b01 100644 --- a/src/mame/includes/yunsung8.h +++ b/src/mame/includes/yunsung8.h @@ -8,7 +8,8 @@ class yunsung8_state : public driver_device { public: yunsung8_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag), + m_audiocpu(*this, "audiocpu") { } /* video-related */ tilemap_t *m_tilemap_0; @@ -23,7 +24,7 @@ public: int m_toggle; /* devices */ - cpu_device *m_audiocpu; + required_device m_audiocpu; /* memory */ UINT8 m_videoram[0x4000]; diff --git a/src/mame/machine/ajax.c b/src/mame/machine/ajax.c index be35d0e0df3..723a65b75a9 100644 --- a/src/mame/machine/ajax.c +++ b/src/mame/machine/ajax.c @@ -203,9 +203,6 @@ void ajax_state::machine_start() membank("bank1")->set_entry(0); membank("bank2")->set_entry(0); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); - m_subcpu = machine().device("sub"); m_k007232_1 = machine().device("k007232_1"); m_k007232_2 = machine().device("k007232_2"); m_k052109 = machine().device("k052109"); diff --git a/src/mame/machine/nitedrvr.c b/src/mame/machine/nitedrvr.c index 1641fc9d672..c2b5e4aae6b 100644 --- a/src/mame/machine/nitedrvr.c +++ b/src/mame/machine/nitedrvr.c @@ -272,7 +272,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(nitedrvr_state::nitedrvr_crash_toggle_callback) void nitedrvr_state::machine_start() { - m_maincpu = machine().device("maincpu"); save_item(NAME(m_gear)); save_item(NAME(m_track)); diff --git a/src/mame/machine/pgmprot1.c b/src/mame/machine/pgmprot1.c index 071fe1a2d66..a64d7ff0d26 100644 --- a/src/mame/machine/pgmprot1.c +++ b/src/mame/machine/pgmprot1.c @@ -193,11 +193,6 @@ ADDRESS_MAP_END MACHINE_START_MEMBER(pgm_arm_type1_state,pgm_arm_type1) { MACHINE_START_CALL_MEMBER(pgm); - - - - m_prot = machine().device("prot"); - save_item(NAME(m_value0)); save_item(NAME(m_value1)); save_item(NAME(m_valuekey)); diff --git a/src/mame/machine/pgmprot2.c b/src/mame/machine/pgmprot2.c index 5407c2e838f..b6d1756daae 100644 --- a/src/mame/machine/pgmprot2.c +++ b/src/mame/machine/pgmprot2.c @@ -122,11 +122,7 @@ ADDRESS_MAP_END MACHINE_START_MEMBER(pgm_arm_type2_state,pgm_arm_type2) { MACHINE_START_CALL_MEMBER(pgm); - - m_prot = machine().device("prot"); - /* register type specific Save State stuff here */ - } /******* ARM 55857F *******/ diff --git a/src/mame/machine/pgmprot3.c b/src/mame/machine/pgmprot3.c index 4ad3f82ff63..3568a2d2194 100644 --- a/src/mame/machine/pgmprot3.c +++ b/src/mame/machine/pgmprot3.c @@ -143,9 +143,6 @@ ADDRESS_MAP_END MACHINE_START_MEMBER(pgm_arm_type3_state,pgm_arm_type3) { MACHINE_START_CALL_MEMBER(pgm); - - m_prot = machine().device("prot"); - /* register type specific Save State stuff here */ } diff --git a/src/mame/machine/simpsons.c b/src/mame/machine/simpsons.c index 20fe3a99209..81bd6b0c97e 100644 --- a/src/mame/machine/simpsons.c +++ b/src/mame/machine/simpsons.c @@ -77,8 +77,6 @@ void simpsons_state::machine_start() m_xtraram = auto_alloc_array_clear(machine(), UINT8, 0x1000); m_spriteram = auto_alloc_array_clear(machine(), UINT16, 0x1000 / 2); - m_maincpu = machine().device("maincpu"); - m_audiocpu = machine().device("audiocpu"); m_k053260 = machine().device("k053260"); m_k052109 = machine().device("k052109"); m_k053246 = machine().device("k053246"); diff --git a/src/mame/machine/tnzs.c b/src/mame/machine/tnzs.c index 5c2fa743550..065362571b2 100644 --- a/src/mame/machine/tnzs.c +++ b/src/mame/machine/tnzs.c @@ -677,7 +677,6 @@ MACHINE_START_MEMBER(tnzs_state,jpopnics) membank("subbank")->configure_entries(0, 4, &SUB[0x08000], 0x2000); membank("subbank")->set_entry(m_bank2); - m_subcpu = machine().device("sub"); m_mcu = NULL; m_bank1 = 2; @@ -695,7 +694,6 @@ MACHINE_START_MEMBER(tnzs_state,tnzs) { MACHINE_START_CALL_MEMBER( jpopnics ); - m_audiocpu = machine().device("audiocpu"); m_mcu = machine().device("mcu"); save_item(NAME(m_kageki_csport_sel));