summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2012-09-12 03:35:06 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2012-09-12 03:35:06 +0000
commit0ef1e6deb4923b27f4c1d95825e453f565b129a3 (patch) (github)
treeaa3054f8acec99e6e5442359c8adcd88a3283bab
parentcd5dcbacd973e855f0b4f5c522334279ff63930b (diff)
downloadmame-0ef1e6deb4923b27f4c1d95825e453f565b129a3.tar.bz2
mame-0ef1e6deb4923b27f4c1d95825e453f565b129a3.zip
Closeout on old macros. Retired cputag_set_input_line
and cputag_set_input_line_and_vector, replacing them with machine.device("tag")->execute().set_input_line[_and_vector]. [Aaron Giles]
-rw-r--r--src/emu/cpu/psx/irq.c4
-rw-r--r--src/emu/devcpu.h5
-rw-r--r--src/emu/machine/s3c24xx.c8
-rw-r--r--src/mame/audio/aztarac.c2
-rw-r--r--src/mame/audio/beezer.c2
-rw-r--r--src/mame/audio/carnival.c2
-rw-r--r--src/mame/audio/cchasm.c4
-rw-r--r--src/mame/audio/cyberbal.c6
-rw-r--r--src/mame/audio/dkong.c4
-rw-r--r--src/mame/audio/exidy.c4
-rw-r--r--src/mame/audio/exidy440.c6
-rw-r--r--src/mame/audio/irem.c6
-rw-r--r--src/mame/audio/jedi.c4
-rw-r--r--src/mame/audio/leland.c6
-rw-r--r--src/mame/audio/m72.c2
-rw-r--r--src/mame/audio/mario.c8
-rw-r--r--src/mame/audio/qix.c4
-rw-r--r--src/mame/audio/redalert.c6
-rw-r--r--src/mame/audio/scramble.c6
-rw-r--r--src/mame/audio/segag80r.c2
-rw-r--r--src/mame/audio/segasnd.c2
-rw-r--r--src/mame/audio/spacefb.c2
-rw-r--r--src/mame/audio/starwars.c4
-rw-r--r--src/mame/audio/taito_en.c2
-rw-r--r--src/mame/drivers/1942.c4
-rw-r--r--src/mame/drivers/2mindril.c4
-rw-r--r--src/mame/drivers/39in1.c4
-rw-r--r--src/mame/drivers/40love.c2
-rw-r--r--src/mame/drivers/5clown.c4
-rw-r--r--src/mame/drivers/acefruit.c2
-rw-r--r--src/mame/drivers/acommand.c4
-rw-r--r--src/mame/drivers/aeroboto.c2
-rw-r--r--src/mame/drivers/airbustr.c4
-rw-r--r--src/mame/drivers/alien.c2
-rw-r--r--src/mame/drivers/arabian.c4
-rw-r--r--src/mame/drivers/arcadecl.c2
-rw-r--r--src/mame/drivers/argus.c10
-rw-r--r--src/mame/drivers/aristmk4.c4
-rw-r--r--src/mame/drivers/aristmk5.c2
-rw-r--r--src/mame/drivers/armedf.c6
-rw-r--r--src/mame/drivers/artmagic.c4
-rw-r--r--src/mame/drivers/astrocde.c2
-rw-r--r--src/mame/drivers/astrocorp.c4
-rw-r--r--src/mame/drivers/asuka.c2
-rw-r--r--src/mame/drivers/atarig1.c4
-rw-r--r--src/mame/drivers/atarig42.c6
-rw-r--r--src/mame/drivers/atarigt.c6
-rw-r--r--src/mame/drivers/atarigx2.c6
-rw-r--r--src/mame/drivers/atarisy1.c8
-rw-r--r--src/mame/drivers/atarisy2.c18
-rw-r--r--src/mame/drivers/atarisy4.c18
-rw-r--r--src/mame/drivers/atetris.c4
-rw-r--r--src/mame/drivers/badlands.c6
-rw-r--r--src/mame/drivers/baraduke.c2
-rw-r--r--src/mame/drivers/batman.c8
-rw-r--r--src/mame/drivers/battlera.c4
-rw-r--r--src/mame/drivers/battlex.c2
-rw-r--r--src/mame/drivers/bbusters.c4
-rw-r--r--src/mame/drivers/beathead.c6
-rw-r--r--src/mame/drivers/berzerk.c4
-rw-r--r--src/mame/drivers/bfcobra.c4
-rw-r--r--src/mame/drivers/bfm_sc1.c2
-rw-r--r--src/mame/drivers/bfm_sc2.c4
-rw-r--r--src/mame/drivers/big10.c2
-rw-r--r--src/mame/drivers/bingoc.c2
-rw-r--r--src/mame/drivers/bionicc.c4
-rw-r--r--src/mame/drivers/bishi.c4
-rw-r--r--src/mame/drivers/bking.c4
-rw-r--r--src/mame/drivers/bladestl.c4
-rw-r--r--src/mame/drivers/blitz68k.c8
-rw-r--r--src/mame/drivers/blstroid.c6
-rw-r--r--src/mame/drivers/bmcbowl.c2
-rw-r--r--src/mame/drivers/bnstars.c4
-rw-r--r--src/mame/drivers/buggychl.c2
-rw-r--r--src/mame/drivers/bwidow.c2
-rw-r--r--src/mame/drivers/bwing.c4
-rw-r--r--src/mame/drivers/byvid.c2
-rw-r--r--src/mame/drivers/cabal.c4
-rw-r--r--src/mame/drivers/calchase.c6
-rw-r--r--src/mame/drivers/cave.c2
-rw-r--r--src/mame/drivers/ccastles.c2
-rw-r--r--src/mame/drivers/cchasm.c2
-rw-r--r--src/mame/drivers/cclimber.c2
-rw-r--r--src/mame/drivers/centiped.c6
-rw-r--r--src/mame/drivers/cham24.c2
-rw-r--r--src/mame/drivers/changela.c4
-rw-r--r--src/mame/drivers/chihiro.c2
-rw-r--r--src/mame/drivers/chqflag.c4
-rw-r--r--src/mame/drivers/cidelsa.c2
-rw-r--r--src/mame/drivers/circus.c4
-rw-r--r--src/mame/drivers/cischeat.c14
-rw-r--r--src/mame/drivers/cliffhgr.c6
-rw-r--r--src/mame/drivers/cloak.c4
-rw-r--r--src/mame/drivers/cloud9.c2
-rw-r--r--src/mame/drivers/cobra.c16
-rw-r--r--src/mame/drivers/compgolf.c2
-rw-r--r--src/mame/drivers/coolpool.c14
-rw-r--r--src/mame/drivers/coolridr.c4
-rw-r--r--src/mame/drivers/corona.c4
-rw-r--r--src/mame/drivers/cosmic.c12
-rw-r--r--src/mame/drivers/cps1.c2
-rw-r--r--src/mame/drivers/cps3.c12
-rw-r--r--src/mame/drivers/cshooter.c4
-rw-r--r--src/mame/drivers/cubeqst.c12
-rw-r--r--src/mame/drivers/cyberbal.c12
-rw-r--r--src/mame/drivers/cybertnk.c4
-rw-r--r--src/mame/drivers/darkmist.c4
-rw-r--r--src/mame/drivers/darkseal.c4
-rw-r--r--src/mame/drivers/dbz.c6
-rw-r--r--src/mame/drivers/deadang.c8
-rw-r--r--src/mame/drivers/dec0.c16
-rw-r--r--src/mame/drivers/deco32.c14
-rw-r--r--src/mame/drivers/deco_mlc.c4
-rw-r--r--src/mame/drivers/deniam.c2
-rw-r--r--src/mame/drivers/djboy.c4
-rw-r--r--src/mame/drivers/djmain.c6
-rw-r--r--src/mame/drivers/dlair.c2
-rw-r--r--src/mame/drivers/dmndrby.c6
-rw-r--r--src/mame/drivers/dooyong.c10
-rw-r--r--src/mame/drivers/ecoinfr.c4
-rw-r--r--src/mame/drivers/enigma2.c2
-rw-r--r--src/mame/drivers/eolith.c2
-rw-r--r--src/mame/drivers/eprom.c10
-rw-r--r--src/mame/drivers/equites.c8
-rw-r--r--src/mame/drivers/esh.c6
-rw-r--r--src/mame/drivers/espial.c4
-rw-r--r--src/mame/drivers/esripsys.c20
-rw-r--r--src/mame/drivers/exedexes.c4
-rw-r--r--src/mame/drivers/exidy440.c6
-rw-r--r--src/mame/drivers/expro02.c6
-rw-r--r--src/mame/drivers/exterm.c14
-rw-r--r--src/mame/drivers/exzisus.c4
-rw-r--r--src/mame/drivers/famibox.c2
-rw-r--r--src/mame/drivers/fastfred.c2
-rw-r--r--src/mame/drivers/feversoc.c2
-rw-r--r--src/mame/drivers/finalizr.c4
-rw-r--r--src/mame/drivers/firebeat.c16
-rw-r--r--src/mame/drivers/firefox.c16
-rw-r--r--src/mame/drivers/flower.c10
-rw-r--r--src/mame/drivers/foodf.c6
-rw-r--r--src/mame/drivers/forte2.c2
-rw-r--r--src/mame/drivers/funkball.c2
-rw-r--r--src/mame/drivers/gaelco3d.c16
-rw-r--r--src/mame/drivers/galaga.c8
-rw-r--r--src/mame/drivers/galastrm.c2
-rw-r--r--src/mame/drivers/galaxian.c20
-rw-r--r--src/mame/drivers/galpani2.c2
-rw-r--r--src/mame/drivers/galpanic.c10
-rw-r--r--src/mame/drivers/gamecstl.c6
-rw-r--r--src/mame/drivers/gaplus.c18
-rw-r--r--src/mame/drivers/gauntlet.c6
-rw-r--r--src/mame/drivers/gberet.c14
-rw-r--r--src/mame/drivers/ginganin.c2
-rw-r--r--src/mame/drivers/gladiatr.c8
-rw-r--r--src/mame/drivers/gottlieb.c2
-rw-r--r--src/mame/drivers/gpworld.c2
-rw-r--r--src/mame/drivers/gradius3.c6
-rw-r--r--src/mame/drivers/grchamp.c6
-rw-r--r--src/mame/drivers/gridlee.c8
-rw-r--r--src/mame/drivers/groundfx.c2
-rw-r--r--src/mame/drivers/gstriker.c6
-rw-r--r--src/mame/drivers/gsword.c2
-rw-r--r--src/mame/drivers/gticlub.c18
-rw-r--r--src/mame/drivers/guab.c12
-rw-r--r--src/mame/drivers/gunbustr.c2
-rw-r--r--src/mame/drivers/gundealr.c4
-rw-r--r--src/mame/drivers/halleys.c16
-rw-r--r--src/mame/drivers/hcastle.c2
-rw-r--r--src/mame/drivers/hexion.c8
-rw-r--r--src/mame/drivers/higemaru.c4
-rw-r--r--src/mame/drivers/hnayayoi.c2
-rw-r--r--src/mame/drivers/hng64.c16
-rw-r--r--src/mame/drivers/hornet.c22
-rw-r--r--src/mame/drivers/hyprduel.c2
-rw-r--r--src/mame/drivers/igs011.c2
-rw-r--r--src/mame/drivers/igspoker.c2
-rw-r--r--src/mame/drivers/iqblock.c2
-rw-r--r--src/mame/drivers/irobot.c4
-rw-r--r--src/mame/drivers/istellar.c4
-rw-r--r--src/mame/drivers/itech32.c30
-rw-r--r--src/mame/drivers/itech8.c18
-rw-r--r--src/mame/drivers/itgambl2.c2
-rw-r--r--src/mame/drivers/itgambl3.c2
-rw-r--r--src/mame/drivers/itgamble.c2
-rw-r--r--src/mame/drivers/jackie.c2
-rw-r--r--src/mame/drivers/jchan.c4
-rw-r--r--src/mame/drivers/jedi.c6
-rw-r--r--src/mame/drivers/jpmimpct.c4
-rw-r--r--src/mame/drivers/jpmsys5.c6
-rw-r--r--src/mame/drivers/jrpacman.c2
-rw-r--r--src/mame/drivers/kaneko16.c2
-rw-r--r--src/mame/drivers/kangaroo.c2
-rw-r--r--src/mame/drivers/kas89.c2
-rw-r--r--src/mame/drivers/kingdrby.c2
-rw-r--r--src/mame/drivers/kinst.c4
-rw-r--r--src/mame/drivers/klax.c2
-rw-r--r--src/mame/drivers/konamigq.c4
-rw-r--r--src/mame/drivers/konamigx.c24
-rw-r--r--src/mame/drivers/konamim2.c4
-rw-r--r--src/mame/drivers/kungfur.c2
-rw-r--r--src/mame/drivers/lgp.c2
-rw-r--r--src/mame/drivers/looping.c10
-rw-r--r--src/mame/drivers/lordgun.c4
-rw-r--r--src/mame/drivers/luckgrln.c2
-rw-r--r--src/mame/drivers/m107.c16
-rw-r--r--src/mame/drivers/m72.c22
-rw-r--r--src/mame/drivers/m90.c2
-rw-r--r--src/mame/drivers/madalien.c6
-rw-r--r--src/mame/drivers/magmax.c4
-rw-r--r--src/mame/drivers/mainsnk.c2
-rw-r--r--src/mame/drivers/mappy.c34
-rw-r--r--src/mame/drivers/mastboy.c4
-rw-r--r--src/mame/drivers/maxaflex.c6
-rw-r--r--src/mame/drivers/maygay1b.c4
-rw-r--r--src/mame/drivers/maygayv1.c10
-rw-r--r--src/mame/drivers/meadows.c2
-rw-r--r--src/mame/drivers/mediagx.c6
-rw-r--r--src/mame/drivers/megaplay.c2
-rw-r--r--src/mame/drivers/megasys1.c20
-rw-r--r--src/mame/drivers/megatech.c16
-rw-r--r--src/mame/drivers/merit.c2
-rw-r--r--src/mame/drivers/metalmx.c2
-rw-r--r--src/mame/drivers/metlclsh.c2
-rw-r--r--src/mame/drivers/mexico86.c2
-rw-r--r--src/mame/drivers/midqslvr.c2
-rw-r--r--src/mame/drivers/midvunit.c4
-rw-r--r--src/mame/drivers/midzeus.c6
-rw-r--r--src/mame/drivers/mirax.c2
-rw-r--r--src/mame/drivers/missb2.c2
-rw-r--r--src/mame/drivers/mlanding.c20
-rw-r--r--src/mame/drivers/model1.c8
-rw-r--r--src/mame/drivers/model2.c26
-rw-r--r--src/mame/drivers/model3.c8
-rw-r--r--src/mame/drivers/mpu3.c2
-rw-r--r--src/mame/drivers/mpu4dealem.c2
-rw-r--r--src/mame/drivers/mpu4hw.c4
-rw-r--r--src/mame/drivers/mpu4vid.c8
-rw-r--r--src/mame/drivers/ms32.c10
-rw-r--r--src/mame/drivers/msisaac.c2
-rw-r--r--src/mame/drivers/multigam.c2
-rw-r--r--src/mame/drivers/mustache.c2
-rw-r--r--src/mame/drivers/mw18w.c2
-rw-r--r--src/mame/drivers/mystston.c6
-rw-r--r--src/mame/drivers/mystwarr.c2
-rw-r--r--src/mame/drivers/namcofl.c6
-rw-r--r--src/mame/drivers/namcona1.c6
-rw-r--r--src/mame/drivers/namconb1.c50
-rw-r--r--src/mame/drivers/namcos1.c4
-rw-r--r--src/mame/drivers/namcos21.c6
-rw-r--r--src/mame/drivers/namcos23.c38
-rw-r--r--src/mame/drivers/namcos86.c4
-rw-r--r--src/mame/drivers/naomi.c2
-rw-r--r--src/mame/drivers/naughtyb.c2
-rw-r--r--src/mame/drivers/neogeo.c8
-rw-r--r--src/mame/drivers/neoprint.c6
-rw-r--r--src/mame/drivers/ninjakd2.c4
-rw-r--r--src/mame/drivers/nmk16.c18
-rw-r--r--src/mame/drivers/nwk-tr.c12
-rw-r--r--src/mame/drivers/offtwall.c6
-rw-r--r--src/mame/drivers/olibochu.c4
-rw-r--r--src/mame/drivers/omegrace.c2
-rw-r--r--src/mame/drivers/overdriv.c6
-rw-r--r--src/mame/drivers/pacland.c10
-rw-r--r--src/mame/drivers/pangofun.c2
-rw-r--r--src/mame/drivers/panicr.c4
-rw-r--r--src/mame/drivers/paradise.c2
-rw-r--r--src/mame/drivers/paranoia.c2
-rw-r--r--src/mame/drivers/pcat_dyn.c2
-rw-r--r--src/mame/drivers/pcktgal.c4
-rw-r--r--src/mame/drivers/pcxt.c8
-rw-r--r--src/mame/drivers/pengadvb.c2
-rw-r--r--src/mame/drivers/peplus.c2
-rw-r--r--src/mame/drivers/pgm.c2
-rw-r--r--src/mame/drivers/photoply.c4
-rw-r--r--src/mame/drivers/pinkiri8.c2
-rw-r--r--src/mame/drivers/pkscram.c8
-rw-r--r--src/mame/drivers/plygonet.c16
-rw-r--r--src/mame/drivers/pokechmp.c2
-rw-r--r--src/mame/drivers/polepos.c12
-rw-r--r--src/mame/drivers/policetr.c2
-rw-r--r--src/mame/drivers/polyplay.c2
-rw-r--r--src/mame/drivers/poo.c2
-rw-r--r--src/mame/drivers/poolshrk.c2
-rw-r--r--src/mame/drivers/powerins.c2
-rw-r--r--src/mame/drivers/prehisle.c4
-rw-r--r--src/mame/drivers/progolf.c6
-rw-r--r--src/mame/drivers/psychic5.c6
-rw-r--r--src/mame/drivers/punchout.c4
-rw-r--r--src/mame/drivers/qdrmfgp.c16
-rw-r--r--src/mame/drivers/quakeat.c2
-rw-r--r--src/mame/drivers/queen.c2
-rw-r--r--src/mame/drivers/quizpun2.c4
-rw-r--r--src/mame/drivers/r2dtank.c6
-rw-r--r--src/mame/drivers/rabbit.c4
-rw-r--r--src/mame/drivers/rampart.c2
-rw-r--r--src/mame/drivers/rbmk.c2
-rw-r--r--src/mame/drivers/re900.c2
-rw-r--r--src/mame/drivers/redalert.c4
-rw-r--r--src/mame/drivers/relief.c2
-rw-r--r--src/mame/drivers/renegade.c8
-rw-r--r--src/mame/drivers/retofinv.c12
-rw-r--r--src/mame/drivers/rollerg.c2
-rw-r--r--src/mame/drivers/roul.c2
-rw-r--r--src/mame/drivers/royalmah.c2
-rw-r--r--src/mame/drivers/rpunch.c6
-rw-r--r--src/mame/drivers/runaway.c4
-rw-r--r--src/mame/drivers/sandscrp.c8
-rw-r--r--src/mame/drivers/sangho.c2
-rw-r--r--src/mame/drivers/saturn.c14
-rw-r--r--src/mame/drivers/savquest.c2
-rw-r--r--src/mame/drivers/sbrkout.c8
-rw-r--r--src/mame/drivers/sbugger.c2
-rw-r--r--src/mame/drivers/scotrsht.c2
-rw-r--r--src/mame/drivers/seattle.c18
-rw-r--r--src/mame/drivers/segac2.c8
-rw-r--r--src/mame/drivers/segag80r.c4
-rw-r--r--src/mame/drivers/segag80v.c2
-rw-r--r--src/mame/drivers/segas24.c60
-rw-r--r--src/mame/drivers/segas32.c12
-rw-r--r--src/mame/drivers/seibuspi.c12
-rw-r--r--src/mame/drivers/seicross.c6
-rw-r--r--src/mame/drivers/seta.c12
-rw-r--r--src/mame/drivers/sfkick.c4
-rw-r--r--src/mame/drivers/sg1000a.c2
-rw-r--r--src/mame/drivers/shadfrce.c12
-rw-r--r--src/mame/drivers/shangha3.c4
-rw-r--r--src/mame/drivers/shangkid.c14
-rw-r--r--src/mame/drivers/shootout.c8
-rw-r--r--src/mame/drivers/shougi.c12
-rw-r--r--src/mame/drivers/shuuz.c2
-rw-r--r--src/mame/drivers/sidearms.c2
-rw-r--r--src/mame/drivers/sidepckt.c6
-rw-r--r--src/mame/drivers/skeetsht.c2
-rw-r--r--src/mame/drivers/skullxbo.c6
-rw-r--r--src/mame/drivers/skykid.c6
-rw-r--r--src/mame/drivers/sliver.c2
-rw-r--r--src/mame/drivers/slotcarn.c2
-rw-r--r--src/mame/drivers/snk.c18
-rw-r--r--src/mame/drivers/snk6502.c2
-rw-r--r--src/mame/drivers/snk68.c4
-rw-r--r--src/mame/drivers/snowbros.c12
-rw-r--r--src/mame/drivers/solomon.c2
-rw-r--r--src/mame/drivers/sothello.c10
-rw-r--r--src/mame/drivers/spacefb.c2
-rw-r--r--src/mame/drivers/spbactn.c4
-rw-r--r--src/mame/drivers/spcforce.c2
-rw-r--r--src/mame/drivers/spdodgeb.c4
-rw-r--r--src/mame/drivers/speedspn.c2
-rw-r--r--src/mame/drivers/speglsht.c2
-rw-r--r--src/mame/drivers/spiders.c6
-rw-r--r--src/mame/drivers/splash.c6
-rw-r--r--src/mame/drivers/spoker.c2
-rw-r--r--src/mame/drivers/sprint4.c2
-rw-r--r--src/mame/drivers/sprint8.c4
-rw-r--r--src/mame/drivers/srmp2.c10
-rw-r--r--src/mame/drivers/srmp5.c2
-rw-r--r--src/mame/drivers/srmp6.c2
-rw-r--r--src/mame/drivers/sshangha.c2
-rw-r--r--src/mame/drivers/sslam.c2
-rw-r--r--src/mame/drivers/ssozumo.c4
-rw-r--r--src/mame/drivers/sspeedr.c2
-rw-r--r--src/mame/drivers/ssv.c2
-rw-r--r--src/mame/drivers/stadhero.c4
-rw-r--r--src/mame/drivers/starwars.c2
-rw-r--r--src/mame/drivers/su2000.c4
-rw-r--r--src/mame/drivers/sub.c4
-rw-r--r--src/mame/drivers/subsino2.c4
-rw-r--r--src/mame/drivers/suna8.c2
-rw-r--r--src/mame/drivers/superchs.c6
-rw-r--r--src/mame/drivers/superdq.c2
-rw-r--r--src/mame/drivers/superqix.c4
-rw-r--r--src/mame/drivers/supertnk.c2
-rw-r--r--src/mame/drivers/suprgolf.c4
-rw-r--r--src/mame/drivers/suprloco.c2
-rw-r--r--src/mame/drivers/suprnova.c18
-rw-r--r--src/mame/drivers/suprridr.c4
-rw-r--r--src/mame/drivers/system1.c10
-rw-r--r--src/mame/drivers/tagteam.c6
-rw-r--r--src/mame/drivers/taito_f3.c8
-rw-r--r--src/mame/drivers/taito_x.c2
-rw-r--r--src/mame/drivers/taitogn.c2
-rw-r--r--src/mame/drivers/taitosj.c2
-rw-r--r--src/mame/drivers/taitotz.c20
-rw-r--r--src/mame/drivers/taitowlf.c6
-rw-r--r--src/mame/drivers/tank8.c4
-rw-r--r--src/mame/drivers/tankbatt.c4
-rw-r--r--src/mame/drivers/tankbust.c2
-rw-r--r--src/mame/drivers/taotaido.c4
-rw-r--r--src/mame/drivers/tapatune.c10
-rw-r--r--src/mame/drivers/tatsumi.c8
-rw-r--r--src/mame/drivers/tbowl.c6
-rw-r--r--src/mame/drivers/tecmo.c6
-rw-r--r--src/mame/drivers/tecmo16.c4
-rw-r--r--src/mame/drivers/tecmosys.c4
-rw-r--r--src/mame/drivers/tehkanwc.c8
-rw-r--r--src/mame/drivers/tempest.c2
-rw-r--r--src/mame/drivers/tetrisp2.c8
-rw-r--r--src/mame/drivers/thayers.c10
-rw-r--r--src/mame/drivers/thedeep.c4
-rw-r--r--src/mame/drivers/thunderj.c10
-rw-r--r--src/mame/drivers/tickee.c4
-rw-r--r--src/mame/drivers/tigeroad.c2
-rw-r--r--src/mame/drivers/timelimt.c2
-rw-r--r--src/mame/drivers/tmaster.c4
-rw-r--r--src/mame/drivers/tmmjprd.c6
-rw-r--r--src/mame/drivers/tmnt.c2
-rw-r--r--src/mame/drivers/toaplan1.c2
-rw-r--r--src/mame/drivers/toki.c4
-rw-r--r--src/mame/drivers/tomcat.c2
-rw-r--r--src/mame/drivers/tonton.c2
-rw-r--r--src/mame/drivers/toobin.c6
-rw-r--r--src/mame/drivers/topspeed.c2
-rw-r--r--src/mame/drivers/tourvis.c2
-rw-r--r--src/mame/drivers/toypop.c16
-rw-r--r--src/mame/drivers/tp84.c2
-rw-r--r--src/mame/drivers/triplhnt.c2
-rw-r--r--src/mame/drivers/trucocl.c2
-rw-r--r--src/mame/drivers/trvmadns.c2
-rw-r--r--src/mame/drivers/tryout.c8
-rw-r--r--src/mame/drivers/tsamurai.c8
-rw-r--r--src/mame/drivers/tubep.c32
-rw-r--r--src/mame/drivers/tugboat.c2
-rw-r--r--src/mame/drivers/tumblep.c2
-rw-r--r--src/mame/drivers/twin16.c8
-rw-r--r--src/mame/drivers/twincobr.c2
-rw-r--r--src/mame/drivers/twinkle.c2
-rw-r--r--src/mame/drivers/tx1.c8
-rw-r--r--src/mame/drivers/uapce.c2
-rw-r--r--src/mame/drivers/ultratnk.c2
-rw-r--r--src/mame/drivers/ultrsprt.c4
-rw-r--r--src/mame/drivers/umipoker.c2
-rw-r--r--src/mame/drivers/undrfire.c4
-rw-r--r--src/mame/drivers/vastar.c4
-rw-r--r--src/mame/drivers/vball.c12
-rw-r--r--src/mame/drivers/vegas.c4
-rw-r--r--src/mame/drivers/vicdual.c2
-rw-r--r--src/mame/drivers/videopin.c8
-rw-r--r--src/mame/drivers/videopkr.c4
-rw-r--r--src/mame/drivers/vindictr.c4
-rw-r--r--src/mame/drivers/viper.c4
-rw-r--r--src/mame/drivers/voyager.c6
-rw-r--r--src/mame/drivers/vpoker.c2
-rw-r--r--src/mame/drivers/wardner.c2
-rw-r--r--src/mame/drivers/warpwarp.c4
-rw-r--r--src/mame/drivers/wc90.c4
-rw-r--r--src/mame/drivers/wc90b.c6
-rw-r--r--src/mame/drivers/wecleman.c18
-rw-r--r--src/mame/drivers/welltris.c4
-rw-r--r--src/mame/drivers/wheelfir.c8
-rw-r--r--src/mame/drivers/wink.c2
-rw-r--r--src/mame/drivers/wiping.c2
-rw-r--r--src/mame/drivers/wolfpack.c2
-rw-r--r--src/mame/drivers/wwfsstar.c12
-rw-r--r--src/mame/drivers/wwfwfest.c12
-rw-r--r--src/mame/drivers/xain.c26
-rw-r--r--src/mame/drivers/xmen.c4
-rw-r--r--src/mame/drivers/xorworld.c4
-rw-r--r--src/mame/drivers/xtom3d.c2
-rw-r--r--src/mame/drivers/xxmissio.c4
-rw-r--r--src/mame/drivers/xybots.c4
-rw-r--r--src/mame/drivers/xyonix.c2
-rw-r--r--src/mame/drivers/zaccaria.c6
-rw-r--r--src/mame/drivers/zaxxon.c4
-rw-r--r--src/mame/drivers/zn.c6
-rw-r--r--src/mame/drivers/zodiack.c4
-rw-r--r--src/mame/drivers/zr107.c12
-rw-r--r--src/mame/machine/amiga.c24
-rw-r--r--src/mame/machine/archimds.c4
-rw-r--r--src/mame/machine/atari.c2
-rw-r--r--src/mame/machine/balsente.c14
-rw-r--r--src/mame/machine/beezer.c4
-rw-r--r--src/mame/machine/bsktball.c4
-rw-r--r--src/mame/machine/bublbobl.c2
-rw-r--r--src/mame/machine/carpolo.c2
-rw-r--r--src/mame/machine/cdi070.c14
-rw-r--r--src/mame/machine/cdicdic.c16
-rw-r--r--src/mame/machine/cdislave.c4
-rw-r--r--src/mame/machine/dc.c6
-rw-r--r--src/mame/machine/dec0.c12
-rw-r--r--src/mame/machine/decoprot.c16
-rw-r--r--src/mame/machine/galaxold.c4
-rw-r--r--src/mame/machine/irobot.c6
-rw-r--r--src/mame/machine/konppc.c4
-rw-r--r--src/mame/machine/leland.c18
-rw-r--r--src/mame/machine/mcr.c4
-rw-r--r--src/mame/machine/mcr68.c4
-rw-r--r--src/mame/machine/megacd.c20
-rw-r--r--src/mame/machine/megadriv.c14
-rw-r--r--src/mame/machine/megavdp.c2
-rw-r--r--src/mame/machine/mhavoc.c12
-rw-r--r--src/mame/machine/micro3d.c28
-rw-r--r--src/mame/machine/midxunit.c2
-rw-r--r--src/mame/machine/midyunit.c2
-rw-r--r--src/mame/machine/n64.c20
-rw-r--r--src/mame/machine/namcond1.c4
-rw-r--r--src/mame/machine/namcos1.c12
-rw-r--r--src/mame/machine/namcos2.c20
-rw-r--r--src/mame/machine/nb1413m3.c2
-rw-r--r--src/mame/machine/pcshare.c4
-rw-r--r--src/mame/machine/pitnrun.c6
-rw-r--r--src/mame/machine/playch10.c4
-rw-r--r--src/mame/machine/qix.c20
-rw-r--r--src/mame/machine/retofinv.c4
-rw-r--r--src/mame/machine/segamsys.c14
-rw-r--r--src/mame/machine/seicop.c2
-rw-r--r--src/mame/machine/slapfght.c14
-rw-r--r--src/mame/machine/slikshot.c2
-rw-r--r--src/mame/machine/snes.c8
-rw-r--r--src/mame/machine/stfight.c2
-rw-r--r--src/mame/machine/tait8741.c2
-rw-r--r--src/mame/machine/taitosj.c6
-rw-r--r--src/mame/machine/tatsumi.c28
-rw-r--r--src/mame/machine/toaplan1.c12
-rw-r--r--src/mame/machine/twincobr.c22
-rw-r--r--src/mame/machine/vectrex.c2
-rw-r--r--src/mame/machine/vertigo.c10
-rw-r--r--src/mame/machine/vsnes.c4
-rw-r--r--src/mame/machine/williams.c12
-rw-r--r--src/mame/machine/xevious.c10
-rw-r--r--src/mame/video/astrocde.c10
-rw-r--r--src/mame/video/atari.c4
-rw-r--r--src/mame/video/atarisy1.c2
-rw-r--r--src/mame/video/beathead.c2
-rw-r--r--src/mame/video/bfm_dm01.c4
-rw-r--r--src/mame/video/cchasm.c4
-rw-r--r--src/mame/video/cischeat.c26
-rw-r--r--src/mame/video/esripsys.c6
-rw-r--r--src/mame/video/exidy.c4
-rw-r--r--src/mame/video/exidy440.c4
-rw-r--r--src/mame/video/gticlub.c14
-rw-r--r--src/mame/video/lethalj.c4
-rw-r--r--src/mame/video/m72.c4
-rw-r--r--src/mame/video/mcd212.c12
-rw-r--r--src/mame/video/megasys1.c12
-rw-r--r--src/mame/video/micro3d.c8
-rw-r--r--src/mame/video/midtunit.c4
-rw-r--r--src/mame/video/midvunit.c4
-rw-r--r--src/mame/video/midyunit.c4
-rw-r--r--src/mame/video/midzeus.c4
-rw-r--r--src/mame/video/midzeus2.c2
-rw-r--r--src/mame/video/playch10.c2
-rw-r--r--src/mame/video/policetr.c4
-rw-r--r--src/mame/video/rpunch.c2
-rw-r--r--src/mame/video/segag80r.c2
-rw-r--r--src/mame/video/sidearms.c2
-rw-r--r--src/mame/video/toaplan1.c2
-rw-r--r--src/mame/video/tubep.c4
-rw-r--r--src/mame/video/tx1.c4
-rw-r--r--src/mame/video/vdc.c16
-rw-r--r--src/mame/video/vectrex.c2
-rw-r--r--src/mame/video/victory.c4
-rw-r--r--src/mame/video/vsnes.c4
-rw-r--r--src/mess/drivers/ace.c4
-rw-r--r--src/mess/drivers/adam.c2
-rw-r--r--src/mess/drivers/apollo.c8
-rw-r--r--src/mess/drivers/aquarius.c2
-rw-r--r--src/mess/drivers/babbage.c2
-rw-r--r--src/mess/drivers/basic52.c4
-rw-r--r--src/mess/drivers/bbcbc.c2
-rw-r--r--src/mess/drivers/bigbord2.c2
-rw-r--r--src/mess/drivers/bml3.c4
-rw-r--r--src/mess/drivers/camplynx.c2
-rw-r--r--src/mess/drivers/casloopy.c2
-rw-r--r--src/mess/drivers/cat.c4
-rw-r--r--src/mess/drivers/chesstrv.c2
-rw-r--r--src/mess/drivers/csc.c4
-rw-r--r--src/mess/drivers/dc.c2
-rw-r--r--src/mess/drivers/dectalk.c34
-rw-r--r--src/mess/drivers/esq1.c2
-rw-r--r--src/mess/drivers/ex800.c2
-rw-r--r--src/mess/drivers/fidelz80.c2
-rw-r--r--src/mess/drivers/fk1.c4
-rw-r--r--src/mess/drivers/fm7.c16
-rw-r--r--src/mess/drivers/fmtowns.c4
-rw-r--r--src/mess/drivers/fp1100.c14
-rw-r--r--src/mess/drivers/gamecom.c2
-rw-r--r--src/mess/drivers/glasgow.c4
-rw-r--r--src/mess/drivers/gmaster.c2
-rw-r--r--src/mess/drivers/h19.c6
-rw-r--r--src/mess/drivers/ht68k.c2
-rw-r--r--src/mess/drivers/intv.c4
-rw-r--r--src/mess/drivers/ip22.c12
-rw-r--r--src/mess/drivers/junior.c2
-rw-r--r--src/mess/drivers/mac.c4
-rw-r--r--src/mess/drivers/mekd2.c4
-rw-r--r--src/mess/drivers/mephisto.c8
-rw-r--r--src/mess/drivers/mk1.c2
-rw-r--r--src/mess/drivers/mk2.c2
-rw-r--r--src/mess/drivers/mmodular.c12
-rw-r--r--src/mess/drivers/mod8.c2
-rw-r--r--src/mess/drivers/multi16.c2
-rw-r--r--src/mess/drivers/mz2000.c2
-rw-r--r--src/mess/drivers/mz2500.c6
-rw-r--r--src/mess/drivers/nanos.c2
-rw-r--r--src/mess/drivers/nc.c6
-rw-r--r--src/mess/drivers/nes.c2
-rw-r--r--src/mess/drivers/ng_aes.c16
-rw-r--r--src/mess/drivers/p2000t.c2
-rw-r--r--src/mess/drivers/p8k.c2
-rw-r--r--src/mess/drivers/paso1600.c2
-rw-r--r--src/mess/drivers/pasogo.c4
-rw-r--r--src/mess/drivers/pasopia7.c4
-rw-r--r--src/mess/drivers/pb1000.c4
-rw-r--r--src/mess/drivers/pc100.c2
-rw-r--r--src/mess/drivers/pc6001.c18
-rw-r--r--src/mess/drivers/pc8801.c20
-rw-r--r--src/mess/drivers/pc88va.c6
-rw-r--r--src/mess/drivers/pc9801.c6
-rw-r--r--src/mess/drivers/pce.c2
-rw-r--r--src/mess/drivers/pcw.c12
-rw-r--r--src/mess/drivers/pcw16.c6
-rw-r--r--src/mess/drivers/pdp1.c4
-rw-r--r--src/mess/drivers/pecom.c2
-rw-r--r--src/mess/drivers/pegasus.c2
-rw-r--r--src/mess/drivers/pes.c6
-rw-r--r--src/mess/drivers/prestige.c2
-rw-r--r--src/mess/drivers/psion.c2
-rw-r--r--src/mess/drivers/pv2000.c6
-rw-r--r--src/mess/drivers/px4.c12
-rw-r--r--src/mess/drivers/qx10.c2
-rw-r--r--src/mess/drivers/samcoupe.c2
-rw-r--r--src/mess/drivers/scorpion.c2
-rw-r--r--src/mess/drivers/scv.c6
-rw-r--r--src/mess/drivers/sg1000.c2
-rw-r--r--src/mess/drivers/sgi_ip2.c4
-rw-r--r--src/mess/drivers/sm1800.c2
-rw-r--r--src/mess/drivers/sms.c2
-rw-r--r--src/mess/drivers/socrates.c2
-rw-r--r--src/mess/drivers/supercon.c4
-rw-r--r--src/mess/drivers/supracan.c6
-rw-r--r--src/mess/drivers/svi318.c2
-rw-r--r--src/mess/drivers/svision.c2
-rw-r--r--src/mess/drivers/tec1.c4
-rw-r--r--src/mess/drivers/tsispch.c6
-rw-r--r--src/mess/drivers/tutor.c4
-rw-r--r--src/mess/drivers/vg5k.c4
-rw-r--r--src/mess/drivers/vii.c22
-rw-r--r--src/mess/drivers/vt100.c2
-rw-r--r--src/mess/drivers/vt240.c2
-rw-r--r--src/mess/drivers/vtech2.c2
-rw-r--r--src/mess/drivers/x1.c2
-rw-r--r--src/mess/drivers/x68k.c48
-rw-r--r--src/mess/drivers/z100.c2
-rw-r--r--src/mess/drivers/zrt80.c4
-rw-r--r--src/mess/formats/spec_snqk.c50
-rw-r--r--src/mess/machine/amigacrt.c4
-rw-r--r--src/mess/machine/amstrad.c26
-rw-r--r--src/mess/machine/apollo.c4
-rw-r--r--src/mess/machine/apple1.c4
-rw-r--r--src/mess/machine/apple2gs.c4
-rw-r--r--src/mess/machine/apple3.c4
-rw-r--r--src/mess/machine/ay3600.c4
-rw-r--r--src/mess/machine/b2m.c2
-rw-r--r--src/mess/machine/bbc.c2
-rw-r--r--src/mess/machine/bebox.c12
-rw-r--r--src/mess/machine/bk.c2
-rw-r--r--src/mess/machine/c64.c4
-rw-r--r--src/mess/machine/c65.c4
-rw-r--r--src/mess/machine/cbmb.c2
-rw-r--r--src/mess/machine/cgenie.c4
-rw-r--r--src/mess/machine/compis.c6
-rw-r--r--src/mess/machine/concept.c4
-rw-r--r--src/mess/machine/dai.c4
-rw-r--r--src/mess/machine/dgn_beta.c16
-rw-r--r--src/mess/machine/egret.c2
-rw-r--r--src/mess/machine/electron.c4
-rw-r--r--src/mess/machine/gamecom.c8
-rw-r--r--src/mess/machine/gb.c4
-rw-r--r--src/mess/machine/hec2hrp.c8
-rw-r--r--src/mess/machine/hecdisk2.c10
-rw-r--r--src/mess/machine/hp48.c4
-rw-r--r--src/mess/machine/intv.c4
-rw-r--r--src/mess/machine/irisha.c2
-rw-r--r--src/mess/machine/kaypro.c8
-rw-r--r--src/mess/machine/lisa.c22
-rw-r--r--src/mess/machine/lynx.c26
-rw-r--r--src/mess/machine/mac.c6
-rw-r--r--src/mess/machine/macpci.c4
-rw-r--r--src/mess/machine/microtan.c4
-rw-r--r--src/mess/machine/msx.c2
-rw-r--r--src/mess/machine/mz700.c4
-rw-r--r--src/mess/machine/mz80.c2
-rw-r--r--src/mess/machine/ondra.c2
-rw-r--r--src/mess/machine/oric.c4
-rw-r--r--src/mess/machine/osborne1.c4
-rw-r--r--src/mess/machine/partner.c2
-rw-r--r--src/mess/machine/pce.c6
-rw-r--r--src/mess/machine/pecom.c2
-rw-r--r--src/mess/machine/pet.c8
-rw-r--r--src/mess/machine/pk8020.c2
-rw-r--r--src/mess/machine/pokemini.c4
-rw-r--r--src/mess/machine/poly88.c6
-rw-r--r--src/mess/machine/radio86.c2
-rw-r--r--src/mess/machine/rmnimbus.c2
-rw-r--r--src/mess/machine/sms.c2
-rw-r--r--src/mess/machine/super80.c6
-rw-r--r--src/mess/machine/svi318.c4
-rw-r--r--src/mess/machine/sym1.c2
-rw-r--r--src/mess/machine/thomson.c8
-rw-r--r--src/mess/machine/ti99/bwg.c2
-rw-r--r--src/mess/machine/ti99/ti_fdc.c2
-rw-r--r--src/mess/machine/ti990.c8
-rw-r--r--src/mess/machine/trs80.c14
-rw-r--r--src/mess/machine/wswan.c18
-rw-r--r--src/mess/machine/x1.c2
-rw-r--r--src/mess/machine/z80ne.c4
-rw-r--r--src/mess/video/fm7.c10
-rw-r--r--src/mess/video/gb.c72
-rw-r--r--src/mess/video/odyssey2.c6
-rw-r--r--src/mess/video/pecom.c2
-rw-r--r--src/mess/video/vc4000.c4
-rw-r--r--src/mess/video/x68k.c2
-rw-r--r--src/mess/video/zx.c4
713 files changed, 2209 insertions, 2214 deletions
diff --git a/src/emu/cpu/psx/irq.c b/src/emu/cpu/psx/irq.c
index ff9d00c13e5..f0a0b4d5b92 100644
--- a/src/emu/cpu/psx/irq.c
+++ b/src/emu/cpu/psx/irq.c
@@ -61,12 +61,12 @@ void psxirq_device::psx_irq_update( void )
if( ( n_irqdata & n_irqmask ) != 0 )
{
verboselog( machine(), 2, "psx irq assert\n" );
- cputag_set_input_line( machine(), "maincpu", PSXCPU_IRQ0, ASSERT_LINE );
+ machine().device("maincpu")->execute().set_input_line(PSXCPU_IRQ0, ASSERT_LINE );
}
else
{
verboselog( machine(), 2, "psx irq clear\n" );
- cputag_set_input_line( machine(), "maincpu", PSXCPU_IRQ0, CLEAR_LINE );
+ machine().device("maincpu")->execute().set_input_line(PSXCPU_IRQ0, CLEAR_LINE );
}
}
diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h
index 32d38bbed82..ef4df50ee24 100644
--- a/src/emu/devcpu.h
+++ b/src/emu/devcpu.h
@@ -292,11 +292,6 @@ const device_type name = &legacy_device_creator<basename##_device>
#define CPU_EXPORT_STRING_CALL(name) CPU_EXPORT_STRING_NAME(name)(device, entry, string)
-// helpers for using machine/cputag instead of cpu objects
-#define cputag_set_input_line(mach, tag, line, state) device_execute((mach).device(tag))->set_input_line(line, state)
-#define cputag_set_input_line_and_vector(mach, tag, line, state, vec) device_execute((mach).device(tag))->set_input_line_and_vector(line, state, vec)
-
-
// this template function creates a stub which constructs a device
template<class _DeviceClass>
device_t *legacy_device_creator(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/emu/machine/s3c24xx.c b/src/emu/machine/s3c24xx.c
index 0c5b85b72b8..e4327310f7e 100644
--- a/src/emu/machine/s3c24xx.c
+++ b/src/emu/machine/s3c24xx.c
@@ -1191,7 +1191,7 @@ static void s3c24xx_check_pending_irq( device_t *device)
if (s3c24xx->irq.line_irq != ASSERT_LINE)
{
verboselog( device->machine(), 5, "ARM7_IRQ_LINE -> ASSERT_LINE\n");
- cputag_set_input_line( device->machine(), "maincpu", ARM7_IRQ_LINE, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
s3c24xx->irq.line_irq = ASSERT_LINE;
}
}
@@ -1201,7 +1201,7 @@ static void s3c24xx_check_pending_irq( device_t *device)
{
verboselog( device->machine(), 5, "srcpnd %08X intmsk %08X intmod %08X\n", s3c24xx->irq.regs.srcpnd, s3c24xx->irq.regs.intmsk, s3c24xx->irq.regs.intmod);
verboselog( device->machine(), 5, "ARM7_IRQ_LINE -> CLEAR_LINE\n");
- cputag_set_input_line( device->machine(), "maincpu", ARM7_IRQ_LINE, CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE);
s3c24xx->irq.line_irq = CLEAR_LINE;
}
}
@@ -1220,7 +1220,7 @@ static void s3c24xx_check_pending_irq( device_t *device)
if (s3c24xx->irq.line_fiq != ASSERT_LINE)
{
verboselog( device->machine(), 5, "ARM7_FIRQ_LINE -> ASSERT_LINE\n");
- cputag_set_input_line( device->machine(), "maincpu", ARM7_FIRQ_LINE, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(ARM7_FIRQ_LINE, ASSERT_LINE);
s3c24xx->irq.line_fiq = ASSERT_LINE;
}
}
@@ -1229,7 +1229,7 @@ static void s3c24xx_check_pending_irq( device_t *device)
if (s3c24xx->irq.line_fiq != CLEAR_LINE)
{
verboselog( device->machine(), 5, "ARM7_FIRQ_LINE -> CLEAR_LINE\n");
- cputag_set_input_line( device->machine(), "maincpu", ARM7_FIRQ_LINE, CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(ARM7_FIRQ_LINE, CLEAR_LINE);
s3c24xx->irq.line_fiq = CLEAR_LINE;
}
}
diff --git a/src/mame/audio/aztarac.c b/src/mame/audio/aztarac.c
index afa5bbd397e..a61db646f04 100644
--- a/src/mame/audio/aztarac.c
+++ b/src/mame/audio/aztarac.c
@@ -22,7 +22,7 @@ WRITE16_MEMBER(aztarac_state::aztarac_sound_w)
soundlatch_byte_w(space, offset, data);
m_sound_status ^= 0x21;
if (m_sound_status & 0x20)
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
}
diff --git a/src/mame/audio/beezer.c b/src/mame/audio/beezer.c
index 21e30eeff94..b48c270c7bc 100644
--- a/src/mame/audio/beezer.c
+++ b/src/mame/audio/beezer.c
@@ -138,7 +138,7 @@ INLINE beezer_sound_state *get_safe_token(device_t *device)
/*static WRITE_LINE_DEVICE_HANDLER( update_irq_state )
{
beezer_sound_state *sndstate = get_safe_token(device);
- cputag_set_input_line(device->machine(), "audiocpu", M6809_IRQ_LINE, (sndstate->ptm_irq_state) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(M6809_IRQ_LINE, (sndstate->ptm_irq_state) ? ASSERT_LINE : CLEAR_LINE);
}*/
diff --git a/src/mame/audio/carnival.c b/src/mame/audio/carnival.c
index 7648fcb21b4..406ff929032 100644
--- a/src/mame/audio/carnival.c
+++ b/src/mame/audio/carnival.c
@@ -236,7 +236,7 @@ WRITE8_HANDLER( carnival_audio_2_w )
if ( bitsGoneHigh & OUT_PORT_2_MUSIC_RESET )
/* reset output is no longer asserted active low */
- cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, PULSE_LINE );
+ space->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE );
}
diff --git a/src/mame/audio/cchasm.c b/src/mame/audio/cchasm.c
index 729a3c40cea..4ad0c80f547 100644
--- a/src/mame/audio/cchasm.c
+++ b/src/mame/audio/cchasm.c
@@ -47,7 +47,7 @@ WRITE8_MEMBER(cchasm_state::cchasm_soundlatch4_w)
{
m_sound_flags |= 0x40;
soundlatch4_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "maincpu", 1, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
}
WRITE16_MEMBER(cchasm_state::cchasm_io_w)
@@ -66,7 +66,7 @@ WRITE16_MEMBER(cchasm_state::cchasm_io_w)
m_sound_flags |= 0x80;
soundlatch2_byte_w(space, offset, data);
m_ctc->trg2(1);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
break;
case 2:
//led = data;
diff --git a/src/mame/audio/cyberbal.c b/src/mame/audio/cyberbal.c
index 3f35ac55858..a3097b957a3 100644
--- a/src/mame/audio/cyberbal.c
+++ b/src/mame/audio/cyberbal.c
@@ -59,7 +59,7 @@ WRITE8_MEMBER(cyberbal_state::cyberbal_sound_bank_select_w)
membank("soundbank")->set_base(&m_bank_base[0x1000 * ((data >> 6) & 3)]);
coin_counter_w(machine(), 1, (data >> 5) & 1);
coin_counter_w(machine(), 0, (data >> 4) & 1);
- cputag_set_input_line(machine(), "dac", INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("dac")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
if (!(data & 0x01)) devtag_reset(machine(), "ymsnd");
}
@@ -95,8 +95,8 @@ WRITE8_MEMBER(cyberbal_state::cyberbal_sound_68k_6502_w)
static void update_sound_68k_interrupts(running_machine &machine)
{
cyberbal_state *state = machine.driver_data<cyberbal_state>();
- cputag_set_input_line(machine, "dac", 6, state->m_fast_68k_int ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "dac", 2, state->m_io_68k_int ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("dac")->execute().set_input_line(6, state->m_fast_68k_int ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("dac")->execute().set_input_line(2, state->m_io_68k_int ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c
index 969f4a83111..2bafc7173fe 100644
--- a/src/mame/audio/dkong.c
+++ b/src/mame/audio/dkong.c
@@ -1273,9 +1273,9 @@ static WRITE8_DEVICE_HANDLER( dkong_p1_w )
WRITE8_MEMBER(dkong_state::dkong_audio_irq_w)
{
if (data)
- cputag_set_input_line(machine(), "soundcpu", 0, ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE);
else
- cputag_set_input_line(machine(), "soundcpu", 0, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/audio/exidy.c b/src/mame/audio/exidy.c
index 7638b289ec4..db55ba9830f 100644
--- a/src/mame/audio/exidy.c
+++ b/src/mame/audio/exidy.c
@@ -132,7 +132,7 @@ INLINE exidy_sound_state *get_safe_token(device_t *device)
static WRITE_LINE_DEVICE_HANDLER( update_irq_state )
{
exidy_sound_state *sndstate = get_safe_token(device);
- cputag_set_input_line(device->machine(), "audiocpu", M6502_IRQ_LINE, (sndstate->m_pia1->irq_b_state() | sndstate->m_riot_irq_state) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, (sndstate->m_pia1->irq_b_state() | sndstate->m_riot_irq_state) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -529,7 +529,7 @@ static WRITE8_DEVICE_HANDLER( r6532_porta_w )
{
exidy_sound_state *state = get_safe_token(device);
if (state->m_cvsd != NULL)
- cputag_set_input_line(device->machine(), "cvsdcpu", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
+ device->machine().device("cvsdcpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
if (state->m_tms != NULL)
{
diff --git a/src/mame/audio/exidy440.c b/src/mame/audio/exidy440.c
index 0f39e8034ac..9e6f4f089cf 100644
--- a/src/mame/audio/exidy440.c
+++ b/src/mame/audio/exidy440.c
@@ -377,7 +377,7 @@ static READ8_DEVICE_HANDLER( sound_command_r )
{
exidy440_audio_state *state = get_safe_token(device);
/* clear the FIRQ that got us here and acknowledge the read to the main CPU */
- cputag_set_input_line(device->machine(), "audiocpu", 1, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(1, CLEAR_LINE);
state->sound_command_ack = 1;
return state->sound_command;
@@ -389,7 +389,7 @@ void exidy440_sound_command(device_t *device, UINT8 param)
exidy440_audio_state *state = get_safe_token(device);
state->sound_command = param;
state->sound_command_ack = 0;
- cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_IRQ1, ASSERT_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_IRQ1, ASSERT_LINE);
}
@@ -436,7 +436,7 @@ static WRITE8_DEVICE_HANDLER( sound_volume_w )
static WRITE8_DEVICE_HANDLER( sound_interrupt_clear_w )
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c
index d02f1a81c0a..61773ddb55c 100644
--- a/src/mame/audio/irem.c
+++ b/src/mame/audio/irem.c
@@ -68,7 +68,7 @@ WRITE8_HANDLER( irem_sound_cmd_w )
if ((data & 0x80) == 0)
drvstate->soundlatch_byte_w(*space, 0, data & 0x7f);
else
- cputag_set_input_line(space->machine(), "iremsound", 0, ASSERT_LINE);
+ space->machine().device("iremsound")->execute().set_input_line(0, ASSERT_LINE);
}
@@ -182,7 +182,7 @@ static WRITE8_DEVICE_HANDLER( ay8910_1_porta_w )
static WRITE8_HANDLER( sound_irq_ack_w )
{
- cputag_set_input_line(space->machine(), "iremsound", 0, CLEAR_LINE);
+ space->machine().device("iremsound")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -223,7 +223,7 @@ static void adpcm_int(device_t *device)
{
device_t *adpcm2 = device->machine().device("msm2");
- cputag_set_input_line(device->machine(), "iremsound", INPUT_LINE_NMI, PULSE_LINE);
+ device->machine().device("iremsound")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
/* the first MSM5205 clocks the second */
if (adpcm2 != NULL)
diff --git a/src/mame/audio/jedi.c b/src/mame/audio/jedi.c
index 29ceb3c6f5d..989d6ba994f 100644
--- a/src/mame/audio/jedi.c
+++ b/src/mame/audio/jedi.c
@@ -60,7 +60,7 @@ static SOUND_RESET( jedi )
WRITE8_MEMBER(jedi_state::irq_ack_w)
{
- cputag_set_input_line(machine(), "audiocpu", M6502_IRQ_LINE, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
}
@@ -73,7 +73,7 @@ WRITE8_MEMBER(jedi_state::irq_ack_w)
WRITE8_MEMBER(jedi_state::jedi_audio_reset_w)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mame/audio/leland.c b/src/mame/audio/leland.c
index 12056f7a6ef..d48b6d59ea7 100644
--- a/src/mame/audio/leland.c
+++ b/src/mame/audio/leland.c
@@ -888,7 +888,7 @@ generate_int:
/* generate the appropriate interrupt */
state->m_i80186.intr.poll_status = 0x8000 | new_vector;
if (!state->m_i80186.intr.pending)
- cputag_set_input_line(machine, "audiocpu", 0, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(0, ASSERT_LINE);
state->m_i80186.intr.pending = 1;
if (LOG_INTERRUPTS) logerror("(%f) **** Requesting interrupt vector %02X\n", machine.time().as_double(), new_vector);
}
@@ -1840,14 +1840,14 @@ WRITE8_DEVICE_HANDLER( leland_80186_control_w )
}
/* /RESET */
- cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_RESET, data & 0x80 ? CLEAR_LINE : ASSERT_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, data & 0x80 ? CLEAR_LINE : ASSERT_LINE);
/* /NMI */
/* If the master CPU doesn't get a response by the time it's ready to send
the next command, it uses an NMI to force the issue; unfortunately, this
seems to really screw up the sound system. It turns out it's better to
just wait for the original interrupt to occur naturally */
-/* cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_NMI, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);*/
+/* device->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);*/
/* INT0 */
if (data & 0x20)
diff --git a/src/mame/audio/m72.c b/src/mame/audio/m72.c
index 98469b6ccce..cbc9db06632 100644
--- a/src/mame/audio/m72.c
+++ b/src/mame/audio/m72.c
@@ -117,7 +117,7 @@ static TIMER_CALLBACK( setvector_callback )
if (state->irqvector == 0)
logerror("You didn't call m72_init_sound()\n");
- cputag_set_input_line_and_vector(machine, "soundcpu", 0, (state->irqvector == 0xff) ? CLEAR_LINE : ASSERT_LINE, state->irqvector);
+ machine.device("soundcpu")->execute().set_input_line_and_vector(0, (state->irqvector == 0xff) ? CLEAR_LINE : ASSERT_LINE, state->irqvector);
}
static DEVICE_START( m72_audio )
diff --git a/src/mame/audio/mario.c b/src/mame/audio/mario.c
index 342efd2ad39..bb798c19d4b 100644
--- a/src/mame/audio/mario.c
+++ b/src/mame/audio/mario.c
@@ -400,7 +400,7 @@ static void set_ea(address_space &space, int ea)
{
mario_state *state = space.machine().driver_data<mario_state>();
//printf("ea: %d\n", ea);
- //cputag_set_input_line(machine, "audiocpu", MCS48_INPUT_EA, (ea) ? ASSERT_LINE : CLEAR_LINE);
+ //machine.device("audiocpu")->execute().set_input_line(MCS48_INPUT_EA, (ea) ? ASSERT_LINE : CLEAR_LINE);
if (state->m_eabank != NULL)
state->membank(state->m_eabank)->set_entry(ea);
}
@@ -520,7 +520,7 @@ WRITE8_MEMBER(mario_state::masao_sh_irqtrigger_w)
if (m_last == 1 && data == 0)
{
/* setting bit 0 high then low triggers IRQ on the sound CPU */
- cputag_set_input_line_and_vector(machine(), "audiocpu", 0, HOLD_LINE, 0xff);
+ machine().device("audiocpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
m_last = data;
@@ -553,9 +553,9 @@ WRITE8_MEMBER(mario_state::mario_sh3_w)
{
case 0: /* death */
if (data)
- cputag_set_input_line(machine(), "audiocpu",0,ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0,ASSERT_LINE);
else
- cputag_set_input_line(machine(), "audiocpu",0,CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0,CLEAR_LINE);
break;
case 1: /* get coin */
I8035_T_W_AH(space, 0,data & 1);
diff --git a/src/mame/audio/qix.c b/src/mame/audio/qix.c
index d6c08279619..b41b6636758 100644
--- a/src/mame/audio/qix.c
+++ b/src/mame/audio/qix.c
@@ -133,7 +133,7 @@ static WRITE_LINE_DEVICE_HANDLER( qix_pia_dint )
int combined_state = pia->irq_a_state() | pia->irq_b_state();
/* DINT is connected to the data CPU's IRQ line */
- cputag_set_input_line(device->machine(), "maincpu", M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -143,7 +143,7 @@ static WRITE_LINE_DEVICE_HANDLER( qix_pia_sint )
int combined_state = pia->irq_a_state() | pia->irq_b_state();
/* SINT is connected to the sound CPU's IRQ line */
- cputag_set_input_line(device->machine(), "audiocpu", M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/audio/redalert.c b/src/mame/audio/redalert.c
index 3c6a0bb05d7..bd92e93b95b 100644
--- a/src/mame/audio/redalert.c
+++ b/src/mame/audio/redalert.c
@@ -70,7 +70,7 @@ WRITE8_MEMBER(redalert_state::redalert_audio_command_w)
/* D7 is also connected to the NMI input of the CPU -
the NMI is actually toggled by a 74121 */
if ((data & 0x80) == 0x00)
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -155,7 +155,7 @@ static SOUND_START( redalert_audio )
WRITE8_MEMBER(redalert_state::redalert_voice_command_w)
{
soundlatch2_byte_w(space, 0, (data & 0x78) >> 3);
- cputag_set_input_line(machine(), "voice", I8085_RST75_LINE, (~data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("voice")->execute().set_input_line(I8085_RST75_LINE, (~data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -282,7 +282,7 @@ WRITE8_MEMBER(redalert_state::demoneye_audio_command_w)
{
/* the byte is connected to port A of the AY8910 */
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/audio/scramble.c b/src/mame/audio/scramble.c
index 2e2a287d065..7df1292b781 100644
--- a/src/mame/audio/scramble.c
+++ b/src/mame/audio/scramble.c
@@ -115,18 +115,18 @@ WRITE_LINE_DEVICE_HANDLER( scramble_sh_7474_q_callback )
/* the Q bar is connected to the Z80's INT line. But since INT is complemented, */
/* we need to complement Q bar */
if (device->machine().device("audiocpu"))
- cputag_set_input_line(device->machine(), "audiocpu", 0, !state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, !state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE8_MEMBER(scramble_state::hotshock_sh_irqtrigger_w)
{
- cputag_set_input_line(machine(), "audiocpu", 0, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, ASSERT_LINE);
}
READ8_DEVICE_HANDLER( hotshock_soundlatch_r )
{
driver_device *drvstate = device->machine().driver_data<driver_device>();
- cputag_set_input_line(device->machine(), "audiocpu", 0, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
return drvstate->soundlatch_byte_r(*device->machine().device("audiocpu")->memory().space(AS_PROGRAM),0);
}
diff --git a/src/mame/audio/segag80r.c b/src/mame/audio/segag80r.c
index e2ae5e8c141..f0d1d6ef55a 100644
--- a/src/mame/audio/segag80r.c
+++ b/src/mame/audio/segag80r.c
@@ -973,7 +973,7 @@ static WRITE8_DEVICE_HANDLER( n7751_command_w )
D3 = /INT line
*/
state->m_n7751_command = data & 0x07;
- cputag_set_input_line(device->machine(), "audiocpu", 0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE);
device->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
}
diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c
index 80a2624b7b9..7fdd425b94d 100644
--- a/src/mame/audio/segasnd.c
+++ b/src/mame/audio/segasnd.c
@@ -308,7 +308,7 @@ static TIMER_CALLBACK( delayed_speech_w )
state->latch = data;
/* the high bit goes directly to the INT line */
- cputag_set_input_line(machine, "audiocpu", 0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
/* a clock on the high bit clocks a 1 into T0 */
if (!(old & 0x80) && (data & 0x80))
diff --git a/src/mame/audio/spacefb.c b/src/mame/audio/spacefb.c
index 75502d904a7..5bde6881024 100644
--- a/src/mame/audio/spacefb.c
+++ b/src/mame/audio/spacefb.c
@@ -33,7 +33,7 @@ WRITE8_MEMBER(spacefb_state::spacefb_port_1_w)
{
samples_device *samples = machine().device<samples_device>("samples");
- cputag_set_input_line(machine(), "audiocpu", 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
/* enemy killed */
if (!(data & 0x01) && (m_sound_latch & 0x01)) samples->start(0,0);
diff --git a/src/mame/audio/starwars.c b/src/mame/audio/starwars.c
index 64be07ccf43..9b2ff18462b 100644
--- a/src/mame/audio/starwars.c
+++ b/src/mame/audio/starwars.c
@@ -59,7 +59,7 @@ static WRITE8_DEVICE_HANDLER( r6532_porta_w )
static WRITE_LINE_DEVICE_HANDLER( snd_interrupt )
{
- cputag_set_input_line(device->machine(), "audiocpu", M6809_IRQ_LINE, state);
+ device->machine().device("audiocpu")->execute().set_input_line(M6809_IRQ_LINE, state);
}
@@ -144,5 +144,5 @@ WRITE8_MEMBER(starwars_state::starwars_soundrst_w)
riot6532_porta_in_set(m_riot, 0x00, 0xc0);
/* reset sound CPU here */
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c
index 85cf9e64561..403e967abb2 100644
--- a/src/mame/audio/taito_en.c
+++ b/src/mame/audio/taito_en.c
@@ -234,7 +234,7 @@ SOUND_RESET( taito_en_soundsystem_reset )
/* reset CPU to catch any banking of startup vectors */
machine.device("audiocpu")->reset();
- //cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ //machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
snd_shared_ram = (UINT32 *)machine.root_device().memshare("snd_shared")->ptr();
}
diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c
index 55af70c9706..595062ebb98 100644
--- a/src/mame/drivers/1942.c
+++ b/src/mame/drivers/1942.c
@@ -79,10 +79,10 @@ static TIMER_DEVICE_CALLBACK( c1942_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
if(scanline == 0) // unknown irq event, presumably vblank-in or a periodic one (writes to the soundlatch and drives freeze dip-switch)
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xcf); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
}
diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c
index f8432bbb161..6e04ad41354 100644
--- a/src/mame/drivers/2mindril.c
+++ b/src/mame/drivers/2mindril.c
@@ -186,10 +186,10 @@ WRITE16_MEMBER(_2mindril_state::drill_irq_w)
---- ---- -??- -??? connected to the other levels?
*/
if(((irq_reg & 8) == 0) && data & 8)
- cputag_set_input_line(machine(), "maincpu", 4, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
if(((irq_reg & 0x10) == 0) && data & 0x10)
- cputag_set_input_line(machine(), "maincpu", 5, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(5, CLEAR_LINE);
if(data & 0xffe7)
printf("%04x\n",data);
diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c
index 901f2cf6cc0..17d6f1a9bce 100644
--- a/src/mame/drivers/39in1.c
+++ b/src/mame/drivers/39in1.c
@@ -724,8 +724,8 @@ static void pxa255_update_interrupts(running_machine& machine)
intc_regs->icfp = (intc_regs->icpr & intc_regs->icmr) & intc_regs->iclr;
intc_regs->icip = (intc_regs->icpr & intc_regs->icmr) & (~intc_regs->iclr);
- cputag_set_input_line(machine, "maincpu", ARM7_FIRQ_LINE, intc_regs->icfp ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", ARM7_IRQ_LINE, intc_regs->icip ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_FIRQ_LINE, intc_regs->icfp ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, intc_regs->icip ? ASSERT_LINE : CLEAR_LINE);
}
static void pxa255_set_irq_line(running_machine& machine, UINT32 line, int irq_state)
diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c
index 29e1f9a042d..3abbb0b4ae3 100644
--- a/src/mame/drivers/40love.c
+++ b/src/mame/drivers/40love.c
@@ -1034,7 +1034,7 @@ static MACHINE_RESET( common )
static MACHINE_RESET( 40love )
{
- cputag_set_input_line(machine, "mcu", 0, CLEAR_LINE);
+ machine.device("mcu")->execute().set_input_line(0, CLEAR_LINE);
MACHINE_RESET_CALL(common);
}
diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c
index 183a3bdf135..3f70cc9fc3e 100644
--- a/src/mame/drivers/5clown.c
+++ b/src/mame/drivers/5clown.c
@@ -641,12 +641,12 @@ WRITE8_MEMBER(_5clown_state::trigsnd_w)
if ( (data & 0x0f) == 0x07 )
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, ASSERT_LINE );
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE );
}
else
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, CLEAR_LINE );
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE );
}
}
diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c
index d98897f667f..3ad29ae5fd1 100644
--- a/src/mame/drivers/acefruit.c
+++ b/src/mame/drivers/acefruit.c
@@ -55,7 +55,7 @@ static void acefruit_update_irq(running_machine &machine, int vpos )
switch( color )
{
case 0x0c:
- cputag_set_input_line(machine, "maincpu", 0, HOLD_LINE );
+ machine.device("maincpu")->execute().set_input_line(0, HOLD_LINE );
break;
}
}
diff --git a/src/mame/drivers/acommand.c b/src/mame/drivers/acommand.c
index 5b74eff646e..1894ebbd7e2 100644
--- a/src/mame/drivers/acommand.c
+++ b/src/mame/drivers/acommand.c
@@ -590,10 +590,10 @@ static TIMER_DEVICE_CALLBACK( acommand_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
if(scanline == 0) // vblank-in irq? (update palette and layers)
- cputag_set_input_line(timer.machine(), "maincpu", 3, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
}
static MACHINE_CONFIG_START( acommand, acommand_state )
diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c
index e88f35fdab3..a5c083f0a74 100644
--- a/src/mame/drivers/aeroboto.c
+++ b/src/mame/drivers/aeroboto.c
@@ -51,7 +51,7 @@ static INTERRUPT_GEN( aeroboto_interrupt )
READ8_MEMBER(aeroboto_state::aeroboto_irq_ack_r)
{
- cputag_set_input_line(machine(),"maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
return 0xff;
}
diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c
index 7a258f6218d..044668777b3 100644
--- a/src/mame/drivers/airbustr.c
+++ b/src/mame/drivers/airbustr.c
@@ -553,11 +553,11 @@ static TIMER_DEVICE_CALLBACK( airbustr_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "master", 0, HOLD_LINE, 0xff);
+ timer.machine().device("master")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
/* Pandora "sprite end dma" irq? TODO: timing is likely off */
if(scanline == 64)
- cputag_set_input_line_and_vector(timer.machine(), "master", 0, HOLD_LINE, 0xfd);
+ timer.machine().device("master")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
}
/* Sub Z80 uses IM2 too, but 0xff irq routine just contains an irq ack in it */
diff --git a/src/mame/drivers/alien.c b/src/mame/drivers/alien.c
index b5475873cea..06fa8edcbcd 100644
--- a/src/mame/drivers/alien.c
+++ b/src/mame/drivers/alien.c
@@ -74,7 +74,7 @@ INPUT_PORTS_END
void alien_state::machine_reset()
{
- //cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
+ //machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
static MACHINE_CONFIG_START( alien, alien_state )
diff --git a/src/mame/drivers/arabian.c b/src/mame/drivers/arabian.c
index 73c894ac42d..4e5f73e99cb 100644
--- a/src/mame/drivers/arabian.c
+++ b/src/mame/drivers/arabian.c
@@ -81,8 +81,8 @@ WRITE8_MEMBER(arabian_state::ay8910_portb_w)
bit 0 = coin 1 counter
*/
- cputag_set_input_line(machine(), "mcu", MB88_IRQ_LINE, data & 0x20 ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, data & 0x10 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(MB88_IRQ_LINE, data & 0x20 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(INPUT_LINE_RESET, data & 0x10 ? CLEAR_LINE : ASSERT_LINE);
/* clock the coin counters */
coin_counter_w(machine(), 1, ~data & 0x02);
diff --git a/src/mame/drivers/arcadecl.c b/src/mame/drivers/arcadecl.c
index 3b7dd39ffa8..77a0317d940 100644
--- a/src/mame/drivers/arcadecl.c
+++ b/src/mame/drivers/arcadecl.c
@@ -85,7 +85,7 @@
static void update_interrupts(running_machine &machine)
{
arcadecl_state *state = machine.driver_data<arcadecl_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c
index db4e6b6c42d..811c17b687c 100644
--- a/src/mame/drivers/argus.c
+++ b/src/mame/drivers/argus.c
@@ -134,10 +134,10 @@ static TIMER_DEVICE_CALLBACK( argus_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xd7); /* RST 10h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
if(scanline == 16) // vblank-in irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xcf); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
}
static TIMER_DEVICE_CALLBACK( butasan_scanline )
@@ -145,16 +145,16 @@ static TIMER_DEVICE_CALLBACK( butasan_scanline )
int scanline = param;
if(scanline == 248) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xd7); /* RST 10h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
if(scanline == 8) // vblank-in irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xcf); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
}
/* Handler called by the YM2203 emulator when the internal timers cause an IRQ */
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c
index ed0bb8c2a5e..26f5eb2f12b 100644
--- a/src/mame/drivers/aristmk4.c
+++ b/src/mame/drivers/aristmk4.c
@@ -1521,7 +1521,7 @@ static const ay8910_interface ay8910_config2 =
WRITE8_MEMBER(aristmk4_state::firq)
{
- cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, data ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, data ? ASSERT_LINE : CLEAR_LINE);
}
static const via6522_interface via_interface =
@@ -1672,7 +1672,7 @@ static TIMER_DEVICE_CALLBACK( aristmk4_pf )
if(timer.machine().root_device().ioport("powerfail")->read()) // send NMI signal if L pressed
{
- cputag_set_input_line( timer.machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE );
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE );
}
}
diff --git a/src/mame/drivers/aristmk5.c b/src/mame/drivers/aristmk5.c
index 01f55ada1de..bba42f10e10 100644
--- a/src/mame/drivers/aristmk5.c
+++ b/src/mame/drivers/aristmk5.c
@@ -182,7 +182,7 @@ READ32_MEMBER(aristmk5_state::Ns5x58)
// reset 2KHz timer
m_mk5_2KHz_timer->adjust(attotime::from_hz(1953.125));
ioc_regs[IRQ_STATUS_A] &= ~0x01;
- cputag_set_input_line(machine(), "maincpu", ARM_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(ARM_IRQ_LINE, CLEAR_LINE);
return 0xffffffff;
}
diff --git a/src/mame/drivers/armedf.c b/src/mame/drivers/armedf.c
index 1e1619ebcec..7a5fdeaf905 100644
--- a/src/mame/drivers/armedf.c
+++ b/src/mame/drivers/armedf.c
@@ -332,7 +332,7 @@ WRITE16_MEMBER(armedf_state::terrafb_io_w)
{
if(data & 0x4000 && ((m_vreg & 0x4000) == 0)) //0 -> 1 transition
- cputag_set_input_line(machine(), "extra", 0, HOLD_LINE);
+ machine().device("extra")->execute().set_input_line(0, HOLD_LINE);
COMBINE_DATA(&m_vreg);
@@ -372,12 +372,12 @@ READ8_MEMBER(armedf_state::soundlatch_clear_r)
WRITE16_MEMBER(armedf_state::irq_lv1_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
}
WRITE16_MEMBER(armedf_state::irq_lv2_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
}
diff --git a/src/mame/drivers/artmagic.c b/src/mame/drivers/artmagic.c
index e2a2f2d22e8..7753cd3e8f7 100644
--- a/src/mame/drivers/artmagic.c
+++ b/src/mame/drivers/artmagic.c
@@ -45,8 +45,8 @@
static void update_irq_state(running_machine &machine)
{
artmagic_state *state = machine.driver_data<artmagic_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_tms_irq ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 5, state->m_hack_irq ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_tms_irq ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(5, state->m_hack_irq ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c
index 98ee4f5dde0..e056eb712a8 100644
--- a/src/mame/drivers/astrocde.c
+++ b/src/mame/drivers/astrocde.c
@@ -522,7 +522,7 @@ static const ay8910_interface ay8912_interface =
WRITE8_MEMBER(astrocde_state::tenpindx_sound_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/astrocorp.c b/src/mame/drivers/astrocorp.c
index 1c4b7965218..7446a151d0f 100644
--- a/src/mame/drivers/astrocorp.c
+++ b/src/mame/drivers/astrocorp.c
@@ -513,10 +513,10 @@ static TIMER_DEVICE_CALLBACK( skilldrp_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq. controls sprites, sound, i/o
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
if(scanline == 0) // vblank-in? controls palette
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
}
static MACHINE_CONFIG_START( skilldrp, astrocorp_state )
diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c
index 8a7f2e5bc0d..83dddf9e05d 100644
--- a/src/mame/drivers/asuka.c
+++ b/src/mame/drivers/asuka.c
@@ -771,7 +771,7 @@ GFXDECODE_END
static void irq_handler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
diff --git a/src/mame/drivers/atarig1.c b/src/mame/drivers/atarig1.c
index d2ca18a3a08..eca5cc3d8cb 100644
--- a/src/mame/drivers/atarig1.c
+++ b/src/mame/drivers/atarig1.c
@@ -35,8 +35,8 @@
static void update_interrupts(running_machine &machine)
{
atarig1_state *state = machine.driver_data<atarig1_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/atarig42.c b/src/mame/drivers/atarig42.c
index a261e2370f7..bcd249ca82d 100644
--- a/src/mame/drivers/atarig42.c
+++ b/src/mame/drivers/atarig42.c
@@ -34,8 +34,8 @@
static void update_interrupts(running_machine &machine)
{
atarig42_state *state = machine.driver_data<atarig42_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 5, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(5, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -111,7 +111,7 @@ WRITE16_MEMBER(atarig42_state::io_latch_w)
if (ACCESSING_BITS_0_7)
{
/* bit 4 resets the sound CPU */
- cputag_set_input_line(machine(), "jsa", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("jsa")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
if (!(data & 0x10)) atarijsa_reset();
/* bit 5 is /XRESET, probably related to the ASIC */
diff --git a/src/mame/drivers/atarigt.c b/src/mame/drivers/atarigt.c
index 9ab6993e58b..2c6c3a71f0f 100644
--- a/src/mame/drivers/atarigt.c
+++ b/src/mame/drivers/atarigt.c
@@ -50,9 +50,9 @@ static void cage_irq_callback(running_machine &machine, int reason);
static void update_interrupts(running_machine &machine)
{
atarigt_state *state = machine.driver_data<atarigt_state>();
- cputag_set_input_line(machine, "maincpu", 3, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 6, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/atarigx2.c b/src/mame/drivers/atarigx2.c
index 6e259799271..2d694213191 100644
--- a/src/mame/drivers/atarigx2.c
+++ b/src/mame/drivers/atarigx2.c
@@ -36,8 +36,8 @@
static void update_interrupts(running_machine &machine)
{
atarigx2_state *state = machine.driver_data<atarigx2_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 5, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(5, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -123,7 +123,7 @@ WRITE32_MEMBER(atarigx2_state::latch_w)
/* lower byte */
if (ACCESSING_BITS_16_23)
- cputag_set_input_line(machine(), "jsa", INPUT_LINE_RESET, (data & 0x100000) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("jsa")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x100000) ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mame/drivers/atarisy1.c b/src/mame/drivers/atarisy1.c
index 55787e4f9df..5c37513c45f 100644
--- a/src/mame/drivers/atarisy1.c
+++ b/src/mame/drivers/atarisy1.c
@@ -210,10 +210,10 @@ RoadBlasters (aka Future Vette):005*
static void update_interrupts(running_machine &machine)
{
atarisy1_state *state = machine.driver_data<atarisy1_state>();
- cputag_set_input_line(machine, "maincpu", 2, state->m_joystick_int && state->m_joystick_int_enable ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 3, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_joystick_int && state->m_joystick_int_enable ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/atarisy2.c b/src/mame/drivers/atarisy2.c
index df36d6be3f2..59246c38cbc 100644
--- a/src/mame/drivers/atarisy2.c
+++ b/src/mame/drivers/atarisy2.c
@@ -160,24 +160,24 @@ static void update_interrupts(running_machine &machine)
atarisy2_state *state = machine.driver_data<atarisy2_state>();
if (state->m_video_int_state)
- cputag_set_input_line(machine, "maincpu", 3, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, ASSERT_LINE);
else
- cputag_set_input_line(machine, "maincpu", 3, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
if (state->m_scanline_int_state)
- cputag_set_input_line(machine, "maincpu", 2, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, ASSERT_LINE);
else
- cputag_set_input_line(machine, "maincpu", 2, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
if (state->m_p2portwr_state)
- cputag_set_input_line(machine, "maincpu", 1, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, ASSERT_LINE);
else
- cputag_set_input_line(machine, "maincpu", 1, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
if (state->m_p2portrd_state)
- cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
else
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -283,7 +283,7 @@ WRITE16_MEMBER(atarisy2_state::int1_ack_w)
{
/* reset sound CPU */
if (ACCESSING_BITS_0_7)
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c
index b5d0de204ec..a19c95d6e28 100644
--- a/src/mame/drivers/atarisy4.c
+++ b/src/mame/drivers/atarisy4.c
@@ -482,7 +482,7 @@ WRITE16_MEMBER(atarisy4_state::gpu_w)
gpu.mcr = data;
if (~data & 0x08)
- cputag_set_input_line(machine(), "maincpu", 6, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(6, CLEAR_LINE);
break;
}
@@ -517,7 +517,7 @@ READ16_MEMBER(atarisy4_state::gpu_r)
static INTERRUPT_GEN( vblank_int )
{
if (gpu.mcr & 0x08)
- cputag_set_input_line(device->machine(), "maincpu", 6, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(6, ASSERT_LINE);
}
@@ -562,8 +562,8 @@ READ16_MEMBER(atarisy4_state::dsp0_status_r)
WRITE16_MEMBER(atarisy4_state::dsp0_control_w)
{
- cputag_set_input_line(machine(), "dsp0", INPUT_LINE_RESET, data & 0x01 ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "dsp0", 0, data & 0x02 ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("dsp0")->execute().set_input_line(INPUT_LINE_RESET, data & 0x01 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("dsp0")->execute().set_input_line(0, data & 0x02 ? ASSERT_LINE : CLEAR_LINE);
m_csr[0] = data;
}
@@ -596,8 +596,8 @@ READ16_MEMBER(atarisy4_state::dsp1_status_r)
WRITE16_MEMBER(atarisy4_state::dsp1_control_w)
{
- cputag_set_input_line(machine(), "dsp1", INPUT_LINE_RESET, data & 0x01 ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "dsp1", 0, data & 0x02 ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("dsp1")->execute().set_input_line(INPUT_LINE_RESET, data & 0x01 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("dsp1")->execute().set_input_line(0, data & 0x02 ? ASSERT_LINE : CLEAR_LINE);
m_csr[1] = data;
}
@@ -1001,13 +1001,13 @@ DRIVER_INIT_MEMBER(atarisy4_state,airrace)
static MACHINE_RESET( atarisy4 )
{
- cputag_set_input_line(machine, "dsp0", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp0")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
static MACHINE_RESET( airrace )
{
- cputag_set_input_line(machine, "dsp0", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "dsp1", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp0")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp1")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
diff --git a/src/mame/drivers/atetris.c b/src/mame/drivers/atetris.c
index d92136de342..6048e2310b2 100644
--- a/src/mame/drivers/atetris.c
+++ b/src/mame/drivers/atetris.c
@@ -72,7 +72,7 @@ static TIMER_CALLBACK( interrupt_gen )
int scanline = param;
/* assert/deassert the interrupt */
- cputag_set_input_line(machine, "maincpu", 0, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
/* set the next timer */
scanline += 32;
@@ -84,7 +84,7 @@ static TIMER_CALLBACK( interrupt_gen )
WRITE8_MEMBER(atetris_state::irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/badlands.c b/src/mame/drivers/badlands.c
index 48bedb002f5..0c8c378bcfd 100644
--- a/src/mame/drivers/badlands.c
+++ b/src/mame/drivers/badlands.c
@@ -180,8 +180,8 @@ Measurements -
static void update_interrupts(running_machine &machine)
{
badlands_state *state = machine.driver_data<badlands_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -678,7 +678,7 @@ GFXDECODE_END
static void update_interrupts_bootleg(running_machine &machine)
{
badlands_state *state = machine.driver_data<badlands_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/baraduke.c b/src/mame/drivers/baraduke.c
index 633efbdf48e..6794c056ae5 100644
--- a/src/mame/drivers/baraduke.c
+++ b/src/mame/drivers/baraduke.c
@@ -155,7 +155,7 @@ WRITE8_MEMBER(baraduke_state::baraduke_lamps_w)
WRITE8_MEMBER(baraduke_state::baraduke_irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/batman.c b/src/mame/drivers/batman.c
index d6858cebd3b..accadf81652 100644
--- a/src/mame/drivers/batman.c
+++ b/src/mame/drivers/batman.c
@@ -34,8 +34,8 @@
static void update_interrupts(running_machine &machine)
{
batman_state *state = machine.driver_data<batman_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -103,9 +103,9 @@ WRITE16_MEMBER(batman_state::latch_w)
/* bit 4 is connected to the /RESET pin on the 6502 */
if (m_latch_data & 0x0010)
- cputag_set_input_line(machine(), "jsa", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("jsa")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
else
- cputag_set_input_line(machine(), "jsa", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("jsa")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
/* alpha bank is selected by the upper 4 bits */
if ((oldword ^ m_latch_data) & 0x7000)
diff --git a/src/mame/drivers/battlera.c b/src/mame/drivers/battlera.c
index e817c3ad038..59de81e8bfd 100644
--- a/src/mame/drivers/battlera.c
+++ b/src/mame/drivers/battlera.c
@@ -36,7 +36,7 @@ WRITE8_MEMBER(battlera_state::battlera_sound_w)
if (offset == 0)
{
soundlatch_byte_w(space,0,data);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
}
@@ -92,7 +92,7 @@ static void battlera_adpcm_int(device_t *device)
state->m_toggle = 1 - state->m_toggle;
if (state->m_toggle)
- cputag_set_input_line(device->machine(), "audiocpu", 1, HOLD_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(1, HOLD_LINE);
}
WRITE8_MEMBER(battlera_state::battlera_adpcm_data_w)
diff --git a/src/mame/drivers/battlex.c b/src/mame/drivers/battlex.c
index 70325390cb0..6f101c1a99d 100644
--- a/src/mame/drivers/battlex.c
+++ b/src/mame/drivers/battlex.c
@@ -60,7 +60,7 @@ CUSTOM_INPUT_MEMBER(battlex_state::battlex_in0_b4_r)
UINT32 ret = m_in0_b4;
if (m_in0_b4)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
m_in0_b4 = 0;
}
diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c
index 2a1cbca70f9..d5b59ce0d66 100644
--- a/src/mame/drivers/bbusters.c
+++ b/src/mame/drivers/bbusters.c
@@ -254,7 +254,7 @@ WRITE16_MEMBER(bbusters_state::sound_cpu_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data&0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -639,7 +639,7 @@ GFXDECODE_END
static void sound_irq( device_t *device, int irq )
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2608_interface ym2608_config =
diff --git a/src/mame/drivers/beathead.c b/src/mame/drivers/beathead.c
index 9b98c68c35c..52283dd0265 100644
--- a/src/mame/drivers/beathead.c
+++ b/src/mame/drivers/beathead.c
@@ -154,7 +154,7 @@ static TIMER_DEVICE_CALLBACK( scanline_callback )
/* on scanline zero, clear any halt condition */
if (scanline == 0)
- cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_HALT, CLEAR_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
/* wrap around at 262 */
scanline++;
@@ -222,7 +222,7 @@ void beathead_state::update_interrupts()
{
m_irq_line_state = gen_int;
//if (m_irq_line_state != CLEAR_LINE)
- cputag_set_input_line(machine(), "maincpu", ASAP_IRQ0, m_irq_line_state);
+ machine().device("maincpu")->execute().set_input_line(ASAP_IRQ0, m_irq_line_state);
//else
//asap_set_irq_line(ASAP_IRQ0, m_irq_line_state);
}
@@ -317,7 +317,7 @@ WRITE32_MEMBER( beathead_state::sound_data_w )
WRITE32_MEMBER( beathead_state::sound_reset_w )
{
logerror("Sound reset = %d\n", !offset);
- cputag_set_input_line(machine(), "jsa", INPUT_LINE_RESET, offset ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("jsa")->execute().set_input_line(INPUT_LINE_RESET, offset ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c
index 8e18eebaf84..1381f8c639d 100644
--- a/src/mame/drivers/berzerk.c
+++ b/src/mame/drivers/berzerk.c
@@ -188,7 +188,7 @@ static TIMER_CALLBACK( irq_callback )
/* set the IRQ line if enabled */
if (state->m_irq_enabled)
- cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, 0xfc);
+ machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfc);
/* set up for next interrupt */
next_irq_number = (irq_number + 1) % IRQS_PER_FRAME;
@@ -268,7 +268,7 @@ static TIMER_CALLBACK( nmi_callback )
/* pulse the NMI line if enabled */
if (state->m_nmi_enabled)
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
/* set up for next interrupt */
next_nmi_number = (nmi_number + 1) % NMIS_PER_FRAME;
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index f5526654017..20ee883039d 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -879,7 +879,7 @@ static void update_irqs(running_machine &machine)
if (newstate != state->m_irq_state)
{
state->m_irq_state = newstate;
- cputag_set_input_line(machine, "maincpu", 0, state->m_irq_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, state->m_irq_state ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -1657,7 +1657,7 @@ WRITE_LINE_MEMBER(bfcobra_state::m6809_acia_tx_w)
WRITE_LINE_MEMBER(bfcobra_state::m6809_data_irq)
{
- cputag_set_input_line(machine(), "audiocpu", M6809_IRQ_LINE, state ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6809_IRQ_LINE, state ? CLEAR_LINE : ASSERT_LINE);
}
static ACIA6850_INTERFACE( m6809_acia_if )
diff --git a/src/mame/drivers/bfm_sc1.c b/src/mame/drivers/bfm_sc1.c
index 1ecf9b041fc..3b6793ec4da 100644
--- a/src/mame/drivers/bfm_sc1.c
+++ b/src/mame/drivers/bfm_sc1.c
@@ -611,7 +611,7 @@ WRITE8_MEMBER(bfm_sc1_state::nec_latch_w)
WRITE8_MEMBER(bfm_sc1_state::vid_uart_tx_w)
{
adder2_send(data);
- cputag_set_input_line(machine(), "adder2", M6809_IRQ_LINE, ASSERT_LINE );//HOLD_LINE);// trigger IRQ
+ machine().device("adder2")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE );//HOLD_LINE);// trigger IRQ
}
///////////////////////////////////////////////////////////////////////////
diff --git a/src/mame/drivers/bfm_sc2.c b/src/mame/drivers/bfm_sc2.c
index ebdfcf6a9d9..e385c0db59b 100644
--- a/src/mame/drivers/bfm_sc2.c
+++ b/src/mame/drivers/bfm_sc2.c
@@ -620,7 +620,7 @@ WRITE8_MEMBER(bfm_sc2_state::mmtr_w)
MechMtr_update(i, data & (1 << i) );
}
}
- if ( data & 0x1F ) cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, ASSERT_LINE );
+ if ( data & 0x1F ) machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE );
}
///////////////////////////////////////////////////////////////////////////
@@ -1036,7 +1036,7 @@ WRITE8_MEMBER(bfm_sc2_state::uart2data_w)
WRITE8_MEMBER(bfm_sc2_state::vid_uart_tx_w)
{
adder2_send(data);
- cputag_set_input_line(machine(), "adder2", M6809_IRQ_LINE, HOLD_LINE );
+ machine().device("adder2")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE );
LOG_SERIAL(("sadder %02X (%c)\n",data, data ));
}
diff --git a/src/mame/drivers/big10.c b/src/mame/drivers/big10.c
index f11545374e1..9f52d765de2 100644
--- a/src/mame/drivers/big10.c
+++ b/src/mame/drivers/big10.c
@@ -86,7 +86,7 @@ public:
static void big10_vdp_interrupt(device_t *, v99x8_device &device, int i)
{
- cputag_set_input_line (device.machine(), "maincpu", 0, (i ? ASSERT_LINE : CLEAR_LINE));
+ device.machine().device("maincpu")->execute().set_input_line(0, (i ? ASSERT_LINE : CLEAR_LINE));
}
static TIMER_DEVICE_CALLBACK( big10_interrupt )
diff --git a/src/mame/drivers/bingoc.c b/src/mame/drivers/bingoc.c
index c8d48358677..3981e3fac30 100644
--- a/src/mame/drivers/bingoc.c
+++ b/src/mame/drivers/bingoc.c
@@ -91,7 +91,7 @@ READ8_MEMBER(bingoc_state::sound_test_r)
WRITE16_MEMBER(bingoc_state::main_sound_latch_w)
{
soundlatch_byte_w(space,0,data&0xff);
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
#endif
diff --git a/src/mame/drivers/bionicc.c b/src/mame/drivers/bionicc.c
index ff1fedcdbc6..19f599a6e79 100644
--- a/src/mame/drivers/bionicc.c
+++ b/src/mame/drivers/bionicc.c
@@ -128,10 +128,10 @@ static TIMER_DEVICE_CALLBACK( bionicc_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
if(scanline == 0) // vblank-in or i8751 related irq
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
}
diff --git a/src/mame/drivers/bishi.c b/src/mame/drivers/bishi.c
index 1f81031757e..03f8f8b98f2 100644
--- a/src/mame/drivers/bishi.c
+++ b/src/mame/drivers/bishi.c
@@ -114,10 +114,10 @@ static TIMER_DEVICE_CALLBACK( bishi_scanline )
if (state->m_cur_control & 0x800)
{
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", M68K_IRQ_3, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_3, HOLD_LINE);
if(scanline == 0) // vblank-in irq
- cputag_set_input_line(timer.machine(), "maincpu", M68K_IRQ_4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE);
}
}
diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c
index 019af2e3a3a..b9b09fa0efc 100644
--- a/src/mame/drivers/bking.c
+++ b/src/mame/drivers/bking.c
@@ -169,7 +169,7 @@ WRITE8_MEMBER(bking_state::bking3_68705_port_b_w)
if (~data & 0x02)
{
m_port_a_in = from_main;
- if (main_sent) cputag_set_input_line(machine(), "mcu", 0, CLEAR_LINE);
+ if (main_sent) machine().device("mcu")->execute().set_input_line(0, CLEAR_LINE);
main_sent = 0;
}
@@ -457,7 +457,7 @@ static MACHINE_RESET( bking3 )
{
bking_state *state = machine.driver_data<bking_state>();
- cputag_set_input_line(machine, "mcu", 0, CLEAR_LINE);
+ machine.device("mcu")->execute().set_input_line(0, CLEAR_LINE);
MACHINE_RESET_CALL(bking);
diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c
index 5b166e31a12..c9c847543bd 100644
--- a/src/mame/drivers/bladestl.c
+++ b/src/mame/drivers/bladestl.c
@@ -42,10 +42,10 @@ static TIMER_DEVICE_CALLBACK( bladestl_scanline )
int scanline = param;
if(scanline == 240 && k007342_is_int_enabled(state->m_k007342)) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", HD6309_FIRQ_LINE, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(HD6309_FIRQ_LINE, HOLD_LINE);
if(scanline == 0) // vblank-in or timer irq
- cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/*************************************
diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c
index 6c612891030..e42343d09a8 100644
--- a/src/mame/drivers/blitz68k.c
+++ b/src/mame/drivers/blitz68k.c
@@ -581,7 +581,7 @@ READ16_MEMBER(blitz68k_state::test_r)
WRITE16_MEMBER(blitz68k_state::irq_callback_w)
{
// popmessage("%02x",data);
- cputag_set_input_line(machine(), "maincpu", 3, HOLD_LINE );
+ machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE );
}
WRITE16_MEMBER(blitz68k_state::sound_write_w)
@@ -1647,17 +1647,17 @@ static MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr)
WRITE_LINE_MEMBER(blitz68k_state::crtc_vsync_irq1)
{
- cputag_set_input_line(machine(), "maincpu", 1, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE_LINE_MEMBER(blitz68k_state::crtc_vsync_irq3)
{
- cputag_set_input_line(machine(), "maincpu", 3, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(3, state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE_LINE_MEMBER(blitz68k_state::crtc_vsync_irq5)
{
- cputag_set_input_line(machine(), "maincpu", 5, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(5, state ? ASSERT_LINE : CLEAR_LINE);
}
const mc6845_interface mc6845_intf_irq1 =
diff --git a/src/mame/drivers/blstroid.c b/src/mame/drivers/blstroid.c
index 4a7851875b4..bbd838cf680 100644
--- a/src/mame/drivers/blstroid.c
+++ b/src/mame/drivers/blstroid.c
@@ -35,9 +35,9 @@
static void update_interrupts(running_machine &machine)
{
blstroid_state *state = machine.driver_data<blstroid_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c
index 577b9e3edc1..0e374573a19 100644
--- a/src/mame/drivers/bmcbowl.c
+++ b/src/mame/drivers/bmcbowl.c
@@ -260,7 +260,7 @@ WRITE8_MEMBER(bmcbowl_state::via_ca2_out)
WRITE8_MEMBER(bmcbowl_state::via_irq)
{
- cputag_set_input_line(machine(), "maincpu", 4, data ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, data ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index 9583021a470..f0872239ea7 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -1338,7 +1338,7 @@ static void irq_init(running_machine &machine)
{
bnstars_state *state = machine.driver_data<bnstars_state>();
state->m_irqreq = 0;
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
device_set_irq_callback(machine.device("maincpu"), irq_callback);
}
@@ -1346,7 +1346,7 @@ static void irq_raise(running_machine &machine, int level)
{
bnstars_state *state = machine.driver_data<bnstars_state>();
state->m_irqreq |= (1<<level);
- cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
/* TODO: fix this arrangement (derived from old deprecat lib) */
diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c
index 11016480a34..d154794ab61 100644
--- a/src/mame/drivers/buggychl.c
+++ b/src/mame/drivers/buggychl.c
@@ -379,7 +379,7 @@ static MACHINE_RESET( buggychl )
{
buggychl_state *state = machine.driver_data<buggychl_state>();
- cputag_set_input_line(machine, "mcu", 0, CLEAR_LINE);
+ machine.device("mcu")->execute().set_input_line(0, CLEAR_LINE);
state->m_sound_nmi_enable = 0;
state->m_pending_nmi = 0;
diff --git a/src/mame/drivers/bwidow.c b/src/mame/drivers/bwidow.c
index 9289dc9f2fa..8d4c12757f9 100644
--- a/src/mame/drivers/bwidow.c
+++ b/src/mame/drivers/bwidow.c
@@ -343,7 +343,7 @@ WRITE8_MEMBER(bwidow_state::bwidow_misc_w)
WRITE8_MEMBER(bwidow_state::irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/bwing.c b/src/mame/drivers/bwing.c
index 318e7343513..c32d518041d 100644
--- a/src/mame/drivers/bwing.c
+++ b/src/mame/drivers/bwing.c
@@ -193,12 +193,12 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(bwing_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
INPUT_CHANGED_MEMBER(bwing_state::tilt_pressed)
{
- cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, newval ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( bwing )
diff --git a/src/mame/drivers/byvid.c b/src/mame/drivers/byvid.c
index aae29fa091f..1fb51672b0d 100644
--- a/src/mame/drivers/byvid.c
+++ b/src/mame/drivers/byvid.c
@@ -103,7 +103,7 @@ INPUT_PORTS_END
WRITE_LINE_MEMBER(by133_state::vdp_interrupt)
{
- cputag_set_input_line(machine(), "videocpu", M6809_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("videocpu")->execute().set_input_line(M6809_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
static TMS9928A_INTERFACE(byvid_tms9928a_interface)
diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c
index 9d0a90d5d14..d6f626f96e5 100644
--- a/src/mame/drivers/cabal.c
+++ b/src/mame/drivers/cabal.c
@@ -111,7 +111,7 @@ WRITE16_MEMBER(cabal_state::cabal_sound_irq_trigger_word_w)
WRITE16_MEMBER(cabal_state::cabalbl_sound_irq_trigger_word_w)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE );
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE );
}
@@ -468,7 +468,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface cabalbl_ym2151_interface =
diff --git a/src/mame/drivers/calchase.c b/src/mame/drivers/calchase.c
index e66a6afcf64..9f63852d20e 100644
--- a/src/mame/drivers/calchase.c
+++ b/src/mame/drivers/calchase.c
@@ -236,7 +236,7 @@ WRITE8_MEMBER(calchase_state::at_page8_w)
WRITE_LINE_MEMBER(calchase_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
@@ -824,7 +824,7 @@ static MACHINE_START(calchase)
WRITE_LINE_MEMBER(calchase_state::calchase_pic8259_1_set_int_line)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER(calchase_state::get_slave_ack)
@@ -885,7 +885,7 @@ static MACHINE_RESET(calchase)
static void set_gate_a20(running_machine &machine, int a20)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, a20);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_A20, a20);
}
static void keyboard_interrupt(running_machine &machine, int state)
diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c
index 818ea97ee92..af3e2973f2a 100644
--- a/src/mame/drivers/cave.c
+++ b/src/mame/drivers/cave.c
@@ -1829,7 +1829,7 @@ static const ymz280b_interface ymz280b_intf =
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface ym2151_config =
diff --git a/src/mame/drivers/ccastles.c b/src/mame/drivers/ccastles.c
index a0483b08007..57f1bc69677 100644
--- a/src/mame/drivers/ccastles.c
+++ b/src/mame/drivers/ccastles.c
@@ -229,7 +229,7 @@ static MACHINE_START( ccastles )
static MACHINE_RESET( ccastles )
{
ccastles_state *state = machine.driver_data<ccastles_state>();
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
state->m_irq_state = 0;
}
diff --git a/src/mame/drivers/cchasm.c b/src/mame/drivers/cchasm.c
index 959870f8f83..eb0eaf5bd3d 100644
--- a/src/mame/drivers/cchasm.c
+++ b/src/mame/drivers/cchasm.c
@@ -69,7 +69,7 @@ ADDRESS_MAP_END
WRITE_LINE_MEMBER(cchasm_state::cchasm_6840_irq)
{
- cputag_set_input_line(machine(), "maincpu", 4, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, state ? ASSERT_LINE : CLEAR_LINE);
}
static const ptm6840_interface cchasm_6840_intf =
diff --git a/src/mame/drivers/cclimber.c b/src/mame/drivers/cclimber.c
index f57ee5ca298..2c0ac919d54 100644
--- a/src/mame/drivers/cclimber.c
+++ b/src/mame/drivers/cclimber.c
@@ -217,7 +217,7 @@ Dip location verified from manual for: cclimber, guzzler, swimmer
WRITE8_MEMBER(cclimber_state::swimmer_sh_soundlatch_w)
{
soundlatch_byte_w(space,offset,data);
- cputag_set_input_line_and_vector(machine(), "audiocpu", 0, HOLD_LINE, 0xff);
+ machine().device("audiocpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c
index 16ee897961b..7a11bf839f3 100644
--- a/src/mame/drivers/centiped.c
+++ b/src/mame/drivers/centiped.c
@@ -447,7 +447,7 @@ static TIMER_DEVICE_CALLBACK( generate_interrupt )
/* IRQ is clocked on the rising edge of 16V, equal to the previous 32V */
if (scanline & 16)
- cputag_set_input_line(timer.machine(), "maincpu", 0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE);
/* do a partial update now to handle sprite multiplexing (Maze Invaders) */
timer.machine().primary_screen->update_partial(scanline);
@@ -469,7 +469,7 @@ static MACHINE_RESET( centiped )
{
centiped_state *state = machine.driver_data<centiped_state>();
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
state->m_dsw_select = 0;
state->m_control_select = 0;
state->m_prg_bank = 0;
@@ -489,7 +489,7 @@ static MACHINE_RESET( magworm )
WRITE8_MEMBER(centiped_state::irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/cham24.c b/src/mame/drivers/cham24.c
index 07fbbab99b0..cd2b903bc6b 100644
--- a/src/mame/drivers/cham24.c
+++ b/src/mame/drivers/cham24.c
@@ -280,7 +280,7 @@ static PALETTE_INIT( cham24 )
static void ppu_irq( device_t *device, int *ppu_regs )
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/* our ppu interface */
diff --git a/src/mame/drivers/changela.c b/src/mame/drivers/changela.c
index b48172365f7..d02aee6f8d5 100644
--- a/src/mame/drivers/changela.c
+++ b/src/mame/drivers/changela.c
@@ -407,9 +407,9 @@ TIMER_DEVICE_CALLBACK( changela_scanline )
int scanline = param;
if(scanline == 256) // vblank irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xdf);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xdf);
else if(((scanline % 64) == 0)) // timer irq, 3 times per given vblank field
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xcf);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf);
}
static INTERRUPT_GEN( chl_mcu_irq )
diff --git a/src/mame/drivers/chihiro.c b/src/mame/drivers/chihiro.c
index e2ff5e13a2b..255f1b6d285 100644
--- a/src/mame/drivers/chihiro.c
+++ b/src/mame/drivers/chihiro.c
@@ -1553,7 +1553,7 @@ int ide_baseboard_device::write_sector(UINT32 lba, const void *buffer)
static WRITE_LINE_DEVICE_HANDLER( chihiro_pic8259_1_set_int_line )
{
- cputag_set_input_line(device->machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
static READ8_DEVICE_HANDLER( get_slave_ack )
diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c
index aec3d9cd7f0..d6cca47ce5f 100644
--- a/src/mame/drivers/chqflag.c
+++ b/src/mame/drivers/chqflag.c
@@ -32,9 +32,9 @@ static TIMER_DEVICE_CALLBACK( chqflag_scanline )
int scanline = param;
if(scanline == 240 && k051960_is_irq_enabled(state->m_k051960)) // vblank irq
- cputag_set_input_line(timer.machine(), "maincpu", KONAMI_IRQ_LINE, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
else if(((scanline % 32) == 0) && (k051960_is_nmi_enabled(state->m_k051960))) // timer irq
- cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(chqflag_state::chqflag_bankswitch_w)
diff --git a/src/mame/drivers/cidelsa.c b/src/mame/drivers/cidelsa.c
index e69b11e93ab..26867453793 100644
--- a/src/mame/drivers/cidelsa.c
+++ b/src/mame/drivers/cidelsa.c
@@ -278,7 +278,7 @@ CUSTOM_INPUT_MEMBER(cidelsa_state::cdp1869_pcb_r)
INPUT_CHANGED_MEMBER(cidelsa_state::ef_w)
{
- cputag_set_input_line(machine(), CDP1802_TAG, (int)(FPTR)param, newval);
+ machine().device(CDP1802_TAG)->execute().set_input_line((int)(FPTR)param, newval);
}
static INPUT_PORTS_START( destryer )
diff --git a/src/mame/drivers/circus.c b/src/mame/drivers/circus.c
index 0e9cd6e29fc..edb14c1605d 100644
--- a/src/mame/drivers/circus.c
+++ b/src/mame/drivers/circus.c
@@ -53,7 +53,7 @@ D000 Paddle Position and Interrupt Reset (where applicable)
READ8_MEMBER(circus_state::circus_paddle_r)
{
// also clears irq
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
return ioport("PADDLE")->read();
}
@@ -360,7 +360,7 @@ static TIMER_DEVICE_CALLBACK( crash_scanline )
int scanline = param;
if(scanline == 256 || scanline == 0) // vblank-out / in irq
- cputag_set_input_line(timer.machine(), "maincpu", 0, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
static MACHINE_CONFIG_START( crash, circus_state )
diff --git a/src/mame/drivers/cischeat.c b/src/mame/drivers/cischeat.c
index 20657e6260a..7fc15c788ce 100644
--- a/src/mame/drivers/cischeat.c
+++ b/src/mame/drivers/cischeat.c
@@ -1538,13 +1538,13 @@ static TIMER_DEVICE_CALLBACK( bigrun_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "cpu1", 4, HOLD_LINE);
+ timer.machine().device("cpu1")->execute().set_input_line(4, HOLD_LINE);
if(scanline == 154)
- cputag_set_input_line(timer.machine(), "cpu1", 2, HOLD_LINE);
+ timer.machine().device("cpu1")->execute().set_input_line(2, HOLD_LINE);
if(scanline == 69)
- cputag_set_input_line(timer.machine(), "cpu1", 1, HOLD_LINE);
+ timer.machine().device("cpu1")->execute().set_input_line(1, HOLD_LINE);
}
@@ -1696,10 +1696,10 @@ static TIMER_DEVICE_CALLBACK( scudhamm_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 3, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
if(scanline == 120) // timer irq (clears a flag, presumably sprite DMA end)
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
}
static MACHINE_CONFIG_START( scudhamm, cischeat_state )
@@ -1746,10 +1746,10 @@ static TIMER_DEVICE_CALLBACK( armchamp2_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
if(scanline == 120) // timer irq (TODO: timing)
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
}
static MACHINE_CONFIG_DERIVED( armchmp2, scudhamm )
diff --git a/src/mame/drivers/cliffhgr.c b/src/mame/drivers/cliffhgr.c
index a93dd9ec20e..9e8fedcb441 100644
--- a/src/mame/drivers/cliffhgr.c
+++ b/src/mame/drivers/cliffhgr.c
@@ -161,7 +161,7 @@ WRITE8_MEMBER(cliffhgr_state::cliff_coin_counter_w)
READ8_MEMBER(cliffhgr_state::cliff_irq_ack_r)
{
/* deassert IRQ on the CPU */
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
return 0x00;
}
@@ -206,7 +206,7 @@ static TIMER_CALLBACK( cliff_irq_callback )
if (state->m_phillips_code & 0x800000)
{
// printf("%2d:code = %06X\n", param, phillips_code);
- cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
state->m_irq_timer->adjust(machine.primary_screen->time_until_pos(param * 2), param);
@@ -214,7 +214,7 @@ static TIMER_CALLBACK( cliff_irq_callback )
WRITE_LINE_MEMBER(cliffhgr_state::vdp_interrupt)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/cloak.c b/src/mame/drivers/cloak.c
index 67a1886df6c..899993c86b8 100644
--- a/src/mame/drivers/cloak.c
+++ b/src/mame/drivers/cloak.c
@@ -142,12 +142,12 @@ WRITE8_MEMBER(cloak_state::cloak_custom_w)
WRITE8_MEMBER(cloak_state::cloak_irq_reset_0_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(cloak_state::cloak_irq_reset_1_w)
{
- cputag_set_input_line(machine(), "slave", 0, CLEAR_LINE);
+ machine().device("slave")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(cloak_state::cloak_nvram_enable_w)
diff --git a/src/mame/drivers/cloud9.c b/src/mame/drivers/cloud9.c
index 553be06292d..2585079dffd 100644
--- a/src/mame/drivers/cloud9.c
+++ b/src/mame/drivers/cloud9.c
@@ -194,7 +194,7 @@ static MACHINE_START( cloud9 )
static MACHINE_RESET( cloud9 )
{
cloud9_state *state = machine.driver_data<cloud9_state>();
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
state->m_irq_state = 0;
}
diff --git a/src/mame/drivers/cobra.c b/src/mame/drivers/cobra.c
index 613b85ef40f..2eb40fa6a79 100644
--- a/src/mame/drivers/cobra.c
+++ b/src/mame/drivers/cobra.c
@@ -1231,7 +1231,7 @@ void cobra_state::m2sfifo_event_callback(cobra_fifo::EventType event)
{
case cobra_fifo::EVENT_EMPTY:
{
- cputag_set_input_line(machine(), "subcpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
// give sub cpu a bit more time to stabilize on the current fifo status
device_spin_until_time(machine().device("maincpu"), attotime::from_usec(1));
@@ -1241,7 +1241,7 @@ void cobra_state::m2sfifo_event_callback(cobra_fifo::EventType event)
if (!m_m2s_int_mode)
m_main_int_active |= MAIN_INT_M2S;
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
// EXISR needs to update for the *next* instruction during FIFO tests
@@ -1427,7 +1427,7 @@ WRITE64_MEMBER(cobra_state::main_fifo_w)
if (!m_m2s_int_mode)
m_main_int_active &= ~MAIN_INT_M2S;
- cputag_set_input_line(space.machine(), "subcpu", INPUT_LINE_IRQ0, ASSERT_LINE);
+ space.machine().device("subcpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
// EXISR needs to update for the *next* instruction during FIFO tests
// TODO: try to abort the timeslice before the next instruction?
@@ -1484,7 +1484,7 @@ WRITE64_MEMBER(cobra_state::main_fifo_w)
if ((m_vblank_enable & 0x80) == 0)
{
// clear the interrupt
- cputag_set_input_line(space.machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ space.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
}
if (ACCESSING_BITS_16_23)
@@ -1503,7 +1503,7 @@ WRITE64_MEMBER(cobra_state::main_fifo_w)
m_main_int_active &= ~MAIN_INT_S2M;
// clear the interrupt
- cputag_set_input_line(space.machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ space.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
}
if (ACCESSING_BITS_8_15)
@@ -1529,7 +1529,7 @@ WRITE64_MEMBER(cobra_state::main_fifo_w)
m_main_int_active &= ~MAIN_INT_M2S;
// clear the interrupt
- cputag_set_input_line(space.machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ space.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
}
@@ -1722,7 +1722,7 @@ WRITE32_MEMBER(cobra_state::sub_mainbd_w)
// fire off an interrupt if enabled
if (m_s2m_int_enable & 0x80)
{
- cputag_set_input_line(space.machine(), "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
+ space.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
}
if (ACCESSING_BITS_16_23)
@@ -3192,7 +3192,7 @@ static INTERRUPT_GEN( cobra_vblank )
if (cobra->m_vblank_enable & 0x80)
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
cobra->m_gfx_unk_flag = 0x80;
}
}
diff --git a/src/mame/drivers/compgolf.c b/src/mame/drivers/compgolf.c
index b7e0000ab8a..afd08eb5358 100644
--- a/src/mame/drivers/compgolf.c
+++ b/src/mame/drivers/compgolf.c
@@ -200,7 +200,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "maincpu", 0, linestate);
+ device->machine().device("maincpu")->execute().set_input_line(0, linestate);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c
index 9fb66ab4587..645850c8531 100644
--- a/src/mame/drivers/coolpool.c
+++ b/src/mame/drivers/coolpool.c
@@ -225,7 +225,7 @@ WRITE16_MEMBER(coolpool_state::amerdart_misc_w)
/* bits 10-15 are counted down over time */
- cputag_set_input_line(machine(), "dsp", INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("dsp")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
}
READ16_MEMBER(coolpool_state::amerdart_dsp_bio_line_r)
@@ -251,7 +251,7 @@ READ16_MEMBER(coolpool_state::amerdart_iop_r)
{
// logerror("%08x:IOP read %04x\n",space.device().safe_pc(),m_iop_answer);
- cputag_set_input_line(machine(), "maincpu", 1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
return m_iop_answer;
}
@@ -277,7 +277,7 @@ WRITE16_MEMBER(coolpool_state::amerdart_dsp_answer_w)
// logerror("%08x:DSP answer %04x\n", space.device().safe_pc(), data);
m_iop_answer = data;
- cputag_set_input_line(machine(), "maincpu", 1, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, ASSERT_LINE);
}
@@ -444,7 +444,7 @@ WRITE16_MEMBER(coolpool_state::coolpool_misc_w)
coin_counter_w(machine(), 0, ~data & 0x0001);
coin_counter_w(machine(), 1, ~data & 0x0002);
- cputag_set_input_line(machine(), "dsp", INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("dsp")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -462,7 +462,7 @@ static TIMER_CALLBACK( deferred_iop_w )
state->m_iop_cmd = param;
state->m_cmd_pending = 1;
- cputag_set_input_line(machine, "dsp", 0, HOLD_LINE); /* ??? I have no idea who should generate this! */
+ machine.device("dsp")->execute().set_input_line(0, HOLD_LINE); /* ??? I have no idea who should generate this! */
/* the DSP polls the status bit so it isn't strictly */
/* necessary to also have an IRQ */
machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(50));
@@ -480,7 +480,7 @@ READ16_MEMBER(coolpool_state::coolpool_iop_r)
{
logerror("%08x:IOP read %04x\n",space.device().safe_pc(),m_iop_answer);
- cputag_set_input_line(machine(), "maincpu", 1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
return m_iop_answer;
}
@@ -508,7 +508,7 @@ WRITE16_MEMBER(coolpool_state::dsp_answer_w)
logerror("%08x:IOP answer %04x\n", space.device().safe_pc(), data);
m_iop_answer = data;
- cputag_set_input_line(machine(), "maincpu", 1, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, ASSERT_LINE);
}
diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c
index 4bdfc47a3c7..438373f4bcd 100644
--- a/src/mame/drivers/coolridr.c
+++ b/src/mame/drivers/coolridr.c
@@ -1157,8 +1157,8 @@ static TIMER_DEVICE_CALLBACK( system_h1_sub )
static MACHINE_RESET ( coolridr )
{
-// cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
- cputag_set_input_line(machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
+// machine.device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("soundcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
static MACHINE_CONFIG_START( coolridr, coolridr_state )
diff --git a/src/mame/drivers/corona.c b/src/mame/drivers/corona.c
index 1640c0cb89f..73cbf075859 100644
--- a/src/mame/drivers/corona.c
+++ b/src/mame/drivers/corona.c
@@ -490,12 +490,12 @@ static SCREEN_UPDATE_IND16(luckyrlt)
WRITE8_MEMBER(corona_state::sound_latch_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "soundcpu", 0, ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE);
}
READ8_MEMBER(corona_state::sound_latch_r)
{
- cputag_set_input_line(machine(), "soundcpu", 0, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
return soundlatch_byte_r(space, 0);
}
diff --git a/src/mame/drivers/cosmic.c b/src/mame/drivers/cosmic.c
index 0d5b0394208..765a85a9632 100644
--- a/src/mame/drivers/cosmic.c
+++ b/src/mame/drivers/cosmic.c
@@ -472,7 +472,7 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER(cosmic_state::cosmica_coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( cosmica )
@@ -527,7 +527,7 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER(cosmic_state::cosmicg_coin_inserted)
{
- cputag_set_input_line_and_vector(machine(), "maincpu", 0, newval ? ASSERT_LINE : CLEAR_LINE, 6);
+ machine().device("maincpu")->execute().set_input_line_and_vector(0, newval ? ASSERT_LINE : CLEAR_LINE, 6);
}
static INPUT_PORTS_START( cosmicg )
@@ -574,12 +574,12 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER(cosmic_state::coin_inserted_irq0)
{
- cputag_set_input_line(machine(), "maincpu", 0, newval ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, newval ? HOLD_LINE : CLEAR_LINE);
}
INPUT_CHANGED_MEMBER(cosmic_state::coin_inserted_nmi)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( magspot )
@@ -1007,10 +1007,10 @@ static TIMER_DEVICE_CALLBACK( panic_scanline )
int scanline = param;
if(scanline == 224) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xd7); /* RST 10h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
if(scanline == 0) // vblank-in irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xcf); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
}
diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c
index 6b379ca8963..5b61b7afd0f 100644
--- a/src/mame/drivers/cps1.c
+++ b/src/mame/drivers/cps1.c
@@ -3186,7 +3186,7 @@ static void m5205_int1(device_t *device)
// sample_buffer1 >>= 4;
// sample_select1 ^= 1;
// if (sample_select1 == 0)
-// cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+// machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static void m5205_int2(device_t *device)
diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c
index 3f503d96d79..ae411ea617c 100644
--- a/src/mame/drivers/cps3.c
+++ b/src/mame/drivers/cps3.c
@@ -1786,7 +1786,7 @@ WRITE32_MEMBER(cps3_state::cps3_palettedma_w)
}
- cputag_set_input_line(machine(), "maincpu", 10, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(10, ASSERT_LINE);
}
@@ -2001,14 +2001,14 @@ static void cps3_process_character_dma(running_machine &machine, UINT32 address)
/* We should probably copy this, but a pointer to it is fine for our purposes as the data doesn't change */
state->m_current_table_address = real_source;
}
- cputag_set_input_line(machine, "maincpu", 10, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(10, ASSERT_LINE);
}
else if ((dat1 & 0x00e00000) == 0x00400000)
{
/* 6bpp DMA decompression
- this is used for the majority of sprites and backgrounds */
cps3_do_char_dma( machine, real_source, real_destination, real_length );
- cputag_set_input_line(machine, "maincpu", 10, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(10, ASSERT_LINE);
}
else if ((dat1 & 0x00e00000) == 0x00600000)
@@ -2016,7 +2016,7 @@ static void cps3_process_character_dma(running_machine &machine, UINT32 address)
/* 8bpp DMA decompression
- this is used on SFIII NG Sean's Stage ONLY */
cps3_do_alt_char_dma( machine, real_source, real_destination, real_length);
- cputag_set_input_line(machine, "maincpu", 10, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(10, ASSERT_LINE);
}
else
{
@@ -2074,12 +2074,12 @@ WRITE32_MEMBER(cps3_state::cps3_characterdma_w)
WRITE32_MEMBER(cps3_state::cps3_irq10_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 10, CLEAR_LINE); return;
+ machine().device("maincpu")->execute().set_input_line(10, CLEAR_LINE); return;
}
WRITE32_MEMBER(cps3_state::cps3_irq12_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 12, CLEAR_LINE); return;
+ machine().device("maincpu")->execute().set_input_line(12, CLEAR_LINE); return;
}
WRITE32_MEMBER(cps3_state::cps3_unk_vidregs_w)
diff --git a/src/mame/drivers/cshooter.c b/src/mame/drivers/cshooter.c
index 84119efb1cc..852f2ce2252 100644
--- a/src/mame/drivers/cshooter.c
+++ b/src/mame/drivers/cshooter.c
@@ -205,10 +205,10 @@ static TIMER_DEVICE_CALLBACK( cshooter_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0x10); /* RST 10h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x10); /* RST 10h */
if(scanline == 0) // vblank-in irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0x08); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */
}
diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c
index f1c7e18f37b..b495086936f 100644
--- a/src/mame/drivers/cubeqst.c
+++ b/src/mame/drivers/cubeqst.c
@@ -280,9 +280,9 @@ static void swap_linecpu_banks(running_machine &machine)
*/
WRITE16_MEMBER(cubeqst_state::reset_w)
{
- cputag_set_input_line(machine(), "rotate_cpu", INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "line_cpu", INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "sound_cpu", INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("rotate_cpu")->execute().set_input_line(INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("line_cpu")->execute().set_input_line(INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sound_cpu")->execute().set_input_line(INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
/* Swap stack and pointer RAM banks on rising edge of display reset */
if (!BIT(m_reset_latch, 0) && BIT(data, 0))
@@ -451,9 +451,9 @@ static MACHINE_RESET( cubeqst )
state->m_reset_latch = 0;
/* Auxillary CPUs are held in reset */
- cputag_set_input_line(machine, "sound_cpu", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "rotate_cpu", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "line_cpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("sound_cpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("rotate_cpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("line_cpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
diff --git a/src/mame/drivers/cyberbal.c b/src/mame/drivers/cyberbal.c
index 5933bf10ff0..45a4d15411c 100644
--- a/src/mame/drivers/cyberbal.c
+++ b/src/mame/drivers/cyberbal.c
@@ -39,8 +39,8 @@
static void update_interrupts(running_machine &machine)
{
cyberbal_state *state = machine.driver_data<cyberbal_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "extra", 1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("extra")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -71,15 +71,15 @@ static MACHINE_RESET( cyberbal )
cyberbal_sound_reset(machine);
/* Extra CPU (second M68k) doesn't run until reset */
- cputag_set_input_line(machine, "extra", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("extra")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
static void cyberbal2p_update_interrupts(running_machine &machine)
{
cyberbal_state *state = machine.driver_data<cyberbal_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 3, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -134,7 +134,7 @@ READ16_MEMBER(cyberbal_state::sound_state_r)
WRITE16_MEMBER(cyberbal_state::p2_reset_w)
{
- cputag_set_input_line(machine(), "extra", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
diff --git a/src/mame/drivers/cybertnk.c b/src/mame/drivers/cybertnk.c
index ecd13e861d5..3bd3917d837 100644
--- a/src/mame/drivers/cybertnk.c
+++ b/src/mame/drivers/cybertnk.c
@@ -531,7 +531,7 @@ WRITE8_MEMBER( cybertnk_state::cybertnk_sound_cmd_w )
else if (offset == 1)
{
soundlatch_byte_w(space, offset, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
}
@@ -572,7 +572,7 @@ WRITE8_MEMBER( cybertnk_state::cybertnk_irq_ack_w )
}
else if (offset == 1)
{
- cputag_set_input_line(machine(), "maincpu", 1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
}
}
diff --git a/src/mame/drivers/darkmist.c b/src/mame/drivers/darkmist.c
index eab243bd95c..bc2eb57b2d0 100644
--- a/src/mame/drivers/darkmist.c
+++ b/src/mame/drivers/darkmist.c
@@ -218,10 +218,10 @@ static TIMER_DEVICE_CALLBACK( darkmist_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0x10); /* RST 10h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x10); /* RST 10h */
if(scanline == 0) // vblank-in irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0x08); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */
}
diff --git a/src/mame/drivers/darkseal.c b/src/mame/drivers/darkseal.c
index c43e5f8f027..80b14ed5868 100644
--- a/src/mame/drivers/darkseal.c
+++ b/src/mame/drivers/darkseal.c
@@ -33,7 +33,7 @@ WRITE16_MEMBER(darkseal_state::darkseal_control_w)
return;
case 8: /* Sound CPU write */
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
return;
case 0xa: /* IRQ Ack (VBL) */
return;
@@ -224,7 +224,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "audiocpu", 1, state); /* IRQ 2 */
+ device->machine().device("audiocpu")->execute().set_input_line(1, state); /* IRQ 2 */
}
static const ym2151_interface ym2151_config =
diff --git a/src/mame/drivers/dbz.c b/src/mame/drivers/dbz.c
index 7df281992b7..815c7fe7150 100644
--- a/src/mame/drivers/dbz.c
+++ b/src/mame/drivers/dbz.c
@@ -67,10 +67,10 @@ static TIMER_DEVICE_CALLBACK( dbz_scanline )
int scanline = param;
if(scanline == 256) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", M68K_IRQ_2, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_2, ASSERT_LINE);
if(scanline == 0 && k053246_is_irq_enabled(state->m_k053246)) // vblank-in irq
- cputag_set_input_line(timer.machine(), "maincpu", M68K_IRQ_4, HOLD_LINE); //auto-acks apparently
+ timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); //auto-acks apparently
}
#if 0
@@ -333,7 +333,7 @@ static const k053936_interface dbz_k053936_intf =
WRITE_LINE_MEMBER(dbz_state::dbz_irq2_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", M68K_IRQ_2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M68K_IRQ_2, CLEAR_LINE);
}
diff --git a/src/mame/drivers/deadang.c b/src/mame/drivers/deadang.c
index 57a78fc2b54..18ce8d04f9b 100644
--- a/src/mame/drivers/deadang.c
+++ b/src/mame/drivers/deadang.c
@@ -211,10 +211,10 @@ static TIMER_DEVICE_CALLBACK( deadang_main_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xc4/4);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc4/4);
if(scanline == 0) // vblank-in irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xc8/4);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc8/4);
}
static TIMER_DEVICE_CALLBACK( deadang_sub_scanline )
@@ -222,10 +222,10 @@ static TIMER_DEVICE_CALLBACK( deadang_sub_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "sub", 0, HOLD_LINE,0xc4/4);
+ timer.machine().device("sub")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc4/4);
if(scanline == 0) // vblank-in irq
- cputag_set_input_line_and_vector(timer.machine(), "sub", 0, HOLD_LINE,0xc8/4);
+ timer.machine().device("sub")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc8/4);
}
/* Machine Drivers */
diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c
index f9bf5bf45b7..dcd60b89f14 100644
--- a/src/mame/drivers/dec0.c
+++ b/src/mame/drivers/dec0.c
@@ -187,7 +187,7 @@ WRITE16_MEMBER(dec0_state::dec0_control_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
break;
@@ -196,7 +196,7 @@ WRITE16_MEMBER(dec0_state::dec0_control_w)
break;
case 8: /* Interrupt ack (VBL - IRQ 6) */
- cputag_set_input_line(machine(), "maincpu", 6, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(6, CLEAR_LINE);
break;
case 0xa: /* Mix Psel(?). */
@@ -226,7 +226,7 @@ WRITE16_MEMBER(dec0_automat_state::automat_control_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
break;
@@ -259,7 +259,7 @@ WRITE16_MEMBER(dec0_state::slyspy_control_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
break;
case 2:
@@ -273,7 +273,7 @@ WRITE16_MEMBER(dec0_state::midres_sound_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -1287,12 +1287,12 @@ GFXDECODE_END
static void sound_irq(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, linestate); /* IRQ */
+ device->machine().device("audiocpu")->execute().set_input_line(0, linestate); /* IRQ */
}
static void sound_irq2(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "audiocpu", 1, linestate); /* IRQ2 */
+ device->machine().device("audiocpu")->execute().set_input_line(1, linestate); /* IRQ2 */
}
static const ym3812_interface ym3812_config =
@@ -1385,7 +1385,7 @@ static void automat_vclk_cb(device_t *device)
else
{
msm5205_data_w(device, state->m_automat_adpcm_byte >> 4);
- //cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); // gives some scratch samples but breaks other sounds too
+ //device->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); // gives some scratch samples but breaks other sounds too
}
state->m_automat_msm5205_vclk_toggle ^= 1;
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index 78ee8a39e36..fcf01f80a8f 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -279,7 +279,7 @@ static const deco16ic_interface fghthist_deco16ic_tilegen2_intf =
static TIMER_DEVICE_CALLBACK( interrupt_gen )
{
- cputag_set_input_line(timer.machine(), "maincpu", ARM_IRQ_LINE, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE);
}
READ32_MEMBER(deco32_state::deco32_irq_controller_r)
@@ -289,7 +289,7 @@ READ32_MEMBER(deco32_state::deco32_irq_controller_r)
switch (offset)
{
case 2: /* Raster IRQ ACK - value read is not used */
- cputag_set_input_line(machine(), "maincpu", ARM_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(ARM_IRQ_LINE, CLEAR_LINE);
return 0;
case 3: /* Irq controller
@@ -345,7 +345,7 @@ WRITE32_MEMBER(deco32_state::deco32_irq_controller_w)
WRITE32_MEMBER(deco32_state::deco32_sound_w)
{
soundlatch_byte_w(space,0,data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
READ32_MEMBER(deco32_state::deco32_71_r)
@@ -674,7 +674,7 @@ WRITE32_MEMBER(deco32_state::nslasher_prot_w)
/* bit 1 of nslasher_sound_irq specifies IRQ command writes */
soundlatch_byte_w(space,0,(data>>16)&0xff);
m_nslasher_sound_irq |= 0x02;
- cputag_set_input_line(machine(), "audiocpu", 0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -1017,7 +1017,7 @@ READ8_MEMBER(deco32_state::latch_r)
{
/* bit 1 of nslasher_sound_irq specifies IRQ command writes */
m_nslasher_sound_irq &= ~0x02;
- cputag_set_input_line(machine(), "audiocpu", 0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
return soundlatch_byte_r(space,0);
}
@@ -1623,7 +1623,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "audiocpu", 1, state); /* IRQ 2 */
+ device->machine().device("audiocpu")->execute().set_input_line(1, state); /* IRQ 2 */
}
static void sound_irq_nslasher(device_t *device, int state)
@@ -1634,7 +1634,7 @@ static void sound_irq_nslasher(device_t *device, int state)
drvstate->m_nslasher_sound_irq |= 0x01;
else
drvstate->m_nslasher_sound_irq &= ~0x01;
- cputag_set_input_line(device->machine(), "audiocpu", 0, (drvstate->m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, (drvstate->m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
}
WRITE8_MEMBER(deco32_state::sound_bankswitch_w)
diff --git a/src/mame/drivers/deco_mlc.c b/src/mame/drivers/deco_mlc.c
index 1c24609e568..cf919d4aa57 100644
--- a/src/mame/drivers/deco_mlc.c
+++ b/src/mame/drivers/deco_mlc.c
@@ -171,7 +171,7 @@ static TIMER_DEVICE_CALLBACK( interrupt_gen )
{
deco_mlc_state *state = timer.machine().driver_data<deco_mlc_state>();
// logerror("hit scanline IRQ %d (%08x)\n", machine.primary_screen->vpos(), info.i);
- cputag_set_input_line(timer.machine(), "maincpu", state->m_mainCpuIsArm ? ARM_IRQ_LINE : 1, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(state->m_mainCpuIsArm ? ARM_IRQ_LINE : 1, HOLD_LINE);
}
WRITE32_MEMBER(deco_mlc_state::mlc_irq_w)
@@ -182,7 +182,7 @@ WRITE32_MEMBER(deco_mlc_state::mlc_irq_w)
switch (offset*4)
{
case 0x10: /* IRQ ack. Value written doesn't matter */
- cputag_set_input_line(machine(), "maincpu", m_mainCpuIsArm ? ARM_IRQ_LINE : 1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(m_mainCpuIsArm ? ARM_IRQ_LINE : 1, CLEAR_LINE);
return;
case 0x14: /* Prepare scanline interrupt */
m_raster_irq_timer->adjust(machine().primary_screen->time_until_pos(m_irq_ram[0x14/4]));
diff --git a/src/mame/drivers/deniam.c b/src/mame/drivers/deniam.c
index bb71da81e8f..38a33af3b8a 100644
--- a/src/mame/drivers/deniam.c
+++ b/src/mame/drivers/deniam.c
@@ -76,7 +76,7 @@ WRITE16_MEMBER(deniam_state::deniam16c_oki_rom_bank_w)
WRITE16_MEMBER(deniam_state::deniam_irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 4, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
}
static ADDRESS_MAP_START( deniam16b_map, AS_PROGRAM, 16, deniam_state )
diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c
index 9e761d17dd8..904e48ff15b 100644
--- a/src/mame/drivers/djboy.c
+++ b/src/mame/drivers/djboy.c
@@ -504,11 +504,11 @@ static TIMER_DEVICE_CALLBACK( djboy_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xfd);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
/* Pandora "sprite end dma" irq? TODO: timing is clearly off, attract mode relies on this */
if(scanline == 64)
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xff);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
static const kaneko_pandora_interface djboy_pandora_config =
diff --git a/src/mame/drivers/djmain.c b/src/mame/drivers/djmain.c
index b7bec7dd04e..739ddbd7da3 100644
--- a/src/mame/drivers/djmain.c
+++ b/src/mame/drivers/djmain.c
@@ -199,7 +199,7 @@ WRITE32_MEMBER(djmain_state::v_ctrl_w)
if (m_pending_vb_int && !(!(m_v_ctrl & 0x8000))) // #define DISABLE_VB_INT (!(state->m_v_ctrl & 0x8000))
{
m_pending_vb_int = 0;
- cputag_set_input_line(machine(), "maincpu", M68K_IRQ_4, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE);
}
}
}
@@ -417,12 +417,12 @@ static void ide_interrupt(device_t *device, int state)
if (state != CLEAR_LINE)
{
//logerror("IDE interrupt asserted\n");
- cputag_set_input_line(device->machine(), "maincpu", M68K_IRQ_1, HOLD_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(M68K_IRQ_1, HOLD_LINE);
}
else
{
//logerror("IDE interrupt cleared\n");
- cputag_set_input_line(device->machine(), "maincpu", M68K_IRQ_1, CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(M68K_IRQ_1, CLEAR_LINE);
}
}
diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c
index cda237ac582..bce5a08f913 100644
--- a/src/mame/drivers/dlair.c
+++ b/src/mame/drivers/dlair.c
@@ -147,7 +147,7 @@ static const UINT8 led_map[16] =
static void dleuro_interrupt(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "maincpu", 0, state);
+ device->machine().device("maincpu")->execute().set_input_line(0, state);
}
diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c
index 2d449441f7d..55611e60392 100644
--- a/src/mame/drivers/dmndrby.c
+++ b/src/mame/drivers/dmndrby.c
@@ -84,7 +84,7 @@ public:
WRITE8_MEMBER(dmndrby_state::dderby_sound_w)
{
soundlatch_byte_w(space,0,data);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
@@ -499,12 +499,12 @@ static PALETTE_INIT( dmnderby )
/*Main Z80 is IM 0,HW-latched irqs. */
static INTERRUPT_GEN( dderby_irq )
{
- cputag_set_input_line_and_vector(device->machine(), "maincpu", 0, HOLD_LINE, 0xd7); /* RST 10h */
+ device->machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
}
static INTERRUPT_GEN( dderby_timer_irq )
{
- cputag_set_input_line_and_vector(device->machine(), "maincpu", 0, HOLD_LINE, 0xcf); /* RST 08h */
+ device->machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
}
static MACHINE_CONFIG_START( dderby, dmndrby_state )
diff --git a/src/mame/drivers/dooyong.c b/src/mame/drivers/dooyong.c
index ee7674c9d24..0ebca5c2ecc 100644
--- a/src/mame/drivers/dooyong.c
+++ b/src/mame/drivers/dooyong.c
@@ -776,21 +776,21 @@ READ8_MEMBER(dooyong_state::unk_r)
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static void irqhandler_2203_1(device_t *device, int irq)
{
dooyong_state *state = device->machine().driver_data<dooyong_state>();
state->m_interrupt_line_1=irq;
- cputag_set_input_line(device->machine(), "audiocpu", 0, (state->m_interrupt_line_1 | state->m_interrupt_line_2) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, (state->m_interrupt_line_1 | state->m_interrupt_line_2) ? ASSERT_LINE : CLEAR_LINE);
}
static void irqhandler_2203_2(device_t *device, int irq)
{
dooyong_state *state = device->machine().driver_data<dooyong_state>();
state->m_interrupt_line_2=irq;
- cputag_set_input_line(device->machine(), "audiocpu", 0, (state->m_interrupt_line_1 | state->m_interrupt_line_2) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, (state->m_interrupt_line_1 | state->m_interrupt_line_2) ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_interface_1 =
@@ -1068,10 +1068,10 @@ static TIMER_DEVICE_CALLBACK( rshark_scanline )
int scanline = param;
if(scanline == 248) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 5, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
if(scanline == 120) // timer irq?
- cputag_set_input_line(timer.machine(), "maincpu", 6, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(6, HOLD_LINE);
}
diff --git a/src/mame/drivers/ecoinfr.c b/src/mame/drivers/ecoinfr.c
index 4ceba485368..9954e482e6c 100644
--- a/src/mame/drivers/ecoinfr.c
+++ b/src/mame/drivers/ecoinfr.c
@@ -109,11 +109,11 @@ TIMER_DEVICE_CALLBACK( ecoinfr_irq_timer )
if (state->irq_toggle==0)
{
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xe4);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xe4);
}
else
{
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xe0);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xe0);
}
diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c
index b924b2f43d8..4b9db76f277 100644
--- a/src/mame/drivers/enigma2.c
+++ b/src/mame/drivers/enigma2.c
@@ -176,7 +176,7 @@ static MACHINE_START( enigma2 )
static MACHINE_RESET( enigma2 )
{
enigma2_state *state = machine.driver_data<enigma2_state>();
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
state->m_last_sound_data = 0;
state->m_flip_screen = 0;
diff --git a/src/mame/drivers/eolith.c b/src/mame/drivers/eolith.c
index 066bc04b048..5a32f1f61d4 100644
--- a/src/mame/drivers/eolith.c
+++ b/src/mame/drivers/eolith.c
@@ -1435,7 +1435,7 @@ ROM_END
static MACHINE_RESET( eolith )
{
- cputag_set_input_line(machine, "soundcpu", MCS51_INT1_LINE, ASSERT_LINE);
+ machine.device("soundcpu")->execute().set_input_line(MCS51_INT1_LINE, ASSERT_LINE);
}
DRIVER_INIT_MEMBER(eolith_state,eolith)
diff --git a/src/mame/drivers/eprom.c b/src/mame/drivers/eprom.c
index 302a87a347f..ec0e167ec50 100644
--- a/src/mame/drivers/eprom.c
+++ b/src/mame/drivers/eprom.c
@@ -41,12 +41,12 @@ static void update_interrupts(running_machine &machine)
{
eprom_state *state = machine.driver_data<eprom_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
if (machine.device("extra") != NULL)
- cputag_set_input_line(machine, "extra", 4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("extra")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -110,9 +110,9 @@ WRITE16_MEMBER(eprom_state::eprom_latch_w)
{
/* bit 0: reset extra CPU */
if (data & 1)
- cputag_set_input_line(machine(), "extra", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
else
- cputag_set_input_line(machine(), "extra", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
/* bits 1-4: screen intensity */
m_screen_intensity = (data & 0x1e) >> 1;
diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c
index 9eb9ad5698e..b2b5e167eff 100644
--- a/src/mame/drivers/equites.c
+++ b/src/mame/drivers/equites.c
@@ -582,10 +582,10 @@ static TIMER_DEVICE_CALLBACK( equites_scanline )
int scanline = param;
if(scanline == 232) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 1, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
if(scanline == 24) // vblank-in irq
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
}
static TIMER_DEVICE_CALLBACK( splndrbt_scanline )
@@ -593,10 +593,10 @@ static TIMER_DEVICE_CALLBACK( splndrbt_scanline )
int scanline = param;
if(scanline == 224) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 1, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
if(scanline == 32) // vblank-in irq
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
}
WRITE8_MEMBER(equites_state::equites_8155_w)
diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c
index 58beea19d66..35050d61575 100644
--- a/src/mame/drivers/esh.c
+++ b/src/mame/drivers/esh.c
@@ -147,9 +147,9 @@ WRITE8_MEMBER(esh_state::led_writes)
WRITE8_MEMBER(esh_state::nmi_line_w)
{
if (data == 0x00)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
if (data == 0x01)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
if (data != 0x00 && data != 0x01)
logerror("NMI line got a weird value!\n");
@@ -278,7 +278,7 @@ GFXDECODE_END
static TIMER_CALLBACK( irq_stop )
{
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
static INTERRUPT_GEN( vblank_callback_esh )
diff --git a/src/mame/drivers/espial.c b/src/mame/drivers/espial.c
index 98dd2b0032c..207ce2e061e 100644
--- a/src/mame/drivers/espial.c
+++ b/src/mame/drivers/espial.c
@@ -83,10 +83,10 @@ static TIMER_DEVICE_CALLBACK( espial_scanline )
int scanline = param;
if(scanline == 240 && state->m_main_nmi_enabled) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
if(scanline == 16) // timer irq, checks soundlatch port then updates some sound related work RAM buffers
- cputag_set_input_line(timer.machine(), "maincpu", 0, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/esripsys.c b/src/mame/drivers/esripsys.c
index 893315be497..b2a96ef963d 100644
--- a/src/mame/drivers/esripsys.c
+++ b/src/mame/drivers/esripsys.c
@@ -43,7 +43,7 @@
WRITE_LINE_MEMBER(esripsys_state::ptm_irq)
{
- cputag_set_input_line(machine(), "sound_cpu", M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("sound_cpu")->execute().set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
static const ptm6840_interface ptm_intf =
@@ -111,14 +111,14 @@ WRITE8_MEMBER(esripsys_state::g_status_w)
bankaddress = 0x10000 + (data & 0x03) * 0x10000;
membank("bank1")->set_base(&rom[bankaddress]);
- cputag_set_input_line(machine(), "frame_cpu", M6809_FIRQ_LINE, data & 0x10 ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "frame_cpu", INPUT_LINE_NMI, data & 0x80 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("frame_cpu")->execute().set_input_line(M6809_FIRQ_LINE, data & 0x10 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("frame_cpu")->execute().set_input_line(INPUT_LINE_NMI, data & 0x80 ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "video_cpu", INPUT_LINE_RESET, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("video_cpu")->execute().set_input_line(INPUT_LINE_RESET, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);
/* /VBLANK IRQ acknowledge */
if (!(data & 0x20))
- cputag_set_input_line(machine(), "game_cpu", M6809_IRQ_LINE, CLEAR_LINE);
+ machine().device("game_cpu")->execute().set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
@@ -347,7 +347,7 @@ WRITE8_MEMBER(esripsys_state::g_ioadd_w)
}
case 0x02:
{
- cputag_set_input_line(machine(), "sound_cpu", INPUT_LINE_NMI, m_g_iodata & 4 ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sound_cpu")->execute().set_input_line(INPUT_LINE_NMI, m_g_iodata & 4 ? CLEAR_LINE : ASSERT_LINE);
if (!(m_g_to_s_latch2 & 1) && (m_g_iodata & 1))
{
@@ -355,7 +355,7 @@ WRITE8_MEMBER(esripsys_state::g_ioadd_w)
m_u56a = 1;
/*...causing a sound CPU /IRQ */
- cputag_set_input_line(machine(), "sound_cpu", M6809_IRQ_LINE, ASSERT_LINE);
+ machine().device("sound_cpu")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
if (m_g_iodata & 2)
@@ -408,7 +408,7 @@ INPUT_CHANGED_MEMBER(esripsys_state::keypad_interrupt)
{
m_io_firq_status |= 2;
m_keypad_status |= 0x20;
- cputag_set_input_line(machine(), "game_cpu", M6809_FIRQ_LINE, HOLD_LINE);
+ machine().device("game_cpu")->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
}
@@ -418,7 +418,7 @@ INPUT_CHANGED_MEMBER(esripsys_state::coin_interrupt)
{
m_io_firq_status |= 2;
m_coin_latch = ioport("COINS")->read() << 2;
- cputag_set_input_line(machine(), "game_cpu", M6809_FIRQ_LINE, HOLD_LINE);
+ machine().device("game_cpu")->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
}
@@ -499,7 +499,7 @@ WRITE8_MEMBER(esripsys_state::s_200f_w)
if (m_s_to_g_latch2 & 0x40)
{
m_u56a = 0;
- cputag_set_input_line(machine(), "sound_cpu", M6809_IRQ_LINE, CLEAR_LINE);
+ machine().device("sound_cpu")->execute().set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
if (!(m_s_to_g_latch2 & 0x80) && (data & 0x80))
diff --git a/src/mame/drivers/exedexes.c b/src/mame/drivers/exedexes.c
index a809b2314d6..3a6c5b8f78d 100644
--- a/src/mame/drivers/exedexes.c
+++ b/src/mame/drivers/exedexes.c
@@ -21,10 +21,10 @@ static TIMER_DEVICE_CALLBACK( exedexes_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
if(scanline == 0) // unknown irq event
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xcf); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
}
diff --git a/src/mame/drivers/exidy440.c b/src/mame/drivers/exidy440.c
index 505a7a3a0c9..c16ce0940c3 100644
--- a/src/mame/drivers/exidy440.c
+++ b/src/mame/drivers/exidy440.c
@@ -256,7 +256,7 @@ INPUT_CHANGED_MEMBER(exidy440_state::coin_inserted)
{
/* if we got a coin, set the IRQ on the main CPU */
if (oldval)
- cputag_set_input_line(machine(), "maincpu", 0, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
@@ -335,7 +335,7 @@ WRITE8_MEMBER(exidy440_state::bankram_w)
READ8_MEMBER(exidy440_state::exidy440_input_port_3_r)
{
/* I/O1 accesses clear the CIRQ flip/flop */
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
return ioport("IN3")->read();
}
@@ -370,7 +370,7 @@ WRITE8_MEMBER(exidy440_state::sound_command_w)
WRITE8_MEMBER(exidy440_state::exidy440_input_port_3_w)
{
/* I/O1 accesses clear the CIRQ flip/flop */
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/expro02.c b/src/mame/drivers/expro02.c
index 405dd6cd537..fd8718ba6fb 100644
--- a/src/mame/drivers/expro02.c
+++ b/src/mame/drivers/expro02.c
@@ -499,11 +499,11 @@ static TIMER_DEVICE_CALLBACK( expro02_scanline )
int scanline = param;
if(scanline == 224) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 3, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
else if(scanline == 0) // vblank-in irq?
- cputag_set_input_line(timer.machine(), "maincpu", 5, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
else if(scanline == 112) // VDP end task? (controls sprite colors in gameplay)
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
}
static MACHINE_RESET( galsnew )
diff --git a/src/mame/drivers/exterm.c b/src/mame/drivers/exterm.c
index cffc89c5a7c..bf753b26324 100644
--- a/src/mame/drivers/exterm.c
+++ b/src/mame/drivers/exterm.c
@@ -159,7 +159,7 @@ WRITE16_MEMBER(exterm_state::exterm_output_port_0_w)
{
/* Bit 13 = Resets the slave CPU */
if ((data & 0x2000) && !(m_last & 0x2000))
- cputag_set_input_line(machine(), "slave", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("slave")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
/* Bits 14-15 = Coin counters */
coin_counter_w(machine(), 0, data & 0x8000);
@@ -175,8 +175,8 @@ static TIMER_CALLBACK( sound_delayed_w )
exterm_state *state = machine.driver_data<exterm_state>();
/* data is latched independently for both sound CPUs */
state->m_master_sound_latch = state->m_slave_sound_latch = param;
- cputag_set_input_line(machine, "audiocpu", M6502_IRQ_LINE, ASSERT_LINE);
- cputag_set_input_line(machine, "audioslave", M6502_IRQ_LINE, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
+ machine.device("audioslave")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
}
@@ -199,7 +199,7 @@ static TIMER_DEVICE_CALLBACK( master_sound_nmi_callback )
exterm_state *state = timer.machine().driver_data<exterm_state>();
/* bit 0 of the sound control determines if the NMI is actually delivered */
if (state->m_sound_control & 0x01)
- cputag_set_input_line(timer.machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ timer.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -225,7 +225,7 @@ WRITE8_MEMBER(exterm_state::sound_nmi_rate_w)
READ8_MEMBER(exterm_state::sound_master_latch_r)
{
/* read latch and clear interrupt */
- cputag_set_input_line(machine(), "audiocpu", M6502_IRQ_LINE, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
return m_master_sound_latch;
}
@@ -233,7 +233,7 @@ READ8_MEMBER(exterm_state::sound_master_latch_r)
READ8_MEMBER(exterm_state::sound_slave_latch_r)
{
/* read latch and clear interrupt */
- cputag_set_input_line(machine(), "audioslave", M6502_IRQ_LINE, CLEAR_LINE);
+ machine().device("audioslave")->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
return m_slave_sound_latch;
}
@@ -250,7 +250,7 @@ WRITE8_MEMBER(exterm_state::sound_slave_dac_w)
READ8_MEMBER(exterm_state::sound_nmi_to_slave_r)
{
/* a read from here triggers an NMI pulse to the slave */
- cputag_set_input_line(machine(), "audioslave", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audioslave")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
return 0xff;
}
diff --git a/src/mame/drivers/exzisus.c b/src/mame/drivers/exzisus.c
index e5635188922..7d81d5f976e 100644
--- a/src/mame/drivers/exzisus.c
+++ b/src/mame/drivers/exzisus.c
@@ -109,7 +109,7 @@ WRITE8_MEMBER(exzisus_state::exzisus_sharedram_ac_w)
// is it ok that cpub_reset refers to cpuc?
WRITE8_MEMBER(exzisus_state::exzisus_cpub_reset_w)
{
- cputag_set_input_line(machine(), "cpuc", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("cpuc")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
#if 0
@@ -254,7 +254,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface ym2151_config =
diff --git a/src/mame/drivers/famibox.c b/src/mame/drivers/famibox.c
index 7375655f4f4..ddc775e8b26 100644
--- a/src/mame/drivers/famibox.c
+++ b/src/mame/drivers/famibox.c
@@ -516,7 +516,7 @@ static PALETTE_INIT( famibox )
static void ppu_irq( device_t *device, int *ppu_regs )
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/* our ppu interface */
diff --git a/src/mame/drivers/fastfred.c b/src/mame/drivers/fastfred.c
index 178d99480f8..74430c542e7 100644
--- a/src/mame/drivers/fastfred.c
+++ b/src/mame/drivers/fastfred.c
@@ -132,7 +132,7 @@ static MACHINE_START( imago )
WRITE8_MEMBER(fastfred_state::imago_dma_irq_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, data & 1 ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, data & 1 ? ASSERT_LINE : CLEAR_LINE);
}
WRITE8_MEMBER(fastfred_state::imago_sprites_bank_w)
diff --git a/src/mame/drivers/feversoc.c b/src/mame/drivers/feversoc.c
index 905520dcfba..e0bb9222b4b 100644
--- a/src/mame/drivers/feversoc.c
+++ b/src/mame/drivers/feversoc.c
@@ -247,7 +247,7 @@ INPUT_PORTS_END
static INTERRUPT_GEN( feversoc_irq )
{
- cputag_set_input_line(device->machine(), "maincpu", 8, HOLD_LINE );
+ device->machine().device("maincpu")->execute().set_input_line(8, HOLD_LINE );
}
static MACHINE_CONFIG_START( feversoc, feversoc_state )
diff --git a/src/mame/drivers/finalizr.c b/src/mame/drivers/finalizr.c
index 8c00dc7f582..6ef2e5c42bb 100644
--- a/src/mame/drivers/finalizr.c
+++ b/src/mame/drivers/finalizr.c
@@ -28,9 +28,9 @@ static TIMER_DEVICE_CALLBACK( finalizr_scanline )
int scanline = param;
if(scanline == 240 && state->m_irq_enable) // vblank irq
- cputag_set_input_line(timer.machine(), "maincpu", M6809_IRQ_LINE, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
else if(((scanline % 32) == 0) && state->m_nmi_enable) // timer irq
- cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c
index 5d80e827382..47655a7de4b 100644
--- a/src/mame/drivers/firebeat.c
+++ b/src/mame/drivers/firebeat.c
@@ -640,7 +640,7 @@ static void GCU_w(running_machine &machine, int chip, UINT32 offset, UINT32 data
/* IRQ clear/enable; ppd writes bit off then on in response to interrupt */
/* it enables bits 0x41, but 0x01 seems to be the one it cares about */
if (ACCESSING_BITS_16_31 && (data & 0x0001) == 0)
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
break;
case 0x30:
@@ -907,12 +907,12 @@ static WRITE32_HANDLER(soundflash_w)
static void atapi_cause_irq(running_machine &machine)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ4, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ4, ASSERT_LINE);
}
static void atapi_clear_irq(running_machine &machine)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ4, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ4, CLEAR_LINE);
}
static void atapi_init(running_machine &machine)
@@ -1322,7 +1322,7 @@ static WRITE32_HANDLER( comm_uart_w )
static void comm_uart_irq_callback(running_machine &machine, int channel, int value)
{
// TODO
- //cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ2, ASSERT_LINE);
+ //machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ2, ASSERT_LINE);
}
/*****************************************************************************/
@@ -1397,20 +1397,20 @@ static void midi_uart_irq_callback(running_machine &machine, int channel, int va
if ((state->m_extend_board_irq_enable & 0x02) == 0 && value != CLEAR_LINE)
{
state->m_extend_board_irq_active |= 0x02;
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ1, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ1, ASSERT_LINE);
}
else
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ1, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ1, CLEAR_LINE);
}
else
{
if ((state->m_extend_board_irq_enable & 0x01) == 0 && value != CLEAR_LINE)
{
state->m_extend_board_irq_active |= 0x01;
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ1, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ1, ASSERT_LINE);
}
else
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ1, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ1, CLEAR_LINE);
}
}
diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c
index 4a19975bf27..c77f3040631 100644
--- a/src/mame/drivers/firefox.c
+++ b/src/mame/drivers/firefox.c
@@ -253,7 +253,7 @@ static TIMER_DEVICE_CALLBACK( video_timer_callback )
{
timer.machine().primary_screen->update_now();
- cputag_set_input_line( timer.machine(), "maincpu", M6809_IRQ_LINE, ASSERT_LINE );
+ timer.machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE );
}
static void set_rgba( running_machine &machine, int start, int index, unsigned char *palette_ram )
@@ -311,12 +311,12 @@ WRITE8_MEMBER(firefox_state::main_to_sound_w)
{
m_main_to_sound_flag = 1;
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(firefox_state::sound_reset_w)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
if ((data & 0x80) != 0)
m_sound_to_main_flag = m_main_to_sound_flag = 0;
}
@@ -369,7 +369,7 @@ WRITE8_MEMBER(firefox_state::riot_porta_w)
WRITE_LINE_MEMBER(firefox_state::riot_irq)
{
- cputag_set_input_line(machine(), "audiocpu", M6502_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -441,17 +441,17 @@ WRITE8_MEMBER(firefox_state::rom_bank_w)
WRITE8_MEMBER(firefox_state::main_irq_clear_w)
{
- cputag_set_input_line( machine(), "maincpu", M6809_IRQ_LINE, CLEAR_LINE );
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, CLEAR_LINE );
}
WRITE8_MEMBER(firefox_state::main_firq_clear_w)
{
- cputag_set_input_line( machine(), "maincpu", M6809_FIRQ_LINE, CLEAR_LINE );
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, CLEAR_LINE );
}
WRITE8_MEMBER(firefox_state::self_reset_w)
{
- cputag_set_input_line( machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE );
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE );
}
@@ -477,7 +477,7 @@ WRITE8_MEMBER(firefox_state::firefox_coin_counter_w)
static void firq_gen(running_machine &machine, phillips_22vp931_device &laserdisc, int state)
{
if (state)
- cputag_set_input_line( machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE );
+ machine.device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE );
}
diff --git a/src/mame/drivers/flower.c b/src/mame/drivers/flower.c
index bf400da9e92..87d5abed6d6 100644
--- a/src/mame/drivers/flower.c
+++ b/src/mame/drivers/flower.c
@@ -77,17 +77,17 @@ CHIP # POSITION TYPE
WRITE8_MEMBER(flower_state::flower_maincpu_irq_ack)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(flower_state::flower_subcpu_irq_ack)
{
- cputag_set_input_line(machine(), "subcpu", 0, CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(flower_state::flower_soundcpu_irq_ack)
{
- cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(flower_state::flower_coin_counter_w)
@@ -105,7 +105,7 @@ WRITE8_MEMBER(flower_state::sound_command_w)
soundlatch_byte_w(space, 0, data);
if (*m_sn_nmi_enable & 1)
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( flower_cpu1_2, AS_PROGRAM, 8, flower_state )
@@ -144,7 +144,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(flower_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( flower )
diff --git a/src/mame/drivers/foodf.c b/src/mame/drivers/foodf.c
index 25b752a83a3..3312af9c51e 100644
--- a/src/mame/drivers/foodf.c
+++ b/src/mame/drivers/foodf.c
@@ -107,9 +107,9 @@ WRITE16_MEMBER(foodf_state::nvram_recall_w)
static void update_interrupts(running_machine &machine)
{
foodf_state *state = machine.driver_data<foodf_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 3, state->m_scanline_int_state && state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, state->m_scanline_int_state && state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/forte2.c b/src/mame/drivers/forte2.c
index 06c9654e202..84b0927d519 100644
--- a/src/mame/drivers/forte2.c
+++ b/src/mame/drivers/forte2.c
@@ -97,7 +97,7 @@ static const ay8910_interface forte2_ay8910_interface =
WRITE_LINE_MEMBER(forte2_state::vdp_interrupt)
{
- cputag_set_input_line(machine(), "maincpu", 0, (state ? HOLD_LINE : CLEAR_LINE));
+ machine().device("maincpu")->execute().set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
}
static TMS9928A_INTERFACE(forte2_tms9928a_interface)
diff --git a/src/mame/drivers/funkball.c b/src/mame/drivers/funkball.c
index a88e0625386..bef363ba5b3 100644
--- a/src/mame/drivers/funkball.c
+++ b/src/mame/drivers/funkball.c
@@ -346,7 +346,7 @@ WRITE8_MEMBER(funkball_state::at_dma8237_2_w)
WRITE_LINE_MEMBER(funkball_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c
index 4110150cee2..21918b314a9 100644
--- a/src/mame/drivers/gaelco3d.c
+++ b/src/mame/drivers/gaelco3d.c
@@ -162,9 +162,9 @@ static void adsp_tx_callback(adsp21xx_device &device, int port, INT32 data);
WRITE_LINE_MEMBER(gaelco3d_state::ser_irq)
{
if (state)
- cputag_set_input_line(machine(), "maincpu", 6, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(6, ASSERT_LINE);
else
- cputag_set_input_line(machine(), "maincpu", 6, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(6, CLEAR_LINE);
}
@@ -220,7 +220,7 @@ static MACHINE_RESET( common )
state->membank("bank1")->set_entry(0);
/* keep the TMS32031 halted until the code is ready to go */
- cputag_set_input_line(machine, "tms", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("tms")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
for (i = 0; i < SOUND_CHANNELS; i++)
{
@@ -263,7 +263,7 @@ static INTERRUPT_GEN( vblank_gen )
WRITE16_MEMBER(gaelco3d_state::irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
}
WRITE32_MEMBER(gaelco3d_state::irq_ack32_w)
@@ -371,7 +371,7 @@ static TIMER_CALLBACK( delayed_sound_w )
if (LOG)
logerror("delayed_sound_w(%02X)\n", param);
state->m_sound_data = param;
- cputag_set_input_line(machine, "adsp", ADSP2115_IRQ2, ASSERT_LINE);
+ machine.device("adsp")->execute().set_input_line(ADSP2115_IRQ2, ASSERT_LINE);
}
@@ -388,7 +388,7 @@ READ16_MEMBER(gaelco3d_state::sound_data_r)
{
if (LOG)
logerror("sound_data_r(%02X)\n", m_sound_data);
- cputag_set_input_line(machine(), "adsp", ADSP2115_IRQ2, CLEAR_LINE);
+ machine().device("adsp")->execute().set_input_line(ADSP2115_IRQ2, CLEAR_LINE);
return m_sound_data;
}
@@ -509,7 +509,7 @@ WRITE16_MEMBER(gaelco3d_state::tms_reset_w)
/* it does not ever appear to be touched after that */
if (LOG)
logerror("%06X:tms_reset_w(%02X) = %08X & %08X\n", space.device().safe_pc(), offset, data, mem_mask);
- cputag_set_input_line(machine(), "tms", INPUT_LINE_RESET, (data == 0xffff) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("tms")->execute().set_input_line(INPUT_LINE_RESET, (data == 0xffff) ? CLEAR_LINE : ASSERT_LINE);
}
@@ -520,7 +520,7 @@ WRITE16_MEMBER(gaelco3d_state::tms_irq_w)
if (LOG)
logerror("%06X:tms_irq_w(%02X) = %08X & %08X\n", space.device().safe_pc(), offset, data, mem_mask);
if (ACCESSING_BITS_0_7)
- cputag_set_input_line(machine(), "tms", 0, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("tms")->execute().set_input_line(0, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c
index c491e7c4deb..656c2c4f62e 100644
--- a/src/mame/drivers/galaga.c
+++ b/src/mame/drivers/galaga.c
@@ -742,13 +742,13 @@ WRITE8_MEMBER(galaga_state::bosco_latch_w)
case 0x00: /* IRQ1 */
m_main_irq_mask = data & 1;
if (!m_main_irq_mask)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x01: /* IRQ2 */
m_sub_irq_mask = data & 1;
if (!m_sub_irq_mask)
- cputag_set_input_line(machine(), "sub", 0, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x02: /* NMION */
@@ -756,8 +756,8 @@ WRITE8_MEMBER(galaga_state::bosco_latch_w)
break;
case 0x03: /* RESET */
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "sub2", INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub2")->execute().set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
break;
case 0x04: /* n.c. */
diff --git a/src/mame/drivers/galastrm.c b/src/mame/drivers/galastrm.c
index c98ffcdb5c8..0566c6c3fad 100644
--- a/src/mame/drivers/galastrm.c
+++ b/src/mame/drivers/galastrm.c
@@ -57,7 +57,7 @@ static INTERRUPT_GEN( galastrm_interrupt )
static TIMER_CALLBACK( galastrm_interrupt6 )
{
- cputag_set_input_line(machine, "maincpu", 6, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, HOLD_LINE);
}
diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c
index fcc9e2040f8..f865d90f310 100644
--- a/src/mame/drivers/galaxian.c
+++ b/src/mame/drivers/galaxian.c
@@ -457,7 +457,7 @@ static INTERRUPT_GEN( fakechange_interrupt_gen )
state->m_tenspot_current_game++;
state->m_tenspot_current_game%=10;
tenspot_set_game_bank(device->machine(), state->m_tenspot_current_game, 1);
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
}
@@ -545,7 +545,7 @@ WRITE8_MEMBER(galaxian_state::konami_sound_control_w)
/* the inverse of bit 3 clocks the flip flop to signal an INT */
/* it is automatically cleared on the acknowledge */
if ((old & 0x08) && !(data & 0x08))
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
/* bit 4 is sound disable */
machine().sound().system_mute(data & 0x10);
@@ -750,13 +750,13 @@ static I8255A_INTERFACE( scramble_ppi8255_1_intf )
WRITE8_MEMBER(galaxian_state::explorer_sound_control_w)
{
- cputag_set_input_line(machine(), "audiocpu", 0, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, ASSERT_LINE);
}
READ8_MEMBER(galaxian_state::explorer_sound_latch_r)
{
- cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
return soundlatch_byte_r(*machine().device("audiocpu")->memory().space(AS_PROGRAM), 0);
}
@@ -793,7 +793,7 @@ WRITE8_MEMBER(galaxian_state::sfx_sample_control_w)
/* the inverse of bit 0 clocks the flip flop to signal an INT */
/* it is automatically cleared on the acknowledge */
if ((old & 0x01) && !(data & 0x01))
- cputag_set_input_line(machine(), "audio2", 0, HOLD_LINE);
+ machine().device("audio2")->execute().set_input_line(0, HOLD_LINE);
}
@@ -837,7 +837,7 @@ static void monsterz_set_latch(running_machine &machine)
state->m_protection_result = rom[0x2000 | (state->m_protection_state & 0x1fff)]; // probably needs a BITSWAP8
// and an irq on the main z80 afterwards
- cputag_set_input_line(machine, "maincpu", 0, HOLD_LINE );
+ machine.device("maincpu")->execute().set_input_line(0, HOLD_LINE );
}
@@ -932,7 +932,7 @@ READ8_MEMBER(galaxian_state::frogger_sound_timer_r)
WRITE8_MEMBER(galaxian_state::froggrmc_sound_control_w)
{
- cputag_set_input_line(machine(), "audiocpu", 0, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
}
@@ -1079,7 +1079,7 @@ INPUT_CHANGED_MEMBER(galaxian_state::gmgalax_game_changed)
galaxian_stars_enable_w(*space, 0, 0);
/* reset the CPU */
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
@@ -1259,13 +1259,13 @@ READ8_MEMBER(galaxian_state::jumpbug_protection_r)
WRITE8_MEMBER(galaxian_state::checkman_sound_command_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static TIMER_DEVICE_CALLBACK( checkmaj_irq0_gen )
{
- cputag_set_input_line(timer.machine(), "audiocpu", 0, HOLD_LINE);
+ timer.machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/galpani2.c b/src/mame/drivers/galpani2.c
index c49949ae24f..5e78a50ee9c 100644
--- a/src/mame/drivers/galpani2.c
+++ b/src/mame/drivers/galpani2.c
@@ -115,7 +115,7 @@ WRITE8_MEMBER(galpani2_state::galpani2_mcu_init_w)
mcu_data = srcspace->read_byte(mcu_address );
dstspace->write_byte(mcu_address-0x10, mcu_data);
}
- cputag_set_input_line(machine(), "sub", INPUT_LINE_IRQ7, HOLD_LINE); //MCU Initialised
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_IRQ7, HOLD_LINE); //MCU Initialised
}
static void galpani2_mcu_nmi1(running_machine &machine)
diff --git a/src/mame/drivers/galpanic.c b/src/mame/drivers/galpanic.c
index da17b48d52c..f24ceb17241 100644
--- a/src/mame/drivers/galpanic.c
+++ b/src/mame/drivers/galpanic.c
@@ -139,11 +139,11 @@ static TIMER_DEVICE_CALLBACK( galpanic_scanline )
int scanline = param;
if(scanline == 224) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 3, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
/* Pandora "sprite end dma" irq? */
if(scanline == 32)
- cputag_set_input_line(timer.machine(), "maincpu", 5, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
}
@@ -152,14 +152,14 @@ static TIMER_DEVICE_CALLBACK( galhustl_scanline )
int scanline = param;
if(scanline == 224) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 3, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
/* Pandora "sprite end dma" irq? */
if(scanline == 32)
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
if(scanline == 0) // timer irq?
- cputag_set_input_line(timer.machine(), "maincpu", 5, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
}
diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c
index 7cfec6d24b1..d3f8fd74ced 100644
--- a/src/mame/drivers/gamecstl.c
+++ b/src/mame/drivers/gamecstl.c
@@ -452,7 +452,7 @@ WRITE8_MEMBER(gamecstl_state::at_page8_w)
WRITE_LINE_MEMBER(gamecstl_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
@@ -634,7 +634,7 @@ static MACHINE_RESET(gamecstl)
WRITE_LINE_MEMBER(gamecstl_state::gamecstl_pic8259_1_set_int_line)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER(gamecstl_state::get_slave_ack)
@@ -737,7 +737,7 @@ MACHINE_CONFIG_END
static void set_gate_a20(running_machine &machine, int a20)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, a20);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_A20, a20);
}
static void keyboard_interrupt(running_machine &machine, int state)
diff --git a/src/mame/drivers/gaplus.c b/src/mame/drivers/gaplus.c
index 312dec26c8c..75cfc9d92a5 100644
--- a/src/mame/drivers/gaplus.c
+++ b/src/mame/drivers/gaplus.c
@@ -173,7 +173,7 @@ WRITE8_MEMBER(gaplus_state::gaplus_irq_1_ctrl_w)
int bit = !BIT(offset, 11);
m_main_irq_mask = bit & 1;
if (!bit)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(gaplus_state::gaplus_irq_2_ctrl_w)
@@ -181,7 +181,7 @@ WRITE8_MEMBER(gaplus_state::gaplus_irq_2_ctrl_w)
int bit = offset & 1;
m_sub_irq_mask = bit & 1;
if (!bit)
- cputag_set_input_line(machine(), "sub", 0, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(gaplus_state::gaplus_irq_3_ctrl_w)
@@ -189,14 +189,14 @@ WRITE8_MEMBER(gaplus_state::gaplus_irq_3_ctrl_w)
int bit = !BIT(offset, 13);
m_sub2_irq_mask = bit & 1;
if (!bit)
- cputag_set_input_line(machine(), "sub2", 0, CLEAR_LINE);
+ machine().device("sub2")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(gaplus_state::gaplus_sreset_w)
{
int bit = !BIT(offset, 11);
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine(), "sub2", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub2")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
mappy_sound_enable(machine().device("namco"), bit);
}
@@ -232,7 +232,7 @@ static MACHINE_RESET( gaplus )
gaplus_state *state = machine.driver_data<gaplus_state>();
/* on reset, VINTON is reset, while the other flags don't seem to be affected */
state->m_sub_irq_mask = 0;
- cputag_set_input_line(machine, "sub", 0, CLEAR_LINE);
+ machine.device("sub")->execute().set_input_line(0, CLEAR_LINE);
}
static TIMER_CALLBACK( namcoio_run )
@@ -259,7 +259,7 @@ static INTERRUPT_GEN( gaplus_vblank_main_irq )
device_t *io56xx = device->machine().device("56xx");
if(state->m_main_irq_mask)
- cputag_set_input_line(device->machine(), "maincpu", 0, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
if (!namcoio_read_reset_line(io58xx)) /* give the cpu a tiny bit of time to write the command before processing it */
device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run));
@@ -273,7 +273,7 @@ static INTERRUPT_GEN( gaplus_vblank_sub_irq )
gaplus_state *state = device->machine().driver_data<gaplus_state>();
if(state->m_sub_irq_mask)
- cputag_set_input_line(device->machine(), "sub", 0, ASSERT_LINE);
+ device->machine().device("sub")->execute().set_input_line(0, ASSERT_LINE);
}
static INTERRUPT_GEN( gaplus_vblank_sub2_irq )
@@ -281,7 +281,7 @@ static INTERRUPT_GEN( gaplus_vblank_sub2_irq )
gaplus_state *state = device->machine().driver_data<gaplus_state>();
if(state->m_sub2_irq_mask)
- cputag_set_input_line(device->machine(), "sub2", 0, ASSERT_LINE);
+ device->machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE);
}
diff --git a/src/mame/drivers/gauntlet.c b/src/mame/drivers/gauntlet.c
index 15d902c9959..98068690133 100644
--- a/src/mame/drivers/gauntlet.c
+++ b/src/mame/drivers/gauntlet.c
@@ -138,8 +138,8 @@
static void update_interrupts(running_machine &machine)
{
gauntlet_state *state = machine.driver_data<gauntlet_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -210,7 +210,7 @@ WRITE16_MEMBER(gauntlet_state::sound_reset_w)
if ((oldword ^ m_sound_reset_val) & 1)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, (m_sound_reset_val & 1) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (m_sound_reset_val & 1) ? CLEAR_LINE : ASSERT_LINE);
atarigen_sound_reset(machine());
if (m_sound_reset_val & 1)
{
diff --git a/src/mame/drivers/gberet.c b/src/mame/drivers/gberet.c
index eefcf23e975..b09056e8aa0 100644
--- a/src/mame/drivers/gberet.c
+++ b/src/mame/drivers/gberet.c
@@ -90,15 +90,15 @@ static TIMER_DEVICE_CALLBACK( gberet_interrupt_tick )
// NMI on d0
if (ticks_mask & state->m_interrupt_mask & 1)
- cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
// IRQ on d3 (used by mrgoemon)
if (ticks_mask & state->m_interrupt_mask<<2 & 8)
- cputag_set_input_line(timer.machine(), "maincpu", 0, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
// IRQ on d4 (used by gberet)
if (ticks_mask & state->m_interrupt_mask<<2 & 16)
- cputag_set_input_line(timer.machine(), "maincpu", 0, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
@@ -132,10 +132,10 @@ WRITE8_MEMBER(gberet_state::gberet_flipscreen_w)
UINT8 ack_mask = ~data & m_interrupt_mask; // 1->0
if (ack_mask & 1)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
if (ack_mask & 6)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
m_interrupt_mask = data & 7;
@@ -197,13 +197,13 @@ WRITE8_MEMBER(gberet_state::gberetb_flipscreen_w)
READ8_MEMBER(gberet_state::gberetb_irq_ack_r)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
return 0xff;
}
WRITE8_MEMBER(gberet_state::gberetb_nmi_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
static ADDRESS_MAP_START( gberetb_map, AS_PROGRAM, 8, gberet_state )
diff --git a/src/mame/drivers/ginganin.c b/src/mame/drivers/ginganin.c
index 86ca063f712..b5c094dcdd7 100644
--- a/src/mame/drivers/ginganin.c
+++ b/src/mame/drivers/ginganin.c
@@ -247,7 +247,7 @@ static MACHINE_RESET( ginganin )
WRITE8_MEMBER(ginganin_state::ptm_irq)
{
- cputag_set_input_line(machine(), "audiocpu", 0, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
}
static const ptm6840_interface ptm_intf =
diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c
index 04eca081df1..5eba32bee0d 100644
--- a/src/mame/drivers/gladiatr.c
+++ b/src/mame/drivers/gladiatr.c
@@ -273,7 +273,7 @@ WRITE8_MEMBER(gladiatr_state::gladiator_int_control_w)
static void gladiator_ym_irq(device_t *device, int irq)
{
/* NMI IRQ is not used by gladiator sound program */
- cputag_set_input_line(device->machine(), "sub", INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
}
/*Sound Functions*/
@@ -293,12 +293,12 @@ WRITE8_MEMBER(gladiatr_state::glad_adpcm_w)
WRITE8_MEMBER(gladiatr_state::glad_cpu_sound_command_w)
{
soundlatch_byte_w(space,0,data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
READ8_MEMBER(gladiatr_state::glad_cpu_sound_command_r)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return soundlatch_byte_r(space,0);
}
@@ -312,7 +312,7 @@ WRITE8_MEMBER(gladiatr_state::gladiatr_flipscreen_w)
/* !!!!! patch to IRQ timming for 2nd CPU !!!!! */
WRITE8_MEMBER(gladiatr_state::gladiatr_irq_patch_w)
{
- cputag_set_input_line(machine(), "sub", 0, HOLD_LINE);
+ machine().device("sub")->execute().set_input_line(0, HOLD_LINE);
}
#endif
diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c
index 531a1b9bad5..9fef5ab88fb 100644
--- a/src/mame/drivers/gottlieb.c
+++ b/src/mame/drivers/gottlieb.c
@@ -655,7 +655,7 @@ static void laserdisc_audio_process(device_t *dummy, laserdisc_device &device, i
static TIMER_CALLBACK( nmi_clear )
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c
index bff0ccf8876..f9d02d12dba 100644
--- a/src/mame/drivers/gpworld.c
+++ b/src/mame/drivers/gpworld.c
@@ -424,7 +424,7 @@ INPUT_PORTS_END
static TIMER_CALLBACK( irq_stop )
{
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
static INTERRUPT_GEN( vblank_callback_gpworld )
diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c
index 0a59befd99c..b11974dc055 100644
--- a/src/mame/drivers/gradius3.c
+++ b/src/mame/drivers/gradius3.c
@@ -113,10 +113,10 @@ static TIMER_DEVICE_CALLBACK( gradius3_sub_scanline )
int scanline = param;
if(scanline == 240 && state->m_irqBmask & 1) // vblank-out irq
- cputag_set_input_line(timer.machine(), "sub", 1, HOLD_LINE);
+ timer.machine().device("sub")->execute().set_input_line(1, HOLD_LINE);
if(scanline == 16 && state->m_irqBmask & 2) // sprite end DMA irq
- cputag_set_input_line(timer.machine(), "sub", 2, HOLD_LINE);
+ timer.machine().device("sub")->execute().set_input_line(2, HOLD_LINE);
}
WRITE16_MEMBER(gradius3_state::cpuB_irqtrigger_w)
@@ -307,7 +307,7 @@ static MACHINE_RESET( gradius3 )
gradius3_state *state = machine.driver_data<gradius3_state>();
/* start with cpu B halted */
- cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("sub")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
state->m_irqAen = 0;
state->m_irqBmask = 0;
state->m_priority = 0;
diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c
index 13c0d4bb5dc..6d38bea6509 100644
--- a/src/mame/drivers/grchamp.c
+++ b/src/mame/drivers/grchamp.c
@@ -131,7 +131,7 @@ WRITE8_MEMBER(grchamp_state::cpu0_outputs_w)
/* bit 6: FOG OUT */
/* bit 7: RADARON */
if ((diff & 0x01) && !(data & 0x01))
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
if ((diff & 0x02) && !(data & 0x02))
m_collide = m_collmode = 0;
break;
@@ -190,7 +190,7 @@ WRITE8_MEMBER(grchamp_state::cpu0_outputs_w)
case 0x0e: /* OUT14 */
/* O-21 connector */
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
break;
}
}
@@ -269,7 +269,7 @@ WRITE8_MEMBER(grchamp_state::cpu1_outputs_w)
case 0x04: /* OUT4 */
/* bit 0: interrupt enable for CPU 1 */
if ((diff & 0x01) && !(data & 0x01))
- cputag_set_input_line(machine(), "sub", 0, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x05: /* OUT5 - unused */
diff --git a/src/mame/drivers/gridlee.c b/src/mame/drivers/gridlee.c
index 5e8cc258168..1bb0de44aa7 100644
--- a/src/mame/drivers/gridlee.c
+++ b/src/mame/drivers/gridlee.c
@@ -99,7 +99,7 @@ static void poly17_init(running_machine &machine);
static TIMER_CALLBACK( irq_off_tick )
{
- cputag_set_input_line(machine, "maincpu", M6809_IRQ_LINE, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
@@ -113,7 +113,7 @@ static TIMER_CALLBACK( irq_timer_tick )
state->m_irq_timer->adjust(machine.primary_screen->time_until_pos(param + 64), param + 64);
/* IRQ starts on scanline 0, 64, 128, etc. */
- cputag_set_input_line(machine, "maincpu", M6809_IRQ_LINE, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
/* it will turn off on the next HBLANK */
state->m_irq_off->adjust(machine.primary_screen->time_until_pos(param, GRIDLEE_HBSTART));
@@ -122,7 +122,7 @@ static TIMER_CALLBACK( irq_timer_tick )
static TIMER_CALLBACK( firq_off_tick )
{
- cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
}
@@ -133,7 +133,7 @@ static TIMER_CALLBACK( firq_timer_tick )
state->m_firq_timer->adjust(machine.primary_screen->time_until_pos(FIRQ_SCANLINE));
/* IRQ starts on scanline FIRQ_SCANLINE? */
- cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
/* it will turn off on the next HBLANK */
state->m_firq_off->adjust(machine.primary_screen->time_until_pos(FIRQ_SCANLINE, GRIDLEE_HBSTART));
diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c
index 0461e40108c..eff228ed83d 100644
--- a/src/mame/drivers/groundfx.c
+++ b/src/mame/drivers/groundfx.c
@@ -100,7 +100,7 @@ WRITE32_MEMBER(groundfx_state::color_ram_w)
static TIMER_CALLBACK( groundfx_interrupt5 )
{
- cputag_set_input_line(machine, "maincpu", 5, HOLD_LINE); //from 5... ADC port
+ machine.device("maincpu")->execute().set_input_line(5, HOLD_LINE); //from 5... ADC port
}
diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c
index 14776234567..5dffb31cf03 100644
--- a/src/mame/drivers/gstriker.c
+++ b/src/mame/drivers/gstriker.c
@@ -195,7 +195,7 @@ WRITE16_MEMBER(gstriker_state::sound_command_w)
{
m_pending_command = 1;
soundlatch_byte_w(space, offset, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -262,9 +262,9 @@ GFXDECODE_END
static void gs_ym2610_irq(device_t *device, int irq)
{
if (irq)
- cputag_set_input_line(device->machine(), "audiocpu", 0, ASSERT_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, ASSERT_LINE);
else
- cputag_set_input_line(device->machine(), "audiocpu", 0, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c
index b7a65203284..83f795fb553 100644
--- a/src/mame/drivers/gsword.c
+++ b/src/mame/drivers/gsword.c
@@ -324,7 +324,7 @@ WRITE8_MEMBER(gsword_state::gsword_adpcm_data_w)
WRITE8_MEMBER(gsword_state::adpcm_soundcommand_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( cpu1_map, AS_PROGRAM , 8, gsword_state )
diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c
index 7e34c38e8cf..1478e28a6f9 100644
--- a/src/mame/drivers/gticlub.c
+++ b/src/mame/drivers/gticlub.c
@@ -272,12 +272,12 @@ WRITE32_MEMBER(gticlub_state::paletteram32_w)
static void voodoo_vblank_0(device_t *device, int param)
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_IRQ0, param ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, param ? ASSERT_LINE : CLEAR_LINE);
}
static void voodoo_vblank_1(device_t *device, int param)
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_IRQ1, param ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ1, param ? ASSERT_LINE : CLEAR_LINE);
}
READ32_MEMBER(gticlub_state::gticlub_k001604_tile_r)
@@ -390,10 +390,10 @@ WRITE8_MEMBER(gticlub_state::sysreg_w)
case 4:
if (data & 0x80) /* CG Board 1 IRQ Ack */
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ1, CLEAR_LINE);
if (data & 0x40) /* CG Board 0 IRQ Ack */
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
adc1038_di_write(adc1038, (data >> 0) & 1);
adc1038_clk_write(adc1038, (data >> 1) & 1);
@@ -707,14 +707,14 @@ static const sharc_config sharc_cfg =
static TIMER_CALLBACK( irq_off )
{
- cputag_set_input_line(machine, "audiocpu", param, CLEAR_LINE);
+ machine.device("audiocpu")->execute().set_input_line(param, CLEAR_LINE);
}
static void sound_irq_callback( running_machine &machine, int irq )
{
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
- cputag_set_input_line(machine, "audiocpu", line, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(line, ASSERT_LINE);
machine.scheduler().timer_set(attotime::from_usec(1), FUNC(irq_off), line);
}
@@ -797,7 +797,7 @@ static const k001604_interface hangplt_k001604_intf_r =
static MACHINE_RESET( gticlub )
{
- cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
static MACHINE_CONFIG_START( gticlub, gticlub_state )
@@ -878,8 +878,8 @@ static const k033906_interface hangplt_k033906_intf_1 =
static MACHINE_RESET( hangplt )
{
- cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "dsp2", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp2")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
static const voodoo_config voodoo_l_intf =
diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c
index 777b1d1becf..b31de36ddaa 100644
--- a/src/mame/drivers/guab.c
+++ b/src/mame/drivers/guab.c
@@ -106,7 +106,7 @@ public:
WRITE_LINE_MEMBER(guab_state::ptm_irq)
{
- cputag_set_input_line(machine(), "maincpu", INT_6840PTM, state);
+ machine().device("maincpu")->execute().set_input_line(INT_6840PTM, state);
}
static const ptm6840_interface ptm_intf =
@@ -130,7 +130,7 @@ static const ptm6840_interface ptm_intf =
static void tms_interrupt(running_machine &machine, int state)
{
- cputag_set_input_line(machine, "maincpu", INT_TMS34061, state);
+ machine.device("maincpu")->execute().set_input_line(INT_TMS34061, state);
}
static const struct tms34061_interface tms34061intf =
@@ -380,7 +380,7 @@ static TIMER_CALLBACK( fdc_data_callback )
}
fdc.status |= DATA_REQUEST;
- cputag_set_input_line(machine, "maincpu", INT_FLOPPYCTRL, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INT_FLOPPYCTRL, ASSERT_LINE);
}
@@ -475,7 +475,7 @@ WRITE16_MEMBER(guab_state::wd1770_w)
fdc.sector));
/* Trigger a DRQ interrupt on the CPU */
- cputag_set_input_line(machine(), "maincpu", INT_FLOPPYCTRL, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INT_FLOPPYCTRL, ASSERT_LINE);
fdc.status |= DATA_REQUEST;
break;
}
@@ -520,7 +520,7 @@ WRITE16_MEMBER(guab_state::wd1770_w)
fdc.data = data;
/* Clear the DRQ */
- cputag_set_input_line(machine(), "maincpu", INT_FLOPPYCTRL, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INT_FLOPPYCTRL, CLEAR_LINE);
/* Queue an event to write the data if write command was specified */
if (fdc.cmd & 0x20)
@@ -558,7 +558,7 @@ READ16_MEMBER(guab_state::wd1770_r)
retval = fdc.data;
/* Clear the DRQ */
- cputag_set_input_line(machine(), "maincpu", INT_FLOPPYCTRL, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INT_FLOPPYCTRL, CLEAR_LINE);
fdc.status &= ~DATA_REQUEST;
break;
}
diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c
index fba493a34c7..4089afdcc15 100644
--- a/src/mame/drivers/gunbustr.c
+++ b/src/mame/drivers/gunbustr.c
@@ -54,7 +54,7 @@
static TIMER_CALLBACK( gunbustr_interrupt5 )
{
- cputag_set_input_line(machine, "maincpu", 5, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(5, HOLD_LINE);
}
static INTERRUPT_GEN( gunbustr_interrupt )
diff --git a/src/mame/drivers/gundealr.c b/src/mame/drivers/gundealr.c
index c575ecd1529..e62126c6d19 100644
--- a/src/mame/drivers/gundealr.c
+++ b/src/mame/drivers/gundealr.c
@@ -388,9 +388,9 @@ static TIMER_DEVICE_CALLBACK( gundealr_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xd7); /* RST 10h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
else if((scanline == 0) || (scanline == 120) ) //timer irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xcf); /* RST 10h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 10h */
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c
index 7e55bb91ce3..b6396924894 100644
--- a/src/mame/drivers/halleys.c
+++ b/src/mame/drivers/halleys.c
@@ -1055,7 +1055,7 @@ WRITE8_MEMBER(halleys_state::blitter_w)
if (i==0 || (i==4 && !data))
{
m_blitter_busy = 0;
- if (m_firq_level) cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, ASSERT_LINE); // make up delayed FIRQ's
+ if (m_firq_level) machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); // make up delayed FIRQ's
}
else
{
@@ -1555,16 +1555,16 @@ static TIMER_DEVICE_CALLBACK( halleys_scanline )
// In Halley's Comet, NMI is used exclusively to handle coin input
case 56*3:
- cputag_set_input_line(timer.machine(),"maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
break;
// FIRQ drives gameplay; we need both types of NMI each frame.
case 56*2:
- state->m_mVectorType = 1; cputag_set_input_line(timer.machine(),"maincpu", M6809_FIRQ_LINE, ASSERT_LINE);
+ state->m_mVectorType = 1; timer.machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
break;
case 56:
- state->m_mVectorType = 0; cputag_set_input_line(timer.machine(),"maincpu", M6809_FIRQ_LINE, ASSERT_LINE);
+ state->m_mVectorType = 0; timer.machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
break;
}
}
@@ -1582,13 +1582,13 @@ static TIMER_DEVICE_CALLBACK( benberob_scanline )
break;
case 56*3:
- cputag_set_input_line(timer.machine(),"maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
break;
case 56*2:
case 56*1:
// FIRQ must not happen when the blitter is being updated or it'll cause serious screen artifacts
- if (!state->m_blitter_busy) cputag_set_input_line(timer.machine(),"maincpu", M6809_FIRQ_LINE, ASSERT_LINE); else state->m_firq_level++;
+ if (!state->m_blitter_busy) timer.machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); else state->m_firq_level++;
break;
}
}
@@ -1605,7 +1605,7 @@ WRITE8_MEMBER(halleys_state::firq_ack_w)
m_io_ram[0x9c] = data;
if (m_firq_level) m_firq_level--;
- cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
}
@@ -1620,7 +1620,7 @@ WRITE8_MEMBER(halleys_state::soundcommand_w)
m_io_ram[0x8a] = data;
soundlatch_byte_w(space,offset,data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c
index 20ea8c955aa..aff67f82cf3 100644
--- a/src/mame/drivers/hcastle.c
+++ b/src/mame/drivers/hcastle.c
@@ -158,7 +158,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int linestate)
{
// hcastle_state *state = device->machine().driver_data<hcastle_state>();
-// cputag_set_input_line(state->m_audiocpu, 0, linestate);
+// state->m_audiocpu.device(0)->execute().set_input_line(linestate);
}
static void volume_callback(device_t *device, int v)
diff --git a/src/mame/drivers/hexion.c b/src/mame/drivers/hexion.c
index 66ef278d351..51378c36484 100644
--- a/src/mame/drivers/hexion.c
+++ b/src/mame/drivers/hexion.c
@@ -104,12 +104,12 @@ if ((data & 0xdc) != 0x10) popmessage("coincntr %02x",data);
WRITE_LINE_MEMBER(hexion_state::hexion_irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE_LINE_MEMBER(hexion_state::hexion_nmi_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
static ADDRESS_MAP_START( hexion_map, AS_PROGRAM, 8, hexion_state )
@@ -205,9 +205,9 @@ static TIMER_DEVICE_CALLBACK( hexion_scanline )
int scanline = param;
if(scanline == 256)
- cputag_set_input_line(timer.machine(), "maincpu", 0, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
else if ((scanline == 85) || (scanline == 170)) //TODO
- cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
static const k053252_interface hexion_k053252_intf =
diff --git a/src/mame/drivers/higemaru.c b/src/mame/drivers/higemaru.c
index 908346eb8a1..3622faac680 100644
--- a/src/mame/drivers/higemaru.c
+++ b/src/mame/drivers/higemaru.c
@@ -21,10 +21,10 @@ static TIMER_DEVICE_CALLBACK( higemaru_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xcf); /* RST 08h - vblank */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h - vblank */
if(scanline == 0) // unknown irq event, does various stuff like copying the spriteram
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xd7); /* RST 10h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
}
diff --git a/src/mame/drivers/hnayayoi.c b/src/mame/drivers/hnayayoi.c
index 65ba4687656..c2372280a1b 100644
--- a/src/mame/drivers/hnayayoi.c
+++ b/src/mame/drivers/hnayayoi.c
@@ -505,7 +505,7 @@ INPUT_PORTS_END
static void irqhandler(device_t *device, int irq)
{
popmessage("irq");
-// cputag_set_input_line(device->machine(), "maincpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+// device->machine().device("maincpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c
index 9e6656274d3..d69272226a0 100644
--- a/src/mame/drivers/hng64.c
+++ b/src/mame/drivers/hng64.c
@@ -1048,14 +1048,14 @@ WRITE32_MEMBER( hng64_state::hng64_soundcpu_enable_w )
if (cmd==0x55AA)
{
printf("soundcpu ON\n");
- cputag_set_input_line(space.machine(), "audiocpu", INPUT_LINE_HALT, CLEAR_LINE);
- cputag_set_input_line(space.machine(), "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
+ space.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ space.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
else if (cmd==0xAA55)
{
printf("soundcpu OFF\n");
- cputag_set_input_line(space.machine(), "audiocpu", INPUT_LINE_HALT, ASSERT_LINE);
- cputag_set_input_line(space.machine(), "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ space.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ space.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
else
{
@@ -1796,8 +1796,8 @@ static MACHINE_RESET(hyperneo)
UINT8 *RAM = (UINT8*)state->m_soundram;
state->membank("bank1")->set_base(&RAM[0x1f0000]); // allows us to boot
state->membank("bank2")->set_base(&RAM[0x1f0000]); // seems to be the right default for most games (initial area jumps to a DI here)
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_HALT, ASSERT_LINE);
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
/* Comm CPU */
KL5C80_init(state);
@@ -1811,8 +1811,8 @@ static MACHINE_RESET(hyperneo)
address_space *space = machine.device<z80_device>("comm")->space(AS_PROGRAM);
space->set_direct_update_handler(direct_update_delegate(FUNC(hng64_state::KL5C80_direct_handler), state));
- cputag_set_input_line(machine, "comm", INPUT_LINE_RESET, PULSE_LINE); // reset the CPU and let 'er rip
-// cputag_set_input_line(machine, "comm", INPUT_LINE_HALT, ASSERT_LINE); // hold on there pardner...
+ machine.device("comm")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); // reset the CPU and let 'er rip
+// machine.device("comm")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); // hold on there pardner...
// "Display List" init - ugly
state->m_activeBuffer = 0;
diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c
index 1026acd105f..133bd0305cb 100644
--- a/src/mame/drivers/hornet.c
+++ b/src/mame/drivers/hornet.c
@@ -410,7 +410,7 @@ WRITE32_MEMBER(hornet_state::hornet_k037122_reg_w)
static void voodoo_vblank_0(device_t *device, int param)
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_IRQ0, param);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, param);
}
static void voodoo_vblank_1(device_t *device, int param)
@@ -546,7 +546,7 @@ WRITE8_MEMBER(hornet_state::sysreg_w)
adc1213x_di_w(adc12138, 0, (data >> 1) & 0x1);
adc1213x_sclk_w(adc12138, 0, data & 0x1);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
mame_printf_debug("System register 1 = %02X\n", data);
break;
@@ -581,9 +581,9 @@ WRITE8_MEMBER(hornet_state::sysreg_w)
0x01 = EXRGB
*/
if (data & 0x80)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ1, CLEAR_LINE);
if (data & 0x40)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
set_cgboard_id((data >> 4) & 3);
break;
}
@@ -621,7 +621,7 @@ WRITE32_MEMBER(hornet_state::gun_w)
if (mem_mask == 0xffff0000)
{
m_gn680_latch = data>>16;
- cputag_set_input_line(machine(), "gn680", M68K_IRQ_6, HOLD_LINE);
+ machine().device("gn680")->execute().set_input_line(M68K_IRQ_6, HOLD_LINE);
}
}
@@ -672,7 +672,7 @@ WRITE16_MEMBER(hornet_state::gn680_sysctrl)
READ16_MEMBER(hornet_state::gn680_latch_r)
{
- cputag_set_input_line(machine(), "gn680", M68K_IRQ_6, CLEAR_LINE);
+ machine().device("gn680")->execute().set_input_line(M68K_IRQ_6, CLEAR_LINE);
return m_gn680_latch;
}
@@ -909,7 +909,7 @@ static MACHINE_RESET( hornet )
machine.root_device().membank("bank1")->set_entry(0);
}
- cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
if (usr5)
machine.root_device().membank("bank5")->set_base(usr5);
@@ -933,7 +933,7 @@ static const adc12138_interface hornet_adc_interface = {
static TIMER_CALLBACK( irq_off )
{
- cputag_set_input_line(machine, "audiocpu", param, CLEAR_LINE);
+ machine.device("audiocpu")->execute().set_input_line(param, CLEAR_LINE);
}
static void sound_irq_callback( running_machine &machine, int irq )
@@ -941,7 +941,7 @@ static void sound_irq_callback( running_machine &machine, int irq )
hornet_state *state = machine.driver_data<hornet_state>();
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
- cputag_set_input_line(machine, "audiocpu", line, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(line, ASSERT_LINE);
state->m_sound_irq_timer->adjust(attotime::from_usec(1), line);
}
@@ -1046,8 +1046,8 @@ static MACHINE_RESET( hornet_2board )
machine.root_device().membank("bank1")->configure_entries(0, machine.root_device().memregion("user3")->bytes() / 0x10000, usr3, 0x10000);
machine.root_device().membank("bank1")->set_entry(0);
}
- cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "dsp2", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp2")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
if (usr5)
{
diff --git a/src/mame/drivers/hyprduel.c b/src/mame/drivers/hyprduel.c
index 4cc4266bce2..544a2c8007b 100644
--- a/src/mame/drivers/hyprduel.c
+++ b/src/mame/drivers/hyprduel.c
@@ -640,7 +640,7 @@ static MACHINE_RESET( hyprduel )
hyprduel_state *state = machine.driver_data<hyprduel_state>();
/* start with cpu2 halted */
- cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("sub")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
state->m_subcpu_resetline = 1;
state->m_cpu_trigger = 0;
diff --git a/src/mame/drivers/igs011.c b/src/mame/drivers/igs011.c
index 801b54bf46b..8bcf6847e8f 100644
--- a/src/mame/drivers/igs011.c
+++ b/src/mame/drivers/igs011.c
@@ -3933,7 +3933,7 @@ MACHINE_CONFIG_END
static void sound_irq(device_t *device, int state)
{
-// cputag_set_input_line(machine, "maincpu", 3, state);
+// machine.device("maincpu")->execute().set_input_line(3, state);
}
static MACHINE_CONFIG_DERIVED( vbowl, igs011_base )
diff --git a/src/mame/drivers/igspoker.c b/src/mame/drivers/igspoker.c
index 6a550ea9791..5d921a967de 100644
--- a/src/mame/drivers/igspoker.c
+++ b/src/mame/drivers/igspoker.c
@@ -152,7 +152,7 @@ READ8_MEMBER(igspoker_state::igs_irqack_r)
WRITE8_MEMBER(igspoker_state::igs_irqack_w)
{
-// cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+// machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/iqblock.c b/src/mame/drivers/iqblock.c
index 4c108f670ce..6c841fb521a 100644
--- a/src/mame/drivers/iqblock.c
+++ b/src/mame/drivers/iqblock.c
@@ -90,7 +90,7 @@ static TIMER_DEVICE_CALLBACK( iqblock_irq )
WRITE8_MEMBER(iqblock_state::iqblock_irqack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
READ8_MEMBER(iqblock_state::extrarom_r)
diff --git a/src/mame/drivers/irobot.c b/src/mame/drivers/irobot.c
index ba0993339a0..d706e0a2372 100644
--- a/src/mame/drivers/irobot.c
+++ b/src/mame/drivers/irobot.c
@@ -107,13 +107,13 @@ WRITE8_MEMBER(irobot_state::irobot_nvram_w)
WRITE8_MEMBER(irobot_state::irobot_clearirq_w)
{
- cputag_set_input_line(machine(), "maincpu", M6809_IRQ_LINE ,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE ,CLEAR_LINE);
}
WRITE8_MEMBER(irobot_state::irobot_clearfirq_w)
{
- cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE ,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE ,CLEAR_LINE);
}
diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c
index e8b1f0f2f4a..a33469a2e4d 100644
--- a/src/mame/drivers/istellar.c
+++ b/src/mame/drivers/istellar.c
@@ -109,7 +109,7 @@ WRITE8_MEMBER(istellar_state::z80_0_latch2_write)
if (m_z80_2_nmi_enable)
{
logerror("Executing an NMI on CPU2\n");
- cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, PULSE_LINE); /* Maybe this is a ASSERT_LINE, CLEAR_LINE combo? */
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* Maybe this is a ASSERT_LINE, CLEAR_LINE combo? */
m_z80_2_nmi_enable = 0;
}
}
@@ -320,7 +320,7 @@ static INTERRUPT_GEN( vblank_callback_istellar )
device_set_input_line(device, 0, HOLD_LINE);
/* Interrupt presumably comes from the LDP's status strobe */
- cputag_set_input_line(device->machine(), "sub", 0, ASSERT_LINE);
+ device->machine().device("sub")->execute().set_input_line(0, ASSERT_LINE);
}
diff --git a/src/mame/drivers/itech32.c b/src/mame/drivers/itech32.c
index 4b48f012313..9f6eed2085c 100644
--- a/src/mame/drivers/itech32.c
+++ b/src/mame/drivers/itech32.c
@@ -401,15 +401,15 @@ void itech32_update_interrupts(running_machine &machine, int vint, int xint, int
if (state->m_is_drivedge)
{
- cputag_set_input_line(machine, "maincpu", 3, state->m_vint_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 4, state->m_xint_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 5, state->m_qint_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, state->m_vint_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_xint_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(5, state->m_qint_state ? ASSERT_LINE : CLEAR_LINE);
}
else
{
- cputag_set_input_line(machine, "maincpu", 1, state->m_vint_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 2, state->m_xint_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 3, state->m_qint_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_vint_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_xint_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, state->m_qint_state ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -449,8 +449,8 @@ static MACHINE_RESET( drivedge )
{
MACHINE_RESET_CALL(itech32);
- cputag_set_input_line(machine, "dsp1", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "dsp2", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp1")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp2")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
STOP_TMS_SPINNING(machine, 0);
STOP_TMS_SPINNING(machine, 1);
}
@@ -641,7 +641,7 @@ static TIMER_CALLBACK( delayed_sound_data_w )
itech32_state *state = machine.driver_data<itech32_state>();
state->m_sound_data = param;
state->m_sound_int_state = 1;
- cputag_set_input_line(machine, "soundcpu", M6809_IRQ_LINE, ASSERT_LINE);
+ machine.device("soundcpu")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
@@ -667,7 +667,7 @@ WRITE32_MEMBER(itech32_state::sound_data32_w)
READ8_MEMBER(itech32_state::sound_data_r)
{
- cputag_set_input_line(machine(), "soundcpu", M6809_IRQ_LINE, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
m_sound_int_state = 0;
return m_sound_data;
}
@@ -764,7 +764,7 @@ static const via6522_interface drivedge_via_interface =
WRITE8_MEMBER(itech32_state::firq_clear_w)
{
- cputag_set_input_line(machine(), "soundcpu", M6809_FIRQ_LINE, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
}
@@ -777,8 +777,8 @@ WRITE8_MEMBER(itech32_state::firq_clear_w)
WRITE32_MEMBER(itech32_state::tms_reset_assert_w)
{
- cputag_set_input_line(machine(), "dsp1", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine(), "dsp2", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("dsp1")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("dsp2")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
@@ -787,12 +787,12 @@ WRITE32_MEMBER(itech32_state::tms_reset_clear_w)
/* kludge to prevent crash on first boot */
if ((m_tms1_ram[0] & 0xff000000) == 0)
{
- cputag_set_input_line(machine(), "dsp1", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("dsp1")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
STOP_TMS_SPINNING(machine(), 0);
}
if ((m_tms2_ram[0] & 0xff000000) == 0)
{
- cputag_set_input_line(machine(), "dsp2", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("dsp2")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
STOP_TMS_SPINNING(machine(), 1);
}
}
diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c
index 3b9fda5329c..d19d3eef4b7 100644
--- a/src/mame/drivers/itech8.c
+++ b/src/mame/drivers/itech8.c
@@ -583,16 +583,16 @@ void itech8_update_interrupts(running_machine &machine, int periodic, int tms340
if (main_cpu_type == M6809 || main_cpu_type == HD6309)
{
/* just modify lines that have changed */
- if (periodic != -1) cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, periodic ? ASSERT_LINE : CLEAR_LINE);
- if (tms34061 != -1) cputag_set_input_line(machine, "maincpu", M6809_IRQ_LINE, tms34061 ? ASSERT_LINE : CLEAR_LINE);
- if (blitter != -1) cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, blitter ? ASSERT_LINE : CLEAR_LINE);
+ if (periodic != -1) machine.device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, periodic ? ASSERT_LINE : CLEAR_LINE);
+ if (tms34061 != -1) machine.device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, tms34061 ? ASSERT_LINE : CLEAR_LINE);
+ if (blitter != -1) machine.device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, blitter ? ASSERT_LINE : CLEAR_LINE);
}
/* handle the 68000 case */
else
{
- cputag_set_input_line(machine, "maincpu", 2, state->m_blitter_int ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 3, state->m_periodic_int ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_blitter_int ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, state->m_periodic_int ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -623,13 +623,13 @@ static INTERRUPT_GEN( generate_nmi )
WRITE8_MEMBER(itech8_state::itech8_nmi_ack_w)
{
/* doesn't seem to hold for every game (e.g., hstennis) */
-/* cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);*/
+/* machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);*/
}
static void generate_sound_irq(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "soundcpu", M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -784,7 +784,7 @@ static TIMER_CALLBACK( delayed_sound_data_w )
{
itech8_state *state = machine.driver_data<itech8_state>();
state->m_sound_data = param;
- cputag_set_input_line(machine, "soundcpu", M6809_IRQ_LINE, ASSERT_LINE);
+ machine.device("soundcpu")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
@@ -807,7 +807,7 @@ WRITE8_MEMBER(itech8_state::gtg2_sound_data_w)
READ8_MEMBER(itech8_state::sound_data_r)
{
- cputag_set_input_line(machine(), "soundcpu", M6809_IRQ_LINE, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
return m_sound_data;
}
diff --git a/src/mame/drivers/itgambl2.c b/src/mame/drivers/itgambl2.c
index 69d93f95df5..3906296ea6e 100644
--- a/src/mame/drivers/itgambl2.c
+++ b/src/mame/drivers/itgambl2.c
@@ -238,7 +238,7 @@ GFXDECODE_END
static MACHINE_RESET( itgambl2 )
{
/* stop the CPU, we have no code for it anyway */
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
/* default 444 palette for debug purpose*/
diff --git a/src/mame/drivers/itgambl3.c b/src/mame/drivers/itgambl3.c
index a83fd5e788e..6609e61f85f 100644
--- a/src/mame/drivers/itgambl3.c
+++ b/src/mame/drivers/itgambl3.c
@@ -226,7 +226,7 @@ GFXDECODE_END
static MACHINE_RESET( itgambl3 )
{
/* stop the CPU, we have no code for it anyway */
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
/* default 444 palette for debug purpose*/
diff --git a/src/mame/drivers/itgamble.c b/src/mame/drivers/itgamble.c
index 0a7de91c4e3..56d3a138aec 100644
--- a/src/mame/drivers/itgamble.c
+++ b/src/mame/drivers/itgamble.c
@@ -194,7 +194,7 @@ GFXDECODE_END
void itgamble_state::machine_reset()
{
/* stop the CPU, we have no code for it anyway */
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
diff --git a/src/mame/drivers/jackie.c b/src/mame/drivers/jackie.c
index d4016fc182e..90205cb49bc 100644
--- a/src/mame/drivers/jackie.c
+++ b/src/mame/drivers/jackie.c
@@ -340,7 +340,7 @@ READ8_MEMBER(jackie_state::igs_irqack_r)
WRITE8_MEMBER(jackie_state::igs_irqack_w)
{
-// cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+// machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
m_out[2] = data;
show_out();
}
diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c
index 33397f4444f..454b991cbfe 100644
--- a/src/mame/drivers/jchan.c
+++ b/src/mame/drivers/jchan.c
@@ -392,7 +392,7 @@ WRITE16_MEMBER(jchan_state::main2sub_cmd_w)
{
COMBINE_DATA(&m_mainsub_shared_ram[0x03ffe/2]);
- cputag_set_input_line(machine(), "sub", 4, HOLD_LINE);
+ machine().device("sub")->execute().set_input_line(4, HOLD_LINE);
}
// is this called?
@@ -400,7 +400,7 @@ WRITE16_MEMBER(jchan_state::sub2main_cmd_w)
{
COMBINE_DATA(&m_mainsub_shared_ram[0x0000/2]);
- cputag_set_input_line(machine(), "maincpu", 3, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
}
/* ram convert for suprnova (requires 32-bit stuff) */
diff --git a/src/mame/drivers/jedi.c b/src/mame/drivers/jedi.c
index 1ef0c0fcbd9..727334324f2 100644
--- a/src/mame/drivers/jedi.c
+++ b/src/mame/drivers/jedi.c
@@ -129,8 +129,8 @@ static TIMER_CALLBACK( generate_interrupt )
int scanline = param;
/* IRQ is set by /32V */
- cputag_set_input_line(machine, "maincpu", M6502_IRQ_LINE, (scanline & 32) ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine, "audiocpu", M6502_IRQ_LINE, (scanline & 32) ? CLEAR_LINE : ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, (scanline & 32) ? CLEAR_LINE : ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, (scanline & 32) ? CLEAR_LINE : ASSERT_LINE);
/* set up for the next */
scanline += 32;
@@ -142,7 +142,7 @@ static TIMER_CALLBACK( generate_interrupt )
WRITE8_MEMBER(jedi_state::main_irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", M6502_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
}
diff --git a/src/mame/drivers/jpmimpct.c b/src/mame/drivers/jpmimpct.c
index c9d1e3b9a91..430026ea670 100644
--- a/src/mame/drivers/jpmimpct.c
+++ b/src/mame/drivers/jpmimpct.c
@@ -113,8 +113,8 @@
static void update_irqs(running_machine &machine)
{
jpmimpct_state *state = machine.driver_data<jpmimpct_state>();
- cputag_set_input_line(machine, "maincpu", 2, state->m_tms_irq ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 5, state->m_duart_1_irq ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_tms_irq ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(5, state->m_duart_1_irq ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/jpmsys5.c b/src/mame/drivers/jpmsys5.c
index 3d011a7e597..192826a8666 100644
--- a/src/mame/drivers/jpmsys5.c
+++ b/src/mame/drivers/jpmsys5.c
@@ -128,7 +128,7 @@ enum int_levels
static void tms_interrupt(running_machine &machine, int state)
{
- cputag_set_input_line(machine, "maincpu", INT_TMS34061, state);
+ machine.device("maincpu")->execute().set_input_line(INT_TMS34061, state);
}
static const struct tms34061_interface tms34061intf =
@@ -547,7 +547,7 @@ INPUT_PORTS_END
WRITE_LINE_MEMBER(jpmsys5_state::ptm_irq)
{
- cputag_set_input_line(machine(), "maincpu", INT_6840PTM, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INT_6840PTM, state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE8_MEMBER(jpmsys5_state::u26_o1_callback)
@@ -585,7 +585,7 @@ static const ptm6840_interface ptm_intf =
WRITE_LINE_MEMBER(jpmsys5_state::acia_irq)
{
- cputag_set_input_line(machine(), "maincpu", INT_6850ACIA, state ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INT_6850ACIA, state ? CLEAR_LINE : ASSERT_LINE);
}
/* Clocks are incorrect */
diff --git a/src/mame/drivers/jrpacman.c b/src/mame/drivers/jrpacman.c
index faa16b93a9d..e0a54c69f5e 100644
--- a/src/mame/drivers/jrpacman.c
+++ b/src/mame/drivers/jrpacman.c
@@ -119,7 +119,7 @@ public:
WRITE8_MEMBER(jrpacman_state::jrpacman_interrupt_vector_w)
{
device_set_input_line_vector(machine().device("maincpu"), 0, data);
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(jrpacman_state::irq_mask_w)
diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c
index 4f01fd93b2d..392b08a23f4 100644
--- a/src/mame/drivers/kaneko16.c
+++ b/src/mame/drivers/kaneko16.c
@@ -154,7 +154,7 @@ WRITE16_MEMBER(kaneko16_state::kaneko16_soundlatch_w)
if (ACCESSING_BITS_8_15)
{
soundlatch_byte_w(space, 0, (data & 0xff00) >> 8 );
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
diff --git a/src/mame/drivers/kangaroo.c b/src/mame/drivers/kangaroo.c
index 6f97afcf6ed..4ed2dddf626 100644
--- a/src/mame/drivers/kangaroo.c
+++ b/src/mame/drivers/kangaroo.c
@@ -203,7 +203,7 @@ static MACHINE_RESET( kangaroo )
/* the copy protection. */
/* Anyway, what I do here is just immediately generate the NMI, so the game */
/* properly starts. */
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
state->m_clock = 0;
}
diff --git a/src/mame/drivers/kas89.c b/src/mame/drivers/kas89.c
index ea4cc3a1035..bfdbc89bbba 100644
--- a/src/mame/drivers/kas89.c
+++ b/src/mame/drivers/kas89.c
@@ -237,7 +237,7 @@ public:
static void kas89_vdp_interrupt(device_t *, v99x8_device &device, int i)
{
- cputag_set_input_line (device.machine(), "maincpu", 0, (i ? ASSERT_LINE : CLEAR_LINE));
+ device.machine().device("maincpu")->execute().set_input_line(0, (i ? ASSERT_LINE : CLEAR_LINE));
}
static TIMER_DEVICE_CALLBACK( kas89_interrupt )
diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c
index 9bc1b560f68..c12db8b3a4c 100644
--- a/src/mame/drivers/kingdrby.c
+++ b/src/mame/drivers/kingdrby.c
@@ -286,7 +286,7 @@ WRITE8_MEMBER(kingdrby_state::hopper_io_w)
WRITE8_MEMBER(kingdrby_state::sound_cmd_w)
{
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
m_sound_cmd = data;
/* soundlatch is unneeded since we are already using perfect interleave. */
// soundlatch_byte_w(space,0, data);
diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c
index e873ecac5d0..612adc0a81a 100644
--- a/src/mame/drivers/kinst.c
+++ b/src/mame/drivers/kinst.c
@@ -277,7 +277,7 @@ static SCREEN_UPDATE_IND16( kinst )
static TIMER_CALLBACK( irq0_stop )
{
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -290,7 +290,7 @@ static INTERRUPT_GEN( irq0_start )
static void ide_interrupt(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "maincpu", 1, state);
+ device->machine().device("maincpu")->execute().set_input_line(1, state);
}
diff --git a/src/mame/drivers/klax.c b/src/mame/drivers/klax.c
index a1606036453..6621033f42b 100644
--- a/src/mame/drivers/klax.c
+++ b/src/mame/drivers/klax.c
@@ -34,7 +34,7 @@
static void update_interrupts(running_machine &machine)
{
klax_state *state = machine.driver_data<klax_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_video_int_state || state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state || state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/konamigq.c b/src/mame/drivers/konamigq.c
index 9baafd45b55..9e65a6c0c8f 100644
--- a/src/mame/drivers/konamigq.c
+++ b/src/mame/drivers/konamigq.c
@@ -97,7 +97,7 @@ WRITE32_MEMBER(konamigq_state::soundr3k_w)
m_sndto000[ ( offset << 1 ) + 1 ] = data >> 16;
if( offset == 3 )
{
- cputag_set_input_line(machine(), "soundcpu", 1, HOLD_LINE );
+ machine().device("soundcpu")->execute().set_input_line(1, HOLD_LINE );
}
}
if( ACCESSING_BITS_0_15 )
@@ -150,7 +150,7 @@ static const UINT16 konamigq_def_eeprom[64] =
WRITE32_MEMBER(konamigq_state::eeprom_w)
{
ioport("EEPROMOUT")->write(data & 0x07, 0xff);
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_RESET, ( data & 0x40 ) ? CLEAR_LINE : ASSERT_LINE );
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, ( data & 0x40 ) ? CLEAR_LINE : ASSERT_LINE );
}
diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c
index d4496403f4d..34c0ef7e5ce 100644
--- a/src/mame/drivers/konamigx.c
+++ b/src/mame/drivers/konamigx.c
@@ -420,7 +420,7 @@ WRITE32_MEMBER(konamigx_state::esc_w)
if (konamigx_wrport1_1 & 0x10)
{
gx_rdport1_3 &= ~8;
- cputag_set_input_line(machine(), "maincpu", 4, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
}
}
else
@@ -510,13 +510,13 @@ WRITE32_MEMBER(konamigx_state::control_w)
{
// enable 68k
// clear the halt condition and reset the 68000
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_HALT, CLEAR_LINE);
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
else
{
// disable 68k
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
K053246_set_OBJCHA_line((data&0x100000) ? ASSERT_LINE : CLEAR_LINE);
@@ -579,14 +579,14 @@ WRITE32_MEMBER(konamigx_state::ccu_w)
// vblank interrupt ACK
if (ACCESSING_BITS_24_31)
{
- cputag_set_input_line(machine(), "maincpu", 1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
gx_syncen |= 0x20;
}
// hblank interrupt ACK
if (ACCESSING_BITS_8_15)
{
- cputag_set_input_line(machine(), "maincpu", 2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
gx_syncen |= 0x40;
}
}
@@ -616,7 +616,7 @@ static TIMER_CALLBACK( dmaend_callback )
// lower OBJINT-REQ flag and trigger interrupt
gx_rdport1_3 &= ~0x80;
- cputag_set_input_line(machine, "maincpu", 3, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, HOLD_LINE);
}
}
@@ -840,7 +840,7 @@ INLINE void write_snd_020(running_machine &machine, int reg, int val)
if (reg == 7)
{
- cputag_set_input_line(machine, "soundcpu", 1, HOLD_LINE);
+ machine.device("soundcpu")->execute().set_input_line(1, HOLD_LINE);
}
}
@@ -1133,7 +1133,7 @@ WRITE32_MEMBER(konamigx_state::type4_prot_w)
if (konamigx_wrport1_1 & 0x10)
{
gx_rdport1_3 &= ~8;
- cputag_set_input_line(machine(), "maincpu", 4, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
}
// don't accidentally do a phony command
@@ -1283,7 +1283,7 @@ WRITE16_MEMBER(konamigx_state::tms57002_control_word_w)
{
machine().device<tms57002_device>("dasp")->pload_w(space, 0, data & 4);
machine().device<tms57002_device>("dasp")->cload_w(space, 0, data & 8);
- cputag_set_input_line(machine(), "dasp", INPUT_LINE_RESET, !(data & 16) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("dasp")->execute().set_input_line(INPUT_LINE_RESET, !(data & 16) ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -3645,8 +3645,8 @@ static MACHINE_RESET(konamigx)
memset(sndto020, 0, 16);
// sound CPU initially disabled?
- cputag_set_input_line(machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
- cputag_set_input_line(machine, "dasp", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("soundcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("dasp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
if (!strcmp(machine.system().name, "tkmmpzdm"))
{
diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c
index bb1bca71d1d..6b3d3d06c92 100644
--- a/src/mame/drivers/konamim2.c
+++ b/src/mame/drivers/konamim2.c
@@ -370,7 +370,7 @@ WRITE64_MEMBER(konamim2_state::unk4_w)
if (data & 0x800000)
{
// mame_printf_debug("CPU '%s': CPU1 IRQ at %08X\n", device().tag(), space.device().safe_pc());
- cputag_set_input_line(machine(), "sub", INPUT_LINE_IRQ0, ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
m_unk20004 = (UINT32)(data);
@@ -464,7 +464,7 @@ WRITE64_MEMBER(konamim2_state::reset_w)
{
if (data & U64(0x100000000))
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
m_unk3 = 0;
}
}
diff --git a/src/mame/drivers/kungfur.c b/src/mame/drivers/kungfur.c
index 80fa89d557f..e64e616d60f 100644
--- a/src/mame/drivers/kungfur.c
+++ b/src/mame/drivers/kungfur.c
@@ -156,7 +156,7 @@ WRITE8_MEMBER(kungfur_state::kungfur_control_w)
// d0-d3: N/C
// d4: irq ack
if (~data & 0x10)
- cputag_set_input_line(machine(), "maincpu", M6809_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
// d5: ?
// d6-d7: sound trigger (edge)
diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c
index 180205020fd..aea815c57b6 100644
--- a/src/mame/drivers/lgp.c
+++ b/src/mame/drivers/lgp.c
@@ -332,7 +332,7 @@ GFXDECODE_END
static TIMER_CALLBACK( irq_stop )
{
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
static INTERRUPT_GEN( vblank_callback_lgp )
diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c
index c6a72ed8aec..29e3091882c 100644
--- a/src/mame/drivers/looping.c
+++ b/src/mame/drivers/looping.c
@@ -341,34 +341,34 @@ static INTERRUPT_GEN( looping_interrupt )
WRITE8_MEMBER(looping_state::level2_irq_set)
{
if (!(data & 1))
- cputag_set_input_line_and_vector(machine(), "maincpu", 0, ASSERT_LINE, 4);
+ machine().device("maincpu")->execute().set_input_line_and_vector(0, ASSERT_LINE, 4);
}
WRITE8_MEMBER(looping_state::main_irq_ack_w)
{
if (data == 0)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(looping_state::looping_souint_clr)
{
if (data == 0)
- cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE_LINE_MEMBER(looping_state::looping_spcint)
{
- cputag_set_input_line_and_vector(machine(), "audiocpu", 0, !state, 6);
+ machine().device("audiocpu")->execute().set_input_line_and_vector(0, !state, 6);
}
WRITE8_MEMBER(looping_state::looping_soundlatch_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line_and_vector(machine(), "audiocpu", 0, ASSERT_LINE, 4);
+ machine().device("audiocpu")->execute().set_input_line_and_vector(0, ASSERT_LINE, 4);
}
diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c
index 0779bb160c2..f49ab4720f0 100644
--- a/src/mame/drivers/lordgun.c
+++ b/src/mame/drivers/lordgun.c
@@ -255,7 +255,7 @@ WRITE16_MEMBER(lordgun_state::lordgun_soundlatch_w)
if (ACCESSING_BITS_0_7) soundlatch_byte_w (space, 0, (data >> 0) & 0xff);
if (ACCESSING_BITS_8_15) soundlatch2_byte_w(space, 0, (data >> 8) & 0xff);
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( lordgun_map, AS_PROGRAM, 16, lordgun_state )
@@ -646,7 +646,7 @@ static I8255A_INTERFACE( aliencha_ppi8255_1_intf )
static void soundirq(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "soundcpu", INPUT_LINE_IRQ0, state);
+ device->machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_IRQ0, state);
}
static const ym3812_interface lordgun_ym3812_interface =
diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c
index 5fd50ab8706..c368c067bb8 100644
--- a/src/mame/drivers/luckgrln.c
+++ b/src/mame/drivers/luckgrln.c
@@ -990,7 +990,7 @@ static INTERRUPT_GEN( luckgrln_irq )
{
luckgrln_state *state = device->machine().driver_data<luckgrln_state>();
if(state->m_nmi_enable)
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( luckgrln, luckgrln_state )
diff --git a/src/mame/drivers/m107.c b/src/mame/drivers/m107.c
index ba02507d841..70c26dc4ef4 100644
--- a/src/mame/drivers/m107.c
+++ b/src/mame/drivers/m107.c
@@ -57,14 +57,14 @@ static TIMER_DEVICE_CALLBACK( m107_scanline_interrupt )
if (scanline == state->m_raster_irq_position)
{
machine.primary_screen->update_partial(scanline);
- cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, M107_IRQ_2);
+ machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_2);
}
/* VBLANK interrupt */
else if (scanline == machine.primary_screen->visible_area().max_y + 1)
{
machine.primary_screen->update_partial(scanline);
- cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, M107_IRQ_0);
+ machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_0);
}
}
@@ -91,7 +91,7 @@ WRITE16_MEMBER(m107_state::m107_bankswitch_w)
WRITE16_MEMBER(m107_state::m107_soundlatch_w)
{
- cputag_set_input_line(machine(), "soundcpu", NEC_INPUT_LINE_INTP1, ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(NEC_INPUT_LINE_INTP1, ASSERT_LINE);
soundlatch_byte_w(space, 0, data & 0xff);
// logerror("soundlatch_byte_w %02x\n",data);
}
@@ -103,24 +103,24 @@ READ16_MEMBER(m107_state::m107_sound_status_r)
READ16_MEMBER(m107_state::m107_soundlatch_r)
{
- cputag_set_input_line(machine(), "soundcpu", NEC_INPUT_LINE_INTP1, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(NEC_INPUT_LINE_INTP1, CLEAR_LINE);
return soundlatch_byte_r(space, offset) | 0xff00;
}
WRITE16_MEMBER(m107_state::m107_sound_irq_ack_w)
{
- cputag_set_input_line(machine(), "soundcpu", NEC_INPUT_LINE_INTP1, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(NEC_INPUT_LINE_INTP1, CLEAR_LINE);
}
WRITE16_MEMBER(m107_state::m107_sound_status_w)
{
COMBINE_DATA(&m_sound_status);
- cputag_set_input_line_and_vector(machine(), "maincpu", 0, HOLD_LINE, M107_IRQ_3);
+ machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_3);
}
WRITE16_MEMBER(m107_state::m107_sound_reset_w)
{
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_RESET, (data) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, (data) ? CLEAR_LINE : ASSERT_LINE);
}
/*****************************************************************************/
@@ -756,7 +756,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "soundcpu", NEC_INPUT_LINE_INTP0, state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(NEC_INPUT_LINE_INTP0, state ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface ym2151_config =
diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c
index 2fc8136a1af..a1e06749a1a 100644
--- a/src/mame/drivers/m72.c
+++ b/src/mame/drivers/m72.c
@@ -160,14 +160,14 @@ static TIMER_CALLBACK( m72_scanline_interrupt )
if (scanline < 256 && scanline == state->m_raster_irq_position - 128)
{
machine.primary_screen->update_partial(scanline);
- cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, state->m_irq_base + 2);
+ machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, state->m_irq_base + 2);
}
/* VBLANK interrupt */
else if (scanline == 256)
{
machine.primary_screen->update_partial(scanline);
- cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, state->m_irq_base + 0);
+ machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, state->m_irq_base + 0);
}
/* adjust for next scanline */
@@ -185,19 +185,19 @@ static TIMER_CALLBACK( kengo_scanline_interrupt )
if (scanline < 256 && scanline == state->m_raster_irq_position - 128)
{
machine.primary_screen->update_partial(scanline);
- cputag_set_input_line(machine, "maincpu", NEC_INPUT_LINE_INTP2, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(NEC_INPUT_LINE_INTP2, ASSERT_LINE);
}
else
- cputag_set_input_line(machine, "maincpu", NEC_INPUT_LINE_INTP2, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(NEC_INPUT_LINE_INTP2, CLEAR_LINE);
/* VBLANK interrupt */
if (scanline == 256)
{
machine.primary_screen->update_partial(scanline);
- cputag_set_input_line(machine, "maincpu", NEC_INPUT_LINE_INTP0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(NEC_INPUT_LINE_INTP0, ASSERT_LINE);
}
else
- cputag_set_input_line(machine, "maincpu", NEC_INPUT_LINE_INTP0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(NEC_INPUT_LINE_INTP0, CLEAR_LINE);
/* adjust for next scanline */
if (++scanline >= machine.primary_screen->height())
@@ -238,7 +238,7 @@ WRITE16_MEMBER(m72_state::m72_main_mcu_sound_w)
if (ACCESSING_BITS_0_7)
{
m_mcu_snd_cmd_latch = data;
- cputag_set_input_line(machine(), "mcu", 1, ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(1, ASSERT_LINE);
}
}
@@ -255,7 +255,7 @@ WRITE16_MEMBER(m72_state::m72_main_mcu_w)
if (offset == 0x0fff/2 && ACCESSING_BITS_8_15)
{
m_protection_ram[offset] = val;
- cputag_set_input_line(machine(), "mcu", 0, ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(0, ASSERT_LINE);
/* Line driven, most likely by write line */
//machine().scheduler().timer_set(machine().device<cpu_device>("mcu")->cycles_to_attotime(2), FUNC(mcu_irq0_clear));
//machine().scheduler().timer_set(machine().device<cpu_device>("mcu")->cycles_to_attotime(0), FUNC(mcu_irq0_raise));
@@ -279,7 +279,7 @@ READ8_MEMBER(m72_state::m72_mcu_data_r)
if (offset == 0x0fff || offset == 0x0ffe)
{
- cputag_set_input_line(machine(), "mcu", 0, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(0, CLEAR_LINE);
}
if (offset&1) ret = (m_protection_ram[offset/2] & 0xff00)>>8;
@@ -305,7 +305,7 @@ READ8_MEMBER(m72_state::m72_mcu_sample_r)
WRITE8_MEMBER(m72_state::m72_mcu_ack_w)
{
- cputag_set_input_line(machine(), "mcu", 1, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(1, CLEAR_LINE);
m_mcu_snd_cmd_latch = 0;
}
@@ -325,7 +325,7 @@ WRITE8_MEMBER(m72_state::m72_mcu_port_w)
if (offset == 1)
{
m_mcu_sample_latch = data;
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
else
logerror("port: %02x %02x\n", offset, data);
diff --git a/src/mame/drivers/m90.c b/src/mame/drivers/m90.c
index 0e3fa59a925..78e41f922b4 100644
--- a/src/mame/drivers/m90.c
+++ b/src/mame/drivers/m90.c
@@ -59,7 +59,7 @@ WRITE16_MEMBER(m90_state::dynablsb_sound_command_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
diff --git a/src/mame/drivers/madalien.c b/src/mame/drivers/madalien.c
index 13e4fb6b4f8..0164cf5fad2 100644
--- a/src/mame/drivers/madalien.c
+++ b/src/mame/drivers/madalien.c
@@ -19,7 +19,7 @@
INPUT_CHANGED_MEMBER(madalien_state::coin_inserted)
{
/* coin insertion causes an NMI */
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@@ -54,14 +54,14 @@ WRITE8_MEMBER(madalien_state::madalien_output_w)
WRITE8_MEMBER(madalien_state::madalien_sound_command_w)
{
- cputag_set_input_line(machine(), "audiocpu", 0, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, ASSERT_LINE);
soundlatch_byte_w(space, offset, data);
}
READ8_MEMBER(madalien_state::madalien_sound_command_r)
{
- cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
return soundlatch_byte_r(space, offset);
}
diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c
index 2a95649c6e0..61bee5f2512 100644
--- a/src/mame/drivers/magmax.c
+++ b/src/mame/drivers/magmax.c
@@ -35,13 +35,13 @@ WRITE16_MEMBER(magmax_state::magmax_sound_w)
if (ACCESSING_BITS_0_7)
{
m_sound_latch = (data & 0xff) << 1;
- cputag_set_input_line(machine(), "audiocpu", 0, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, ASSERT_LINE);
}
}
READ8_MEMBER(magmax_state::magmax_sound_irq_ack)
{
- cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
return 0;
}
diff --git a/src/mame/drivers/mainsnk.c b/src/mame/drivers/mainsnk.c
index 9e97e690ee1..a44954685d3 100644
--- a/src/mame/drivers/mainsnk.c
+++ b/src/mame/drivers/mainsnk.c
@@ -117,7 +117,7 @@ WRITE8_MEMBER(mainsnk_state::sound_command_w)
m_sound_cpu_busy = 1;
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
READ8_MEMBER(mainsnk_state::sound_command_r)
diff --git a/src/mame/drivers/mappy.c b/src/mame/drivers/mappy.c
index a40ca63b8e5..d0b35c40a75 100644
--- a/src/mame/drivers/mappy.c
+++ b/src/mame/drivers/mappy.c
@@ -588,13 +588,13 @@ WRITE8_MEMBER(mappy_state::superpac_latch_w)
case 0x00: /* INT ON 2 */
m_sub_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "sub", 0, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x02: /* INT ON */
m_main_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x04: /* n.c. */
@@ -610,7 +610,7 @@ WRITE8_MEMBER(mappy_state::superpac_latch_w)
break;
case 0x0a: /* SUB RESET */
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
break;
case 0x0c: /* n.c. */
@@ -632,19 +632,19 @@ WRITE8_MEMBER(mappy_state::phozon_latch_w)
case 0x00:
m_sub_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "sub", 0, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x02:
m_main_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x04:
m_sub2_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "sub2", 0, CLEAR_LINE);
+ machine().device("sub2")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x06:
@@ -657,11 +657,11 @@ WRITE8_MEMBER(mappy_state::phozon_latch_w)
break;
case 0x0a:
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
break;
case 0x0c:
- cputag_set_input_line(machine(), "sub2", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub2")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
break;
case 0x0e:
@@ -680,13 +680,13 @@ WRITE8_MEMBER(mappy_state::mappy_latch_w)
case 0x00: /* INT ON 2 */
m_sub_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "sub", 0, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x02: /* INT ON */
m_main_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x04: /* FLIP */
@@ -703,7 +703,7 @@ WRITE8_MEMBER(mappy_state::mappy_latch_w)
break;
case 0x0a: /* SUB RESET */
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
break;
case 0x0c: /* n.c. */
@@ -773,7 +773,7 @@ static INTERRUPT_GEN( superpac_main_vblank_irq )
device_t *namcoio_2 = device->machine().device("namcoio_2");
if (state->m_main_irq_mask)
- cputag_set_input_line(device->machine(), "maincpu", 0, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */
device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(superpac_io_run));
@@ -805,7 +805,7 @@ static INTERRUPT_GEN( pacnpal_main_vblank_irq )
device_t *namcoio_2 = device->machine().device("namcoio_2");
if (state->m_main_irq_mask)
- cputag_set_input_line(device->machine(), "maincpu", 0, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */
device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(pacnpal_io_run));
@@ -837,7 +837,7 @@ static INTERRUPT_GEN( phozon_main_vblank_irq )
device_t *namcoio_2 = device->machine().device("namcoio_2");
if (state->m_main_irq_mask)
- cputag_set_input_line(device->machine(), "maincpu", 0, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */
device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(phozon_io_run));
@@ -869,7 +869,7 @@ static INTERRUPT_GEN( mappy_main_vblank_irq )
device_t *namcoio_2 = device->machine().device("namcoio_2");
if(state->m_main_irq_mask)
- cputag_set_input_line(device->machine(), "maincpu", 0, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */
device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(mappy_io_run));
@@ -883,7 +883,7 @@ static INTERRUPT_GEN( sub_vblank_irq )
mappy_state *state = device->machine().driver_data<mappy_state>();
if(state->m_sub_irq_mask)
- cputag_set_input_line(device->machine(), "sub", 0, ASSERT_LINE);
+ device->machine().device("sub")->execute().set_input_line(0, ASSERT_LINE);
}
static INTERRUPT_GEN( sub2_vblank_irq )
@@ -891,7 +891,7 @@ static INTERRUPT_GEN( sub2_vblank_irq )
mappy_state *state = device->machine().driver_data<mappy_state>();
if(state->m_sub2_irq_mask)
- cputag_set_input_line(device->machine(), "sub2", 0, ASSERT_LINE);
+ device->machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE);
}
static ADDRESS_MAP_START( superpac_cpu1_map, AS_PROGRAM, 8, mappy_state )
diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c
index 288f93a15f9..86e566c8c16 100644
--- a/src/mame/drivers/mastboy.c
+++ b/src/mame/drivers/mastboy.c
@@ -673,7 +673,7 @@ static void mastboy_adpcm_int(device_t *device)
state->m_m5205_part ^= 1;
if(!state->m_m5205_part)
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -689,7 +689,7 @@ WRITE8_MEMBER(mastboy_state::mastboy_irq0_ack_w)
{
m_irq0_ack = data;
if ((data & 1) == 1)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
static INTERRUPT_GEN( mastboy_interrupt )
diff --git a/src/mame/drivers/maxaflex.c b/src/mame/drivers/maxaflex.c
index ddab3a92f25..ef63da3d1b0 100644
--- a/src/mame/drivers/maxaflex.c
+++ b/src/mame/drivers/maxaflex.c
@@ -111,14 +111,14 @@ WRITE8_MEMBER(maxaflex_state::mcu_portB_w)
/* clear coin interrupt */
if (data & 0x04)
- cputag_set_input_line(machine(), "mcu", M6805_IRQ_LINE, CLEAR_LINE );
+ machine().device("mcu")->execute().set_input_line(M6805_IRQ_LINE, CLEAR_LINE );
/* AUDMUTE */
machine().sound().system_enable((data >> 5) & 1);
/* RES600 */
if (diff & 0x10)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
/* latch for lamps */
if ((diff & 0x40) && !(data & 0x40))
@@ -260,7 +260,7 @@ static MACHINE_RESET(supervisor_board)
INPUT_CHANGED_MEMBER(maxaflex_state::coin_inserted)
{
if (!newval)
- cputag_set_input_line(machine(), "mcu", M6805_IRQ_LINE, HOLD_LINE );
+ machine().device("mcu")->execute().set_input_line(M6805_IRQ_LINE, HOLD_LINE );
}
int atari_input_disabled(running_machine &machine)
diff --git a/src/mame/drivers/maygay1b.c b/src/mame/drivers/maygay1b.c
index e3f6712d4d0..c2a4917074c 100644
--- a/src/mame/drivers/maygay1b.c
+++ b/src/mame/drivers/maygay1b.c
@@ -550,7 +550,7 @@ static MACHINE_RESET( m1 )
static void duart_irq_handler(device_t *device, int state, UINT8 vector)
{
- cputag_set_input_line(device->machine(), "maincpu", M6809_IRQ_LINE, state);
+ device->machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, state);
LOG(("6809 irq%d \n",state));
}
@@ -564,7 +564,7 @@ static void cpu0_firq(int state)
static void cpu0_nmi(running_machine &machine, int state)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, state?ASSERT_LINE:CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, state?ASSERT_LINE:CLEAR_LINE);
LOG(("6809 nmi%d \n",state));
}
diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c
index 0666bbb5b92..e8354ebc6d6 100644
--- a/src/mame/drivers/maygayv1.c
+++ b/src/mame/drivers/maygayv1.c
@@ -674,7 +674,7 @@ WRITE16_MEMBER(maygayv1_state::vsync_int_ctrl)
// Active low
if (!(m_vsync_latch_preset))
- cputag_set_input_line(machine(), "maincpu", 3, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
}
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, maygayv1_state )
@@ -931,8 +931,8 @@ INPUT_PORTS_END
static void duart_irq_handler(device_t *device, int state, UINT8 vector)
{
- cputag_set_input_line_and_vector(device->machine(), "maincpu", 5, state, vector);
-// cputag_set_input_line(device->machine(), "maincpu", 5, state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line_and_vector(5, state, vector);
+// device->machine().device("maincpu")->execute().set_input_line(5, state ? ASSERT_LINE : CLEAR_LINE);
};
@@ -942,7 +942,7 @@ static void duart_tx(device_t *device, int channel, UINT8 data)
if (channel == 0)
{
state->m_d68681_val = data;
- cputag_set_input_line(device->machine(), "soundcpu", MCS51_RX_LINE, ASSERT_LINE); // ?
+ device->machine().device("soundcpu")->execute().set_input_line(MCS51_RX_LINE, ASSERT_LINE); // ?
}
};
@@ -1028,7 +1028,7 @@ static INTERRUPT_GEN( vsync_interrupt )
{
maygayv1_state *state = device->machine().driver_data<maygayv1_state>();
if (state->m_vsync_latch_preset)
- cputag_set_input_line(device->machine(), "maincpu", 3, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE);
}
diff --git a/src/mame/drivers/meadows.c b/src/mame/drivers/meadows.c
index 3ed5b171aee..63ea93ebdde 100644
--- a/src/mame/drivers/meadows.c
+++ b/src/mame/drivers/meadows.c
@@ -198,7 +198,7 @@ WRITE8_MEMBER(meadows_state::meadows_audio_w)
INPUT_CHANGED_MEMBER(meadows_state::coin_inserted)
{
- cputag_set_input_line_and_vector(machine(), "maincpu", 0, (newval ? ASSERT_LINE : CLEAR_LINE), 0x82);
+ machine().device("maincpu")->execute().set_input_line_and_vector(0, (newval ? ASSERT_LINE : CLEAR_LINE), 0x82);
}
diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c
index 3f9cbccd683..853963e83fa 100644
--- a/src/mame/drivers/mediagx.c
+++ b/src/mame/drivers/mediagx.c
@@ -873,7 +873,7 @@ WRITE8_MEMBER(mediagx_state::at_page8_w)
WRITE_LINE_MEMBER(mediagx_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
@@ -1091,7 +1091,7 @@ static MACHINE_RESET(mediagx)
WRITE_LINE_MEMBER(mediagx_state::mediagx_pic8259_1_set_int_line)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER(mediagx_state::get_slave_ack)
@@ -1213,7 +1213,7 @@ MACHINE_CONFIG_END
static void set_gate_a20(running_machine &machine, int a20)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, a20);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_A20, a20);
}
static void keyboard_interrupt(running_machine &machine, int _state)
diff --git a/src/mame/drivers/megaplay.c b/src/mame/drivers/megaplay.c
index 6d83407f8b4..9178ba53dbd 100644
--- a/src/mame/drivers/megaplay.c
+++ b/src/mame/drivers/megaplay.c
@@ -534,7 +534,7 @@ static WRITE8_HANDLER( megaplay_bios_6404_w )
{
mplay_state *state = space->machine().driver_data<mplay_state>();
if(((state->m_bios_6404 & 0x0c) == 0x00) && ((data & 0x0c) == 0x0c))
- cputag_set_input_line(space->machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
+ space->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
state->m_bios_6404 = data;
// logerror("BIOS: 0x6404 write: 0x%02x\n", data);
diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c
index 35cf278818c..10d125d73bd 100644
--- a/src/mame/drivers/megasys1.c
+++ b/src/mame/drivers/megasys1.c
@@ -162,13 +162,13 @@ static TIMER_DEVICE_CALLBACK( megasys1A_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
if(scanline == 0)
- cputag_set_input_line(timer.machine(), "maincpu", 1, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
if(scanline == 128)
- cputag_set_input_line(timer.machine(), "maincpu", 3, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
}
static ADDRESS_MAP_START( megasys1A_map, AS_PROGRAM, 16, megasys1_state )
@@ -198,13 +198,13 @@ static TIMER_DEVICE_CALLBACK( megasys1B_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
if(scanline == 0)
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
if(scanline == 128)
- cputag_set_input_line(timer.machine(), "maincpu", 1, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
}
@@ -249,7 +249,7 @@ READ16_MEMBER(megasys1_state::ip_select_r)
WRITE16_MEMBER(megasys1_state::ip_select_w)
{
COMBINE_DATA(&m_ip_select);
- cputag_set_input_line(machine(), "maincpu", 2, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
}
@@ -376,7 +376,7 @@ ADDRESS_MAP_END
static void megasys1_sound_irq(device_t *device, int irq)
{
if (irq)
- cputag_set_input_line(device->machine(), "soundcpu", 4, HOLD_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(4, HOLD_LINE);
}
READ8_MEMBER(megasys1_state::oki_status_1_r)
@@ -1398,7 +1398,7 @@ WRITE16_MEMBER(megasys1_state::protection_peekaboo_w)
}
}
- cputag_set_input_line(machine(), "maincpu", 4, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
}
/*************************************
@@ -1647,7 +1647,7 @@ MACHINE_CONFIG_END
static void irq_handler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c
index cf868f56c5a..9b5581c35ed 100644
--- a/src/mame/drivers/megatech.c
+++ b/src/mame/drivers/megatech.c
@@ -231,16 +231,16 @@ static TIMER_CALLBACK( megatech_z80_run_state )
printf("enabling SMS Z80\n");
state->m_current_game_is_sms = 1;
megatech_set_genz80_as_sms_standard_map(machine, "genesis_snd_z80", MAPPER_STANDARD);
- //cputag_set_input_line(machine, "genesis_snd_z80", INPUT_LINE_HALT, CLEAR_LINE);
- cputag_set_input_line(machine, "genesis_snd_z80", INPUT_LINE_RESET, CLEAR_LINE);
+ //machine.device("genesis_snd_z80")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ machine.device("genesis_snd_z80")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
else
{
printf("disabling SMS Z80\n");
state->m_current_game_is_sms = 0;
megatech_set_megadrive_z80_as_megadrive_z80(machine, "genesis_snd_z80");
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_RESET, CLEAR_LINE);
- //cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ //machine.device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
}
@@ -254,10 +254,10 @@ static TIMER_CALLBACK( megatech_z80_stop_state )
sprintf(tempname, "game%d", param);
game_region = machine.root_device().memregion(tempname)->base();
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "genesis_snd_z80", INPUT_LINE_RESET, ASSERT_LINE);
- //cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
- //cputag_set_input_line(machine, "genesis_snd_z80", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("genesis_snd_z80")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ //machine.device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ //machine.device("genesis_snd_z80")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
devtag_reset(machine, "ymsnd");
megadriv_stop_scanline_timer(machine);// stop the scanline timer for the genesis vdp... it can be restarted in video eof when needed
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index 3dae4de1b07..f91a4ae662c 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -281,7 +281,7 @@ WRITE_LINE_MEMBER(merit_state::hsync_changed)
WRITE_LINE_MEMBER(merit_state::vsync_changed)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
static const mc6845_interface mc6845_intf =
diff --git a/src/mame/drivers/metalmx.c b/src/mame/drivers/metalmx.c
index cdf44c3235b..8d03b23f7fb 100644
--- a/src/mame/drivers/metalmx.c
+++ b/src/mame/drivers/metalmx.c
@@ -493,7 +493,7 @@ WRITE32_MEMBER(metalmx_state::host_vram_w)
static void tms_interrupt(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "maincpu", 4, state ? HOLD_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(4, state ? HOLD_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/metlclsh.c b/src/mame/drivers/metlclsh.c
index 22bff37ea5a..c10f7730e66 100644
--- a/src/mame/drivers/metlclsh.c
+++ b/src/mame/drivers/metlclsh.c
@@ -131,7 +131,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(metlclsh_state::coin_inserted)
{
if (oldval)
- cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
static INPUT_PORTS_START( metlclsh )
diff --git a/src/mame/drivers/mexico86.c b/src/mame/drivers/mexico86.c
index 6b66096d089..d498995ef25 100644
--- a/src/mame/drivers/mexico86.c
+++ b/src/mame/drivers/mexico86.c
@@ -453,7 +453,7 @@ static MACHINE_RESET( mexico86 )
/*TODO: check the PCB and see how the halt / reset lines are connected. */
if (machine.device("sub") != NULL)
- cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, (state->ioport("DSW1")->read() & 0x80) ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("sub")->execute().set_input_line(INPUT_LINE_RESET, (state->ioport("DSW1")->read() & 0x80) ? ASSERT_LINE : CLEAR_LINE);
state->m_port_a_in = 0;
state->m_port_a_out = 0;
diff --git a/src/mame/drivers/midqslvr.c b/src/mame/drivers/midqslvr.c
index 64f127c3d42..6a9dbaf3a8f 100644
--- a/src/mame/drivers/midqslvr.c
+++ b/src/mame/drivers/midqslvr.c
@@ -472,7 +472,7 @@ WRITE8_MEMBER(midqslvr_state::at_dma8237_2_w)
WRITE_LINE_MEMBER(midqslvr_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c
index 31664f4be6a..4d4843900f5 100644
--- a/src/mame/drivers/midvunit.c
+++ b/src/mame/drivers/midvunit.c
@@ -126,7 +126,7 @@ READ32_MEMBER(midvunit_state::midvunit_adc_r)
{
if (!(m_control_data & 0x40))
{
- cputag_set_input_line(machine(), "maincpu", 3, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
return m_adc_data << m_adc_shift;
}
else
@@ -137,7 +137,7 @@ READ32_MEMBER(midvunit_state::midvunit_adc_r)
static TIMER_CALLBACK( adc_ready )
{
- cputag_set_input_line(machine, "maincpu", 3, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, ASSERT_LINE);
}
diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c
index ccb55d40783..4ee63f0a0f7 100644
--- a/src/mame/drivers/midzeus.c
+++ b/src/mame/drivers/midzeus.c
@@ -112,7 +112,7 @@ static MACHINE_RESET( midzeus )
static TIMER_CALLBACK( display_irq_off )
{
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
static INTERRUPT_GEN( display_irq )
@@ -487,9 +487,9 @@ static void update_gun_irq(running_machine &machine)
{
/* low 2 bits of gun_control seem to enable IRQs */
if (gun_irq_state & gun_control & 0x03)
- cputag_set_input_line(machine, "maincpu", 3, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, ASSERT_LINE);
else
- cputag_set_input_line(machine, "maincpu", 3, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
}
diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c
index ca86354b9eb..01a0501edfb 100644
--- a/src/mame/drivers/mirax.c
+++ b/src/mame/drivers/mirax.c
@@ -262,7 +262,7 @@ WRITE8_MEMBER(mirax_state::nmi_mask_w)
WRITE8_MEMBER(mirax_state::mirax_sound_cmd_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c
index 048bbceb99b..ddabbf31a6c 100644
--- a/src/mame/drivers/missb2.c
+++ b/src/mame/drivers/missb2.c
@@ -416,7 +416,7 @@ GFXDECODE_END
WRITE_LINE_MEMBER(missb2_state::irqhandler)
{
logerror("YM3526 firing an IRQ\n");
-// cputag_set_input_line(machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+// machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym3526_interface ym3526_config =
diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c
index 8823b730421..fa0a800a14a 100644
--- a/src/mame/drivers/mlanding.c
+++ b/src/mame/drivers/mlanding.c
@@ -299,7 +299,7 @@ static void ml_msm5205_vck(device_t *device)
if(state->m_trigger == 0)
{
state->m_adpcm_pos++;
- //cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ //device->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
/*TODO: simplify this */
if(ROM[state->m_adpcm_pos] == 0x00 && ROM[state->m_adpcm_pos+1] == 0x00 && ROM[state->m_adpcm_pos+2] == 0x00 && ROM[state->m_adpcm_pos+3] == 0x00
&& ROM[state->m_adpcm_pos+4] == 0x00 && ROM[state->m_adpcm_pos+5] == 0x00 && ROM[state->m_adpcm_pos+6] == 0x00 && ROM[state->m_adpcm_pos+7] == 0x00
@@ -331,13 +331,13 @@ WRITE16_MEMBER(mlanding_state::ml_sub_reset_w)
}
if(!(data & 0x40)) // unknown line used
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
//data & 0x20 sound cpu?
if(!(data & 0x80)) // unknown line used
{
- cputag_set_input_line(machine(), "dsp", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("dsp")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
m_dsp_HOLD_signal = data & 0x80;
}
}
@@ -349,7 +349,7 @@ WRITE16_MEMBER(mlanding_state::ml_to_sound_w)
tc0140syt_port_w(tc0140syt, 0, data & 0xff);
else if (offset == 1)
{
- //cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, ASSERT_LINE);
+ //machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
tc0140syt_comm_w(tc0140syt, 0, data & 0xff);
}
}
@@ -361,7 +361,7 @@ WRITE8_MEMBER(mlanding_state::ml_sound_to_main_w)
tc0140syt_slave_port_w(tc0140syt, 0, data & 0xff);
else if (offset == 1)
{
- //cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
+ //machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
tc0140syt_slave_comm_w(tc0140syt, 0, data & 0xff);
}
}
@@ -457,7 +457,7 @@ READ16_MEMBER(mlanding_state::ml_analog3_msb_r)
WRITE16_MEMBER(mlanding_state::ml_nmi_to_sound_w)
{
-// cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
+// machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
READ16_MEMBER(mlanding_state::ml_mecha_ram_r)
@@ -730,7 +730,7 @@ INPUT_PORTS_END
static void irq_handler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const msm5205_interface msm5205_config =
@@ -753,9 +753,9 @@ static const tc0140syt_interface mlanding_tc0140syt_intf =
static MACHINE_RESET( mlanding )
{
mlanding_state *state = machine.driver_data<mlanding_state>();
- cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("sub")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
state->m_adpcm_pos = 0;
state->m_adpcm_data = -1;
state->m_adpcm_idle = 1;
diff --git a/src/mame/drivers/model1.c b/src/mame/drivers/model1.c
index 28e7bc872f0..cc6785b05d2 100644
--- a/src/mame/drivers/model1.c
+++ b/src/mame/drivers/model1.c
@@ -697,7 +697,7 @@ static void irq_raise(running_machine &machine, int level)
// logerror("irq: raising %d\n", level);
// irq_status |= (1 << level);
state->m_last_irq = level;
- cputag_set_input_line(machine, "maincpu", 0, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, HOLD_LINE);
}
static IRQ_CALLBACK(irq_callback)
@@ -721,7 +721,7 @@ static IRQ_CALLBACK(irq_callback)
static void irq_init(running_machine &machine)
{
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
device_set_irq_callback(machine.device("maincpu"), irq_callback);
}
@@ -741,7 +741,7 @@ static TIMER_DEVICE_CALLBACK( model1_interrupt )
// if the FIFO has something in it, signal the 68k too
if (state->m_fifo_rptr != state->m_fifo_wptr)
{
- cputag_set_input_line(timer.machine(), "audiocpu", 2, HOLD_LINE);
+ timer.machine().device("audiocpu")->execute().set_input_line(2, HOLD_LINE);
}
}
}
@@ -873,7 +873,7 @@ WRITE16_MEMBER(model1_state::snd_latch_to_68k_w)
}
// signal the 68000 that there's data waiting
- cputag_set_input_line(machine(), "audiocpu", 2, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(2, HOLD_LINE);
// give the 68k time to reply
device_spin_until_time(&space.device(), attotime::from_usec(40));
}
diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c
index 9a96d85b877..1832fa87ca0 100644
--- a/src/mame/drivers/model2.c
+++ b/src/mame/drivers/model2.c
@@ -299,7 +299,7 @@ static TIMER_DEVICE_CALLBACK( model2_timer_cb )
state->m_intreq |= (1<<bit);
if (state->m_intena & (1<<bit))
{
- cputag_set_input_line(timer.machine(), "maincpu", I960_IRQ2, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(I960_IRQ2, ASSERT_LINE);
}
state->m_timervals[tnum] = 0;
@@ -348,7 +348,7 @@ static MACHINE_RESET(model2o)
MACHINE_RESET_CALL(model2_common);
// hold TGP in halt until we have code
- cputag_set_input_line(machine, "tgp", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("tgp")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
state->m_dsp_type = DSP_TYPE_TGP;
}
@@ -372,7 +372,7 @@ static MACHINE_RESET(model2)
MACHINE_RESET_CALL(model2_scsp);
// hold TGP in halt until we have code
- cputag_set_input_line(machine, "tgp", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("tgp")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
state->m_dsp_type = DSP_TYPE_TGP;
}
@@ -383,12 +383,12 @@ static MACHINE_RESET(model2b)
MACHINE_RESET_CALL(model2_common);
MACHINE_RESET_CALL(model2_scsp);
- cputag_set_input_line(machine, "dsp", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("dsp")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
// set FIFOIN empty flag on SHARC
- cputag_set_input_line(machine, "dsp", SHARC_INPUT_FLAG0, ASSERT_LINE);
+ machine.device("dsp")->execute().set_input_line(SHARC_INPUT_FLAG0, ASSERT_LINE);
// clear FIFOOUT buffer full flag on SHARC
- cputag_set_input_line(machine, "dsp", SHARC_INPUT_FLAG1, CLEAR_LINE);
+ machine.device("dsp")->execute().set_input_line(SHARC_INPUT_FLAG1, CLEAR_LINE);
state->m_dsp_type = DSP_TYPE_SHARC;
}
@@ -578,7 +578,7 @@ WRITE32_MEMBER(model2_state::srallyc_devices_w)
if(mem_mask == 0x000000ff || mem_mask == 0x0000ffff)
{
m_driveio_comm_data = data & 0xff;
- cputag_set_input_line(machine(), "drivecpu", 0, HOLD_LINE);
+ machine().device("drivecpu")->execute().set_input_line(0, HOLD_LINE);
}
}
@@ -620,9 +620,9 @@ WRITE32_MEMBER(model2_state::copro_ctl1_w)
if (m_dsp_type != DSP_TYPE_TGPX4)
{
if (m_dsp_type == DSP_TYPE_SHARC)
- cputag_set_input_line(machine(), "dsp", INPUT_LINE_HALT, CLEAR_LINE);
+ machine().device("dsp")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
else
- cputag_set_input_line(machine(), "tgp", INPUT_LINE_HALT, CLEAR_LINE);
+ machine().device("tgp")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
}
}
@@ -746,7 +746,7 @@ WRITE32_MEMBER(model2_state::geo_sharc_ctl1_w)
else
{
logerror("Boot geo, %d dwords\n", m_geocnt);
- cputag_set_input_line(machine(), "dsp2", INPUT_LINE_HALT, CLEAR_LINE);
+ machine().device("dsp2")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
//device_spin_until_time(&space.device(), attotime::from_usec(1000)); // Give the SHARC enough time to boot itself
}
}
@@ -993,7 +993,7 @@ static void snd_latch_to_68k_w(address_space *space, int data)
state->m_to_68k = data;
- cputag_set_input_line(space->machine(), "audiocpu", 2, HOLD_LINE);
+ space->machine().device("audiocpu")->execute().set_input_line(2, HOLD_LINE);
// give the 68k time to notice
device_spin_until_time(&space->device(), attotime::from_usec(40));
@@ -1884,10 +1884,10 @@ static void scsp_irq(device_t *device, int irq)
if (irq > 0)
{
state->m_scsp_last_line = irq;
- cputag_set_input_line(device->machine(), "audiocpu", irq, ASSERT_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(irq, ASSERT_LINE);
}
else
- cputag_set_input_line(device->machine(), "audiocpu", -irq, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(-irq, CLEAR_LINE);
}
static const scsp_interface scsp_config =
diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c
index 8ce01cda2fb..30edbc3e122 100644
--- a/src/mame/drivers/model3.c
+++ b/src/mame/drivers/model3.c
@@ -673,13 +673,13 @@ static void update_irq_state(running_machine &machine)
if ((state->m_irq_enable & state->m_irq_state) || state->m_scsi_irq_state)
{
// printf("IRQ set: state %x enable %x scsi %x\n", state->m_irq_state, state->m_irq_enable, state->m_scsi_irq_state);
- cputag_set_input_line(machine, "maincpu", PPC_IRQ, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(PPC_IRQ, ASSERT_LINE);
state->m_scsi_irq_state = 0;
}
else
{
// printf("IRQ clear: state %x enable %x scsi %x\n", state->m_irq_state, state->m_irq_enable, state->m_scsi_irq_state);
- cputag_set_input_line(machine, "maincpu", PPC_IRQ, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(PPC_IRQ, CLEAR_LINE);
}
}
@@ -5226,10 +5226,10 @@ static void scsp_irq(device_t *device, int irq)
if (irq > 0)
{
state->m_scsp_last_line = irq;
- cputag_set_input_line(device->machine(), "audiocpu", irq, ASSERT_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(irq, ASSERT_LINE);
}
else
- cputag_set_input_line(device->machine(), "audiocpu", -irq, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(-irq, CLEAR_LINE);
}
static const scsp_interface scsp_config =
diff --git a/src/mame/drivers/mpu3.c b/src/mame/drivers/mpu3.c
index 8f23904564f..a44be3bd988 100644
--- a/src/mame/drivers/mpu3.c
+++ b/src/mame/drivers/mpu3.c
@@ -248,7 +248,7 @@ WRITE_LINE_MEMBER(mpu3_state::cpu0_irq)
pia6->irq_a_state() | pia6->irq_b_state() |
ptm2->irq_state();
- cputag_set_input_line(machine(), "maincpu", M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
LOG(("6808 int%d \n", combined_state));
}
diff --git a/src/mame/drivers/mpu4dealem.c b/src/mame/drivers/mpu4dealem.c
index 4ec38c54fe5..deab67317e5 100644
--- a/src/mame/drivers/mpu4dealem.c
+++ b/src/mame/drivers/mpu4dealem.c
@@ -132,7 +132,7 @@ static SCREEN_UPDATE_IND16(dealem)
static WRITE_LINE_DEVICE_HANDLER( dealem_vsync_changed )
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, state);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, state);
}
diff --git a/src/mame/drivers/mpu4hw.c b/src/mame/drivers/mpu4hw.c
index cb8f3b5bb17..70233e46294 100644
--- a/src/mame/drivers/mpu4hw.c
+++ b/src/mame/drivers/mpu4hw.c
@@ -490,12 +490,12 @@ WRITE_LINE_MEMBER(mpu4_state::cpu0_irq)
if (!m_link7a_connected) //7B = IRQ, 7A = FIRQ, both = NMI
{
- cputag_set_input_line(machine(), "maincpu", M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
LOG(("6809 int%d \n", combined_state));
}
else
{
- cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
LOG(("6809 fint%d \n", combined_state));
}
}
diff --git a/src/mame/drivers/mpu4vid.c b/src/mame/drivers/mpu4vid.c
index fdb0ea768ac..73caf29903f 100644
--- a/src/mame/drivers/mpu4vid.c
+++ b/src/mame/drivers/mpu4vid.c
@@ -300,9 +300,9 @@ static WRITE16_HANDLER( bwb_characteriser16_w );
static void update_mpu68_interrupts(running_machine &machine)
{
mpu4vid_state *state = machine.driver_data<mpu4vid_state>();
- cputag_set_input_line(machine, "video", 1, state->m_m6840_irq_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "video", 2, state->m_m6850_irq_state ? CLEAR_LINE : ASSERT_LINE);
- cputag_set_input_line(machine, "video", 3, state->m_scn2674->get_irq_state() ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("video")->execute().set_input_line(1, state->m_m6840_irq_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("video")->execute().set_input_line(2, state->m_m6850_irq_state ? CLEAR_LINE : ASSERT_LINE);
+ machine.device("video")->execute().set_input_line(3, state->m_scn2674->get_irq_state() ? ASSERT_LINE : CLEAR_LINE);
}
/* Communications with 6809 board */
@@ -341,7 +341,7 @@ static WRITE_LINE_DEVICE_HANDLER( m6809_acia_irq )
{
mpu4vid_state *drvstate = device->machine().driver_data<mpu4vid_state>();
drvstate->m_m68k_acia_cts = !state;
- cputag_set_input_line(device->machine(), "maincpu", M6809_IRQ_LINE, state ? CLEAR_LINE : ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, state ? CLEAR_LINE : ASSERT_LINE);
}
static ACIA6850_INTERFACE( m6809_acia_if )
diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c
index a4c2ba5abaf..68710289246 100644
--- a/src/mame/drivers/ms32.c
+++ b/src/mame/drivers/ms32.c
@@ -220,7 +220,7 @@ READ32_MEMBER(ms32_state::ms32_read_inputs3)
WRITE32_MEMBER(ms32_state::ms32_sound_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
// give the Z80 time to respond
device_spin_until_time(&space.device(), attotime::from_usec(40));
@@ -233,7 +233,7 @@ READ32_MEMBER(ms32_state::ms32_sound_r)
WRITE32_MEMBER(ms32_state::reset_sub_w)
{
- if(data) cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, PULSE_LINE); // 0 too ?
+ if(data) machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); // 0 too ?
}
@@ -1292,7 +1292,7 @@ static void irq_init(running_machine &machine)
{
ms32_state *state = machine.driver_data<ms32_state>();
state->m_irqreq = 0;
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
device_set_irq_callback(machine.device("maincpu"), irq_callback);
}
@@ -1300,7 +1300,7 @@ static void irq_raise(running_machine &machine, int level)
{
ms32_state *state = machine.driver_data<ms32_state>();
state->m_irqreq |= (1<<level);
- cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
/* TODO: fix this arrangement (derived from old deprecat lib) */
@@ -1346,7 +1346,7 @@ static TIMER_DEVICE_CALLBACK(ms32_interrupt)
READ8_MEMBER(ms32_state::latch_r)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return soundlatch_byte_r(space,0)^0xff;
}
diff --git a/src/mame/drivers/msisaac.c b/src/mame/drivers/msisaac.c
index d348f964e2d..b8e9c590f33 100644
--- a/src/mame/drivers/msisaac.c
+++ b/src/mame/drivers/msisaac.c
@@ -468,7 +468,7 @@ static MACHINE_RESET( msisaac )
state->m_snd_ctrl1 = 0;
#ifdef USE_MCU
- cputag_set_input_line(machine, "mcu", 0, CLEAR_LINE);
+ machine.device("mcu")->execute().set_input_line(0, CLEAR_LINE);
#else
state->m_mcu_val = 0;
state->m_direction = 0;
diff --git a/src/mame/drivers/multigam.c b/src/mame/drivers/multigam.c
index 722548aa5de..cc59c9c25ba 100644
--- a/src/mame/drivers/multigam.c
+++ b/src/mame/drivers/multigam.c
@@ -1089,7 +1089,7 @@ static PALETTE_INIT( multigam )
static void ppu_irq( device_t *device, int *ppu_regs )
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/* our ppu interface */
diff --git a/src/mame/drivers/mustache.c b/src/mame/drivers/mustache.c
index a4f7fb662d1..1b2f479b461 100644
--- a/src/mame/drivers/mustache.c
+++ b/src/mame/drivers/mustache.c
@@ -159,7 +159,7 @@ GFXDECODE_END
static TIMER_CALLBACK( clear_irq_cb )
{
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
static INTERRUPT_GEN( assert_irq )
diff --git a/src/mame/drivers/mw18w.c b/src/mame/drivers/mw18w.c
index 69a36bd301e..40fcb25679c 100644
--- a/src/mame/drivers/mw18w.c
+++ b/src/mame/drivers/mw18w.c
@@ -64,7 +64,7 @@ WRITE8_MEMBER(mw18w_state::mw18w_led_display_w)
WRITE8_MEMBER(mw18w_state::mw18w_irq0_clear_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
CUSTOM_INPUT_MEMBER(mw18w_state::mw18w_sensors_r)
diff --git a/src/mame/drivers/mystston.c b/src/mame/drivers/mystston.c
index 7c1a7602c2f..31605d71d8a 100644
--- a/src/mame/drivers/mystston.c
+++ b/src/mame/drivers/mystston.c
@@ -39,13 +39,13 @@
void mystston_on_scanline_interrupt(running_machine &machine)
{
- cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
WRITE8_MEMBER(mystston_state::irq_clear_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -59,7 +59,7 @@ WRITE8_MEMBER(mystston_state::irq_clear_w)
INPUT_CHANGED_MEMBER(mystston_state::coin_inserted)
{
/* coin insertion causes an NMI */
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c
index ce2b10700ae..192d31ed2f2 100644
--- a/src/mame/drivers/mystwarr.c
+++ b/src/mame/drivers/mystwarr.c
@@ -184,7 +184,7 @@ WRITE16_MEMBER(mystwarr_state::sound_cmd2_msb_w)
WRITE16_MEMBER(mystwarr_state::sound_irq_w)
{
- cputag_set_input_line(machine(), "soundcpu", 0, HOLD_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, HOLD_LINE);
}
READ16_MEMBER(mystwarr_state::sound_status_r)
diff --git a/src/mame/drivers/namcofl.c b/src/mame/drivers/namcofl.c
index 1e082759477..ad8016705b4 100644
--- a/src/mame/drivers/namcofl.c
+++ b/src/mame/drivers/namcofl.c
@@ -524,14 +524,14 @@ GFXDECODE_END
static TIMER_CALLBACK( network_interrupt_callback )
{
- cputag_set_input_line(machine, "maincpu", I960_IRQ0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(I960_IRQ0, ASSERT_LINE);
machine.scheduler().timer_set(machine.primary_screen->frame_period(), FUNC(network_interrupt_callback));
}
static TIMER_CALLBACK( vblank_interrupt_callback )
{
- cputag_set_input_line(machine, "maincpu", I960_IRQ2, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(I960_IRQ2, ASSERT_LINE);
machine.scheduler().timer_set(machine.primary_screen->frame_period(), FUNC(vblank_interrupt_callback));
}
@@ -540,7 +540,7 @@ static TIMER_CALLBACK( raster_interrupt_callback )
{
namcofl_state *state = machine.driver_data<namcofl_state>();
machine.primary_screen->update_partial(machine.primary_screen->vpos());
- cputag_set_input_line(machine, "maincpu", I960_IRQ1, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(I960_IRQ1, ASSERT_LINE);
state->m_raster_interrupt_timer->adjust(machine.primary_screen->frame_period());
}
diff --git a/src/mame/drivers/namcona1.c b/src/mame/drivers/namcona1.c
index 4ed14f1739a..c90d1bb2495 100644
--- a/src/mame/drivers/namcona1.c
+++ b/src/mame/drivers/namcona1.c
@@ -719,7 +719,7 @@ WRITE16_MEMBER(namcona1_state::mcu_mailbox_w_68k)
// logerror("mailbox_w_68k: %x @ %x\n", data, offset);
if (offset == 4)
- cputag_set_input_line(machine(), "mcu", M37710_LINE_IRQ0, HOLD_LINE);
+ machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ0, HOLD_LINE);
COMBINE_DATA(&m_mcu_mailbox[offset%8]);
@@ -847,7 +847,7 @@ WRITE8_MEMBER(namcona1_state::port4_w)
logerror("launching 68k, PC=%x\n", space.device().safe_pc());
// reset and launch the 68k
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
m_mcu_port4 = data;
@@ -924,7 +924,7 @@ static MACHINE_START( namcona1 )
static MACHINE_RESET( namcona1_mcu )
{
namcona1_state *state = machine.driver_data<namcona1_state>();
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
state->m_mcu_port5 = 1;
}
diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c
index 3a69cdadccc..5cad337aa78 100644
--- a/src/mame/drivers/namconb1.c
+++ b/src/mame/drivers/namconb1.c
@@ -288,11 +288,11 @@ static TIMER_DEVICE_CALLBACK( mcu_interrupt )
/* TODO: real sources of these */
if (scanline == 224)
- cputag_set_input_line(timer.machine(), "mcu", M37710_LINE_IRQ0, HOLD_LINE);
+ timer.machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ0, HOLD_LINE);
else if (scanline == 0)
- cputag_set_input_line(timer.machine(), "mcu", M37710_LINE_IRQ2, HOLD_LINE);
+ timer.machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ2, HOLD_LINE);
else if (scanline == 128)
- cputag_set_input_line(timer.machine(), "mcu", M37710_LINE_ADC, HOLD_LINE);
+ timer.machine().device("mcu")->execute().set_input_line(M37710_LINE_ADC, HOLD_LINE);
}
@@ -304,7 +304,7 @@ static TIMER_CALLBACK( namconb1_TriggerPOSIRQ )
machine.primary_screen->update_partial(param);
state->m_pos_irq_active = 1;
- cputag_set_input_line(machine, "maincpu", state->m_namconb_cpureg[0x02] & 0xf, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(state->m_namconb_cpureg[0x02] & 0xf, ASSERT_LINE);
}
static INTERRUPT_GEN( namconb1_interrupt )
@@ -367,7 +367,7 @@ static TIMER_CALLBACK( namconb2_TriggerPOSIRQ )
namconb1_state *state = machine.driver_data<namconb1_state>();
machine.primary_screen->update_partial(param);
state->m_pos_irq_active = 1;
- cputag_set_input_line(machine, "maincpu", state->m_namconb_cpureg[0x02], ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(state->m_namconb_cpureg[0x02], ASSERT_LINE);
}
static INTERRUPT_GEN( namconb2_interrupt )
@@ -424,9 +424,9 @@ static void namconb1_cpureg8_w(running_machine &machine, int reg, UINT8 data)
switch(reg) {
case 0x02: // POS IRQ level/enable
if(state->m_pos_irq_active && (((prev & 0xf) != (data & 0xf)) || !(data & 0xf0))) {
- cputag_set_input_line(machine, "maincpu", prev & 0xf, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(prev & 0xf, CLEAR_LINE);
if(data & 0xf0)
- cputag_set_input_line(machine, "maincpu", data & 0xf, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(data & 0xf, ASSERT_LINE);
else
state->m_pos_irq_active = 0;
}
@@ -434,9 +434,9 @@ static void namconb1_cpureg8_w(running_machine &machine, int reg, UINT8 data)
case 0x04: // VBLANK IRQ level/enable
if(state->m_vblank_irq_active && (((prev & 0xf) != (data & 0xf)) || !(data & 0xf0))) {
- cputag_set_input_line(machine, "maincpu", prev & 0xf, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(prev & 0xf, CLEAR_LINE);
if(data & 0xf0)
- cputag_set_input_line(machine, "maincpu", data & 0xf, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(data & 0xf, ASSERT_LINE);
else
state->m_vblank_irq_active = 0;
}
@@ -444,14 +444,14 @@ static void namconb1_cpureg8_w(running_machine &machine, int reg, UINT8 data)
case 0x07: // POS ack
if(state->m_pos_irq_active) {
- cputag_set_input_line(machine, "maincpu", state->m_namconb_cpureg[0x02] & 0xf, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(state->m_namconb_cpureg[0x02] & 0xf, CLEAR_LINE);
state->m_pos_irq_active = 0;
}
break;
case 0x09: // VBLANK ack
if(state->m_vblank_irq_active) {
- cputag_set_input_line(machine, "maincpu", state->m_namconb_cpureg[0x04] & 0xf, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(state->m_namconb_cpureg[0x04] & 0xf, CLEAR_LINE);
state->m_vblank_irq_active = 0;
}
break;
@@ -461,11 +461,11 @@ static void namconb1_cpureg8_w(running_machine &machine, int reg, UINT8 data)
case 0x18: // C75 Control
if(data & 1) {
- cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, CLEAR_LINE);
- cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, CLEAR_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
} else
- cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
break;
}
}
@@ -491,9 +491,9 @@ static void namconb2_cpureg8_w(running_machine &machine, int reg, UINT8 data)
switch(reg) {
case 0x00: // VBLANK IRQ level
if(state->m_vblank_irq_active && (prev != data)) {
- cputag_set_input_line(machine, "maincpu", prev, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(prev, CLEAR_LINE);
if(data)
- cputag_set_input_line(machine, "maincpu", data, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(data, ASSERT_LINE);
else
state->m_vblank_irq_active = 0;
}
@@ -501,9 +501,9 @@ static void namconb2_cpureg8_w(running_machine &machine, int reg, UINT8 data)
case 0x02: // POS IRQ level
if(state->m_pos_irq_active && (prev != data)) {
- cputag_set_input_line(machine, "maincpu", prev, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(prev, CLEAR_LINE);
if(data)
- cputag_set_input_line(machine, "maincpu", data, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(data, ASSERT_LINE);
else
state->m_pos_irq_active = 0;
}
@@ -511,14 +511,14 @@ static void namconb2_cpureg8_w(running_machine &machine, int reg, UINT8 data)
case 0x04: // VBLANK ack
if(state->m_vblank_irq_active) {
- cputag_set_input_line(machine, "maincpu", state->m_namconb_cpureg[0x00], CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(state->m_namconb_cpureg[0x00], CLEAR_LINE);
state->m_vblank_irq_active = 0;
}
break;
case 0x06: // POS ack
if(state->m_pos_irq_active) {
- cputag_set_input_line(machine, "maincpu", state->m_namconb_cpureg[0x02], CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(state->m_namconb_cpureg[0x02], CLEAR_LINE);
state->m_pos_irq_active = 0;
}
break;
@@ -528,11 +528,11 @@ static void namconb2_cpureg8_w(running_machine &machine, int reg, UINT8 data)
case 0x16: // C75 Control
if(data & 1) {
- cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, CLEAR_LINE);
- cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, CLEAR_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
} else {
- cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
break;
}
diff --git a/src/mame/drivers/namcos1.c b/src/mame/drivers/namcos1.c
index 7ec5c552232..e6b0af0004a 100644
--- a/src/mame/drivers/namcos1.c
+++ b/src/mame/drivers/namcos1.c
@@ -352,7 +352,7 @@ C - uses sub board with support for player 3 and 4 controls
WRITE8_MEMBER(namcos1_state::namcos1_sub_firq_w)
{
- cputag_set_input_line(machine(), "sub", M6809_FIRQ_LINE, ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
}
WRITE8_MEMBER(namcos1_state::irq_ack_w)
@@ -1058,7 +1058,7 @@ GFXDECODE_END
static void namcos1_sound_interrupt( device_t *device, int irq )
{
- cputag_set_input_line(device->machine(), "audiocpu", M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface ym2151_config =
diff --git a/src/mame/drivers/namcos21.c b/src/mame/drivers/namcos21.c
index aa1202ae664..fb390956a0d 100644
--- a/src/mame/drivers/namcos21.c
+++ b/src/mame/drivers/namcos21.c
@@ -519,8 +519,8 @@ namcos21_kickstart( running_machine &machine, int internal )
state->m_mpDspState->slaveOutputSize = 0;
state->m_mpDspState->masterFinished = 0;
state->m_mpDspState->slaveActive = 0;
- cputag_set_input_line(machine, "dspmaster", 0, HOLD_LINE);
- cputag_set_input_line(machine, "dspslave", INPUT_LINE_RESET, PULSE_LINE);
+ machine.device("dspmaster")->execute().set_input_line(0, HOLD_LINE);
+ machine.device("dspslave")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
static UINT16
@@ -1230,7 +1230,7 @@ WRITE16_MEMBER(namcos21_state::winrun_dsp_complete_w)
if( data )
{
winrun_flushpoly(machine());
- cputag_set_input_line(machine(), "dsp", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("dsp")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
namcos21_ClearPolyFrameBuffer(machine());
}
}
diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c
index 0445012f7d3..ea1ce884a71 100644
--- a/src/mame/drivers/namcos23.c
+++ b/src/mame/drivers/namcos23.c
@@ -1558,7 +1558,7 @@ WRITE16_MEMBER(namcos23_state::s23_c417_w)
break;
case 7:
logerror("c417_w: ack IRQ 2 (%x)\n", data);
- cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(MIPS3_IRQ2, CLEAR_LINE);
break;
default:
logerror("c417_w %x, %04x @ %04x (%08x, %08x)\n", offset, data, mem_mask, space.device().safe_pc(), (unsigned int)space.device().state().state_int(MIPS3_R31));
@@ -1748,7 +1748,7 @@ static TIMER_CALLBACK( c361_timer_cb )
if (c361.scanline != 511)
{
- cputag_set_input_line(machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(MIPS3_IRQ1, ASSERT_LINE);
c361.timer->adjust(attotime::never);
}
}
@@ -1770,7 +1770,7 @@ WRITE16_MEMBER(namcos23_state::s23_c361_w)
c361.scanline = data;
if (data == 0x1ff)
{
- cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(MIPS3_IRQ1, CLEAR_LINE);
c361.timer->adjust(attotime::never);
}
else
@@ -1809,12 +1809,12 @@ WRITE16_MEMBER(namcos23_state::s23_c422_w)
if (data == 0xfffb)
{
logerror("c422_w: raise IRQ 3\n");
- cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ3, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(MIPS3_IRQ3, ASSERT_LINE);
}
else if (data == 0x000f)
{
logerror("c422_w: ack IRQ 3\n");
- cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ3, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(MIPS3_IRQ3, CLEAR_LINE);
}
break;
@@ -1840,16 +1840,16 @@ WRITE32_MEMBER(namcos23_state::s23_mcuen_w)
// Panic Park: writing 1 when it's already running means reboot?
if (m_s23_subcpu_running)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
m_s23_subcpu_running = 1;
}
else
{
logerror("S23: stopping H8/3002\n");
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_s23_subcpu_running = 0;
}
}
@@ -1874,7 +1874,7 @@ WRITE32_MEMBER(namcos23_state::gorgon_sharedram_w)
if ((offset == 0x6000/4) && (data == 0) && (mem_mask == 0xff000000))
{
logerror("S23: Final Furlong hack stopping H8/3002\n");
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
}
@@ -2199,7 +2199,7 @@ WRITE32_MEMBER(namcos23_state::p3d_w)
p3d_dma(&space, m_p3d_address, m_p3d_size);
return;
case 0x17:
- cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(MIPS3_IRQ1, CLEAR_LINE);
m_c361.timer->adjust(attotime::never);
return;
}
@@ -2512,7 +2512,7 @@ ADDRESS_MAP_END
READ32_MEMBER(namcos23_state::gmen_trigger_sh2)
{
logerror("gmen_trigger_sh2: booting SH-2\n");
- cputag_set_input_line(machine(), "gmen", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("gmen")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
return 0;
}
@@ -2542,7 +2542,7 @@ ADDRESS_MAP_END
static MACHINE_RESET(gmen)
{
// halt the SH-2 until we need it
- cputag_set_input_line(machine, "gmen", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("gmen")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
WRITE16_MEMBER(namcos23_state::sharedram_sub_w)
@@ -2572,7 +2572,7 @@ WRITE16_MEMBER(namcos23_state::sub_interrupt_main_w)
{
if ((mem_mask == 0xffff) && (data == 0x3170))
{
- cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ1, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(MIPS3_IRQ1, ASSERT_LINE);
}
else
{
@@ -2716,12 +2716,12 @@ READ8_MEMBER(namcos23_state::s23_mcu_iob_r)
if (m_im_rd == m_im_wr)
{
- cputag_set_input_line(machine(), "audiocpu", H8_SCI_0_RX, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(H8_SCI_0_RX, CLEAR_LINE);
}
else
{
- cputag_set_input_line(machine(), "audiocpu", H8_SCI_0_RX, CLEAR_LINE);
- cputag_set_input_line(machine(), "audiocpu", H8_SCI_0_RX, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(H8_SCI_0_RX, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(H8_SCI_0_RX, ASSERT_LINE);
}
return ret;
@@ -2732,7 +2732,7 @@ WRITE8_MEMBER(namcos23_state::s23_mcu_iob_w)
m_maintoio[m_mi_wr++] = data;
m_mi_wr &= 0x7f;
- cputag_set_input_line(machine(), "ioboard", H8_SCI_0_RX, ASSERT_LINE);
+ machine().device("ioboard")->execute().set_input_line(H8_SCI_0_RX, ASSERT_LINE);
}
static INPUT_PORTS_START( gorgon )
@@ -2964,7 +2964,7 @@ READ8_MEMBER(namcos23_state::s23_iob_mcu_r)
if (m_mi_rd == m_mi_wr)
{
- cputag_set_input_line(machine(), "ioboard", H8_SCI_0_RX, CLEAR_LINE);
+ machine().device("ioboard")->execute().set_input_line(H8_SCI_0_RX, CLEAR_LINE);
}
return ret;
@@ -2975,7 +2975,7 @@ WRITE8_MEMBER(namcos23_state::s23_iob_mcu_w)
m_iotomain[m_im_wr++] = data;
m_im_wr &= 0x7f;
- cputag_set_input_line(machine(), "audiocpu", H8_SCI_0_RX, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(H8_SCI_0_RX, ASSERT_LINE);
}
diff --git a/src/mame/drivers/namcos86.c b/src/mame/drivers/namcos86.c
index 19a593a2e3f..02418826e7f 100644
--- a/src/mame/drivers/namcos86.c
+++ b/src/mame/drivers/namcos86.c
@@ -247,12 +247,12 @@ READ8_MEMBER(namcos86_state::dsw1_r)
WRITE8_MEMBER(namcos86_state::int_ack1_w)
{
- cputag_set_input_line(machine(), "cpu1", 0, CLEAR_LINE);
+ machine().device("cpu1")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(namcos86_state::int_ack2_w)
{
- cputag_set_input_line(machine(), "cpu2", 0, CLEAR_LINE);
+ machine().device("cpu2")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c
index 2ae4772b3c5..4b90084ee87 100644
--- a/src/mame/drivers/naomi.c
+++ b/src/mame/drivers/naomi.c
@@ -1817,7 +1817,7 @@ ADDRESS_MAP_END
*/
static void aica_irq(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "soundcpu", ARM7_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(ARM7_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/naughtyb.c b/src/mame/drivers/naughtyb.c
index 961168afdb8..935c6900c84 100644
--- a/src/mame/drivers/naughtyb.c
+++ b/src/mame/drivers/naughtyb.c
@@ -281,7 +281,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(naughtyb_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( naughtyb )
diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c
index 40bfe45b2ee..5cc97173237 100644
--- a/src/mame/drivers/neogeo.c
+++ b/src/mame/drivers/neogeo.c
@@ -248,9 +248,9 @@ static void update_interrupts( running_machine &machine )
{
neogeo_state *state = machine.driver_data<neogeo_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_vblank_interrupt_pending ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 2, state->m_display_position_interrupt_pending ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 3, state->m_irq3_pending ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_vblank_interrupt_pending ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_display_position_interrupt_pending ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, state->m_irq3_pending ? ASSERT_LINE : CLEAR_LINE);
}
@@ -775,7 +775,7 @@ static void _set_audio_cpu_rom_source( address_space *space )
{
state->m_audio_cpu_rom_source_last = state->m_audio_cpu_rom_source;
- cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
+ space->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
if (LOG_AUDIO_CPU_BANKING) logerror("Audio CPU PC %03x: selectign %s ROM\n", space->device().safe_pc(), state->m_audio_cpu_rom_source ? "CARTRIDGE" : "BIOS");
}
diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c
index ebbe242137d..144bfcf1ac5 100644
--- a/src/mame/drivers/neoprint.c
+++ b/src/mame/drivers/neoprint.c
@@ -164,13 +164,13 @@ READ16_MEMBER(neoprint_state::neoprint_audio_result_r)
static void audio_cpu_assert_nmi(running_machine &machine)
{
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
WRITE8_MEMBER(neoprint_state::audio_cpu_clear_nmi_w)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
WRITE16_MEMBER(neoprint_state::audio_command_w)
@@ -448,7 +448,7 @@ GFXDECODE_END
static void audio_cpu_irq(device_t *device, int assert)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, assert ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, assert ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c
index a7b9d3499bd..b08d22edfe3 100644
--- a/src/mame/drivers/ninjakd2.c
+++ b/src/mame/drivers/ninjakd2.c
@@ -214,7 +214,7 @@ WRITE8_MEMBER(ninjakd2_state::robokid_bankselect_w)
WRITE8_MEMBER(ninjakd2_state::ninjakd2_soundreset_w)
{
// bit 4 resets sound CPU
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
// bit 7 flips screen
flip_screen_set(data & 0x80);
@@ -905,7 +905,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c
index eb7990ca139..ed9436d1f11 100644
--- a/src/mame/drivers/nmk16.c
+++ b/src/mame/drivers/nmk16.c
@@ -206,7 +206,7 @@ WRITE16_MEMBER(nmk16_state::ssmissin_sound_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
}
@@ -264,7 +264,7 @@ WRITE16_MEMBER(nmk16_state::macross2_sound_reset_w)
{
/* PCB behaviour verified by Corrado Tomaselli at MAME Italia Forum:
every time music changes Z80 is resetted */
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
}
WRITE16_MEMBER(nmk16_state::macross2_sound_command_w)
@@ -303,7 +303,7 @@ WRITE16_MEMBER(nmk16_state::afega_soundlatch_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data&0xff);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
}
@@ -3499,7 +3499,7 @@ static const ym2203_interface ym2203_nmk004_interface =
static void ym2203_irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
@@ -3517,12 +3517,12 @@ static TIMER_DEVICE_CALLBACK( nmk16_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
/* This is either vblank-in or sprite dma irq complete, Vandyke definitely relies that irq fires at scanline ~0 instead of 112 (as per previous
cpu_getiloops function implementation), mostly noticeable with sword collisions and related attract mode behaviour. */
if(scanline == 0)
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
}
/* bee-oh board, almost certainly it has different timings */
@@ -3531,11 +3531,11 @@ static TIMER_DEVICE_CALLBACK( manybloc_scanline )
int scanline = param;
if(scanline == 248) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
/* This is either vblank-in or sprite dma irq complete */
if(scanline == 0)
- cputag_set_input_line(timer.machine(), "maincpu", 2, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
}
@@ -4801,7 +4801,7 @@ GFXDECODE_END
static void irq_handler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface afega_ym2151_intf =
diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c
index 5bb9bafd452..93dcd4aac42 100644
--- a/src/mame/drivers/nwk-tr.c
+++ b/src/mame/drivers/nwk-tr.c
@@ -267,7 +267,7 @@ WRITE32_MEMBER(nwktr_state::paletteram32_w)
static void voodoo_vblank_0(device_t *device, int param)
{
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_IRQ0, param);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, param);
}
@@ -358,9 +358,9 @@ WRITE32_MEMBER(nwktr_state::sysreg_w)
if (ACCESSING_BITS_0_7)
{
if (data & 0x80) // CG Board 1 IRQ Ack
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ1, CLEAR_LINE);
if (data & 0x40) // CG Board 0 IRQ Ack
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
//set_cgboard_id((data >> 4) & 3);
}
@@ -510,7 +510,7 @@ WRITE32_MEMBER(nwktr_state::lanc2_w)
static TIMER_CALLBACK( irq_off )
{
- cputag_set_input_line(machine, "audiocpu", param, CLEAR_LINE);
+ machine.device("audiocpu")->execute().set_input_line(param, CLEAR_LINE);
}
static MACHINE_START( nwktr )
@@ -675,7 +675,7 @@ static void sound_irq_callback(running_machine &machine, int irq)
nwktr_state *state = machine.driver_data<nwktr_state>();
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
- cputag_set_input_line(machine, "audiocpu", line, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(line, ASSERT_LINE);
state->m_sound_irq_timer->adjust(attotime::from_usec(5), line);
}
@@ -705,7 +705,7 @@ static const k001604_interface thrilld_k001604_intf =
static MACHINE_RESET( nwktr )
{
- cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("dsp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
static const voodoo_config voodoo_intf =
diff --git a/src/mame/drivers/offtwall.c b/src/mame/drivers/offtwall.c
index a40baf374f8..546a795adc9 100644
--- a/src/mame/drivers/offtwall.c
+++ b/src/mame/drivers/offtwall.c
@@ -34,8 +34,8 @@
static void update_interrupts(running_machine &machine)
{
offtwall_state *state = machine.driver_data<offtwall_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -103,7 +103,7 @@ WRITE16_MEMBER(offtwall_state::io_latch_w)
if (ACCESSING_BITS_0_7)
{
/* bit 4 resets the sound CPU */
- cputag_set_input_line(machine(), "jsa", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("jsa")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
if (!(data & 0x10)) atarijsa_reset();
}
diff --git a/src/mame/drivers/olibochu.c b/src/mame/drivers/olibochu.c
index ea01558f675..0f4e67e068d 100644
--- a/src/mame/drivers/olibochu.c
+++ b/src/mame/drivers/olibochu.c
@@ -436,10 +436,10 @@ static TIMER_DEVICE_CALLBACK( olibochu_scanline )
int scanline = param;
if(scanline == 248) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
if(scanline == 0) // sprite buffer irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xcf); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
}
static MACHINE_CONFIG_START( olibochu, olibochu_state )
diff --git a/src/mame/drivers/omegrace.c b/src/mame/drivers/omegrace.c
index 04a89066188..de0fa97ff8e 100644
--- a/src/mame/drivers/omegrace.c
+++ b/src/mame/drivers/omegrace.c
@@ -328,7 +328,7 @@ WRITE8_MEMBER(omegrace_state::omegrace_leds_w)
WRITE8_MEMBER(omegrace_state::omegrace_soundlatch_w)
{
soundlatch_byte_w (space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c
index 2513f2710dd..0c81567162a 100644
--- a/src/mame/drivers/overdriv.c
+++ b/src/mame/drivers/overdriv.c
@@ -81,9 +81,9 @@ static TIMER_DEVICE_CALLBACK( overdriv_cpuA_scanline )
/* TODO: irqs routines are TOO slow right now, it ends up firing spurious irqs for whatever reason (shared ram fighting?) */
/* this is a temporary solution to get rid of deprecat lib and the crashes, but also makes the game timer to be too slow */
if(scanline == 256 && timer.machine().primary_screen->frame_number() & 1) // vblank-out irq
- cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
else if((scanline % 128) == 0) // timer irq
- cputag_set_input_line(timer.machine(), "maincpu", 5, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
}
static INTERRUPT_GEN( cpuB_interrupt )
@@ -312,7 +312,7 @@ static MACHINE_RESET( overdriv )
state->m_road_colorbase[1] = 0;
/* start with cpu B halted */
- cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("sub")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
static const k053252_interface overdriv_k053252_intf =
diff --git a/src/mame/drivers/pacland.c b/src/mame/drivers/pacland.c
index ac22013d89d..926867b3656 100644
--- a/src/mame/drivers/pacland.c
+++ b/src/mame/drivers/pacland.c
@@ -181,7 +181,7 @@ Notes:
WRITE8_MEMBER(pacland_state::pacland_subreset_w)
{
int bit = !BIT(offset,11);
- cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
}
WRITE8_MEMBER(pacland_state::pacland_flipscreen_w)
@@ -222,7 +222,7 @@ WRITE8_MEMBER(pacland_state::pacland_irq_1_ctrl_w)
int bit = !BIT(offset, 11);
m_main_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(pacland_state::pacland_irq_2_ctrl_w)
@@ -230,7 +230,7 @@ WRITE8_MEMBER(pacland_state::pacland_irq_2_ctrl_w)
int bit = !BIT(offset, 13);
m_mcu_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "mcu", 0, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -401,7 +401,7 @@ static INTERRUPT_GEN( main_vblank_irq )
pacland_state *state = device->machine().driver_data<pacland_state>();
if(state->m_main_irq_mask)
- cputag_set_input_line(device->machine(), "maincpu", 0, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
static INTERRUPT_GEN( mcu_vblank_irq )
@@ -409,7 +409,7 @@ static INTERRUPT_GEN( mcu_vblank_irq )
pacland_state *state = device->machine().driver_data<pacland_state>();
if(state->m_mcu_irq_mask)
- cputag_set_input_line(device->machine(), "mcu", 0, ASSERT_LINE);
+ device->machine().device("mcu")->execute().set_input_line(0, ASSERT_LINE);
}
static MACHINE_CONFIG_START( pacland, pacland_state )
diff --git a/src/mame/drivers/pangofun.c b/src/mame/drivers/pangofun.c
index be09080899a..7f977423780 100644
--- a/src/mame/drivers/pangofun.c
+++ b/src/mame/drivers/pangofun.c
@@ -167,7 +167,7 @@ static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
static void set_gate_a20(running_machine &machine, int a20)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, a20);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_A20, a20);
}
static void keyboard_interrupt(running_machine &machine, int state)
diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c
index 290b7c42857..fc4017d86dd 100644
--- a/src/mame/drivers/panicr.c
+++ b/src/mame/drivers/panicr.c
@@ -494,10 +494,10 @@ static TIMER_DEVICE_CALLBACK( panicr_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xc4/4);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xc4/4);
if(scanline == 0) // <unknown>
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xc8/4);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
}
static MACHINE_CONFIG_START( panicr, panicr_state )
diff --git a/src/mame/drivers/paradise.c b/src/mame/drivers/paradise.c
index 3f750289661..92d8723dec4 100644
--- a/src/mame/drivers/paradise.c
+++ b/src/mame/drivers/paradise.c
@@ -701,7 +701,7 @@ static INTERRUPT_GEN(paradise_irq)
if (state->irq_count<300)
state->irq_count++;
else
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_IRQ0, HOLD_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
}
static MACHINE_CONFIG_START( paradise, paradise_state )
diff --git a/src/mame/drivers/paranoia.c b/src/mame/drivers/paranoia.c
index 2b05109469c..e2590cc4d8c 100644
--- a/src/mame/drivers/paranoia.c
+++ b/src/mame/drivers/paranoia.c
@@ -154,7 +154,7 @@ WRITE8_MEMBER(paranoia_state::paranoia_i8155_c_w)
WRITE_LINE_MEMBER(paranoia_state::paranoia_i8155_timer_out)
{
- //cputag_set_input_line(machine(), "sub", I8085_RST55_LINE, state ? CLEAR_LINE : ASSERT_LINE );
+ //machine().device("sub")->execute().set_input_line(I8085_RST55_LINE, state ? CLEAR_LINE : ASSERT_LINE );
//logerror("Timer out %d\n", state);
}
diff --git a/src/mame/drivers/pcat_dyn.c b/src/mame/drivers/pcat_dyn.c
index a22a2ea89ae..4e9fea6189f 100644
--- a/src/mame/drivers/pcat_dyn.c
+++ b/src/mame/drivers/pcat_dyn.c
@@ -112,7 +112,7 @@ static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
static void set_gate_a20(running_machine &machine, int a20)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, a20);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_A20, a20);
}
static void keyboard_interrupt(running_machine &machine, int state)
diff --git a/src/mame/drivers/pcktgal.c b/src/mame/drivers/pcktgal.c
index 654d51ad59f..97ac64eaeb7 100644
--- a/src/mame/drivers/pcktgal.c
+++ b/src/mame/drivers/pcktgal.c
@@ -41,7 +41,7 @@ WRITE8_MEMBER(pcktgal_state::pcktgal_sound_bank_w)
WRITE8_MEMBER(pcktgal_state::pcktgal_sound_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -54,7 +54,7 @@ static void pcktgal_adpcm_int(device_t *device)
state->m_toggle = 1 - state->m_toggle;
if (state->m_toggle)
- cputag_set_input_line(device->machine(), "audiocpu", M6502_IRQ_LINE, HOLD_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(pcktgal_state::pcktgal_adpcm_data_w)
diff --git a/src/mame/drivers/pcxt.c b/src/mame/drivers/pcxt.c
index d504f1b2438..2675e8c84ef 100644
--- a/src/mame/drivers/pcxt.c
+++ b/src/mame/drivers/pcxt.c
@@ -298,7 +298,7 @@ READ8_MEMBER(pcxt_state::port_a_r)
}
else//keyboard emulation
{
- //cputag_set_input_line(machine(), "maincpu", 1, PULSE_LINE);
+ //machine().device("maincpu")->execute().set_input_line(1, PULSE_LINE);
return 0x00;//Keyboard is disconnected
//return 0xaa;//Keyboard code
}
@@ -352,7 +352,7 @@ WRITE8_MEMBER(pcxt_state::wss_2_w)
WRITE8_MEMBER(pcxt_state::sys_reset_w)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
static I8255A_INTERFACE( ppi8255_0_intf )
@@ -423,7 +423,7 @@ DMA8237 Controller
WRITE_LINE_MEMBER(pcxt_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
@@ -517,7 +517,7 @@ static I8237_INTERFACE( dma8237_1_config )
WRITE_LINE_MEMBER(pcxt_state::pic8259_1_set_int_line)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER(pcxt_state::get_slave_ack)
diff --git a/src/mame/drivers/pengadvb.c b/src/mame/drivers/pengadvb.c
index 7dc8570d05e..a4aa288ee42 100644
--- a/src/mame/drivers/pengadvb.c
+++ b/src/mame/drivers/pengadvb.c
@@ -232,7 +232,7 @@ static I8255A_INTERFACE(pengadvb_ppi8255_interface)
WRITE_LINE_MEMBER(pengadvb_state::vdp_interrupt)
{
- cputag_set_input_line(machine(), "maincpu", 0, (state ? ASSERT_LINE : CLEAR_LINE));
+ machine().device("maincpu")->execute().set_input_line(0, (state ? ASSERT_LINE : CLEAR_LINE));
}
static TMS9928A_INTERFACE(pengadvb_tms9928a_interface)
diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c
index 57cc5815d73..9a16541c81f 100644
--- a/src/mame/drivers/peplus.c
+++ b/src/mame/drivers/peplus.c
@@ -389,7 +389,7 @@ static void handle_lightpen( device_t *device )
WRITE_LINE_MEMBER(peplus_state::crtc_vsync)
{
device_t *device = machine().device("crtc");
- cputag_set_input_line(machine(), "maincpu", 0, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
handle_lightpen(device);
}
diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c
index 7287e1503a7..8eb3e42e6bf 100644
--- a/src/mame/drivers/pgm.c
+++ b/src/mame/drivers/pgm.c
@@ -516,7 +516,7 @@ MACHINE_START( pgm )
MACHINE_RESET( pgm )
{
- cputag_set_input_line(machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("soundcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
diff --git a/src/mame/drivers/photoply.c b/src/mame/drivers/photoply.c
index c6181400de4..423fdd0b622 100644
--- a/src/mame/drivers/photoply.c
+++ b/src/mame/drivers/photoply.c
@@ -63,7 +63,7 @@ DMA8237 Controller
WRITE_LINE_MEMBER(photoply_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
@@ -171,7 +171,7 @@ static I8237_INTERFACE( dma8237_2_config )
WRITE_LINE_MEMBER(photoply_state::pic8259_1_set_int_line)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER(photoply_state::get_slave_ack)
diff --git a/src/mame/drivers/pinkiri8.c b/src/mame/drivers/pinkiri8.c
index a588fb2e680..f1c64e1a972 100644
--- a/src/mame/drivers/pinkiri8.c
+++ b/src/mame/drivers/pinkiri8.c
@@ -424,7 +424,7 @@ ADDRESS_MAP_END
WRITE8_MEMBER(pinkiri8_state::output_regs_w)
{
if(data & 0x40)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
//data & 0x80 is probably NMI mask
}
diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c
index b77b09988cf..00e0d026121 100644
--- a/src/mame/drivers/pkscram.c
+++ b/src/mame/drivers/pkscram.c
@@ -93,7 +93,7 @@ WRITE16_MEMBER(pkscram_state::pkscramble_output_w)
if (!(m_out & 0x2000) && m_interrupt_line_active)
{
- cputag_set_input_line(machine(), "maincpu", 1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
m_interrupt_line_active = 0;
}
@@ -217,14 +217,14 @@ static TIMER_DEVICE_CALLBACK( scanline_callback )
if (param == interrupt_scanline)
{
if (state->m_out & 0x2000)
- cputag_set_input_line(timer.machine(), "maincpu", 1, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(1, ASSERT_LINE);
timer.adjust(timer.machine().primary_screen->time_until_pos(param + 1), param+1);
state->m_interrupt_line_active = 1;
}
else
{
if (state->m_interrupt_line_active)
- cputag_set_input_line(timer.machine(), "maincpu", 1, CLEAR_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
timer.adjust(timer.machine().primary_screen->time_until_pos(interrupt_scanline), interrupt_scanline);
state->m_interrupt_line_active = 0;
}
@@ -270,7 +270,7 @@ static void irqhandler(device_t *device, int irq)
{
pkscram_state *state = device->machine().driver_data<pkscram_state>();
if(state->m_out & 0x10)
- cputag_set_input_line(device->machine(), "maincpu", 2, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(2, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c
index d79e6e4a22e..e08e029c861 100644
--- a/src/mame/drivers/plygonet.c
+++ b/src/mame/drivers/plygonet.c
@@ -183,7 +183,7 @@ WRITE32_MEMBER(polygonet_state::sound_w)
WRITE32_MEMBER(polygonet_state::sound_irq_w)
{
- cputag_set_input_line(machine(), "soundcpu", 0, HOLD_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, HOLD_LINE);
}
/* DSP communications */
@@ -253,16 +253,16 @@ WRITE32_MEMBER(polygonet_state::dsp_w_lines)
if ((data >> 24) & 0x01)
{
// logerror("RESET CLEARED\n");
- cputag_set_input_line(machine(), "dsp", DSP56K_IRQ_RESET, CLEAR_LINE);
+ machine().device("dsp")->execute().set_input_line(DSP56K_IRQ_RESET, CLEAR_LINE);
}
else
{
// logerror("RESET ASSERTED\n");
- cputag_set_input_line(machine(), "dsp", DSP56K_IRQ_RESET, ASSERT_LINE);
+ machine().device("dsp")->execute().set_input_line(DSP56K_IRQ_RESET, ASSERT_LINE);
/* A little hacky - I can't seem to set these lines anywhere else where reset is asserted, so i do it here */
- cputag_set_input_line(machine(), "dsp", DSP56K_IRQ_MODA, ASSERT_LINE);
- cputag_set_input_line(machine(), "dsp", DSP56K_IRQ_MODB, CLEAR_LINE);
+ machine().device("dsp")->execute().set_input_line(DSP56K_IRQ_MODA, ASSERT_LINE);
+ machine().device("dsp")->execute().set_input_line(DSP56K_IRQ_MODB, CLEAR_LINE);
}
/* 0x04000000 is the COMBNK line - it switches who has access to the shared RAM - the dsp or the 68020 */
@@ -608,9 +608,9 @@ static MACHINE_START(polygonet)
/* It's presumed the hardware has hard-wired operating mode 1 (MODA = 1, MODB = 0) */
/* TODO: This should work, but the MAME core appears to do something funny.
Not a big deal - it's hacked in dsp_w_lines. */
- //cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
- //cputag_set_input_line(machine, "dsp", DSP56K_IRQ_MODA, ASSERT_LINE);
- //cputag_set_input_line(machine, "dsp", DSP56K_IRQ_MODB, CLEAR_LINE);
+ //machine.device("dsp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ //machine.device("dsp")->execute().set_input_line(DSP56K_IRQ_MODA, ASSERT_LINE);
+ //machine.device("dsp")->execute().set_input_line(DSP56K_IRQ_MODB, CLEAR_LINE);
}
static const k053936_interface polygonet_k053936_intf =
diff --git a/src/mame/drivers/pokechmp.c b/src/mame/drivers/pokechmp.c
index b1b79776a49..7007e48cfe3 100644
--- a/src/mame/drivers/pokechmp.c
+++ b/src/mame/drivers/pokechmp.c
@@ -72,7 +72,7 @@ WRITE8_MEMBER(pokechmp_state::pokechmp_sound_bank_w)
WRITE8_MEMBER(pokechmp_state::pokechmp_sound_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/polepos.c b/src/mame/drivers/polepos.c
index dd9136072e7..df93f625231 100644
--- a/src/mame/drivers/polepos.c
+++ b/src/mame/drivers/polepos.c
@@ -292,7 +292,7 @@ WRITE8_MEMBER(polepos_state::polepos_latch_w)
case 0x00: /* IRQON */
m_main_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
break;
case 0x01: /* IOSEL */
@@ -313,11 +313,11 @@ WRITE8_MEMBER(polepos_state::polepos_latch_w)
break;
case 0x04: /* RESB */
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
break;
case 0x05: /* RESA */
- cputag_set_input_line(machine(), "sub2", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub2")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
break;
case 0x06: /* SB0 */
@@ -451,12 +451,12 @@ static TIMER_DEVICE_CALLBACK( polepos_scanline )
int scanline = param;
if (((scanline == 64) || (scanline == 192)) && state->m_main_irq_mask) // 64V
- cputag_set_input_line(timer.machine(), "maincpu", 0, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
if (scanline == 240 && state->m_sub_irq_mask) // VBLANK
{
- cputag_set_input_line(timer.machine(), "sub", 0, ASSERT_LINE);
- cputag_set_input_line(timer.machine(), "sub2", 0, ASSERT_LINE);
+ timer.machine().device("sub")->execute().set_input_line(0, ASSERT_LINE);
+ timer.machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE);
}
}
diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c
index 2183101b89a..ee897cba39a 100644
--- a/src/mame/drivers/policetr.c
+++ b/src/mame/drivers/policetr.c
@@ -103,7 +103,7 @@ PC5380-9651 5380-JY3306A 5380-N1045503A
static TIMER_CALLBACK( irq5_gen )
{
- cputag_set_input_line(machine, "maincpu", R3000_IRQ5, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(R3000_IRQ5, ASSERT_LINE);
}
diff --git a/src/mame/drivers/polyplay.c b/src/mame/drivers/polyplay.c
index 56c87726a0b..f8e56aa050a 100644
--- a/src/mame/drivers/polyplay.c
+++ b/src/mame/drivers/polyplay.c
@@ -349,7 +349,7 @@ ROM_END
static TIMER_DEVICE_CALLBACK( polyplay_timer_callback )
{
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0x4c);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0x4c);
}
/* game driver */
diff --git a/src/mame/drivers/poo.c b/src/mame/drivers/poo.c
index 94f91bd9946..cbaaec54ee4 100644
--- a/src/mame/drivers/poo.c
+++ b/src/mame/drivers/poo.c
@@ -146,7 +146,7 @@ WRITE8_MEMBER(poo_state::unk_w)
WRITE8_MEMBER(poo_state::sound_cmd_w)
{
soundlatch_byte_w(space, 0, (data & 0xff));
- cputag_set_input_line(machine(), "subcpu", 0, HOLD_LINE);
+ machine().device("subcpu")->execute().set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(poo_state::poo_vregs_w)
diff --git a/src/mame/drivers/poolshrk.c b/src/mame/drivers/poolshrk.c
index eff616300f6..a18ac4c7392 100644
--- a/src/mame/drivers/poolshrk.c
+++ b/src/mame/drivers/poolshrk.c
@@ -91,7 +91,7 @@ READ8_MEMBER(poolshrk_state::poolshrk_input_r)
READ8_MEMBER(poolshrk_state::poolshrk_irq_reset_r)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
return 0;
}
diff --git a/src/mame/drivers/powerins.c b/src/mame/drivers/powerins.c
index d0716f5bffc..7cc7a4b31c0 100644
--- a/src/mame/drivers/powerins.c
+++ b/src/mame/drivers/powerins.c
@@ -320,7 +320,7 @@ static MACHINE_RESET( powerins )
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/prehisle.c b/src/mame/drivers/prehisle.c
index 57292653f19..c32f04af154 100644
--- a/src/mame/drivers/prehisle.c
+++ b/src/mame/drivers/prehisle.c
@@ -20,7 +20,7 @@
WRITE16_MEMBER(prehisle_state::prehisle_sound16_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/*******************************************************************************/
@@ -195,7 +195,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym3812_interface ym3812_config =
diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c
index 37c5b07c5a4..ea910106e26 100644
--- a/src/mame/drivers/progolf.c
+++ b/src/mame/drivers/progolf.c
@@ -202,12 +202,12 @@ WRITE8_MEMBER(progolf_state::progolf_flip_screen_w)
WRITE8_MEMBER(progolf_state::audio_command_w)
{
m_sound_cmd = data;
- cputag_set_input_line(machine(), "audiocpu", 0, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, ASSERT_LINE);
}
READ8_MEMBER(progolf_state::audio_command_r)
{
- cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
return m_sound_cmd;
}
@@ -274,7 +274,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(progolf_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
/* verified from M6502 code */
diff --git a/src/mame/drivers/psychic5.c b/src/mame/drivers/psychic5.c
index 81778499fed..9bcfc685884 100644
--- a/src/mame/drivers/psychic5.c
+++ b/src/mame/drivers/psychic5.c
@@ -333,10 +333,10 @@ static TIMER_DEVICE_CALLBACK( psychic5_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
if(scanline == 0) // sprite buffer irq
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0xcf); /* RST 08h */
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
}
@@ -646,7 +646,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/punchout.c b/src/mame/drivers/punchout.c
index 7f1c398cec3..d0377be6440 100644
--- a/src/mame/drivers/punchout.c
+++ b/src/mame/drivers/punchout.c
@@ -146,9 +146,9 @@ WRITE8_MEMBER(punchout_state::punchout_speech_vcu_w)
WRITE8_MEMBER(punchout_state::punchout_2a03_reset_w)
{
if (data & 1)
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
else
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c
index e12991ea494..96f9bdbebf7 100644
--- a/src/mame/drivers/qdrmfgp.c
+++ b/src/mame/drivers/qdrmfgp.c
@@ -285,9 +285,9 @@ static void ide_interrupt(device_t *device, int state)
if (drvstate->m_control & 0x0008)
{
if (state != CLEAR_LINE)
- cputag_set_input_line(device->machine(), "maincpu", 4, HOLD_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
else
- cputag_set_input_line(device->machine(), "maincpu", 4, CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
}
}
@@ -297,7 +297,7 @@ static TIMER_CALLBACK( gp2_timer_callback )
{
qdrmfgp_state *state = machine.driver_data<qdrmfgp_state>();
if (state->m_control & 0x0004)
- cputag_set_input_line(machine, "maincpu", 3, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(3, HOLD_LINE);
}
static INTERRUPT_GEN(qdrmfgp2_interrupt)
@@ -318,11 +318,11 @@ static void gp2_ide_interrupt(device_t *device, int state)
if (drvstate->m_gp2_irq_control)
drvstate->m_gp2_irq_control = 0;
else
- cputag_set_input_line(device->machine(), "maincpu", 5, HOLD_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
}
else
{
- cputag_set_input_line(device->machine(), "maincpu", 5, CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(5, CLEAR_LINE);
}
}
}
@@ -570,7 +570,7 @@ static void sound_irq(device_t *device)
{
qdrmfgp_state *state = device->machine().driver_data<qdrmfgp_state>();
if (state->m_control & 0x0001)
- cputag_set_input_line(device->machine(), "maincpu", 1, HOLD_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
}
static const k054539_interface k054539_config =
@@ -607,12 +607,12 @@ static const k056832_interface qdrmfgp2_k056832_intf =
WRITE_LINE_MEMBER(qdrmfgp_state::qdrmfgp_irq3_ack_w)
{
-// cputag_set_input_line(machine(), "maincpu", M68K_IRQ_3, CLEAR_LINE);
+// machine().device("maincpu")->execute().set_input_line(M68K_IRQ_3, CLEAR_LINE);
}
WRITE_LINE_MEMBER(qdrmfgp_state::qdrmfgp_irq4_ack_w)
{
-// cputag_set_input_line(machine(), "maincpu", M68K_IRQ_4, CLEAR_LINE);
+// machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, CLEAR_LINE);
}
static const k053252_interface qdrmfgp_k053252_intf =
diff --git a/src/mame/drivers/quakeat.c b/src/mame/drivers/quakeat.c
index f224a835d66..553c47eb118 100644
--- a/src/mame/drivers/quakeat.c
+++ b/src/mame/drivers/quakeat.c
@@ -117,7 +117,7 @@ ADDRESS_MAP_END
WRITE_LINE_MEMBER(quakeat_state::quakeat_pic8259_1_set_int_line)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER(quakeat_state::get_slave_ack)
diff --git a/src/mame/drivers/queen.c b/src/mame/drivers/queen.c
index 38c62552b61..d7bc2371355 100644
--- a/src/mame/drivers/queen.c
+++ b/src/mame/drivers/queen.c
@@ -457,7 +457,7 @@ WRITE8_MEMBER(queen_state::at_dma8237_2_w)
WRITE_LINE_MEMBER(queen_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c
index d00f7a574b4..38bfebfcf10 100644
--- a/src/mame/drivers/quizpun2.c
+++ b/src/mame/drivers/quizpun2.c
@@ -349,13 +349,13 @@ WRITE8_MEMBER(quizpun2_state::quizpun2_rombank_w)
WRITE8_MEMBER(quizpun2_state::quizpun2_irq_ack)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
WRITE8_MEMBER(quizpun2_state::quizpun2_soundlatch_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( quizpun2_map, AS_PROGRAM, 8, quizpun2_state )
diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c
index 7c2c3f44e18..db781d2ffc6 100644
--- a/src/mame/drivers/r2dtank.c
+++ b/src/mame/drivers/r2dtank.c
@@ -102,7 +102,7 @@ WRITE_LINE_MEMBER(r2dtank_state::main_cpu_irq)
int combined_state = pia0->irq_a_state() | pia0->irq_b_state() |
pia1->irq_a_state() | pia1->irq_b_state();
- cputag_set_input_line(machine(), "maincpu", M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -126,7 +126,7 @@ if (LOG_AUDIO_COMM) logerror("%08X CPU#1 Audio Command Read: %x\n", space.devi
WRITE8_MEMBER(r2dtank_state::audio_command_w)
{
soundlatch_byte_w(space, 0, ~data);
- cputag_set_input_line(machine(), "audiocpu", M6800_IRQ_LINE, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6800_IRQ_LINE, HOLD_LINE);
if (LOG_AUDIO_COMM) logerror("%08X CPU#0 Audio Command Write: %x\n", space.device().safe_pc(), data^0xff);
}
@@ -148,7 +148,7 @@ WRITE8_MEMBER(r2dtank_state::audio_answer_w)
data = 0x00;
soundlatch2_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "maincpu", M6809_IRQ_LINE, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
if (LOG_AUDIO_COMM) logerror("%08X CPU#1 Audio Answer Write: %x\n", space.device().safe_pc(), data);
}
diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c
index 51065f89654..524983e2ec9 100644
--- a/src/mame/drivers/rabbit.c
+++ b/src/mame/drivers/rabbit.c
@@ -560,7 +560,7 @@ WRITE32_MEMBER(rabbit_state::rabbit_rombank_w)
static TIMER_CALLBACK( rabbit_blit_done )
{
rabbit_state *state = machine.driver_data<rabbit_state>();
- cputag_set_input_line(machine, "maincpu", state->m_bltirqlevel, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(state->m_bltirqlevel, HOLD_LINE);
}
static void rabbit_do_blit(running_machine &machine)
@@ -872,7 +872,7 @@ GFXDECODE_END
static INTERRUPT_GEN( rabbit_vblank_interrupt )
{
rabbit_state *state = device->machine().driver_data<rabbit_state>();
- cputag_set_input_line(device->machine(), "maincpu", state->m_vblirqlevel, HOLD_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(state->m_vblirqlevel, HOLD_LINE);
}
static MACHINE_CONFIG_START( rabbit, rabbit_state )
diff --git a/src/mame/drivers/rampart.c b/src/mame/drivers/rampart.c
index b552a8d95a2..44995515b24 100644
--- a/src/mame/drivers/rampart.c
+++ b/src/mame/drivers/rampart.c
@@ -42,7 +42,7 @@
static void update_interrupts(running_machine &machine)
{
rampart_state *state = machine.driver_data<rampart_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/rbmk.c b/src/mame/drivers/rbmk.c
index 7db67bebbeb..b3a054db364 100644
--- a/src/mame/drivers/rbmk.c
+++ b/src/mame/drivers/rbmk.c
@@ -528,7 +528,7 @@ static SCREEN_UPDATE_IND16(rbmk)
static INTERRUPT_GEN( mcu_irq )
{
- cputag_set_input_line(device->machine(), "mcu", INPUT_LINE_NMI, PULSE_LINE);
+ device->machine().device("mcu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( rbmk, rbmk_state )
diff --git a/src/mame/drivers/re900.c b/src/mame/drivers/re900.c
index 2ad1fc7575a..29eee26c751 100644
--- a/src/mame/drivers/re900.c
+++ b/src/mame/drivers/re900.c
@@ -247,7 +247,7 @@ ADDRESS_MAP_END
WRITE_LINE_MEMBER(re900_state::vdp_interrupt)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE );
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE );
}
diff --git a/src/mame/drivers/redalert.c b/src/mame/drivers/redalert.c
index f9d117d151e..c7768eff7fe 100644
--- a/src/mame/drivers/redalert.c
+++ b/src/mame/drivers/redalert.c
@@ -119,7 +119,7 @@ static INTERRUPT_GEN( redalert_vblank_interrupt )
READ8_MEMBER(redalert_state::redalert_interrupt_clear_r)
{
- cputag_set_input_line(machine(), "maincpu", M6502_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
/* the result never seems to be actually used */
return machine().primary_screen->vpos();
@@ -134,7 +134,7 @@ WRITE8_MEMBER(redalert_state::redalert_interrupt_clear_w)
READ8_MEMBER(redalert_state::panther_interrupt_clear_r)
{
- cputag_set_input_line(machine(), "maincpu", M6502_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
return ioport("STICK0")->read();
}
diff --git a/src/mame/drivers/relief.c b/src/mame/drivers/relief.c
index 9ed481f4b47..005dad70899 100644
--- a/src/mame/drivers/relief.c
+++ b/src/mame/drivers/relief.c
@@ -35,7 +35,7 @@
static void update_interrupts(running_machine &machine)
{
relief_state *state = machine.driver_data<relief_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/renegade.c b/src/mame/drivers/renegade.c
index 59e323d19c5..3266c5d5aff 100644
--- a/src/mame/drivers/renegade.c
+++ b/src/mame/drivers/renegade.c
@@ -260,7 +260,7 @@ WRITE8_MEMBER(renegade_state::adpcm_play_w)
WRITE8_MEMBER(renegade_state::sound_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", M6809_IRQ_LINE, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
}
/********************************************************************************************/
@@ -359,7 +359,7 @@ WRITE8_MEMBER(renegade_state::renegade_68705_port_b_w)
m_port_a_in = m_from_main;
if (m_main_sent)
- cputag_set_input_line(machine(), "mcu", 0, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(0, CLEAR_LINE);
m_main_sent = 0;
}
@@ -416,7 +416,7 @@ READ8_MEMBER(renegade_state::mcu_reset_r)
}
else
{
- cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("mcu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
return 0;
}
@@ -446,7 +446,7 @@ WRITE8_MEMBER(renegade_state::mcu_w)
{
m_from_main = data;
m_main_sent = 1;
- cputag_set_input_line(machine(), "mcu", 0, ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(0, ASSERT_LINE);
}
}
diff --git a/src/mame/drivers/retofinv.c b/src/mame/drivers/retofinv.c
index 1bc559dc412..89aa569afd7 100644
--- a/src/mame/drivers/retofinv.c
+++ b/src/mame/drivers/retofinv.c
@@ -38,19 +38,19 @@ Notes:
WRITE8_MEMBER(retofinv_state::cpu1_reset_w)
{
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
}
WRITE8_MEMBER(retofinv_state::cpu2_reset_w)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
}
WRITE8_MEMBER(retofinv_state::mcu_reset_w)
{
/* the bootlegs don't have a MCU, so make sure it's there before trying to reset it */
if (machine().device("68705") != NULL)
- cputag_set_input_line(machine(), "68705", INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("68705")->execute().set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
}
WRITE8_MEMBER(retofinv_state::cpu2_m6000_w)
@@ -66,21 +66,21 @@ READ8_MEMBER(retofinv_state::cpu0_mf800_r)
WRITE8_MEMBER(retofinv_state::soundcommand_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(retofinv_state::irq0_ack_w)
{
m_main_irq_mask = data & 1;
if (!m_main_irq_mask)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(retofinv_state::irq1_ack_w)
{
m_sub_irq_mask = data & 1;
if (!m_sub_irq_mask)
- cputag_set_input_line(machine(), "sub", 0, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(retofinv_state::coincounter_w)
diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c
index 0d8b90ba129..bb5fc0d4ece 100644
--- a/src/mame/drivers/rollerg.c
+++ b/src/mame/drivers/rollerg.c
@@ -234,7 +234,7 @@ static const k051316_interface rollerg_k051316_intf =
WRITE_LINE_MEMBER(rollerg_state::rollerg_irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
static const k053252_interface rollerg_k053252_intf =
diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c
index aedc6ca135c..b74f74cfd4a 100644
--- a/src/mame/drivers/roul.c
+++ b/src/mame/drivers/roul.c
@@ -168,7 +168,7 @@ WRITE8_MEMBER(roul_state::blitter_cmd_w)
WRITE8_MEMBER(roul_state::sound_latch_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "soundcpu", 0, HOLD_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(roul_state::ball_w)
diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c
index 5a46941d914..744dc2d2925 100644
--- a/src/mame/drivers/royalmah.c
+++ b/src/mame/drivers/royalmah.c
@@ -762,7 +762,7 @@ READ8_MEMBER(royalmah_state::jansou_6405_r)
WRITE8_MEMBER(royalmah_state::jansou_sound_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/rpunch.c b/src/mame/drivers/rpunch.c
index d648095a2b5..95cdf68d7e1 100644
--- a/src/mame/drivers/rpunch.c
+++ b/src/mame/drivers/rpunch.c
@@ -126,7 +126,7 @@ static void ym2151_irq_gen(device_t *device, int state)
{
rpunch_state *drvstate = device->machine().driver_data<rpunch_state>();
drvstate->m_ym2151_irq = state;
- cputag_set_input_line(device->machine(), "audiocpu", 0, (drvstate->m_ym2151_irq | drvstate->m_sound_busy) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, (drvstate->m_ym2151_irq | drvstate->m_sound_busy) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -161,7 +161,7 @@ static TIMER_CALLBACK( sound_command_w_callback )
rpunch_state *state = machine.driver_data<rpunch_state>();
state->m_sound_busy = 1;
state->m_sound_data = param;
- cputag_set_input_line(machine, "audiocpu", 0, (state->m_ym2151_irq | state->m_sound_busy) ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("audiocpu")->execute().set_input_line(0, (state->m_ym2151_irq | state->m_sound_busy) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -175,7 +175,7 @@ WRITE16_MEMBER(rpunch_state::sound_command_w)
READ8_MEMBER(rpunch_state::sound_command_r)
{
m_sound_busy = 0;
- cputag_set_input_line(machine(), "audiocpu", 0, (m_ym2151_irq | m_sound_busy) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, (m_ym2151_irq | m_sound_busy) ? ASSERT_LINE : CLEAR_LINE);
return m_sound_data;
}
diff --git a/src/mame/drivers/runaway.c b/src/mame/drivers/runaway.c
index 71bbd2b4620..497162073d9 100644
--- a/src/mame/drivers/runaway.c
+++ b/src/mame/drivers/runaway.c
@@ -23,7 +23,7 @@ static TIMER_CALLBACK( interrupt_callback )
/* assume Centipede-style interrupt timing */
int scanline = param;
- cputag_set_input_line(machine, "maincpu", 0, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
scanline += 32;
@@ -77,7 +77,7 @@ WRITE8_MEMBER(runaway_state::runaway_led_w)
WRITE8_MEMBER(runaway_state::runaway_irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c
index a6b316be4b3..c3e4c62e528 100644
--- a/src/mame/drivers/sandscrp.c
+++ b/src/mame/drivers/sandscrp.c
@@ -151,9 +151,9 @@ static void update_irq_state(running_machine &machine)
{
sandscrp_state *state = machine.driver_data<sandscrp_state>();
if (state->m_vblank_irq || state->m_sprite_irq || state->m_unknown_irq)
- cputag_set_input_line(machine, "maincpu", 1, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, ASSERT_LINE);
else
- cputag_set_input_line(machine, "maincpu", 1, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
}
@@ -254,7 +254,7 @@ WRITE16_MEMBER(sandscrp_state::sandscrp_soundlatch_word_w)
{
m_latch1_full = 1;
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
device_spin_until_time(&space.device(), attotime::from_usec(100)); // Allow the other cpu to reply
}
}
@@ -471,7 +471,7 @@ GFXDECODE_END
static void irq_handler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_intf_sandscrp =
diff --git a/src/mame/drivers/sangho.c b/src/mame/drivers/sangho.c
index 197815cec9d..4ee635d790b 100644
--- a/src/mame/drivers/sangho.c
+++ b/src/mame/drivers/sangho.c
@@ -402,7 +402,7 @@ static MACHINE_RESET(sexyboom)
static void msx_vdp_interrupt(device_t *, v99x8_device &device, int i)
{
- cputag_set_input_line (device.machine(), "maincpu", 0, (i ? HOLD_LINE : CLEAR_LINE));
+ device.machine().device("maincpu")->execute().set_input_line(0, (i ? HOLD_LINE : CLEAR_LINE));
}
static TIMER_DEVICE_CALLBACK( sangho_interrupt )
diff --git a/src/mame/drivers/saturn.c b/src/mame/drivers/saturn.c
index c4fe82c3d03..0272e74c9bc 100644
--- a/src/mame/drivers/saturn.c
+++ b/src/mame/drivers/saturn.c
@@ -1643,15 +1643,15 @@ static void scsp_irq(device_t *device, int irq)
if (irq > 0)
{
scsp_last_line = irq;
- cputag_set_input_line(device->machine(), "audiocpu", irq, ASSERT_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(irq, ASSERT_LINE);
}
else if (irq < 0)
{
- cputag_set_input_line(device->machine(), "audiocpu", -irq, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(-irq, CLEAR_LINE);
}
else
{
- cputag_set_input_line(device->machine(), "audiocpu", scsp_last_line, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(scsp_last_line, CLEAR_LINE);
}
}
@@ -2037,8 +2037,8 @@ static MACHINE_RESET( saturn )
{
saturn_state *state = machine.driver_data<saturn_state>();
// don't let the slave cpu and the 68k go anywhere
- cputag_set_input_line(machine, "slave", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("slave")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
state->m_smpc.SR = 0x40; // this bit is always on according to docs
@@ -2118,8 +2118,8 @@ static MACHINE_RESET( stv )
saturn_state *state = machine.driver_data<saturn_state>();
// don't let the slave cpu and the 68k go anywhere
- cputag_set_input_line(machine, "slave", INPUT_LINE_RESET, ASSERT_LINE);
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("slave")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
state->m_en_68k = 0;
state->m_NMI_reset = 0;
diff --git a/src/mame/drivers/savquest.c b/src/mame/drivers/savquest.c
index 0dcc4686467..ed8fa2e0ca0 100644
--- a/src/mame/drivers/savquest.c
+++ b/src/mame/drivers/savquest.c
@@ -334,7 +334,7 @@ WRITE8_MEMBER(savquest_state::at_dma8237_2_w)
WRITE_LINE_MEMBER(savquest_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
diff --git a/src/mame/drivers/sbrkout.c b/src/mame/drivers/sbrkout.c
index 9287fb3cb0f..cf2eec69962 100644
--- a/src/mame/drivers/sbrkout.c
+++ b/src/mame/drivers/sbrkout.c
@@ -135,7 +135,7 @@ static TIMER_CALLBACK( scanline_callback )
/* if this is a rising edge of 16V, assert the CPU interrupt */
if (scanline % 32 == 16)
- cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
/* update the DAC state */
machine.device<dac_device>("dac")->write_unsigned8((videoram[0x380 + 0x11] & (scanline >> 2)) ? 255 : 0);
@@ -157,7 +157,7 @@ static TIMER_CALLBACK( scanline_callback )
WRITE8_MEMBER(sbrkout_state::irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -202,9 +202,9 @@ static void update_nmi_state(running_machine &machine)
{
sbrkout_state *state = machine.driver_data<sbrkout_state>();
if ((state->m_pot_trigger[0] & ~state->m_pot_mask[0]) | (state->m_pot_trigger[1] & ~state->m_pot_mask[1]))
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
else
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
diff --git a/src/mame/drivers/sbugger.c b/src/mame/drivers/sbugger.c
index ff510032c1d..ce583d9d4b5 100644
--- a/src/mame/drivers/sbugger.c
+++ b/src/mame/drivers/sbugger.c
@@ -208,7 +208,7 @@ INPUT_PORTS_END
WRITE_LINE_MEMBER(sbugger_state::sbugger_interrupt)
{
- cputag_set_input_line(machine(), "maincpu", I8085_RST75_LINE, state ? CLEAR_LINE : ASSERT_LINE );
+ machine().device("maincpu")->execute().set_input_line(I8085_RST75_LINE, state ? CLEAR_LINE : ASSERT_LINE );
}
static I8156_INTERFACE(i8156_intf)
diff --git a/src/mame/drivers/scotrsht.c b/src/mame/drivers/scotrsht.c
index c80bbcf0457..66573e18bea 100644
--- a/src/mame/drivers/scotrsht.c
+++ b/src/mame/drivers/scotrsht.c
@@ -57,7 +57,7 @@ static INTERRUPT_GEN( scotrsht_interrupt )
WRITE8_MEMBER(scotrsht_state::scotrsht_soundlatch_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
static ADDRESS_MAP_START( scotrsht_map, AS_PROGRAM, 8, scotrsht_state )
diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c
index 4c2c9a04636..b34bcdf6e2f 100644
--- a/src/mame/drivers/seattle.c
+++ b/src/mame/drivers/seattle.c
@@ -623,7 +623,7 @@ static MACHINE_RESET( seattle )
static void ide_interrupt(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "maincpu", IDE_IRQ_NUM, state);
+ device->machine().device("maincpu")->execute().set_input_line(IDE_IRQ_NUM, state);
}
@@ -642,7 +642,7 @@ static void ethernet_interrupt_machine(running_machine &machine, int state)
{
UINT8 assert = drvstate->m_ethernet_irq_state && (*drvstate->m_interrupt_enable & (1 << ETHERNET_IRQ_SHIFT));
if (drvstate->m_ethernet_irq_num != 0)
- cputag_set_input_line(machine, "maincpu", drvstate->m_ethernet_irq_num, assert ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(drvstate->m_ethernet_irq_num, assert ? ASSERT_LINE : CLEAR_LINE);
}
else if (drvstate->m_board_config == SEATTLE_WIDGET_CONFIG)
update_widget_irq(machine);
@@ -663,7 +663,7 @@ static void ethernet_interrupt(device_t *device, int state)
static void ioasic_irq(running_machine &machine, int state)
{
- cputag_set_input_line(machine, "maincpu", IOASIC_IRQ_NUM, state);
+ machine.device("maincpu")->execute().set_input_line(IOASIC_IRQ_NUM, state);
}
@@ -698,7 +698,7 @@ WRITE32_MEMBER(seattle_state::interrupt_config_w)
/* VBLANK: clear anything pending on the old IRQ */
if (m_vblank_irq_num != 0)
- cputag_set_input_line(machine(), "maincpu", m_vblank_irq_num, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(m_vblank_irq_num, CLEAR_LINE);
/* VBLANK: compute the new IRQ vector */
irq = (*m_interrupt_config >> (2*VBLANK_IRQ_SHIFT)) & 3;
@@ -709,7 +709,7 @@ WRITE32_MEMBER(seattle_state::interrupt_config_w)
{
/* Widget: clear anything pending on the old IRQ */
if (m_widget.irq_num != 0)
- cputag_set_input_line(machine(), "maincpu", m_widget.irq_num, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(m_widget.irq_num, CLEAR_LINE);
/* Widget: compute the new IRQ vector */
irq = (*m_interrupt_config >> (2*WIDGET_IRQ_SHIFT)) & 3;
@@ -721,7 +721,7 @@ WRITE32_MEMBER(seattle_state::interrupt_config_w)
{
/* Ethernet: clear anything pending on the old IRQ */
if (m_ethernet_irq_num != 0)
- cputag_set_input_line(machine(), "maincpu", m_ethernet_irq_num, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(m_ethernet_irq_num, CLEAR_LINE);
/* Ethernet: compute the new IRQ vector */
irq = (*m_interrupt_config >> (2*ETHERNET_IRQ_SHIFT)) & 3;
@@ -767,7 +767,7 @@ static void update_vblank_irq(running_machine &machine)
/* if the VBLANK has been latched, and the interrupt is enabled, assert */
if (drvstate->m_vblank_latch && (*drvstate->m_interrupt_enable & (1 << VBLANK_IRQ_SHIFT)))
state = ASSERT_LINE;
- cputag_set_input_line(machine, "maincpu", drvstate->m_vblank_irq_num, state);
+ machine.device("maincpu")->execute().set_input_line(drvstate->m_vblank_irq_num, state);
}
@@ -936,7 +936,7 @@ static void update_galileo_irqs(running_machine &machine)
/* if any unmasked interrupts are live, we generate */
if (drvstate->m_galileo.reg[GREG_INT_STATE] & drvstate->m_galileo.reg[GREG_INT_MASK])
state = ASSERT_LINE;
- cputag_set_input_line(machine, "maincpu", GALILEO_IRQ_NUM, state);
+ machine.device("maincpu")->execute().set_input_line(GALILEO_IRQ_NUM, state);
if (LOG_GALILEO)
logerror("Galileo IRQ %s\n", (state == ASSERT_LINE) ? "asserted" : "cleared");
@@ -1567,7 +1567,7 @@ static void update_widget_irq(running_machine &machine)
/* update the IRQ state */
if (drvstate->m_widget.irq_num != 0)
- cputag_set_input_line(machine, "maincpu", drvstate->m_widget.irq_num, assert ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(drvstate->m_widget.irq_num, assert ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c
index 5f9ea9ac781..41198e4a44c 100644
--- a/src/mame/drivers/segac2.c
+++ b/src/mame/drivers/segac2.c
@@ -1248,7 +1248,7 @@ INPUT_PORTS_END
static void segac2_irq2_interrupt(device_t *device, int state)
{
//printf("sound irq %d\n", state);
- cputag_set_input_line(device->machine(), "maincpu", 2, state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(2, state ? ASSERT_LINE : CLEAR_LINE);
}
static const ym3438_interface ym3438_intf =
{
@@ -1343,7 +1343,7 @@ static SCREEN_UPDATE_RGB32(segac2_new)
void genesis_vdp_sndirqline_callback_segac2(running_machine &machine, bool state)
{
if (state==true)
- cputag_set_input_line(machine, "maincpu", 6, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, HOLD_LINE);
}
// the line usually used to drive irq6 is not connected
@@ -1356,9 +1356,9 @@ void genesis_vdp_lv6irqline_callback_segac2(running_machine &machine, bool state
void genesis_vdp_lv4irqline_callback_segac2(running_machine &machine, bool state)
{
if (state==true)
- cputag_set_input_line(machine, "maincpu", 4, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, HOLD_LINE);
else
- cputag_set_input_line(machine, "maincpu", 4, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
}
static const sega315_5124_interface sms_vdp_ntsc_intf =
diff --git a/src/mame/drivers/segag80r.c b/src/mame/drivers/segag80r.c
index 3015352fc18..632446bcdce 100644
--- a/src/mame/drivers/segag80r.c
+++ b/src/mame/drivers/segag80r.c
@@ -149,7 +149,7 @@ INPUT_CHANGED_MEMBER(segag80r_state::service_switch)
{
/* pressing the service switch sends an NMI */
if (newval)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -286,7 +286,7 @@ WRITE8_MEMBER(segag80r_state::coin_count_w)
WRITE8_MEMBER(segag80r_state::sindbadm_soundport_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50));
}
diff --git a/src/mame/drivers/segag80v.c b/src/mame/drivers/segag80v.c
index 41818897f9d..defbe1f5176 100644
--- a/src/mame/drivers/segag80v.c
+++ b/src/mame/drivers/segag80v.c
@@ -162,7 +162,7 @@ INPUT_CHANGED_MEMBER(segag80v_state::service_switch)
{
/* pressing the service switch sends an NMI */
if (newval)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c
index a1bd6dab928..a80e6779b36 100644
--- a/src/mame/drivers/segas24.c
+++ b/src/mame/drivers/segas24.c
@@ -687,13 +687,13 @@ void segas24_state::reset_reset()
int changed = resetcontrol ^ prev_resetcontrol;
if(changed & 2) {
if(resetcontrol & 2) {
- cputag_set_input_line(machine(), "subcpu", INPUT_LINE_HALT, CLEAR_LINE);
- cputag_set_input_line(machine(), "subcpu", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("subcpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
// mame_printf_debug("enable 2nd cpu!\n");
// debugger_break(machine);
} else
- cputag_set_input_line(machine(), "subcpu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine().device("subcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
if(changed & 4)
devtag_reset(machine(), "ymsnd");
@@ -756,8 +756,8 @@ READ8_MEMBER( segas24_state::frc_r )
WRITE8_MEMBER( segas24_state::frc_w )
{
/* Undocumented behaviour, Bonanza Bros. seems to use this for irq ack'ing ... */
- cputag_set_input_line(machine(), "maincpu", IRQ_FRC+1, CLEAR_LINE);
- cputag_set_input_line(machine(), "subcpu", IRQ_FRC+1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(IRQ_FRC+1, CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(IRQ_FRC+1, CLEAR_LINE);
}
@@ -874,9 +874,9 @@ static TIMER_DEVICE_CALLBACK( irq_timer_cb )
state->irq_timer_pend0 = state->irq_timer_pend1 = 1;
if(state->irq_allow0 & (1 << IRQ_TIMER))
- cputag_set_input_line(timer.machine(), "maincpu", IRQ_TIMER+1, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(IRQ_TIMER+1, ASSERT_LINE);
if(state->irq_allow1 & (1 << IRQ_TIMER))
- cputag_set_input_line(timer.machine(), "subcpu", IRQ_TIMER+1, ASSERT_LINE);
+ timer.machine().device("subcpu")->execute().set_input_line(IRQ_TIMER+1, ASSERT_LINE);
if(state->irq_tmode == 1 || state->irq_tmode == 2)
timer.machine().primary_screen->update_now();
@@ -886,10 +886,10 @@ static TIMER_DEVICE_CALLBACK( irq_timer_clear_cb )
{
segas24_state *state = timer.machine().driver_data<segas24_state>();
state->irq_sprite = state->irq_vblank = 0;
- cputag_set_input_line(timer.machine(), "maincpu", IRQ_VBLANK+1, CLEAR_LINE);
- cputag_set_input_line(timer.machine(), "maincpu", IRQ_SPRITE+1, CLEAR_LINE);
- cputag_set_input_line(timer.machine(), "subcpu", IRQ_VBLANK+1, CLEAR_LINE);
- cputag_set_input_line(timer.machine(), "subcpu", IRQ_SPRITE+1, CLEAR_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(IRQ_VBLANK+1, CLEAR_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(IRQ_SPRITE+1, CLEAR_LINE);
+ timer.machine().device("subcpu")->execute().set_input_line(IRQ_VBLANK+1, CLEAR_LINE);
+ timer.machine().device("subcpu")->execute().set_input_line(IRQ_SPRITE+1, CLEAR_LINE);
}
static TIMER_DEVICE_CALLBACK( irq_frc_cb )
@@ -897,10 +897,10 @@ static TIMER_DEVICE_CALLBACK( irq_frc_cb )
segas24_state *state = timer.machine().driver_data<segas24_state>();
if(state->irq_allow0 & (1 << IRQ_FRC) && state->frc_mode == 1)
- cputag_set_input_line(timer.machine(), "maincpu", IRQ_FRC+1, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(IRQ_FRC+1, ASSERT_LINE);
if(state->irq_allow1 & (1 << IRQ_FRC) && state->frc_mode == 1)
- cputag_set_input_line(timer.machine(), "subcpu", IRQ_FRC+1, ASSERT_LINE);
+ timer.machine().device("subcpu")->execute().set_input_line(IRQ_FRC+1, ASSERT_LINE);
}
void segas24_state::irq_init()
@@ -941,20 +941,20 @@ WRITE16_MEMBER(segas24_state::irq_w)
case 2:
irq_allow0 = data & 0x3f;
irq_timer_pend0 = 0;
- cputag_set_input_line(machine(), "maincpu", IRQ_TIMER+1, CLEAR_LINE);
- cputag_set_input_line(machine(), "maincpu", IRQ_YM2151+1, irq_yms && (irq_allow0 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine(), "maincpu", IRQ_VBLANK+1, irq_vblank && (irq_allow0 & (1 << IRQ_VBLANK)) ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine(), "maincpu", IRQ_SPRITE+1, irq_sprite && (irq_allow0 & (1 << IRQ_SPRITE)) ? ASSERT_LINE : CLEAR_LINE);
- //cputag_set_input_line(machine(), "maincpu", IRQ_FRC+1, irq_frc && (irq_allow0 & (1 << IRQ_FRC)) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(IRQ_TIMER+1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(IRQ_YM2151+1, irq_yms && (irq_allow0 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(IRQ_VBLANK+1, irq_vblank && (irq_allow0 & (1 << IRQ_VBLANK)) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(IRQ_SPRITE+1, irq_sprite && (irq_allow0 & (1 << IRQ_SPRITE)) ? ASSERT_LINE : CLEAR_LINE);
+ //machine().device("maincpu")->execute().set_input_line(IRQ_FRC+1, irq_frc && (irq_allow0 & (1 << IRQ_FRC)) ? ASSERT_LINE : CLEAR_LINE);
break;
case 3:
irq_allow1 = data & 0x3f;
irq_timer_pend1 = 0;
- cputag_set_input_line(machine(), "subcpu", IRQ_TIMER+1, CLEAR_LINE);
- cputag_set_input_line(machine(), "subcpu", IRQ_YM2151+1, irq_yms && (irq_allow1 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine(), "subcpu", IRQ_VBLANK+1, irq_vblank && (irq_allow1 & (1 << IRQ_VBLANK)) ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine(), "subcpu", IRQ_SPRITE+1, irq_sprite && (irq_allow1 & (1 << IRQ_SPRITE)) ? ASSERT_LINE : CLEAR_LINE);
- //cputag_set_input_line(machine(), "subcpu", IRQ_FRC+1, irq_frc && (irq_allow1 & (1 << IRQ_FRC)) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(IRQ_TIMER+1, CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(IRQ_YM2151+1, irq_yms && (irq_allow1 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(IRQ_VBLANK+1, irq_vblank && (irq_allow1 & (1 << IRQ_VBLANK)) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(IRQ_SPRITE+1, irq_sprite && (irq_allow1 & (1 << IRQ_SPRITE)) ? ASSERT_LINE : CLEAR_LINE);
+ //machine().device("subcpu")->execute().set_input_line(IRQ_FRC+1, irq_frc && (irq_allow1 & (1 << IRQ_FRC)) ? ASSERT_LINE : CLEAR_LINE);
break;
}
}
@@ -974,11 +974,11 @@ READ16_MEMBER(segas24_state::irq_r)
switch(offset) {
case 2:
irq_timer_pend0 = 0;
- cputag_set_input_line(machine(), "maincpu", IRQ_TIMER+1, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(IRQ_TIMER+1, CLEAR_LINE);
break;
case 3:
irq_timer_pend1 = 0;
- cputag_set_input_line(machine(), "subcpu", IRQ_TIMER+1, CLEAR_LINE);
+ machine().device("subcpu")->execute().set_input_line(IRQ_TIMER+1, CLEAR_LINE);
break;
}
irq_timer_sync();
@@ -1002,10 +1002,10 @@ static TIMER_DEVICE_CALLBACK(irq_vbl)
mask = 1 << irq;
if(state->irq_allow0 & mask)
- cputag_set_input_line(timer.machine(), "maincpu", 1+irq, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(1+irq, ASSERT_LINE);
if(state->irq_allow1 & mask)
- cputag_set_input_line(timer.machine(), "subcpu", 1+irq, ASSERT_LINE);
+ timer.machine().device("subcpu")->execute().set_input_line(1+irq, ASSERT_LINE);
if(scanline == 384) {
// Ensure one index pulse every 20 frames
@@ -1024,8 +1024,8 @@ static void irq_ym(device_t *device, int irq)
{
segas24_state *state = device->machine().driver_data<segas24_state>();
state->irq_yms = irq;
- cputag_set_input_line(device->machine(), "maincpu", IRQ_YM2151+1, state->irq_yms && (state->irq_allow0 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(device->machine(), "subcpu", IRQ_YM2151+1, state->irq_yms && (state->irq_allow1 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(IRQ_YM2151+1, state->irq_yms && (state->irq_allow0 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("subcpu")->execute().set_input_line(IRQ_YM2151+1, state->irq_yms && (state->irq_allow1 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -1279,7 +1279,7 @@ static MACHINE_START( system24 )
static MACHINE_RESET( system24 )
{
segas24_state *state = machine.driver_data<segas24_state>();
- cputag_set_input_line(machine, "subcpu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("subcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
state->prev_resetcontrol = state->resetcontrol = 0x06;
state->fdc_init();
state->curbank = 0;
diff --git a/src/mame/drivers/segas32.c b/src/mame/drivers/segas32.c
index ef65c4a84ed..d5b9ab82e05 100644
--- a/src/mame/drivers/segas32.c
+++ b/src/mame/drivers/segas32.c
@@ -396,7 +396,7 @@ static MACHINE_RESET( system32 )
state->m_v60_irq_timer[1] = machine.device<timer_device>("v60_irq1");
/* clear IRQ lines */
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -418,13 +418,13 @@ static void update_irq_state(running_machine &machine)
for (vector = 0; vector < 5; vector++)
if (effirq & (1 << vector))
{
- cputag_set_input_line_and_vector(machine, "maincpu", 0, ASSERT_LINE, vector);
+ machine.device("maincpu")->execute().set_input_line_and_vector(0, ASSERT_LINE, vector);
break;
}
/* if we didn't find any, clear the interrupt line */
if (vector == 5)
- cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -703,7 +703,7 @@ static void common_io_chip_w(address_space *space, int which, offs_t offset, UIN
case 0x1c/2:
state->m_system32_displayenable[which] = (data & 0x02);
if (which == 0)
- cputag_set_input_line(space->machine(), "soundcpu", INPUT_LINE_RESET, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE);
+ space->machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE);
break;
}
}
@@ -1056,13 +1056,13 @@ static void update_sound_irq_state(running_machine &machine)
for (vector = 0; vector < 3; vector++)
if (effirq & (1 << vector))
{
- cputag_set_input_line_and_vector(machine, "soundcpu", 0, ASSERT_LINE, 2 * vector);
+ machine.device("soundcpu")->execute().set_input_line_and_vector(0, ASSERT_LINE, 2 * vector);
break;
}
/* if we didn't find any, clear the interrupt line */
if (vector == 3)
- cputag_set_input_line(machine, "soundcpu", 0, CLEAR_LINE);
+ machine.device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c
index c105e05ccd9..d715a5cd9e4 100644
--- a/src/mame/drivers/seibuspi.c
+++ b/src/mame/drivers/seibuspi.c
@@ -859,7 +859,7 @@ READ32_MEMBER(seibuspi_state::sound_fifo_status_r)
READ32_MEMBER(seibuspi_state::spi_int_r)
{
- cputag_set_input_line(machine(), "maincpu", 0,CLEAR_LINE );
+ machine().device("maincpu")->execute().set_input_line(0,CLEAR_LINE );
return 0xffffffff;
}
@@ -907,9 +907,9 @@ logerror("z80 data = %08x mask = %08x\n",data,mem_mask);
if( ACCESSING_BITS_0_7 ) {
if( data & 0x1 ) {
m_z80_prg_fifo_pos = 0;
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_RESET, CLEAR_LINE );
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE );
} else {
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_RESET, ASSERT_LINE );
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE );
}
}
}
@@ -1098,9 +1098,9 @@ WRITE8_MEMBER(seibuspi_state::flashrom_write)
static void irqhandler(device_t *device, int state)
{
if (state)
- cputag_set_input_line_and_vector(device->machine(), "soundcpu", 0, ASSERT_LINE, 0xd7); // IRQ is RST10
+ device->machine().device("soundcpu")->execute().set_input_line_and_vector(0, ASSERT_LINE, 0xd7); // IRQ is RST10
else
- cputag_set_input_line(device->machine(), "soundcpu", 0, CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE32_MEMBER(seibuspi_state::sys386f2_eeprom_w)
@@ -1816,7 +1816,7 @@ static MACHINE_RESET( spi )
UINT8 *rombase = state->memregion("user1")->base();
UINT8 flash_data = rombase[0x1ffffc];
- cputag_set_input_line(machine, "soundcpu", INPUT_LINE_RESET, ASSERT_LINE );
+ machine.device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE );
device_set_irq_callback(machine.device("maincpu"), spi_irq_callback);
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x00000680, 0x00000683, read32_delegate(FUNC(seibuspi_state::sound_fifo_r),state));
diff --git a/src/mame/drivers/seicross.c b/src/mame/drivers/seicross.c
index a5baf0056f0..c843511971a 100644
--- a/src/mame/drivers/seicross.c
+++ b/src/mame/drivers/seicross.c
@@ -76,7 +76,7 @@ static NVRAM_HANDLER( seicross )
static MACHINE_RESET( friskyt )
{
/* start with the protection mcu halted */
- cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, ASSERT_LINE);
+ machine.device("mcu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
@@ -100,8 +100,8 @@ WRITE8_MEMBER(seicross_state::friskyt_portB_w)
if (((m_portb & 4) == 0) && (data & 4))
{
/* reset and start the protection mcu */
- cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, PULSE_LINE);
- cputag_set_input_line(machine(), "mcu", INPUT_LINE_HALT, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("mcu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
/* other bits unknown */
diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c
index 8ac8f1ec30f..20cf7844506 100644
--- a/src/mame/drivers/seta.c
+++ b/src/mame/drivers/seta.c
@@ -1403,7 +1403,7 @@ static void uPD71054_update_timer( running_machine &machine, device_t *cpu, int
------------------------------*/
static TIMER_CALLBACK( uPD71054_timer_callback )
{
- cputag_set_input_line(machine, "maincpu", 4, HOLD_LINE );
+ machine.device("maincpu")->execute().set_input_line(4, HOLD_LINE );
uPD71054_update_timer( machine, NULL, param );
}
@@ -1490,7 +1490,7 @@ static const x1_010_interface seta_sound_intf2 =
static void utoukond_ym3438_interrupt(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_NMI, linestate);
+ device->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, linestate);
}
static const ym3438_interface utoukond_ym3438_intf =
@@ -1548,7 +1548,7 @@ WRITE16_MEMBER(seta_state::sub_ctrl_w)
{
if ( !(m_sub_ctrl_data & 1) && (data & 1) )
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
m_sub_ctrl_data = data;
}
break;
@@ -1708,7 +1708,7 @@ WRITE16_MEMBER(seta_state::calibr50_soundlatch_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_word_w(space, 0, data, mem_mask);
- cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
device_spin_until_time(&space.device(), attotime::from_usec(50)); // Allow the other cpu to reply
}
}
@@ -2772,7 +2772,7 @@ WRITE16_MEMBER(seta_state::wiggie_soundlatch_w)
{
m_wiggie_soundlatch = data >> 8;
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
@@ -2838,7 +2838,7 @@ WRITE16_MEMBER(seta_state::utoukond_soundlatch_w)
{
if (ACCESSING_BITS_0_7)
{
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
soundlatch_byte_w(space, 0, data & 0xff);
}
}
diff --git a/src/mame/drivers/sfkick.c b/src/mame/drivers/sfkick.c
index 54eb8a3e485..bfbe154cb9d 100644
--- a/src/mame/drivers/sfkick.c
+++ b/src/mame/drivers/sfkick.c
@@ -431,7 +431,7 @@ INPUT_PORTS_END
static void sfkick_vdp_interrupt(device_t *, v99x8_device &device, int i)
{
- cputag_set_input_line (device.machine(), "maincpu", 0, (i ? HOLD_LINE : CLEAR_LINE));
+ device.machine().device("maincpu")->execute().set_input_line(0, (i ? HOLD_LINE : CLEAR_LINE));
}
static MACHINE_RESET(sfkick)
@@ -457,7 +457,7 @@ static TIMER_DEVICE_CALLBACK( sfkick_interrupt )
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line_and_vector(device->machine(), "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff);
+ device->machine().device("soundcpu")->execute().set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/sg1000a.c b/src/mame/drivers/sg1000a.c
index 67eb032eadd..8595deca2f0 100644
--- a/src/mame/drivers/sg1000a.c
+++ b/src/mame/drivers/sg1000a.c
@@ -240,7 +240,7 @@ INPUT_PORTS_END
WRITE_LINE_MEMBER(sg1000a_state::vdp_interrupt)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, state);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, state);
}
static TMS9928A_INTERFACE(sg1000a_tms9928a_interface)
diff --git a/src/mame/drivers/shadfrce.c b/src/mame/drivers/shadfrce.c
index ee5e52227fa..18333a8c057 100644
--- a/src/mame/drivers/shadfrce.c
+++ b/src/mame/drivers/shadfrce.c
@@ -263,7 +263,7 @@ WRITE16_MEMBER(shadfrce_state::shadfrce_sound_brt_w)
if (ACCESSING_BITS_8_15)
{
soundlatch_byte_w(space, 1, data >> 8);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE );
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE );
}
else
{
@@ -277,7 +277,7 @@ WRITE16_MEMBER(shadfrce_state::shadfrce_sound_brt_w)
WRITE16_MEMBER(shadfrce_state::shadfrce_irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", offset ^ 3, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(offset ^ 3, CLEAR_LINE);
}
WRITE16_MEMBER(shadfrce_state::shadfrce_irq_w)
@@ -331,7 +331,7 @@ static TIMER_DEVICE_CALLBACK( shadfrce_scanline )
state->m_raster_scanline = (state->m_raster_scanline + 1) % 240;
if (state->m_raster_scanline > 0)
timer.machine().primary_screen->update_partial(state->m_raster_scanline - 1);
- cputag_set_input_line(timer.machine(), "maincpu", 1, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(1, ASSERT_LINE);
}
}
@@ -342,7 +342,7 @@ static TIMER_DEVICE_CALLBACK( shadfrce_scanline )
{
if (scanline > 0)
timer.machine().primary_screen->update_partial(scanline - 1);
- cputag_set_input_line(timer.machine(), "maincpu", 2, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(2, ASSERT_LINE);
}
}
@@ -352,7 +352,7 @@ static TIMER_DEVICE_CALLBACK( shadfrce_scanline )
if (scanline == 248)
{
timer.machine().primary_screen->update_partial(scanline - 1);
- cputag_set_input_line(timer.machine(), "maincpu", 3, ASSERT_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE);
}
}
}
@@ -546,7 +546,7 @@ GFXDECODE_END
static void irq_handler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE );
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE );
}
static const ym2151_interface ym2151_config =
diff --git a/src/mame/drivers/shangha3.c b/src/mame/drivers/shangha3.c
index 184125b488a..557f7192c2c 100644
--- a/src/mame/drivers/shangha3.c
+++ b/src/mame/drivers/shangha3.c
@@ -110,7 +110,7 @@ WRITE16_MEMBER(shangha3_state::heberpop_sound_command_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line_and_vector(machine(), "audiocpu", 0, HOLD_LINE, 0xff); /* RST 38h */
+ machine().device("audiocpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff); /* RST 38h */
}
}
@@ -457,7 +457,7 @@ static const ay8910_interface ay8910_config =
static void irqhandler(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_NMI, linestate);
+ device->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, linestate);
}
static const ym3438_interface ym3438_config =
diff --git a/src/mame/drivers/shangkid.c b/src/mame/drivers/shangkid.c
index 2f2ddb15a88..a6f21f42961 100644
--- a/src/mame/drivers/shangkid.c
+++ b/src/mame/drivers/shangkid.c
@@ -63,18 +63,18 @@ WRITE8_MEMBER(shangkid_state::shangkid_maincpu_bank_w)
WRITE8_MEMBER(shangkid_state::shangkid_bbx_enable_w)
{
- cputag_set_input_line(machine(), "bbx", INPUT_LINE_HALT, data?0:1 );
+ machine().device("bbx")->execute().set_input_line(INPUT_LINE_HALT, data?0:1 );
}
WRITE8_MEMBER(shangkid_state::shangkid_cpu_reset_w)
{
if( data == 0 )
{
- cputag_set_input_line(machine(), "bbx", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("bbx")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
else if( data == 1 )
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
}
@@ -89,7 +89,7 @@ WRITE8_MEMBER(shangkid_state::chinhero_ay8910_porta_w)
{
if( data == 0x01 )
/* 0->1 transition triggers interrupt on Sound CPU */
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE );
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE );
}
}
@@ -99,7 +99,7 @@ WRITE8_MEMBER(shangkid_state::shangkid_ay8910_porta_w)
{
if( data == 0x01 )
/* 0->1 transition triggers interrupt on Sound CPU */
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE );
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE );
}
else
membank("bank2")->set_entry(data ? 0 : 1);
@@ -137,12 +137,12 @@ DRIVER_INIT_MEMBER(shangkid_state,shangkid)
static MACHINE_RESET( chinhero )
{
- cputag_set_input_line(machine, "bbx", INPUT_LINE_HALT, 1 );
+ machine.device("bbx")->execute().set_input_line(INPUT_LINE_HALT, 1 );
}
static MACHINE_RESET( shangkid )
{
- cputag_set_input_line(machine, "bbx", INPUT_LINE_HALT, 1 );
+ machine.device("bbx")->execute().set_input_line(INPUT_LINE_HALT, 1 );
machine.root_device().membank("bank1")->set_entry(0);
machine.root_device().membank("bank2")->set_entry(0);
diff --git a/src/mame/drivers/shootout.c b/src/mame/drivers/shootout.c
index c4b479197e8..f0b407387ae 100644
--- a/src/mame/drivers/shootout.c
+++ b/src/mame/drivers/shootout.c
@@ -49,7 +49,7 @@ WRITE8_MEMBER(shootout_state::shootout_bankswitch_w)
WRITE8_MEMBER(shootout_state::sound_cpu_command_w)
{
soundlatch_byte_w( space, offset, data );
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE );
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE );
}
WRITE8_MEMBER(shootout_state::shootout_flipscreen_w)
@@ -108,7 +108,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(shootout_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( shootout )
@@ -230,12 +230,12 @@ GFXDECODE_END
static void shootout_snd_irq(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, linestate);
+ device->machine().device("audiocpu")->execute().set_input_line(0, linestate);
}
static void shootout_snd2_irq(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "maincpu", 0, linestate);
+ device->machine().device("maincpu")->execute().set_input_line(0, linestate);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c
index 0d15474c681..94bb6e9337b 100644
--- a/src/mame/drivers/shougi.c
+++ b/src/mame/drivers/shougi.c
@@ -246,13 +246,13 @@ WRITE8_MEMBER(shougi_state::shougi_watchdog_reset_w)
WRITE8_MEMBER(shougi_state::shougi_mcu_halt_off_w)
{
/* logerror("mcu HALT OFF"); */
- cputag_set_input_line(machine(), "mcu", INPUT_LINE_HALT, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
WRITE8_MEMBER(shougi_state::shougi_mcu_halt_on_w)
{
/* logerror("mcu HALT ON"); */
- cputag_set_input_line(machine(), "mcu", INPUT_LINE_HALT,ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(INPUT_LINE_HALT,ASSERT_LINE);
}
@@ -262,8 +262,8 @@ WRITE8_MEMBER(shougi_state::nmi_disable_and_clear_line_w)
m_nmi_enabled = 0; /* disable NMIs */
/* NMI lines are tied together on both CPUs and connected to the LS74 /Q output */
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
- cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
WRITE8_MEMBER(shougi_state::nmi_enable_w)
@@ -279,8 +279,8 @@ static INTERRUPT_GEN( shougi_vblank_nmi )
if ( state->m_nmi_enabled == 1 )
{
/* NMI lines are tied together on both CPUs and connected to the LS74 /Q output */
- cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
- cputag_set_input_line(device->machine(), "sub", INPUT_LINE_NMI, ASSERT_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
+ device->machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
}
diff --git a/src/mame/drivers/shuuz.c b/src/mame/drivers/shuuz.c
index d010fda6c2e..529117ecb2e 100644
--- a/src/mame/drivers/shuuz.c
+++ b/src/mame/drivers/shuuz.c
@@ -34,7 +34,7 @@
static void update_interrupts(running_machine &machine)
{
shuuz_state *state = machine.driver_data<shuuz_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c
index 25db931dda3..d7aedd8c023 100644
--- a/src/mame/drivers/sidearms.c
+++ b/src/mame/drivers/sidearms.c
@@ -634,7 +634,7 @@ GFXDECODE_END
/* handler called by the 2203 emulator when the internal timers cause an IRQ */
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/sidepckt.c b/src/mame/drivers/sidepckt.c
index 645a6f23927..69a5fb32b8e 100644
--- a/src/mame/drivers/sidepckt.c
+++ b/src/mame/drivers/sidepckt.c
@@ -134,7 +134,7 @@ Stephh's notes (based on the games M6809 code and some tests) :
WRITE8_MEMBER(sidepckt_state::sound_cpu_command_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
READ8_MEMBER(sidepckt_state::sidepckt_i8751_r)
@@ -148,7 +148,7 @@ WRITE8_MEMBER(sidepckt_state::sidepckt_i8751_w)
static const int table_2[]={0x8e,0x42,0xad,0x58,0xec,0x85,0xdd,0x4c,0xad,0x9f,0x00,0x4c,0x7e,0x42,0xa2,0xff};
static const int table_3[]={0xbd,0x73,0x80,0xbd,0x73,0xa7,0xbd,0x73,0xe0,0x7e,0x72,0x56,0xff,0xff,0xff,0xff};
- cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, HOLD_LINE); /* i8751 triggers FIRQ on main cpu */
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); /* i8751 triggers FIRQ on main cpu */
/* This function takes multiple parameters */
if (m_in_math==1) {
@@ -188,7 +188,7 @@ WRITE8_MEMBER(sidepckt_state::sidepctj_i8751_w)
static const int table_2[]={0x8e,0x42,0xb2,0x58,0xec,0x85,0xdd,0x4c,0xad,0x9f,0x00,0x4c,0x7e,0x42,0xa7,0xff};
static const int table_3[]={0xbd,0x71,0xc8,0xbd,0x71,0xef,0xbd,0x72,0x28,0x7e,0x70,0x9e,0xff,0xff,0xff,0xff};
- cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, HOLD_LINE); /* i8751 triggers FIRQ on main cpu */
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); /* i8751 triggers FIRQ on main cpu */
/* This function takes multiple parameters */
if (m_in_math==1) {
diff --git a/src/mame/drivers/skeetsht.c b/src/mame/drivers/skeetsht.c
index 5eec4f8a6b4..913eb226213 100644
--- a/src/mame/drivers/skeetsht.c
+++ b/src/mame/drivers/skeetsht.c
@@ -114,7 +114,7 @@ WRITE16_MEMBER(skeetsht_state::ramdac_w)
static void skeetsht_tms_irq(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "68hc11", MC68HC11_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("68hc11")->execute().set_input_line(MC68HC11_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/skullxbo.c b/src/mame/drivers/skullxbo.c
index e9b7d5f569d..d4ee54d807e 100644
--- a/src/mame/drivers/skullxbo.c
+++ b/src/mame/drivers/skullxbo.c
@@ -34,9 +34,9 @@
static void update_interrupts(running_machine &machine)
{
skullxbo_state *state = machine.driver_data<skullxbo_state>();
- cputag_set_input_line(machine, "maincpu", 1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/skykid.c b/src/mame/drivers/skykid.c
index fad8b9972e7..cdea77fd970 100644
--- a/src/mame/drivers/skykid.c
+++ b/src/mame/drivers/skykid.c
@@ -64,7 +64,7 @@ WRITE8_MEMBER(skykid_state::skykid_led_w)
WRITE8_MEMBER(skykid_state::skykid_subreset_w)
{
int bit = !BIT(offset,11);
- cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE);
}
WRITE8_MEMBER(skykid_state::skykid_bankswitch_w)
@@ -77,7 +77,7 @@ WRITE8_MEMBER(skykid_state::skykid_irq_1_ctrl_w)
int bit = !BIT(offset,11);
m_main_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(skykid_state::skykid_irq_2_ctrl_w)
@@ -85,7 +85,7 @@ WRITE8_MEMBER(skykid_state::skykid_irq_2_ctrl_w)
int bit = !BIT(offset,13);
m_mcu_irq_mask = bit;
if (!bit)
- cputag_set_input_line(machine(), "mcu", 0, CLEAR_LINE);
+ machine().device("mcu")->execute().set_input_line(0, CLEAR_LINE);
}
static MACHINE_START( skykid )
diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c
index f2a1fe8cee5..a253ae3d691 100644
--- a/src/mame/drivers/sliver.c
+++ b/src/mame/drivers/sliver.c
@@ -314,7 +314,7 @@ WRITE16_MEMBER(sliver_state::io_data_w)
WRITE16_MEMBER(sliver_state::sound_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", MCS51_INT0_LINE, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(MCS51_INT0_LINE, HOLD_LINE);
}
static ADDRESS_MAP_START( sliver_map, AS_PROGRAM, 16, sliver_state )
diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c
index d102e21c624..66f4715d9ba 100644
--- a/src/mame/drivers/slotcarn.c
+++ b/src/mame/drivers/slotcarn.c
@@ -162,7 +162,7 @@ WRITE_LINE_MEMBER(slotcarn_state::hsync_changed)
WRITE_LINE_MEMBER(slotcarn_state::vsync_changed)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
static const mc6845_interface mc6845_intf =
diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c
index 46be58accda..c3ed39bda35 100644
--- a/src/mame/drivers/snk.c
+++ b/src/mame/drivers/snk.c
@@ -275,28 +275,28 @@ READ8_MEMBER(snk_state::snk_cpuA_nmi_trigger_r)
{
if(!space.debugger_access())
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
return 0xff;
}
WRITE8_MEMBER(snk_state::snk_cpuA_nmi_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
READ8_MEMBER(snk_state::snk_cpuB_nmi_trigger_r)
{
if(!space.debugger_access())
{
- cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
return 0xff;
}
WRITE8_MEMBER(snk_state::snk_cpuB_nmi_ack_w)
{
- cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
/*********************************************************************/
@@ -319,7 +319,7 @@ WRITE8_MEMBER(snk_state::marvins_soundlatch_w)
m_marvins_sound_busy_flag = 1;
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
READ8_MEMBER(snk_state::marvins_soundlatch_r)
@@ -337,7 +337,7 @@ CUSTOM_INPUT_MEMBER(snk_state::marvins_sound_busy)
READ8_MEMBER(snk_state::marvins_sound_nmi_ack_r)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return 0xff;
}
@@ -362,7 +362,7 @@ static TIMER_CALLBACK( sgladiat_sndirq_update_callback )
break;
}
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, (state->m_sound_status & 0x8) ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, (state->m_sound_status & 0x8) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -386,7 +386,7 @@ READ8_MEMBER(snk_state::sgladiat_sound_nmi_ack_r)
READ8_MEMBER(snk_state::sgladiat_sound_irq_ack_r)
{
- cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
return 0xff;
}
@@ -449,7 +449,7 @@ static TIMER_CALLBACK( sndirq_update_callback )
break;
}
- cputag_set_input_line(machine, "audiocpu", 0, (state->m_sound_status & 0xb) ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("audiocpu")->execute().set_input_line(0, (state->m_sound_status & 0xb) ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/snk6502.c b/src/mame/drivers/snk6502.c
index 915795c6c95..e8d97fe3fbc 100644
--- a/src/mame/drivers/snk6502.c
+++ b/src/mame/drivers/snk6502.c
@@ -444,7 +444,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(snk6502_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( snk6502_generic_joy8way )
diff --git a/src/mame/drivers/snk68.c b/src/mame/drivers/snk68.c
index 53ff0175a9b..fe90f468924 100644
--- a/src/mame/drivers/snk68.c
+++ b/src/mame/drivers/snk68.c
@@ -109,7 +109,7 @@ WRITE16_MEMBER(snk68_state::sound_w)
if (ACCESSING_BITS_8_15)
{
soundlatch_byte_w(space, 0, data >> 8);
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -578,7 +578,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym3812_interface ym3812_config =
diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c
index fd0cf02b9fd..548bff0b5a3 100644
--- a/src/mame/drivers/snowbros.c
+++ b/src/mame/drivers/snowbros.c
@@ -107,17 +107,17 @@ static SCREEN_VBLANK( snowbros )
WRITE16_MEMBER(snowbros_state::snowbros_irq4_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 4, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
}
WRITE16_MEMBER(snowbros_state::snowbros_irq3_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 3, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
}
WRITE16_MEMBER(snowbros_state::snowbros_irq2_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
}
static TIMER_DEVICE_CALLBACK( snowbros_irq )
@@ -184,7 +184,7 @@ WRITE16_MEMBER(snowbros_state::snowbros_68000_sound_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, offset, data & 0xff);
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -330,7 +330,7 @@ WRITE16_MEMBER(snowbros_state::twinadv_68000_sound_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, offset, data & 0xff);
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -1496,7 +1496,7 @@ GFXDECODE_END
/* handler called by the 3812/2151 emulator when the internal timers cause an IRQ */
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
/* SnowBros Sound */
diff --git a/src/mame/drivers/solomon.c b/src/mame/drivers/solomon.c
index 49b10d1ccfd..9dd68503ed4 100644
--- a/src/mame/drivers/solomon.c
+++ b/src/mame/drivers/solomon.c
@@ -14,7 +14,7 @@ driver by Mirko Buffoni
WRITE8_MEMBER(solomon_state::solomon_sh_command_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/* this is checked on the title screen and when you reach certain scores in the game
diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c
index 165d45dc174..c7590f354f1 100644
--- a/src/mame/drivers/sothello.c
+++ b/src/mame/drivers/sothello.c
@@ -101,7 +101,7 @@ static TIMER_CALLBACK( subcpu_suspend )
static TIMER_CALLBACK( subcpu_resume )
{
machine.device<cpu_device>("sub")->resume(SUSPEND_REASON_HALT);
- cputag_set_input_line(machine, "sub", INPUT_LINE_NMI, PULSE_LINE);
+ machine.device("sub")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
READ8_MEMBER(sothello_state::subcpu_halt_set)
@@ -185,7 +185,7 @@ WRITE8_MEMBER(sothello_state::soundcpu_busyflag_reset_w)
WRITE8_MEMBER(sothello_state::soundcpu_int_clear_w)
{
- cputag_set_input_line(machine(), "soundcpu", 0, CLEAR_LINE );
+ machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE );
}
static ADDRESS_MAP_START( soundcpu_mem_map, AS_PROGRAM, 8, sothello_state )
@@ -313,12 +313,12 @@ INPUT_PORTS_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "sub", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("sub")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static void sothello_vdp_interrupt(device_t *, v99x8_device &device, int i)
{
- cputag_set_input_line(device.machine(), "maincpu", 0, (i ? HOLD_LINE : CLEAR_LINE));
+ device.machine().device("maincpu")->execute().set_input_line(0, (i ? HOLD_LINE : CLEAR_LINE));
}
static TIMER_DEVICE_CALLBACK( sothello_interrupt )
@@ -332,7 +332,7 @@ static void adpcm_int(device_t *device)
sothello_state *state = device->machine().driver_data<sothello_state>();
/* only 4 bits are used */
msm5205_data_w( device, state->m_msm_data & 0x0f );
- cputag_set_input_line(device->machine(), "soundcpu", 0, ASSERT_LINE );
+ device->machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE );
}
diff --git a/src/mame/drivers/spacefb.c b/src/mame/drivers/spacefb.c
index 4274bf0662d..d2eb3ffddae 100644
--- a/src/mame/drivers/spacefb.c
+++ b/src/mame/drivers/spacefb.c
@@ -132,7 +132,7 @@ static TIMER_CALLBACK( interrupt_callback )
/* compute vector and set the interrupt line */
int vpos = machine.primary_screen->vpos();
UINT8 vector = 0xc7 | ((vpos & 0x40) >> 2) | ((~vpos & 0x40) >> 3);
- cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, vector);
+ machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, vector);
/* set up for next interrupt */
if (vpos == SPACEFB_INT_TRIGGER_COUNT_1)
diff --git a/src/mame/drivers/spbactn.c b/src/mame/drivers/spbactn.c
index d03a37f3203..02242bdd6ea 100644
--- a/src/mame/drivers/spbactn.c
+++ b/src/mame/drivers/spbactn.c
@@ -147,7 +147,7 @@ WRITE16_MEMBER(spbactn_state::soundcommand_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, offset, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -336,7 +336,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, linestate);
+ device->machine().device("audiocpu")->execute().set_input_line(0, linestate);
}
static const ym3812_interface ym3812_config =
diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c
index a4ee6768313..21b05b123bf 100644
--- a/src/mame/drivers/spcforce.c
+++ b/src/mame/drivers/spcforce.c
@@ -76,7 +76,7 @@ READ8_MEMBER(spcforce_state::spcforce_t0_r)
WRITE8_MEMBER(spcforce_state::spcforce_soundtrigger_w)
{
- cputag_set_input_line(machine(), "audiocpu", 0, (~data & 0x08) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, (~data & 0x08) ? ASSERT_LINE : CLEAR_LINE);
}
WRITE8_MEMBER(spcforce_state::irq_mask_w)
diff --git a/src/mame/drivers/spdodgeb.c b/src/mame/drivers/spdodgeb.c
index 4871b26bb77..2dbef55b425 100644
--- a/src/mame/drivers/spdodgeb.c
+++ b/src/mame/drivers/spdodgeb.c
@@ -32,7 +32,7 @@ Notes:
WRITE8_MEMBER(spdodgeb_state::sound_command_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", M6809_IRQ_LINE, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(spdodgeb_state::spd_adpcm_w)
@@ -379,7 +379,7 @@ GFXDECODE_END
static void irq_handler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym3812_interface ym3812_config =
diff --git a/src/mame/drivers/speedspn.c b/src/mame/drivers/speedspn.c
index a78077aaad4..792878038bf 100644
--- a/src/mame/drivers/speedspn.c
+++ b/src/mame/drivers/speedspn.c
@@ -93,7 +93,7 @@ WRITE8_MEMBER(speedspn_state::speedspn_banked_rom_change)
WRITE8_MEMBER(speedspn_state::speedspn_sound_w)
{
soundlatch_byte_w(space, 1, data);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(speedspn_state::oki_banking_w)
diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c
index 28a07b04444..e85dbcb06c9 100644
--- a/src/mame/drivers/speglsht.c
+++ b/src/mame/drivers/speglsht.c
@@ -222,7 +222,7 @@ READ32_MEMBER(speglsht_state::cop_r)
READ32_MEMBER(speglsht_state::irq_ack_clear)
{
- cputag_set_input_line(machine(), "sub", R3000_IRQ4, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(R3000_IRQ4, CLEAR_LINE);
return 0;
}
diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c
index 686625df0ea..a93d0f849e2 100644
--- a/src/mame/drivers/spiders.c
+++ b/src/mame/drivers/spiders.c
@@ -230,19 +230,19 @@ WRITE_LINE_MEMBER(spiders_state::main_cpu_irq)
pia2->irq_b_state() |
pia3->irq_a_state() | pia3->irq_b_state();
- cputag_set_input_line(machine(), "maincpu", M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE_LINE_MEMBER(spiders_state::main_cpu_firq)
{
- cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE_LINE_MEMBER(spiders_state::audio_cpu_irq)
{
- cputag_set_input_line(machine(), "audiocpu", M6800_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6800_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c
index cb9f7e62bd4..f022cffee65 100644
--- a/src/mame/drivers/splash.c
+++ b/src/mame/drivers/splash.c
@@ -54,7 +54,7 @@ WRITE16_MEMBER(splash_state::splash_sh_irqtrigger_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
}
@@ -63,7 +63,7 @@ WRITE16_MEMBER(splash_state::roldf_sh_irqtrigger_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
// give the z80 time to see it
@@ -223,7 +223,7 @@ WRITE16_MEMBER(splash_state::spr_write)
WRITE16_MEMBER(splash_state::funystrp_sh_irqtrigger_w)
{
soundlatch_byte_w(space, 0, data>>8);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( funystrp_map, AS_PROGRAM, 16, splash_state )
diff --git a/src/mame/drivers/spoker.c b/src/mame/drivers/spoker.c
index ca7519808c3..2c77f9ba56c 100644
--- a/src/mame/drivers/spoker.c
+++ b/src/mame/drivers/spoker.c
@@ -144,7 +144,7 @@ WRITE8_MEMBER(spoker_state::spoker_nmi_and_coins_w)
set_led_status(machine(), 6, data & 0x40); // led for coin out / hopper active
if(((m_nmi_ack & 0x80) == 0) && data & 0x80)
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
m_nmi_ack = data & 0x80; // nmi acknowledge, 0 -> 1
diff --git a/src/mame/drivers/sprint4.c b/src/mame/drivers/sprint4.c
index 59dad76bd56..68b7f11ed26 100644
--- a/src/mame/drivers/sprint4.c
+++ b/src/mame/drivers/sprint4.c
@@ -102,7 +102,7 @@ static TIMER_CALLBACK( nmi_callback )
machine.watchdog_enable(machine.root_device().ioport("IN0")->read() & 0x40);
if (machine.root_device().ioport("IN0")->read() & 0x40)
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
machine.scheduler().timer_set(machine.primary_screen->time_until_pos(scanline), FUNC(nmi_callback), scanline);
}
diff --git a/src/mame/drivers/sprint8.c b/src/mame/drivers/sprint8.c
index 5f943e094f8..84b4598050a 100644
--- a/src/mame/drivers/sprint8.c
+++ b/src/mame/drivers/sprint8.c
@@ -16,7 +16,7 @@ void sprint8_set_collision(running_machine &machine, int n)
sprint8_state *state = machine.driver_data<sprint8_state>();
if (state->m_collision_reset == 0)
{
- cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
state->m_collision_index = n;
}
@@ -95,7 +95,7 @@ WRITE8_MEMBER(sprint8_state::sprint8_int_reset_w)
m_collision_reset = !(data & 1);
if (m_collision_reset)
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c
index 2d0916bd06b..e3e79a0a5b2 100644
--- a/src/mame/drivers/srmp2.c
+++ b/src/mame/drivers/srmp2.c
@@ -376,12 +376,12 @@ WRITE8_MEMBER(srmp2_state::srmp3_rombank_w)
WRITE8_MEMBER(srmp2_state::srmp2_irq2_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
}
WRITE8_MEMBER(srmp2_state::srmp2_irq4_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 4, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
}
@@ -408,13 +408,13 @@ ADDRESS_MAP_END
READ8_MEMBER(srmp2_state::mjyuugi_irq2_ack_r)
{
- cputag_set_input_line(machine(), "maincpu", 2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
return 0xff; // value returned doesn't matter
}
READ8_MEMBER(srmp2_state::mjyuugi_irq4_ack_r)
{
- cputag_set_input_line(machine(), "maincpu", 4, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
return 0xff; // value returned doesn't matter
}
@@ -461,7 +461,7 @@ WRITE8_MEMBER(srmp2_state::srmp3_flags_w)
WRITE8_MEMBER(srmp2_state::srmp3_irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
static ADDRESS_MAP_START( srmp3_map, AS_PROGRAM, 8, srmp2_state )
diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c
index dc271926c89..b004c92c97b 100644
--- a/src/mame/drivers/srmp5.c
+++ b/src/mame/drivers/srmp5.c
@@ -344,7 +344,7 @@ WRITE32_MEMBER(srmp5_state::srmp5_vidregs_w)
READ32_MEMBER(srmp5_state::irq_ack_clear)
{
- cputag_set_input_line(machine(), "sub", R3000_IRQ4, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(R3000_IRQ4, CLEAR_LINE);
return 0;
}
diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c
index b57884c2fa0..e489f8ae563 100644
--- a/src/mame/drivers/srmp6.c
+++ b/src/mame/drivers/srmp6.c
@@ -541,7 +541,7 @@ WRITE16_MEMBER(srmp6_state::paletteram_w)
READ16_MEMBER(srmp6_state::srmp6_irq_ack_r)
{
- cputag_set_input_line(machine(), "maincpu", 4, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
return 0; // value read doesn't matter
}
diff --git a/src/mame/drivers/sshangha.c b/src/mame/drivers/sshangha.c
index 90dd901a101..7cbdfc2d686 100644
--- a/src/mame/drivers/sshangha.c
+++ b/src/mame/drivers/sshangha.c
@@ -358,7 +358,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, state);
+ device->machine().device("audiocpu")->execute().set_input_line(0, state);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/sslam.c b/src/mame/drivers/sslam.c
index e08f7bf1621..cb741c67cba 100644
--- a/src/mame/drivers/sslam.c
+++ b/src/mame/drivers/sslam.c
@@ -374,7 +374,7 @@ WRITE16_MEMBER(sslam_state::sslam_snd_w)
WRITE16_MEMBER(sslam_state::powerbls_sound_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", MCS51_INT1_LINE, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(MCS51_INT1_LINE, HOLD_LINE);
}
/* Memory Maps */
diff --git a/src/mame/drivers/ssozumo.c b/src/mame/drivers/ssozumo.c
index aabbbd51c51..5d591428969 100644
--- a/src/mame/drivers/ssozumo.c
+++ b/src/mame/drivers/ssozumo.c
@@ -17,7 +17,7 @@ Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/10/04
WRITE8_MEMBER(ssozumo_state::ssozumo_sh_command_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", M6502_IRQ_LINE, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
@@ -59,7 +59,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(ssozumo_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( ssozumo )
diff --git a/src/mame/drivers/sspeedr.c b/src/mame/drivers/sspeedr.c
index 65cc83db6c3..af43648dce0 100644
--- a/src/mame/drivers/sspeedr.c
+++ b/src/mame/drivers/sspeedr.c
@@ -35,7 +35,7 @@ static PALETTE_INIT( sspeedr )
WRITE8_MEMBER(sspeedr_state::sspeedr_int_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/ssv.c b/src/mame/drivers/ssv.c
index d5d4c068d27..9bf411e586a 100644
--- a/src/mame/drivers/ssv.c
+++ b/src/mame/drivers/ssv.c
@@ -180,7 +180,7 @@ static void update_irq_state(running_machine &machine)
{
ssv_state *state = machine.driver_data<ssv_state>();
- cputag_set_input_line(machine, "maincpu", 0, (state->m_requested_int & state->m_irq_enable)? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, (state->m_requested_int & state->m_irq_enable)? ASSERT_LINE : CLEAR_LINE);
}
static IRQ_CALLBACK(ssv_irq_callback)
diff --git a/src/mame/drivers/stadhero.c b/src/mame/drivers/stadhero.c
index 4df67d5da18..3c10b16d16e 100644
--- a/src/mame/drivers/stadhero.c
+++ b/src/mame/drivers/stadhero.c
@@ -46,7 +46,7 @@ WRITE16_MEMBER(stadhero_state::stadhero_control_w)
break;
case 6: /* 6502 sound cpu */
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
break;
default:
logerror("CPU #0 PC %06x: warning - write %02x to unmapped memory address %06x\n",space.device().safe_pc(),data,0x30c010+offset);
@@ -202,7 +202,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, linestate);
+ device->machine().device("audiocpu")->execute().set_input_line(0, linestate);
}
static const ym3812_interface ym3812_config =
diff --git a/src/mame/drivers/starwars.c b/src/mame/drivers/starwars.c
index deb3014c409..dac50b566a6 100644
--- a/src/mame/drivers/starwars.c
+++ b/src/mame/drivers/starwars.c
@@ -74,7 +74,7 @@ static MACHINE_RESET( starwars )
WRITE8_MEMBER(starwars_state::irq_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", M6809_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
diff --git a/src/mame/drivers/su2000.c b/src/mame/drivers/su2000.c
index f0dd716daac..e7d74742647 100644
--- a/src/mame/drivers/su2000.c
+++ b/src/mame/drivers/su2000.c
@@ -121,7 +121,7 @@ static void su2000_set_keyb_int(running_machine &machine, int state)
static void set_gate_a20(running_machine &machine, int a20)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, a20);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_A20, a20);
}
static void keyboard_interrupt(running_machine &machine, int state)
@@ -181,7 +181,7 @@ static READ8_HANDLER( vga_setting )
WRITE_LINE_MEMBER(su2000_state::su2000_pic8259_1_set_int_line)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER(su2000_state::get_slave_ack)
diff --git a/src/mame/drivers/sub.c b/src/mame/drivers/sub.c
index 4ccc551c080..7a31bae1bc2 100644
--- a/src/mame/drivers/sub.c
+++ b/src/mame/drivers/sub.c
@@ -245,7 +245,7 @@ ADDRESS_MAP_END
WRITE8_MEMBER(sub_state::subm_to_sound_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- cputag_set_input_line(machine(), "soundcpu", 0, HOLD_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(sub_state::nmi_mask_w)
@@ -421,7 +421,7 @@ static INTERRUPT_GEN( subm_sound_irq )
sub_state *state = device->machine().driver_data<sub_state>();
if(state->m_nmi_en)
- cputag_set_input_line(device->machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( sub, sub_state )
diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c
index 2b42ee7333c..3eafd82122b 100644
--- a/src/mame/drivers/subsino2.c
+++ b/src/mame/drivers/subsino2.c
@@ -873,7 +873,7 @@ static TIMER_DEVICE_CALLBACK( am188em_timer2_irq )
{
subsino2_state *state = timer.machine().driver_data<subsino2_state>();
if ((state->m_am188em_regs[AM188EM_IMASK+0] & 0x01) == 0) // TMR mask
- cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0x4c/4);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0x4c/4);
}
/***************************************************************************
@@ -883,7 +883,7 @@ static TIMER_DEVICE_CALLBACK( am188em_timer2_irq )
// To be removed when cpu core is updated
static TIMER_DEVICE_CALLBACK( h8_timer_irq )
{
- cputag_set_input_line(timer.machine(), "maincpu", H8_METRO_TIMER_HACK, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE);
}
diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c
index 8a7e9f5e39a..3a4b65d8085 100644
--- a/src/mame/drivers/suna8.c
+++ b/src/mame/drivers/suna8.c
@@ -1589,7 +1589,7 @@ GFXDECODE_END
static void soundirq(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, state);
+ device->machine().device("audiocpu")->execute().set_input_line(0, state);
}
/* In games with only 2 CPUs, port A&B of the AY8910 are used
diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c
index 88022675cd6..3e2b95fe0e0 100644
--- a/src/mame/drivers/superchs.c
+++ b/src/mame/drivers/superchs.c
@@ -80,8 +80,8 @@ WRITE32_MEMBER(superchs_state::cpua_ctrl_w)
if (ACCESSING_BITS_8_15)
{
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, (data &0x200) ? CLEAR_LINE : ASSERT_LINE);
- if (data&0x8000) cputag_set_input_line(machine(), "maincpu", 3, HOLD_LINE); /* Guess */
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, (data &0x200) ? CLEAR_LINE : ASSERT_LINE);
+ if (data&0x8000) machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE); /* Guess */
}
if (ACCESSING_BITS_0_7)
@@ -182,7 +182,7 @@ WRITE32_MEMBER(superchs_state::superchs_stick_w)
different byte in this long word before the RTE. I assume all but the last
(top) byte cause an IRQ with the final one being an ACK. (Total guess but it works). */
if (mem_mask != 0xff000000)
- cputag_set_input_line(machine(), "maincpu", 3, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
}
/***********************************************************
diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c
index 699ee91fd39..3eb26761dbc 100644
--- a/src/mame/drivers/superdq.c
+++ b/src/mame/drivers/superdq.c
@@ -158,7 +158,7 @@ WRITE8_MEMBER(superdq_state::superdq_io_w)
static const UINT8 black_color_entries[] = {7,15,16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
if ( data & 0x40 ) /* bit 6 = irqack */
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
coin_counter_w( machine(), 0, data & 0x08 );
coin_counter_w( machine(), 1, data & 0x04 );
diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c
index 17849da9b1a..d2df76e3547 100644
--- a/src/mame/drivers/superqix.c
+++ b/src/mame/drivers/superqix.c
@@ -316,7 +316,7 @@ READ8_MEMBER(superqix_state::sqixu_mcu_p3_r)
READ8_MEMBER(superqix_state::nmi_ack_r)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return sqix_system_status_r(space, 0);
}
@@ -370,7 +370,7 @@ static TIMER_CALLBACK( delayed_z80_mcu_w )
// logerror("Z80 sends command %02x\n",param);
state->m_from_z80 = param;
state->m_from_mcu_pending = 0;
- cputag_set_input_line(machine, "mcu", 0, HOLD_LINE);
+ machine.device("mcu")->execute().set_input_line(0, HOLD_LINE);
machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(200));
}
diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c
index 757b3837830..15260bf845e 100644
--- a/src/mame/drivers/supertnk.c
+++ b/src/mame/drivers/supertnk.c
@@ -173,7 +173,7 @@ static INTERRUPT_GEN( supertnk_interrupt )
WRITE8_MEMBER(supertnk_state::supertnk_interrupt_ack_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c
index 52b32f6e344..86e503f5717 100644
--- a/src/mame/drivers/suprgolf.c
+++ b/src/mame/drivers/suprgolf.c
@@ -423,7 +423,7 @@ WRITE8_MEMBER(suprgolf_state::suprgolf_writeB)
static void irqhandler(device_t *device, int irq)
{
- //cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
+ //device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
@@ -449,7 +449,7 @@ static void adpcm_int(device_t *device)
if(state->m_toggle)
{
msm5205_data_w(device, (state->m_msm5205next & 0xf0) >> 4);
- if(state->m_msm_nmi_mask) { cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE); }
+ if(state->m_msm_nmi_mask) { device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); }
}
else
{
diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c
index 331fc1d49bb..512553978e0 100644
--- a/src/mame/drivers/suprloco.c
+++ b/src/mame/drivers/suprloco.c
@@ -20,7 +20,7 @@ TODO:
WRITE8_MEMBER(suprloco_state::suprloco_soundport_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
/* spin for a while to let the Z80 read the command (fixes hanging sound in Regulus) */
device_spin_until_time(&space.device(), attotime::from_usec(50));
}
diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c
index c00aed50763..380835809ce 100644
--- a/src/mame/drivers/suprnova.c
+++ b/src/mame/drivers/suprnova.c
@@ -418,7 +418,7 @@ READ32_MEMBER(skns_state::skns_hit_r)
static TIMER_DEVICE_CALLBACK( interrupt_callback )
{
- cputag_set_input_line(timer.machine(), "maincpu", param, HOLD_LINE);
+ timer.machine().device("maincpu")->execute().set_input_line(param, HOLD_LINE);
}
static MACHINE_RESET(skns)
@@ -625,21 +625,21 @@ WRITE32_MEMBER(skns_state::skns_io_w)
if(ACCESSING_BITS_8_15)
{ /* Interrupt Clear, do we need these? */
/* if(data&0x01)
- cputag_set_input_line(machine(), "maincpu",1,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(1,CLEAR_LINE);
if(data&0x02)
- cputag_set_input_line(machine(), "maincpu",3,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(3,CLEAR_LINE);
if(data&0x04)
- cputag_set_input_line(machine(), "maincpu",5,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(5,CLEAR_LINE);
if(data&0x08)
- cputag_set_input_line(machine(), "maincpu",7,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(7,CLEAR_LINE);
if(data&0x10)
- cputag_set_input_line(machine(), "maincpu",9,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(9,CLEAR_LINE);
if(data&0x20)
- cputag_set_input_line(machine(), "maincpu",0xb,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0xb,CLEAR_LINE);
if(data&0x40)
- cputag_set_input_line(machine(), "maincpu",0xd,CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0xd,CLEAR_LINE);
if(data&0x80)
- cputag_set_input_line(machine(), "maincpu",0xf,CLEAR_LINE);*/
+ machine().device("maincpu")->execute().set_input_line(0xf,CLEAR_LINE);*/
/* idle skip for vblokbrk/sarukani, i can't find a better place to put it :-( but i think it works ok unless its making the game too fast */
if (space.device().safe_pc()==0x04013B42)
diff --git a/src/mame/drivers/suprridr.c b/src/mame/drivers/suprridr.c
index 0015203fb4c..5e2a20c8a23 100644
--- a/src/mame/drivers/suprridr.c
+++ b/src/mame/drivers/suprridr.c
@@ -118,7 +118,7 @@ static TIMER_CALLBACK( delayed_sound_w )
{
suprridr_state *state = machine.driver_data<suprridr_state>();
state->m_sound_data = param;
- cputag_set_input_line(machine, "audiocpu", 0, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(0, ASSERT_LINE);
}
@@ -136,7 +136,7 @@ READ8_MEMBER(suprridr_state::sound_data_r)
WRITE8_MEMBER(suprridr_state::sound_irq_ack_w)
{
- cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c
index 930db6ced4d..83dde265610 100644
--- a/src/mame/drivers/system1.c
+++ b/src/mame/drivers/system1.c
@@ -481,7 +481,7 @@ WRITE8_MEMBER(system1_state::sound_control_w)
/* bit 6 = feedback from sound board that read occurrred */
/* bit 7 controls the sound CPU's NMI line */
- cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
/* remaining bits are used for video RAM banking */
system1_videoram_bank_w(device, offset, data);
@@ -524,7 +524,7 @@ WRITE8_MEMBER(system1_state::soundport_w)
static TIMER_DEVICE_CALLBACK( soundirq_gen )
{
/* sound IRQ is generated on 32V, 96V, ... and auto-acknowledged */
- cputag_set_input_line(timer.machine(), "soundcpu", 0, HOLD_LINE);
+ timer.machine().device("soundcpu")->execute().set_input_line(0, HOLD_LINE);
}
@@ -548,8 +548,8 @@ WRITE8_MEMBER(system1_state::mcu_control_w)
Bit 0 -> Directly connected to Z80 /INT line
*/
m_mcu_control = data;
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, (data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine(), "maincpu", 0, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, (data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
}
@@ -659,7 +659,7 @@ READ8_MEMBER(system1_state::nob_maincpu_latch_r)
WRITE8_MEMBER(system1_state::nob_maincpu_latch_w)
{
m_nob_maincpu_latch = data;
- cputag_set_input_line(machine(), "mcu", MCS51_INT0_LINE, ASSERT_LINE);
+ machine().device("mcu")->execute().set_input_line(MCS51_INT0_LINE, ASSERT_LINE);
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
}
diff --git a/src/mame/drivers/tagteam.c b/src/mame/drivers/tagteam.c
index 7bd1fd7f375..2eab73eae49 100644
--- a/src/mame/drivers/tagteam.c
+++ b/src/mame/drivers/tagteam.c
@@ -33,12 +33,12 @@ TODO:
WRITE8_MEMBER(tagteam_state::sound_command_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", M6502_IRQ_LINE, HOLD_LINE);
+ machine().device("audiocpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(tagteam_state::irq_clear_w)
{
- cputag_set_input_line(machine(), "maincpu", M6502_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
}
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tagteam_state )
@@ -75,7 +75,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(tagteam_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( bigprowr )
diff --git a/src/mame/drivers/taito_f3.c b/src/mame/drivers/taito_f3.c
index 3302d7a7c01..37dffa46855 100644
--- a/src/mame/drivers/taito_f3.c
+++ b/src/mame/drivers/taito_f3.c
@@ -110,12 +110,12 @@ WRITE32_MEMBER(taito_f3_state::f3_control_w)
WRITE32_MEMBER(taito_f3_state::f3_sound_reset_0_w)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
WRITE32_MEMBER(taito_f3_state::f3_sound_reset_1_w)
{
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
WRITE32_MEMBER(taito_f3_state::f3_sound_bankswitch_w)
@@ -392,7 +392,7 @@ GFXDECODE_END
static TIMER_CALLBACK( f3_interrupt3 )
{
- cputag_set_input_line(machine, "maincpu", 3, HOLD_LINE); // some signal from video hardware?
+ machine.device("maincpu")->execute().set_input_line(3, HOLD_LINE); // some signal from video hardware?
}
static INTERRUPT_GEN( f3_interrupt2 )
@@ -404,7 +404,7 @@ static INTERRUPT_GEN( f3_interrupt2 )
static SOUND_RESET( f3 )
{
SOUND_RESET_CALL( taito_en_soundsystem_reset );
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
diff --git a/src/mame/drivers/taito_x.c b/src/mame/drivers/taito_x.c
index 0b62cf111df..463159a7af4 100644
--- a/src/mame/drivers/taito_x.c
+++ b/src/mame/drivers/taito_x.c
@@ -794,7 +794,7 @@ GFXDECODE_END
/* handler called by the YM2610 emulator when the internal timers cause an IRQ */
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
diff --git a/src/mame/drivers/taitogn.c b/src/mame/drivers/taitogn.c
index de49fde32af..93c33df0ebc 100644
--- a/src/mame/drivers/taitogn.c
+++ b/src/mame/drivers/taitogn.c
@@ -893,7 +893,7 @@ static MACHINE_RESET( coh3002t )
ide_set_gnet_readlock(machine.device(":card"), 1);
// halt sound CPU since it has no valid program at start
- cputag_set_input_line(machine, "mn10200",INPUT_LINE_RESET,ASSERT_LINE); /* MCU */
+ machine.device("mn10200")->execute().set_input_line(INPUT_LINE_RESET,ASSERT_LINE); /* MCU */
}
static ADDRESS_MAP_START( taitogn_map, AS_PROGRAM, 32, taitogn_state )
diff --git a/src/mame/drivers/taitosj.c b/src/mame/drivers/taitosj.c
index a79de484716..50f60cbedae 100644
--- a/src/mame/drivers/taitosj.c
+++ b/src/mame/drivers/taitosj.c
@@ -179,7 +179,7 @@ WRITE8_MEMBER(taitosj_state::taitosj_sndnmi_msk_w)
WRITE8_MEMBER(taitosj_state::taitosj_soundcommand_w)
{
soundlatch_byte_w(space,offset,data);
- if (!m_sndnmi_disable) cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ if (!m_sndnmi_disable) machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/taitotz.c b/src/mame/drivers/taitotz.c
index b11f40211df..7a26ac1616d 100644
--- a/src/mame/drivers/taitotz.c
+++ b/src/mame/drivers/taitotz.c
@@ -1821,24 +1821,24 @@ WRITE64_MEMBER(taitotz_state::ppc_common_w)
{
m_io_share_ram[0xfff] = 0x0000;
m_io_share_ram[0xe00] = 0xffff;
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
else if (m_io_share_ram[0xfff] == 0x4004 || m_io_share_ram[0xfff] == 0x4000)
{
m_io_share_ram[0xfff] = 0x0000;
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
else if (m_io_share_ram[0xfff] == 0x7004)
{
// this command seems to turn off interrupts on TLCS...
m_io_share_ram[0xfff] = 0x0000;
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
else
{
// normally just raise INT0 on TLCS and let it handle the command
- cputag_set_input_line(machine(), "iocpu", TLCS900_INT0, ASSERT_LINE);
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine().device("iocpu")->execute().set_input_line(TLCS900_INT0, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
// The PPC always goes to busy loop waiting for TLCS here, so we can free up the timeslice.
// Only do it for HDD access and backup RAM for now...
@@ -1924,10 +1924,10 @@ WRITE8_MEMBER(taitotz_state::tlcs_common_w)
}
#endif
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
- cputag_set_input_line(machine(), "iocpu", TLCS900_INT0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
+ machine().device("iocpu")->execute().set_input_line(TLCS900_INT0, CLEAR_LINE);
- cputag_set_input_line(machine(), "iocpu", TLCS900_INT3, CLEAR_LINE);
+ machine().device("iocpu")->execute().set_input_line(TLCS900_INT3, CLEAR_LINE);
// The PPC is now free to continue running
//machine().scheduler().trigger(PPC_TLCS_COMM_TRIGGER);
@@ -2447,12 +2447,12 @@ static MACHINE_START( taitotz )
static INTERRUPT_GEN( taitotz_vbi )
{
- cputag_set_input_line(device->machine(), "iocpu", TLCS900_INT3, ASSERT_LINE);
+ device->machine().device("iocpu")->execute().set_input_line(TLCS900_INT3, ASSERT_LINE);
}
static void ide_interrupt(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "iocpu", TLCS900_INT2, state);
+ device->machine().device("iocpu")->execute().set_input_line(TLCS900_INT2, state);
}
static const powerpc_config ppc603e_config =
diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c
index 0a9d130f309..9277fa8b255 100644
--- a/src/mame/drivers/taitowlf.c
+++ b/src/mame/drivers/taitowlf.c
@@ -380,7 +380,7 @@ WRITE8_MEMBER(taitowlf_state::at_page8_w)
WRITE_LINE_MEMBER(taitowlf_state::pc_dma_hrq_changed)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_1, state );
@@ -553,7 +553,7 @@ static MACHINE_RESET(taitowlf)
WRITE_LINE_MEMBER(taitowlf_state::taitowlf_pic8259_1_set_int_line)
{
- cputag_set_input_line(machine(), "maincpu", 0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER(taitowlf_state::get_slave_ack)
@@ -663,7 +663,7 @@ MACHINE_CONFIG_END
static void set_gate_a20(running_machine &machine, int a20)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, a20);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_A20, a20);
}
static void keyboard_interrupt(running_machine &machine, int state)
diff --git a/src/mame/drivers/tank8.c b/src/mame/drivers/tank8.c
index e69b9a2b068..70f050196b4 100644
--- a/src/mame/drivers/tank8.c
+++ b/src/mame/drivers/tank8.c
@@ -14,7 +14,7 @@ Atari Tank 8 driver
void tank8_set_collision(running_machine &machine, int index)
{
tank8_state *state = machine.driver_data<tank8_state>();
- cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
state->m_collision_index = index;
}
@@ -42,7 +42,7 @@ WRITE8_MEMBER(tank8_state::tank8_int_reset_w)
{
m_collision_index &= ~0x3f;
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(tank8_state::tank8_crash_w)
diff --git a/src/mame/drivers/tankbatt.c b/src/mame/drivers/tankbatt.c
index eff4df8cf7f..9c7de121c6b 100644
--- a/src/mame/drivers/tankbatt.c
+++ b/src/mame/drivers/tankbatt.c
@@ -139,7 +139,7 @@ WRITE8_MEMBER(tankbatt_state::tankbatt_sh_fire_w)
WRITE8_MEMBER(tankbatt_state::tankbatt_irq_ack_w)
{
/* 0x6e written at the end of the irq routine, could be either irq ack or a coin sample */
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(tankbatt_state::tankbatt_coin_counter_w)
@@ -187,7 +187,7 @@ static INTERRUPT_GEN( tankbatt_interrupt )
INPUT_CHANGED_MEMBER(tankbatt_state::coin_inserted)
{
- cputag_set_input_line(machine(), "maincpu", 0, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
}
static INPUT_PORTS_START( tankbatt )
diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c
index 26ddf7e30cc..b424d05114e 100644
--- a/src/mame/drivers/tankbust.c
+++ b/src/mame/drivers/tankbust.c
@@ -55,7 +55,7 @@ static TIMER_CALLBACK( soundirqline_callback )
//logerror("sound_irq_line write = %2x (after CPUs synced) \n",param);
if ((param & 1) == 0)
- cputag_set_input_line(machine, "sub", 0, HOLD_LINE);
+ machine.device("sub")->execute().set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c
index 1ec8240699b..a8f3c8fbb55 100644
--- a/src/mame/drivers/taotaido.c
+++ b/src/mame/drivers/taotaido.c
@@ -84,7 +84,7 @@ WRITE16_MEMBER(taotaido_state::sound_command_w)
{
m_pending_command = 1;
soundlatch_byte_w(space, offset, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, taotaido_state )
@@ -321,7 +321,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c
index 2bc32d6c7fc..2f94ef45058 100644
--- a/src/mame/drivers/tapatune.c
+++ b/src/mame/drivers/tapatune.c
@@ -115,7 +115,7 @@ WRITE16_MEMBER(tapatune_state::write_to_z80)
// logerror("Command to Z80: %04x\n", data);
m_68k_to_z80_index = data & 0xff;
m_68k_to_z80_data = (data >> 8) & 0xff;
- cputag_set_input_line(machine(), "maincpu", 3, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
break;
case 1:
break;
@@ -124,7 +124,7 @@ WRITE16_MEMBER(tapatune_state::write_to_z80)
READ16_MEMBER(tapatune_state::irq_ack_r)
{
- cputag_set_input_line(machine(), "maincpu", 2, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
return 0;
}
@@ -144,7 +144,7 @@ ADDRESS_MAP_END
READ8_MEMBER(tapatune_state::sound_irq_clear)
{
- cputag_set_input_line(machine(), "soundcpu", 0, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
return 0;
}
@@ -174,7 +174,7 @@ WRITE8_MEMBER(tapatune_state::write_data_to_68k)
{
m_z80_to_68k_data = data;
//logerror("Writing data from Z80: index = %02x, data = %02x\n", m_z80_to_68k_index, m_z80_to_68k_data );
- cputag_set_input_line(machine(), "maincpu", 3, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE);
}
READ8_MEMBER(tapatune_state::read_index_from_68k)
@@ -358,7 +358,7 @@ static VIDEO_START( tapatune )
WRITE_LINE_MEMBER(tapatune_state::crtc_vsync)
{
- cputag_set_input_line(machine(), "maincpu", 2, state ? ASSERT_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(2, state ? ASSERT_LINE : CLEAR_LINE);
}
static const mc6845_interface h46505_intf =
diff --git a/src/mame/drivers/tatsumi.c b/src/mame/drivers/tatsumi.c
index 28c80b0f622..32a7cfe357a 100644
--- a/src/mame/drivers/tatsumi.c
+++ b/src/mame/drivers/tatsumi.c
@@ -200,7 +200,7 @@ READ16_MEMBER(tatsumi_state::cyclwarr_input2_r)
WRITE16_MEMBER(tatsumi_state::cyclwarr_sound_w)
{
soundlatch_byte_w(space, 0, data >> 8);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/***************************************************************************/
@@ -841,7 +841,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
- cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_IRQ0, state);
+ device->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_IRQ0, state);
}
static const ym2151_interface ym2151_config =
@@ -856,12 +856,12 @@ static INTERRUPT_GEN( roundup5_interrupt )
static void apache3_68000_reset(device_t *device)
{
- cputag_set_input_line(device->machine(), "sub2", INPUT_LINE_RESET, PULSE_LINE);
+ device->machine().device("sub2")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
static MACHINE_RESET( apache3 )
{
- cputag_set_input_line(machine, "sub2", INPUT_LINE_RESET, ASSERT_LINE); // TODO
+ machine.device("sub2")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE); // TODO
/* Hook the RESET line, which resets the Z80 */
m68k_set_reset_callback(machine.device("sub"), apache3_68000_reset);
diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c
index 23123c50f1e..f5bb4ea79aa 100644
--- a/src/mame/drivers/tbowl.c
+++ b/src/mame/drivers/tbowl.c
@@ -70,7 +70,7 @@ WRITE8_MEMBER(tbowl_state::shared_w)
WRITE8_MEMBER(tbowl_state::tbowl_sound_command_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -123,7 +123,7 @@ ADDRESS_MAP_END
WRITE8_MEMBER(tbowl_state::tbowl_trigger_nmi)
{
/* trigger NMI on 6206B's Cpu? (guess but seems to work..) */
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( 6206C_map, AS_PROGRAM, 8, tbowl_state )
@@ -421,7 +421,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, linestate);
+ device->machine().device("audiocpu")->execute().set_input_line(0, linestate);
}
static const ym3812_interface ym3812_config =
diff --git a/src/mame/drivers/tecmo.c b/src/mame/drivers/tecmo.c
index 57697be8a89..1e7a68682c3 100644
--- a/src/mame/drivers/tecmo.c
+++ b/src/mame/drivers/tecmo.c
@@ -68,12 +68,12 @@ WRITE8_MEMBER(tecmo_state::tecmo_bankswitch_w)
WRITE8_MEMBER(tecmo_state::tecmo_sound_command_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "soundcpu",INPUT_LINE_NMI,ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI,ASSERT_LINE);
}
WRITE8_MEMBER(tecmo_state::tecmo_nmi_ack_w)
{
- cputag_set_input_line(machine(), "soundcpu",INPUT_LINE_NMI,CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI,CLEAR_LINE);
}
WRITE8_MEMBER(tecmo_state::tecmo_adpcm_start_w)
@@ -606,7 +606,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int linestate)
{
- cputag_set_input_line(device->machine(), "soundcpu", 0, linestate);
+ device->machine().device("soundcpu")->execute().set_input_line(0, linestate);
}
static const ym3812_interface ym3812_config =
diff --git a/src/mame/drivers/tecmo16.c b/src/mame/drivers/tecmo16.c
index 1b12a4a0e80..141b3fb3c43 100644
--- a/src/mame/drivers/tecmo16.c
+++ b/src/mame/drivers/tecmo16.c
@@ -37,7 +37,7 @@ WRITE16_MEMBER(tecmo16_state::tecmo16_sound_command_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0x00, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -363,7 +363,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface ym2151_config =
diff --git a/src/mame/drivers/tecmosys.c b/src/mame/drivers/tecmosys.c
index 707300e2463..17c0ddc40a8 100644
--- a/src/mame/drivers/tecmosys.c
+++ b/src/mame/drivers/tecmosys.c
@@ -208,7 +208,7 @@ WRITE16_MEMBER(tecmosys_state::sound_w)
{
machine().scheduler().synchronize();
soundlatch_byte_w(space, 0x00, data & 0xff);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -439,7 +439,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int irq)
{
/* IRQ */
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ymf262_interface tecmosys_ymf262_interface =
diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c
index 97fce6755cd..312e3ec5a78 100644
--- a/src/mame/drivers/tehkanwc.c
+++ b/src/mame/drivers/tehkanwc.c
@@ -98,9 +98,9 @@ TO DO :
WRITE8_MEMBER(tehkanwc_state::sub_cpu_halt_w)
{
if (data)
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
else
- cputag_set_input_line(machine(), "sub", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("sub")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
@@ -141,12 +141,12 @@ WRITE8_MEMBER(tehkanwc_state::tehkanwc_track_1_reset_w)
WRITE8_MEMBER(tehkanwc_state::sound_command_w)
{
soundlatch_byte_w(space, offset, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static TIMER_CALLBACK( reset_callback )
{
- cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
+ machine.device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
WRITE8_MEMBER(tehkanwc_state::sound_answer_w)
diff --git a/src/mame/drivers/tempest.c b/src/mame/drivers/tempest.c
index 07f43502d47..0681a9152ac 100644
--- a/src/mame/drivers/tempest.c
+++ b/src/mame/drivers/tempest.c
@@ -324,7 +324,7 @@ static MACHINE_START( tempest )
WRITE8_MEMBER(tempest_state::wdclr_w)
{
- cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
machine().watchdog_reset();
}
diff --git a/src/mame/drivers/tetrisp2.c b/src/mame/drivers/tetrisp2.c
index 9eed29ff059..b5fff5af825 100644
--- a/src/mame/drivers/tetrisp2.c
+++ b/src/mame/drivers/tetrisp2.c
@@ -1250,23 +1250,23 @@ GFXDECODE_END
static TIMER_CALLBACK( rockn_timer_level4_callback )
{
- cputag_set_input_line(machine, "maincpu", 4, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, HOLD_LINE);
}
static TIMER_CALLBACK( rockn_timer_sub_level4_callback )
{
- cputag_set_input_line(machine, "sub", 4, HOLD_LINE);
+ machine.device("sub")->execute().set_input_line(4, HOLD_LINE);
}
static TIMER_CALLBACK( rockn_timer_level1_callback )
{
- cputag_set_input_line(machine, "maincpu", 1, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(1, HOLD_LINE);
}
static TIMER_CALLBACK( rockn_timer_sub_level1_callback )
{
- cputag_set_input_line(machine, "sub", 1, HOLD_LINE);
+ machine.device("sub")->execute().set_input_line(1, HOLD_LINE);
}
static void init_rockn_timer(running_machine &machine)
diff --git a/src/mame/drivers/thayers.c b/src/mame/drivers/thayers.c
index 2920cd3d16a..a98ad0ace77 100644
--- a/src/mame/drivers/thayers.c
+++ b/src/mame/drivers/thayers.c
@@ -96,24 +96,24 @@ static void check_interrupt(running_machine &machine)
thayers_state *state = machine.driver_data<thayers_state>();
if (!state->m_timer_int || !state->m_data_rdy_int || !state->m_ssi_data_request)
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ0, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
}
else
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
}
static TIMER_CALLBACK( intrq_tick )
{
- cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
WRITE8_MEMBER(thayers_state::intrq_w)
{
// T = 1.1 * R30 * C53 = 1.1 * 750K * 0.01uF = 8.25 ms
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
machine().scheduler().timer_set(attotime::from_usec(8250), FUNC(intrq_tick));
}
@@ -353,7 +353,7 @@ WRITE8_MEMBER(thayers_state::control2_w)
if ((!BIT(data, 2)) & m_cart_present)
{
- cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, HOLD_LINE);
}
}
diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c
index 9402f4b7ea0..fdbe2b02a92 100644
--- a/src/mame/drivers/thedeep.c
+++ b/src/mame/drivers/thedeep.c
@@ -46,7 +46,7 @@ WRITE8_MEMBER(thedeep_state::thedeep_nmi_w)
WRITE8_MEMBER(thedeep_state::thedeep_sound_w)
{
soundlatch_byte_w(space, 0, data);
- cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
+ machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -394,7 +394,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface thedeep_ym2203_intf =
diff --git a/src/mame/drivers/thunderj.c b/src/mame/drivers/thunderj.c
index 3257128d74f..4a9c80380b5 100644
--- a/src/mame/drivers/thunderj.c
+++ b/src/mame/drivers/thunderj.c
@@ -35,9 +35,9 @@
static void update_interrupts(running_machine &machine)
{
thunderj_state *state = machine.driver_data<thunderj_state>();
- cputag_set_input_line(machine, "maincpu", 4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "extra", 4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
- cputag_set_input_line(machine, "maincpu", 6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("extra")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -88,9 +88,9 @@ WRITE16_MEMBER(thunderj_state::latch_w)
{
/* 0 means hold CPU 2's reset low */
if (data & 1)
- cputag_set_input_line(machine(), "extra", INPUT_LINE_RESET, CLEAR_LINE);
+ machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
else
- cputag_set_input_line(machine(), "extra", INPUT_LINE_RESET, ASSERT_LINE);
+ machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
/* bits 2-5 are the alpha bank */
if (m_alpha_tile_bank != ((data >> 2) & 7))
diff --git a/src/mame/drivers/tickee.c b/src/mame/drivers/tickee.c
index 868479f6577..3f85a782c8b 100644
--- a/src/mame/drivers/tickee.c
+++ b/src/mame/drivers/tickee.c
@@ -93,14 +93,14 @@ static TIMER_CALLBACK( trigger_gun_interrupt )
state->m_gunx[which] = beamx;
/* fire the IRQ at the correct moment */
- cputag_set_input_line(machine, "maincpu", param, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(param, ASSERT_LINE);
}
static TIMER_CALLBACK( clear_gun_interrupt )
{
/* clear the IRQ on the next scanline? */
- cputag_set_input_line(machine, "maincpu", param, CLEAR_LINE);
+ machine.device("