summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2012-09-12 06:07:51 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2012-09-12 06:07:51 +0000
commit17e66e39fd2aeb6e083a8567d281df9235b9f2f4 (patch) (github)
treea34dfe5941829bc939167c207f65b5cf7f57078f
parent0ef1e6deb4923b27f4c1d95825e453f565b129a3 (diff)
downloadmame-17e66e39fd2aeb6e083a8567d281df9235b9f2f4.tar.bz2
mame-17e66e39fd2aeb6e083a8567d281df9235b9f2f4.zip
Clear out remaining global inlines in diexec.h.
-rw-r--r--src/emu/cpu/cp1610/cp1610.c2
-rw-r--r--src/emu/cpu/i386/i386.c2
-rw-r--r--src/emu/cpu/i386/x87ops.c2
-rw-r--r--src/emu/cpu/i86/instr286.c2
-rw-r--r--src/emu/cpu/jaguar/jaguar.c12
-rw-r--r--src/emu/cpu/m37710/m37710.c2
-rw-r--r--src/emu/cpu/m6502/m6502.h2
-rw-r--r--src/emu/cpu/m6502/m6509.h2
-rw-r--r--src/emu/cpu/m68000/m68kcpu.c2
-rw-r--r--src/emu/cpu/mips/mips3com.c2
-rw-r--r--src/emu/cpu/sh4/sh4comn.c4
-rw-r--r--src/emu/cpu/tms34010/34010ops.c2
-rw-r--r--src/emu/cpu/tms34010/tms34010.c6
-rw-r--r--src/emu/cpu/tms7000/tms7000.c2
-rw-r--r--src/emu/diexec.c2
-rw-r--r--src/emu/diexec.h140
-rw-r--r--src/emu/machine/8042kbdc.c2
-rw-r--r--src/emu/machine/k056230.c6
-rw-r--r--src/emu/machine/tmp68301.c6
-rw-r--r--src/emu/sound/scsp.c2
-rw-r--r--src/emu/video/voodoo.c8
-rw-r--r--src/mame/audio/aztarac.c2
-rw-r--r--src/mame/audio/beezer.c6
-rw-r--r--src/mame/audio/cage.c16
-rw-r--r--src/mame/audio/dcs.c30
-rw-r--r--src/mame/audio/decobsmt.c8
-rw-r--r--src/mame/audio/dsbz80.c4
-rw-r--r--src/mame/audio/exidy.c12
-rw-r--r--src/mame/audio/harddriv.c12
-rw-r--r--src/mame/audio/leland.c4
-rw-r--r--src/mame/audio/namco52.c4
-rw-r--r--src/mame/audio/namco54.c4
-rw-r--r--src/mame/audio/scramble.c2
-rw-r--r--src/mame/audio/segasnd.c6
-rw-r--r--src/mame/audio/seibu.c4
-rw-r--r--src/mame/audio/t5182.c4
-rw-r--r--src/mame/audio/taito_en.c6
-rw-r--r--src/mame/audio/taitosnd.c12
-rw-r--r--src/mame/audio/timeplt.c2
-rw-r--r--src/mame/audio/trackfld.c2
-rw-r--r--src/mame/drivers/1942.c2
-rw-r--r--src/mame/drivers/20pacgal.c6
-rw-r--r--src/mame/drivers/2mindril.c10
-rw-r--r--src/mame/drivers/3do.c2
-rw-r--r--src/mame/drivers/40love.c6
-rw-r--r--src/mame/drivers/88games.c4
-rw-r--r--src/mame/drivers/acefruit.c2
-rw-r--r--src/mame/drivers/aces1.c4
-rw-r--r--src/mame/drivers/actfancr.c8
-rw-r--r--src/mame/drivers/adp.c8
-rw-r--r--src/mame/drivers/aeroboto.c2
-rw-r--r--src/mame/drivers/aerofgt.c10
-rw-r--r--src/mame/drivers/airbustr.c8
-rw-r--r--src/mame/drivers/aliens.c8
-rw-r--r--src/mame/drivers/alpha68k.c10
-rw-r--r--src/mame/drivers/amaticmg.c2
-rw-r--r--src/mame/drivers/amspdwy.c6
-rw-r--r--src/mame/drivers/angelkds.c4
-rw-r--r--src/mame/drivers/appoooh.c2
-rw-r--r--src/mame/drivers/aquarium.c6
-rw-r--r--src/mame/drivers/ashnojoe.c6
-rw-r--r--src/mame/drivers/asterix.c12
-rw-r--r--src/mame/drivers/astinvad.c6
-rw-r--r--src/mame/drivers/astrof.c14
-rw-r--r--src/mame/drivers/asuka.c8
-rw-r--r--src/mame/drivers/atarifb.c2
-rw-r--r--src/mame/drivers/avt.c2
-rw-r--r--src/mame/drivers/aztarac.c2
-rw-r--r--src/mame/drivers/backfire.c10
-rw-r--r--src/mame/drivers/bagman.c2
-rw-r--r--src/mame/drivers/bankp.c2
-rw-r--r--src/mame/drivers/battlane.c16
-rw-r--r--src/mame/drivers/battlex.c2
-rw-r--r--src/mame/drivers/battlnts.c6
-rw-r--r--src/mame/drivers/bbusters.c2
-rw-r--r--src/mame/drivers/beaminv.c6
-rw-r--r--src/mame/drivers/beathead.c4
-rw-r--r--src/mame/drivers/beezer.c2
-rw-r--r--src/mame/drivers/bfcobra.c2
-rw-r--r--src/mame/drivers/bfm_sc5.c2
-rw-r--r--src/mame/drivers/bigevglf.c6
-rw-r--r--src/mame/drivers/bingor.c6
-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/blktiger.c8
-rw-r--r--src/mame/drivers/blockade.c4
-rw-r--r--src/mame/drivers/blockhl.c8
-rw-r--r--src/mame/drivers/blockout.c16
-rw-r--r--src/mame/drivers/blueprnt.c4
-rw-r--r--src/mame/drivers/bnstars.c4
-rw-r--r--src/mame/drivers/bombjack.c2
-rw-r--r--src/mame/drivers/boogwing.c2
-rw-r--r--src/mame/drivers/bottom9.c10
-rw-r--r--src/mame/drivers/boxer.c12
-rw-r--r--src/mame/drivers/brkthru.c14
-rw-r--r--src/mame/drivers/btime.c20
-rw-r--r--src/mame/drivers/bublbobl.c6
-rw-r--r--src/mame/drivers/buggychl.c6
-rw-r--r--src/mame/drivers/bwing.c30
-rw-r--r--src/mame/drivers/byvid.c8
-rw-r--r--src/mame/drivers/bzone.c2
-rw-r--r--src/mame/drivers/cabal.c2
-rw-r--r--src/mame/drivers/cabaret.c2
-rw-r--r--src/mame/drivers/calchase.c4
-rw-r--r--src/mame/drivers/capbowl.c10
-rw-r--r--src/mame/drivers/carjmbre.c2
-rw-r--r--src/mame/drivers/cave.c12
-rw-r--r--src/mame/drivers/cball.c4
-rw-r--r--src/mame/drivers/cbuster.c8
-rw-r--r--src/mame/drivers/ccastles.c4
-rw-r--r--src/mame/drivers/cclimber.c2
-rw-r--r--src/mame/drivers/cesclass.c4
-rw-r--r--src/mame/drivers/champbas.c12
-rw-r--r--src/mame/drivers/chanbara.c6
-rw-r--r--src/mame/drivers/cheekyms.c6
-rw-r--r--src/mame/drivers/chihiro.c2
-rw-r--r--src/mame/drivers/chinagat.c18
-rw-r--r--src/mame/drivers/chqflag.c8
-rw-r--r--src/mame/drivers/circus.c2
-rw-r--r--src/mame/drivers/circusc.c4
-rw-r--r--src/mame/drivers/citycon.c4
-rw-r--r--src/mame/drivers/cloud9.c4
-rw-r--r--src/mame/drivers/cmmb.c2
-rw-r--r--src/mame/drivers/cninja.c14
-rw-r--r--src/mame/drivers/cntsteer.c32
-rw-r--r--src/mame/drivers/cobra.c4
-rw-r--r--src/mame/drivers/coinmvga.c2
-rw-r--r--src/mame/drivers/combatsc.c4
-rw-r--r--src/mame/drivers/commando.c4
-rw-r--r--src/mame/drivers/contra.c6
-rw-r--r--src/mame/drivers/coolpool.c8
-rw-r--r--src/mame/drivers/coolridr.c8
-rw-r--r--src/mame/drivers/cop01.c6
-rw-r--r--src/mame/drivers/cps1.c10
-rw-r--r--src/mame/drivers/cps2.c12
-rw-r--r--src/mame/drivers/cps3.c4
-rw-r--r--src/mame/drivers/crbaloon.c2
-rw-r--r--src/mame/drivers/crgolf.c12
-rw-r--r--src/mame/drivers/crimfght.c8
-rw-r--r--src/mame/drivers/crospang.c4
-rw-r--r--src/mame/drivers/crystal.c18
-rw-r--r--src/mame/drivers/csplayh5.c2
-rw-r--r--src/mame/drivers/cubeqst.c2
-rw-r--r--src/mame/drivers/cultures.c2
-rw-r--r--src/mame/drivers/cvs.c12
-rw-r--r--src/mame/drivers/cyclemb.c14
-rw-r--r--src/mame/drivers/dacholer.c8
-rw-r--r--src/mame/drivers/darius.c10
-rw-r--r--src/mame/drivers/dassault.c12
-rw-r--r--src/mame/drivers/dblewing.c14
-rw-r--r--src/mame/drivers/dbz.c8
-rw-r--r--src/mame/drivers/dcheese.c12
-rw-r--r--src/mame/drivers/ddayjlc.c10
-rw-r--r--src/mame/drivers/ddealer.c2
-rw-r--r--src/mame/drivers/ddenlovr.c44
-rw-r--r--src/mame/drivers/ddragon.c32
-rw-r--r--src/mame/drivers/ddragon3.c18
-rw-r--r--src/mame/drivers/ddribble.c4
-rw-r--r--src/mame/drivers/dec8.c50
-rw-r--r--src/mame/drivers/deco156.c2
-rw-r--r--src/mame/drivers/deco32.c6
-rw-r--r--src/mame/drivers/deco_ld.c6
-rw-r--r--src/mame/drivers/deco_mlc.c2
-rw-r--r--src/mame/drivers/deniam.c4
-rw-r--r--src/mame/drivers/deshoros.c6
-rw-r--r--src/mame/drivers/destroyr.c8
-rw-r--r--src/mame/drivers/dfruit.c6
-rw-r--r--src/mame/drivers/dgpix.c2
-rw-r--r--src/mame/drivers/dietgo.c6
-rw-r--r--src/mame/drivers/discoboy.c8
-rw-r--r--src/mame/drivers/diverboy.c6
-rw-r--r--src/mame/drivers/djboy.c12
-rw-r--r--src/mame/drivers/djmain.c2
-rw-r--r--src/mame/drivers/dkong.c12
-rw-r--r--src/mame/drivers/dogfgt.c6
-rw-r--r--src/mame/drivers/drgnmst.c2
-rw-r--r--src/mame/drivers/dribling.c4
-rw-r--r--src/mame/drivers/drmicro.c2
-rw-r--r--src/mame/drivers/dwarfd.c4
-rw-r--r--src/mame/drivers/dynax.c34
-rw-r--r--src/mame/drivers/dynduke.c2
-rw-r--r--src/mame/drivers/egghunt.c6
-rw-r--r--src/mame/drivers/enigma2.c14
-rw-r--r--src/mame/drivers/eolithsp.c4
-rw-r--r--src/mame/drivers/eprom.c2
-rw-r--r--src/mame/drivers/equites.c10
-rw-r--r--src/mame/drivers/esd16.c6
-rw-r--r--src/mame/drivers/esh.c2
-rw-r--r--src/mame/drivers/espial.c6
-rw-r--r--src/mame/drivers/ettrivia.c4
-rw-r--r--src/mame/drivers/exerion.c4
-rw-r--r--src/mame/drivers/exprraid.c16
-rw-r--r--src/mame/drivers/f1gp.c6
-rw-r--r--src/mame/drivers/fantland.c8
-rw-r--r--src/mame/drivers/fastfred.c4
-rw-r--r--src/mame/drivers/fastlane.c4
-rw-r--r--src/mame/drivers/fcombat.c4
-rw-r--r--src/mame/drivers/fcrash.c12
-rw-r--r--src/mame/drivers/fgoal.c10
-rw-r--r--src/mame/drivers/finalizr.c4
-rw-r--r--src/mame/drivers/firebeat.c2
-rw-r--r--src/mame/drivers/firetrap.c16
-rw-r--r--src/mame/drivers/firetrk.c2
-rw-r--r--src/mame/drivers/fitfight.c2
-rw-r--r--src/mame/drivers/flipjack.c8
-rw-r--r--src/mame/drivers/flkatck.c6
-rw-r--r--src/mame/drivers/flstory.c10
-rw-r--r--src/mame/drivers/flyball.c4
-rw-r--r--src/mame/drivers/freekick.c2
-rw-r--r--src/mame/drivers/fromanc2.c14
-rw-r--r--src/mame/drivers/fromance.c4
-rw-r--r--src/mame/drivers/funkball.c6
-rw-r--r--src/mame/drivers/funkyjet.c6
-rw-r--r--src/mame/drivers/funybubl.c4
-rw-r--r--src/mame/drivers/fuukifg2.c16
-rw-r--r--src/mame/drivers/fuukifg3.c12
-rw-r--r--src/mame/drivers/gaelco.c4
-rw-r--r--src/mame/drivers/gaelco3d.c2
-rw-r--r--src/mame/drivers/gaiden.c8
-rw-r--r--src/mame/drivers/galaga.c4
-rw-r--r--src/mame/drivers/galastrm.c2
-rw-r--r--src/mame/drivers/galaxia.c2
-rw-r--r--src/mame/drivers/galaxian.c4
-rw-r--r--src/mame/drivers/galaxold.c2
-rw-r--r--src/mame/drivers/galgame.c6
-rw-r--r--src/mame/drivers/galpani2.c14
-rw-r--r--src/mame/drivers/galpani3.c6
-rw-r--r--src/mame/drivers/galspnbl.c6
-rw-r--r--src/mame/drivers/gamecstl.c2
-rw-r--r--src/mame/drivers/gameplan.c8
-rw-r--r--src/mame/drivers/gbusters.c8
-rw-r--r--src/mame/drivers/gcpinbal.c6
-rw-r--r--src/mame/drivers/gei.c2
-rw-r--r--src/mame/drivers/ghosteo.c4
-rw-r--r--src/mame/drivers/gijoe.c12
-rw-r--r--src/mame/drivers/ginganin.c2
-rw-r--r--src/mame/drivers/glass.c2
-rw-r--r--src/mame/drivers/go2000.c6
-rw-r--r--src/mame/drivers/goal92.c8
-rw-r--r--src/mame/drivers/goldstar.c2
-rw-r--r--src/mame/drivers/goodejan.c2
-rw-r--r--src/mame/drivers/gotcha.c4
-rw-r--r--src/mame/drivers/gottlieb.c2
-rw-r--r--src/mame/drivers/gpworld.c4
-rw-r--r--src/mame/drivers/gradius3.c14
-rw-r--r--src/mame/drivers/grchamp.c4
-rw-r--r--src/mame/drivers/groundfx.c2
-rw-r--r--src/mame/drivers/gsword.c2
-rw-r--r--src/mame/drivers/gticlub.c2
-rw-r--r--src/mame/drivers/gunbustr.c4
-rw-r--r--src/mame/drivers/gunpey.c2
-rw-r--r--src/mame/drivers/gyruss.c10
-rw-r--r--src/mame/drivers/hcastle.c4
-rw-r--r--src/mame/drivers/highvdeo.c2
-rw-r--r--src/mame/drivers/himesiki.c4
-rw-r--r--src/mame/drivers/hitpoker.c2
-rw-r--r--src/mame/drivers/hng64.c4
-rw-r--r--src/mame/drivers/homedata.c10
-rw-r--r--src/mame/drivers/hotblock.c2
-rw-r--r--src/mame/drivers/hvyunit.c14
-rw-r--r--src/mame/drivers/hyperspt.c2
-rw-r--r--src/mame/drivers/hyprduel.c24
-rw-r--r--src/mame/drivers/igs009.c2
-rw-r--r--src/mame/drivers/igs011.c8
-rw-r--r--src/mame/drivers/igs017.c12
-rw-r--r--src/mame/drivers/igspoker.c6
-rw-r--r--src/mame/drivers/ikki.c2
-rw-r--r--src/mame/drivers/imolagp.c10
-rw-r--r--src/mame/drivers/inufuku.c6
-rw-r--r--src/mame/drivers/iqblock.c4
-rw-r--r--src/mame/drivers/ironhors.c16
-rw-r--r--src/mame/drivers/istellar.c2
-rw-r--r--src/mame/drivers/itech32.c2
-rw-r--r--src/mame/drivers/jack.c4
-rw-r--r--src/mame/drivers/jackal.c8
-rw-r--r--src/mame/drivers/jackie.c4
-rw-r--r--src/mame/drivers/jackpool.c2
-rw-r--r--src/mame/drivers/jaguar.c8
-rw-r--r--src/mame/drivers/jailbrek.c4
-rw-r--r--src/mame/drivers/jangou.c10
-rw-r--r--src/mame/drivers/jchan.c10
-rw-r--r--src/mame/drivers/jclub2.c6
-rw-r--r--src/mame/drivers/jollyjgr.c2
-rw-r--r--src/mame/drivers/jrpacman.c4
-rw-r--r--src/mame/drivers/jubilee.c2
-rw-r--r--src/mame/drivers/junofrst.c10
-rw-r--r--src/mame/drivers/kaneko16.c12
-rw-r--r--src/mame/drivers/karnov.c22
-rw-r--r--src/mame/drivers/kas89.c16
-rw-r--r--src/mame/drivers/kchamp.c14
-rw-r--r--src/mame/drivers/kingobox.c8
-rw-r--r--src/mame/drivers/kingpin.c4
-rw-r--r--src/mame/drivers/kinst.c4
-rw-r--r--src/mame/drivers/kncljoe.c8
-rw-r--r--src/mame/drivers/koftball.c6
-rw-r--r--src/mame/drivers/konamigx.c8
-rw-r--r--src/mame/drivers/konamim2.c2
-rw-r--r--src/mame/drivers/kontest.c4
-rw-r--r--src/mame/drivers/kopunch.c10
-rw-r--r--src/mame/drivers/kungfur.c2
-rw-r--r--src/mame/drivers/kyugo.c8
-rw-r--r--src/mame/drivers/labyrunr.c4
-rw-r--r--src/mame/drivers/ladybug.c8
-rw-r--r--src/mame/drivers/ladyfrog.c8
-rw-r--r--src/mame/drivers/laserbat.c6
-rw-r--r--src/mame/drivers/lasso.c10
-rw-r--r--src/mame/drivers/lastbank.c4
-rw-r--r--src/mame/drivers/lastduel.c6
-rw-r--r--src/mame/drivers/lastfght.c2
-rw-r--r--src/mame/drivers/lazercmd.c2
-rw-r--r--src/mame/drivers/lemmings.c8
-rw-r--r--src/mame/drivers/lethal.c10
-rw-r--r--src/mame/drivers/lgp.c4
-rw-r--r--src/mame/drivers/liberate.c16
-rw-r--r--src/mame/drivers/littlerb.c2
-rw-r--r--src/mame/drivers/lkage.c10
-rw-r--r--src/mame/drivers/lockon.c16
-rw-r--r--src/mame/drivers/looping.c2
-rw-r--r--src/mame/drivers/lsasquad.c6
-rw-r--r--src/mame/drivers/lucky74.c2
-rw-r--r--src/mame/drivers/lwings.c4
-rw-r--r--src/mame/drivers/m10.c20
-rw-r--r--src/mame/drivers/m14.c12
-rw-r--r--src/mame/drivers/m63.c10
-rw-r--r--src/mame/drivers/m72.c2
-rw-r--r--src/mame/drivers/m79amb.c2
-rw-r--r--src/mame/drivers/m90.c4
-rw-r--r--src/mame/drivers/m92.c18
-rw-r--r--src/mame/drivers/macrossp.c14
-rw-r--r--src/mame/drivers/madmotor.c8
-rw-r--r--src/mame/drivers/magicard.c4
-rw-r--r--src/mame/drivers/magictg.c2
-rw-r--r--src/mame/drivers/magtouch.c2
-rw-r--r--src/mame/drivers/mainevt.c10
-rw-r--r--src/mame/drivers/marineb.c6
-rw-r--r--src/mame/drivers/mario.c2
-rw-r--r--src/mame/drivers/mastboy.c2
-rw-r--r--src/mame/drivers/matmania.c8
-rw-r--r--src/mame/drivers/mayumi.c2
-rw-r--r--src/mame/drivers/mazerbla.c22
-rw-r--r--src/mame/drivers/mcatadv.c8
-rw-r--r--src/mame/drivers/mcr68.c2
-rw-r--r--src/mame/drivers/meadows.c6
-rw-r--r--src/mame/drivers/mediagx.c6
-rw-r--r--src/mame/drivers/megaplay.c4
-rw-r--r--src/mame/drivers/megasys1.c2
-rw-r--r--src/mame/drivers/megazone.c6
-rw-r--r--src/mame/drivers/meijinsn.c4
-rw-r--r--src/mame/drivers/mermaid.c4
-rw-r--r--src/mame/drivers/metalmx.c8
-rw-r--r--src/mame/drivers/metlclsh.c14
-rw-r--r--src/mame/drivers/metro.c20
-rw-r--r--src/mame/drivers/mexico86.c6
-rw-r--r--src/mame/drivers/mgolf.c6
-rw-r--r--src/mame/drivers/midqslvr.c6
-rw-r--r--src/mame/drivers/midvunit.c2
-rw-r--r--src/mame/drivers/midzeus.c2
-rw-r--r--src/mame/drivers/mikie.c4
-rw-r--r--src/mame/drivers/mirax.c2
-rw-r--r--src/mame/drivers/missb2.c6
-rw-r--r--src/mame/drivers/missile.c10
-rw-r--r--src/mame/drivers/mitchell.c6
-rw-r--r--src/mame/drivers/mjkjidai.c2
-rw-r--r--src/mame/drivers/mjsister.c4
-rw-r--r--src/mame/drivers/model1.c6
-rw-r--r--src/mame/drivers/model2.c26
-rw-r--r--src/mame/drivers/mogura.c4
-rw-r--r--src/mame/drivers/moo.c12
-rw-r--r--src/mame/drivers/mouser.c12
-rw-r--r--src/mame/drivers/mrflea.c8
-rw-r--r--src/mame/drivers/ms32.c6
-rw-r--r--src/mame/drivers/msisaac.c6
-rw-r--r--src/mame/drivers/mugsmash.c8
-rw-r--r--src/mame/drivers/munchmo.c14
-rw-r--r--src/mame/drivers/mustache.c2
-rw-r--r--src/mame/drivers/mystwarr.c18
-rw-r--r--src/mame/drivers/n8080.c8
-rw-r--r--src/mame/drivers/namcofl.c8
-rw-r--r--src/mame/drivers/namcona1.c8
-rw-r--r--src/mame/drivers/namconb1.c6
-rw-r--r--src/mame/drivers/namcos1.c4
-rw-r--r--src/mame/drivers/namcos11.c8
-rw-r--r--src/mame/drivers/namcos21.c2
-rw-r--r--src/mame/drivers/namcos22.c72
-rw-r--r--src/mame/drivers/namcos23.c4
-rw-r--r--src/mame/drivers/nemesis.c16
-rw-r--r--src/mame/drivers/neogeo.c10
-rw-r--r--src/mame/drivers/nightgal.c16
-rw-r--r--src/mame/drivers/ninjakd2.c2
-rw-r--r--src/mame/drivers/ninjaw.c10
-rw-r--r--src/mame/drivers/niyanpai.c2
-rw-r--r--src/mame/drivers/nmg5.c12
-rw-r--r--src/mame/drivers/nsmpoker.c2
-rw-r--r--src/mame/drivers/nss.c14
-rw-r--r--src/mame/drivers/nycaptor.c14
-rw-r--r--src/mame/drivers/nyny.c20
-rw-r--r--src/mame/drivers/ojankohs.c4
-rw-r--r--src/mame/drivers/oneshot.c6
-rw-r--r--src/mame/drivers/onetwo.c12
-rw-r--r--src/mame/drivers/opwolf.c2
-rw-r--r--src/mame/drivers/orbit.c8
-rw-r--r--src/mame/drivers/othello.c8
-rw-r--r--src/mame/drivers/othunder.c10
-rw-r--r--src/mame/drivers/overdriv.c16
-rw-r--r--src/mame/drivers/pacman.c14
-rw-r--r--src/mame/drivers/pandoras.c20
-rw-r--r--src/mame/drivers/pangofun.c2
-rw-r--r--src/mame/drivers/parodius.c14
-rw-r--r--src/mame/drivers/pasha2.c2
-rw-r--r--src/mame/drivers/pastelg.c2
-rw-r--r--src/mame/drivers/pbaction.c10
-rw-r--r--src/mame/drivers/pcat_dyn.c2
-rw-r--r--src/mame/drivers/pcat_nit.c2
-rw-r--r--src/mame/drivers/pcxt.c2
-rw-r--r--src/mame/drivers/pengo.c2
-rw-r--r--src/mame/drivers/pgm.c14
-rw-r--r--src/mame/drivers/photon.c4
-rw-r--r--src/mame/drivers/photon2.c4
-rw-r--r--src/mame/drivers/photoply.c2
-rw-r--r--src/mame/drivers/pingpong.c8
-rw-r--r--src/mame/drivers/pipedrm.c8
-rw-r--r--src/mame/drivers/pitnrun.c2
-rw-r--r--src/mame/drivers/pktgaldx.c2
-rw-r--r--src/mame/drivers/playch10.c4
-rw-r--r--src/mame/drivers/playmark.c2
-rw-r--r--src/mame/drivers/plygonet.c4
-rw-r--r--src/mame/drivers/pntnpuzl.c6
-rw-r--r--src/mame/drivers/polepos.c6
-rw-r--r--src/mame/drivers/policetr.c4
-rw-r--r--src/mame/drivers/polyplay.c4
-rw-r--r--src/mame/drivers/pooyan.c4
-rw-r--r--src/mame/drivers/popeye.c2
-rw-r--r--src/mame/drivers/popobear.c8
-rw-r--r--src/mame/drivers/popper.c6
-rw-r--r--src/mame/drivers/psikyo.c10
-rw-r--r--src/mame/drivers/psikyo4.c6
-rw-r--r--src/mame/drivers/psikyosh.c8
-rw-r--r--src/mame/drivers/pturn.c4
-rw-r--r--src/mame/drivers/punchout.c2
-rw-r--r--src/mame/drivers/pushman.c10
-rw-r--r--src/mame/drivers/qdrmfgp.c6
-rw-r--r--src/mame/drivers/quakeat.c2
-rw-r--r--src/mame/drivers/quasar.c2
-rw-r--r--src/mame/drivers/queen.c6
-rw-r--r--src/mame/drivers/r2dx_v33.c2
-rw-r--r--src/mame/drivers/raiden.c6
-rw-r--r--src/mame/drivers/raiden2.c2
-rw-r--r--src/mame/drivers/rainbow.c8
-rw-r--r--src/mame/drivers/rallyx.c10
-rw-r--r--src/mame/drivers/rastan.c6
-rw-r--r--src/mame/drivers/redalert.c4
-rw-r--r--src/mame/drivers/redclash.c8
-rw-r--r--src/mame/drivers/renegade.c4
-rw-r--r--src/mame/drivers/retofinv.c4
-rw-r--r--src/mame/drivers/rltennis.c6
-rw-r--r--src/mame/drivers/rockrage.c6
-rw-r--r--src/mame/drivers/rocnrope.c2
-rw-r--r--src/mame/drivers/rohga.c6
-rw-r--r--src/mame/drivers/rollerg.c10
-rw-r--r--src/mame/drivers/rollrace.c4
-rw-r--r--src/mame/drivers/rotaryf.c6
-rw-r--r--src/mame/drivers/route16.c2
-rw-r--r--src/mame/drivers/royalmah.c12
-rw-r--r--src/mame/drivers/rungun.c14
-rw-r--r--src/mame/drivers/sandscrp.c2
-rw-r--r--src/mame/drivers/saturn.c36
-rw-r--r--src/mame/drivers/sauro.c2
-rw-r--r--src/mame/drivers/savquest.c6
-rw-r--r--src/mame/drivers/sbasketb.c4
-rw-r--r--src/mame/drivers/sbowling.c4
-rw-r--r--src/mame/drivers/scotrsht.c2
-rw-r--r--src/mame/drivers/scregg.c8
-rw-r--r--src/mame/drivers/seattle.c10
-rw-r--r--src/mame/drivers/seibuspi.c50
-rw-r--r--src/mame/drivers/seicross.c2
-rw-r--r--src/mame/drivers/sengokmj.c2
-rw-r--r--src/mame/drivers/senjyo.c2
-rw-r--r--src/mame/drivers/seta.c42
-rw-r--r--src/mame/drivers/seta2.c8
-rw-r--r--src/mame/drivers/sf.c8
-rw-r--r--src/mame/drivers/sfcbox.c8
-rw-r--r--src/mame/drivers/shanghai.c2
-rw-r--r--src/mame/drivers/shaolins.c4
-rw-r--r--src/mame/drivers/sigmab98.c8
-rw-r--r--src/mame/drivers/silvmil.c2
-rw-r--r--src/mame/drivers/simpl156.c12
-rw-r--r--src/mame/drivers/simpsons.c10
-rw-r--r--src/mame/drivers/skimaxx.c4
-rw-r--r--src/mame/drivers/skyarmy.c2
-rw-r--r--src/mame/drivers/skydiver.c2
-rw-r--r--src/mame/drivers/skyfox.c4
-rw-r--r--src/mame/drivers/skykid.c4
-rw-r--r--src/mame/drivers/skylncr.c2
-rw-r--r--src/mame/drivers/slapfght.c2
-rw-r--r--src/mame/drivers/slapshot.c12
-rw-r--r--src/mame/drivers/sliver.c2
-rw-r--r--src/mame/drivers/snk6502.c4
-rw-r--r--src/mame/drivers/snowbros.c12
-rw-r--r--src/mame/drivers/solomon.c2
-rw-r--r--src/mame/drivers/sonson.c4
-rw-r--r--src/mame/drivers/spcforce.c2
-rw-r--r--src/mame/drivers/splash.c8
-rw-r--r--src/mame/drivers/spoker.c2
-rw-r--r--src/mame/drivers/sprcros2.c6
-rw-r--r--src/mame/drivers/sprint2.c2
-rw-r--r--src/mame/drivers/spy.c12
-rw-r--r--src/mame/drivers/srumbler.c4
-rw-r--r--src/mame/drivers/ssfindo.c8
-rw-r--r--src/mame/drivers/ssozumo.c2
-rw-r--r--src/mame/drivers/ssv.c2
-rw-r--r--src/mame/drivers/st0016.c4
-rw-r--r--src/mame/drivers/stactics.c2
-rw-r--r--src/mame/drivers/statriv2.c4
-rw-r--r--src/mame/drivers/strnskil.c2
-rw-r--r--src/mame/drivers/su2000.c2
-rw-r--r--src/mame/drivers/subsino2.c2
-rw-r--r--src/mame/drivers/suna16.c4
-rw-r--r--src/mame/drivers/suna8.c8
-rw-r--r--src/mame/drivers/supbtime.c8
-rw-r--r--src/mame/drivers/superchs.c4
-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/superwng.c8
-rw-r--r--src/mame/drivers/suprloco.c2
-rw-r--r--src/mame/drivers/suprnova.c36
-rw-r--r--src/mame/drivers/suprridr.c2
-rw-r--r--src/mame/drivers/suprslam.c6
-rw-r--r--src/mame/drivers/surpratk.c6
-rw-r--r--src/mame/drivers/system1.c12
-rw-r--r--src/mame/drivers/system16.c18
-rw-r--r--src/mame/drivers/tagteam.c2
-rw-r--r--src/mame/drivers/tail2nos.c8
-rw-r--r--src/mame/drivers/taito_b.c52
-rw-r--r--src/mame/drivers/taito_f2.c14
-rw-r--r--src/mame/drivers/taito_f3.c2
-rw-r--r--src/mame/drivers/taito_h.c4
-rw-r--r--src/mame/drivers/taito_l.c18
-rw-r--r--src/mame/drivers/taito_o.c6
-rw-r--r--src/mame/drivers/taito_z.c18
-rw-r--r--src/mame/drivers/taitoair.c6
-rw-r--r--src/mame/drivers/taitojc.c16
-rw-r--r--src/mame/drivers/taitotz.c12
-rw-r--r--src/mame/drivers/taitowlf.c2
-rw-r--r--src/mame/drivers/tankbatt.c2
-rw-r--r--src/mame/drivers/tankbust.c2
-rw-r--r--src/mame/drivers/targeth.c6
-rw-r--r--src/mame/drivers/tasman.c4
-rw-r--r--src/mame/drivers/tatsumi.c2
-rw-r--r--src/mame/drivers/tceptor.c6
-rw-r--r--src/mame/drivers/tetrisp2.c2
-rw-r--r--src/mame/drivers/thedeep.c14
-rw-r--r--src/mame/drivers/thepit.c2
-rw-r--r--src/mame/drivers/thief.c4
-rw-r--r--src/mame/drivers/thunderx.c10
-rw-r--r--src/mame/drivers/timelimt.c2
-rw-r--r--src/mame/drivers/timeplt.c4
-rw-r--r--src/mame/drivers/timetrv.c4
-rw-r--r--src/mame/drivers/tmaster.c4
-rw-r--r--src/mame/drivers/tmnt.c24
-rw-r--r--src/mame/drivers/tmspoker.c2
-rw-r--r--src/mame/drivers/tnzs.c4
-rw-r--r--src/mame/drivers/toaplan2.c24
-rw-r--r--src/mame/drivers/tomcat.c4
-rw-r--r--src/mame/drivers/topspeed.c18
-rw-r--r--src/mame/drivers/toratora.c6
-rw-r--r--src/mame/drivers/toypop.c6
-rw-r--r--src/mame/drivers/tp84.c2
-rw-r--r--src/mame/drivers/trackfld.c6
-rw-r--r--src/mame/drivers/trucocl.c2
-rw-r--r--src/mame/drivers/trvquest.c4
-rw-r--r--src/mame/drivers/tsamurai.c4
-rw-r--r--src/mame/drivers/ttchamp.c2
-rw-r--r--src/mame/drivers/tumbleb.c12
-rw-r--r--src/mame/drivers/tumblep.c8
-rw-r--r--src/mame/drivers/turbo.c2
-rw-r--r--src/mame/drivers/tutankhm.c4
-rw-r--r--src/mame/drivers/twin16.c4
-rw-r--r--src/mame/drivers/twinkle.c8
-rw-r--r--src/mame/drivers/tx1.c2
-rw-r--r--src/mame/drivers/ultraman.c6
-rw-r--r--src/mame/drivers/ultrsprt.c2
-rw-r--r--src/mame/drivers/undrfire.c2
-rw-r--r--src/mame/drivers/unkhorse.c4
-rw-r--r--src/mame/drivers/vamphalf.c70
-rw-r--r--src/mame/drivers/vaportra.c10
-rw-r--r--src/mame/drivers/vastar.c2
-rw-r--r--src/mame/drivers/vcombat.c8
-rw-r--r--src/mame/drivers/vegas.c2
-rw-r--r--src/mame/drivers/vendetta.c14
-rw-r--r--src/mame/drivers/volfied.c6
-rw-r--r--src/mame/drivers/voyager.c2
-rw-r--r--src/mame/drivers/vulgus.c2
-rw-r--r--src/mame/drivers/warpwarp.c2
-rw-r--r--src/mame/drivers/warriorb.c6
-rw-r--r--src/mame/drivers/wgp.c18
-rw-r--r--src/mame/drivers/wheelfir.c8
-rw-r--r--src/mame/drivers/whitestar.c10
-rw-r--r--src/mame/drivers/wiping.c4
-rw-r--r--src/mame/drivers/witch.c6
-rw-r--r--src/mame/drivers/wiz.c4
-rw-r--r--src/mame/drivers/xexex.c14
-rw-r--r--src/mame/drivers/xmen.c6
-rw-r--r--src/mame/drivers/xtom3d.c6
-rw-r--r--src/mame/drivers/xxmissio.c4
-rw-r--r--src/mame/drivers/yiear.c4
-rw-r--r--src/mame/drivers/yunsun16.c6
-rw-r--r--src/mame/drivers/yunsung8.c4
-rw-r--r--src/mame/drivers/zac_1.c6
-rw-r--r--src/mame/drivers/zaccaria.c2
-rw-r--r--src/mame/drivers/zaxxon.c2
-rw-r--r--src/mame/drivers/zerozone.c2
-rw-r--r--src/mame/drivers/zn.c2
-rw-r--r--src/mame/drivers/zodiack.c2
-rw-r--r--src/mame/drivers/zr107.c2
-rw-r--r--src/mame/includes/1942.h2
-rw-r--r--src/mame/includes/20pacgal.h2
-rw-r--r--src/mame/includes/40love.h2
-rw-r--r--src/mame/includes/88games.h2
-rw-r--r--src/mame/includes/actfancr.h4
-rw-r--r--src/mame/includes/aerofgt.h2
-rw-r--r--src/mame/includes/airbustr.h2
-rw-r--r--src/mame/includes/ajax.h6
-rw-r--r--src/mame/includes/aliens.h4
-rw-r--r--src/mame/includes/alpha68k.h2
-rw-r--r--src/mame/includes/amspdwy.h2
-rw-r--r--src/mame/includes/angelkds.h2
-rw-r--r--src/mame/includes/aquarium.h2
-rw-r--r--src/mame/includes/ashnojoe.h2
-rw-r--r--src/mame/includes/asterix.h4
-rw-r--r--src/mame/includes/astrof.h2
-rw-r--r--src/mame/includes/asuka.h4
-rw-r--r--src/mame/includes/atarifb.h2
-rw-r--r--src/mame/includes/battlane.h4
-rw-r--r--src/mame/includes/battlnts.h2
-rw-r--r--src/mame/includes/beezer.h2
-rw-r--r--src/mame/includes/bigevglf.h2
-rw-r--r--src/mame/includes/bishi.h4
-rw-r--r--src/mame/includes/bking.h2
-rw-r--r--src/mame/includes/bladestl.h2
-rw-r--r--src/mame/includes/blktiger.h2
-rw-r--r--src/mame/includes/blockhl.h4
-rw-r--r--src/mame/includes/blockout.h4
-rw-r--r--src/mame/includes/blueprnt.h2
-rw-r--r--src/mame/includes/bottom9.h4
-rw-r--r--src/mame/includes/brkthru.h4
-rw-r--r--src/mame/includes/btime.h4
-rw-r--r--src/mame/includes/bublbobl.h4
-rw-r--r--src/mame/includes/buggychl.h2
-rw-r--r--src/mame/includes/bwing.h6
-rw-r--r--src/mame/includes/capbowl.h4
-rw-r--r--src/mame/includes/cave.h4
-rw-r--r--src/mame/includes/cbuster.h4
-rw-r--r--src/mame/includes/champbas.h4
-rw-r--r--src/mame/includes/cheekyms.h2
-rw-r--r--src/mame/includes/chqflag.h4
-rw-r--r--src/mame/includes/circus.h2
-rw-r--r--src/mame/includes/citycon.h2
-rw-r--r--src/mame/includes/commando.h2
-rw-r--r--src/mame/includes/contra.h2
-rw-r--r--src/mame/includes/coolpool.h2
-rw-r--r--src/mame/includes/cps1.h4
-rw-r--r--src/mame/includes/crgolf.h4
-rw-r--r--src/mame/includes/crimfght.h4
-rw-r--r--src/mame/includes/crospang.h2
-rw-r--r--src/mame/includes/cvs.h4
-rw-r--r--src/mame/includes/darius.h4
-rw-r--r--src/mame/includes/dbz.h4
-rw-r--r--src/mame/includes/dcheese.h4
-rw-r--r--src/mame/includes/ddragon.h2
-rw-r--r--src/mame/includes/ddragon3.h4
-rw-r--r--src/mame/includes/dec8.h6
-rw-r--r--src/mame/includes/dietgo.h4
-rw-r--r--src/mame/includes/djboy.h2
-rw-r--r--src/mame/includes/dogfgt.h2
-rw-r--r--src/mame/includes/dynax.h4
-rw-r--r--src/mame/includes/espial.h4
-rw-r--r--src/mame/includes/exerion.h2
-rw-r--r--src/mame/includes/exprraid.h2
-rw-r--r--src/mame/includes/f1gp.h2
-rw-r--r--src/mame/includes/fcombat.h2
-rw-r--r--src/mame/includes/fgoal.h2
-rw-r--r--src/mame/includes/firetrap.h4
-rw-r--r--src/mame/includes/flkatck.h2
-rw-r--r--src/mame/includes/flstory.h4
-rw-r--r--src/mame/includes/fromanc2.h4
-rw-r--r--src/mame/includes/fromance.h2
-rw-r--r--src/mame/includes/funkyjet.h4
-rw-r--r--src/mame/includes/funybubl.h2
-rw-r--r--src/mame/includes/fuukifg2.h4
-rw-r--r--src/mame/includes/fuukifg3.h4
-rw-r--r--src/mame/includes/gaelco.h2
-rw-r--r--src/mame/includes/gaiden.h2
-rw-r--r--src/mame/includes/galspnbl.h2
-rw-r--r--src/mame/includes/gameplan.h4
-rw-r--r--src/mame/includes/gbusters.h4
-rw-r--r--src/mame/includes/gijoe.h4
-rw-r--r--src/mame/includes/ginganin.h2
-rw-r--r--src/mame/includes/goal92.h2
-rw-r--r--src/mame/includes/gotcha.h2
-rw-r--r--src/mame/includes/gradius3.h6
-rw-r--r--src/mame/includes/hcastle.h2
-rw-r--r--src/mame/includes/himesiki.h2
-rw-r--r--src/mame/includes/homedata.h4
-rw-r--r--src/mame/includes/hyprduel.h4
-rw-r--r--src/mame/includes/inufuku.h2
-rw-r--r--src/mame/includes/ironhors.h4
-rw-r--r--src/mame/includes/jackal.h4
-rw-r--r--src/mame/includes/karnov.h4
-rw-r--r--src/mame/includes/kchamp.h2
-rw-r--r--src/mame/includes/kncljoe.h2
-rw-r--r--src/mame/includes/kopunch.h2
-rw-r--r--src/mame/includes/kyugo.h4
-rw-r--r--src/mame/includes/ladybug.h2
-rw-r--r--src/mame/includes/ladyfrog.h2
-rw-r--r--src/mame/includes/lasso.h4
-rw-r--r--src/mame/includes/lemmings.h2
-rw-r--r--src/mame/includes/lethal.h4
-rw-r--r--src/mame/includes/liberate.h4
-rw-r--r--src/mame/includes/lkage.h4
-rw-r--r--src/mame/includes/lockon.h4
-rw-r--r--src/mame/includes/lsasquad.h4
-rw-r--r--src/mame/includes/m10.h2
-rw-r--r--src/mame/includes/macrossp.h4
-rw-r--r--src/mame/includes/madmotor.h4
-rw-r--r--src/mame/includes/mainevt.h4
-rw-r--r--src/mame/includes/marineb.h4
-rw-r--r--src/mame/includes/matmania.h4
-rw-r--r--src/mame/includes/mcatadv.h4
-rw-r--r--src/mame/includes/mermaid.h2
-rw-r--r--src/mame/includes/metlclsh.h4
-rw-r--r--src/mame/includes/mexico86.h6
-rw-r--r--src/mame/includes/moo.h4
-rw-r--r--src/mame/includes/mouser.h4
-rw-r--r--src/mame/includes/mrflea.h4
-rw-r--r--src/mame/includes/msisaac.h2
-rw-r--r--src/mame/includes/mugsmash.h4
-rw-r--r--src/mame/includes/munchmo.h4
-rw-r--r--src/mame/includes/n8080.h2
-rw-r--r--src/mame/includes/neogeo.h4
-rw-r--r--src/mame/includes/ninjaw.h6
-rw-r--r--src/mame/includes/nitedrvr.h2
-rw-r--r--src/mame/includes/nycaptor.h6
-rw-r--r--src/mame/includes/ojankohs.h2
-rw-r--r--src/mame/includes/oneshot.h4
-rw-r--r--src/mame/includes/orbit.h2
-rw-r--r--src/mame/includes/othunder.h4
-rw-r--r--src/mame/includes/overdriv.h6
-rw-r--r--src/mame/includes/parodius.h4
-rw-r--r--src/mame/includes/pbaction.h4
-rw-r--r--src/mame/includes/pktgaldx.h2
-rw-r--r--src/mame/includes/popper.h2
-rw-r--r--src/mame/includes/psikyo.h2
-rw-r--r--src/mame/includes/psikyo4.h2
-rw-r--r--src/mame/includes/psikyosh.h2
-rw-r--r--src/mame/includes/pushman.h4
-rw-r--r--src/mame/includes/rainbow.h4
-rw-r--r--src/mame/includes/rastan.h4
-rw-r--r--src/mame/includes/rltennis.h2
-rw-r--r--src/mame/includes/rockrage.h2
-rw-r--r--src/mame/includes/rollerg.h4
-rw-r--r--src/mame/includes/rungun.h4
-rw-r--r--src/mame/includes/sf.h4
-rw-r--r--src/mame/includes/simpsons.h4
-rw-r--r--src/mame/includes/skyfox.h2
-rw-r--r--src/mame/includes/slapshot.h4
-rw-r--r--src/mame/includes/sonson.h2
-rw-r--r--src/mame/includes/spy.h4
-rw-r--r--src/mame/includes/supbtime.h4
-rw-r--r--src/mame/includes/suprslam.h2
-rw-r--r--src/mame/includes/surpratk.h2
-rw-r--r--src/mame/includes/system16.h4
-rw-r--r--src/mame/includes/tail2nos.h4
-rw-r--r--src/mame/includes/taito_b.h4
-rw-r--r--src/mame/includes/taito_f2.h4
-rw-r--r--src/mame/includes/taito_h.h4
-rw-r--r--src/mame/includes/taito_l.h4
-rw-r--r--src/mame/includes/taito_o.h2
-rw-r--r--src/mame/includes/taito_z.h6
-rw-r--r--src/mame/includes/taitoair.h2
-rw-r--r--src/mame/includes/thunderx.h4
-rw-r--r--src/mame/includes/tmnt.h4
-rw-r--r--src/mame/includes/tnzs.h4
-rw-r--r--src/mame/includes/topspeed.h6
-rw-r--r--src/mame/includes/tumbleb.h4
-rw-r--r--src/mame/includes/tumblep.h4
-rw-r--r--src/mame/includes/ultraman.h4
-rw-r--r--src/mame/includes/vaportra.h4
-rw-r--r--src/mame/includes/vendetta.h4
-rw-r--r--src/mame/includes/volfied.h4
-rw-r--r--src/mame/includes/warriorb.h4
-rw-r--r--src/mame/includes/wgp.h6
-rw-r--r--src/mame/includes/xexex.h4
-rw-r--r--src/mame/includes/xmen.h4
-rw-r--r--src/mame/includes/yunsun16.h2
-rw-r--r--src/mame/includes/yunsung8.h2
-rw-r--r--src/mame/machine/ajax.c12
-rw-r--r--src/mame/machine/amiga.c2
-rw-r--r--src/mame/machine/asic65.c8
-rw-r--r--src/mame/machine/asteroid.c6
-rw-r--r--src/mame/machine/atarigen.c16
-rw-r--r--src/mame/machine/bigevglf.c4
-rw-r--r--src/mame/machine/bublbobl.c22
-rw-r--r--src/mame/machine/buggychl.c4
-rw-r--r--src/mame/machine/cdi070.c6
-rw-r--r--src/mame/machine/cdicdic.c12
-rw-r--r--src/mame/machine/cdislave.c2
-rw-r--r--src/mame/machine/dec0.c2
-rw-r--r--src/mame/machine/decocass.c22
-rw-r--r--src/mame/machine/decocass.h4
-rw-r--r--src/mame/machine/docastle.c4
-rw-r--r--src/mame/machine/fd1094.c2
-rw-r--r--src/mame/machine/flstory.c4
-rw-r--r--src/mame/machine/gaelco2.c4
-rw-r--r--src/mame/machine/galaxold.c6
-rw-r--r--src/mame/machine/harddriv.c82
-rw-r--r--src/mame/machine/konppc.c8
-rw-r--r--src/mame/machine/leland.c2
-rw-r--r--src/mame/machine/lkage.c4
-rw-r--r--src/mame/machine/lsasquad.c8
-rw-r--r--src/mame/machine/mega32x.c40
-rw-r--r--src/mame/machine/megacd.c6
-rw-r--r--src/mame/machine/megadriv.c6
-rw-r--r--src/mame/machine/megasvp.c2
-rw-r--r--src/mame/machine/megavdp.c2
-rw-r--r--src/mame/machine/mexico86.c16
-rw-r--r--src/mame/machine/midwunit.c2
-rw-r--r--src/mame/machine/model1.c4
-rw-r--r--src/mame/machine/mw8080bw.c2
-rw-r--r--src/mame/machine/n64.c12
-rw-r--r--src/mame/machine/namco06.c2
-rw-r--r--src/mame/machine/namco50.c4
-rw-r--r--src/mame/machine/namco53.c4
-rw-r--r--src/mame/machine/namcos2.c26
-rw-r--r--src/mame/machine/naomi.c22
-rw-r--r--src/mame/machine/nb1413m3.c2
-rw-r--r--src/mame/machine/nitedrvr.c2
-rw-r--r--src/mame/machine/nycaptor.c4
-rw-r--r--src/mame/machine/pgmprot2.c10
-rw-r--r--src/mame/machine/pgmprot3.c6
-rw-r--r--src/mame/machine/playch10.c2
-rw-r--r--src/mame/machine/scudsp.c2
-rw-r--r--src/mame/machine/simpsons.c6
-rw-r--r--src/mame/machine/slapfght.c2
-rw-r--r--src/mame/machine/smpc.c22
-rw-r--r--src/mame/machine/snes.c16
-rw-r--r--src/mame/machine/stfight.c2
-rw-r--r--src/mame/machine/subs.c2
-rw-r--r--src/mame/machine/tnzs.c14
-rw-r--r--src/mame/machine/toaplan1.c4
-rw-r--r--src/mame/machine/twincobr.c4
-rw-r--r--src/mame/machine/vsnes.c2
-rw-r--r--src/mame/machine/xevious.c2
-rw-r--r--src/mame/video/1942.c2
-rw-r--r--src/mame/video/antic.c4
-rw-r--r--src/mame/video/arkanoid.c2
-rw-r--r--src/mame/video/astrocde.c2
-rw-r--r--src/mame/video/atari.c2
-rw-r--r--src/mame/video/battlera.c4
-rw-r--r--src/mame/video/beezer.c4
-rw-r--r--src/mame/video/bfm_adr2.c2
-rw-r--r--src/mame/video/bfm_dm01.c2
-rw-r--r--src/mame/video/blktiger.c2
-rw-r--r--src/mame/video/blockade.c2
-rw-r--r--src/mame/video/capbowl.c2
-rw-r--r--src/mame/video/circus.c2
-rw-r--r--src/mame/video/commando.c2
-rw-r--r--src/mame/video/dec8.c4
-rw-r--r--src/mame/video/decocass.c2
-rw-r--r--src/mame/video/exidy.c2
-rw-r--r--src/mame/video/fromance.c2
-rw-r--r--src/mame/video/gameplan.c2
-rw-r--r--src/mame/video/ginganin.c2
-rw-r--r--src/mame/video/gticlub.c4
-rw-r--r--src/mame/video/homedata.c6
-rw-r--r--src/mame/video/konicdev.c16
-rw-r--r--src/mame/video/liberate.c12
-rw-r--r--src/mame/video/lockon.c8
-rw-r--r--src/mame/video/mcd212.c8
-rw-r--r--src/mame/video/nemesis.c4
-rw-r--r--src/mame/video/ppu2c0x.c2
-rw-r--r--src/mame/video/rltennis.c2
-rw-r--r--src/mame/video/spdodgeb.c4
-rw-r--r--src/mame/video/system1.c2
-rw-r--r--src/mame/video/taito_z.c2
-rw-r--r--src/mame/video/tia.c2
-rw-r--r--src/mame/video/tmnt.c6
-rw-r--r--src/mame/video/williams.c2
-rw-r--r--src/mame/video/zaxxon.c2
-rw-r--r--src/mess/drivers/abc1600.c2
-rw-r--r--src/mess/drivers/adam.c6
-rw-r--r--src/mess/drivers/alphatro.c2
-rw-r--r--src/mess/drivers/apollo.c2
-rw-r--r--src/mess/drivers/apple2.c4
-rw-r--r--src/mess/drivers/apple2gs.c2
-rw-r--r--src/mess/drivers/apricot.c2
-rw-r--r--src/mess/drivers/apricotp.c2
-rw-r--r--src/mess/drivers/atarist.c6
-rw-r--r--src/mess/drivers/avigo.c4
-rw-r--r--src/mess/drivers/bml3.c6
-rw-r--r--src/mess/drivers/bw2.c4
-rw-r--r--src/mess/drivers/cat.c2
-rw-r--r--src/mess/drivers/cxhumax.c12
-rw-r--r--src/mess/drivers/d6800.c2
-rw-r--r--src/mess/drivers/dc.c4
-rw-r--r--src/mess/drivers/dmv.c2
-rw-r--r--src/mess/drivers/eacc.c6
-rw-r--r--src/mess/drivers/elwro800.c2
-rw-r--r--src/mess/drivers/enterp.c2
-rw-r--r--src/mess/drivers/esq5505.c12
-rw-r--r--src/mess/drivers/exelv.c2
-rw-r--r--src/mess/drivers/fidelz80.c6
-rw-r--r--src/mess/drivers/fk1.c2
-rw-r--r--src/mess/drivers/fm7.c4
-rw-r--r--src/mess/drivers/fmtowns.c10
-rw-r--r--src/mess/drivers/gba.c6
-rw-r--r--src/mess/drivers/geneve.c4
-rw-r--r--src/mess/drivers/gp32.c6
-rw-r--r--src/mess/drivers/h8.c6
-rw-r--r--src/mess/drivers/h89.c2
-rw-r--r--src/mess/drivers/homelab.c4
-rw-r--r--src/mess/drivers/homez80.c2
-rw-r--r--src/mess/drivers/iq151.c4
-rw-r--r--src/mess/drivers/jr200.c2
-rw-r--r--src/mess/drivers/kyocera.c2
-rw-r--r--src/mess/drivers/m20.c10
-rw-r--r--src/mess/drivers/m5.c4
-rw-r--r--src/mess/drivers/mac.c24
-rw-r--r--src/mess/drivers/micronic.c2
-rw-r--r--src/mess/drivers/mikromik.c2
-rw-r--r--src/mess/drivers/mirage.c4
-rw-r--r--src/mess/drivers/mk1.c2
-rw-r--r--src/mess/drivers/mod8.c2
-rw-r--r--src/mess/drivers/mstation.c4
-rw-r--r--src/mess/drivers/multi16.c2
-rw-r--r--src/mess/drivers/mz2500.c2
-rw-r--r--src/mess/drivers/nakajies.c4
-rw-r--r--src/mess/drivers/ng_aes.c10
-rw-r--r--src/mess/drivers/ngp.c26
-rw-r--r--src/mess/drivers/ondra.c2
-rw-r--r--src/mess/drivers/osbexec.c4
-rw-r--r--src/mess/drivers/paso1600.c2
-rw-r--r--src/mess/drivers/pasogo.c2
-rw-r--r--src/mess/drivers/pc100.c2
-rw-r--r--src/mess/drivers/pc1512.c4
-rw-r--r--src/mess/drivers/pc6001.c12
-rw-r--r--src/mess/drivers/pc8801.c8
-rw-r--r--src/mess/drivers/pc88va.c4
-rw-r--r--src/mess/drivers/pc9801.c4
-rw-r--r--src/mess/drivers/pce220.c6
-rw-r--r--src/mess/drivers/pcfx.c4
-rw-r--r--src/mess/drivers/pcw.c2
-rw-r--r--src/mess/drivers/pdp1.c2
-rw-r--r--src/mess/drivers/pegasus.c2
-rw-r--r--src/mess/drivers/pk8000.c4
-rw-r--r--src/mess/drivers/pockstat.c8
-rw-r--r--src/mess/drivers/portfoli.c4
-rw-r--r--src/mess/drivers/prestige.c4
-rw-r--r--src/mess/drivers/pv1000.c4
-rw-r--r--src/mess/drivers/pv2000.c2
-rw-r--r--src/mess/drivers/pyl601.c2
-rw-r--r--src/mess/drivers/ql.c10
-rw-r--r--src/mess/drivers/qx10.c2
-rw-r--r--src/mess/drivers/rainbow.c22
-rw-r--r--src/mess/drivers/rex6000.c12
-rw-r--r--src/mess/drivers/samcoupe.c2
-rw-r--r--src/mess/drivers/sm1800.c2
-rw-r--r--src/mess/drivers/smc777.c2
-rw-r--r--src/mess/drivers/socrates.c4
-rw-r--r--src/mess/drivers/spectrum.c2
-rw-r--r--src/mess/drivers/supracan.c28
-rw-r--r--src/mess/drivers/svision.c2
-rw-r--r--src/mess/drivers/tandy2k.c4
-rw-r--r--src/mess/drivers/tek405x.c4
-rw-r--r--src/mess/drivers/ti99_2.c2
-rw-r--r--src/mess/drivers/ti99_4p.c2
-rw-r--r--src/mess/drivers/trs80m2.c2
-rw-r--r--src/mess/drivers/tsispch.c2
-rw-r--r--src/mess/drivers/tvc.c4
-rw-r--r--src/mess/drivers/v1050.c14
-rw-r--r--src/mess/drivers/vboy.c10
-rw-r--r--src/mess/drivers/victor9k.c4
-rw-r--r--src/mess/drivers/vidbrain.c2
-rw-r--r--src/mess/drivers/vixen.c4
-rw-r--r--src/mess/drivers/vk100.c10
-rw-r--r--src/mess/drivers/vt100.c4
-rw-r--r--src/mess/drivers/vt240.c2
-rw-r--r--src/mess/drivers/wangpc.c2
-rw-r--r--src/mess/drivers/x07.c14
-rw-r--r--src/mess/drivers/x1.c10
-rw-r--r--src/mess/drivers/x1twin.c4
-rw-r--r--src/mess/drivers/x68k.c2
-rw-r--r--src/mess/drivers/xerox820.c8
-rw-r--r--src/mess/drivers/xor100.c6
-rw-r--r--src/mess/drivers/z100.c2
-rw-r--r--src/mess/includes/fmtowns.h2
-rw-r--r--src/mess/includes/nes.h2
-rw-r--r--src/mess/includes/pc.h2
-rw-r--r--src/mess/machine/a2bus.c2
-rw-r--r--src/mess/machine/a2bus.h2
-rw-r--r--src/mess/machine/a2eauxslot.c2
-rw-r--r--src/mess/machine/a2eauxslot.h2
-rw-r--r--src/mess/machine/a2softcard.c10
-rw-r--r--src/mess/machine/a2themill.c22
-rw-r--r--src/mess/machine/abc77.c8
-rw-r--r--src/mess/machine/abc99.c14
-rw-r--r--src/mess/machine/advision.c8
-rw-r--r--src/mess/machine/amigacrt.c2
-rw-r--r--src/mess/machine/amstrad.c8
-rw-r--r--src/mess/machine/at.c4
-rw-r--r--src/mess/machine/b2m.c2
-rw-r--r--src/mess/machine/bbc.c2
-rw-r--r--src/mess/machine/bk.c4
-rw-r--r--src/mess/machine/c64_cpm.c8
-rw-r--r--src/mess/machine/compis.c8
-rw-r--r--src/mess/machine/cuda.c32
-rw-r--r--src/mess/machine/dec_lk201.c14
-rw-r--r--src/mess/machine/dgn_beta.c6
-rw-r--r--src/mess/machine/ecbbus.c2
-rw-r--r--src/mess/machine/ecbbus.h2
-rw-r--r--src/mess/machine/egret.c10
-rw-r--r--src/mess/machine/galaxy.c10
-rw-r--r--src/mess/machine/genpc.c4
-rw-r--r--src/mess/machine/hd63450.c4
-rw-r--r--src/mess/machine/i82371ab.c2
-rw-r--r--src/mess/machine/i82371sb.c2
-rw-r--r--src/mess/machine/intv.c18
-rw-r--r--src/mess/machine/isa.c88
-rw-r--r--src/mess/machine/isa.h2
-rw-r--r--src/mess/machine/kb_keytro.c4
-rw-r--r--src/mess/machine/kc_d004.c10
-rw-r--r--src/mess/machine/lisa.c2
-rw-r--r--src/mess/machine/mac.c4
-rw-r--r--src/mess/machine/macpci.c4
-rw-r--r--src/mess/machine/mbc55x.c2
-rw-r--r--src/mess/machine/mboard.c6
-rw-r--r--src/mess/machine/mc68328.c28
-rw-r--r--src/mess/machine/mc80.c4
-rw-r--r--src/mess/machine/mpc105.c4
-rw-r--r--src/mess/machine/mpc105.h2
-rw-r--r--src/mess/machine/msx.c2
-rw-r--r--src/mess/machine/nes.c8
-rw-r--r--src/mess/machine/nes_ines.c2
-rw-r--r--src/mess/machine/nes_pcb.c46
-rw-r--r--src/mess/machine/nubus.c46
-rw-r--r--src/mess/machine/nubus.h2
-rw-r--r--src/mess/machine/orion.c2
-rw-r--r--src/mess/machine/pc.c20
-rw-r--r--src/mess/machine/pc1512kb.c6
-rw-r--r--src/mess/machine/pet.c14
-rw-r--r--src/mess/machine/pk8020.c2
-rw-r--r--src/mess/machine/poly88.c8
-rw-r--r--src/mess/machine/primo.c2
-rw-r--r--src/mess/machine/rmnimbus.c4
-rw-r--r--src/mess/machine/s100.c2
-rw-r--r--src/mess/machine/s100.h2
-rw-r--r--src/mess/machine/sms.c2
-rw-r--r--src/mess/machine/southbridge.c4
-rw-r--r--src/mess/machine/svi318.c2
-rw-r--r--src/mess/machine/tf20.c2
-rw-r--r--src/mess/machine/ti85.c10
-rw-r--r--src/mess/machine/ti99/spchsyn.c6
-rw-r--r--src/mess/machine/ti99/speech8.c6
-rw-r--r--src/mess/machine/trs80.c4
-rw-r--r--src/mess/machine/vector06.c4
-rw-r--r--src/mess/machine/x68k_neptunex.c2
-rw-r--r--src/mess/machine/zx.c2
-rw-r--r--src/mess/video/a7800.c4
-rw-r--r--src/mess/video/atarist.c4
-rw-r--r--src/mess/video/mac.c12
-rw-r--r--src/mess/video/mos6566.c6
-rw-r--r--src/mess/video/v1050.c2
-rw-r--r--src/mess/video/vic6567.c6
-rw-r--r--src/mess/video/zx8301.c4
1075 files changed, 3363 insertions, 3503 deletions
diff --git a/src/emu/cpu/cp1610/cp1610.c b/src/emu/cpu/cp1610/cp1610.c
index 39b8d114ae1..20baf0e9977 100644
--- a/src/emu/cpu/cp1610/cp1610.c
+++ b/src/emu/cpu/cp1610/cp1610.c
@@ -1561,7 +1561,7 @@ static void cp1610_xori(cp1610_state *cpustate, int d)
static CPU_RESET( cp1610 )
{
/* This is how we set the reset vector */
- device_set_input_line(device, CP1610_RESET, PULSE_LINE);
+ device->set_input_line(CP1610_RESET, PULSE_LINE);
}
/***************************************************
diff --git a/src/emu/cpu/i386/i386.c b/src/emu/cpu/i386/i386.c
index f9f0a00d5cf..f192c55c5da 100644
--- a/src/emu/cpu/i386/i386.c
+++ b/src/emu/cpu/i386/i386.c
@@ -646,7 +646,7 @@ static void i386_trap(i386_state *cpustate,int irq, int irq_gate, int trap_level
if(trap_level >= 3)
{
logerror("IRQ: Triple fault. CPU reset.\n");
- device_set_input_line(cpustate->device, INPUT_LINE_RESET, PULSE_LINE);
+ cpustate->device->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
return;
}
diff --git a/src/emu/cpu/i386/x87ops.c b/src/emu/cpu/i386/x87ops.c
index d133681db4e..010b1c83cbb 100644
--- a/src/emu/cpu/i386/x87ops.c
+++ b/src/emu/cpu/i386/x87ops.c
@@ -292,7 +292,7 @@ int x87_check_exceptions(i386_state *cpustate)
if ((cpustate->x87_sw & ~cpustate->x87_cw) & 0x3f)
{
- // device_set_input_line(cpustate->device, INPUT_LINE_FERR, RAISE_LINE);
+ // cpustate->device->execute().set_input_line(INPUT_LINE_FERR, RAISE_LINE);
logerror("Unmasked x87 exception (CW:%.4x, SW:%.4x)\n", cpustate->x87_cw, cpustate->x87_sw);
if (cpustate->cr[0] & 0x20) // FIXME: 486 and up only
{
diff --git a/src/emu/cpu/i86/instr286.c b/src/emu/cpu/i86/instr286.c
index 6cea38e63db..1afd5c13515 100644
--- a/src/emu/cpu/i86/instr286.c
+++ b/src/emu/cpu/i86/instr286.c
@@ -111,7 +111,7 @@ static void i80286_trap2(i80286_state *cpustate,UINT32 error)
// this is supposed to triggered by support hardware
// create a shutdown output line that causes a reset
// NMI can wake processor without reset
- device_set_input_line(cpustate->device, INPUT_LINE_RESET, PULSE_LINE);
+ cpustate->device->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
cpustate->trap_level = 0;
}
diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c
index 0364c183d6d..79a675173b3 100644
--- a/src/emu/cpu/jaguar/jaguar.c
+++ b/src/emu/cpu/jaguar/jaguar.c
@@ -479,7 +479,7 @@ static CPU_EXECUTE( jaguargpu )
/* if we're halted, we shouldn't be here */
if (!(jaguar->ctrl[G_CTRL] & 1))
{
- //device_set_input_line(device, INPUT_LINE_HALT, ASSERT_LINE);
+ //device->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
jaguar->icount = 0;
return;
}
@@ -518,7 +518,7 @@ static CPU_EXECUTE( jaguardsp )
/* if we're halted, we shouldn't be here */
if (!(jaguar->ctrl[G_CTRL] & 1))
{
- //device_set_input_line(device, INPUT_LINE_HALT, ASSERT_LINE);
+ //device->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
jaguar->icount = 0;
return;
}
@@ -1296,8 +1296,8 @@ void jaguargpu_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_m
jaguar->ctrl[offset] = newval;
if ((oldval ^ newval) & 0x01)
{
- device_set_input_line(device, INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE);
- device_yield(device);
+ device->execute().set_input_line(INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE);
+ device->execute().yield();
}
if (newval & 0x02)
{
@@ -1395,8 +1395,8 @@ void jaguardsp_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_m
jaguar->ctrl[offset] = newval;
if ((oldval ^ newval) & 0x01)
{
- device_set_input_line(device, INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE);
- device_yield(device);
+ device->execute().set_input_line(INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE);
+ device->execute().yield();
}
if (newval & 0x02)
{
diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c
index c2dece1ab85..e1d67504fde 100644
--- a/src/emu/cpu/m37710/m37710.c
+++ b/src/emu/cpu/m37710/m37710.c
@@ -269,7 +269,7 @@ static TIMER_CALLBACK( m37710_timer_cb )
cpustate->timers[which]->adjust(cpustate->reload[which], param);
m37710_set_irq_line(cpustate, curirq, HOLD_LINE);
- device_triggerint(cpustate->device);
+ cpustate->device->signal_interrupt_trigger();
}
static void m37710_external_tick(m37710i_cpu_struct *cpustate, int timer, int state)
diff --git a/src/emu/cpu/m6502/m6502.h b/src/emu/cpu/m6502/m6502.h
index a8eda31c498..3df71ea0df3 100644
--- a/src/emu/cpu/m6502/m6502.h
+++ b/src/emu/cpu/m6502/m6502.h
@@ -46,7 +46,7 @@ enum
};
#define M6502_IRQ_LINE 0
-/* use device_set_input_line(cpudevice, M6502_SET_OVERFLOW, level)
+/* use cpudevice->execute().set_input_line(M6502_SET_OVERFLOW, level)
to change level of the so input line
positiv edge sets overflow flag */
#define M6502_SET_OVERFLOW 1
diff --git a/src/emu/cpu/m6502/m6509.h b/src/emu/cpu/m6502/m6509.h
index 0f3fe1daa48..22e2f70b06e 100644
--- a/src/emu/cpu/m6502/m6509.h
+++ b/src/emu/cpu/m6502/m6509.h
@@ -34,7 +34,7 @@ enum
};
#define M6509_IRQ_LINE M6502_IRQ_LINE
-/* use device_set_input_line(cpudevice, M6509_SET_OVERFLOW, level)
+/* use cpudevice->execute().set_input_line(M6509_SET_OVERFLOW, level)
to change level of the so input line
positiv edge sets overflow flag */
#define M6509_SET_OVERFLOW 3
diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c
index d27872cd03e..0a1e143709c 100644
--- a/src/emu/cpu/m68000/m68kcpu.c
+++ b/src/emu/cpu/m68000/m68kcpu.c
@@ -1994,7 +1994,7 @@ CPU_GET_INFO( m68301 )
void m68307_set_interrupt(device_t *device, int level, int vector)
{
- device_set_input_line_and_vector(device, level, HOLD_LINE, vector);
+ device->execute().set_input_line_and_vector(level, HOLD_LINE, vector);
}
void m68307_timer0_interrupt(legacy_cpu_device *cpudev)
diff --git a/src/emu/cpu/mips/mips3com.c b/src/emu/cpu/mips/mips3com.c
index 952fc10e457..24e5548e7b0 100644
--- a/src/emu/cpu/mips/mips3com.c
+++ b/src/emu/cpu/mips/mips3com.c
@@ -753,7 +753,7 @@ void mips3com_get_info(mips3_state *mips, UINT32 state, cpuinfo *info)
static TIMER_CALLBACK( compare_int_callback )
{
legacy_cpu_device *device = (legacy_cpu_device *)ptr;
- device_set_input_line(device, MIPS3_IRQ5, ASSERT_LINE);
+ device->set_input_line(MIPS3_IRQ5, ASSERT_LINE);
}
diff --git a/src/emu/cpu/sh4/sh4comn.c b/src/emu/cpu/sh4/sh4comn.c
index 8776cd38520..a159dc48bba 100644
--- a/src/emu/cpu/sh4/sh4comn.c
+++ b/src/emu/cpu/sh4/sh4comn.c
@@ -1041,8 +1041,8 @@ void sh4_set_irln_input(device_t *device, int value)
if (sh4->irln == value)
return;
sh4->irln = value;
- device_set_input_line(device, SH4_IRLn, ASSERT_LINE);
- device_set_input_line(device, SH4_IRLn, CLEAR_LINE);
+ device->execute().set_input_line(SH4_IRLn, ASSERT_LINE);
+ device->execute().set_input_line(SH4_IRLn, CLEAR_LINE);
}
void sh4_set_irq_line(sh4_state *sh4, int irqline, int state) // set state of external interrupt line
diff --git a/src/emu/cpu/tms34010/34010ops.c b/src/emu/cpu/tms34010/34010ops.c
index 66d5f8237b4..346480d4099 100644
--- a/src/emu/cpu/tms34010/34010ops.c
+++ b/src/emu/cpu/tms34010/34010ops.c
@@ -96,7 +96,7 @@ static void unimpl(tms34010_state *tms, UINT16 op)
/* extra check to prevent bad things */
if (tms->pc == 0 || opcode_table[tms->direct->read_decrypted_word(TOBYTE(tms->pc)) >> 4] == unimpl)
{
- device_set_input_line(tms->device, INPUT_LINE_HALT, ASSERT_LINE);
+ tms->device->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
debugger_break(tms->device->machine());
}
}
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index 800ab90740a..a8a36e895e0 100644
--- a/src/emu/cpu/tms34010/tms34010.c
+++ b/src/emu/cpu/tms34010/tms34010.c
@@ -769,7 +769,7 @@ static TIMER_CALLBACK( internal_interrupt_callback )
LOG(("TMS34010 '%s' set internal interrupt $%04x\n", tms->device->tag(), type));
/* generate triggers so that spin loops can key off them */
- device_triggerint(tms->device);
+ tms->device->signal_interrupt_trigger();
}
@@ -1235,7 +1235,7 @@ WRITE16_HANDLER( tms34010_io_register_w )
/* if the CPU is halting itself, stop execution right away */
if ((data & 0x8000) && !tms->external_host_access)
tms->icount = 0;
- device_set_input_line(tms->device, INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
+ tms->device->set_input_line(INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
/* NMI issued? */
if (data & 0x0100)
@@ -1386,7 +1386,7 @@ WRITE16_HANDLER( tms34020_io_register_w )
/* if the CPU is halting itself, stop execution right away */
if ((data & 0x8000) && !tms->external_host_access)
tms->icount = 0;
- device_set_input_line(tms->device, INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
+ tms->device->set_input_line(INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
/* NMI issued? */
if (data & 0x0100)
diff --git a/src/emu/cpu/tms7000/tms7000.c b/src/emu/cpu/tms7000/tms7000.c
index 81ede62b765..a9766421c1f 100644
--- a/src/emu/cpu/tms7000/tms7000.c
+++ b/src/emu/cpu/tms7000/tms7000.c
@@ -545,7 +545,7 @@ static void tms7000_service_timer1( device_t *device )
if( --cpustate->t1_decrementer < 0 ) /* Decrement timer1 register and check for underflow */
{
cpustate->t1_decrementer = cpustate->pf[2]; /* Reload decrementer (8 bit) */
- device_set_input_line(device, TMS7000_IRQ2_LINE, HOLD_LINE);
+ device->execute().set_input_line(TMS7000_IRQ2_LINE, HOLD_LINE);
//LOG( ("tms7000: trigger int2 (cycles: %d)\t%d\tdelta %d\n", cpustate->device->total_cycles(), cpustate->device->total_cycles() - tick, cpustate->cycles_per_INT2-(cpustate->device->total_cycles() - tick) );
//tick = cpustate->device->total_cycles() );
/* Also, cascade out to timer 2 - timer 2 unimplemented */
diff --git a/src/emu/diexec.c b/src/emu/diexec.c
index 213f831c51a..44b2c40e0c7 100644
--- a/src/emu/diexec.c
+++ b/src/emu/diexec.c
@@ -643,7 +643,7 @@ void device_execute_interface::interface_clock_changed()
IRQ_CALLBACK( device_execute_interface::static_standard_irq_callback )
{
- return device_execute(device)->standard_irq_callback(irqline);
+ return device->execute().standard_irq_callback(irqline);
}
int device_execute_interface::standard_irq_callback(int irqline)
diff --git a/src/emu/diexec.h b/src/emu/diexec.h
index 03ac4e76bc8..a27ab6ec09b 100644
--- a/src/emu/diexec.h
+++ b/src/emu/diexec.h
@@ -341,144 +341,4 @@ private:
typedef device_interface_iterator<device_execute_interface> execute_interface_iterator;
-
-//**************************************************************************
-// INLINE HELPERS
-//**************************************************************************
-
-//-------------------------------------------------
-// device_execute - return a pointer to the device
-// execute interface for this device
-//-------------------------------------------------
-
-inline device_execute_interface *device_execute(device_t *device)
-{
- device_execute_interface *intf;
- if (!device->interface(intf))
- throw emu_fatalerror("Device '%s' does not have execute interface", device->tag());
- return intf;
-}
-
-
-
-// ======================> device scheduling
-
-// suspend the given device for a specific reason
-inline void device_suspend(device_t *device, int reason, bool eatcycles)
-{
- device_execute(device)->suspend(reason, eatcycles);
-}
-
-// resume the given device for a specific reason
-inline void device_resume(device_t *device, int reason)
-{
- device_execute(device)->resume(reason);
-}
-
-
-
-// ======================> synchronization helpers
-
-// yield the given device until the end of the current timeslice
-inline void device_yield(device_t *device)
-{
- device_execute(device)->yield();
-}
-
-// burn device cycles until the end of the current timeslice
-inline void device_spin(device_t *device)
-{
- device_execute(device)->spin();
-}
-
-// burn specified device cycles until a trigger
-inline void device_spin_until_trigger(device_t *device, int trigger)
-{
- device_execute(device)->spin_until_trigger(trigger);
-}
-
-// burn device cycles for a specific period of time
-inline void device_spin_until_time(device_t *device, attotime duration)
-{
- device_execute(device)->spin_until_time(duration);
-}
-
-
-
-// ======================> device timing
-
-// returns the current local time for a device
-inline attotime device_get_local_time(device_t *device)
-{
- return device_execute(device)->local_time();
-}
-
-// safely eats cycles so we don't cross a timeslice boundary
-inline void device_eat_cycles(device_t *device, int cycles)
-{
- device_execute(device)->eat_cycles(cycles);
-}
-
-// apply a +/- to the current icount
-inline void device_adjust_icount(device_t *device, int delta)
-{
- device_execute(device)->adjust_icount(delta);
-}
-
-// abort execution for the current timeslice, allowing other devices to run before we run again
-inline void device_abort_timeslice(device_t *device)
-{
- device_execute(device)->abort_timeslice();
-}
-
-
-
-// ======================> triggers
-
-// generate a trigger corresponding to an interrupt on the given device
-inline void device_triggerint(device_t *device)
-{
- device_execute(device)->signal_interrupt_trigger();
-}
-
-
-
-// ======================> interrupts
-
-// set the logical state (ASSERT_LINE/CLEAR_LINE) of the an input line on a device
-inline void device_set_input_line(device_t *device, int line, int state)
-{
- device_execute(device)->set_input_line(line, state);
-}
-
-// set the vector to be returned during a device's interrupt acknowledge cycle
-inline void device_set_input_line_vector(device_t *device, int line, int vector)
-{
- device_execute(device)->set_input_line_vector(line, vector);
-}
-
-// set the logical state (ASSERT_LINE/CLEAR_LINE) of the an input line on a device and its associated vector
-inline void device_set_input_line_and_vector(device_t *device, int line, int state, int vector)
-{
- device_execute(device)->set_input_line_and_vector(line, state, vector);
-}
-
-// install a driver-specific callback for IRQ acknowledge
-inline void device_set_irq_callback(device_t *device, device_irq_acknowledge_callback callback)
-{
- device_execute(device)->set_irq_acknowledge_callback(callback);
-}
-
-
-
-// ======================> additional helpers
-
-// burn device cycles until the next interrupt
-inline void device_spin_until_interrupt(device_t *device)
-{
- device_execute(device)->spin_until_interrupt();
-}
-
-
-
#endif /* __DIEXEC_H__ */
diff --git a/src/emu/machine/8042kbdc.c b/src/emu/machine/8042kbdc.c
index 9daf9401093..30ddc299838 100644
--- a/src/emu/machine/8042kbdc.c
+++ b/src/emu/machine/8042kbdc.c
@@ -597,7 +597,7 @@ WRITE8_HANDLER(kbdc8042_8_w)
* the bits low set in the command byte. The only pulse that has
* an effect currently is bit 0, which pulses the CPU's reset line
*/
- device_set_input_line(space->machine().firstcpu, INPUT_LINE_RESET, PULSE_LINE);
+ space->machine().firstcpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
at_8042_set_outport(space->machine(), kbdc8042.outport | 0x02, 0);
break;
}
diff --git a/src/emu/machine/k056230.c b/src/emu/machine/k056230.c
index e37662323aa..4be52dfc0e5 100644
--- a/src/emu/machine/k056230.c
+++ b/src/emu/machine/k056230.c
@@ -96,7 +96,7 @@ void k056230_device::network_irq_clear()
{
if(m_cpu)
{
- device_set_input_line(m_cpu, INPUT_LINE_IRQ2, CLEAR_LINE);
+ m_cpu->execute().set_input_line(INPUT_LINE_IRQ2, CLEAR_LINE);
}
}
@@ -118,13 +118,13 @@ WRITE8_DEVICE_HANDLER_TRAMPOLINE(k056230, k056230_w)
{
if(m_cpu)
{
- device_set_input_line(m_cpu, INPUT_LINE_IRQ2, ASSERT_LINE);
+ m_cpu->execute().set_input_line(INPUT_LINE_IRQ2, ASSERT_LINE);
}
machine().scheduler().timer_set(attotime::from_usec(10), FUNC(network_irq_clear_callback), 0, (void*)this);
}
}
// else
-// device_set_input_line(k056230->cpu, INPUT_LINE_IRQ2, CLEAR_LINE);
+// k056230->cpu->execute().set_input_line(INPUT_LINE_IRQ2, CLEAR_LINE);
break;
}
case 2: // Sub ID register
diff --git a/src/emu/machine/tmp68301.c b/src/emu/machine/tmp68301.c
index 49c48b3d572..1ade2c721c5 100644
--- a/src/emu/machine/tmp68301.c
+++ b/src/emu/machine/tmp68301.c
@@ -47,7 +47,7 @@ static TIMER_CALLBACK( tmp68301_timer_callback )
tmp68301_irq_vector[level] = IVNR & 0x00e0;
tmp68301_irq_vector[level] += 4+i;
- device_set_input_line(machine.firstcpu,level,HOLD_LINE);
+ machine.firstcpu->set_input_line(level,HOLD_LINE);
}
if (TCR & 0x0080) // N/1
@@ -120,7 +120,7 @@ MACHINE_RESET( tmp68301 )
for (i = 0; i < 3; i++)
tmp68301_IE[i] = 0;
- device_set_irq_callback(machine.firstcpu, tmp68301_irq_callback);
+ machine.firstcpu->set_irq_acknowledge_callback(tmp68301_irq_callback);
}
/* Update the IRQ state based on all possible causes */
@@ -150,7 +150,7 @@ static void update_irq_state(running_machine &machine)
tmp68301_IE[i] = 0; // Interrupts are edge triggerred
- device_set_input_line(machine.firstcpu,level,HOLD_LINE);
+ machine.firstcpu->set_input_line(level,HOLD_LINE);
}
}
}
diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c
index 7407a62c040..5d5273e49ef 100644
--- a/src/emu/sound/scsp.c
+++ b/src/emu/sound/scsp.c
@@ -1241,7 +1241,7 @@ static void dma_scsp(address_space *space, scsp_state *scsp)
if(scsp->udata.data[0x1e/2] & 0x10)
{
popmessage("SCSP DMA IRQ triggered, contact MAMEdev");
- device_set_input_line(space->machine().device("audiocpu"),DecodeSCI(scsp,SCIDMA),HOLD_LINE);
+ space->machine().device("audiocpu")->execute().set_input_line(DecodeSCI(scsp,SCIDMA),HOLD_LINE);
}
}
diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c
index 3bccbc714b3..3559ffdc5d3 100644
--- a/src/emu/video/voodoo.c
+++ b/src/emu/video/voodoo.c
@@ -2159,7 +2159,7 @@ static void stall_cpu(voodoo_state *v, int state, attotime current_time)
if (v->pci.stall_callback)
(*v->pci.stall_callback)(v->device, TRUE);
else
- device_spin_until_trigger(v->cpu, v->trigger);
+ v->cpu->execute().spin_until_trigger(v->trigger);
/* set a timer to clear the stall */
v->pci.continue_timer->adjust(v->pci.op_end_time - current_time);
@@ -3800,7 +3800,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset)
/* bit 31 is not used */
/* eat some cycles since people like polling here */
- device_eat_cycles(v->cpu, 1000);
+ v->cpu->execute().eat_cycles(1000);
break;
/* bit 2 of the initEnable register maps this to dacRead */
@@ -3813,7 +3813,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset)
case vRetrace:
/* eat some cycles since people like polling here */
- device_eat_cycles(v->cpu, 10);
+ v->cpu->execute().eat_cycles(10);
result = v->screen->vpos();
break;
@@ -3828,7 +3828,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset)
result = v->fbi.cmdfifo[0].rdptr;
/* eat some cycles since people like polling here */
- device_eat_cycles(v->cpu, 1000);
+ v->cpu->execute().eat_cycles(1000);
break;
case cmdFifoAMin:
diff --git a/src/mame/audio/aztarac.c b/src/mame/audio/aztarac.c
index a61db646f04..0c04489387b 100644
--- a/src/mame/audio/aztarac.c
+++ b/src/mame/audio/aztarac.c
@@ -49,5 +49,5 @@ INTERRUPT_GEN( aztarac_snd_timed_irq )
state->m_sound_status ^= 0x10;
if (state->m_sound_status & 0x10)
- device_set_input_line(device,0,HOLD_LINE);
+ device->execute().set_input_line(0,HOLD_LINE);
}
diff --git a/src/mame/audio/beezer.c b/src/mame/audio/beezer.c
index b48c270c7bc..3edd99c361a 100644
--- a/src/mame/audio/beezer.c
+++ b/src/mame/audio/beezer.c
@@ -95,7 +95,7 @@ struct sh6840_timer_channel
typedef struct _beezer_sound_state beezer_sound_state;
struct _beezer_sound_state
{
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
/* IRQ variable */
UINT8 m_ptm_irq_state;
@@ -384,7 +384,7 @@ static DEVICE_START( common_sh_start )
/* allocate the stream */
state->m_stream = device->machine().sound().stream_alloc(*device, 0, 1, sample_rate, NULL, beezer_stream_update);
- state->m_maincpu = device->machine().device("maincpu");
+ state->m_maincpu = device->machine().device<cpu_device>("maincpu");
sh6840_register_state_globals(device);
}
@@ -499,7 +499,7 @@ READ8_DEVICE_HANDLER( beezer_sh6840_r )
return 0;
/* offset 1 reads the status register: bits 2 1 0 correspond to ints on channels 2,1,0, and bit 7 is an 'OR' of bits 2,1,0 */
case 1:
- logerror("%04X:beezer_sh6840_r - unexpected read, status register is TODO!\n", state->m_maincpu->safe_pc());
+ logerror("%04X:beezer_sh6840_r - unexpected read, status register is TODO!\n", state->m_maincpu->pc());
return 0;
/* offsets 2,4,6 read channel 0,1,2 MSBs and latch the LSB*/
case 2: case 4: case 6:
diff --git a/src/mame/audio/cage.c b/src/mame/audio/cage.c
index d321ea7b8b2..1c979bb15ed 100644
--- a/src/mame/audio/cage.c
+++ b/src/mame/audio/cage.c
@@ -209,7 +209,7 @@ void cage_reset_w(address_space *space, int state)
cage_t *sndstate = &cage;
if (state)
cage_control_w(space->machine(), 0);
- device_set_input_line(sndstate->cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE);
+ sndstate->cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -241,7 +241,7 @@ static TIMER_DEVICE_CALLBACK( dma_timer_callback )
tms32031_io_regs[DMA_SOURCE_ADDR] = param;
/* set the interrupt */
- device_set_input_line(state->cpu, TMS3203X_DINT, ASSERT_LINE);
+ state->cpu->set_input_line(TMS3203X_DINT, ASSERT_LINE);
state->dma_enabled = 0;
}
@@ -314,7 +314,7 @@ static TIMER_DEVICE_CALLBACK( cage_timer_callback )
int which = param;
/* set the interrupt */
- device_set_input_line(state->cpu, TMS3203X_TINT0 + which, ASSERT_LINE);
+ state->cpu->set_input_line(TMS3203X_TINT0 + which, ASSERT_LINE);
state->timer_enabled[which] = 0;
update_timer(which);
}
@@ -509,7 +509,7 @@ static READ32_HANDLER( cage_from_main_r )
logerror("%06X:CAGE read command = %04X\n", space->device().safe_pc(), state->from_main);
state->cpu_to_cage_ready = 0;
update_control_lines(space->machine());
- device_set_input_line(state->cpu, TMS3203X_IRQ0, CLEAR_LINE);
+ state->cpu->set_input_line(TMS3203X_IRQ0, CLEAR_LINE);
return state->from_main;
}
@@ -566,7 +566,7 @@ static TIMER_CALLBACK( cage_deferred_w )
state->from_main = param;
state->cpu_to_cage_ready = 1;
update_control_lines(machine);
- device_set_input_line(state->cpu, TMS3203X_IRQ0, ASSERT_LINE);
+ state->cpu->set_input_line(TMS3203X_IRQ0, ASSERT_LINE);
}
@@ -602,7 +602,7 @@ void cage_control_w(running_machine &machine, UINT16 data)
/* CPU is reset if both control lines are 0 */
if (!(state->control & 3))
{
- device_set_input_line(state->cpu, INPUT_LINE_RESET, ASSERT_LINE);
+ state->cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
state->dma_enabled = 0;
state->dma_timer_enabled = 0;
@@ -619,7 +619,7 @@ void cage_control_w(running_machine &machine, UINT16 data)
state->cage_to_cpu_ready = 0;
}
else
- device_set_input_line(state->cpu, INPUT_LINE_RESET, CLEAR_LINE);
+ state->cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
/* update the control state */
update_control_lines(machine);
@@ -637,7 +637,7 @@ static WRITE32_HANDLER( speedup_w )
{
cage_t *state = &cage;
- device_eat_cycles(&space->device(), 100);
+ space->device().execute().eat_cycles(100);
COMBINE_DATA(&state->speedup_ram[offset]);
}
diff --git a/src/mame/audio/dcs.c b/src/mame/audio/dcs.c
index 46555f8d9fd..ff02ddab0c1 100644
--- a/src/mame/audio/dcs.c
+++ b/src/mame/audio/dcs.c
@@ -796,7 +796,7 @@ static void dcs_boot(running_machine &machine)
/* rev 3/4: HALT the ADSP-2181 until program is downloaded via IDMA */
case 3:
case 4:
- device_set_input_line(dcs.cpu, INPUT_LINE_HALT, ASSERT_LINE);
+ dcs.cpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
dcs.dsio.start_on_next_write = 0;
break;
}
@@ -849,9 +849,9 @@ static TIMER_CALLBACK( dcs_reset )
memset(dcs.control_regs, 0, sizeof(dcs.control_regs));
/* clear all interrupts */
- device_set_input_line(dcs.cpu, ADSP2105_IRQ0, CLEAR_LINE);
- device_set_input_line(dcs.cpu, ADSP2105_IRQ1, CLEAR_LINE);
- device_set_input_line(dcs.cpu, ADSP2105_IRQ2, CLEAR_LINE);
+ dcs.cpu->set_input_line(ADSP2105_IRQ0, CLEAR_LINE);
+ dcs.cpu->set_input_line(ADSP2105_IRQ1, CLEAR_LINE);
+ dcs.cpu->set_input_line(ADSP2105_IRQ2, CLEAR_LINE);
/* initialize the comm bits */
SET_INPUT_EMPTY();
@@ -1477,7 +1477,7 @@ WRITE32_HANDLER( dsio_idma_data_w )
if (dsio.start_on_next_write && --dsio.start_on_next_write == 0)
{
logerror("Starting DSIO CPU\n");
- device_set_input_line(dcs.cpu, INPUT_LINE_HALT, CLEAR_LINE);
+ dcs.cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
}
@@ -1529,12 +1529,12 @@ void dcs_reset_w(running_machine &machine, int state)
/* just run through the init code again */
machine.scheduler().synchronize(FUNC(dcs_reset));
- device_set_input_line(dcs.cpu, INPUT_LINE_RESET, ASSERT_LINE);
+ dcs.cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
/* going low resets and reactivates the CPU */
else
- device_set_input_line(dcs.cpu, INPUT_LINE_RESET, CLEAR_LINE);
+ dcs.cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
@@ -1576,7 +1576,7 @@ static void dcs_delayed_data_w(running_machine &machine, int data)
machine.scheduler().boost_interleave(attotime::from_nsec(500), attotime::from_usec(5));
/* set the IRQ line on the ADSP */
- device_set_input_line(dcs.cpu, ADSP2105_IRQ2, ASSERT_LINE);
+ dcs.cpu->set_input_line(ADSP2105_IRQ2, ASSERT_LINE);
/* indicate we are no longer empty */
if (dcs.last_input_empty && dcs.input_empty_cb)
@@ -1613,7 +1613,7 @@ static WRITE16_HANDLER( input_latch_ack_w )
if (!dcs.last_input_empty && dcs.input_empty_cb)
(*dcs.input_empty_cb)(space->machine(), dcs.last_input_empty = 1);
SET_INPUT_EMPTY();
- device_set_input_line(dcs.cpu, ADSP2105_IRQ2, CLEAR_LINE);
+ dcs.cpu->set_input_line(ADSP2105_IRQ2, CLEAR_LINE);
}
@@ -1767,8 +1767,8 @@ static TIMER_DEVICE_CALLBACK( internal_timer_callback )
timer.adjust(dcs.cpu->cycles_to_attotime(target_cycles));
/* the IRQ line is edge triggered */
- device_set_input_line(dcs.cpu, ADSP2105_TIMER, ASSERT_LINE);
- device_set_input_line(dcs.cpu, ADSP2105_TIMER, CLEAR_LINE);
+ dcs.cpu->set_input_line(ADSP2105_TIMER, ASSERT_LINE);
+ dcs.cpu->set_input_line(ADSP2105_TIMER, CLEAR_LINE);
}
@@ -1885,7 +1885,7 @@ static WRITE16_HANDLER( adsp_control_w )
if (data & 0x0200)
{
logerror("%04X:Rebooting DCS due to SYSCONTROL write\n", space->device().safe_pc());
- device_set_input_line(dcs.cpu, INPUT_LINE_RESET, PULSE_LINE);
+ dcs.cpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
dcs_boot(space->machine());
dcs.control_regs[SYSCONTROL_REG] = 0;
}
@@ -1993,8 +1993,8 @@ static TIMER_DEVICE_CALLBACK( sport0_irq )
/* so we skip the SPORT interrupt if we read with output_control within the last 5 cycles */
if ((dcs.cpu->total_cycles() - dcs.output_control_cycles) > 5)
{
- device_set_input_line(dcs.cpu, ADSP2115_SPORT0_RX, ASSERT_LINE);
- device_set_input_line(dcs.cpu, ADSP2115_SPORT0_RX, CLEAR_LINE);
+ dcs.cpu->set_input_line(ADSP2115_SPORT0_RX, ASSERT_LINE);
+ dcs.cpu->set_input_line(ADSP2115_SPORT0_RX, CLEAR_LINE);
}
}
@@ -2080,7 +2080,7 @@ static void sound_tx_callback(adsp21xx_device &device, int port, INT32 data)
static READ16_HANDLER( dcs_polling_r )
{
if (dcs.polling_count++ > 5)
- device_eat_cycles(&space->device(), 10000);
+ space->device().execute().eat_cycles(10000);
return *dcs.polling_base;
}
diff --git a/src/mame/audio/decobsmt.c b/src/mame/audio/decobsmt.c
index 4b0a861cb26..aa6e8a5918e 100644
--- a/src/mame/audio/decobsmt.c
+++ b/src/mame/audio/decobsmt.c
@@ -29,13 +29,13 @@ ADDRESS_MAP_END
static INTERRUPT_GEN( decobsmt_firq_interrupt )
{
- device_set_input_line(device, M6809_FIRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
static void bsmt_ready_callback(bsmt2000_device &device)
{
decobsmt_device *decobsmt = device.machine().device<decobsmt_device>(DECOBSMT_TAG);
- device_set_input_line(decobsmt->m_ourcpu, M6809_IRQ_LINE, ASSERT_LINE); /* BSMT is ready */
+ decobsmt->m_ourcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); /* BSMT is ready */
}
MACHINE_CONFIG_FRAGMENT( decobsmt )
@@ -119,7 +119,7 @@ WRITE8_MEMBER(decobsmt_device::bsmt1_w)
{
m_bsmt->write_reg(offset ^ 0xff);
m_bsmt->write_data((m_bsmt_latch << 8) | data);
- device_set_input_line(m_ourcpu, M6809_IRQ_LINE, CLEAR_LINE); /* BSMT is not ready */
+ m_ourcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); /* BSMT is not ready */
}
READ8_MEMBER(decobsmt_device::bsmt_status_r)
@@ -139,6 +139,6 @@ WRITE8_MEMBER(decobsmt_device::bsmt_comms_w)
WRITE_LINE_MEMBER(decobsmt_device::bsmt_reset_line)
{
- device_set_input_line(m_ourcpu, INPUT_LINE_RESET, state);
+ m_ourcpu->set_input_line(INPUT_LINE_RESET, state);
}
diff --git a/src/mame/audio/dsbz80.c b/src/mame/audio/dsbz80.c
index dd5beacf91d..32e45d9d20d 100644
--- a/src/mame/audio/dsbz80.c
+++ b/src/mame/audio/dsbz80.c
@@ -94,7 +94,7 @@ void dsbz80_device::device_reset()
WRITE8_MEMBER(dsbz80_device::latch_w)
{
- device_set_input_line(m_ourcpu, INPUT_LINE_IRQ0, ASSERT_LINE);
+ m_ourcpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
m_dsb_latch = data;
status |= 2;
// printf("%02x to DSB latch\n", data);
@@ -102,7 +102,7 @@ WRITE8_MEMBER(dsbz80_device::latch_w)
READ8_MEMBER(dsbz80_device::latch_r)
{
- device_set_input_line(m_ourcpu, INPUT_LINE_IRQ0, CLEAR_LINE);
+ m_ourcpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
// printf("DSB Z80 read %02x\n", m_dsb_latch);
status &= ~2;
return m_dsb_latch;
diff --git a/src/mame/audio/exidy.c b/src/mame/audio/exidy.c
index db55ba9830f..58d8c8027db 100644
--- a/src/mame/audio/exidy.c
+++ b/src/mame/audio/exidy.c
@@ -76,7 +76,7 @@ struct sh8253_timer_channel
typedef struct _exidy_sound_state exidy_sound_state;
struct _exidy_sound_state
{
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
/* IRQ variable */
UINT8 m_riot_irq_state;
@@ -402,7 +402,7 @@ static DEVICE_START( common_sh_start )
/* allocate the stream */
state->m_stream = device->machine().sound().stream_alloc(*device, 0, 1, sample_rate, NULL, exidy_stream_update);
- state->m_maincpu = device->machine().device("maincpu");
+ state->m_maincpu = device->machine().device<cpu_device>("maincpu");
sh6840_register_state_globals(device);
}
@@ -686,7 +686,7 @@ READ8_DEVICE_HANDLER( exidy_sh6840_r )
return 0;
/* offset 1 reads the status register: bits 2 1 0 correspond to ints on channels 2,1,0, and bit 7 is an 'OR' of bits 2,1,0 */
case 1:
- logerror("%04X:exidy_sh6840_r - unexpected read, status register is TODO!\n", state->m_maincpu->safe_pc());
+ logerror("%04X:exidy_sh6840_r - unexpected read, status register is TODO!\n", state->m_maincpu->pc());
return 0;
/* offsets 2,4,6 read channel 0,1,2 MSBs and latch the LSB*/
case 2: case 4: case 6:
@@ -1043,7 +1043,7 @@ READ8_DEVICE_HANDLER( victory_sound_response_r )
exidy_sound_state *state = get_safe_token(device);
UINT8 ret = state->m_pia1->b_output();
- if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound response read = %02X\n", state->m_maincpu->safe_pcbase(), ret);
+ if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound response read = %02X\n", state->m_maincpu->pcbase(), ret);
state->m_pia1->cb1_w(0);
@@ -1056,7 +1056,7 @@ READ8_DEVICE_HANDLER( victory_sound_status_r )
exidy_sound_state *state = get_safe_token(device);
UINT8 ret = (state->m_pia1->ca1_r() << 7) | (state->m_pia1->cb1_r() << 6);
- if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound status read = %02X\n", state->m_maincpu->safe_pcbase(), ret);
+ if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound status read = %02X\n", state->m_maincpu->pcbase(), ret);
return ret;
}
@@ -1073,7 +1073,7 @@ WRITE8_DEVICE_HANDLER( victory_sound_command_w )
{
exidy_sound_state *state = get_safe_token(device);
- if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound command = %02X\n", state->m_maincpu->safe_pcbase(), data);
+ if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound command = %02X\n", state->m_maincpu->pcbase(), data);
device->machine().scheduler().synchronize(FUNC(delayed_command_w), data, state->m_pia1);
}
diff --git a/src/mame/audio/harddriv.c b/src/mame/audio/harddriv.c
index ee2aec6bb47..d107eebd8b2 100644
--- a/src/mame/audio/harddriv.c
+++ b/src/mame/audio/harddriv.c
@@ -39,8 +39,8 @@ void hdsnd_init(running_machine &machine)
static void update_68k_interrupts(running_machine &machine)
{
harddriv_state *state = machine.driver_data<harddriv_state>();
- device_set_input_line(state->m_soundcpu, 1, state->m_mainflag ? ASSERT_LINE : CLEAR_LINE);
- device_set_input_line(state->m_soundcpu, 3, state->m_irq68k ? ASSERT_LINE : CLEAR_LINE);
+ state->m_soundcpu->set_input_line(1, state->m_mainflag ? ASSERT_LINE : CLEAR_LINE);
+ state->m_soundcpu->set_input_line(3, state->m_irq68k ? ASSERT_LINE : CLEAR_LINE);
}
@@ -83,8 +83,8 @@ WRITE16_MEMBER(harddriv_state::hd68k_snd_data_w)
WRITE16_MEMBER(harddriv_state::hd68k_snd_reset_w)
{
- device_set_input_line(m_soundcpu, INPUT_LINE_RESET, ASSERT_LINE);
- device_set_input_line(m_soundcpu, INPUT_LINE_RESET, CLEAR_LINE);
+ m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_soundcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
m_mainflag = m_soundflag = 0;
update_68k_interrupts(machine());
logerror("%06X:Reset sound\n", space.device().safe_pcbase());
@@ -188,7 +188,7 @@ WRITE16_MEMBER(harddriv_state::hdsnd68k_latches_w)
case 4: /* RES320 */
logerror("%06X:RES320=%d\n", space.device().safe_pcbase(), data);
if (m_sounddsp != NULL)
- device_set_input_line(m_sounddsp, INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE);
+ m_sounddsp->set_input_line(INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE);
break;
case 7: /* LED */
@@ -277,7 +277,7 @@ READ16_MEMBER(harddriv_state::hdsnddsp_get_bio)
/* if we're not at the next BIO yet, advance us there */
if (cycles_until_bio > 0)
{
- device_adjust_icount(&space.device(), -cycles_until_bio);
+ space.device().execute().adjust_icount(-cycles_until_bio);
m_last_bio_cycles += CYCLES_PER_BIO;
}
else
diff --git a/src/mame/audio/leland.c b/src/mame/audio/leland.c
index d48b6d59ea7..b518128eac2 100644
--- a/src/mame/audio/leland.c
+++ b/src/mame/audio/leland.c
@@ -778,7 +778,7 @@ static IRQ_CALLBACK( int_callback )
if (LOG_INTERRUPTS) logerror("(%f) **** Acknowledged interrupt vector %02X\n", device->machine().time().as_double(), state->m_i80186.intr.poll_status & 0x1f);
/* clear the interrupt */
- device_set_input_line(state->m_i80186.cpu, 0, CLEAR_LINE);
+ state->m_i80186.cpu->execute().set_input_line(0, CLEAR_LINE);
state->m_i80186.intr.pending = 0;
/* clear the request and set the in-service bit */
@@ -1603,7 +1603,7 @@ static WRITE16_DEVICE_HANDLER( i80186_internal_port_w )
/* we need to do this at a time when the 80186 context is swapped in */
/* this register is generally set once at startup and never again, so it's a good */
/* time to set it up */
- device_set_irq_callback(state->m_i80186.cpu, int_callback);
+ state->m_i80186.cpu->execute().set_irq_acknowledge_callback(int_callback);
break;
case 0xc0/2:
diff --git a/src/mame/audio/namco52.c b/src/mame/audio/namco52.c
index e1716a1260f..527ced7ae7e 100644
--- a/src/mame/audio/namco52.c
+++ b/src/mame/audio/namco52.c
@@ -135,7 +135,7 @@ static WRITE8_HANDLER( namco_52xx_O_w )
static TIMER_CALLBACK( namco_52xx_irq_clear )
{
namco_52xx_state *state = get_safe_token((device_t *)ptr);
- device_set_input_line(state->m_cpu, 0, CLEAR_LINE);
+ state->m_cpu->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_DEVICE_HANDLER( namco_52xx_write )
@@ -144,7 +144,7 @@ WRITE8_DEVICE_HANDLER( namco_52xx_write )
device->machine().scheduler().synchronize(FUNC(namco_52xx_latch_callback), data, (void *)device);
- device_set_input_line(state->m_cpu, 0, ASSERT_LINE);
+ state->m_cpu->execute().set_input_line(0, ASSERT_LINE);
// The execution time of one instruction is ~4us, so we must make sure to
// give the cpu time to poll the /IRQ input before we clear it.
diff --git a/src/mame/audio/namco54.c b/src/mame/audio/namco54.c
index 7c825acc5ab..201d6569f0d 100644
--- a/src/mame/audio/namco54.c
+++ b/src/mame/audio/namco54.c
@@ -113,7 +113,7 @@ static WRITE8_HANDLER( namco_54xx_R1_w )
static TIMER_CALLBACK( namco_54xx_irq_clear )
{
namco_54xx_state *state = get_safe_token((device_t *)ptr);
- device_set_input_line(state->m_cpu, 0, CLEAR_LINE);
+ state->m_cpu->execute().set_input_line(0, CLEAR_LINE);
}
WRITE8_DEVICE_HANDLER( namco_54xx_write )
@@ -122,7 +122,7 @@ WRITE8_DEVICE_HANDLER( namco_54xx_write )
device->machine().scheduler().synchronize(FUNC(namco_54xx_latch_callback), data, (void *)device);
- device_set_input_line(state->m_cpu, 0, ASSERT_LINE);
+ state->m_cpu->execute().set_input_line(0, ASSERT_LINE);
// The execution time of one instruction is ~4us, so we must make sure to
// give the cpu time to poll the /IRQ input before we clear it.
diff --git a/src/mame/audio/scramble.c b/src/mame/audio/scramble.c
index 7df1292b781..377e04e259e 100644
--- a/src/mame/audio/scramble.c
+++ b/src/mame/audio/scramble.c
@@ -163,7 +163,7 @@ WRITE8_MEMBER(scramble_state::frogger_filter_w)
void scramble_sh_init(running_machine &machine)
{
- device_set_irq_callback(machine.device("audiocpu"), scramble_sh_irq_callback);
+ machine.device("audiocpu")->execute().set_irq_acknowledge_callback(scramble_sh_irq_callback);
/* PR is always 0, D is always 1 */
machine.device<ttl7474_device>("konami_7474")->d_w(1);
diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c
index 7fdd425b94d..e0d741b2f15 100644
--- a/src/mame/audio/segasnd.c
+++ b/src/mame/audio/segasnd.c
@@ -447,7 +447,7 @@ static DEVICE_RESET( usb_sound )
usb_state *usb = get_safe_token(device);
/* halt the USB CPU at reset time */
- device_set_input_line(usb->cpu, INPUT_LINE_RESET, ASSERT_LINE);
+ usb->cpu->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
/* start the clock timer */
usb->t1_clock_mask = 0x10;
@@ -467,7 +467,7 @@ READ8_DEVICE_HANDLER( sega_usb_status_r )
LOG(("%04X:usb_data_r = %02X\n", usb->maincpu->safe_pc(), (usb->out_latch & 0x81) | (usb->in_latch & 0x7e)));
- device_adjust_icount(usb->maincpu, -200);
+ usb->maincpu->execute().adjust_icount(-200);
/* only bits 0 and 7 are controlled by the I8035; the remaining */
/* bits 1-6 reflect the current input latch values */
@@ -481,7 +481,7 @@ static TIMER_CALLBACK( delayed_usb_data_w )
int data = param;
/* look for rising/falling edges of bit 7 to control the RESET line */
- device_set_input_line(usb->cpu, INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
+ usb->cpu->execute().set_input_line(INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
/* if the CLEAR line is set, the low 7 bits of the input are ignored */
if ((usb->last_p2_value & 0x40) == 0)
diff --git a/src/mame/audio/seibu.c b/src/mame/audio/seibu.c
index 7c0c9d06712..01410e04cda 100644
--- a/src/mame/audio/seibu.c
+++ b/src/mame/audio/seibu.c
@@ -289,9 +289,9 @@ static void update_irq_lines(running_machine &machine, int param)
}
if ((irq1 & irq2) == 0xff) /* no IRQs pending */
- device_set_input_line(sound_cpu,0,CLEAR_LINE);
+ sound_cpu->execute().set_input_line(0,CLEAR_LINE);
else /* IRQ pending */
- device_set_input_line_and_vector(sound_cpu,0,ASSERT_LINE,irq1 & irq2);
+ sound_cpu->execute().set_input_line_and_vector(0,ASSERT_LINE,irq1 & irq2);
}
WRITE8_HANDLER( seibu_irq_clear_w )
diff --git a/src/mame/audio/t5182.c b/src/mame/audio/t5182.c
index f0d19842ef7..f16b1f61354 100644
--- a/src/mame/audio/t5182.c
+++ b/src/mame/audio/t5182.c
@@ -205,9 +205,9 @@ static TIMER_CALLBACK( setirq_callback )
return;
if (irqstate == 0) /* no IRQs pending */
- device_set_input_line(cpu,0,CLEAR_LINE);
+ cpu->execute().set_input_line(0,CLEAR_LINE);
else /* IRQ pending */
- device_set_input_line(cpu,0,ASSERT_LINE);
+ cpu->execute().set_input_line(0,ASSERT_LINE);
}
diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c
index 403e967abb2..dce93069e35 100644
--- a/src/mame/audio/taito_en.c
+++ b/src/mame/audio/taito_en.c
@@ -267,12 +267,12 @@ static void taito_en_duart_irq_handler(device_t *device, int state, UINT8 vector
{
if (state == ASSERT_LINE)
{
- device_set_input_line_vector(device->machine().device("audiocpu"), M68K_IRQ_6, vector);
- device_set_input_line(device->machine().device("audiocpu"), M68K_IRQ_6, ASSERT_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line_vector(M68K_IRQ_6, vector);
+ device->machine().device("audiocpu")->execute().set_input_line(M68K_IRQ_6, ASSERT_LINE);
}
else
{
- device_set_input_line(device->machine().device("audiocpu"), M68K_IRQ_6, CLEAR_LINE);
+ device->machine().device("audiocpu")->execute().set_input_line(M68K_IRQ_6, CLEAR_LINE);
}
}
diff --git a/src/mame/audio/taitosnd.c b/src/mame/audio/taitosnd.c
index abdc517ef77..b223880616f 100644
--- a/src/mame/audio/taitosnd.c
+++ b/src/mame/audio/taitosnd.c
@@ -59,7 +59,7 @@ static void interrupt_controller( device_t *device )
if (tc0140syt->nmi_req && tc0140syt->nmi_enabled)
{
- device_set_input_line(tc0140syt->slavecpu, INPUT_LINE_NMI, PULSE_LINE);
+ tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
tc0140syt->nmi_req = 0;
}
}
@@ -113,11 +113,11 @@ WRITE8_DEVICE_HANDLER( tc0140syt_comm_w )
//logerror("taitosnd: Master issued control value %02x (PC = %08x) \n",data, space->device().safe_pc() );
/* this does a hi-lo transition to reset the sound cpu */
if (data)
- device_set_input_line(tc0140syt->slavecpu, INPUT_LINE_RESET, ASSERT_LINE);
+ tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
else
{
- device_set_input_line(tc0140syt->slavecpu, INPUT_LINE_RESET, CLEAR_LINE);
- device_spin(tc0140syt->mastercpu); /* otherwise no sound in driftout */
+ tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ tc0140syt->mastercpu->execute().spin(); /* otherwise no sound in driftout */
}
break;
@@ -191,7 +191,7 @@ WRITE8_DEVICE_HANDLER( tc0140syt_slave_comm_w )
tc0140syt->masterdata[tc0140syt->submode ++] = data;
tc0140syt->status |= TC0140SYT_PORT01_FULL_MASTER;
//logerror("taitosnd: Slave cpu sends 0/1 : %01x%01x\n" , tc0140syt->masterdata[1] , tc0140syt->masterdata[0]);
- device_spin(tc0140syt->slavecpu); /* writing should take longer than emulated, so spin */
+ tc0140syt->slavecpu->execute().spin(); /* writing should take longer than emulated, so spin */
break;
case 0x02: // mode #2
@@ -203,7 +203,7 @@ WRITE8_DEVICE_HANDLER( tc0140syt_slave_comm_w )
tc0140syt->masterdata[tc0140syt->submode ++] = data;
tc0140syt->status |= TC0140SYT_PORT23_FULL_MASTER;
//logerror("taitosnd: Slave cpu sends 2/3 : %01x%01x\n" , tc0140syt->masterdata[3] , tc0140syt->masterdata[2]);
- device_spin(tc0140syt->slavecpu); /* writing should take longer than emulated, so spin */
+ tc0140syt->slavecpu->execute().spin(); /* writing should take longer than emulated, so spin */
break;
case 0x04: // port status
diff --git a/src/mame/audio/timeplt.c b/src/mame/audio/timeplt.c
index 988a8b864ec..fb9781cf401 100644
--- a/src/mame/audio/timeplt.c
+++ b/src/mame/audio/timeplt.c
@@ -151,7 +151,7 @@ WRITE8_HANDLER( timeplt_sh_irqtrigger_w )
if (state->m_last_irq_state == 0 && data)
{
/* setting bit 0 low then high triggers IRQ on the sound CPU */
- device_set_input_line_and_vector(state->m_soundcpu, 0, HOLD_LINE, 0xff);
+ state->m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
state->m_last_irq_state = data;
diff --git a/src/mame/audio/trackfld.c b/src/mame/audio/trackfld.c
index 8991370a857..cff24145e2f 100644
--- a/src/mame/audio/trackfld.c
+++ b/src/mame/audio/trackfld.c
@@ -148,7 +148,7 @@ WRITE8_HANDLER( konami_sh_irqtrigger_w )
if (state->m_last_irq == 0 && data)
{
/* setting bit 0 low then high triggers IRQ on the sound CPU */
- device_set_input_line_and_vector(state->m_audiocpu, 0, HOLD_LINE, 0xff);
+ state->m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
state->m_last_irq = data;
diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c
index 595062ebb98..f593d0763ab 100644
--- a/src/mame/drivers/1942.c
+++ b/src/mame/drivers/1942.c
@@ -240,7 +240,7 @@ static MACHINE_START( 1942 )
{
_1942_state *state = machine.driver_data<_1942_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_palette_bank));
state->save_item(NAME(state->m_scroll));
diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c
index 9c892b9f40b..319a3fd4236 100644
--- a/src/mame/drivers/20pacgal.c
+++ b/src/mame/drivers/20pacgal.c
@@ -113,7 +113,7 @@ WRITE8_MEMBER(_20pacgal_state::irqack_w)
m_irq_mask = data & 1;
if (!m_irq_mask)
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(_20pacgal_state::timer_pulse_w)
@@ -345,7 +345,7 @@ static MACHINE_START( 20pacgal )
{
_20pacgal_state *state = machine.driver_data<_20pacgal_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_eeprom = machine.device("eeprom");
state->save_item(NAME(state->m_game_selected));
@@ -367,7 +367,7 @@ static INTERRUPT_GEN( vblank_irq )
_20pacgal_state *state = device->machine().driver_data<_20pacgal_state>();
if(state->m_irq_mask)
- device_set_input_line(device, 0, HOLD_LINE); // TODO: assert breaks the inputs in 25pacman test mode
+ device->execute().set_input_line(0, HOLD_LINE); // TODO: assert breaks the inputs in 25pacman test mode
}
static MACHINE_CONFIG_START( 20pacgal, _20pacgal_state )
diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c
index 6e04ad41354..0edc6a15e63 100644
--- a/src/mame/drivers/2mindril.c
+++ b/src/mame/drivers/2mindril.c
@@ -54,7 +54,7 @@ public:
UINT16 irq_reg;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
DECLARE_READ16_MEMBER(drill_io_r);
DECLARE_WRITE16_MEMBER(drill_io_w);
DECLARE_WRITE16_MEMBER(sensors_w);
@@ -399,13 +399,13 @@ GFXDECODE_END
static INTERRUPT_GEN( drill_vblank_irq )
{
- device_set_input_line(device, 4, ASSERT_LINE);
+ device->execute().set_input_line(4, ASSERT_LINE);
}
#if 0
static INTERRUPT_GEN( drill_device_irq )
{
- device_set_input_line(device, 5, ASSERT_LINE);
+ device->execute().set_input_line(5, ASSERT_LINE);
}
#endif
@@ -413,7 +413,7 @@ static INTERRUPT_GEN( drill_device_irq )
static void irqhandler(device_t *device, int irq)
{
// _2mindril_state *state = machine.driver_data<_2mindril_state>();
-// device_set_input_line(state->m_maincpu, 5, irq ? ASSERT_LINE : CLEAR_LINE);
+// state->m_maincpu->set_input_line(5, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
@@ -426,7 +426,7 @@ static MACHINE_START( drill )
{
_2mindril_state *state = machine.driver_data<_2mindril_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_defender_sensor));
state->save_item(NAME(state->m_shutter_sensor));
diff --git a/src/mame/drivers/3do.c b/src/mame/drivers/3do.c
index 952b84ac0b1..f65917ea3a0 100644
--- a/src/mame/drivers/3do.c
+++ b/src/mame/drivers/3do.c
@@ -133,7 +133,7 @@ static MACHINE_RESET( 3do )
{
_3do_state *state = machine.driver_data<_3do_state>();
- state->m_maincpu = downcast<legacy_cpu_device*>( machine.device("maincpu") );
+ state->m_maincpu = downcast<legacy_cpu_device*>( machine.device<cpu_device>("maincpu") );
state->membank("bank2")->set_base(state->memregion("user1")->base());
diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c
index 3abbb0b4ae3..4da909fe01d 100644
--- a/src/mame/drivers/40love.c
+++ b/src/mame/drivers/40love.c
@@ -235,7 +235,7 @@ static TIMER_CALLBACK( nmi_callback )
{
fortyl_state *state = machine.driver_data<fortyl_state>();
if (state->m_sound_nmi_enable)
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
else
state->m_pending_nmi = 1;
}
@@ -256,7 +256,7 @@ WRITE8_MEMBER(fortyl_state::nmi_enable_w)
m_sound_nmi_enable = 1;
if (m_pending_nmi)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
m_pending_nmi = 0;
}
}
@@ -978,7 +978,7 @@ static MACHINE_START( 40love )
{
fortyl_state *state = machine.driver_data<fortyl_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
/* video */
state->save_item(NAME(state->m_pix1));
diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c
index f930f8f966f..a741f630ad5 100644
--- a/src/mame/drivers/88games.c
+++ b/src/mame/drivers/88games.c
@@ -70,7 +70,7 @@ WRITE8_MEMBER(_88games_state::k88games_5f84_w)
WRITE8_MEMBER(_88games_state::k88games_sh_irqtrigger_w)
{
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
@@ -309,7 +309,7 @@ static MACHINE_START( 88games )
{
_88games_state *state = machine.driver_data<_88games_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k052109 = machine.device("k052109");
state->m_k051960 = machine.device("k051960");
state->m_k051316 = machine.device("k051316");
diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c
index 3ad29ae5fd1..8ea3225f422 100644
--- a/src/mame/drivers/acefruit.c
+++ b/src/mame/drivers/acefruit.c
@@ -84,7 +84,7 @@ static VIDEO_START( acefruit )
static INTERRUPT_GEN( acefruit_vblank )
{
acefruit_state *state = device->machine().driver_data<acefruit_state>();
- device_set_input_line(device, 0, HOLD_LINE );
+ device->execute().set_input_line(0, HOLD_LINE );
state->m_refresh_timer->adjust( attotime::zero );
}
diff --git a/src/mame/drivers/aces1.c b/src/mame/drivers/aces1.c
index ac34710cbbe..ac3130184ba 100644
--- a/src/mame/drivers/aces1.c
+++ b/src/mame/drivers/aces1.c
@@ -154,7 +154,7 @@ static TIMER_CALLBACK( m_aces1_irq_timer_callback )
{
aces1_state *state = machine.driver_data<aces1_state>();
// printf("irq\n");
- device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
state->aces1_reset_irq_timer();
}
@@ -162,7 +162,7 @@ static TIMER_CALLBACK( m_aces1_nmi_timer_callback )
{
aces1_state *state = machine.driver_data<aces1_state>();
// printf("nmi\n");
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
state->aces1_reset_nmi_timer();
}
diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c
index a31c0cd08f8..10f56fc6118 100644
--- a/src/mame/drivers/actfancr.c
+++ b/src/mame/drivers/actfancr.c
@@ -56,7 +56,7 @@ READ8_MEMBER(actfancr_state::triothep_control_r)
WRITE8_MEMBER(actfancr_state::actfancr_sound_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/******************************************************************************/
@@ -279,7 +279,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int linestate)
{
actfancr_state *state = device->machine().driver_data<actfancr_state>();
- device_set_input_line(state->m_audiocpu, 0, linestate); /* IRQ */
+ state->m_audiocpu->set_input_line(0, linestate); /* IRQ */
}
static const ym3812_interface ym3812_config =
@@ -293,8 +293,8 @@ static MACHINE_START( actfancr )
{
actfancr_state *state = machine.driver_data<actfancr_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
}
static MACHINE_START( triothep )
diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c
index 6619c0b4c0e..e68a9ca6f13 100644
--- a/src/mame/drivers/adp.c
+++ b/src/mame/drivers/adp.c
@@ -173,7 +173,7 @@ public:
struct { int r,g,b,offs,offs_internal; } m_pal;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
device_t *m_duart;
DECLARE_READ16_MEMBER(test_r);
DECLARE_WRITE16_MEMBER(wh2_w);
@@ -269,7 +269,7 @@ if (!screen.machine().input().code_pressed(KEYCODE_O)) // debug: toggle window
static void duart_irq_handler( device_t *device, int state, UINT8 vector )
{
adp_state *adp = device->machine().driver_data<adp_state>();
- device_set_input_line_and_vector(adp->m_maincpu, 4, state, vector);
+ adp->m_maincpu->set_input_line_and_vector(4, state, vector);
}
static void duart_tx( device_t *device, int channel, UINT8 data )
@@ -301,7 +301,7 @@ static MACHINE_START( skattv )
{
adp_state *state = machine.driver_data<adp_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_duart = machine.device("duart68681");
//state->m_h63484 = machine.device("h63484");
@@ -623,7 +623,7 @@ INPUT_PORTS_END
/*
static INTERRUPT_GEN( adp_int )
{
- device_set_input_line(device, 1, HOLD_LINE); // ??? All irqs have the same vector, and the mask used is 0 or 7
+ device->execute().set_input_line(1, HOLD_LINE); // ??? All irqs have the same vector, and the mask used is 0 or 7
}
*/
static const ay8910_interface ay8910_config =
diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c
index a5c083f0a74..3e8cbe50c79 100644
--- a/src/mame/drivers/aeroboto.c
+++ b/src/mame/drivers/aeroboto.c
@@ -44,7 +44,7 @@ static INTERRUPT_GEN( aeroboto_interrupt )
aeroboto_state *state = device->machine().driver_data<aeroboto_state>();
if (!state->m_disable_irq)
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
else
state->m_disable_irq--;
}
diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c
index 0bb730c3900..d04578c14d5 100644
--- a/src/mame/drivers/aerofgt.c
+++ b/src/mame/drivers/aerofgt.c
@@ -72,7 +72,7 @@ WRITE16_MEMBER(aerofgt_state::sound_command_w)
{
m_pending_command = 1;
soundlatch_byte_w(space, offset, data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -82,7 +82,7 @@ WRITE16_MEMBER(aerofgt_state::turbofrc_sound_command_w)
{
m_pending_command = 1;
soundlatch_byte_w(space, offset, (data >> 8) & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -91,7 +91,7 @@ WRITE16_MEMBER(aerofgt_state::aerfboot_soundlatch_w)
if(ACCESSING_BITS_8_15)
{
soundlatch_byte_w(space, 0, (data >> 8) & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -1280,7 +1280,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int irq )
{
aerofgt_state *state = device->machine().driver_data<aerofgt_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
@@ -1298,7 +1298,7 @@ static MACHINE_START( common )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_pending_command));
}
diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c
index 044668777b3..6dd11b69e95 100644
--- a/src/mame/drivers/airbustr.c
+++ b/src/mame/drivers/airbustr.c
@@ -261,7 +261,7 @@ READ8_MEMBER(airbustr_state::devram_r)
WRITE8_MEMBER(airbustr_state::master_nmi_trigger_w)
{
- device_set_input_line(m_slave, INPUT_LINE_NMI, PULSE_LINE);
+ m_slave->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(airbustr_state::master_bankswitch_w)
@@ -308,7 +308,7 @@ WRITE8_MEMBER(airbustr_state::soundcommand_w)
{
soundlatch_byte_w(space, 0, data);
m_soundlatch_status = 1; // soundlatch has been written
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); // cause a nmi to sub cpu
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); // cause a nmi to sub cpu
}
WRITE8_MEMBER(airbustr_state::soundcommand2_w)
@@ -563,7 +563,7 @@ static TIMER_DEVICE_CALLBACK( airbustr_scanline )
/* Sub Z80 uses IM2 too, but 0xff irq routine just contains an irq ack in it */
static INTERRUPT_GEN( slave_interrupt )
{
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xfd);
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
}
/* Machine Initialization */
@@ -584,7 +584,7 @@ static MACHINE_START( airbustr )
state->m_master = machine.device("master");
state->m_slave = machine.device("slave");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_pandora = machine.device("pandora");
state->save_item(NAME(state->m_soundlatch_status));
diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c
index 2b98d1a93b4..b796a8452c2 100644
--- a/src/mame/drivers/aliens.c
+++ b/src/mame/drivers/aliens.c
@@ -24,7 +24,7 @@ static INTERRUPT_GEN( aliens_interrupt )
aliens_state *state = device->machine().driver_data<aliens_state>();
if (k051960_is_irq_enabled(state->m_k051960))
- device_set_input_line(device, KONAMI_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
}
READ8_MEMBER(aliens_state::bankedram_r)
@@ -70,7 +70,7 @@ WRITE8_MEMBER(aliens_state::aliens_sh_irqtrigger_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(aliens_state::aliens_snd_bankswitch_w)
@@ -234,8 +234,8 @@ static MACHINE_START( aliens )
state->membank("bank1")->configure_entries(0, 20, &ROM[0x10000], 0x2000);
state->membank("bank1")->set_entry(0);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k007232 = machine.device("k007232");
state->m_k052109 = machine.device("k052109");
state->m_k051960 = machine.device("k051960");
diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c
index ae8a2a05341..c9dd15f2737 100644
--- a/src/mame/drivers/alpha68k.c
+++ b/src/mame/drivers/alpha68k.c
@@ -315,7 +315,7 @@ WRITE16_MEMBER(alpha68k_state::paddlema_soundlatch_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
}
@@ -324,7 +324,7 @@ WRITE16_MEMBER(alpha68k_state::tnextspc_soundlatch_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
//ZT
@@ -1851,7 +1851,7 @@ static const ym2203_interface ym2203_config =
static void YM3812_irq( device_t *device, int param )
{
alpha68k_state *state = device->machine().driver_data<alpha68k_state>();
- device_set_input_line(state->m_audiocpu, 0, (param) ? HOLD_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, (param) ? HOLD_LINE : CLEAR_LINE);
}
static const ym3812_interface ym3812_config =
@@ -1867,7 +1867,7 @@ static MACHINE_START( common )
{
alpha68k_state *state = machine.driver_data<alpha68k_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_trigstate));
state->save_item(NAME(state->m_deposits1));
@@ -2128,7 +2128,7 @@ static INTERRUPT_GEN( alpha68k_sound_nmi )
alpha68k_state *state = device->machine().driver_data<alpha68k_state>();
if(state->m_sound_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state )
diff --git a/src/mame/drivers/amaticmg.c b/src/mame/drivers/amaticmg.c
index 532986e572c..0a33e4400eb 100644
--- a/src/mame/drivers/amaticmg.c
+++ b/src/mame/drivers/amaticmg.c
@@ -908,7 +908,7 @@ static INTERRUPT_GEN( amaticmg2_irq )
amaticmg_state *state = device->machine().driver_data<amaticmg_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/amspdwy.c b/src/mame/drivers/amspdwy.c
index 7eeedfdc9d8..7337b6f82f2 100644
--- a/src/mame/drivers/amspdwy.c
+++ b/src/mame/drivers/amspdwy.c
@@ -71,7 +71,7 @@ READ8_MEMBER(amspdwy_state::amspdwy_sound_r)
WRITE8_MEMBER(amspdwy_state::amspdwy_sound_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( amspdwy_map, AS_PROGRAM, 8, amspdwy_state )
@@ -242,7 +242,7 @@ GFXDECODE_END
static void irq_handler( device_t *device, int irq )
{
amspdwy_state *state = device->machine().driver_data<amspdwy_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface amspdwy_ym2151_interface =
@@ -254,7 +254,7 @@ static MACHINE_START( amspdwy )
{
amspdwy_state *state = machine.driver_data<amspdwy_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_flipscreen));
state->save_item(NAME(state->m_wheel_old));
diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c
index 0f49f165a53..1d30f634d68 100644
--- a/src/mame/drivers/angelkds.c
+++ b/src/mame/drivers/angelkds.c
@@ -510,7 +510,7 @@ READ8_MEMBER(angelkds_state::angelkds_sub_sound_r)
static void irqhandler( device_t *device, int irq )
{
angelkds_state *state = device->machine().driver_data<angelkds_state>();
- device_set_input_line(state->m_subcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_subcpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
@@ -572,7 +572,7 @@ static MACHINE_START( angelkds )
{
angelkds_state *state = machine.driver_data<angelkds_state>();
- state->m_subcpu = machine.device("sub");
+ state->m_subcpu = machine.device<cpu_device>("sub");
state->save_item(NAME(state->m_layer_ctrl));
state->save_item(NAME(state->m_txbank));
diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c
index 2a473f41e58..b16a5364172 100644
--- a/src/mame/drivers/appoooh.c
+++ b/src/mame/drivers/appoooh.c
@@ -436,7 +436,7 @@ static INTERRUPT_GEN( vblank_irq )
appoooh_state *state = device->machine().driver_data<appoooh_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( appoooh_common, appoooh_state )
diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c
index dc51a5524bc..7b6aa06f537 100644
--- a/src/mame/drivers/aquarium.c
+++ b/src/mame/drivers/aquarium.c
@@ -63,7 +63,7 @@ WRITE16_MEMBER(aquarium_state::aquarium_sound_w)
// popmessage("sound write %04x",data);
soundlatch_byte_w(space, 1, data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE );
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE );
}
WRITE8_MEMBER(aquarium_state::aquarium_z80_bank_w)
@@ -291,7 +291,7 @@ GFXDECODE_END
static void irq_handler( device_t *device, int irq )
{
aquarium_state *state = device->machine().driver_data<aquarium_state>();
- device_set_input_line(state->m_audiocpu, 0 , irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0 , irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface ym2151_config =
@@ -304,7 +304,7 @@ static MACHINE_START( aquarium )
{
aquarium_state *state = machine.driver_data<aquarium_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_aquarium_snd_ack));
}
diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c
index aa111428768..1069985986b 100644
--- a/src/mame/drivers/ashnojoe.c
+++ b/src/mame/drivers/ashnojoe.c
@@ -273,7 +273,7 @@ GFXDECODE_END
static void ym2203_irq_handler( device_t *device, int irq )
{
ashnojoe_state *state = device->machine().driver_data<ashnojoe_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
WRITE8_MEMBER(ashnojoe_state::ym2203_write_a)
@@ -314,7 +314,7 @@ static void ashnojoe_vclk_cb( device_t *device )
else
{
msm5205_data_w(device, state->m_adpcm_byte & 0xf);
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
state->m_msm5205_vclk_toggle ^= 1;
@@ -331,7 +331,7 @@ static MACHINE_START( ashnojoe )
{
ashnojoe_state *state = machine.driver_data<ashnojoe_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_adpcm_byte));
state->save_item(NAME(state->m_soundlatch_status));
diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c
index 9bb80438958..d0ac20aa339 100644
--- a/src/mame/drivers/asterix.c
+++ b/src/mame/drivers/asterix.c
@@ -61,7 +61,7 @@ static INTERRUPT_GEN( asterix_interrupt )
if (!k056832_is_irq_enabled(state->m_k056832, 0))
return;
- device_set_input_line(device, 5, HOLD_LINE); /* ??? All irqs have the same vector, and the mask used is 0 or 7 */
+ device->execute().set_input_line(5, HOLD_LINE); /* ??? All irqs have the same vector, and the mask used is 0 or 7 */
}
READ8_MEMBER(asterix_state::asterix_sound_r)
@@ -73,19 +73,19 @@ READ8_MEMBER(asterix_state::asterix_sound_r)
static TIMER_CALLBACK( nmi_callback )
{
asterix_state *state = machine.driver_data<asterix_state>();
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
WRITE8_MEMBER(asterix_state::sound_arm_nmi_w)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
machine().scheduler().timer_set(attotime::from_usec(5), FUNC(nmi_callback));
}
WRITE16_MEMBER(asterix_state::sound_irq_w)
{
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
// Check the routine at 7f30 in the ead version.
@@ -247,8 +247,8 @@ static MACHINE_START( asterix )
{
asterix_state *state = machine.driver_data<asterix_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k053260 = machine.device("k053260");
state->m_k056832 = machine.device("k056832");
state->m_k053244 = machine.device("k053244");
diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c
index 69dcfd0871f..7cc5c206a38 100644
--- a/src/mame/drivers/astinvad.c
+++ b/src/mame/drivers/astinvad.c
@@ -218,7 +218,7 @@ static SCREEN_UPDATE_RGB32( spaceint )
static TIMER_CALLBACK( kamikaze_int_off )
{
astinvad_state *state = machine.driver_data<astinvad_state>();
- device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);
+ state->m_maincpu->set_input_line(0, CLEAR_LINE);
}
@@ -226,7 +226,7 @@ static TIMER_CALLBACK( kamizake_int_gen )
{
astinvad_state *state = machine.driver_data<astinvad_state>();
/* interrupts are asserted on every state change of the 128V line */
- device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
+ state->m_maincpu->set_input_line(0, ASSERT_LINE);
param ^= 128;
state->m_int_timer->adjust(machine.primary_screen->time_until_pos(param), param);
@@ -284,7 +284,7 @@ static MACHINE_RESET( spaceint )
INPUT_CHANGED_MEMBER(astinvad_state::spaceint_coin_inserted)
{
/* coin insertion causes an NMI */
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c
index 19c46c847f2..1932d383b8b 100644
--- a/src/mame/drivers/astrof.c
+++ b/src/mame/drivers/astrof.c
@@ -81,7 +81,7 @@
READ8_MEMBER(astrof_state::irq_clear_r)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
return 0;
}
@@ -90,7 +90,7 @@ READ8_MEMBER(astrof_state::irq_clear_r)
static TIMER_DEVICE_CALLBACK( irq_callback )
{
astrof_state *state = timer.machine().driver_data<astrof_state>();
- device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
+ state->m_maincpu->set_input_line(0, ASSERT_LINE);
}
@@ -105,7 +105,7 @@ INPUT_CHANGED_MEMBER(astrof_state::coin_inserted)
{
/* coin insertion causes an NMI */
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
coin_counter_w(machine(), 0, newval);
}
@@ -114,7 +114,7 @@ INPUT_CHANGED_MEMBER(astrof_state::service_coin_inserted)
{
/* service coin insertion causes an NMI */
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
@@ -490,7 +490,7 @@ static MACHINE_START( astrof )
/* the 74175 outputs all HI's if not otherwise set */
astrof_set_video_control_2(machine, 0xff);
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_samples = machine.device<samples_device>("samples");
/* register for state saving */
@@ -524,7 +524,7 @@ static MACHINE_START( spfghmk2 )
/* the 74175 outputs all HI's if not otherwise set */
spfghmk2_set_video_control_2(machine, 0xff);
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
/* the red background circuit is disabled */
state->m_red_on = FALSE;
@@ -543,7 +543,7 @@ static MACHINE_START( tomahawk )
/* the 74175 outputs all HI's if not otherwise set */
tomahawk_set_video_control_2(machine, 0xff);
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_sn = machine.device("snsnd");
/* register for state saving */
diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c
index 83dddf9e05d..efa1fbb3677 100644
--- a/src/mame/drivers/asuka.c
+++ b/src/mame/drivers/asuka.c
@@ -233,13 +233,13 @@ DIP locations verified for:
static TIMER_CALLBACK( cadash_interrupt5 )
{
asuka_state *state = machine.driver_data<asuka_state>();
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE);
+ state->m_maincpu->set_input_line(5, HOLD_LINE);
}
static INTERRUPT_GEN( cadash_interrupt )
{
device->machine().scheduler().timer_set(downcast<cpu_device *>(device)->cycles_to_attotime(500), FUNC(cadash_interrupt5));
- device_set_input_line(device, 4, HOLD_LINE); /* interrupt vector 4 */
+ device->execute().set_input_line(4, HOLD_LINE); /* interrupt vector 4 */
}
@@ -837,8 +837,8 @@ static MACHINE_START( asuka )
{
asuka_state *state = machine.driver_data<asuka_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_pc090oj = machine.device("pc090oj");
state->m_tc0100scn = machine.device("tc0100scn");
diff --git a/src/mame/drivers/atarifb.c b/src/mame/drivers/atarifb.c
index 9631849363c..0c20f665b02 100644
--- a/src/mame/drivers/atarifb.c
+++ b/src/mame/drivers/atarifb.c
@@ -508,7 +508,7 @@ static MACHINE_START( atarifb )
{
atarifb_state *state = machine.driver_data<atarifb_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_CTRLD));
state->save_item(NAME(state->m_sign_x_1));
diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c
index 782056b292a..4b208680a26 100644
--- a/src/mame/drivers/avt.c
+++ b/src/mame/drivers/avt.c
@@ -884,7 +884,7 @@ static INTERRUPT_GEN( avt_vblank_irq )
{
avt_state *state = device->machine().driver_data<avt_state>();
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x06);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x06);
}
static MACHINE_CONFIG_START( avt, avt_state )
diff --git a/src/mame/drivers/aztarac.c b/src/mame/drivers/aztarac.c
index 0e7df8de9d6..944cb38d599 100644
--- a/src/mame/drivers/aztarac.c
+++ b/src/mame/drivers/aztarac.c
@@ -37,7 +37,7 @@ static IRQ_CALLBACK(aztarac_irq_callback)
static MACHINE_RESET( aztarac )
{
- device_set_irq_callback(machine.device("maincpu"), aztarac_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(aztarac_irq_callback);
}
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c
index 8ee18b28898..c86f3e6cb7d 100644
--- a/src/mame/drivers/backfire.c
+++ b/src/mame/drivers/backfire.c
@@ -42,7 +42,7 @@ public:
bitmap_ind16 *m_right;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
device_t *m_deco_tilegen1;
device_t *m_deco_tilegen2;
@@ -433,7 +433,7 @@ static const ymz280b_interface ymz280b_intf =
static INTERRUPT_GEN( deco32_vbl_interrupt )
{
- device_set_input_line(device, ARM_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE);
}
@@ -475,7 +475,7 @@ static MACHINE_START( backfire )
{
backfire_state *state = machine.driver_data<backfire_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_deco_tilegen1 = machine.device("tilegen1");
state->m_deco_tilegen2 = machine.device("tilegen2");
state->m_lscreen = machine.device("lscreen");
@@ -701,8 +701,8 @@ READ32_MEMBER(backfire_state::backfire_speedup_r)
//mame_printf_debug( "%08x\n",space.device().safe_pc());
- if (space.device() .safe_pc()== 0xce44) device_spin_until_time(&space.device(), attotime::from_usec(400)); // backfire
- if (space.device().safe_pc() == 0xcee4) device_spin_until_time(&space.device(), attotime::from_usec(400)); // backfirea
+ if (space.device() .safe_pc()== 0xce44) space.device().execute().spin_until_time(attotime::from_usec(400)); // backfire
+ if (space.device().safe_pc() == 0xcee4) space.device().execute().spin_until_time(attotime::from_usec(400)); // backfirea
return m_mainram[0x18/4];
}
diff --git a/src/mame/drivers/bagman.c b/src/mame/drivers/bagman.c
index 073c66f3681..5eb87cfd2a4 100644
--- a/src/mame/drivers/bagman.c
+++ b/src/mame/drivers/bagman.c
@@ -467,7 +467,7 @@ static INTERRUPT_GEN( vblank_irq )
bagman_state *state = device->machine().driver_data<bagman_state>();
if(state->m_irq_mask)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/bankp.c b/src/mame/drivers/bankp.c
index a4c0733f692..d085b507989 100644
--- a/src/mame/drivers/bankp.c
+++ b/src/mame/drivers/bankp.c
@@ -295,7 +295,7 @@ static INTERRUPT_GEN( vblank_irq )
bankp_state *state = device->machine().driver_data<bankp_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( bankp, bankp_state )
diff --git a/src/mame/drivers/battlane.c b/src/mame/drivers/battlane.c
index dcbe0076b8a..ae38679f403 100644
--- a/src/mame/drivers/battlane.c
+++ b/src/mame/drivers/battlane.c
@@ -48,8 +48,8 @@ WRITE8_MEMBER(battlane_state::battlane_cpu_command_w)
/*
if (~m_cpu_control & 0x08)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
- device_set_input_line(m_subcpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
*/
@@ -57,7 +57,7 @@ WRITE8_MEMBER(battlane_state::battlane_cpu_command_w)
CPU2's SWI will trigger an 6809 IRQ on the master by resetting 0x04
Master will respond by setting the bit back again
*/
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, data & 0x04 ? CLEAR_LINE : HOLD_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, data & 0x04 ? CLEAR_LINE : HOLD_LINE);
/*
Slave function call (e.g. ROM test):
@@ -75,7 +75,7 @@ WRITE8_MEMBER(battlane_state::battlane_cpu_command_w)
FA96: 27 FA BEQ $FA92 ; Wait for bit to be set
*/
- device_set_input_line(m_subcpu, M6809_IRQ_LINE, data & 0x02 ? CLEAR_LINE : HOLD_LINE);
+ m_subcpu->set_input_line(M6809_IRQ_LINE, data & 0x02 ? CLEAR_LINE : HOLD_LINE);
}
static INTERRUPT_GEN( battlane_cpu1_interrupt )
@@ -85,8 +85,8 @@ static INTERRUPT_GEN( battlane_cpu1_interrupt )
/* See note in battlane_cpu_command_w */
if (~state->m_cpu_control & 0x08)
{
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
- device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ state->m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -271,8 +271,8 @@ static MACHINE_START( battlane )
{
battlane_state *state = machine.driver_data<battlane_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_subcpu = machine.device("sub");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_subcpu = machine.device<cpu_device>("sub");
state->save_item(NAME(state->m_video_ctrl));
state->save_item(NAME(state->m_cpu_control));
diff --git a/src/mame/drivers/battlex.c b/src/mame/drivers/battlex.c
index 6f101c1a99d..9b79911ad99 100644
--- a/src/mame/drivers/battlex.c
+++ b/src/mame/drivers/battlex.c
@@ -52,7 +52,7 @@ static INTERRUPT_GEN( battlex_interrupt )
{
battlex_state *state = device->machine().driver_data<battlex_state>();
state->m_in0_b4 = 1;
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
CUSTOM_INPUT_MEMBER(battlex_state::battlex_in0_b4_r)
diff --git a/src/mame/drivers/battlnts.c b/src/mame/drivers/battlnts.c
index 51b8c054ae5..a3feee626ac 100644
--- a/src/mame/drivers/battlnts.c
+++ b/src/mame/drivers/battlnts.c
@@ -29,12 +29,12 @@ static INTERRUPT_GEN( battlnts_interrupt )
{
battlnts_state *state = device->machine().driver_data<battlnts_state>();
if (k007342_is_int_enabled(state->m_k007342))
- device_set_input_line(device, HD6309_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(battlnts_state::battlnts_sh_irqtrigger_w)
{
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(battlnts_state::battlnts_bankswitch_w)
@@ -228,7 +228,7 @@ static MACHINE_START( battlnts )
state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k007342 = machine.device("k007342");
state->m_k007420 = machine.device("k007420");
diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c
index d5b59ce0d66..15aff6dcdc5 100644
--- a/src/mame/drivers/bbusters.c
+++ b/src/mame/drivers/bbusters.c
@@ -281,7 +281,7 @@ WRITE16_MEMBER(bbusters_state::gun_select_w)
logerror("%08x: gun r\n",space.device().safe_pc());
- device_set_input_line(&space.device(), 2, HOLD_LINE);
+ space.device().execute().set_input_line(2, HOLD_LINE);
m_gun_select = data & 0xff;
}
diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c
index 528ab326732..86c621828fa 100644
--- a/src/mame/drivers/beaminv.c
+++ b/src/mame/drivers/beaminv.c
@@ -73,7 +73,7 @@ public:
UINT8 m_controller_select;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
DECLARE_READ8_MEMBER(v128_r);
DECLARE_WRITE8_MEMBER(controller_select_w);
DECLARE_READ8_MEMBER(controller_r);
@@ -101,7 +101,7 @@ static TIMER_CALLBACK( interrupt_callback )
int next_interrupt_number;
int next_vpos;
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
/* set up for next interrupt */
next_interrupt_number = (interrupt_number + 1) % INTERRUPTS_PER_FRAME;
@@ -138,7 +138,7 @@ static MACHINE_START( beaminv )
beaminv_state *state = machine.driver_data<beaminv_state>();
create_interrupt_timer(machine);
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
/* setup for save states */
state->save_item(NAME(state->m_controller_select));
diff --git a/src/mame/drivers/beathead.c b/src/mame/drivers/beathead.c
index 52283dd0265..5f25634372a 100644
--- a/src/mame/drivers/beathead.c
+++ b/src/mame/drivers/beathead.c
@@ -499,7 +499,7 @@ READ32_MEMBER( beathead_state::speedup_r )
{
int result = *m_speedup_data;
if ((space.device().safe_pcbase() & 0xfffff) == 0x006f0 && result == space.device().state().state_int(ASAP_R3))
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
return result;
}
@@ -512,7 +512,7 @@ READ32_MEMBER( beathead_state::movie_speedup_r )
{
UINT32 temp = (INT16)result + m_movie_speedup_data[4] * 262;
if (temp - (UINT32)space.device().state().state_int(ASAP_R15) < (UINT32)space.device().state().state_int(ASAP_R23))
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
}
return result;
}
diff --git a/src/mame/drivers/beezer.c b/src/mame/drivers/beezer.c
index cc03ca32346..ef4f2dc38ca 100644
--- a/src/mame/drivers/beezer.c
+++ b/src/mame/drivers/beezer.c
@@ -81,7 +81,7 @@ static MACHINE_START(beezer)
{
beezer_state *state = machine.driver_data<beezer_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
}
static MACHINE_CONFIG_START( beezer, beezer_state )
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index 20ee883039d..aa378719e25 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -740,7 +740,7 @@ static void RunBlit(address_space *space)
} while (blitter.command & CMD_RUN);
/* Burn Z80 cycles while blitter is in operation */
- device_spin_until_time(&space->device(), attotime::from_nsec( (1000000000 / Z80_XTAL)*cycles_used * 2 ) );
+ space->device().execute().spin_until_time(attotime::from_nsec( (1000000000 / Z80_XTAL)*cycles_used * 2 ) );
}
diff --git a/src/mame/drivers/bfm_sc5.c b/src/mame/drivers/bfm_sc5.c
index 9e1bb01c32f..135bee44c85 100644
--- a/src/mame/drivers/bfm_sc5.c
+++ b/src/mame/drivers/bfm_sc5.c
@@ -48,7 +48,7 @@ INPUT_PORTS_END
static INTERRUPT_GEN( sc5_fake_timer_int )
{
// this should be coming from the Timer / SIM modules of the Coldfire
- device_set_input_line_and_vector((legacy_cpu_device*)device->machine().device("maincpu"), 5, HOLD_LINE, 0x8c);
+ device->machine().device("maincpu")->execute().set_input_line_and_vector(5, HOLD_LINE, 0x8c);
}
static MACHINE_CONFIG_START( sc5, sc5_state )
diff --git a/src/mame/drivers/bigevglf.c b/src/mame/drivers/bigevglf.c
index 8e33313085b..fda5173534d 100644
--- a/src/mame/drivers/bigevglf.c
+++ b/src/mame/drivers/bigevglf.c
@@ -112,7 +112,7 @@ static TIMER_CALLBACK( nmi_callback )
bigevglf_state *state = machine.driver_data<bigevglf_state>();
if (state->m_sound_nmi_enable)
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
else
state->m_pending_nmi = 1;
state->m_sound_state &= ~1;
@@ -140,7 +140,7 @@ WRITE8_MEMBER(bigevglf_state::nmi_enable_w)
m_sound_nmi_enable = 1;
if (m_pending_nmi)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
m_pending_nmi = 0;
}
}
@@ -420,7 +420,7 @@ static MACHINE_START( bigevglf )
{
bigevglf_state *state = machine.driver_data<bigevglf_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_mcu = machine.device("mcu");
state->save_item(NAME(state->m_vidram_bank));
diff --git a/src/mame/drivers/bingor.c b/src/mame/drivers/bingor.c
index e6328cb47e0..ccc18592925 100644
--- a/src/mame/drivers/bingor.c
+++ b/src/mame/drivers/bingor.c
@@ -588,13 +588,13 @@ INPUT_PORTS_END
static INTERRUPT_GEN( vblank_irq )
{
-// device_set_input_line_and_vector(device,0,HOLD_LINE,0x08/4); // reads i/o 0x200 and puts the result in ram, pic irq?
- device_set_input_line_and_vector(device,0,HOLD_LINE,0x4c/4); // ?
+// device->execute().set_input_line_and_vector(0,HOLD_LINE,0x08/4); // reads i/o 0x200 and puts the result in ram, pic irq?
+ device->execute().set_input_line_and_vector(0,HOLD_LINE,0x4c/4); // ?
}
static INTERRUPT_GEN( unk_irq )
{
- device_set_input_line_and_vector(device,0,HOLD_LINE,0x48/4); // ?
+ device->execute().set_input_line_and_vector(0,HOLD_LINE,0x48/4); // ?
}
diff --git a/src/mame/drivers/bishi.c b/src/mame/drivers/bishi.c
index 03f8f8b98f2..28ff0f899ce 100644
--- a/src/mame/drivers/bishi.c
+++ b/src/mame/drivers/bishi.c
@@ -363,7 +363,7 @@ static void sound_irq_gen(device_t *device, int state)
{
bishi_state *bishi = device->machine().driver_data<bishi_state>();
- device_set_input_line(bishi->m_maincpu, M68K_IRQ_1, (state) ? ASSERT_LINE : CLEAR_LINE);
+ bishi->m_maincpu->set_input_line(M68K_IRQ_1, (state) ? ASSERT_LINE : CLEAR_LINE);
}
static const ymz280b_interface ymz280b_intf =
@@ -392,7 +392,7 @@ static MACHINE_START( bishi )
{
bishi_state *state = machine.driver_data<bishi_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_k056832 = machine.device("k056832");
state->m_k054338 = machine.device("k054338");
state->m_k055555 = machine.device("k055555");
diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c
index b9b09fa0efc..897e915470b 100644
--- a/src/mame/drivers/bking.c
+++ b/src/mame/drivers/bking.c
@@ -44,7 +44,7 @@ WRITE8_MEMBER(bking_state::bking_soundlatch_w)
soundlatch_byte_w(space, offset, code);
if (m_sound_nmi_enable)
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(bking_state::bking3_addr_l_w)
@@ -392,7 +392,7 @@ static MACHINE_START( bking )
{
bking_state *state = machine.driver_data<bking_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
/* video */
state->save_item(NAME(state->m_pc3259_output));
diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c
index c9c847543bd..7d5a9296c3c 100644
--- a/src/mame/drivers/bladestl.c
+++ b/src/mame/drivers/bladestl.c
@@ -91,7 +91,7 @@ WRITE8_MEMBER(bladestl_state::bladestl_sh_irqtrigger_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE);
+ m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
//logerror("(sound) write %02x\n", data);
}
@@ -308,7 +308,7 @@ static MACHINE_START( bladestl )
state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k007342 = machine.device("k007342");
state->m_k007420 = machine.device("k007420");
diff --git a/src/mame/drivers/blktiger.c b/src/mame/drivers/blktiger.c
index 73313d12d35..570ad95a5d2 100644
--- a/src/mame/drivers/blktiger.c
+++ b/src/mame/drivers/blktiger.c
@@ -33,13 +33,13 @@ READ8_MEMBER(blktiger_state::blktiger_from_mcu_r)
WRITE8_MEMBER(blktiger_state::blktiger_to_mcu_w)
{
- device_set_input_line(m_mcu, MCS51_INT1_LINE, ASSERT_LINE);
+ m_mcu->execute().set_input_line(MCS51_INT1_LINE, ASSERT_LINE);
m_z80_latch = data;
}
READ8_MEMBER(blktiger_state::blktiger_from_main_r)
{
- device_set_input_line(m_mcu, MCS51_INT1_LINE, CLEAR_LINE);
+ m_mcu->execute().set_input_line(MCS51_INT1_LINE, CLEAR_LINE);
//printf("%02x read\n",latch);
return m_z80_latch;
}
@@ -262,7 +262,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int irq )
{
blktiger_state *state = device->machine().driver_data<blktiger_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
@@ -279,7 +279,7 @@ static MACHINE_START( blktiger )
{
blktiger_state *state = machine.driver_data<blktiger_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_mcu = machine.device("mcu");
/* configure bankswitching */
diff --git a/src/mame/drivers/blockade.c b/src/mame/drivers/blockade.c
index 6767315bde6..49ee1fc5965 100644
--- a/src/mame/drivers/blockade.c
+++ b/src/mame/drivers/blockade.c
@@ -61,12 +61,12 @@
static INTERRUPT_GEN( blockade_interrupt )
{
blockade_state *state = device->machine().driver_data<blockade_state>();
- device_resume(device, SUSPEND_ANY_REASON);
+ device->execute().resume(SUSPEND_ANY_REASON);
if ((state->ioport("IN0")->read() & 0x80) == 0)
{
state->m_just_been_reset = 1;
- device_set_input_line(device, INPUT_LINE_RESET, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
}
diff --git a/src/mame/drivers/blockhl.c b/src/mame/drivers/blockhl.c
index 20d7997647e..fa53f9e224a 100644
--- a/src/mame/drivers/blockhl.c
+++ b/src/mame/drivers/blockhl.c
@@ -35,7 +35,7 @@ static INTERRUPT_GEN( blockhl_interrupt )
blockhl_state *state = device->machine().driver_data<blockhl_state>();
if (k052109_is_irq_enabled(state->m_k052109) && state->m_rombank == 0) /* kludge to prevent crashes */
- device_set_input_line(device, KONAMI_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
}
READ8_MEMBER(blockhl_state::bankedram_r)
@@ -58,7 +58,7 @@ WRITE8_MEMBER(blockhl_state::bankedram_w)
WRITE8_MEMBER(blockhl_state::blockhl_sh_irqtrigger_w)
{
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
@@ -193,8 +193,8 @@ static MACHINE_START( blockhl )
state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k052109 = machine.device("k052109");
state->m_k051960 = machine.device("k051960");
diff --git a/src/mame/drivers/blockout.c b/src/mame/drivers/blockout.c
index cd74b7a5ff5..1ea6719df85 100644
--- a/src/mame/drivers/blockout.c
+++ b/src/mame/drivers/blockout.c
@@ -80,20 +80,20 @@ WRITE16_MEMBER(blockout_state::blockout_sound_command_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, offset, data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
WRITE16_MEMBER(blockout_state::blockout_irq6_ack_w)
{
- device_set_input_line(m_maincpu, 6, CLEAR_LINE);
+ m_maincpu->set_input_line(6, CLEAR_LINE);
}
WRITE16_MEMBER(blockout_state::blockout_irq5_ack_w)
{
- device_set_input_line(m_maincpu, 5, CLEAR_LINE);
+ m_maincpu->set_input_line(5, CLEAR_LINE);
}
/*************************************
@@ -263,7 +263,7 @@ INPUT_PORTS_END
static void blockout_irq_handler(device_t *device, int irq)
{
blockout_state *state = device->machine().driver_data<blockout_state>();
- device_set_input_line_and_vector(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff);
+ state->m_audiocpu->set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff);
}
static const ym2151_interface ym2151_config =
@@ -282,8 +282,8 @@ static MACHINE_START( blockout )
{
blockout_state *state = machine.driver_data<blockout_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_color));
}
@@ -301,10 +301,10 @@ static TIMER_DEVICE_CALLBACK( blockout_scanline )
int scanline = param;
if(scanline == 248) // vblank-out irq
- device_set_input_line(state->m_maincpu, 6, ASSERT_LINE);
+ state->m_maincpu->set_input_line(6, ASSERT_LINE);
if(scanline == 0) // vblank-in irq or directly tied to coin inputs (TODO: check)
- device_set_input_line(state->m_maincpu, 5, ASSERT_LINE);
+ state->m_maincpu->set_input_line(5, ASSERT_LINE);
}
static MACHINE_CONFIG_START( blockout, blockout_state )
diff --git a/src/mame/drivers/blueprnt.c b/src/mame/drivers/blueprnt.c
index 97c04602a2e..4ca76660a32 100644
--- a/src/mame/drivers/blueprnt.c
+++ b/src/mame/drivers/blueprnt.c
@@ -70,7 +70,7 @@ READ8_MEMBER(blueprnt_state::blueprnt_sh_dipsw_r)
WRITE8_MEMBER(blueprnt_state::blueprnt_sound_command_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(blueprnt_state::blueprnt_coin_counter_w)
@@ -279,7 +279,7 @@ static MACHINE_START( blueprnt )
{
blueprnt_state *state = machine.driver_data<blueprnt_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_dipsw));
}
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index f0872239ea7..ed86bd1a57b 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -1330,7 +1330,7 @@ static IRQ_CALLBACK(irq_callback)
for(i=15; i>=0 && !(state->m_irqreq & (1<<i)); i--);
state->m_irqreq &= ~(1<<i);
if(!state->m_irqreq)
- device_set_input_line(device, 0, CLEAR_LINE);
+ device->execute().set_input_line(0, CLEAR_LINE);
return i;
}
@@ -1339,7 +1339,7 @@ static void irq_init(running_machine &machine)
bnstars_state *state = machine.driver_data<bnstars_state>();
state->m_irqreq = 0;
machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
- device_set_irq_callback(machine.device("maincpu"), irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
}
static void irq_raise(running_machine &machine, int level)
diff --git a/src/mame/drivers/bombjack.c b/src/mame/drivers/bombjack.c
index 860b71fe645..fa3b91586f2 100644
--- a/src/mame/drivers/bombjack.c
+++ b/src/mame/drivers/bombjack.c
@@ -354,7 +354,7 @@ static INTERRUPT_GEN( vblank_irq )
bombjack_state *state = device->machine().driver_data<bombjack_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( bombjack, bombjack_state )
diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c
index 0eb23f2fcbe..dc1d2a274f9 100644
--- a/src/mame/drivers/boogwing.c
+++ b/src/mame/drivers/boogwing.c
@@ -278,7 +278,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
boogwing_state *driver_state = device->machine().driver_data<boogwing_state>();
- device_set_input_line(driver_state->m_audiocpu, 1, state); /* IRQ 2 */
+ driver_state->m_audiocpu->set_input_line(1, state); /* IRQ 2 */
}
WRITE8_MEMBER(boogwing_state::sound_bankswitch_w)
diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c
index af8934e9523..4ae64346731 100644
--- a/src/mame/drivers/bottom9.c
+++ b/src/mame/drivers/bottom9.c
@@ -25,7 +25,7 @@ static INTERRUPT_GEN( bottom9_interrupt )
bottom9_state *state = device->machine().driver_data<bottom9_state>();
if (k052109_is_irq_enabled(state->m_k052109))
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
READ8_MEMBER(bottom9_state::k052109_051960_r)
@@ -135,14 +135,14 @@ WRITE8_MEMBER(bottom9_state::bottom9_1f90_w)
WRITE8_MEMBER(bottom9_state::bottom9_sh_irqtrigger_w)
{
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
static INTERRUPT_GEN( bottom9_sound_interrupt )
{
bottom9_state *state = device->machine().driver_data<bottom9_state>();
if (state->m_nmienable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(bottom9_state::nmi_enable_w)
@@ -326,8 +326,8 @@ static MACHINE_START( bottom9 )
state->membank("bank1")->configure_entries(0, 12, &ROM[0x10000], 0x2000);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k052109 = machine.device("k052109");
state->m_k051960 = machine.device("k051960");
state->m_k051316 = machine.device("k051316");
diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c
index 09d4897107e..beabae8fdb6 100644
--- a/src/mame/drivers/boxer.c
+++ b/src/mame/drivers/boxer.c
@@ -37,7 +37,7 @@ public:
UINT8 m_pot_latch;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
DECLARE_READ8_MEMBER(boxer_input_r);
DECLARE_READ8_MEMBER(boxer_misc_r);
DECLARE_WRITE8_MEMBER(boxer_bell_w);
@@ -60,7 +60,7 @@ static TIMER_CALLBACK( pot_interrupt )
int mask = param;
if (state->m_pot_latch & mask)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
state->m_pot_state |= mask;
}
@@ -71,7 +71,7 @@ static TIMER_CALLBACK( periodic_callback )
boxer_state *state = machine.driver_data<boxer_state>();
int scanline = param;
- device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
+ state->m_maincpu->set_input_line(0, ASSERT_LINE);
if (scanline == 0)
{
@@ -262,13 +262,13 @@ WRITE8_MEMBER(boxer_state::boxer_pot_w)
m_pot_latch = data & 0x3f;
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
WRITE8_MEMBER(boxer_state::boxer_irq_reset_w)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
@@ -426,7 +426,7 @@ static MACHINE_START( boxer )
{
boxer_state *state = machine.driver_data<boxer_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_pot_state));
state->save_item(NAME(state->m_pot_latch));
diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c
index d20e9383e58..39a26245eed 100644
--- a/src/mame/drivers/brkthru.c
+++ b/src/mame/drivers/brkthru.c
@@ -72,7 +72,7 @@ WRITE8_MEMBER(brkthru_state::brkthru_1803_w)
m_nmi_mask = ~data & 1;
if(data & 2)
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
/* bit 1 = ? maybe IRQ acknowledge */
}
@@ -84,7 +84,7 @@ WRITE8_MEMBER(brkthru_state::darwin_0803_w)
logerror("0803 %02X\n",data);
if(data & 2)
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
/* bit 1 = ? maybe IRQ acknowledge */
@@ -93,14 +93,14 @@ WRITE8_MEMBER(brkthru_state::darwin_0803_w)
WRITE8_MEMBER(brkthru_state::brkthru_soundlatch_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
INPUT_CHANGED_MEMBER(brkthru_state::coin_inserted)
{
/* coin insertion causes an IRQ */
if (oldval)
- device_set_input_line(m_maincpu, 0, ASSERT_LINE);
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
@@ -366,8 +366,8 @@ static MACHINE_START( brkthru )
{
brkthru_state *state = machine.driver_data<brkthru_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_bgscroll));
state->save_item(NAME(state->m_bgbasecolor));
@@ -388,7 +388,7 @@ static INTERRUPT_GEN( vblank_irq )
brkthru_state *state = device->machine().driver_data<brkthru_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( brkthru, brkthru_state )
diff --git a/src/mame/drivers/btime.c b/src/mame/drivers/btime.c
index 54af6f3cbb7..9a806d4f2ca 100644
--- a/src/mame/drivers/btime.c
+++ b/src/mame/drivers/btime.c
@@ -169,7 +169,7 @@ WRITE8_MEMBER(btime_state::audio_nmi_enable_w)
if (m_audio_nmi_enable_type == AUDIO_ENABLE_DIRECT)
{
m_audio_nmi_enabled = data & 1;
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -179,7 +179,7 @@ WRITE8_MEMBER(btime_state::ay_audio_nmi_enable_w)
if (m_audio_nmi_enable_type == AUDIO_ENABLE_AY8910)
{
m_audio_nmi_enabled = ~data & 1;
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -188,7 +188,7 @@ static TIMER_DEVICE_CALLBACK( audio_nmi_gen )
btime_state *state = timer.machine().driver_data<btime_state>();
int scanline = param;
state->m_audio_nmi_state = scanline & 8;
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, (state->m_audio_nmi_enabled && state->m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, (state->m_audio_nmi_enabled && state->m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -506,30 +506,30 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_hi)
{
if (newval)
- device_set_input_line(m_maincpu, 0, HOLD_LINE);
+ m_maincpu->set_input_line(0, HOLD_LINE);
}
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_lo)
{
if (!newval)
- device_set_input_line(m_maincpu, 0, HOLD_LINE);
+ m_maincpu->set_input_line(0, HOLD_LINE);
}
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_nmi_lo)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
WRITE8_MEMBER(btime_state::audio_command_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, 0, ASSERT_LINE);
+ m_audiocpu->set_input_line(0, ASSERT_LINE);
}
READ8_MEMBER(btime_state::audio_command_r)
{
- device_set_input_line(m_audiocpu, 0, CLEAR_LINE);
+ m_audiocpu->set_input_line(0, CLEAR_LINE);
return soundlatch_byte_r(space, offset);
}
@@ -1400,8 +1400,8 @@ static MACHINE_START( btime )
{
btime_state *state = machine.driver_data<btime_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_btime_palette));
state->save_item(NAME(state->m_bnj_scroll1));
diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c
index 384ff069711..ad26d6a9935 100644
--- a/src/mame/drivers/bublbobl.c
+++ b/src/mame/drivers/bublbobl.c
@@ -699,7 +699,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
bublbobl_state *state = device->machine().driver_data<bublbobl_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
@@ -724,9 +724,9 @@ static MACHINE_START( common )
{
bublbobl_state *state = machine.driver_data<bublbobl_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_mcu = machine.device("mcu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_slave = machine.device("slave");
state->save_item(NAME(state->m_sound_nmi_enable));
diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c
index d154794ab61..b4b89ee9202 100644
--- a/src/mame/drivers/buggychl.c
+++ b/src/mame/drivers/buggychl.c
@@ -96,7 +96,7 @@ static TIMER_CALLBACK( nmi_callback )
buggychl_state *state = machine.driver_data<buggychl_state>();
if (state->m_sound_nmi_enable)
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
else
state->m_pending_nmi = 1;
}
@@ -117,7 +117,7 @@ WRITE8_MEMBER(buggychl_state::nmi_enable_w)
m_sound_nmi_enable = 1;
if (m_pending_nmi)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
m_pending_nmi = 0;
}
}
@@ -363,7 +363,7 @@ static MACHINE_START( buggychl )
state->membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x2000);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_sound_nmi_enable));
state->save_item(NAME(state->m_pending_nmi));
diff --git a/src/mame/drivers/bwing.c b/src/mame/drivers/bwing.c
index c32d518041d..19b91872b5f 100644
--- a/src/mame/drivers/bwing.c
+++ b/src/mame/drivers/bwing.c
@@ -37,7 +37,7 @@ static INTERRUPT_GEN ( bwp3_interrupt )
bwing_state *state = device->machine().driver_data<bwing_state>();
if (!state->m_bwp3_nmimask)
- device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
//****************************************************************************
@@ -60,7 +60,7 @@ WRITE8_MEMBER(bwing_state::bwp3_nmimask_w)
WRITE8_MEMBER(bwing_state::bwp3_nmiack_w)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
@@ -83,16 +83,16 @@ WRITE8_MEMBER(bwing_state::bwp1_ctrl_w)
switch (offset)
{
// MSSTB
- case 0: device_set_input_line(m_subcpu, M6809_IRQ_LINE, ASSERT_LINE); break;
+ case 0: m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); break;
// IRQACK
- case 1: device_set_input_line(m_maincpu, M6809_IRQ_LINE, CLEAR_LINE); break;
+ case 1: m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); break;
// FIRQACK
- case 2: device_set_input_line(m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE); break;
+ case 2: m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); break;
// NMIACK
- case 3: device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); break;
+ case 3: m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); break;
// SWAP(bank-swaps sprite RAM between 1800 & 1900; ignored bc. they're treated as a single chunk.)
case 4: break;
@@ -100,11 +100,11 @@ WRITE8_MEMBER(bwing_state::bwp1_ctrl_w)
// SNDREQ
case 5:
if (data == 0x80) // protection trick to screw CPU1 & 3
- device_set_input_line(m_subcpu, INPUT_LINE_NMI, ASSERT_LINE); // SNMI
+ m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); // SNMI
else
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, DECO16_IRQ_LINE, HOLD_LINE); // SNDREQ
+ m_audiocpu->set_input_line(DECO16_IRQ_LINE, HOLD_LINE); // SNDREQ
}
break;
@@ -125,13 +125,13 @@ WRITE8_MEMBER(bwing_state::bwp2_ctrl_w)
{
switch (offset)
{
- case 0: device_set_input_line(m_maincpu, M6809_IRQ_LINE, ASSERT_LINE); break; // SMSTB
+ case 0: m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); break; // SMSTB
- case 1: device_set_input_line(m_subcpu, M6809_FIRQ_LINE, CLEAR_LINE); break;
+ case 1: m_subcpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); break;
- case 2: device_set_input_line(m_subcpu, M6809_IRQ_LINE, CLEAR_LINE); break;
+ case 2: m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); break;
- case 3: device_set_input_line(m_subcpu, INPUT_LINE_NMI, CLEAR_LINE); break;
+ case 3: m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); break;
}
#if BW_DEBUG
@@ -337,9 +337,9 @@ static MACHINE_START( bwing )
{
bwing_state *state = machine.driver_data<bwing_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_subcpu = machine.device("sub");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_subcpu = machine.device<cpu_device>("sub");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_palatch));
state->save_item(NAME(state->m_srbank));
diff --git a/src/mame/drivers/byvid.c b/src/mame/drivers/byvid.c
index 1fb51672b0d..9f4a466c6a5 100644
--- a/src/mame/drivers/byvid.c
+++ b/src/mame/drivers/byvid.c
@@ -84,13 +84,13 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(by133_state::video_test)
{
if(newval)
- device_set_input_line(m_videocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_videocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
INPUT_CHANGED_MEMBER(by133_state::sound_test)
{
if(newval)
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static INPUT_PORTS_START( by133 )
@@ -115,13 +115,13 @@ static TMS9928A_INTERFACE(byvid_tms9928a_interface)
WRITE_LINE_MEMBER(by133_state::by133_firq)
{
- device_set_input_line(m_videocpu, M6809_FIRQ_LINE, (m_videopia->irq_a_state() || m_videopia->irq_b_state()) ? ASSERT_LINE : CLEAR_LINE);
+ m_videocpu->set_input_line(M6809_FIRQ_LINE, (m_videopia->irq_a_state() || m_videopia->irq_b_state()) ? ASSERT_LINE : CLEAR_LINE);
}
WRITE_LINE_MEMBER(by133_state::by133_cb2)
{
// to M6803 port 2 d0?
-// device_set_input_line(m_audiocpu, M6801_TIN_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+// m_audiocpu->set_input_line(M6801_TIN_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
READ8_MEMBER(by133_state::by133_portb_r)
diff --git a/src/mame/drivers/bzone.c b/src/mame/drivers/bzone.c
index a7507969434..d6239f068a2 100644
--- a/src/mame/drivers/bzone.c
+++ b/src/mame/drivers/bzone.c
@@ -249,7 +249,7 @@ static MACHINE_START( redbaron )
static INTERRUPT_GEN( bzone_interrupt )
{
if (device->machine().root_device().ioport("IN0")->read() & 0x10)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c
index d6f626f96e5..599782c41d0 100644
--- a/src/mame/drivers/cabal.c
+++ b/src/mame/drivers/cabal.c
@@ -106,7 +106,7 @@ WRITE16_MEMBER(cabal_state::cabal_sound_irq_trigger_word_w)
seibu_main_word_w(&space,4,data,mem_mask);
/* spin for a while to let the Z80 read the command, otherwise coins "stick" */
- device_spin_until_time(&space.device(), attotime::from_usec(50));
+ space.device().execute().spin_until_time(attotime::from_usec(50));
}
WRITE16_MEMBER(cabal_state::cabalbl_sound_irq_trigger_word_w)
diff --git a/src/mame/drivers/cabaret.c b/src/mame/drivers/cabaret.c
index cc30815d5c1..6a3082502b9 100644
--- a/src/mame/drivers/cabaret.c
+++ b/src/mame/drivers/cabaret.c
@@ -328,7 +328,7 @@ static INTERRUPT_GEN( cabaret_interrupt )
{
cabaret_state *state = device->machine().driver_data<cabaret_state>();
if (state->m_nmi_enable & 0x80)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( cabaret, cabaret_state )
diff --git a/src/mame/drivers/calchase.c b/src/mame/drivers/calchase.c
index 9f63852d20e..989b16ef466 100644
--- a/src/mame/drivers/calchase.c
+++ b/src/mame/drivers/calchase.c
@@ -807,7 +807,7 @@ static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
static MACHINE_START(calchase)
{
calchase_state *state = machine.driver_data<calchase_state>();
- device_set_irq_callback(machine.device("maincpu"), irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
state->m_pit8254 = machine.device( "pit8254" );
state->m_pic8259_1 = machine.device( "pic8259_1" );
@@ -962,7 +962,7 @@ READ32_MEMBER(calchase_state::calchase_idle_skip_r)
{
if(space.device().safe_pc()==0x1406f48)
- device_spin_until_interrupt(m_maincpu);
+ m_maincpu->spin_until_interrupt();
return m_idle_skip_ram;
}
diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c
index 8fcd121c0df..9a8cb5a1b42 100644
--- a/src/mame/drivers/capbowl.c
+++ b/src/mame/drivers/capbowl.c
@@ -108,7 +108,7 @@
static INTERRUPT_GEN( capbowl_interrupt )
{
if (device->machine().root_device().ioport("SERVICE")->read() & 1) /* get status of the F2 key */
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); /* trigger self test */
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* trigger self test */
}
@@ -182,7 +182,7 @@ WRITE8_MEMBER(capbowl_state::track_reset_w)
WRITE8_MEMBER(capbowl_state::capbowl_sndcmd_w)
{
- device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE);
+ m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
soundlatch_byte_w(space, offset, data);
}
@@ -198,7 +198,7 @@ WRITE8_MEMBER(capbowl_state::capbowl_sndcmd_w)
static void firqhandler( device_t *device, int irq )
{
capbowl_state *state = device->machine().driver_data<capbowl_state>();
- device_set_input_line(state->m_audiocpu, 1, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(1, irq ? ASSERT_LINE : CLEAR_LINE);
}
@@ -338,8 +338,8 @@ static MACHINE_START( capbowl )
{
capbowl_state *state = machine.driver_data<capbowl_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_blitter_addr));
state->save_item(NAME(state->m_last_trackball_val[0]));
diff --git a/src/mame/drivers/carjmbre.c b/src/mame/drivers/carjmbre.c
index 3a9cd17872c..6dfda72e84e 100644
--- a/src/mame/drivers/carjmbre.c
+++ b/src/mame/drivers/carjmbre.c
@@ -196,7 +196,7 @@ static INTERRUPT_GEN( vblank_irq )
carjmbre_state *state = device->machine().driver_data<carjmbre_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( carjmbre, carjmbre_state )
diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c
index af3e2973f2a..3de198c3c61 100644
--- a/src/mame/drivers/cave.c
+++ b/src/mame/drivers/cave.c
@@ -108,9 +108,9 @@ static void update_irq_state( running_machine &machine )
{
cave_state *state = machine.driver_data<cave_state>();
if (state->m_vblank_irq || state->m_sound_irq || state->m_unknown_irq)
- device_set_input_line(state->m_maincpu, state->m_irq_level, ASSERT_LINE);
+ state->m_maincpu->set_input_line(state->m_irq_level, ASSERT_LINE);
else
- device_set_input_line(state->m_maincpu, state->m_irq_level, CLEAR_LINE);
+ state->m_maincpu->set_input_line(state->m_irq_level, CLEAR_LINE);
}
static TIMER_CALLBACK( cave_vblank_end )
@@ -233,8 +233,8 @@ WRITE16_MEMBER(cave_state::sound_cmd_w)
// m_sound_flag1 = 1;
// m_sound_flag2 = 1;
soundlatch_word_w(space, offset, data, mem_mask);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
- device_spin_until_time(&space.device(), attotime::from_usec(50)); // Allow the other cpu to reply
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ space.device().execute().spin_until_time(attotime::from_usec(50)); // Allow the other cpu to reply
}
/* Sound CPU: read the low 8 bits of the 16 bit sound latch */
@@ -1797,8 +1797,8 @@ static MACHINE_START( cave )
{
cave_state *state = machine.driver_data<cave_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_soundbuf_len));
state->save_item(NAME(state->m_soundbuf_data));
diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c
index 19f4dc5ba80..b855c287bf0 100644
--- a/src/mame/drivers/cball.c
+++ b/src/mame/drivers/cball.c
@@ -23,7 +23,7 @@ public:
tilemap_t* m_bg_tilemap;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
DECLARE_WRITE8_MEMBER(cball_vram_w);
DECLARE_READ8_MEMBER(cball_wram_r);
DECLARE_WRITE8_MEMBER(cball_wram_w);
@@ -90,7 +90,7 @@ static TIMER_CALLBACK( interrupt_callback )
static MACHINE_START( cball )
{
cball_state *state = machine.driver_data<cball_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
}
static MACHINE_RESET( cball )
diff --git a/src/mame/drivers/cbuster.c b/src/mame/drivers/cbuster.c
index a82c30b9ddf..e6f44b4ba50 100644
--- a/src/mame/drivers/cbuster.c
+++ b/src/mame/drivers/cbuster.c
@@ -40,7 +40,7 @@ WRITE16_MEMBER(cbuster_state::twocrude_control_w)
case 2: /* Sound CPU write */
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
return;
case 4: /* Protection, maybe this is a PAL on the board?
@@ -265,7 +265,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
cbuster_state *driver_state = device->machine().driver_data<cbuster_state>();
- device_set_input_line(driver_state->m_audiocpu, 1, state); /* IRQ 2 */
+ driver_state->m_audiocpu->set_input_line(1, state); /* IRQ 2 */
}
static const ym2151_interface ym2151_config =
@@ -306,8 +306,8 @@ static MACHINE_START( cbuster )
{
cbuster_state *state = machine.driver_data<cbuster_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_deco_tilegen1 = machine.device("tilegen1");
state->m_deco_tilegen2 = machine.device("tilegen2");
diff --git a/src/mame/drivers/ccastles.c b/src/mame/drivers/ccastles.c
index 57f1bc69677..059e75e55c5 100644
--- a/src/mame/drivers/ccastles.c
+++ b/src/mame/drivers/ccastles.c
@@ -159,7 +159,7 @@ static TIMER_CALLBACK( clock_irq )
/* assert the IRQ if not already asserted */
if (!state->m_irq_state)
{
- device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
+ state->m_maincpu->set_input_line(0, ASSERT_LINE);
state->m_irq_state = 1;
}
@@ -245,7 +245,7 @@ WRITE8_MEMBER(ccastles_state::irq_ack_w)
{
if (m_irq_state)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
m_irq_state = 0;
}
}
diff --git a/src/mame/drivers/cclimber.c b/src/mame/drivers/cclimber.c
index 2c0ac919d54..ab2091a2f2c 100644
--- a/src/mame/drivers/cclimber.c
+++ b/src/mame/drivers/cclimber.c
@@ -979,7 +979,7 @@ static INTERRUPT_GEN( vblank_irq )
cclimber_state *state = device->machine().driver_data<cclimber_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( root, cclimber_state )
diff --git a/src/mame/drivers/cesclass.c b/src/mame/drivers/cesclass.c
index a052aa1b77a..51921ac5b6b 100644
--- a/src/mame/drivers/cesclass.c
+++ b/src/mame/drivers/cesclass.c
@@ -90,12 +90,12 @@ UINT32 cesclassic_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
WRITE16_MEMBER( cesclassic_state::irq2_ack_w )
{
- device_set_input_line(m_maincpu, 2, CLEAR_LINE);
+ m_maincpu->set_input_line(2, CLEAR_LINE);
}
WRITE16_MEMBER( cesclassic_state::irq3_ack_w )
{
- device_set_input_line(m_maincpu, 3, CLEAR_LINE);
+ m_maincpu->set_input_line(3, CLEAR_LINE);
}
WRITE16_MEMBER( cesclassic_state::lamps_w )
diff --git a/src/mame/drivers/champbas.c b/src/mame/drivers/champbas.c
index 3d07fde35b5..f0bf8aff04f 100644
--- a/src/mame/drivers/champbas.c
+++ b/src/mame/drivers/champbas.c
@@ -132,13 +132,13 @@ WRITE8_MEMBER(champbas_state::irq_enable_w)
m_irq_mask = data & 1;
if (!m_irq_mask)
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
static TIMER_CALLBACK( exctsccr_fm_callback )
{
champbas_state *state = machine.driver_data<champbas_state>();
- device_set_input_line_and_vector(state->m_audiocpu, 0, HOLD_LINE, 0xff);
+ state->m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
// Champion Baseball has only one DAC
@@ -180,7 +180,7 @@ WRITE8_MEMBER(champbas_state::champbas_mcu_halt_w)
return;
data &= 1;
- device_set_input_line(m_mcu, INPUT_LINE_HALT, data ? ASSERT_LINE : CLEAR_LINE);
+ m_mcu->execute().set_input_line(INPUT_LINE_HALT, data ? ASSERT_LINE : CLEAR_LINE);
}
@@ -580,7 +580,7 @@ static MACHINE_START( champbas )
{
champbas_state *state = machine.driver_data<champbas_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_mcu = machine.device(CPUTAG_MCU);
state->save_item(NAME(state->m_watchdog_count));
@@ -591,7 +591,7 @@ static MACHINE_START( champbas )
static MACHINE_START( exctsccr )
{
champbas_state *state = machine.driver_data<champbas_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
// FIXME
machine.scheduler().timer_pulse(attotime::from_hz(75), FUNC(exctsccr_fm_callback)); /* updates fm */
@@ -613,7 +613,7 @@ static INTERRUPT_GEN( vblank_irq )
champbas_state *state = device->machine().driver_data<champbas_state>();
if(state->m_irq_mask)
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
diff --git a/src/mame/drivers/chanbara.c b/src/mame/drivers/chanbara.c
index 18dda6dba68..0abc1e1ac8c 100644
--- a/src/mame/drivers/chanbara.c
+++ b/src/mame/drivers/chanbara.c
@@ -78,7 +78,7 @@ public:
UINT8 m_scrollhi;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
DECLARE_WRITE8_MEMBER(chanbara_videoram_w);
DECLARE_WRITE8_MEMBER(chanbara_colorram_w);
DECLARE_WRITE8_MEMBER(chanbara_videoram2_w);
@@ -366,7 +366,7 @@ WRITE8_MEMBER(chanbara_state::chanbara_ay_out_1_w)
static void sound_irq( device_t *device, int linestate )
{
chanbara_state *state = device->machine().driver_data<chanbara_state>();
- device_set_input_line(state->m_maincpu, 0, linestate);
+ state->m_maincpu->set_input_line(0, linestate);
}
@@ -388,7 +388,7 @@ static MACHINE_START( chanbara )
{
chanbara_state *state = machine.driver_data<chanbara_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_scroll));
state->save_item(NAME(state->m_scrollhi));
diff --git a/src/mame/drivers/cheekyms.c b/src/mame/drivers/cheekyms.c
index 8a8d801577d..97ce3202868 100644
--- a/src/mame/drivers/cheekyms.c
+++ b/src/mame/drivers/cheekyms.c
@@ -17,7 +17,7 @@ INPUT_CHANGED_MEMBER(cheekyms_state::coin_inserted)
/* this starts a 556 one-shot timer (and triggers a sound effect) */
if (newval)
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -112,7 +112,7 @@ static MACHINE_START( cheekyms )
{
cheekyms_state *state = machine.driver_data<cheekyms_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_dac = machine.device<dac_device>("dac");
}
@@ -121,7 +121,7 @@ static INTERRUPT_GEN( vblank_irq )
cheekyms_state *state = device->machine().driver_data<cheekyms_state>();
if(state->m_irq_mask)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/chihiro.c b/src/mame/drivers/chihiro.c
index 255f1b6d285..1a3ee6493b1 100644
--- a/src/mame/drivers/chihiro.c
+++ b/src/mame/drivers/chihiro.c
@@ -1810,7 +1810,7 @@ static MACHINE_START( chihiro )
chst->smbus_register_device(0x10,smbus_callback_pic16lc);
chst->smbus_register_device(0x45,smbus_callback_cx25871);
chst->smbus_register_device(0x54,smbus_callback_eeprom);
- device_set_irq_callback(machine.device("maincpu"), irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
chst->chihiro_devs.pic8259_1 = machine.device( "pic8259_1" );
chst->chihiro_devs.pic8259_2 = machine.device( "pic8259_2" );
chst->chihiro_devs.ide = machine.device( "ide" );
diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c
index 592b4055ea4..11e8cc6bb80 100644
--- a/src/mame/drivers/chinagat.c
+++ b/src/mame/drivers/chinagat.c
@@ -122,11 +122,11 @@ static TIMER_DEVICE_CALLBACK( chinagat_scanline )
/* on the rising edge of VBLK (vcount == F8), signal an NMI */
if (vcount == 0xf8)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
/* set 1ms signal on rising edge of vcount & 8 */
if (!(vcount_old & 8) && (vcount & 8))
- device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, ASSERT_LINE);
+ state->m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
/* adjust for next scanline */
if (++scanline >= screen_height)
@@ -141,23 +141,23 @@ static WRITE8_HANDLER( chinagat_interrupt_w )
{
case 0: /* 3e00 - SND irq */
state->soundlatch_byte_w(*space, 0, data);
- device_set_input_line(state->m_snd_cpu, state->m_sound_irq, (state->m_sound_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE );
+ state->m_snd_cpu->execute().set_input_line(state->m_sound_irq, (state->m_sound_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE );
break;
case 1: /* 3e01 - NMI ack */
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
break;
case 2: /* 3e02 - FIRQ ack */
- device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE);
+ state->m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
break;
case 3: /* 3e03 - IRQ ack */
- device_set_input_line(state->m_maincpu, M6809_IRQ_LINE, CLEAR_LINE);
+ state->m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
break;
case 4: /* 3e04 - sub CPU IRQ ack */
- device_set_input_line(state->m_sub_cpu, state->m_sprite_irq, (state->m_sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE );
+ state->m_sub_cpu->execute().set_input_line(state->m_sprite_irq, (state->m_sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE );
break;
}
}
@@ -495,7 +495,7 @@ GFXDECODE_END
static void chinagat_irq_handler( device_t *device, int irq )
{
ddragon_state *state = device->machine().driver_data<ddragon_state>();
- device_set_input_line(state->m_snd_cpu, 0, irq ? ASSERT_LINE : CLEAR_LINE );
+ state->m_snd_cpu->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE );
}
static const ym2151_interface ym2151_config =
@@ -526,7 +526,7 @@ static MACHINE_START( chinagat )
{
ddragon_state *state = machine.driver_data<ddragon_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_sub_cpu = machine.device("sub");
state->m_snd_cpu = machine.device("audiocpu");
diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c
index d6cca47ce5f..f2d245942a5 100644
--- a/src/mame/drivers/chqflag.c
+++ b/src/mame/drivers/chqflag.c
@@ -132,7 +132,7 @@ READ8_MEMBER(chqflag_state::analog_read_r)
WRITE8_MEMBER(chqflag_state::chqflag_sh_irqtrigger_w)
{
soundlatch2_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
@@ -260,7 +260,7 @@ INPUT_PORTS_END
static void chqflag_ym2151_irq_w( device_t *device, int data )
{
chqflag_state *state = device->machine().driver_data<chqflag_state>();
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, data ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, data ? ASSERT_LINE : CLEAR_LINE);
}
@@ -327,8 +327,8 @@ static MACHINE_START( chqflag )
state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k051316_1 = machine.device("k051316_1");
state->m_k051316_2 = machine.device("k051316_2");
state->m_k051960 = machine.device("k051960");
diff --git a/src/mame/drivers/circus.c b/src/mame/drivers/circus.c
index edb14c1605d..8be07c0ae3a 100644
--- a/src/mame/drivers/circus.c
+++ b/src/mame/drivers/circus.c
@@ -265,7 +265,7 @@ static MACHINE_START( circus )
{
circus_state *state = machine.driver_data<circus_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_samples = machine.device<samples_device>("samples");
state->m_discrete = machine.device("discrete");
diff --git a/src/mame/drivers/circusc.c b/src/mame/drivers/circusc.c
index 28f2c120abf..ba8d169e116 100644
--- a/src/mame/drivers/circusc.c
+++ b/src/mame/drivers/circusc.c
@@ -95,7 +95,7 @@ READ8_MEMBER(circusc_state::circusc_sh_timer_r)
WRITE8_MEMBER(circusc_state::circusc_sh_irqtrigger_w)
{
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(circusc_state::circusc_coin_counter_w)
@@ -352,7 +352,7 @@ static INTERRUPT_GEN( vblank_irq )
circusc_state *state = device->machine().driver_data<circusc_state>();
if(state->m_irq_mask)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static MACHINE_CONFIG_START( circusc, circusc_state )
diff --git a/src/mame/drivers/citycon.c b/src/mame/drivers/citycon.c
index 9793556643f..974a54ac6a4 100644
--- a/src/mame/drivers/citycon.c
+++ b/src/mame/drivers/citycon.c
@@ -21,7 +21,7 @@ READ8_MEMBER(citycon_state::citycon_in_r)
READ8_MEMBER(citycon_state::citycon_irq_ack_r)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
return 0;
}
@@ -190,7 +190,7 @@ static MACHINE_START( citycon )
{
citycon_state *state = machine.driver_data<citycon_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_bg_image));
}
diff --git a/src/mame/drivers/cloud9.c b/src/mame/drivers/cloud9.c
index 2585079dffd..cafdf10fa12 100644
--- a/src/mame/drivers/cloud9.c
+++ b/src/mame/drivers/cloud9.c
@@ -128,7 +128,7 @@ static TIMER_CALLBACK( clock_irq )
/* assert the IRQ if not already asserted */
if (!state->m_irq_state)
{
- device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
+ state->m_maincpu->set_input_line(0, ASSERT_LINE);
state->m_irq_state = 1;
}
@@ -210,7 +210,7 @@ WRITE8_MEMBER(cloud9_state::irq_ack_w)
{
if (m_irq_state)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
m_irq_state = 0;
}
}
diff --git a/src/mame/drivers/cmmb.c b/src/mame/drivers/cmmb.c
index d33e2b21430..c0e481a4126 100644
--- a/src/mame/drivers/cmmb.c
+++ b/src/mame/drivers/cmmb.c
@@ -303,7 +303,7 @@ static INTERRUPT_GEN( cmmb_irq )
{
//if(device->machine().input().code_pressed_once(KEYCODE_Z))
//if(device->machine().input().code_pressed(KEYCODE_Z))
-// device_set_input_line(device, 0, HOLD_LINE);
+// device->execute().set_input_line(0, HOLD_LINE);
}
static MACHINE_RESET( cmmb )
diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c
index a9a443f97b4..8e67618379a 100644
--- a/src/mame/drivers/cninja.c
+++ b/src/mame/drivers/cninja.c
@@ -58,21 +58,21 @@ WRITE16_MEMBER(cninja_state::cninja_sound_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
WRITE16_MEMBER(cninja_state::stoneage_sound_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static TIMER_DEVICE_CALLBACK( interrupt_gen )
{
cninja_state *state = timer.machine().driver_data<cninja_state>();
- device_set_input_line(state->m_maincpu, (state->m_irq_mask & 0x10) ? 3 : 4, ASSERT_LINE);
+ state->m_maincpu->set_input_line((state->m_irq_mask & 0x10) ? 3 : 4, ASSERT_LINE);
state->m_raster_irq_timer->reset();
}
@@ -86,8 +86,8 @@ READ16_MEMBER(cninja_state::cninja_irq_r)
return m_scanline;
case 2: /* Raster IRQ ACK - value read is not used */
- device_set_input_line(m_maincpu, 3, CLEAR_LINE);
- device_set_input_line(m_maincpu, 4, CLEAR_LINE);
+ m_maincpu->set_input_line(3, CLEAR_LINE);
+ m_maincpu->set_input_line(4, CLEAR_LINE);
return 0;
}
@@ -712,13 +712,13 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
cninja_state *driver_state = device->machine().driver_data<cninja_state>();
- device_set_input_line(driver_state->m_audiocpu, 1, state); /* IRQ 2 */
+ driver_state->m_audiocpu->set_input_line(1, state); /* IRQ 2 */
}
static void sound_irq2(device_t *device, int state)
{
cninja_state *driver_state = device->machine().driver_data<cninja_state>();
- device_set_input_line(driver_state->m_audiocpu, 0, state);
+ driver_state->m_audiocpu->set_input_line(0, state);
}
WRITE8_MEMBER(cninja_state::sound_bankswitch_w)
diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c
index 3e759e3bfda..1c0243dfd7d 100644
--- a/src/mame/drivers/cntsteer.c
+++ b/src/mame/drivers/cntsteer.c
@@ -63,9 +63,9 @@ public:
int m_nmimask; // zerotrgt only
/* devices */
- device_t *m_maincpu;
- device_t *m_audiocpu;
- device_t *m_subcpu;
+ cpu_device *m_maincpu;
+ cpu_device *m_audiocpu;
+ cpu_device *m_subcpu;
DECLARE_WRITE8_MEMBER(zerotrgt_vregs_w);
DECLARE_WRITE8_MEMBER(cntsteer_vregs_w);
DECLARE_WRITE8_MEMBER(cntsteer_foreground_vram_w);
@@ -460,42 +460,42 @@ WRITE8_MEMBER(cntsteer_state::cntsteer_background_w)
WRITE8_MEMBER(cntsteer_state::gekitsui_sub_irq_ack)
{
- device_set_input_line(m_subcpu, M6809_IRQ_LINE, CLEAR_LINE);
+ m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
WRITE8_MEMBER(cntsteer_state::cntsteer_sound_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(cntsteer_state::zerotrgt_ctrl_w)
{
/*TODO: check this.*/
logerror("CTRL: %04x: %04x: %04x\n", space.device().safe_pc(), offset, data);
-// if (offset == 0) device_set_input_line(m_subcpu, INPUT_LINE_RESET, ASSERT_LINE);
+// if (offset == 0) m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
// Wrong - bits 0 & 1 used on this
- if (offset == 1) device_set_input_line(m_subcpu, M6809_IRQ_LINE, ASSERT_LINE);
-// if (offset == 2) device_set_input_line(m_subcpu, INPUT_LINE_RESET, CLEAR_LINE);
+ if (offset == 1) m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
+// if (offset == 2) m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
WRITE8_MEMBER(cntsteer_state::cntsteer_sub_irq_w)
{
- device_set_input_line(m_subcpu, M6809_IRQ_LINE, ASSERT_LINE);
+ m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
// printf("%02x IRQ\n", data);
}
WRITE8_MEMBER(cntsteer_state::cntsteer_sub_nmi_w)
{
// if (data)
-// device_set_input_line(m_subcpu, INPUT_LINE_NMI, PULSE_LINE);
+// m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
// popmessage("%02x", data);
}
WRITE8_MEMBER(cntsteer_state::cntsteer_main_irq_w)
{
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, HOLD_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
}
/* Convert weird input handling with MAME standards.*/
@@ -594,7 +594,7 @@ static INTERRUPT_GEN ( sound_interrupt )
{
cntsteer_state *state = device->machine().driver_data<cntsteer_state>();
if (!state->m_nmimask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cntsteer_state )
@@ -681,7 +681,7 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER(cntsteer_state::coin_inserted)
{
- device_set_input_line(m_subcpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( cntsteer )
@@ -815,9 +815,9 @@ static MACHINE_START( cntsteer )
{
cntsteer_state *state = machine.driver_data<cntsteer_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
- state->m_subcpu = machine.device("subcpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ state->m_subcpu = machine.device<cpu_device>("subcpu");
state->save_item(NAME(state->m_flipscreen));
state->save_item(NAME(state->m_bg_bank));
diff --git a/src/mame/drivers/cobra.c b/src/mame/drivers/cobra.c
index 2eb40fa6a79..d79fa19c8ed 100644
--- a/src/mame/drivers/cobra.c
+++ b/src/mame/drivers/cobra.c
@@ -1234,7 +1234,7 @@ void cobra_state::m2sfifo_event_callback(cobra_fifo::EventType event)
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));
+ machine().device("maincpu")->execute().spin_until_time(attotime::from_usec(1));
if (m_m2s_int_enable & 0x80)
{
@@ -1601,7 +1601,7 @@ static void main_cpu_dc_store(device_t *device, UINT32 address)
if ((address & 0xf0000000) == 0xc0000000)
{
// force sync when writing to GFX board main ram
- device_spin_until_time(cobra->m_maincpu, attotime::from_usec(80));
+ cobra->m_maincpu->spin_until_time(attotime::from_usec(80));
}
}
diff --git a/src/mame/drivers/coinmvga.c b/src/mame/drivers/coinmvga.c
index 275a931f2cc..475a6f6477f 100644
--- a/src/mame/drivers/coinmvga.c
+++ b/src/mame/drivers/coinmvga.c
@@ -657,7 +657,7 @@ static const ymz280b_interface ymz280b_intf =
static INTERRUPT_GEN( vblank_irq )
{
//printf("1\n");
- device_set_input_line(device, 2, HOLD_LINE);
+ device->execute().set_input_line(2, HOLD_LINE);
}
diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c
index ea2f38793ce..60ac03f5efb 100644
--- a/src/mame/drivers/combatsc.c
+++ b/src/mame/drivers/combatsc.c
@@ -151,7 +151,7 @@ WRITE8_MEMBER(combatsc_state::combatsc_vreg_w)
WRITE8_MEMBER(combatsc_state::combatscb_sh_irqtrigger_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
READ8_MEMBER(combatsc_state::combatscb_io_r)
@@ -322,7 +322,7 @@ WRITE8_MEMBER(combatsc_state::protection_clock_w)
WRITE8_MEMBER(combatsc_state::combatsc_sh_irqtrigger_w)
{
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
READ8_MEMBER(combatsc_state::combatsc_busy_r)
diff --git a/src/mame/drivers/commando.c b/src/mame/drivers/commando.c
index a87ee545c2a..d81d24478e0 100644
--- a/src/mame/drivers/commando.c
+++ b/src/mame/drivers/commando.c
@@ -218,7 +218,7 @@ GFXDECODE_END
static INTERRUPT_GEN( commando_interrupt )
{
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xd7); // RST 10h - VBLANK
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); // RST 10h - VBLANK
}
/* Machine Driver */
@@ -227,7 +227,7 @@ static MACHINE_START( commando )
{
commando_state *state = machine.driver_data<commando_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_scroll_x));
state->save_item(NAME(state->m_scroll_y));
diff --git a/src/mame/drivers/contra.c b/src/mame/drivers/contra.c
index 1b85cadeca9..37646914279 100644
--- a/src/mame/drivers/contra.c
+++ b/src/mame/drivers/contra.c
@@ -29,7 +29,7 @@ static INTERRUPT_GEN( contra_interrupt )
{
contra_state *state = device->machine().driver_data<contra_state>();
if (k007121_ctrlram_r(state->m_k007121_1, 7) & 0x02)
- device_set_input_line(device, HD6309_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(contra_state::contra_bankswitch_w)
@@ -39,7 +39,7 @@ WRITE8_MEMBER(contra_state::contra_bankswitch_w)
WRITE8_MEMBER(contra_state::contra_sh_irqtrigger_w)
{
- device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE);
+ m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(contra_state::contra_coin_counter_w)
@@ -182,7 +182,7 @@ static MACHINE_START( contra )
state->membank("bank1")->configure_entries(0, 16, &ROM[0x10000], 0x2000);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k007121_1 = machine.device("k007121_1");
state->m_k007121_2 = machine.device("k007121_2");
}
diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c
index 645850c8531..3afdff3e43d 100644
--- a/src/mame/drivers/coolpool.c
+++ b/src/mame/drivers/coolpool.c
@@ -136,7 +136,7 @@ static MACHINE_RESET( amerdart )
{
coolpool_state *state = machine.driver_data<coolpool_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_dsp = machine.device("dsp");
state->m_nvram_write_enable = 0;
@@ -211,8 +211,8 @@ static TIMER_DEVICE_CALLBACK( amerdart_audio_int_gen )
{
coolpool_state *state = timer.machine().driver_data<coolpool_state>();
- device_set_input_line(state->m_dsp, 0, ASSERT_LINE);
- device_set_input_line(state->m_dsp, 0, CLEAR_LINE);
+ state->m_dsp->execute().set_input_line(0, ASSERT_LINE);
+ state->m_dsp->execute().set_input_line(0, CLEAR_LINE);
}
@@ -240,7 +240,7 @@ READ16_MEMBER(coolpool_state::amerdart_dsp_bio_line_r)
if (m_same_cmd_count >= 5)
{
m_same_cmd_count = 5;
- device_spin(&space.device());
+ space.device().execute().spin();
}
m_old_cmd = m_cmd_pending;
diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c
index 438373f4bcd..62c85371401 100644
--- a/src/mame/drivers/coolridr.c
+++ b/src/mame/drivers/coolridr.c
@@ -1138,7 +1138,7 @@ INPUT_PORTS_END
// IRQs 4, 6 (& 8?) are valid on SH-2
static INTERRUPT_GEN( system_h1 )
{
- device_set_input_line(device, 4, HOLD_LINE);
+ device->execute().set_input_line(4, HOLD_LINE);
}
//IRQs 10,12 and 14 are valid on SH-1 instead
@@ -1149,9 +1149,9 @@ static TIMER_DEVICE_CALLBACK( system_h1_sub )
switch(scanline)
{
- case 512:device_set_input_line(state->m_subcpu, 0xa, HOLD_LINE); break;
- case 256:device_set_input_line(state->m_subcpu, 0xc, HOLD_LINE); break;
- case 0:device_set_input_line(state->m_subcpu, 0xe, HOLD_LINE); break;
+ case 512:state->m_subcpu->set_input_line(0xa, HOLD_LINE); break;
+ case 256:state->m_subcpu->set_input_line(0xc, HOLD_LINE); break;
+ case 0:state->m_subcpu->set_input_line(0xe, HOLD_LINE); break;
}
}
diff --git a/src/mame/drivers/cop01.c b/src/mame/drivers/cop01.c
index f8bfd75fae7..8b7902353d8 100644
--- a/src/mame/drivers/cop01.c
+++ b/src/mame/drivers/cop01.c
@@ -73,7 +73,7 @@ Mighty Guy board layout:
WRITE8_MEMBER(cop01_state::cop01_sound_command_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, 0, ASSERT_LINE );
+ m_audiocpu->set_input_line(0, ASSERT_LINE );
}
READ8_MEMBER(cop01_state::cop01_sound_command_r)
@@ -104,13 +104,13 @@ CUSTOM_INPUT_MEMBER(cop01_state::mightguy_area_r)
WRITE8_MEMBER(cop01_state::cop01_irq_ack_w)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE );
+ m_maincpu->set_input_line(0, CLEAR_LINE );
}
READ8_MEMBER(cop01_state::cop01_sound_irq_ack_w)
{
- device_set_input_line(m_audiocpu, 0, CLEAR_LINE );
+ m_audiocpu->set_input_line(0, CLEAR_LINE );
return 0;
}
diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c
index 5b61b7afd0f..54d316e7434 100644
--- a/src/mame/drivers/cps1.c
+++ b/src/mame/drivers/cps1.c
@@ -330,7 +330,7 @@ INTERRUPT_GEN( cps1_interrupt )
{
/* Strider also has a IRQ4 handler. It is input port related, but the game */
/* works without it. It is the *only* CPS1 game to have that. */
- device_set_input_line(device, 2, HOLD_LINE);
+ device->execute().set_input_line(2, HOLD_LINE);
}
/********************************************************************
@@ -343,7 +343,7 @@ INTERRUPT_GEN( cps1_interrupt )
static INTERRUPT_GEN( cps1_qsound_interrupt )
{
- device_set_input_line(device, 2, HOLD_LINE);
+ device->execute().set_input_line(2, HOLD_LINE);
}
@@ -3011,7 +3011,7 @@ GFXDECODE_END
static void cps1_irq_handler_mus(device_t *device, int irq)
{
cps_state *state = device->machine().driver_data<cps_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface ym2151_config =
@@ -3034,8 +3034,8 @@ static MACHINE_START( common )
{
cps_state *state = machine.driver_data<cps_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
}
static MACHINE_START( cps1 )
diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c
index 3ec334b132e..77280d88a9b 100644
--- a/src/mame/drivers/cps2.c
+++ b/src/mame/drivers/cps2.c
@@ -641,7 +641,7 @@ static TIMER_DEVICE_CALLBACK( cps2_interrupt )
if (state->m_scanline1 == param || (state->m_scanline1 < param && !state->m_scancalls))
{
state->m_cps_b_regs[0x10/2] = 0;
- device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
+ state->m_maincpu->set_input_line(4, HOLD_LINE);
cps2_set_sprite_priorities(timer.machine());
timer.machine().primary_screen->update_partial(param);
state->m_scancalls++;
@@ -652,7 +652,7 @@ static TIMER_DEVICE_CALLBACK( cps2_interrupt )
if(state->m_scanline2 == param || (state->m_scanline2 < param && !state->m_scancalls))
{
state->m_cps_b_regs[0x12 / 2] = 0;
- device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
+ state->m_maincpu->set_input_line(4, HOLD_LINE);
cps2_set_sprite_priorities(timer.machine());
timer.machine().primary_screen->update_partial(param);
state->m_scancalls++;
@@ -663,7 +663,7 @@ static TIMER_DEVICE_CALLBACK( cps2_interrupt )
{
state->m_cps_b_regs[0x10 / 2] = state->m_scanline1;
state->m_cps_b_regs[0x12 / 2] = state->m_scanline2;
- device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
+ state->m_maincpu->set_input_line(2, HOLD_LINE);
if(state->m_scancalls)
{
cps2_set_sprite_priorities(timer.machine());
@@ -722,7 +722,7 @@ static WRITE16_HANDLER( cps2_eeprom_port_w )
/* Z80 Reset */
if (state->m_audiocpu != NULL)
- device_set_input_line(state->m_audiocpu, INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
coin_counter_w(space->machine(), 0, data & 0x0001);
if ((strncmp(space->machine().system().name, "pzloop2", 8) == 0) ||
@@ -1214,8 +1214,8 @@ static MACHINE_START( cps2 )
{
cps_state *state = machine.driver_data<cps_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
if (state->m_audiocpu != NULL) // gigaman2 has no audiocpu
state->membank("bank1")->configure_entries(0, (QSOUND_SIZE - 0x10000) / 0x4000, state->memregion("audiocpu")->base() + 0x10000, 0x4000);
diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c
index ae411ea617c..b247d48fbd0 100644
--- a/src/mame/drivers/cps3.c
+++ b/src/mame/drivers/cps3.c
@@ -2247,7 +2247,7 @@ INPUT_PORTS_END
static INTERRUPT_GEN(cps3_vbl_interrupt)
{
- device_set_input_line(device,12, ASSERT_LINE);
+ device->execute().set_input_line(12, ASSERT_LINE);
}
static INTERRUPT_GEN(cps3_other_interrupt)
@@ -2255,7 +2255,7 @@ static INTERRUPT_GEN(cps3_other_interrupt)
// this seems to need to be periodic (see the life bar portraits in sfiii2
// but also triggered on certain dma events (or warzard locks up in attract)
// what is the REAL source of IRQ10??
- device_set_input_line(device,10, ASSERT_LINE);
+ device->execute().set_input_line(10, ASSERT_LINE);
}
diff --git a/src/mame/drivers/crbaloon.c b/src/mame/drivers/crbaloon.c
index 6e384427a19..8006e75bf2f 100644
--- a/src/mame/drivers/crbaloon.c
+++ b/src/mame/drivers/crbaloon.c
@@ -361,7 +361,7 @@ static INTERRUPT_GEN( vblank_irq )
crbaloon_state *state = device->machine().driver_data<crbaloon_state>();
if(state->m_irq_mask)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/crgolf.c b/src/mame/drivers/crgolf.c
index 23928de5bfa..804ec92c40d 100644
--- a/src/mame/drivers/crgolf.c
+++ b/src/mame/drivers/crgolf.c
@@ -75,8 +75,8 @@ static MACHINE_START( crgolf )
{
crgolf_state *state = machine.driver_data<crgolf_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
/* configure the banking */
state->membank("bank1")->configure_entries(0, 16, state->memregion("maincpu")->base() + 0x10000, 0x2000);
@@ -153,7 +153,7 @@ static TIMER_CALLBACK( main_to_sound_callback )
{
crgolf_state *state = machine.driver_data<crgolf_state>();
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
state->m_main_to_sound_data = param;
}
@@ -167,7 +167,7 @@ WRITE8_MEMBER(crgolf_state::main_to_sound_w)
READ8_MEMBER(crgolf_state::main_to_sound_r)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return m_main_to_sound_data;
}
@@ -183,7 +183,7 @@ static TIMER_CALLBACK( sound_to_main_callback )
{
crgolf_state *state = machine.driver_data<crgolf_state>();
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
state->m_sound_to_main_data = param;
}
@@ -197,7 +197,7 @@ WRITE8_MEMBER(crgolf_state::sound_to_main_w)
READ8_MEMBER(crgolf_state::sound_to_main_r)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return m_sound_to_main_data;
}
diff --git a/src/mame/drivers/crimfght.c b/src/mame/drivers/crimfght.c
index 8746e976cfb..0e7d3806f56 100644
--- a/src/mame/drivers/crimfght.c
+++ b/src/mame/drivers/crimfght.c
@@ -28,7 +28,7 @@ static INTERRUPT_GEN( crimfght_interrupt )
crimfght_state *state = device->machine().driver_data<crimfght_state>();
if (k051960_is_irq_enabled(state->m_k051960))
- device_set_input_line(device, KONAMI_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(crimfght_state::crimfght_coin_w)
@@ -40,7 +40,7 @@ WRITE8_MEMBER(crimfght_state::crimfght_coin_w)
WRITE8_MEMBER(crimfght_state::crimfght_sh_irqtrigger_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(crimfght_state::crimfght_snd_bankswitch_w)
@@ -266,8 +266,8 @@ static MACHINE_START( crimfght )
state->membank("bank2")->configure_entries(0, 12, &ROM[0x10000], 0x2000);
state->membank("bank2")->set_entry(0);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k052109 = machine.device("k052109");
state->m_k051960 = machine.device("k051960");
state->m_k007232 = machine.device("k007232");
diff --git a/src/mame/drivers/crospang.c b/src/mame/drivers/crospang.c
index ba3af36746e..a7c381d6325 100644
--- a/src/mame/drivers/crospang.c
+++ b/src/mame/drivers/crospang.c
@@ -318,7 +318,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int linestate )
{
crospang_state *state = device->machine().driver_data<crospang_state>();
- device_set_input_line(state->m_audiocpu, 0, linestate);
+ state->m_audiocpu->set_input_line(0, linestate);
}
static const ym3812_interface ym3812_config =
@@ -331,7 +331,7 @@ static MACHINE_START( crospang )
{
crospang_state *state = machine.driver_data<crospang_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_bestri_tilebank));
diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c
index 77de120b7c7..9655660cf88 100644
--- a/src/mame/drivers/crystal.c
+++ b/src/mame/drivers/crystal.c
@@ -160,7 +160,7 @@ public:
UINT32 m_DMActrl[2];
UINT8 m_OldPort4;
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
ds1302_device *m_ds1302;
device_t *m_vr0video;
DECLARE_READ32_MEMBER(FlipCount_r);
@@ -193,18 +193,18 @@ public:
static void IntReq( running_machine &machine, int num )
{
crystal_state *state = machine.driver_data<crystal_state>();
- address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
+ address_space *space = state->m_maincpu->space(AS_PROGRAM);
UINT32 IntEn = space->read_dword(0x01800c08);
UINT32 IntPend = space->read_dword(0x01800c0c);
if (IntEn & (1 << num))
{
IntPend |= (1 << num);
space->write_dword(0x01800c0c, IntPend);
- device_set_input_line(state->m_maincpu, SE3208_INT, ASSERT_LINE);
+ state->m_maincpu->set_input_line(SE3208_INT, ASSERT_LINE);
}
#ifdef IDLE_LOOP_SPEEDUP
state->m_FlipCntRead = 0;
- device_resume(state->m_maincpu, SUSPEND_REASON_SPIN);
+ state->m_maincpu->resume(SUSPEND_REASON_SPIN);
#endif
}
@@ -215,7 +215,7 @@ READ32_MEMBER(crystal_state::FlipCount_r)
UINT32 IntPend = space.read_dword(0x01800c0c);
m_FlipCntRead++;
if (m_FlipCntRead >= 16 && !IntPend && m_FlipCount != 0)
- device_suspend(m_maincpu, SUSPEND_REASON_SPIN, 1);
+ m_maincpu->suspend(SUSPEND_REASON_SPIN, 1);
#endif
return ((UINT32) m_FlipCount) << 16;
}
@@ -262,7 +262,7 @@ WRITE32_MEMBER(crystal_state::IntAck_w)
IntPend &= ~(1 << (data & 0x1f));
space.write_dword(0x01800c0c, IntPend);
if (!IntPend)
- device_set_input_line(m_maincpu, SE3208_INT, CLEAR_LINE);
+ m_maincpu->set_input_line(SE3208_INT, CLEAR_LINE);
}
if (mem_mask & 0xff00)
m_IntHigh = (data >> 8) & 7;
@@ -579,11 +579,11 @@ static MACHINE_START( crystal )
crystal_state *state = machine.driver_data<crystal_state>();
int i;
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_ds1302 = machine.device<ds1302_device>("rtc");
state->m_vr0video = machine.device("vr0");
- device_set_irq_callback(machine.device("maincpu"), icallback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(icallback);
for (i = 0; i < 4; i++)
state->m_Timer[i] = machine.scheduler().timer_alloc(FUNC(Timercb), (void*)(FPTR)i);
@@ -613,7 +613,7 @@ static MACHINE_RESET( crystal )
memset(state->m_vidregs, 0, 0x10000);
state->m_FlipCount = 0;
state->m_IntHigh = 0;
- device_set_irq_callback(machine.device("maincpu"), icallback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(icallback);
state->m_Bank = 0;
state->membank("bank1")->set_base(state->memregion("user1")->base() + 0);
state->m_FlashCmd = 0xff;
diff --git a/src/mame/drivers/csplayh5.c b/src/mame/drivers/csplayh5.c
index 8d550a45b69..bf3c2a127ba 100644
--- a/src/mame/drivers/csplayh5.c
+++ b/src/mame/drivers/csplayh5.c
@@ -602,7 +602,7 @@ static TIMER_DEVICE_CALLBACK( csplayh5_irq )
int scanline = param;
if(scanline == 212*2)
- device_set_input_line_and_vector(state->m_maincpu, 1, HOLD_LINE,0x100/4);
+ state->m_maincpu->set_input_line_and_vector(1, HOLD_LINE,0x100/4);
if((scanline % 2) == 0)
{
diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c
index b495086936f..4da0fa0bcd9 100644
--- a/src/mame/drivers/cubeqst.c
+++ b/src/mame/drivers/cubeqst.c
@@ -195,7 +195,7 @@ static INTERRUPT_GEN( vblank )
cubeqst_state *state = device->machine().driver_data<cubeqst_state>();
int int_level = state->m_video_field == 0 ? 5 : 6;
- device_set_input_line(device, int_level, HOLD_LINE);
+ device->execute().set_input_line(int_level, HOLD_LINE);
/* Update the laserdisc */
state->m_video_field ^= 1;
diff --git a/src/mame/drivers/cultures.c b/src/mame/drivers/cultures.c
index ba0be422d77..019fafd7296 100644
--- a/src/mame/drivers/cultures.c
+++ b/src/mame/drivers/cultures.c
@@ -364,7 +364,7 @@ static INTERRUPT_GEN( cultures_interrupt )
{
cultures_state *state = device->machine().driver_data<cultures_state>();
if (state->m_irq_enable)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static MACHINE_START( cultures )
diff --git a/src/mame/drivers/cvs.c b/src/mame/drivers/cvs.c
index 065916a9384..4c72ec9ae81 100644
--- a/src/mame/drivers/cvs.c
+++ b/src/mame/drivers/cvs.c
@@ -228,7 +228,7 @@ WRITE8_MEMBER(cvs_state::cvs_s2636_2_or_character_ram_w)
static INTERRUPT_GEN( cvs_main_cpu_interrupt )
{
- device_set_input_line_vector(device, 0, 0x03);
+ device->execute().set_input_line_vector(0, 0x03);
generic_pulse_irq_line(device, 0, 1);
cvs_scroll_stars(device->machine());
@@ -237,9 +237,9 @@ static INTERRUPT_GEN( cvs_main_cpu_interrupt )
static void cvs_slave_cpu_interrupt( device_t *cpu, int state )
{
- device_set_input_line_vector(cpu, 0, 0x03);
- //device_set_input_line(cpu, 0, state ? ASSERT_LINE : CLEAR_LINE);
- device_set_input_line(cpu, 0, state ? HOLD_LINE : CLEAR_LINE);
+ cpu->execute().set_input_line_vector(0, 0x03);
+ //cpu->execute().set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
+ cpu->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
@@ -999,8 +999,8 @@ MACHINE_START( cvs )
start_393hz_timer(machine);
/* set devices */
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_speech = machine.device("speech");
state->m_dac3 = machine.device<dac_device>("dac3");
state->m_tms = machine.device("tms");
diff --git a/src/mame/drivers/cyclemb.c b/src/mame/drivers/cyclemb.c
index 195420258bd..ae8ef774ecf 100644
--- a/src/mame/drivers/cyclemb.c
+++ b/src/mame/drivers/cyclemb.c
@@ -379,7 +379,7 @@ WRITE8_MEMBER(cyclemb_state::cyclemb_bankswitch_w)
WRITE8_MEMBER(cyclemb_state::sound_cmd_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
#endif
@@ -393,7 +393,7 @@ READ8_MEMBER(cyclemb_state::mcu_status_r)
WRITE8_MEMBER(cyclemb_state::sound_cmd_w)//actually ciom
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
#endif
@@ -419,7 +419,7 @@ READ8_MEMBER( cyclemb_state::skydest_i8741_0_r )
{
if(offset == 1) //status port
{
- //printf("STATUS PC=%04x\n",m_maincpu->safe_pc());
+ //printf("STATUS PC=%04x\n",m_maincpu->pc());
return 1;
}
@@ -427,14 +427,14 @@ READ8_MEMBER( cyclemb_state::skydest_i8741_0_r )
{
UINT8 i,pt;
- //printf("%04x\n",m_maincpu->safe_pc());
+ //printf("%04x\n",m_maincpu->pc());
/* TODO: internal state of this */
if(m_maincpu->pc() == m_dsw_pc_hack)
m_mcu[0].rxd = (ioport("DSW1")->read() & 0x1f) << 2;
else if(m_mcu[0].rst)
{
- //printf("READ PC=%04x\n",m_maincpu->safe_pc());
+ //printf("READ PC=%04x\n",m_maincpu->pc());
{
switch(m_mcu[0].state)
@@ -500,7 +500,7 @@ WRITE8_MEMBER( cyclemb_state::skydest_i8741_0_w )
{
if(offset == 1) //command port
{
- //printf("%02x CMD PC=%04x\n",data,m_maincpu->safe_pc());
+ //printf("%02x CMD PC=%04x\n",data,m_maincpu->pc());
switch(data)
{
case 0:
@@ -535,7 +535,7 @@ WRITE8_MEMBER( cyclemb_state::skydest_i8741_0_w )
}
else
{
- //printf("%02x DATA PC=%04x\n",data,m_maincpu->safe_pc());
+ //printf("%02x DATA PC=%04x\n",data,m_maincpu->pc());
m_mcu[0].txd = data;
diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c
index f1bac9c71e0..00df830b758 100644
--- a/src/mame/drivers/dacholer.c
+++ b/src/mame/drivers/dacholer.c
@@ -205,12 +205,12 @@ WRITE8_MEMBER(dacholer_state::coins_w)
WRITE8_MEMBER(dacholer_state::snd_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(dacholer_state::main_irq_ack_w)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
@@ -551,7 +551,7 @@ static INTERRUPT_GEN( sound_irq )
dacholer_state *state = device->machine().driver_data<dacholer_state>();
if (state->m_music_interrupt_enable == 1)
{
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x30);
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x30);
}
}
@@ -565,7 +565,7 @@ static void adpcm_int( device_t *device )
state->m_msm_toggle ^= 1;
if (state->m_msm_toggle == 0)
{
- device_set_input_line_and_vector(state->m_audiocpu, 0, HOLD_LINE, 0x38);
+ state->m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0x38);
}
}
}
diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c
index 1c96731031c..a7db1d3483e 100644
--- a/src/mame/drivers/darius.c
+++ b/src/mame/drivers/darius.c
@@ -145,7 +145,7 @@ static void parse_control( running_machine &machine ) /* assumes Z80 sandwiched
/* however this fails when recovering from a save state
if cpu B is disabled !! */
darius_state *state = machine.driver_data<darius_state>();
- device_set_input_line(state->m_cpub, INPUT_LINE_RESET, (state->m_cpua_ctrl & 0x01) ? CLEAR_LINE : ASSERT_LINE);
+ state->m_cpub->execute().set_input_line(INPUT_LINE_RESET, (state->m_cpua_ctrl & 0x01) ? CLEAR_LINE : ASSERT_LINE);
}
WRITE16_MEMBER(darius_state::cpua_ctrl_w)
@@ -504,7 +504,7 @@ static void darius_adpcm_int( device_t *device )
darius_state *state = device->machine().driver_data<darius_state>();
if (state->m_nmi_enable)
- device_set_input_line(state->m_adpcm, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_adpcm->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static const msm5205_interface msm5205_config =
@@ -785,7 +785,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int irq ) /* assumes Z80 sandwiched between 68Ks */
{
darius_state *state = device->machine().driver_data<darius_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_interface_1 =
@@ -844,8 +844,8 @@ static MACHINE_START( darius )
state->membank("bank1")->configure_entry(4, state->memregion("audiocpu")->base());
state->membank("bank1")->set_entry(4);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_cpub = machine.device("cpub");
state->m_adpcm = machine.device("adpcm");
state->m_pc080sn = machine.device("pc080sn");
diff --git a/src/mame/drivers/dassault.c b/src/mame/drivers/dassault.c
index b69e9e458fb..57766808032 100644
--- a/src/mame/drivers/dassault.c
+++ b/src/mame/drivers/dassault.c
@@ -178,7 +178,7 @@ READ16_MEMBER(dassault_state::dassault_sub_control_r)
WRITE16_MEMBER(dassault_state::dassault_sound_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE); /* IRQ1 */
+ m_audiocpu->set_input_line(0, HOLD_LINE); /* IRQ1 */
}
/* The CPU-CPU irq controller is overlaid onto the end of the shared memory */
@@ -186,8 +186,8 @@ READ16_MEMBER(dassault_state::dassault_irq_r)
{
switch (offset)
{
- case 0: device_set_input_line(m_maincpu, 5, CLEAR_LINE); break;
- case 1: device_set_input_line(m_subcpu, 6, CLEAR_LINE); break;
+ case 0: m_maincpu->set_input_line(5, CLEAR_LINE); break;
+ case 1: m_subcpu->set_input_line(6, CLEAR_LINE); break;
}
return m_shared_ram[(0xffc / 2) + offset]; /* The values probably don't matter */
}
@@ -196,8 +196,8 @@ WRITE16_MEMBER(dassault_state::dassault_irq_w)
{
switch (offset)
{
- case 0: device_set_input_line(m_maincpu, 5, ASSERT_LINE); break;
- case 1: device_set_input_line(m_subcpu, 6, ASSERT_LINE); break;
+ case 0: m_maincpu->set_input_line(5, ASSERT_LINE); break;
+ case 1: m_subcpu->set_input_line(6, ASSERT_LINE); break;
}
COMBINE_DATA(&m_shared_ram[(0xffc / 2) + offset]); /* The values probably don't matter */
@@ -448,7 +448,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
dassault_state *driver_state = device->machine().driver_data<dassault_state>();
- device_set_input_line(driver_state->m_audiocpu, 1, state);
+ driver_state->m_audiocpu->set_input_line(1, state);
}
WRITE8_MEMBER(dassault_state::sound_bankswitch_w)
diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c
index 2258b6c55ec..741899fa9cf 100644
--- a/src/mame/drivers/dblewing.c
+++ b/src/mame/drivers/dblewing.c
@@ -74,8 +74,8 @@ public:
UINT8 m_sound_irq;
/* devices */
- device_t *m_maincpu;
- device_t *m_audiocpu;
+ cpu_device *m_maincpu;
+ cpu_device *m_audiocpu;
device_t *m_deco_tilegen1;
DECLARE_READ16_MEMBER(dblewing_prot_r);
DECLARE_WRITE16_MEMBER(dblewing_prot_w);
@@ -245,7 +245,7 @@ WRITE16_MEMBER(dblewing_state::dblewing_prot_w)
case 0x380: // sound write
soundlatch_byte_w(space, 0, data & 0xff);
m_sound_irq |= 0x02;
- device_set_input_line(m_audiocpu, 0, (m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
+ m_audiocpu->set_input_line(0, (m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
return;
case 0x384:
m_384_data = data;
@@ -341,7 +341,7 @@ READ8_MEMBER(dblewing_state::irq_latch_r)
/* bit 1 of dblewing_sound_irq specifies IRQ command writes */
m_sound_irq &= ~0x02;
- device_set_input_line(m_audiocpu, 0, (m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
+ m_audiocpu->set_input_line(0, (m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
return m_sound_irq;
}
@@ -536,7 +536,7 @@ static void sound_irq( device_t *device, int state )
driver_state->m_sound_irq |= 0x01;
else
driver_state->m_sound_irq &= ~0x01;
- device_set_input_line(driver_state->m_audiocpu, 0, (driver_state->m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
+ driver_state->m_audiocpu->set_input_line(0, (driver_state->m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2151_interface ym2151_config =
@@ -565,8 +565,8 @@ static MACHINE_START( dblewing )
{
dblewing_state *state = machine.driver_data<dblewing_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_deco_tilegen1 = machine.device("tilegen1");
state->save_item(NAME(state->m_008_data));
diff --git a/src/mame/drivers/dbz.c b/src/mame/drivers/dbz.c
index 815c7fe7150..70f0b3632fc 100644
--- a/src/mame/drivers/dbz.c
+++ b/src/mame/drivers/dbz.c
@@ -102,14 +102,14 @@ WRITE16_MEMBER(dbz_state::dbz_sound_command_w)
WRITE16_MEMBER(dbz_state::dbz_sound_cause_nmi)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static void dbz_sound_irq( device_t *device, int irq )
{
dbz_state *state = device->machine().driver_data<dbz_state>();
- device_set_input_line(state->m_audiocpu, 0, (irq) ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, (irq) ? ASSERT_LINE : CLEAR_LINE);
}
static ADDRESS_MAP_START( dbz_map, AS_PROGRAM, 16, dbz_state )
@@ -351,8 +351,8 @@ static MACHINE_START( dbz )
{
dbz_state *state = machine.driver_data<dbz_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k053936_1 = machine.device("k053936_1");
state->m_k053936_2 = machine.device("k053936_2");
state->m_k056832 = machine.device("k056832");
diff --git a/src/mame/drivers/dcheese.c b/src/mame/drivers/dcheese.c
index 3ccfe8b4a2a..3e2af7d54c6 100644
--- a/src/mame/drivers/dcheese.c
+++ b/src/mame/drivers/dcheese.c
@@ -53,7 +53,7 @@ static void update_irq_state( device_t *cpu )
int i;
for (i = 1; i < 5; i++)
- device_set_input_line(cpu, i, state->m_irq_state[i] ? ASSERT_LINE : CLEAR_LINE);
+ cpu->execute().set_input_line(i, state->m_irq_state[i] ? ASSERT_LINE : CLEAR_LINE);
}
@@ -97,11 +97,11 @@ static MACHINE_START( dcheese )
{
dcheese_state *state = machine.driver_data<dcheese_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_bsmt = machine.device("bsmt");
- device_set_irq_callback(state->m_maincpu, irq_callback);
+ state->m_maincpu->set_irq_acknowledge_callback(irq_callback);
state->save_item(NAME(state->m_irq_state));
state->save_item(NAME(state->m_soundlatch_full));
@@ -142,7 +142,7 @@ WRITE16_MEMBER(dcheese_state::sound_command_w)
{
/* write the latch and set the IRQ */
m_soundlatch_full = 1;
- device_set_input_line(m_audiocpu, 0, ASSERT_LINE);
+ m_audiocpu->set_input_line(0, ASSERT_LINE);
soundlatch_byte_w(space, 0, data & 0xff);
}
}
@@ -160,7 +160,7 @@ READ8_MEMBER(dcheese_state::sound_command_r)
/* read the latch and clear the IRQ */
m_soundlatch_full = 0;
- device_set_input_line(m_audiocpu, 0, CLEAR_LINE);
+ m_audiocpu->set_input_line(0, CLEAR_LINE);
return soundlatch_byte_r(space, 0);
}
diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c
index 2a169deb5e7..d9ff323cec3 100644
--- a/src/mame/drivers/ddayjlc.c
+++ b/src/mame/drivers/ddayjlc.c
@@ -85,7 +85,7 @@ public:
UINT8 m_prot_addr;
/* devices */
- device_t *m_audiocpu;
+ cpu_device *m_audiocpu;
DECLARE_WRITE8_MEMBER(prot_w);
DECLARE_WRITE8_MEMBER(char_bank_w);
DECLARE_WRITE8_MEMBER(ddayjlc_bgram_w);
@@ -212,7 +212,7 @@ WRITE8_MEMBER(ddayjlc_state::sound_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(ddayjlc_state::i8257_CH0_w)
@@ -436,14 +436,14 @@ static INTERRUPT_GEN( ddayjlc_interrupt )
{
ddayjlc_state *state = device->machine().driver_data<ddayjlc_state>();
if(state->m_main_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static INTERRUPT_GEN( ddayjlc_snd_interrupt )
{
ddayjlc_state *state = device->machine().driver_data<ddayjlc_state>();
if(state->m_sound_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -451,7 +451,7 @@ static MACHINE_START( ddayjlc )
{
ddayjlc_state *state = machine.driver_data<ddayjlc_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_char_bank));
state->save_item(NAME(state->m_bgadr));
diff --git a/src/mame/drivers/ddealer.c b/src/mame/drivers/ddealer.c
index 4c85adb83c7..3b742c950c0 100644
--- a/src/mame/drivers/ddealer.c
+++ b/src/mame/drivers/ddealer.c
@@ -620,7 +620,7 @@ static MACHINE_RESET (ddealer)
static INTERRUPT_GEN( ddealer_interrupt )
{
- device_set_input_line(device, 4, HOLD_LINE);
+ device->execute().set_input_line(4, HOLD_LINE);
}
static MACHINE_CONFIG_START( ddealer, ddealer_state )
diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c
index 5a734c0cc49..ff34c73fbae 100644
--- a/src/mame/drivers/ddenlovr.c
+++ b/src/mame/drivers/ddenlovr.c
@@ -830,14 +830,14 @@ g_profiler.start(PROFILER_VIDEO);
if (irq_vector)
/* quizchq */
- device_set_input_line_and_vector(&space->device(), 0, HOLD_LINE, irq_vector);
+ space->device().execute().set_input_line_and_vector(0, HOLD_LINE, irq_vector);
else
{
/* ddenlovr */
if (state->m_ddenlovr_blitter_irq_enable)
{
state->m_ddenlovr_blitter_irq_flag = 1;
- device_set_input_line(&space->device(), 1, HOLD_LINE);
+ space->device().execute().set_input_line(1, HOLD_LINE);
}
}
break;
@@ -996,7 +996,7 @@ g_profiler.start(PROFILER_VIDEO);
#endif
}
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, irq_vector);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, irq_vector);
break;
default:
@@ -2077,7 +2077,7 @@ WRITE8_MEMBER(dynax_state::mmpanic_rombank_w)
WRITE8_MEMBER(dynax_state::mmpanic_soundlatch_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(dynax_state::mmpanic_blitter_w)
@@ -8360,8 +8360,8 @@ static MACHINE_START( ddenlovr )
{
dynax_state *state = machine.driver_data<dynax_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_soundcpu = machine.device("soundcpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_soundcpu = machine.device<cpu_device>("soundcpu");
state->m_oki = machine.device<okim6295_device>("oki");
state->save_item(NAME(state->m_input_sel));
@@ -8608,14 +8608,14 @@ static INTERRUPT_GEN( quizchq_irq )
// if (downcast<cpu_device *>(state->m_maincpu)->input_state(0))
// return;
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xee);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xee);
}
static WRITE_LINE_DEVICE_HANDLER( quizchq_rtc_irq )
{
dynax_state *drvstate = device->machine().driver_data<dynax_state>();
- device_set_input_line_and_vector(drvstate->m_maincpu, 0, HOLD_LINE, 0xfc);
+ drvstate->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfc);
}
static MSM6242_INTERFACE( quizchq_rtc_intf )
@@ -8692,7 +8692,7 @@ static INTERRUPT_GEN( mmpanic_irq )
//if (downcast<cpu_device *>(state->m_maincpu)->input_state(0))
// return;
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xcf); // RST 08, vblank
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); // RST 08, vblank
}
@@ -8700,7 +8700,7 @@ static WRITE_LINE_DEVICE_HANDLER( mmpanic_rtc_irq )
{
dynax_state *drvstate = device->machine().driver_data<dynax_state>();
- device_set_input_line_and_vector(drvstate->m_maincpu, 0, HOLD_LINE, 0xdf); // RST 18, clock
+ drvstate->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xdf); // RST 18, clock
}
static MSM6242_INTERFACE( mmpanic_rtc_intf )
@@ -8777,7 +8777,7 @@ static INTERRUPT_GEN( hanakanz_irq )
//if (downcast<cpu_device *>(state->m_maincpu)->input_state(0))
// return;
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xe0);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe0);
}
static WRITE_LINE_DEVICE_HANDLER(hanakanz_rtc_irq)
@@ -8790,7 +8790,7 @@ static WRITE_LINE_DEVICE_HANDLER(hanakanz_rtc_irq)
//if (downcast<cpu_device *>(drvstate->m_maincpu)->input_state(0))
// return;
- device_set_input_line_and_vector(drvstate->m_maincpu, 0, HOLD_LINE, 0xe2);
+ drvstate->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe2);
}
static MSM6242_INTERFACE( hanakanz_rtc_intf )
@@ -8869,7 +8869,7 @@ static INTERRUPT_GEN( mjchuuka_irq )
//if (downcast<cpu_device *>(state->m_maincpu)->input_state(0))
// return;
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xf8);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8);
}
static WRITE_LINE_DEVICE_HANDLER(mjchuuka_rtc_irq)
@@ -8882,7 +8882,7 @@ static WRITE_LINE_DEVICE_HANDLER(mjchuuka_rtc_irq)
//if (downcast<cpu_device *>(drvstate->m_maincpu)->input_state(0))
// return;
- device_set_input_line_and_vector(drvstate->m_maincpu, 0, HOLD_LINE, 0xfa);
+ drvstate->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfa);
}
static MSM6242_INTERFACE( mjchuuka_rtc_intf )
@@ -8953,10 +8953,10 @@ static TIMER_DEVICE_CALLBACK( mjmyster_irq )
return;
if(scanline == 245)
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xf8);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8);
if(scanline == 0)
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xfa);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfa);
}
static const ay8910_interface mjmyster_ay8910_interface =
@@ -8978,7 +8978,7 @@ static WRITE_LINE_DEVICE_HANDLER(mjmyster_rtc_irq)
//if (downcast<cpu_device *>(drvstate->m_maincpu)->input_state(0))
// return;
- device_set_input_line(drvstate->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ drvstate->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MSM6242_INTERFACE( mjmyster_rtc_intf )
@@ -9028,7 +9028,7 @@ static INTERRUPT_GEN( hginga_irq )
// if (downcast<cpu_device *>(state->m_maincpu)->input_state(0))
// return;
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xf8);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8);
}
static const ay8910_interface hginga_ay8910_interface =
@@ -9050,7 +9050,7 @@ static WRITE_LINE_DEVICE_HANDLER(hginga_rtc_irq)
//if (downcast<cpu_device *>(drvstate->m_maincpu)->input_state(0))
// return;
- device_set_input_line_and_vector(drvstate->m_maincpu, 0, HOLD_LINE, 0xee);
+ drvstate->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xee);
}
static MSM6242_INTERFACE( hginga_rtc_intf )
@@ -9157,7 +9157,7 @@ static INTERRUPT_GEN( mjflove_irq )
dynax_state *state = device->machine().driver_data<dynax_state>();
state->m_mjflove_irq_cause = 1;
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
}
static WRITE_LINE_DEVICE_HANDLER(mjflove_rtc_irq)
@@ -9165,7 +9165,7 @@ static WRITE_LINE_DEVICE_HANDLER(mjflove_rtc_irq)
dynax_state *drvstate = device->machine().driver_data<dynax_state>();
drvstate->m_mjflove_irq_cause = 2;
- device_set_input_line(drvstate->m_maincpu, 0, HOLD_LINE);
+ drvstate->m_maincpu->set_input_line(0, HOLD_LINE);
}
static MSM6242_INTERFACE( mjflove_rtc_intf )
@@ -9198,7 +9198,7 @@ MACHINE_CONFIG_END
0xee is vblank */
static INTERRUPT_GEN( hparadis_irq )
{
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xee);
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xee);
}
static MACHINE_CONFIG_DERIVED( hparadis, quizchq )
diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c
index 5810402d9cc..e42667b7e84 100644
--- a/src/mame/drivers/ddragon.c
+++ b/src/mame/drivers/ddragon.c
@@ -130,11 +130,11 @@ static TIMER_DEVICE_CALLBACK( ddragon_scanline )
/* on the rising edge of VBLK (vcount == F8), signal an NMI */
if (vcount == 0xf8)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
/* set 1ms signal on rising edge of vcount & 8 */
if (!(vcount_old & 8) && (vcount & 8))
- device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, ASSERT_LINE);
+ state->m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
}
@@ -152,7 +152,7 @@ static MACHINE_START( ddragon )
/* configure banks */
state->membank("bank1")->configure_entries(0, 8, state->memregion("maincpu")->base() + 0x10000, 0x4000);
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_sub_cpu = machine.device("sub");
state->m_snd_cpu = machine.device("soundcpu");
state->m_adpcm_1 = machine.device("adpcm1");
@@ -201,7 +201,7 @@ WRITE8_MEMBER(ddragon_state::ddragon_bankswitch_w)
if (data & 0x10)
m_dd_sub_cpu_busy = 0;
else if (m_dd_sub_cpu_busy == 0)
- device_set_input_line(m_sub_cpu, m_sprite_irq, (m_sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
+ m_sub_cpu->execute().set_input_line(m_sprite_irq, (m_sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
membank("bank1")->set_entry((data & 0xe0) >> 5);
}
@@ -276,7 +276,7 @@ WRITE8_MEMBER(ddragon_state::darktowr_bankswitch_w)
if (data & 0x10)
m_dd_sub_cpu_busy = 0;
else if (m_dd_sub_cpu_busy == 0)
- device_set_input_line(m_sub_cpu, m_sprite_irq, (m_sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
+ m_sub_cpu->execute().set_input_line(m_sprite_irq, (m_sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
membank("bank1")->set_entry(newbank);
if (newbank == 4 && oldbank != 4)
@@ -298,20 +298,20 @@ WRITE8_MEMBER(ddragon_state::ddragon_interrupt_w)
switch (offset)
{
case 0: /* 380b - NMI ack */
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
break;
case 1: /* 380c - FIRQ ack */
- device_set_input_line(m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
break;
case 2: /* 380d - IRQ ack */
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
break;
case 3: /* 380e - SND irq */
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_snd_cpu, m_sound_irq, (m_sound_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
+ m_snd_cpu->execute().set_input_line(m_sound_irq, (m_sound_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
break;
case 4: /* 380f - ? */
@@ -323,20 +323,20 @@ WRITE8_MEMBER(ddragon_state::ddragon_interrupt_w)
WRITE8_MEMBER(ddragon_state::ddragon2_sub_irq_ack_w)
{
- device_set_input_line(m_sub_cpu, m_sprite_irq, CLEAR_LINE );
+ m_sub_cpu->execute().set_input_line(m_sprite_irq, CLEAR_LINE );
}
WRITE8_MEMBER(ddragon_state::ddragon2_sub_irq_w)
{
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, ASSERT_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
static void irq_handler( device_t *device, int irq )
{
ddragon_state *state = device->machine().driver_data<ddragon_state>();
- device_set_input_line(state->m_snd_cpu, state->m_ym_irq , irq ? ASSERT_LINE : CLEAR_LINE );
+ state->m_snd_cpu->execute().set_input_line(state->m_ym_irq , irq ? ASSERT_LINE : CLEAR_LINE );
}
@@ -378,8 +378,8 @@ WRITE8_MEMBER(ddragon_state::ddragon_hd63701_internal_registers_w)
it's quite obvious from the Double Dragon 2 code, below). */
if (data & 3)
{
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, ASSERT_LINE);
- device_set_input_line(m_sub_cpu, m_sprite_irq, CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
+ m_sub_cpu->execute().set_input_line(m_sprite_irq, CLEAR_LINE);
}
}
}
@@ -561,8 +561,8 @@ ADDRESS_MAP_END
/* might not be 100% accurate, check bits written */
WRITE8_MEMBER(ddragon_state::ddragonba_port_w)
{
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, ASSERT_LINE);
- device_set_input_line(m_sub_cpu, m_sprite_irq, CLEAR_LINE );
+ m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
+ m_sub_cpu->execute().set_input_line(m_sprite_irq, CLEAR_LINE );
}
static ADDRESS_MAP_START( ddragonba_sub_portmap, AS_IO, 8, ddragon_state )
diff --git a/src/mame/drivers/ddragon3.c b/src/mame/drivers/ddragon3.c
index 8839608dd3b..928bdba44c7 100644
--- a/src/mame/drivers/ddragon3.c
+++ b/src/mame/drivers/ddragon3.c
@@ -174,25 +174,25 @@ WRITE16_MEMBER(ddragon3_state::ddragon3_io_w)
case 1: /* soundlatch_byte_w */
soundlatch_byte_w(space, 1, m_io_reg[1] & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE );
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE );
break;
case 2:
/* this gets written to on startup and at the end of IRQ6
** possibly trigger IRQ on sound CPU
*/
- device_set_input_line(m_maincpu, 6, CLEAR_LINE);
+ m_maincpu->set_input_line(6, CLEAR_LINE);
break;
case 3:
/* this gets written to on startup,
** and at the end of IRQ5 (input port read) */
- device_set_input_line(m_maincpu, 5, CLEAR_LINE);
+ m_maincpu->set_input_line(5, CLEAR_LINE);
break;
case 4:
/* this gets written to at the end of IRQ6 only */
- device_set_input_line(m_maincpu, 6, CLEAR_LINE);
+ m_maincpu->set_input_line(6, CLEAR_LINE);
break;
default:
@@ -517,7 +517,7 @@ GFXDECODE_END
static void dd3_ymirq_handler(device_t *device, int irq)
{
ddragon3_state *state = device->machine().driver_data<ddragon3_state>();
- device_set_input_line(state->m_audiocpu, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
+ state->m_audiocpu->set_input_line(0 , irq ? ASSERT_LINE : CLEAR_LINE );
}
static const ym2151_interface ym2151_config =
@@ -541,14 +541,14 @@ static TIMER_DEVICE_CALLBACK( ddragon3_scanline )
{
if (scanline > 0)
timer.machine().primary_screen->update_partial(scanline - 1);
- device_set_input_line(state->m_maincpu, 5, ASSERT_LINE);
+ state->m_maincpu->set_input_line(5, ASSERT_LINE);
}
/* Vblank is raised on scanline 248 */
if (scanline == 248)
{
timer.machine().primary_screen->update_partial(scanline - 1);
- device_set_input_line(state->m_maincpu, 6, ASSERT_LINE);
+ state->m_maincpu->set_input_line(6, ASSERT_LINE);
}
}
@@ -562,8 +562,8 @@ static MACHINE_START( ddragon3 )
{
ddragon3_state *state = machine.driver_data<ddragon3_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_vreg));
state->save_item(NAME(state->m_bg_scrollx));
diff --git a/src/mame/drivers/ddribble.c b/src/mame/drivers/ddribble.c
index 1d3911ba825..bab36d9ff6f 100644
--- a/src/mame/drivers/ddribble.c
+++ b/src/mame/drivers/ddribble.c
@@ -22,14 +22,14 @@ static INTERRUPT_GEN( ddribble_interrupt_0 )
{
ddribble_state *state = device->machine().driver_data<ddribble_state>();
if (state->m_int_enable_0)
- device_set_input_line(device, M6809_FIRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
static INTERRUPT_GEN( ddribble_interrupt_1 )
{
ddribble_state *state = device->machine().driver_data<ddribble_state>();
if (state->m_int_enable_1)
- device_set_input_line(device, M6809_FIRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
diff --git a/src/mame/drivers/dec8.c b/src/mame/drivers/dec8.c
index 12bdc210ff2..2a509e56485 100644
--- a/src/mame/drivers/dec8.c
+++ b/src/mame/drivers/dec8.c
@@ -135,7 +135,7 @@ static TIMER_CALLBACK( dec8_i8751_timer_callback )
// The schematics show a clocked LS194 shift register (3A) is used to automatically
// clear the IRQ request. The MCU does not clear it itself.
dec8_state *state = machine.driver_data<dec8_state>();
- device_set_input_line(state->m_mcu, MCS51_INT1_LINE, CLEAR_LINE);
+ state->m_mcu->execute().set_input_line(MCS51_INT1_LINE, CLEAR_LINE);
}
WRITE8_MEMBER(dec8_state::dec8_i8751_w)
@@ -145,7 +145,7 @@ WRITE8_MEMBER(dec8_state::dec8_i8751_w)
{
case 0: /* High byte - SECIRQ is trigged on activating this latch */
m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
- device_set_input_line(m_mcu, MCS51_INT1_LINE, ASSERT_LINE);
+ m_mcu->execute().set_input_line(MCS51_INT1_LINE, ASSERT_LINE);
machine().scheduler().timer_set(m_mcu->clocks_to_attotime(64), FUNC(dec8_i8751_timer_callback)); // 64 clocks not confirmed
break;
case 1: /* Low byte */
@@ -175,7 +175,7 @@ WRITE8_MEMBER(dec8_state::lastmisn_i8751_w)
{
case 0: /* High byte */
m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
- device_set_input_line(m_maincpu, M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
break;
case 1: /* Low byte */
m_i8751_value = (m_i8751_value & 0xff00) | data;
@@ -238,7 +238,7 @@ WRITE8_MEMBER(dec8_state::shackled_i8751_w)
{
case 0: /* High byte */
m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
- device_set_input_line(m_subcpu, M6809_FIRQ_LINE, HOLD_LINE); /* Signal sub cpu */
+ m_subcpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); /* Signal sub cpu */
break;
case 1: /* Low byte */
m_i8751_value = (m_i8751_value & 0xff00) | data;
@@ -276,7 +276,7 @@ WRITE8_MEMBER(dec8_state::csilver_i8751_w)
{
case 0: /* High byte */
m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
- device_set_input_line(m_maincpu, M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
break;
case 1: /* Low byte */
m_i8751_value = (m_i8751_value & 0xff00) | data;
@@ -459,7 +459,7 @@ WRITE8_MEMBER(dec8_state::ghostb_bank_w)
membank("bank1")->set_entry(data >> 4);
- if ((data&1)==0) device_set_input_line(m_maincpu, M6809_IRQ_LINE, CLEAR_LINE);
+ if ((data&1)==0) m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
if (data & 2) m_nmi_enable =1; else m_nmi_enable = 0;
flip_screen_set(data & 0x08);
}
@@ -479,7 +479,7 @@ WRITE8_MEMBER(dec8_state::csilver_control_w)
WRITE8_MEMBER(dec8_state::dec8_sound_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static void csilver_adpcm_int( device_t *device )
@@ -487,7 +487,7 @@ static void csilver_adpcm_int( device_t *device )
dec8_state *state = device->machine().driver_data<dec8_state>();
state->m_toggle ^= 1;
if (state->m_toggle)
- device_set_input_line(state->m_audiocpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
msm5205_data_w(device, state->m_msm5205next >> 4);
state->m_msm5205next <<= 4;
@@ -518,16 +518,16 @@ WRITE8_MEMBER(dec8_state::oscar_int_w)
switch (offset)
{
case 0: /* IRQ2 */
- device_set_input_line(m_subcpu, M6809_IRQ_LINE, ASSERT_LINE);
+ m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
return;
case 1: /* IRC 1 */
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
return;
case 2: /* IRQ 1 */
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, ASSERT_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
return;
case 3: /* IRC 2 */
- device_set_input_line(m_subcpu, M6809_IRQ_LINE, CLEAR_LINE);
+ m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
return;
}
}
@@ -542,18 +542,18 @@ WRITE8_MEMBER(dec8_state::shackled_int_w)
switch (offset)
{
case 0: /* CPU 2 - IRQ acknowledge */
- device_set_input_line(m_subcpu, M6809_IRQ_LINE, CLEAR_LINE);
+ m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
return;
case 1: /* CPU 1 - IRQ acknowledge */
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
return;
case 2: /* i8751 - FIRQ acknowledge */
return;
case 3: /* IRQ 1 */
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, ASSERT_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
return;
case 4: /* IRQ 2 */
- device_set_input_line(m_subcpu, M6809_IRQ_LINE, ASSERT_LINE);
+ m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
return;
}
#endif
@@ -567,10 +567,10 @@ WRITE8_MEMBER(dec8_state::shackled_int_w)
case 2: /* i8751 - FIRQ acknowledge */
return;
case 3: /* IRQ 1 */
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, HOLD_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
return;
case 4: /* IRQ 2 */
- device_set_input_line(m_subcpu, M6809_IRQ_LINE, HOLD_LINE);
+ m_subcpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
return;
}
}
@@ -960,7 +960,7 @@ WRITE8_MEMBER(dec8_state::dec8_mcu_to_main_w)
// P2 - IRQ to main CPU
if (offset==2 && (data&4)==0)
- device_set_input_line(m_maincpu, M6809_IRQ_LINE, ASSERT_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
static ADDRESS_MAP_START( dec8_mcu_io_map, AS_IO, 8, dec8_state )
@@ -1935,7 +1935,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int linestate )
{
dec8_state *state = device->machine().driver_data<dec8_state>();
- device_set_input_line(state->m_audiocpu, 0, linestate); /* M6502_IRQ_LINE */
+ state->m_audiocpu->set_input_line(0, linestate); /* M6502_IRQ_LINE */
}
static const ym3526_interface ym3526_config =
@@ -1960,7 +1960,7 @@ static INTERRUPT_GEN( gondo_interrupt )
{
dec8_state *state = device->machine().driver_data<dec8_state>();
if (state->m_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); /* VBL */
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* VBL */
}
/* Coins generate NMI's */
@@ -1971,7 +1971,7 @@ static INTERRUPT_GEN( oscar_interrupt )
if (state->m_latch && (state->ioport("IN2")->read() & 0x7) != 0x7)
{
state->m_latch = 0;
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -1982,9 +1982,9 @@ static MACHINE_START( dec8 )
{
dec8_state *state = machine.driver_data<dec8_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_subcpu = machine.device("sub");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_subcpu = machine.device<cpu_device>("sub");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_mcu = machine.device("mcu");
state->save_item(NAME(state->m_latch));
diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c
index e2989800eb5..417624a09a1 100644
--- a/src/mame/drivers/deco156.c
+++ b/src/mame/drivers/deco156.c
@@ -315,7 +315,7 @@ static const ymz280b_interface ymz280b_intf =
static INTERRUPT_GEN( deco32_vbl_interrupt )
{
- device_set_input_line(device, ARM_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE);
}
static int deco156_bank_callback(const int bank)
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index fcf01f80a8f..df43ef3db77 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -1673,7 +1673,7 @@ static MACHINE_RESET( deco32 )
static INTERRUPT_GEN( deco32_vbl_interrupt )
{
- device_set_input_line(device, ARM_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE);
}
UINT16 captaven_pri_callback(UINT16 x)
@@ -2000,13 +2000,13 @@ static TIMER_DEVICE_CALLBACK( lockload_vbl_irq )
if(scanline == 31*8)
{
state->m_irq_source = 0;
- device_set_input_line(state->m_maincpu, ARM_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE);
}
if(scanline == 0)
{
state->m_irq_source = 1;
- device_set_input_line(state->m_maincpu, ARM_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE);
}
}
diff --git a/src/mame/drivers/deco_ld.c b/src/mame/drivers/deco_ld.c
index 684b7ad4afc..f56e0931958 100644
--- a/src/mame/drivers/deco_ld.c
+++ b/src/mame/drivers/deco_ld.c
@@ -249,7 +249,7 @@ WRITE8_MEMBER(deco_ld_state::laserdisc_w)
WRITE8_MEMBER(deco_ld_state::decold_sound_cmd_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
/* same as Burger Time HW */
@@ -297,7 +297,7 @@ WRITE8_MEMBER(deco_ld_state::nmimask_w)
static INTERRUPT_GEN ( sound_interrupt )
{
deco_ld_state *state = device->machine().driver_data<deco_ld_state>();
- if (!state->m_nmimask) device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ if (!state->m_nmimask) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -318,7 +318,7 @@ CUSTOM_INPUT_MEMBER( deco_ld_state::begas_vblank_r )
INPUT_CHANGED_MEMBER(deco_ld_state::coin_inserted)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( begas )
diff --git a/src/mame/drivers/deco_mlc.c b/src/mame/drivers/deco_mlc.c
index cf919d4aa57..ccc405c22ce 100644
--- a/src/mame/drivers/deco_mlc.c
+++ b/src/mame/drivers/deco_mlc.c
@@ -724,7 +724,7 @@ READ32_MEMBER(deco_mlc_state::avengrgs_speedup_r)
UINT32 a=m_mlc_ram[0x89a0/4];
UINT32 p=space.device().safe_pc();
- if ((p==0x3234 || p==0x32dc) && (a&1)) device_spin_until_interrupt(&space.device());
+ if ((p==0x3234 || p==0x32dc) && (a&1)) space.device().execute().spin_until_interrupt();
return a;
}
diff --git a/src/mame/drivers/deniam.c b/src/mame/drivers/deniam.c
index 38a33af3b8a..c7e44be1c44 100644
--- a/src/mame/drivers/deniam.c
+++ b/src/mame/drivers/deniam.c
@@ -53,7 +53,7 @@ WRITE16_MEMBER(deniam_state::sound_command_w)
if (ACCESSING_BITS_8_15)
{
soundlatch_byte_w(space,offset, (data >> 8) & 0xff);
- device_set_input_line(m_audio_cpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audio_cpu->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -228,7 +228,7 @@ static void irqhandler( device_t *device, int linestate )
/* system 16c doesn't have the sound CPU */
if (state->m_audio_cpu != NULL)
- device_set_input_line(state->m_audio_cpu, 0, linestate);
+ state->m_audio_cpu->execute().set_input_line(0, linestate);
}
static const ym3812_interface ym3812_config =
diff --git a/src/mame/drivers/deshoros.c b/src/mame/drivers/deshoros.c
index f753b3d6d79..f4f89d54df9 100644
--- a/src/mame/drivers/deshoros.c
+++ b/src/mame/drivers/deshoros.c
@@ -89,12 +89,12 @@ static SCREEN_UPDATE_IND16( destiny )
WRITE8_MEMBER(destiny_state::firq_ack_w)
{
- device_set_input_line(m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
}
WRITE8_MEMBER(destiny_state::nmi_ack_w)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
READ8_MEMBER(destiny_state::printer_status_r)
@@ -147,7 +147,7 @@ INPUT_CHANGED_MEMBER(destiny_state::coin_inserted)
{
// NMI on Coin SW or Service SW
if (oldval)
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
// coincounter on coin insert
if (((int)(FPTR)param) == 0)
diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c
index 2ed807aa41c..00b9f0009b1 100644
--- a/src/mame/drivers/destroyr.c
+++ b/src/mame/drivers/destroyr.c
@@ -41,7 +41,7 @@ public:
int m_noise;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
DECLARE_WRITE8_MEMBER(destroyr_misc_w);
DECLARE_WRITE8_MEMBER(destroyr_cursor_load_w);
DECLARE_WRITE8_MEMBER(destroyr_interrupt_ack_w);
@@ -134,7 +134,7 @@ static TIMER_CALLBACK( destroyr_dial_callback )
if (state->m_potmask[dial])
{
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -194,7 +194,7 @@ WRITE8_MEMBER(destroyr_state::destroyr_cursor_load_w)
WRITE8_MEMBER(destroyr_state::destroyr_interrupt_ack_w)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
@@ -435,7 +435,7 @@ static MACHINE_START( destroyr )
{
destroyr_state *state = machine.driver_data<destroyr_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_cursor));
state->save_item(NAME(state->m_wavemod));
diff --git a/src/mame/drivers/dfruit.c b/src/mame/drivers/dfruit.c
index 05e9bd89725..ca7d2925414 100644
--- a/src/mame/drivers/dfruit.c
+++ b/src/mame/drivers/dfruit.c
@@ -354,17 +354,17 @@ static TIMER_DEVICE_CALLBACK( dfruit_irq_scanline )
if (scanline == 240 && (state->m_irq_enable & 4))
{
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, state->m_irq_vector[2]);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, state->m_irq_vector[2]);
}
if (scanline == 0 && (state->m_irq_enable & 2))
{
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, state->m_irq_vector[1]);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, state->m_irq_vector[1]);
}
if (scanline == 196 && (state->m_irq_enable & 1))
{
- //device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, state->m_irq_vector[0]);
+ //state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, state->m_irq_vector[0]);
}
}
diff --git a/src/mame/drivers/dgpix.c b/src/mame/drivers/dgpix.c
index 95a8bf9a7fd..2ec1b3d341e 100644
--- a/src/mame/drivers/dgpix.c
+++ b/src/mame/drivers/dgpix.c
@@ -197,7 +197,7 @@ WRITE32_MEMBER(dgpix_state::coin_w)
READ32_MEMBER(dgpix_state::vblank_r)
{
/* burn a bunch of cycles because this is polled frequently during busy loops */
- device_eat_cycles(&space.device(), 100);
+ space.device().execute().eat_cycles(100);
return ioport("VBLANK")->read();
}
diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c
index 5f67b457bff..844eaec380c 100644
--- a/src/mame/drivers/dietgo.c
+++ b/src/mame/drivers/dietgo.c
@@ -163,7 +163,7 @@ GFXDECODE_END
static void sound_irq(device_t *device, int state)
{
dietgo_state *driver_state = device->machine().driver_data<dietgo_state>();
- device_set_input_line(driver_state->m_audiocpu, 1, state); /* IRQ 2 */
+ driver_state->m_audiocpu->set_input_line(1, state); /* IRQ 2 */
}
static const ym2151_interface ym2151_config =
@@ -199,8 +199,8 @@ static MACHINE_START( dietgo )
{
dietgo_state *state = machine.driver_data<dietgo_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_deco_tilegen1 = machine.device("tilegen1");
}
diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c
index ec1ed2acdb7..1e03a797f3e 100644
--- a/src/mame/drivers/discoboy.c
+++ b/src/mame/drivers/discoboy.c
@@ -60,7 +60,7 @@ public:
UINT8 m_toggle;
/* devices */
- device_t *m_audiocpu;
+ cpu_device *m_audiocpu;
/* memory */
UINT8 m_ram_1[0x800];
@@ -233,9 +233,9 @@ WRITE8_MEMBER(discoboy_state::discoboy_port_01_w)
WRITE8_MEMBER(discoboy_state::discoboy_port_03_w)// sfx? (to sound cpu)
{
// printf("unk discoboy_port_03_w %02x\n", data);
- // device_set_input_line(m_audiocpu, INPUT_LINE_NMI, HOLD_LINE);
+ // m_audiocpu->set_input_line(INPUT_LINE_NMI, HOLD_LINE);
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(discoboy_state::discoboy_port_06_w)
@@ -455,7 +455,7 @@ static MACHINE_START( discoboy )
{
discoboy_state *state = machine.driver_data<discoboy_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_ram_bank));
state->save_item(NAME(state->m_port_00));
diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c
index 7be73f40e97..89686986c7c 100644
--- a/src/mame/drivers/diverboy.c
+++ b/src/mame/drivers/diverboy.c
@@ -65,7 +65,7 @@ public:
// UINT16 * m_paletteram; // currently this uses generic palette handling
/* devices */
- device_t *m_audiocpu;
+ cpu_device *m_audiocpu;
DECLARE_WRITE16_MEMBER(soundcmd_w);
DECLARE_WRITE8_MEMBER(okibank_w);
};
@@ -125,7 +125,7 @@ WRITE16_MEMBER(diverboy_state::soundcmd_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
}
@@ -248,7 +248,7 @@ static MACHINE_START( diverboy )
{
diverboy_state *state = machine.driver_data<diverboy_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
}
static MACHINE_CONFIG_START( diverboy, diverboy_state )
diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c
index 904e48ff15b..7114e340ae3 100644
--- a/src/mame/drivers/djboy.c
+++ b/src/mame/drivers/djboy.c
@@ -153,7 +153,7 @@ WRITE8_MEMBER(djboy_state::beast_data_w)
m_data_to_beast = data;
m_z80_to_beast_full = 1;
m_beast_int0_l = 0;
- device_set_input_line(m_beast, INPUT_LINE_IRQ0, ASSERT_LINE);
+ m_beast->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
READ8_MEMBER(djboy_state::beast_data_r)
@@ -172,7 +172,7 @@ READ8_MEMBER(djboy_state::beast_status_r)
WRITE8_MEMBER(djboy_state::trigger_nmi_on_cpu0)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(djboy_state::cpu0_bankswitch_w)
@@ -233,7 +233,7 @@ WRITE8_MEMBER(djboy_state::coin_count_w)
WRITE8_MEMBER(djboy_state::trigger_nmi_on_sound_cpu2)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_cpu2, INPUT_LINE_NMI, PULSE_LINE);
+ m_cpu2->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
} /* trigger_nmi_on_sound_cpu2 */
WRITE8_MEMBER(djboy_state::cpu2_bankswitch_w)
@@ -336,7 +336,7 @@ WRITE8_MEMBER(djboy_state::beast_p1_w)
if (data == 0xff)
{
m_beast_int0_l = 1;
- device_set_input_line(m_beast, INPUT_LINE_IRQ0, CLEAR_LINE);
+ m_beast->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
m_beast_p1 = data;
@@ -380,7 +380,7 @@ WRITE8_MEMBER(djboy_state::beast_p3_w)
{
m_beast_p3 = data;
- device_set_input_line(m_cpu1, INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
+ m_cpu1->execute().set_input_line(INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
}
/* Program/data maps are defined in the 8051 core */
@@ -534,7 +534,7 @@ static MACHINE_START( djboy )
state->membank("bank3")->configure_entries(3, 5, &CPU2[0x10000], 0x4000);
state->membank("bank4")->configure_entry(0, &MAIN[0x10000]); /* unsure if/how this area is banked */
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_cpu1 = machine.device("cpu1");
state->m_cpu2 = machine.device("cpu2");
state->m_beast = machine.device("beast");
diff --git a/src/mame/drivers/djmain.c b/src/mame/drivers/djmain.c
index 739ddbd7da3..29782e47077 100644
--- a/src/mame/drivers/djmain.c
+++ b/src/mame/drivers/djmain.c
@@ -408,7 +408,7 @@ static INTERRUPT_GEN( vb_interrupt )
}
//logerror("V-Blank interrupt\n");
- device_set_input_line(device, M68K_IRQ_4, HOLD_LINE);
+ device->execute().set_input_line(M68K_IRQ_4, HOLD_LINE);
}
diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c
index f78eaa60227..6f3838cb354 100644
--- a/src/mame/drivers/dkong.c
+++ b/src/mame/drivers/dkong.c
@@ -391,7 +391,7 @@ static I8257_INTERFACE( hb_dma )
static INTERRUPT_GEN( s2650_interrupt )
{
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x03);
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x03);
}
/*************************************
@@ -711,13 +711,13 @@ WRITE8_MEMBER(dkong_state::dkong3_2a03_reset_w)
if (data & 1)
{
- device_set_input_line(m_dev_n2a03a, INPUT_LINE_RESET, CLEAR_LINE);
- device_set_input_line(m_dev_n2a03b, INPUT_LINE_RESET, CLEAR_LINE);
+ m_dev_n2a03a->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ m_dev_n2a03b->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
else
{
- device_set_input_line(m_dev_n2a03a, INPUT_LINE_RESET, ASSERT_LINE);
- device_set_input_line(m_dev_n2a03b, INPUT_LINE_RESET, ASSERT_LINE);
+ m_dev_n2a03a->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_dev_n2a03b->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
}
@@ -1650,7 +1650,7 @@ static INTERRUPT_GEN( vblank_irq )
dkong_state *state = device->machine().driver_data<dkong_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( dkong_base, dkong_state )
diff --git a/src/mame/drivers/dogfgt.c b/src/mame/drivers/dogfgt.c
index 7700eb037b2..fa89d825c56 100644
--- a/src/mame/drivers/dogfgt.c
+++ b/src/mame/drivers/dogfgt.c
@@ -28,12 +28,12 @@ WRITE8_MEMBER(dogfgt_state::subirqtrigger_w)
{
/* bit 0 used but unknown */
if (data & 0x04)
- device_set_input_line(m_subcpu, 0, ASSERT_LINE);
+ m_subcpu->set_input_line(0, ASSERT_LINE);
}
WRITE8_MEMBER(dogfgt_state::sub_irqack_w)
{
- device_set_input_line(m_subcpu, 0, CLEAR_LINE);
+ m_subcpu->set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(dogfgt_state::dogfgt_soundlatch_w)
@@ -210,7 +210,7 @@ static MACHINE_START( dogfgt )
{
dogfgt_state *state = machine.driver_data<dogfgt_state>();
- state->m_subcpu = machine.device("sub");
+ state->m_subcpu = machine.device<cpu_device>("sub");
state->save_item(NAME(state->m_bm_plane));
state->save_item(NAME(state->m_lastflip));
diff --git a/src/mame/drivers/drgnmst.c b/src/mame/drivers/drgnmst.c
index c760d56562f..abf7a13cc79 100644
--- a/src/mame/drivers/drgnmst.c
+++ b/src/mame/drivers/drgnmst.c
@@ -54,7 +54,7 @@ WRITE16_MEMBER(drgnmst_state::drgnmst_snd_command_w)
if (ACCESSING_BITS_0_7)
{
m_snd_command = (data & 0xff);
- device_yield(&space.device());
+ space.device().execute().yield();
}
}
diff --git a/src/mame/drivers/dribling.c b/src/mame/drivers/dribling.c
index 433d32fd4d6..da53e0d8ba7 100644
--- a/src/mame/drivers/dribling.c
+++ b/src/mame/drivers/dribling.c
@@ -42,7 +42,7 @@ static INTERRUPT_GEN( dribling_irq_gen )
{
dribling_state *state = device->machine().driver_data<dribling_state>();
if (state->m_di)
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
@@ -88,7 +88,7 @@ WRITE8_MEMBER(dribling_state::misc_w)
/* bit 7 = di */
m_di = (data >> 7) & 1;
if (!m_di)
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
/* bit 6 = parata */
diff --git a/src/mame/drivers/drmicro.c b/src/mame/drivers/drmicro.c
index 22a2f27dd3c..d437c6af1d0 100644
--- a/src/mame/drivers/drmicro.c
+++ b/src/mame/drivers/drmicro.c
@@ -28,7 +28,7 @@ static INTERRUPT_GEN( drmicro_interrupt )
drmicro_state *state = device->machine().driver_data<drmicro_state>();
if (state->m_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(drmicro_state::nmi_enable_w)
diff --git a/src/mame/drivers/dwarfd.c b/src/mame/drivers/dwarfd.c
index ce7d4937e87..010ef924e92 100644
--- a/src/mame/drivers/dwarfd.c
+++ b/src/mame/drivers/dwarfd.c
@@ -875,7 +875,7 @@ static TIMER_DEVICE_CALLBACK( dwarfd_interrupt )
if (scanline < 25*8)
{
- device_set_input_line(state->m_maincpu, I8085_RST65_LINE, HOLD_LINE); // 34 - every 8th line
+ state->m_maincpu->set_input_line(I8085_RST65_LINE, HOLD_LINE); // 34 - every 8th line
state->m_line = scanline/8;
state->m_idx = 0;
}
@@ -883,7 +883,7 @@ static TIMER_DEVICE_CALLBACK( dwarfd_interrupt )
{
if (scanline == 25*8)
{
- device_set_input_line(state->m_maincpu, I8085_RST55_LINE, HOLD_LINE);//2c - generated by crt - end of frame
+ state->m_maincpu->set_input_line(I8085_RST55_LINE, HOLD_LINE);//2c - generated by crt - end of frame
}
}
}
diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c
index 35bf58ed207..f93d61b66da 100644
--- a/src/mame/drivers/dynax.c
+++ b/src/mame/drivers/dynax.c
@@ -102,7 +102,7 @@ void sprtmtch_update_irq( running_machine &machine )
{
dynax_state *state = machine.driver_data<dynax_state>();
int irq = (state->m_sound_irq ? 0x08 : 0) | ((state->m_vblank_irq) ? 0x10 : 0) | ((state->m_blitter_irq) ? 0x20 : 0) ;
- device_set_input_line_and_vector(state->m_maincpu, 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
+ state->m_maincpu->set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
}
WRITE8_MEMBER(dynax_state::dynax_vblank_ack_w)
@@ -141,7 +141,7 @@ void jantouki_update_irq(running_machine &machine)
{
dynax_state *state = machine.driver_data<dynax_state>();
int irq = ((state->m_blitter_irq) ? 0x08 : 0) | ((state->m_blitter2_irq) ? 0x10 : 0) | ((state->m_vblank_irq) ? 0x20 : 0) ;
- device_set_input_line_and_vector(state->m_maincpu, 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
+ state->m_maincpu->set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
}
WRITE8_MEMBER(dynax_state::jantouki_vblank_ack_w)
@@ -178,7 +178,7 @@ static void jantouki_sound_update_irq(running_machine &machine)
{
dynax_state *state = machine.driver_data<dynax_state>();
int irq = ((state->m_sound_irq) ? 0x08 : 0) | ((state->m_soundlatch_irq) ? 0x10 : 0) | ((state->m_sound_vblank_irq) ? 0x20 : 0) ;
- device_set_input_line_and_vector(state->m_soundcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
+ state->m_soundcpu->set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
}
static INTERRUPT_GEN( jantouki_sound_vblank_interrupt )
@@ -407,7 +407,7 @@ static void adpcm_int( device_t *device )
if (state->m_toggle)
{
if (state->m_resetkludge) // don't know what's wrong, but NMIs when the 5205 is reset make the game crash
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -421,7 +421,7 @@ static void adpcm_int_cpu1( device_t *device )
if (state->m_toggle_cpu1)
{
if (state->m_resetkludge) // don't know what's wrong, but NMIs when the 5205 is reset make the game crash
- device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); // cpu1
+ state->m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); // cpu1
}
}
@@ -4157,8 +4157,8 @@ static MACHINE_START( dynax )
{
dynax_state *state = machine.driver_data<dynax_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_soundcpu = machine.device("soundcpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_soundcpu = machine.device<cpu_device>("soundcpu");
state->m_rtc = machine.device("rtc");
state->m_ymsnd = machine.device("ymsnd");
@@ -4716,7 +4716,7 @@ void mjelctrn_update_irq( running_machine &machine )
{
dynax_state *state = machine.driver_data<dynax_state>();
state->m_blitter_irq = 1;
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xfa);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfa);
}
static INTERRUPT_GEN( mjelctrn_vblank_interrupt )
@@ -4726,7 +4726,7 @@ static INTERRUPT_GEN( mjelctrn_vblank_interrupt )
// This is a kludge to avoid losing blitter interrupts
// there should be a vblank ack mechanism
if (!state->m_blitter_irq)
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xf8);
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xf8);
}
static MACHINE_CONFIG_DERIVED( mjelctrn, hnoridur )
@@ -4751,7 +4751,7 @@ void neruton_update_irq( running_machine &machine )
{
dynax_state *state = machine.driver_data<dynax_state>();
state->m_blitter_irq = 1;
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x42);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x42);
}
static TIMER_DEVICE_CALLBACK( neruton_irq_scanline )
@@ -4764,9 +4764,9 @@ static TIMER_DEVICE_CALLBACK( neruton_irq_scanline )
if (state->m_blitter_irq) return;
if(scanline == 256)
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x40);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x40);
else if((scanline % 32) == 0)
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x46);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x46);
}
static MACHINE_CONFIG_DERIVED( neruton, mjelctrn )
@@ -4794,9 +4794,9 @@ static TIMER_DEVICE_CALLBACK( majxtal7_vblank_interrupt )
if (state->m_blitter_irq) return;
if(scanline == 256)
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x40);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x40);
else if((scanline % 32) == 0)
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x44); // temp kludge
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x44); // temp kludge
}
static MACHINE_CONFIG_DERIVED( majxtal7, neruton )
@@ -4876,10 +4876,10 @@ static TIMER_DEVICE_CALLBACK( tenkai_interrupt )
int scanline = param;
if(scanline == 256)
- device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
if(scanline == 0)
- device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ1, HOLD_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_IRQ1, HOLD_LINE);
}
static const ay8910_interface tenkai_ay8910_interface =
@@ -4900,7 +4900,7 @@ static MACHINE_START( tenkai )
WRITE_LINE_MEMBER(dynax_state::tenkai_rtc_irq)
{
- device_set_input_line(m_maincpu, INPUT_LINE_IRQ2, HOLD_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_IRQ2, HOLD_LINE);
}
static MSM6242_INTERFACE( tenkai_rtc_intf )
diff --git a/src/mame/drivers/dynduke.c b/src/mame/drivers/dynduke.c
index 006b0624e96..07875ea4be3 100644
--- a/src/mame/drivers/dynduke.c
+++ b/src/mame/drivers/dynduke.c
@@ -265,7 +265,7 @@ GFXDECODE_END
static INTERRUPT_GEN( dynduke_interrupt )
{
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xc8/4); // VBL
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // VBL
}
/* Machine Driver */
diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c
index 197f6f515dc..5f5b58360d2 100644
--- a/src/mame/drivers/egghunt.c
+++ b/src/mame/drivers/egghunt.c
@@ -61,7 +61,7 @@ public:
UINT8 m_gfx_banking;
/* devices */
- device_t *m_audiocpu;
+ cpu_device *m_audiocpu;
/* memory */
required_shared_ptr<UINT8> m_atram;
@@ -203,7 +203,7 @@ WRITE8_MEMBER(egghunt_state::egghunt_vidram_bank_w)
WRITE8_MEMBER(egghunt_state::egghunt_soundlatch_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
READ8_MEMBER(egghunt_state::egghunt_okibanking_r)
@@ -391,7 +391,7 @@ static MACHINE_START( egghunt )
{
egghunt_state *state = machine.driver_data<egghunt_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_gfx_banking));
state->save_item(NAME(state->m_okibanking));
diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c
index 4b9db76f277..e68d394d65d 100644
--- a/src/mame/drivers/enigma2.c
+++ b/src/mame/drivers/enigma2.c
@@ -77,8 +77,8 @@ public:
emu_timer *m_interrupt_assert_timer;
/* devices */
- device_t *m_maincpu;
- device_t *m_audiocpu;
+ cpu_device *m_maincpu;
+ cpu_device *m_audiocpu;
DECLARE_READ8_MEMBER(dip_switch_r);
DECLARE_WRITE8_MEMBER(sound_data_w);
DECLARE_WRITE8_MEMBER(enigma2_flip_screen_w);
@@ -112,7 +112,7 @@ INLINE int vysnc_chain_counter_to_vpos( UINT16 counter )
static TIMER_CALLBACK( interrupt_clear_callback )
{
enigma2_state *state = machine.driver_data<enigma2_state>();
- device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);
+ state->m_maincpu->set_input_line(0, CLEAR_LINE);
}
@@ -126,7 +126,7 @@ static TIMER_CALLBACK( interrupt_assert_callback )
int vpos = machine.primary_screen->vpos();
UINT16 counter = vpos_to_vysnc_chain_counter(vpos);
UINT8 vector = 0xc7 | ((counter & 0x80) >> 3) | ((~counter & 0x80) >> 4);
- device_set_input_line_and_vector(state->m_maincpu, 0, ASSERT_LINE, vector);
+ state->m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector);
/* set up for next interrupt */
if (counter == INT_TRIGGER_COUNT_1)
@@ -162,8 +162,8 @@ static MACHINE_START( enigma2 )
enigma2_state *state = machine.driver_data<enigma2_state>();
create_interrupt_timers(machine);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_blink_count));
state->save_item(NAME(state->m_sound_latch));
@@ -393,7 +393,7 @@ WRITE8_MEMBER(enigma2_state::sound_data_w)
if (!(data & 0x04) && (m_last_sound_data & 0x04))
m_sound_latch = (m_sound_latch << 1) | (~data & 0x01);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, (data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, (data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
m_last_sound_data = data;
}
diff --git a/src/mame/drivers/eolithsp.c b/src/mame/drivers/eolithsp.c
index 99285b20be6..f4d9af60fdc 100644
--- a/src/mame/drivers/eolithsp.c
+++ b/src/mame/drivers/eolithsp.c
@@ -30,7 +30,7 @@ void eolith_speedup_read(address_space *space)
if ((pc==eolith_speedup_address) || (pc==eolith_speedup_address2))
{
- device_spin_until_trigger(&space->device(), 1000);
+ space->device().execute().spin_until_trigger(1000);
}
}
}
@@ -121,7 +121,7 @@ CUSTOM_INPUT_MEMBER(eolith_state::stealsee_speedup_getvblank)
if (pc==0x400081ec)
if(!eolith_vblank)
- device_eat_cycles(m_maincpu, 500);
+ m_maincpu->eat_cycles(500);
return (machine().primary_screen->vpos() >= 240);
}
diff --git a/src/mame/drivers/eprom.c b/src/mame/drivers/eprom.c
index ec0e167ec50..2f247ad42c4 100644
--- a/src/mame/drivers/eprom.c
+++ b/src/mame/drivers/eprom.c
@@ -144,7 +144,7 @@ WRITE16_MEMBER(eprom_state::sync_w)
m_sync_data[offset] = newword;
if ((oldword & 0xff00) != (newword & 0xff00))
- device_yield(&space.device());
+ space.device().execute().yield();
}
diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c
index b2b5e167eff..7820336fdd4 100644
--- a/src/mame/drivers/equites.c
+++ b/src/mame/drivers/equites.c
@@ -398,7 +398,7 @@ D
static TIMER_CALLBACK( equites_nmi_callback )
{
equites_state *state = machine.driver_data<equites_state>();
- device_set_input_line(state->m_audio_cpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_audio_cpu->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
static TIMER_CALLBACK( equites_frq_adjuster_callback )
@@ -430,7 +430,7 @@ WRITE8_MEMBER(equites_state::equites_c0f8_w)
switch (offset)
{
case 0: // c0f8: NMI ack (written by NMI handler)
- device_set_input_line(m_audio_cpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_audio_cpu->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
break;
case 1: // c0f9: RST75 trigger (written by NMI handler)
@@ -440,7 +440,7 @@ WRITE8_MEMBER(equites_state::equites_c0f8_w)
case 2: // c0fa: INTR trigger (written by NMI handler)
// verified on PCB:
- device_set_input_line(m_audio_cpu, I8085_INTR_LINE, HOLD_LINE);
+ m_audio_cpu->execute().set_input_line(I8085_INTR_LINE, HOLD_LINE);
break;
case 3: // c0fb: n.c.
@@ -692,12 +692,12 @@ WRITE16_MEMBER(equites_state::mcu_w)
WRITE16_MEMBER(equites_state::mcu_halt_assert_w)
{
- device_set_input_line(m_mcu, INPUT_LINE_HALT, ASSERT_LINE);
+ m_mcu->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
WRITE16_MEMBER(equites_state::mcu_halt_clear_w)
{
- device_set_input_line(m_mcu, INPUT_LINE_HALT, CLEAR_LINE);
+ m_mcu->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
diff --git a/src/mame/drivers/esd16.c b/src/mame/drivers/esd16.c
index 0c5a1dcfa77..8d96ab90a1a 100644
--- a/src/mame/drivers/esd16.c
+++ b/src/mame/drivers/esd16.c
@@ -86,8 +86,8 @@ WRITE16_MEMBER(esd16_state::esd16_sound_command_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audio_cpu, 0, ASSERT_LINE); // Generate an IRQ
- device_spin_until_time(&space.device(), attotime::from_usec(50)); // Allow the other CPU to reply
+ m_audio_cpu->execute().set_input_line(0, ASSERT_LINE); // Generate an IRQ
+ space.device().execute().spin_until_time(attotime::from_usec(50)); // Allow the other CPU to reply
}
}
@@ -254,7 +254,7 @@ READ8_MEMBER(esd16_state::esd16_sound_command_r)
{
/* Clear IRQ only after reading the command, or some get lost */
- device_set_input_line(m_audio_cpu, 0, CLEAR_LINE);
+ m_audio_cpu->execute().set_input_line(0, CLEAR_LINE);
return soundlatch_byte_r(space, 0);
}
diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c
index 35050d61575..7ae5d339293 100644
--- a/src/mame/drivers/esh.c
+++ b/src/mame/drivers/esh.c
@@ -284,7 +284,7 @@ static TIMER_CALLBACK( irq_stop )
static INTERRUPT_GEN( vblank_callback_esh )
{
// IRQ
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(irq_stop));
}
diff --git a/src/mame/drivers/espial.c b/src/mame/drivers/espial.c
index 207ce2e061e..0dcf1022e7b 100644
--- a/src/mame/drivers/espial.c
+++ b/src/mame/drivers/espial.c
@@ -58,8 +58,8 @@ static MACHINE_START( espial )
{
espial_state *state = machine.driver_data<espial_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
//state_save_register_global_array(machine, mcu_out[1]);
state->save_item(NAME(state->m_sound_nmi_enabled));
@@ -102,7 +102,7 @@ INTERRUPT_GEN( espial_sound_nmi_gen )
WRITE8_MEMBER(espial_state::espial_master_soundlatch_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
diff --git a/src/mame/drivers/ettrivia.c b/src/mame/drivers/ettrivia.c
index ab40aba9ebb..4966cd07a0a 100644
--- a/src/mame/drivers/ettrivia.c
+++ b/src/mame/drivers/ettrivia.c
@@ -291,9 +291,9 @@ static const ay8910_interface ay8912_interface_3 =
static INTERRUPT_GEN( ettrivia_interrupt )
{
if( device->machine().root_device().ioport("COIN")->read() & 0x01 )
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
else
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static MACHINE_CONFIG_START( ettrivia, ettrivia_state )
diff --git a/src/mame/drivers/exerion.c b/src/mame/drivers/exerion.c
index 7873185fba7..750e13a77d1 100644
--- a/src/mame/drivers/exerion.c
+++ b/src/mame/drivers/exerion.c
@@ -140,7 +140,7 @@ CUSTOM_INPUT_MEMBER(exerion_state::exerion_controls_r)
INPUT_CHANGED_MEMBER(exerion_state::coin_inserted)
{
/* coin insertion causes an NMI */
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@@ -381,7 +381,7 @@ static MACHINE_START( exerion )
{
exerion_state *state = machine.driver_data<exerion_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_porta));
state->save_item(NAME(state->m_portb));
diff --git a/src/mame/drivers/exprraid.c b/src/mame/drivers/exprraid.c
index 1039a93ed23..89c42528c1f 100644
--- a/src/mame/drivers/exprraid.c
+++ b/src/mame/drivers/exprraid.c
@@ -233,7 +233,7 @@ READ8_MEMBER(exprraid_state::exprraid_protection_r)
WRITE8_MEMBER(exprraid_state::sound_cpu_command_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_slave, INPUT_LINE_NMI, PULSE_LINE);
+ m_slave->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
READ8_MEMBER(exprraid_state::vblank_r)
@@ -278,12 +278,12 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(exprraid_state::coin_inserted_deco16)
{
- device_set_input_line(m_maincpu, DECO16_IRQ_LINE, oldval ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(DECO16_IRQ_LINE, oldval ? ASSERT_LINE : CLEAR_LINE);
}
INPUT_CHANGED_MEMBER(exprraid_state::coin_inserted_nmi)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, oldval ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, oldval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( exprraid )
@@ -437,7 +437,7 @@ GFXDECODE_END
/* handler called by the 3812 emulator when the internal timers cause an IRQ */
WRITE_LINE_MEMBER(exprraid_state::irqhandler)
{
- device_set_input_line_and_vector(m_slave, 0, state, 0xff);
+ m_slave->execute().set_input_line_and_vector(0, state, 0xff);
}
static const ym3526_interface ym3526_config =
@@ -455,13 +455,13 @@ static INTERRUPT_GEN( exprraid_interrupt )
if (state->m_coin == 0)
{
state->m_coin = 1;
- //device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
- device_set_input_line(device, DECO16_IRQ_LINE, ASSERT_LINE);
+ //device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE);
}
}
else
{
- device_set_input_line(device, DECO16_IRQ_LINE, CLEAR_LINE);
+ device->execute().set_input_line(DECO16_IRQ_LINE, CLEAR_LINE);
state->m_coin = 0;
}
}
@@ -472,7 +472,7 @@ static MACHINE_START( exprraid )
{
exprraid_state *state = machine.driver_data<exprraid_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_slave = machine.device("slave");
state->save_item(NAME(state->m_bg_index));
diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c
index 056660075b1..74845a475cc 100644
--- a/src/mame/drivers/f1gp.c
+++ b/src/mame/drivers/f1gp.c
@@ -72,7 +72,7 @@ WRITE16_MEMBER(f1gp_state::sound_command_w)
{
m_pending_command = 1;
soundlatch_byte_w(space, offset, data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -394,7 +394,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int irq )
{
f1gp_state *state = device->machine().driver_data<f1gp_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
@@ -431,7 +431,7 @@ static MACHINE_START( f1gp )
state->membank("bank1")->configure_entries(0, 2, &ROM[0x10000], 0x8000);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k053936 = machine.device("k053936");
MACHINE_START_CALL(f1gpb);
diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c
index 97128910c90..5af6a13619b 100644
--- a/src/mame/drivers/fantland.c
+++ b/src/mame/drivers/fantland.c
@@ -76,7 +76,7 @@ WRITE16_MEMBER(fantland_state::fantland_nmi_enable_16_w)
WRITE8_MEMBER(fantland_state::fantland_soundlatch_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audio_cpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audio_cpu->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE16_MEMBER(fantland_state::fantland_soundlatch_16_w)
@@ -835,12 +835,12 @@ static INTERRUPT_GEN( fantland_irq )
{
fantland_state *state = device->machine().driver_data<fantland_state>();
if (state->m_nmi_enable & 8)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static INTERRUPT_GEN( fantland_sound_irq )
{
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x80 / 4);
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x80 / 4);
}
static MACHINE_CONFIG_START( fantland, fantland_state )
@@ -888,7 +888,7 @@ MACHINE_CONFIG_END
static void galaxygn_sound_irq( device_t *device, int line )
{
fantland_state *state = device->machine().driver_data<fantland_state>();
- device_set_input_line_and_vector(state->m_audio_cpu, 0, line ? ASSERT_LINE : CLEAR_LINE, 0x80/4);
+ state->m_audio_cpu->execute().set_input_line_and_vector(0, line ? ASSERT_LINE : CLEAR_LINE, 0x80/4);
}
static const ym2151_interface galaxygn_ym2151_interface =
diff --git a/src/mame/drivers/fastfred.c b/src/mame/drivers/fastfred.c
index 74430c542e7..2bac8245be7 100644
--- a/src/mame/drivers/fastfred.c
+++ b/src/mame/drivers/fastfred.c
@@ -632,7 +632,7 @@ static INTERRUPT_GEN( vblank_irq )
fastfred_state *state = device->machine().driver_data<fastfred_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static INTERRUPT_GEN( sound_timer_irq )
@@ -640,7 +640,7 @@ static INTERRUPT_GEN( sound_timer_irq )
fastfred_state *state = device->machine().driver_data<fastfred_state>();
if(state->m_sound_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( fastfred, fastfred_state )
diff --git a/src/mame/drivers/fastlane.c b/src/mame/drivers/fastlane.c
index d26f43cf290..51d13a05087 100644
--- a/src/mame/drivers/fastlane.c
+++ b/src/mame/drivers/fastlane.c
@@ -22,9 +22,9 @@ static TIMER_DEVICE_CALLBACK( fastlane_scanline )
int scanline = param;
if(scanline == 240 && k007121_ctrlram_r(state->m_k007121, 7) & 0x02) // vblank irq
- device_set_input_line(state->m_maincpu, HD6309_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
else if(((scanline % 32) == 0) && k007121_ctrlram_r(state->m_k007121, 7) & 0x01) // timer irq
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/fcombat.c b/src/mame/drivers/fcombat.c
index 8d37315bac8..ed2ffe9c24d 100644
--- a/src/mame/drivers/fcombat.c
+++ b/src/mame/drivers/fcombat.c
@@ -38,7 +38,7 @@ INPUT_CHANGED_MEMBER(fcombat_state::coin_inserted)
{
/* coin insertion causes an NMI */
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@@ -261,7 +261,7 @@ static MACHINE_START( fcombat )
{
fcombat_state *state = machine.driver_data<fcombat_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_cocktail_flip));
state->save_item(NAME(state->m_char_palette));
diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c
index bf9d0709378..0eb374036fd 100644
--- a/src/mame/drivers/fcrash.c
+++ b/src/mame/drivers/fcrash.c
@@ -47,7 +47,7 @@ static WRITE16_HANDLER( fcrash_soundlatch_w )
if (ACCESSING_BITS_0_7)
{
state->soundlatch_byte_w(*space, 0, data & 0xff);
- device_set_input_line(state->m_audiocpu, 0, HOLD_LINE);
+ state->m_audiocpu->set_input_line(0, HOLD_LINE);
}
}
@@ -69,7 +69,7 @@ static void m5205_int1( device_t *device )
state->m_sample_buffer1 >>= 4;
state->m_sample_select1 ^= 1;
if (state->m_sample_select1 == 0)
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static void m5205_int2( device_t *device )
@@ -697,8 +697,8 @@ static MACHINE_START( fcrash )
state->membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("soundcpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("soundcpu");
state->m_msm_1 = machine.device<msm5205_device>("msm1");
state->m_msm_2 = machine.device<msm5205_device>("msm2");
@@ -712,8 +712,8 @@ static MACHINE_START( kodb )
{
cps_state *state = machine.driver_data<cps_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("soundcpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("soundcpu");
}
static MACHINE_RESET( fcrash )
diff --git a/src/mame/drivers/fgoal.c b/src/mame/drivers/fgoal.c
index 0518c981e82..d2e5565611a 100644
--- a/src/mame/drivers/fgoal.c
+++ b/src/mame/drivers/fgoal.c
@@ -75,10 +75,10 @@ static TIMER_CALLBACK( interrupt_callback )
int scanline;
int coin = (state->ioport("IN1")->read() & 2);
- device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
+ state->m_maincpu->set_input_line(0, ASSERT_LINE);
if (!coin && state->m_prev_coin)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
state->m_prev_coin = coin;
@@ -113,7 +113,7 @@ CUSTOM_INPUT_MEMBER(fgoal_state::fgoal_80_r)
READ8_MEMBER(fgoal_state::fgoal_nmi_reset_r)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return 0;
}
@@ -121,7 +121,7 @@ READ8_MEMBER(fgoal_state::fgoal_nmi_reset_r)
READ8_MEMBER(fgoal_state::fgoal_irq_reset_r)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
return 0;
}
@@ -332,7 +332,7 @@ static MACHINE_START( fgoal )
{
fgoal_state *state = machine.driver_data<fgoal_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_mb14241 = machine.device("mb14241");
state->save_item(NAME(state->m_xpos));
diff --git a/src/mame/drivers/finalizr.c b/src/mame/drivers/finalizr.c
index 6ef2e5c42bb..deb0e77c3d8 100644
--- a/src/mame/drivers/finalizr.c
+++ b/src/mame/drivers/finalizr.c
@@ -50,7 +50,7 @@ WRITE8_MEMBER(finalizr_state::finalizr_flipscreen_w)
WRITE8_MEMBER(finalizr_state::finalizr_i8039_irq_w)
{
- device_set_input_line(m_audio_cpu, 0, ASSERT_LINE);
+ m_audio_cpu->execute().set_input_line(0, ASSERT_LINE);
}
WRITE8_MEMBER(finalizr_state::i8039_irqen_w)
@@ -62,7 +62,7 @@ WRITE8_MEMBER(finalizr_state::i8039_irqen_w)
*/
if ((data & 0x80) == 0)
- device_set_input_line(m_audio_cpu, 0, CLEAR_LINE);
+ m_audio_cpu->execute().set_input_line(0, CLEAR_LINE);
}
READ8_MEMBER(finalizr_state::i8039_T1_r)
diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c
index 47655a7de4b..26383a3bb93 100644
--- a/src/mame/drivers/firebeat.c
+++ b/src/mame/drivers/firebeat.c
@@ -1941,7 +1941,7 @@ static INTERRUPT_GEN(firebeat_interrupt)
// IRQ 2: Main board UART
// IRQ 4: ATAPI
- device_set_input_line(device, INPUT_LINE_IRQ0, ASSERT_LINE);
+ device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
static MACHINE_RESET( firebeat )
diff --git a/src/mame/drivers/firetrap.c b/src/mame/drivers/firetrap.c
index 5c90dbbd221..f64043aa3ba 100644
--- a/src/mame/drivers/firetrap.c
+++ b/src/mame/drivers/firetrap.c
@@ -246,7 +246,7 @@ WRITE8_MEMBER(firetrap_state::firetrap_8751_w)
{
m_i8751_current_command = 0;
m_i8751_return = 0xff; /* This value is XOR'd and must equal 0 */
- device_set_input_line_and_vector(m_maincpu, 0, HOLD_LINE, 0xff);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
return;
}
@@ -297,14 +297,14 @@ WRITE8_MEMBER(firetrap_state::firetrap_8751_w)
}
/* Signal main cpu task is complete */
- device_set_input_line_and_vector(m_maincpu, 0, HOLD_LINE, 0xff);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
m_i8751_current_command=data;
}
WRITE8_MEMBER(firetrap_state::firetrap_sound_command_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(firetrap_state::firetrap_sound_2400_w)
@@ -327,7 +327,7 @@ static void firetrap_adpcm_int( device_t *device )
state->m_adpcm_toggle ^= 1;
if (state->m_sound_irq_enable && state->m_adpcm_toggle)
- device_set_input_line(state->m_audiocpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(firetrap_state::firetrap_adpcm_data_w)
@@ -418,7 +418,7 @@ INPUT_CHANGED_MEMBER(firetrap_state::coin_inserted)
if (m_coin_command_pending && !m_i8751_current_command)
{
m_i8751_return = m_coin_command_pending;
- device_set_input_line_and_vector(m_maincpu, 0, HOLD_LINE, 0xff);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
m_coin_command_pending = 0;
}
}
@@ -586,7 +586,7 @@ static INTERRUPT_GEN( firetrap_irq )
firetrap_state *state = device->machine().driver_data<firetrap_state>();
if (state->m_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -596,8 +596,8 @@ static MACHINE_START( firetrap )
UINT8 *MAIN = state->memregion("maincpu")->base();
UINT8 *SOUND = state->memregion("audiocpu")->base();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_msm = machine.device("msm");
state->membank("bank1")->configure_entries(0, 4, &MAIN[0x10000], 0x4000);
diff --git a/src/mame/drivers/firetrk.c b/src/mame/drivers/firetrk.c
index c7cf85f4849..297bbb7ab1f 100644
--- a/src/mame/drivers/firetrk.c
+++ b/src/mame/drivers/firetrk.c
@@ -53,7 +53,7 @@ static INTERRUPT_GEN( firetrk_interrupt )
/* NMI interrupts are disabled during service mode in firetrk and montecar */
if (!state->m_in_service_mode)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/fitfight.c b/src/mame/drivers/fitfight.c
index d194a502d4d..46c2e0b3537 100644
--- a/src/mame/drivers/fitfight.c
+++ b/src/mame/drivers/fitfight.c
@@ -259,7 +259,7 @@ ADDRESS_MAP_END
static INTERRUPT_GEN( snd_irq )
{
- device_set_input_line(device, UPD7810_INTF2, HOLD_LINE);
+ device->execute().set_input_line(UPD7810_INTF2, HOLD_LINE);
}
static const UPD7810_CONFIG sound_cpu_config =
diff --git a/src/mame/drivers/flipjack.c b/src/mame/drivers/flipjack.c
index 5f748e7d5e8..13cb952c585 100644
--- a/src/mame/drivers/flipjack.c
+++ b/src/mame/drivers/flipjack.c
@@ -261,19 +261,19 @@ WRITE8_MEMBER(flipjack_state::flipjack_layer_w)
READ8_MEMBER(flipjack_state::flipjack_soundlatch_r)
{
- device_set_input_line(m_audiocpu, 0, CLEAR_LINE);
+ m_audiocpu->set_input_line(0, CLEAR_LINE);
return m_soundlatch;
}
WRITE8_MEMBER(flipjack_state::flipjack_soundlatch_w)
{
m_soundlatch = data;
- device_set_input_line(m_audiocpu, 0, ASSERT_LINE);
+ m_audiocpu->set_input_line(0, ASSERT_LINE);
}
WRITE8_MEMBER(flipjack_state::flipjack_sound_nmi_ack_w)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
WRITE8_MEMBER(flipjack_state::flipjack_portc_w)
@@ -284,7 +284,7 @@ WRITE8_MEMBER(flipjack_state::flipjack_portc_w)
INPUT_CHANGED_MEMBER(flipjack_state::flipjack_coin)
{
if (newval)
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/flkatck.c b/src/mame/drivers/flkatck.c
index 59d4db8422b..83e70886446 100644
--- a/src/mame/drivers/flkatck.c
+++ b/src/mame/drivers/flkatck.c
@@ -25,7 +25,7 @@ static INTERRUPT_GEN( flkatck_interrupt )
flkatck_state *state = device->machine().driver_data<flkatck_state>();
if (state->m_irq_enabled)
- device_set_input_line(device, HD6309_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(flkatck_state::flkatck_bankswitch_w)
@@ -72,7 +72,7 @@ WRITE8_MEMBER(flkatck_state::flkatck_ls138_w)
soundlatch_byte_w(space, 0, data);
break;
case 0x06: /* Cause interrupt on audio CPU */
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
break;
case 0x07: /* watchdog reset */
watchdog_reset_w(space, 0, data);
@@ -199,7 +199,7 @@ static MACHINE_START( flkatck )
state->membank("bank1")->configure_entries(0, 3, &ROM[0x10000], 0x2000);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k007121 = machine.device("k007121");
state->save_item(NAME(state->m_irq_enabled));
diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c
index de45053e994..dca3415925f 100644
--- a/src/mame/drivers/flstory.c
+++ b/src/mame/drivers/flstory.c
@@ -38,7 +38,7 @@ static TIMER_CALLBACK( nmi_callback )
{
flstory_state *state = machine.driver_data<flstory_state>();
if (state->m_sound_nmi_enable)
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
else
state->m_pending_nmi = 1;
}
@@ -60,7 +60,7 @@ WRITE8_MEMBER(flstory_state::nmi_enable_w)
m_sound_nmi_enable = 1;
if (m_pending_nmi)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
m_pending_nmi = 0;
}
}
@@ -119,7 +119,7 @@ ADDRESS_MAP_END
CUSTOM_INPUT_MEMBER(flstory_state::victnine_mcu_status_bit01_r)
{
- address_space *space = m_maincpu->memory().space(AS_PROGRAM);
+ address_space *space = m_maincpu->space(AS_PROGRAM);
return (victnine_mcu_status_r(*space, 0) & 3);
}
@@ -1006,8 +1006,8 @@ static MACHINE_START( flstory )
{
flstory_state *state = machine.driver_data<flstory_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_mcu = machine.device("mcu");
/* video */
diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c
index 7f03908d88f..2065b60f17b 100644
--- a/src/mame/drivers/flyball.c
+++ b/src/mame/drivers/flyball.c
@@ -43,7 +43,7 @@ public:
UINT8 m_potsense;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
DECLARE_READ8_MEMBER(flyball_input_r);
DECLARE_READ8_MEMBER(flyball_scanline_r);
DECLARE_READ8_MEMBER(flyball_potsense_r);
@@ -373,7 +373,7 @@ static MACHINE_START( flyball )
{
flyball_state *state = machine.driver_data<flyball_state>();
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->save_item(NAME(state->m_pitcher_vert));
state->save_item(NAME(state->m_pitcher_horz));
diff --git a/src/mame/drivers/freekick.c b/src/mame/drivers/freekick.c
index 27555e5c9b0..a8124792baa 100644
--- a/src/mame/drivers/freekick.c
+++ b/src/mame/drivers/freekick.c
@@ -80,7 +80,7 @@ static INTERRUPT_GEN( freekick_irqgen )
{
freekick_state *state = device->machine().driver_data<freekick_state>();
if (state->m_nmi_en)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(freekick_state::oigas_5_w)
diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c
index c1f71e4464b..2a707ad406f 100644
--- a/src/mame/drivers/fromanc2.c
+++ b/src/mame/drivers/fromanc2.c
@@ -33,7 +33,7 @@
static INTERRUPT_GEN( fromanc2_interrupt )
{
- device_set_input_line(device, 1, HOLD_LINE);
+ device->execute().set_input_line(1, HOLD_LINE);
}
@@ -43,7 +43,7 @@ WRITE16_MEMBER(fromanc2_state::fromanc2_sndcmd_w)
soundlatch_byte_w(space, offset, (data >> 8) & 0xff); // 1P (LEFT)
soundlatch2_byte_w(space, offset, data & 0xff); // 2P (RIGHT)
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
m_sndcpu_nmi_flag = 0;
}
@@ -110,13 +110,13 @@ WRITE16_MEMBER(fromanc2_state::fromanc2_subcpu_w)
{
m_datalatch1 = data;
- device_set_input_line(m_subcpu, 0, HOLD_LINE);
+ m_subcpu->set_input_line(0, HOLD_LINE);
m_subcpu_int_flag = 0;
}
READ16_MEMBER(fromanc2_state::fromanc2_subcpu_r)
{
- device_set_input_line(m_subcpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
m_subcpu_nmi_flag = 0;
return (m_datalatch_2h << 8) | m_datalatch_2l;
@@ -486,7 +486,7 @@ GFXDECODE_END
static void irqhandler(device_t *device, int irq)
{
fromanc2_state *state = device->machine().driver_data<fromanc2_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
@@ -505,8 +505,8 @@ static MACHINE_START( fromanc4 )
{
fromanc2_state *state = machine.driver_data<fromanc2_state>();
- state->m_audiocpu = machine.device("audiocpu");
- state->m_subcpu = machine.device("sub");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ state->m_subcpu = machine.device<cpu_device>("sub");
state->m_eeprom = machine.device("eeprom");
state->m_left_screen = machine.device("lscreen");
state->m_right_screen = machine.device("rscreen");
diff --git a/src/mame/drivers/fromance.c b/src/mame/drivers/fromance.c
index 27c5c6d6c3e..e24c0ee2579 100644
--- a/src/mame/drivers/fromance.c
+++ b/src/mame/drivers/fromance.c
@@ -158,7 +158,7 @@ static void fromance_adpcm_int( device_t *device )
/* generate an NMI if we're out of data */
if (!state->m_vclk_left)
- device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -958,7 +958,7 @@ static MACHINE_START( fromance )
state->membank("bank1")->configure_entries(0, 0x100, &ROM[0x10000], 0x4000);
- state->m_subcpu = machine.device("sub");
+ state->m_subcpu = machine.device<cpu_device>("sub");
state->save_item(NAME(state->m_directionflag));
state->save_item(NAME(state->m_commanddata));
diff --git a/src/mame/drivers/funkball.c b/src/mame/drivers/funkball.c
index bef363ba5b3..0a274b754d8 100644
--- a/src/mame/drivers/funkball.c
+++ b/src/mame/drivers/funkball.c
@@ -1035,7 +1035,7 @@ static const struct pit8253_config funkball_pit8254_config =
WRITE_LINE_MEMBER(funkball_state::funkball_pic8259_1_set_int_line)
{
- device_set_input_line(m_maincpu, 0, state ? HOLD_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
READ8_MEMBER( funkball_state::get_slave_ack )
@@ -1065,7 +1065,7 @@ static void set_gate_a20(running_machine &machine, int a20)
{
funkball_state *state = machine.driver_data<funkball_state>();
- device_set_input_line(state->m_maincpu, INPUT_LINE_A20, a20);
+ state->m_maincpu->set_input_line(INPUT_LINE_A20, a20);
}
static void keyboard_interrupt(running_machine &machine, int state)
@@ -1111,7 +1111,7 @@ static MACHINE_START( funkball )
init_pc_common(machine, PCCOMMON_KEYBOARD_AT, funkball_set_keyb_int);
- device_set_irq_callback(state->m_maincpu, irq_callback);
+ state->m_maincpu->set_irq_acknowledge_callback(irq_callback);
kbdc8042_init(machine, &at8042);
diff --git a/src/mame/drivers/funkyjet.c b/src/mame/drivers/funkyjet.c
index e4436699816..30b4428a617 100644
--- a/src/mame/drivers/funkyjet.c
+++ b/src/mame/drivers/funkyjet.c
@@ -278,7 +278,7 @@ GFXDECODE_END
static void sound_irq( device_t *device, int state )
{
funkyjet_state *driver_state = device->machine().driver_data<funkyjet_state>();
- device_set_input_line(driver_state->m_audiocpu, 1, state); /* IRQ 2 */
+ driver_state->m_audiocpu->set_input_line(1, state); /* IRQ 2 */
}
static const ym2151_interface ym2151_config =
@@ -301,8 +301,8 @@ static MACHINE_START( funkyjet )
{
funkyjet_state *state = machine.driver_data<funkyjet_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_deco_tilegen1 = machine.device("tilegen1");
}
diff --git a/src/mame/drivers/funybubl.c b/src/mame/drivers/funybubl.c
index 1b599773b8d..03317832320 100644
--- a/src/mame/drivers/funybubl.c
+++ b/src/mame/drivers/funybubl.c
@@ -68,7 +68,7 @@ WRITE8_MEMBER(funybubl_state::funybubl_cpurombank_w)
WRITE8_MEMBER(funybubl_state::funybubl_soundcommand_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(funybubl_state::funybubl_oki_bank_sw)
@@ -205,7 +205,7 @@ static MACHINE_START( funybubl )
funybubl_state *state = machine.driver_data<funybubl_state>();
UINT8 *ROM = state->memregion("maincpu")->base();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_banked_vram));
diff --git a/src/mame/drivers/fuukifg2.c b/src/mame/drivers/fuukifg2.c
index 58de68a833c..21a44158b5b 100644
--- a/src/mame/drivers/fuukifg2.c
+++ b/src/mame/drivers/fuukifg2.c
@@ -79,8 +79,8 @@ WRITE16_MEMBER(fuuki16_state::fuuki16_sound_command_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space,0,data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
-// device_spin_until_time(&space.device(), attotime::from_usec(50)); // Allow the other CPU to reply
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+// space.device().execute().spin_until_time(attotime::from_usec(50)); // Allow the other CPU to reply
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); // Fixes glitching in rasters
}
}
@@ -394,7 +394,7 @@ GFXDECODE_END
static void soundirq( device_t *device, int state )
{
fuuki16_state *fuuki16 = device->machine().driver_data<fuuki16_state>();
- device_set_input_line(fuuki16->m_audiocpu, 0, state);
+ fuuki16->m_audiocpu->set_input_line(0, state);
}
static const ym3812_interface fuuki16_ym3812_intf =
@@ -417,7 +417,7 @@ static const ym3812_interface fuuki16_ym3812_intf =
static TIMER_CALLBACK( level_1_interrupt_callback )
{
fuuki16_state *state = machine.driver_data<fuuki16_state>();
- device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
+ state->m_maincpu->set_input_line(1, HOLD_LINE);
machine.scheduler().timer_set(machine.primary_screen->time_until_pos(248), FUNC(level_1_interrupt_callback));
}
@@ -425,7 +425,7 @@ static TIMER_CALLBACK( level_1_interrupt_callback )
static TIMER_CALLBACK( vblank_interrupt_callback )
{
fuuki16_state *state = machine.driver_data<fuuki16_state>();
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE); // VBlank IRQ
+ state->m_maincpu->set_input_line(3, HOLD_LINE); // VBlank IRQ
machine.scheduler().timer_set(machine.primary_screen->time_until_vblank_start(), FUNC(vblank_interrupt_callback));
}
@@ -433,7 +433,7 @@ static TIMER_CALLBACK( vblank_interrupt_callback )
static TIMER_CALLBACK( raster_interrupt_callback )
{
fuuki16_state *state = machine.driver_data<fuuki16_state>();
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE); // Raster Line IRQ
+ state->m_maincpu->set_input_line(5, HOLD_LINE); // Raster Line IRQ
machine.primary_screen->update_partial(machine.primary_screen->vpos());
state->m_raster_interrupt_timer->adjust(machine.primary_screen->frame_period());
}
@@ -446,8 +446,8 @@ static MACHINE_START( fuuki16 )
state->membank("bank1")->configure_entries(0, 3, &ROM[0x10000], 0x8000);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_raster_interrupt_timer = machine.scheduler().timer_alloc(FUNC(raster_interrupt_callback));
}
diff --git a/src/mame/drivers/fuukifg3.c b/src/mame/drivers/fuukifg3.c
index 6dab29a899c..1327ed3f6ef 100644
--- a/src/mame/drivers/fuukifg3.c
+++ b/src/mame/drivers/fuukifg3.c
@@ -525,7 +525,7 @@ GFXDECODE_END
static TIMER_CALLBACK( level_1_interrupt_callback )
{
fuuki32_state *state = machine.driver_data<fuuki32_state>();
- device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
+ state->m_maincpu->set_input_line(1, HOLD_LINE);
machine.scheduler().timer_set(machine.primary_screen->time_until_pos(248), FUNC(level_1_interrupt_callback));
}
@@ -533,7 +533,7 @@ static TIMER_CALLBACK( level_1_interrupt_callback )
static TIMER_CALLBACK( vblank_interrupt_callback )
{
fuuki32_state *state = machine.driver_data<fuuki32_state>();
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE); // VBlank IRQ
+ state->m_maincpu->set_input_line(3, HOLD_LINE); // VBlank IRQ
machine.scheduler().timer_set(machine.primary_screen->time_until_vblank_start(), FUNC(vblank_interrupt_callback));
}
@@ -541,7 +541,7 @@ static TIMER_CALLBACK( vblank_interrupt_callback )
static TIMER_CALLBACK( raster_interrupt_callback )
{
fuuki32_state *state = machine.driver_data<fuuki32_state>();
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE); // Raster Line IRQ
+ state->m_maincpu->set_input_line(5, HOLD_LINE); // Raster Line IRQ
machine.primary_screen->update_partial(machine.primary_screen->vpos());
state->m_raster_interrupt_timer->adjust(machine.primary_screen->frame_period());
}
@@ -554,8 +554,8 @@ static MACHINE_START( fuuki32 )
state->membank("bank1")->configure_entries(0, 0x10, &ROM[0x10000], 0x8000);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("soundcpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("soundcpu");
state->m_raster_interrupt_timer = machine.scheduler().timer_alloc(FUNC(raster_interrupt_callback));
@@ -578,7 +578,7 @@ static MACHINE_RESET( fuuki32 )
static void irqhandler( device_t *device, int irq )
{
fuuki32_state *state = device->machine().driver_data<fuuki32_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ymf278b_interface fuuki32_ymf278b_interface =
diff --git a/src/mame/drivers/gaelco.c b/src/mame/drivers/gaelco.c
index aaab0aab0e5..3d658ff6b83 100644
--- a/src/mame/drivers/gaelco.c
+++ b/src/mame/drivers/gaelco.c
@@ -37,7 +37,7 @@ WRITE16_MEMBER(gaelco_state::bigkarnk_sound_command_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, M6809_FIRQ_LINE, HOLD_LINE);
+ m_audiocpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
}
@@ -499,7 +499,7 @@ static MACHINE_START( gaelco )
{
gaelco_state *state = machine.driver_data<gaelco_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
}
static MACHINE_CONFIG_START( bigkarnk, gaelco_state )
diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c
index 21918b314a9..358bbc134a3 100644
--- a/src/mame/drivers/gaelco3d.c
+++ b/src/mame/drivers/gaelco3d.c
@@ -257,7 +257,7 @@ static MACHINE_RESET( gaelco3d2 )
static INTERRUPT_GEN( vblank_gen )
{
gaelco3d_render(*device->machine().primary_screen);
- device_set_input_line(device, 2, ASSERT_LINE);
+ device->execute().set_input_line(2, ASSERT_LINE);
}
diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c
index a7f7400c0c8..f495d6731d0 100644
--- a/src/mame/drivers/gaiden.c
+++ b/src/mame/drivers/gaiden.c
@@ -143,7 +143,7 @@ WRITE16_MEMBER(gaiden_state::gaiden_sound_command_w)
soundlatch_byte_w(space, 0, data & 0xff); /* Ninja Gaiden */
if (ACCESSING_BITS_8_15)
soundlatch_byte_w(space, 0, data >> 8); /* Tecmo Knight */
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE16_MEMBER(gaiden_state::drgnbowl_sound_command_w)
@@ -152,7 +152,7 @@ WRITE16_MEMBER(gaiden_state::drgnbowl_sound_command_w)
if (ACCESSING_BITS_8_15)
{
soundlatch_byte_w(space, 0, data >> 8);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
}
@@ -312,7 +312,7 @@ static MACHINE_RESET( raiga )
static MACHINE_START( raiga )
{
gaiden_state *state = machine.driver_data<gaiden_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_prot));
state->save_item(NAME(state->m_jumpcode));
@@ -748,7 +748,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int irq )
{
gaiden_state *state = device->machine().driver_data<gaiden_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c
index 656c2c4f62e..4cca6192d2c 100644
--- a/src/mame/drivers/galaga.c
+++ b/src/mame/drivers/galaga.c
@@ -1644,7 +1644,7 @@ static INTERRUPT_GEN( main_vblank_irq )
galaga_state *state = device->machine().driver_data<galaga_state>();
if(state->m_main_irq_mask)
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
static INTERRUPT_GEN( sub_vblank_irq )
@@ -1652,7 +1652,7 @@ static INTERRUPT_GEN( sub_vblank_irq )
galaga_state *state = device->machine().driver_data<galaga_state>();
if(state->m_sub_irq_mask)
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
const namco_06xx_config bosco_namco_06xx_0_intf =
diff --git a/src/mame/drivers/galastrm.c b/src/mame/drivers/galastrm.c
index 0566c6c3fad..6b1f50f187e 100644
--- a/src/mame/drivers/galastrm.c
+++ b/src/mame/drivers/galastrm.c
@@ -52,7 +52,7 @@ static INTERRUPT_GEN( galastrm_interrupt )
{
galastrm_state *state = device->machine().driver_data<galastrm_state>();
state->m_frame_counter ^= 1;
- device_set_input_line(device, 5, HOLD_LINE);
+ device->execute().set_input_line(5, HOLD_LINE);
}
static TIMER_CALLBACK( galastrm_interrupt6 )
diff --git a/src/mame/drivers/galaxia.c b/src/mame/drivers/galaxia.c
index bcd2e57106e..1b170cd8172 100644
--- a/src/mame/drivers/galaxia.c
+++ b/src/mame/drivers/galaxia.c
@@ -69,7 +69,7 @@ TODO:
static INTERRUPT_GEN( galaxia_interrupt )
{
- device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x03);
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x03);
cvs_scroll_stars(device->machine());
}
diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c
index f865d90f310..2887b7fd211 100644
--- a/src/mame/drivers/galaxian.c
+++ b/src/mame/drivers/galaxian.c
@@ -444,7 +444,7 @@ static INTERRUPT_GEN( interrupt_gen )
/* interrupt line is clocked at VBLANK */
/* a flip-flop at 6F is held in the preset state based on the NMI ON signal */
if (state->m_irq_enabled)
- device_set_input_line(device, state->m_irq_line, ASSERT_LINE);
+ device->execute().set_input_line(state->m_irq_line, ASSERT_LINE);
}
static INTERRUPT_GEN( fakechange_interrupt_gen )
@@ -468,7 +468,7 @@ WRITE8_MEMBER(galaxian_state::irq_enable_w)
/* if CLEAR is held low, we must make sure the interrupt signal is clear */
if (!m_irq_enabled)
- device_set_input_line(&space.device(), m_irq_line, CLEAR_LINE);
+ space.device().execute().set_input_line(m_irq_line, CLEAR_LINE);
}
/*************************************
diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c
index 8943bbdf453..9c5d916448c 100644
--- a/src/mame/drivers/galaxold.c
+++ b/src/mame/drivers/galaxold.c
@@ -2389,7 +2389,7 @@ static INTERRUPT_GEN( vblank_irq )
galaxold_state *state = device->machine().driver_data<galaxold_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_DERIVED( harem, galaxold_base )
diff --git a/src/mame/drivers/galgame.c b/src/mame/drivers/galgame.c
index b05d9e86d19..e89e1611d6d 100644
--- a/src/mame/drivers/galgame.c
+++ b/src/mame/drivers/galgame.c
@@ -295,7 +295,7 @@ static PALETTE_INIT( galaxygame )
static IRQ_CALLBACK(galaxygame_irq_callback)
{
- device_set_input_line(device, 0, CLEAR_LINE);
+ device->execute().set_input_line(0, CLEAR_LINE);
return 0x40;
}
@@ -304,7 +304,7 @@ static INTERRUPT_GEN(galaxygame_irq)
galaxygame_state *state = device->machine().driver_data<galaxygame_state>();
if ( state->m_clk & 0x40 )
{
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
state->m_interrupt = 1;
}
}
@@ -317,7 +317,7 @@ static MACHINE_RESET( galaxygame )
state->m_point_display_list_index = 0;
state->m_interrupt = 0;
- device_set_irq_callback(machine.device("maincpu"), galaxygame_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(galaxygame_irq_callback);
}
static const struct t11_setup t11_data =
diff --git a/src/mame/drivers/galpani2.c b/src/mame/drivers/galpani2.c
index 5e78a50ee9c..ff65b9678ab 100644
--- a/src/mame/drivers/galpani2.c
+++ b/src/mame/drivers/galpani2.c
@@ -548,17 +548,17 @@ static TIMER_DEVICE_CALLBACK( galpani2_interrupt1 )
int scanline = param;
if(scanline == 240)
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE);
+ state->m_maincpu->set_input_line(5, HOLD_LINE);
/* MCU related? */
if(scanline == 128)
{
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
- device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
+ state->m_maincpu->set_input_line(4, HOLD_LINE);
}
if(scanline == 0)
- device_set_input_line(state->m_maincpu, 6, HOLD_LINE); // hblank?
+ state->m_maincpu->set_input_line(6, HOLD_LINE); // hblank?
}
/* CPU#2 interrupts, lev 3,4 & 5 are tested on power up. The rest is rte, but lev 7 */
@@ -568,13 +568,13 @@ static TIMER_DEVICE_CALLBACK( galpani2_interrupt2 )
int scanline = param;
if(scanline == 240)
- device_set_input_line(state->m_subcpu, 5, HOLD_LINE);
+ state->m_subcpu->set_input_line(5, HOLD_LINE);
if(scanline == 128)
- device_set_input_line(state->m_subcpu, 4, HOLD_LINE);
+ state->m_subcpu->set_input_line(4, HOLD_LINE);
if(scanline == 0)
- device_set_input_line(state->m_subcpu, 3, HOLD_LINE);
+ state->m_subcpu->set_input_line(3, HOLD_LINE);
}
static MACHINE_CONFIG_START( galpani2, galpani2_state )
diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c
index 9864beb04d4..f1eb61d5085 100644
--- a/src/mame/drivers/galpani3.c
+++ b/src/mame/drivers/galpani3.c
@@ -128,13 +128,13 @@ static TIMER_DEVICE_CALLBACK( galpani3_vblank ) // 2, 3, 5 ?
int scanline = param;
if(scanline == 240)
- device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
+ state->m_maincpu->set_input_line(2, HOLD_LINE);
if(scanline == 0)
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
if(scanline == 128)
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE); // timer, related to sound chip?
+ state->m_maincpu->set_input_line(5, HOLD_LINE); // timer, related to sound chip?
}
diff --git a/src/mame/drivers/galspnbl.c b/src/mame/drivers/galspnbl.c
index b519e9f1f8e..01d0f3b35e0 100644
--- a/src/mame/drivers/galspnbl.c
+++ b/src/mame/drivers/galspnbl.c
@@ -49,7 +49,7 @@ WRITE16_MEMBER(galspnbl_state::soundcommand_w)
if (ACCESSING_BITS_0_7)
{
soundlatch_byte_w(space,offset,data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -209,7 +209,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int linestate )
{
galspnbl_state *state = device->machine().driver_data<galspnbl_state>();
- device_set_input_line(state->m_audiocpu, 0, linestate);
+ state->m_audiocpu->set_input_line(0, linestate);
}
static const ym3812_interface ym3812_config =
@@ -222,7 +222,7 @@ static MACHINE_START( galspnbl )
{
galspnbl_state *state = machine.driver_data<galspnbl_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
}
static MACHINE_CONFIG_START( galspnbl, galspnbl_state )
diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c
index d3f8fd74ced..56185712b66 100644
--- a/src/mame/drivers/gamecstl.c
+++ b/src/mame/drivers/gamecstl.c
@@ -622,7 +622,7 @@ static MACHINE_RESET(gamecstl)
{
machine.root_device().membank("bank1")->set_base(machine.root_device().memregion("bios")->base() + 0x30000);
- device_set_irq_callback(machine.device("maincpu"), irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
}
diff --git a/src/mame/drivers/gameplan.c b/src/mame/drivers/gameplan.c
index fba3054cc63..e41baade1c4 100644
--- a/src/mame/drivers/gameplan.c
+++ b/src/mame/drivers/gameplan.c
@@ -138,7 +138,7 @@ static const via6522_interface via_1_interface =
WRITE8_MEMBER(gameplan_state::audio_reset_w)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
if (data == 0)
{
@@ -179,7 +179,7 @@ static const via6522_interface via_2_interface =
WRITE_LINE_MEMBER(gameplan_state::r6532_irq)
{
- device_set_input_line(m_audiocpu, 0, state);
+ m_audiocpu->set_input_line(0, state);
if (state == ASSERT_LINE)
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10));
}
@@ -977,8 +977,8 @@ static MACHINE_START( gameplan )
{
gameplan_state *state = machine.driver_data<gameplan_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_riot = machine.device("riot");
/* register for save states */
diff --git a/src/mame/drivers/gbusters.c b/src/mame/drivers/gbusters.c
index 94c0b02276f..3b5eda68ac5 100644
--- a/src/mame/drivers/gbusters.c
+++ b/src/mame/drivers/gbusters.c
@@ -24,7 +24,7 @@ static INTERRUPT_GEN( gbusters_interrupt )
gbusters_state *state = device->machine().driver_data<gbusters_state>();
if (k052109_is_irq_enabled(state->m_k052109))
- device_set_input_line(device, KONAMI_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
}
READ8_MEMBER(gbusters_state::bankedram_r)
@@ -101,7 +101,7 @@ char baf[40];
WRITE8_MEMBER(gbusters_state::gbusters_sh_irqtrigger_w)
{
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(gbusters_state::gbusters_snd_bankswitch_w)
@@ -276,8 +276,8 @@ static MACHINE_START( gbusters )
state->m_generic_paletteram_8.allocate(0x800);
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k052109 = machine.device("k052109");
state->m_k051960 = machine.device("k051960");
state->m_k007232 = machine.device("k007232");
diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c
index 827bdf5bcec..c5b0ad8e17d 100644
--- a/src/mame/drivers/gcpinbal.c
+++ b/src/mame/drivers/gcpinbal.c
@@ -50,7 +50,7 @@ Stephh's notes (based on the game M68000 code and some tests) :
static TIMER_CALLBACK( gcpinbal_interrupt1 )
{
gcpinbal_state *state = machine.driver_data<gcpinbal_state>();
- device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
+ state->m_maincpu->set_input_line(1, HOLD_LINE);
}
#ifdef UNUSED_FUNCTION
@@ -60,7 +60,7 @@ static TIMER_CALLBACK( gcpinbal_interrupt3 )
// IRQ3 is from the M6585
// if (!ADPCM_playing(0))
{
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
}
}
#endif
@@ -71,7 +71,7 @@ static INTERRUPT_GEN( gcpinbal_interrupt )
device->machine().scheduler().timer_set(downcast<cpu_device *>(device)->cycles_to_attotime(500), FUNC(gcpinbal_interrupt1));
// device->machine().scheduler().timer_set(downcast<cpu_device *>(device)->cycles_to_attotime(1000), FUNC(gcpinbal_interrupt3));
- device_set_input_line(device, 4, HOLD_LINE);
+ device->execute().set_input_line(4, HOLD_LINE);
}
diff --git a/src/mame/drivers/gei.c b/src/mame/drivers/gei.c
index 82a8449fe5d..e6ae48ab335 100644
--- a/src/mame/drivers/gei.c
+++ b/src/mame/drivers/gei.c
@@ -1108,7 +1108,7 @@ static INTERRUPT_GEN( vblank_irq )
gei_state *state = device->machine().driver_data<gei_state>();
if(state->m_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/ghosteo.c b/src/mame/drivers/ghosteo.c
index 893860e71ab..f908874aaa6 100644
--- a/src/mame/drivers/ghosteo.c
+++ b/src/mame/drivers/ghosteo.c
@@ -565,12 +565,12 @@ READ32_MEMBER(ghosteo_state::bballoon_speedup_r)
if (pc == 0x3001c0e4 || pc == 0x3001c0d8)
{
// BnB Arcade
- device_spin_until_time(&space.device(), attotime::from_usec(20));
+ space.device().execute().spin_until_time(attotime::from_usec(20));
}
else if (pc == 0x3002b580 || pc == 0x3002b550)
{
// Happy Tour
- device_spin_until_time(&space.device(), attotime::from_usec(20));
+ space.device().execute().spin_until_time(attotime::from_usec(20));
}
//else
// printf("speedup %08x %08x\n", pc, ret);
diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c
index c8db4a275a1..73a57800d9d 100644
--- a/src/mame/drivers/gijoe.c
+++ b/src/mame/drivers/gijoe.c
@@ -113,7 +113,7 @@ static TIMER_CALLBACK( dmaend_callback )
gijoe_state *state = machine.driver_data<gijoe_state>();
if (state->m_cur_control2 & 0x0020)
- device_set_input_line(state->m_maincpu, 6, HOLD_LINE);
+ state->m_maincpu->set_input_line(6, HOLD_LINE);
}
static INTERRUPT_GEN( gijoe_interrupt )
@@ -134,7 +134,7 @@ static INTERRUPT_GEN( gijoe_interrupt )
// trigger V-blank interrupt
if (state->m_cur_control2 & 0x0080)
- device_set_input_line(device, 5, HOLD_LINE);
+ device->execute().set_input_line(5, HOLD_LINE);
}
WRITE16_MEMBER(gijoe_state::sound_cmd_w)
@@ -148,7 +148,7 @@ WRITE16_MEMBER(gijoe_state::sound_cmd_w)
WRITE16_MEMBER(gijoe_state::sound_irq_w)
{
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
READ16_MEMBER(gijoe_state::sound_status_r)
@@ -159,7 +159,7 @@ READ16_MEMBER(gijoe_state::sound_status_r)
static void sound_nmi( device_t *device )
{
gijoe_state *state = device->machine().driver_data<gijoe_state>();
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( gijoe_map, AS_PROGRAM, 16, gijoe_state )
@@ -275,8 +275,8 @@ static MACHINE_START( gijoe )
{
gijoe_state *state = machine.driver_data<gijoe_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k054539 = machine.device("k054539");
state->m_k056832 = machine.device("k056832");
state->m_k053246 = machine.device("k053246");
diff --git a/src/mame/drivers/ginganin.c b/src/mame/drivers/ginganin.c
index b5c094dcdd7..47bc0787b0a 100644
--- a/src/mame/drivers/ginganin.c
+++ b/src/mame/drivers/ginganin.c
@@ -230,7 +230,7 @@ static MACHINE_START( ginganin )
{
ginganin_state *state = machine.driver_data<ginganin_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_layers_ctrl));
state->save_item(NAME(state->m_flipscreen));
diff --git a/src/mame/drivers/glass.c b/src/mame/drivers/glass.c
index 9b7e9dd5f3c..a805f8159d4 100644
--- a/src/mame/drivers/glass.c
+++ b/src/mame/drivers/glass.c
@@ -24,7 +24,7 @@ static INTERRUPT_GEN( glass_interrupt )
if (state->m_cause_interrupt)
{
- device_set_input_line(device, 6, HOLD_LINE);
+ device->execute().set_input_line(6, HOLD_LINE);
state->m_cause_interrupt = 0;
}
}
diff --git a/src/mame/drivers/go2000.c b/src/mame/drivers/go2000.c
index cb586f8b776..b8805af4018 100644
--- a/src/mame/drivers/go2000.c
+++ b/src/mame/drivers/go2000.c
@@ -48,7 +48,7 @@ public:
// UINT16 * m_paletteram; // currently this uses generic palette handling
/* devices */
- device_t *m_soundcpu;
+ cpu_device *m_soundcpu;
DECLARE_WRITE16_MEMBER(sound_cmd_w);
DECLARE_WRITE8_MEMBER(go2000_pcm_1_bankswitch_w);
};
@@ -57,7 +57,7 @@ public:
WRITE16_MEMBER(go2000_state::sound_cmd_w)
{
soundlatch_byte_w(space, offset, data & 0xff);
- device_set_input_line(m_soundcpu, 0, HOLD_LINE);
+ m_soundcpu->set_input_line(0, HOLD_LINE);
}
static ADDRESS_MAP_START( go2000_map, AS_PROGRAM, 16, go2000_state )
@@ -318,7 +318,7 @@ static MACHINE_START( go2000 )
state->membank("bank1")->set_entry(0);
- state->m_soundcpu = machine.device("soundcpu");
+ state->m_soundcpu = machine.device<cpu_device>("soundcpu");
}
static MACHINE_CONFIG_START( go2000, go2000_state )
diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c
index 9ba47506ad4..ffe6ebbc6d9 100644
--- a/src/mame/drivers/goal92.c
+++ b/src/mame/drivers/goal92.c
@@ -20,7 +20,7 @@ WRITE16_MEMBER(goal92_state::goal92_sound_command_w)
if (ACCESSING_BITS_8_15)
{
soundlatch_byte_w(space, 0, (data >> 8) & 0xff);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
}
@@ -213,7 +213,7 @@ static void irqhandler( device_t *device, int irq )
{
/* NMI writes to MSM ports *only*! -AS */
//goal92_state *state = device->machine().driver_data<goal92_state>();
- //device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
+ //state->m_audiocpu->set_input_line(INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
@@ -234,7 +234,7 @@ static void goal92_adpcm_int( device_t *device )
state->m_adpcm_toggle^= 1;
if (state->m_adpcm_toggle)
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static const msm5205_interface msm5205_config =
@@ -296,7 +296,7 @@ static MACHINE_START( goal92 )
state->membank("bank1")->configure_entries(0, 2, &ROM[0x10000], 0x4000);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_fg_bank));
state->save_item(NAME(state->m_msm5205next));
diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c
index 9ee58277a8a..c8097e87c49 100644
--- a/src/mame/drivers/goldstar.c
+++ b/src/mame/drivers/goldstar.c
@@ -6251,7 +6251,7 @@ static INTERRUPT_GEN( lucky8_irq )
goldstar_state *state = device->machine().driver_data<goldstar_state>();
if(state->m_lucky8_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( lucky8, goldstar_state )
diff --git a/src/mame/drivers/goodejan.c b/src/mame/drivers/goodejan.c
index da3b89c370f..9640055586e 100644
--- a/src/mame/drivers/goodejan.c
+++ b/src/mame/drivers/goodejan.c
@@ -331,7 +331,7 @@ GFXDECODE_END
static INTERRUPT_GEN( goodejan_irq )
{
- device_set_input_line_and_vector(device,0,HOLD_LINE,0x208/4);
+ device->execute().set_input_line_and_vector(0,HOLD_LINE,0x208/4);
/* vector 0x00c is just a reti */
}
diff --git a/src/mame/drivers/gotcha.c b/src/mame/drivers/gotcha.c
index a06b0e6286a..497f2e246a1 100644
--- a/src/mame/drivers/gotcha.c
+++ b/src/mame/drivers/gotcha.c
@@ -241,7 +241,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int linestate )
{
gotcha_state *state = device->machine().driver_data<gotcha_state>();
- device_set_input_line(state->m_audiocpu, 0, linestate);
+ state->m_audiocpu->set_input_line(0, linestate);
}
static const ym2151_interface ym2151_config =
@@ -254,7 +254,7 @@ static MACHINE_START( gotcha )
{
gotcha_state *state = machine.driver_data<gotcha_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_banksel));
state->save_item(NAME(state->m_gfxbank));
diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c
index 9fef5ab88fb..ad2bb2ef644 100644
--- a/src/mame/drivers/gottlieb.c
+++ b/src/mame/drivers/gottlieb.c
@@ -663,7 +663,7 @@ static INTERRUPT_GEN( gottlieb_interrupt )
{
gottlieb_state *state = device->machine().driver_data<gottlieb_state>();
/* assert the NMI and set a timer to clear it at the first visible line */
- device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
device->machine().scheduler().timer_set(device->machine().primary_screen->time_until_pos(0), FUNC(nmi_clear));
/* if we have a laserdisc, update it */
diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c
index f9d02d12dba..f0863757abb 100644
--- a/src/mame/drivers/gpworld.c
+++ b/src/mame/drivers/gpworld.c
@@ -435,11 +435,11 @@ static INTERRUPT_GEN( vblank_callback_gpworld )
{
state->m_laserdisc->data_w(state->m_ldp_write_latch);
state->m_ldp_read_latch = state->m_laserdisc->status_r();
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/* The time the IRQ line stays high is set just long enough to happen after the NMI - hacky? */
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
device->machine().scheduler().timer_set(attotime::from_usec(100), FUNC(irq_stop));
}
diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c
index b11974dc055..b5526c3a2f6 100644
--- a/src/mame/drivers/gradius3.c
+++ b/src/mame/drivers/gradius3.c
@@ -82,7 +82,7 @@ WRITE16_MEMBER(gradius3_state::cpuA_ctrl_w)
m_priority = data & 0x04;
/* bit 3 enables cpu B */
- device_set_input_line(m_subcpu, INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
/* bit 5 enables irq */
m_irqAen = data & 0x20;
@@ -103,7 +103,7 @@ static INTERRUPT_GEN( cpuA_interrupt )
{
gradius3_state *state = device->machine().driver_data<gradius3_state>();
if (state->m_irqAen)
- device_set_input_line(device, 2, HOLD_LINE);
+ device->execute().set_input_line(2, HOLD_LINE);
}
@@ -125,7 +125,7 @@ WRITE16_MEMBER(gradius3_state::cpuB_irqtrigger_w)
if (m_irqBmask & 4)
{
logerror("%04x trigger cpu B irq 4 %02x\n",space.device().safe_pc(),data);
- device_set_input_line(m_subcpu, 4, HOLD_LINE);
+ m_subcpu->set_input_line(4, HOLD_LINE);
}
else
logerror("%04x MISSED cpu B irq 4 %02x\n",space.device().safe_pc(),data);
@@ -139,7 +139,7 @@ WRITE16_MEMBER(gradius3_state::sound_command_w)
WRITE16_MEMBER(gradius3_state::sound_irq_w)
{
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(gradius3_state::sound_bank_w)
@@ -290,9 +290,9 @@ static MACHINE_START( gradius3 )
{
gradius3_state *state = machine.driver_data<gradius3_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
- state->m_subcpu = machine.device("sub");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
+ state->m_subcpu = machine.device<cpu_device>("sub");
state->m_k007232 = machine.device("k007232");
state->m_k052109 = machine.device("k052109");
state->m_k051960 = machine.device("k051960");
diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c
index 6d38bea6509..aef3d461429 100644
--- a/src/mame/drivers/grchamp.c
+++ b/src/mame/drivers/grchamp.c
@@ -95,7 +95,7 @@ static INTERRUPT_GEN( grchamp_cpu0_interrupt )
grchamp_state *state = device->machine().driver_data<grchamp_state>();
if (state->m_cpu0_out[0] & 0x01)
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
@@ -104,7 +104,7 @@ static INTERRUPT_GEN( grchamp_cpu1_interrupt )
grchamp_state *state = device->machine().driver_data<grchamp_state>();
if (state->m_cpu1_out[4] & 0x01)
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c
index eff228ed83d..6ad3509cdde 100644
--- a/src/mame/drivers/groundfx.c
+++ b/src/mame/drivers/groundfx.c
@@ -358,7 +358,7 @@ static INTERRUPT_GEN( groundfx_interrupt )
{
groundfx_state *state = device->machine().driver_data<groundfx_state>();
state->m_frame_counter^=1;
- device_set_input_line(device, 4, HOLD_LINE);
+ device->execute().set_input_line(4, HOLD_LINE);
}
static MACHINE_CONFIG_START( groundfx, groundfx_state )
diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c
index 83f795fb553..185b5030227 100644
--- a/src/mame/drivers/gsword.c
+++ b/src/mame/drivers/gsword.c
@@ -253,7 +253,7 @@ static INTERRUPT_GEN( gsword_snd_interrupt )
gsword_state *state = device->machine().driver_data<gsword_state>();
if(state->m_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(gsword_state::gsword_nmi_set_w)
diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c
index 1478e28a6f9..dbb4126ea45 100644
--- a/src/mame/drivers/gticlub.c
+++ b/src/mame/drivers/gticlub.c
@@ -695,7 +695,7 @@ INPUT_PORTS_END
*/
static INTERRUPT_GEN( gticlub_vblank )
{
- device_set_input_line(device, INPUT_LINE_IRQ0, ASSERT_LINE);
+ device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c
index 4089afdcc15..ec6f2a281a5 100644
--- a/src/mame/drivers/gunbustr.c
+++ b/src/mame/drivers/gunbustr.c
@@ -60,7 +60,7 @@ static TIMER_CALLBACK( gunbustr_interrupt5 )
static INTERRUPT_GEN( gunbustr_interrupt )
{
device->machine().scheduler().timer_set(downcast<cpu_device *>(device)->cycles_to_attotime(200000-500), FUNC(gunbustr_interrupt5));
- device_set_input_line(device, 4, HOLD_LINE);
+ device->execute().set_input_line(4, HOLD_LINE);
}
WRITE32_MEMBER(gunbustr_state::gunbustr_palette_w)
@@ -435,7 +435,7 @@ ROM_END
READ32_MEMBER(gunbustr_state::main_cycle_r)
{
if (space.device().safe_pc()==0x55a && (m_ram[0x3acc/4]&0xff000000)==0)
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
return m_ram[0x3acc/4];
}
diff --git a/src/mame/drivers/gunpey.c b/src/mame/drivers/gunpey.c
index 4d73ab1c263..c04f510d10c 100644
--- a/src/mame/drivers/gunpey.c
+++ b/src/mame/drivers/gunpey.c
@@ -356,7 +356,7 @@ static PALETTE_INIT( gunpey )
static INTERRUPT_GEN( gunpey_interrupt )
{
- device_set_input_line_and_vector(device,0,HOLD_LINE,0x200/4);
+ device->execute().set_input_line_and_vector(0,HOLD_LINE,0x200/4);
}
/***************************************************************************************/
diff --git a/src/mame/drivers/gyruss.c b/src/mame/drivers/gyruss.c
index 43a993799d8..45ee869a97c 100644
--- a/src/mame/drivers/gyruss.c
+++ b/src/mame/drivers/gyruss.c
@@ -118,7 +118,7 @@ WRITE8_MEMBER(gyruss_state::gyruss_dac_w)
WRITE8_MEMBER(gyruss_state::gyruss_irq_clear_w)
{
- device_set_input_line(m_audiocpu_2, 0, CLEAR_LINE);
+ m_audiocpu_2->set_input_line(0, CLEAR_LINE);
}
static void filter_w( device_t *device, int chip, int data )
@@ -149,12 +149,12 @@ WRITE8_MEMBER(gyruss_state::gyruss_filter1_w)
WRITE8_MEMBER(gyruss_state::gyruss_sh_irqtrigger_w)
{
/* writing to this register triggers IRQ on the sound CPU */
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(gyruss_state::gyruss_i8039_irq_w)
{
- device_set_input_line(m_audiocpu_2, 0, ASSERT_LINE);
+ m_audiocpu_2->set_input_line(0, ASSERT_LINE);
}
WRITE8_MEMBER(gyruss_state::master_nmi_mask_w)
@@ -501,7 +501,7 @@ static INTERRUPT_GEN( master_vblank_irq )
gyruss_state *state = device->machine().driver_data<gyruss_state>();
if (state->m_master_nmi_mask)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static INTERRUPT_GEN( slave_vblank_irq )
@@ -509,7 +509,7 @@ static INTERRUPT_GEN( slave_vblank_irq )
gyruss_state *state = device->machine().driver_data<gyruss_state>();
if (state->m_slave_irq_mask)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static MACHINE_CONFIG_START( gyruss, gyruss_state )
diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c
index aff67f82cf3..9809955ae9c 100644
--- a/src/mame/drivers/hcastle.c
+++ b/src/mame/drivers/hcastle.c
@@ -24,7 +24,7 @@ WRITE8_MEMBER(hcastle_state::hcastle_bankswitch_w)
WRITE8_MEMBER(hcastle_state::hcastle_soundirq_w)
{
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(hcastle_state::hcastle_coin_w)
@@ -184,7 +184,7 @@ static MACHINE_START( hcastle )
state->membank("bank1")->configure_entries(0, 16, &ROM[0x10000], 0x2000);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k007121_1 = machine.device("k007121_1");
state->m_k007121_2 = machine.device("k007121_2");
diff --git a/src/mame/drivers/highvdeo.c b/src/mame/drivers/highvdeo.c
index 50777c34cd6..2438d4516fb 100644
--- a/src/mame/drivers/highvdeo.c
+++ b/src/mame/drivers/highvdeo.c
@@ -921,7 +921,7 @@ INPUT_PORTS_END
static INTERRUPT_GEN( vblank_irq )
{
- device_set_input_line_and_vector(device,0,HOLD_LINE,0x08/4);
+ device->execute().set_input_line_and_vector(0,HOLD_LINE,0x08/4);
}
static MACHINE_CONFIG_START( tv_vcf, highvdeo_state )
diff --git a/src/mame/drivers/himesiki.c b/src/mame/drivers/himesiki.c
index 41b4749b907..7ab83739c30 100644
--- a/src/mame/drivers/himesiki.c
+++ b/src/mame/drivers/himesiki.c
@@ -100,7 +100,7 @@ WRITE8_MEMBER(himesiki_state::himesiki_rombank_w)
WRITE8_MEMBER(himesiki_state::himesiki_sound_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_subcpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/****************************************************************************/
@@ -273,7 +273,7 @@ static MACHINE_START( himesiki )
state->membank("bank1")->configure_entries(0, 2, &ROM[0x10000], 0x4000);
- state->m_subcpu = machine.device("sub");
+ state->m_subcpu = machine.device<cpu_device>("sub");
state->save_item(NAME(state->m_scrollx));
state->save_item(NAME(state->m_flipscreen));
diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c
index d3daa8fc254..d7ed6198a3e 100644
--- a/src/mame/drivers/hitpoker.c
+++ b/src/mame/drivers/hitpoker.c
@@ -487,7 +487,7 @@ static const hc11_config hitpoker_config =
static INTERRUPT_GEN( hitpoker_irq )
{
- device_set_input_line(device, MC68HC11_IRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(MC68HC11_IRQ_LINE, HOLD_LINE);
}
static MACHINE_CONFIG_START( hitpoker, hitpoker_state )
diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c
index d69272226a0..b2c210a5a68 100644
--- a/src/mame/drivers/hng64.c
+++ b/src/mame/drivers/hng64.c
@@ -1751,10 +1751,10 @@ void hng64_state::m_set_irq(UINT32 irq_vector)
}
}
- device_set_input_line(m_maincpu, 0, ASSERT_LINE);
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
else
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
static TIMER_DEVICE_CALLBACK( hng64_irq )
diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c
index f9889ce5958..de8991445d4 100644
--- a/src/mame/drivers/homedata.c
+++ b/src/mame/drivers/homedata.c
@@ -227,12 +227,12 @@ static INTERRUPT_GEN( homedata_irq )
{
homedata_state *state = device->machine().driver_data<homedata_state>();
state->m_vblank = 1;
- device_set_input_line(device, M6809_FIRQ_LINE, HOLD_LINE);
+ device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
static INTERRUPT_GEN( upd7807_irq )
{
- device_set_input_line(device, UPD7810_INTF1, HOLD_LINE);
+ device->execute().set_input_line(UPD7810_INTF1, HOLD_LINE);
}
@@ -317,7 +317,7 @@ WRITE8_MEMBER(homedata_state::mrokumei_sound_io_w)
WRITE8_MEMBER(homedata_state::mrokumei_sound_cmd_w)
{
soundlatch_byte_w(space, offset, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
@@ -1144,8 +1144,8 @@ static MACHINE_START( homedata )
{
homedata_state *state = machine.driver_data<homedata_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_ym = machine.device("ymsnd");
state->m_sn = machine.device<sn76489a_new_device>("snsnd");
state->m_dac = machine.device<dac_device>("dac");
diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c
index 0d835f857ff..75588841f66 100644
--- a/src/mame/drivers/hotblock.c
+++ b/src/mame/drivers/hotblock.c
@@ -197,7 +197,7 @@ INPUT_PORTS_END
static INTERRUPT_GEN( hotblocks_irq ) /* right? */
{
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static const ay8910_interface ay8910_config =
diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c
index efbcdabe8a5..778ad4e5918 100644
--- a/src/mame/drivers/hvyunit.c
+++ b/src/mame/drivers/hvyunit.c
@@ -211,7 +211,7 @@ static SCREEN_VBLANK( hvyunit )
WRITE8_MEMBER(hvyunit_state::trigger_nmi_on_slave_cpu)
{
- device_set_input_line(m_slave_cpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_slave_cpu->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(hvyunit_state::master_bankswitch_w)
@@ -228,7 +228,7 @@ WRITE8_MEMBER(hvyunit_state::mermaid_data_w)
m_data_to_mermaid = data;
m_z80_to_mermaid_full = 1;
m_mermaid_int0_l = 0;
- device_set_input_line(m_mermaid, INPUT_LINE_IRQ0, ASSERT_LINE);
+ m_mermaid->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
READ8_MEMBER(hvyunit_state::mermaid_data_r)
@@ -255,7 +255,7 @@ WRITE8_MEMBER(hvyunit_state::trigger_nmi_on_sound_cpu2)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_sound_cpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_sound_cpu->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE8_MEMBER(hvyunit_state::hu_videoram_w)
@@ -358,7 +358,7 @@ WRITE8_MEMBER(hvyunit_state::mermaid_p1_w)
if (data == 0xff)
{
m_mermaid_int0_l = 1;
- device_set_input_line(m_mermaid, INPUT_LINE_IRQ0, CLEAR_LINE);
+ m_mermaid->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
m_mermaid_p[1] = data;
@@ -404,7 +404,7 @@ WRITE8_MEMBER(hvyunit_state::mermaid_p3_w)
{
m_mermaid_p[3] = data;
- device_set_input_line(m_slave_cpu, INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
+ m_slave_cpu->execute().set_input_line(INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
}
@@ -630,11 +630,11 @@ static TIMER_DEVICE_CALLBACK( hvyunit_scanline )
int scanline = param;
if(scanline == 240) // vblank-out irq
- device_set_input_line_and_vector(state->m_master_cpu, 0, HOLD_LINE, 0xfd);
+ state->m_master_cpu->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
/* Pandora "sprite end dma" irq? TODO: timing is likely off */
if(scanline == 64)
- device_set_input_line_and_vector(state->m_master_cpu, 0, HOLD_LINE, 0xff);
+ state->m_master_cpu->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
static const kaneko_pandora_interface hvyunit_pandora_config =
diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c
index 1120d5fcfe4..0844cba03d2 100644
--- a/src/mame/drivers/hyperspt.c
+++ b/src/mame/drivers/hyperspt.c
@@ -277,7 +277,7 @@ static INTERRUPT_GEN( vblank_irq )
hyperspt_state *state = device->machine().driver_data<hyperspt_state>();
if(state->m_irq_mask)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
//-------------------------------------------------
diff --git a/src/mame/drivers/hyprduel.c b/src/mame/drivers/hyprduel.c
index 544a2c8007b..3197a4fb50f 100644
--- a/src/mame/drivers/hyprduel.c
+++ b/src/mame/drivers/hyprduel.c
@@ -50,7 +50,7 @@ static void update_irq_state( running_machine &machine )
hyprduel_state *state = machine.driver_data<hyprduel_state>();
int irq = state->m_requested_int & ~*state->m_irq_enable;
- device_set_input_line(state->m_maincpu, 3, (irq & state->m_int_num) ? ASSERT_LINE : CLEAR_LINE);
+ state->m_maincpu->set_input_line(3, (irq & state->m_int_num) ? ASSERT_LINE : CLEAR_LINE);
}
static TIMER_CALLBACK( vblank_end_callback )
@@ -68,7 +68,7 @@ static TIMER_DEVICE_CALLBACK( hyprduel_interrupt )
{
state->m_requested_int |= 0x01; /* vblank */
state->m_requested_int |= 0x20;
- device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
+ state->m_maincpu->set_input_line(2, HOLD_LINE);
/* the duration is a guess */
timer.machine().scheduler().timer_set(attotime::from_usec(2500), FUNC(vblank_end_callback), 0x20);
}
@@ -107,7 +107,7 @@ WRITE16_MEMBER(hyprduel_state::hyprduel_subcpu_control_w)
case 0x01:
if (!m_subcpu_resetline)
{
- device_set_input_line(m_subcpu, INPUT_LINE_RESET, ASSERT_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_subcpu_resetline = 1;
}
break;
@@ -115,15 +115,15 @@ WRITE16_MEMBER(hyprduel_state::hyprduel_subcpu_control_w)
case 0x00:
if (m_subcpu_resetline)
{
- device_set_input_line(m_subcpu, INPUT_LINE_RESET, CLEAR_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
m_subcpu_resetline = 0;
}
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
break;
case 0x0c:
case 0x80:
- device_set_input_line(m_subcpu, 2, HOLD_LINE);
+ m_subcpu->set_input_line(2, HOLD_LINE);
break;
}
}
@@ -148,7 +148,7 @@ WRITE16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger1_w)
{
if (!m_cpu_trigger && !m_subcpu_resetline)
{
- device_spin_until_trigger(&space.device(), 1001);
+ space.device().execute().spin_until_trigger(1001);
m_cpu_trigger = 1001;
}
}
@@ -174,7 +174,7 @@ WRITE16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger2_w)
{
if (!m_cpu_trigger && !m_subcpu_resetline)
{
- device_spin_until_trigger(&space.device(), 1002);
+ space.device().execute().spin_until_trigger(1002);
m_cpu_trigger = 1002;
}
}
@@ -184,7 +184,7 @@ WRITE16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger2_w)
static TIMER_CALLBACK( magerror_irq_callback )
{
hyprduel_state *state = machine.driver_data<hyprduel_state>();
- device_set_input_line(state->m_subcpu, 1, HOLD_LINE);
+ state->m_subcpu->set_input_line(1, HOLD_LINE);
}
/***************************************************************************
@@ -623,7 +623,7 @@ GFXDECODE_END
static void sound_irq( device_t *device, int state )
{
hyprduel_state *hyprduel = device->machine().driver_data<hyprduel_state>();
- device_set_input_line(hyprduel->m_subcpu, 1, HOLD_LINE);
+ hyprduel->m_subcpu->set_input_line(1, HOLD_LINE);
}
static const ym2151_interface ym2151_config =
@@ -653,8 +653,8 @@ static MACHINE_START( hyprduel )
{
hyprduel_state *state = machine.driver_data<hyprduel_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_subcpu = machine.device("sub");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_subcpu = machine.device<cpu_device>("sub");
state->save_item(NAME(state->m_blitter_bit));
state->save_item(NAME(state->m_requested_int));
diff --git a/src/mame/drivers/igs009.c b/src/mame/drivers/igs009.c
index 3412638eb70..c2ae72457e8 100644
--- a/src/mame/drivers/igs009.c
+++ b/src/mame/drivers/igs009.c
@@ -737,7 +737,7 @@ static INTERRUPT_GEN( jingbell_interrupt )
{
igs009_state *state = device->machine().driver_data<igs009_state>();
if (state->m_nmi_enable & 0x80)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( jingbell, igs009_state )
diff --git a/src/mame/drivers/igs011.c b/src/mame/drivers/igs011.c
index 8bcf6847e8f..f319d877688 100644
--- a/src/mame/drivers/igs011.c
+++ b/src/mame/drivers/igs011.c
@@ -3827,7 +3827,7 @@ static TIMER_DEVICE_CALLBACK ( lev5_timer_irq_cb )
{
igs011_state *state = timer.machine().driver_data<igs011_state>();
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE);
+ state->m_maincpu->set_input_line(5, HOLD_LINE);
}
static MACHINE_CONFIG_DERIVED( drgnwrld, igs011_base )
@@ -3853,7 +3853,7 @@ static INTERRUPT_GEN( lhb_vblank_irq )
if (!state->m_lhb_irq_enable)
return;
- device_set_input_line(state->m_maincpu, 6, HOLD_LINE);
+ state->m_maincpu->set_input_line(6, HOLD_LINE);
}
static TIMER_DEVICE_CALLBACK ( lhb_timer_irq_cb )
@@ -3862,7 +3862,7 @@ static TIMER_DEVICE_CALLBACK ( lhb_timer_irq_cb )
if (!state->m_lhb_irq_enable)
return;
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE);
+ state->m_maincpu->set_input_line(5, HOLD_LINE);
}
static MACHINE_CONFIG_DERIVED( lhb, igs011_base )
@@ -3879,7 +3879,7 @@ static TIMER_DEVICE_CALLBACK ( lev3_timer_irq_cb )
{
igs011_state *state = timer.machine().driver_data<igs011_state>();
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
}
diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c
index 70e630a4271..0068669fd65 100644
--- a/src/mame/drivers/igs017.c
+++ b/src/mame/drivers/igs017.c
@@ -3224,10 +3224,10 @@ static TIMER_DEVICE_CALLBACK( irqblocka_interrupt )
int scanline = param;
if(scanline == 240 && state->m_irq_enable)
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
if(scanline == 0 && state->m_nmi_enable)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -3294,10 +3294,10 @@ static TIMER_DEVICE_CALLBACK( mgcs_interrupt )
int scanline = param;
if(scanline == 240 && state->m_irq1_enable)
- device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
+ state->m_maincpu->set_input_line(1, HOLD_LINE);
if(scanline == 0 && state->m_irq2_enable)
- device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
+ state->m_maincpu->set_input_line(2, HOLD_LINE);
}
static MACHINE_RESET( mgcs )
@@ -3515,10 +3515,10 @@ static TIMER_DEVICE_CALLBACK( mgdh_interrupt )
int scanline = param;
if(scanline == 240 && state->m_irq1_enable)
- device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
+ state->m_maincpu->set_input_line(1, HOLD_LINE);
if(scanline == 0 && state->m_irq2_enable)
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE); // lev 3 instead of 2
+ state->m_maincpu->set_input_line(3, HOLD_LINE); // lev 3 instead of 2
}
static I8255A_INTERFACE( mgdh_ppi8255_intf )
diff --git a/src/mame/drivers/igspoker.c b/src/mame/drivers/igspoker.c
index 5d921a967de..63aab4e0657 100644
--- a/src/mame/drivers/igspoker.c
+++ b/src/mame/drivers/igspoker.c
@@ -137,16 +137,16 @@ static TIMER_DEVICE_CALLBACK( igs_interrupt )
return;
if((scanline % 64) == 32)
- device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
+ state->m_maincpu->set_input_line(0, ASSERT_LINE);
if((scanline % 64) == 0 && state->m_nmi_enable)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
READ8_MEMBER(igspoker_state::igs_irqack_r)
{
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
return 0;
}
diff --git a/src/mame/drivers/ikki.c b/src/mame/drivers/ikki.c
index 2d8ec159431..96f1a7bdf5a 100644
--- a/src/mame/drivers/ikki.c
+++ b/src/mame/drivers/ikki.c
@@ -248,7 +248,7 @@ static TIMER_DEVICE_CALLBACK( ikki_irq )
if(scanline == 240 || scanline == 120) // TODO: where non-timer IRQ happens?
{
- device_set_input_line(state->m_maincpu,0,HOLD_LINE);
+ state->m_maincpu->set_input_line(0,HOLD_LINE);
state->m_irq_source = (scanline != 240);
}
diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c
index 0f5c916bccc..2a46525add2 100644
--- a/src/mame/drivers/imolagp.c
+++ b/src/mame/drivers/imolagp.c
@@ -108,7 +108,7 @@ public:
int m_oldsteer;
/* devices */
- device_t *m_slavecpu;
+ cpu_device *m_slavecpu;
/* memory */
UINT8 m_videoram[3][0x4000];
@@ -155,7 +155,7 @@ WRITE8_MEMBER(imolagp_state::transmit_data_w)
}
READ8_MEMBER(imolagp_state::trigger_slave_nmi_r)
{
- device_set_input_line(m_slave, INPUT_LINE_NMI, PULSE_LINE);
+ m_slave->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
return 0;
}
@@ -486,7 +486,7 @@ static TIMER_DEVICE_CALLBACK ( imolagp_nmi_cb )
{
state->m_oldsteer = (state->m_oldsteer + 1) & 0xf;
}
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
}
@@ -499,7 +499,7 @@ static INTERRUPT_GEN( vblank_irq )
memcpy(&state->m_slave_workram[0x80], state->m_mComData, state->m_mComCount);
state->m_mComCount = 0;
#endif
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
} /* master_interrupt */
@@ -518,7 +518,7 @@ static MACHINE_START( imolagp )
{
imolagp_state *state = machine.driver_data<imolagp_state>();
- state->m_slavecpu = machine.device("slave");
+ state->m_slavecpu = machine.device<cpu_device>("slave");
state->save_item(NAME(state->m_control));
state->save_item(NAME(state->m_scroll));
diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c
index a2234e0e769..4410d8cb152 100644
--- a/src/mame/drivers/inufuku.c
+++ b/src/mame/drivers/inufuku.c
@@ -91,7 +91,7 @@ WRITE16_MEMBER(inufuku_state::inufuku_soundcommand_w)
m_pending_command = 1;
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -296,7 +296,7 @@ GFXDECODE_END
static void irqhandler( device_t *device, int irq )
{
inufuku_state *state = device->machine().driver_data<inufuku_state>();
- device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2610_interface ym2610_config =
@@ -319,7 +319,7 @@ static MACHINE_START( inufuku )
state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x8000);
state->membank("bank1")->set_entry(0);
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_pending_command));
state->save_item(NAME(state->m_bg_scrollx));
diff --git a/src/mame/drivers/iqblock.c b/src/mame/drivers/iqblock.c
index 6c841fb521a..87ce518e8e7 100644
--- a/src/mame/drivers/iqblock.c
+++ b/src/mame/drivers/iqblock.c
@@ -82,9 +82,9 @@ static TIMER_DEVICE_CALLBACK( iqblock_irq )
return;
if((scanline % 32) == 16)
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
else if ((scanline % 32) == 0)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/ironhors.c b/src/mame/drivers/ironhors.c
index e3e42c0f2dd..1e39792f068 100644
--- a/src/mame/drivers/ironhors.c
+++ b/src/mame/drivers/ironhors.c
@@ -28,19 +28,19 @@ static TIMER_DEVICE_CALLBACK( ironhors_irq )
if (scanline == 240)
{
if (*state->m_interrupt_enable & 4)
- device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
else if (((scanline+16) % 64) == 0)
{
if (*state->m_interrupt_enable & 1)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
WRITE8_MEMBER(ironhors_state::ironhors_sh_irqtrigger_w)
{
- device_set_input_line_and_vector(m_soundcpu, 0, HOLD_LINE, 0xff);
+ m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(ironhors_state::ironhors_filter_w)
@@ -360,8 +360,8 @@ static MACHINE_START( ironhors )
{
ironhors_state *state = machine.driver_data<ironhors_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_soundcpu = machine.device("soundcpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_soundcpu = machine.device<cpu_device>("soundcpu");
state->save_item(NAME(state->m_palettebank));
state->save_item(NAME(state->m_charbank));
@@ -430,19 +430,19 @@ static TIMER_DEVICE_CALLBACK( farwest_irq )
if ((scanline % 2) == 1)
{
if (*state->m_interrupt_enable & 4)
- device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
else if ((scanline % 2) == 0)
{
if (*state->m_interrupt_enable & 1)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
READ8_MEMBER(ironhors_state::farwest_soundlatch_r)
{
- return soundlatch_byte_r(*m_soundcpu->memory().space(AS_PROGRAM), 0);
+ return soundlatch_byte_r(*m_soundcpu->space(AS_PROGRAM), 0);
}
static const ym2203_interface farwest_ym2203_config =
diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c
index a33469a2e4d..1215d7c1ec2 100644
--- a/src/mame/drivers/istellar.c
+++ b/src/mame/drivers/istellar.c
@@ -317,7 +317,7 @@ GFXDECODE_END
static INTERRUPT_GEN( vblank_callback_istellar )
{
/* Interrupt presumably comes from VBlank */
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
/* Interrupt presumably comes from the LDP's status strobe */
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 9f6eed2085c..d0d192d08ab 100644
--- a/src/mame/drivers/itech32.c
+++ b/src/mame/drivers/itech32.c
@@ -363,7 +363,7 @@ Notes:
-#define START_TMS_SPINNING(n) do { device_spin_until_trigger(&space.device(), 7351 + n); m_tms_spinning[n] = 1; } while (0)
+#define START_TMS_SPINNING(n) do { space.device().execute().spin_until_trigger(7351 + n); m_tms_spinning[n] = 1; } while (0)
#define STOP_TMS_SPINNING(machine, n) do { (machine).scheduler().trigger(7351 + n); (machine).driver_data<itech32_state>()->m_tms_spinning[n] = 0; } while (0)
diff --git a/src/mame/drivers/jack.c b/src/mame/drivers/jack.c
index fa1645ab22c..f9edc0f3f55 100644
--- a/src/mame/drivers/jack.c
+++ b/src/mame/drivers/jack.c
@@ -64,7 +64,7 @@ READ8_MEMBER(jack_state::timer_r)
WRITE8_MEMBER(jack_state::jack_sh_command_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, HOLD_LINE);
+ m_audiocpu->set_input_line(0, HOLD_LINE);
}
@@ -856,7 +856,7 @@ static INTERRUPT_GEN( joinem_vblank_irq )
{
/* TODO: looks hackish to me ... */
if (!(device->machine().root_device().ioport("IN2")->read() & 0x80))
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_DERIVED( joinem, jack )
diff --git a/src/mame/drivers/jackal.c b/src/mame/drivers/jackal.c
index 909d591179b..1f163de4fa3 100644
--- a/src/mame/drivers/jackal.c
+++ b/src/mame/drivers/jackal.c
@@ -313,8 +313,8 @@ static INTERRUPT_GEN( jackal_interrupt )
if (state->m_irq_enable)
{
- device_set_input_line(device, 0, HOLD_LINE);
- device_set_input_line(state->m_slavecpu, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
+ state->m_slavecpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -334,8 +334,8 @@ static MACHINE_START( jackal )
state->membank("bank1")->configure_entry(1, &ROM[0x14000]);
state->membank("bank1")->set_entry(0);
- state->m_mastercpu = machine.device("master");
- state->m_slavecpu = machine.device("slave");
+ state->m_mastercpu = machine.device<cpu_device>("master");
+ state->m_slavecpu = machine.device<cpu_device>("slave");
state->save_item(NAME(state->m_irq_enable));
}
diff --git a/src/mame/drivers/jackie.c b/src/mame/drivers/jackie.c
index 90205cb49bc..8dfac0e2c45 100644
--- a/src/mame/drivers/jackie.c
+++ b/src/mame/drivers/jackie.c
@@ -566,9 +566,9 @@ static TIMER_DEVICE_CALLBACK( jackie_irq )
return;
if((scanline % 64) == 32 && state->m_irq_enable)
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
else if ((scanline % 64) == 0 && state->m_nmi_enable)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_CONFIG_START( jackie, jackie_state )
diff --git a/src/mame/drivers/jackpool.c b/src/mame/drivers/jackpool.c
index 3d025960e51..e29ffbd5f4d 100644
--- a/src/mame/drivers/jackpool.c
+++ b/src/mame/drivers/jackpool.c
@@ -249,7 +249,7 @@ GFXDECODE_END
/*irq 2 used for communication stuff.3 is just a rte*/
static INTERRUPT_GEN( jackpool_interrupt )
{
- device_set_input_line(device, 1, HOLD_LINE);
+ device->execute().set_input_line(1, HOLD_LINE);
}
diff --git a/src/mame/drivers/jaguar.c b/src/mame/drivers/jaguar.c
index a203f548838..70fc464eab1 100644
--- a/src/mame/drivers/jaguar.c
+++ b/src/mame/drivers/jaguar.c
@@ -895,7 +895,7 @@ READ32_MEMBER(jaguar_state::cojagr3k_main_speedup_r)
/* increment the count; if we hit 5, we can spin until an interrupt comes */
if (m_main_speedup_hits++ > 5)
{
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
m_main_speedup_hits = 0;
}
}
@@ -936,7 +936,7 @@ READ32_MEMBER(jaguar_state::cojagr3k_main_speedup_r)
READ32_MEMBER(jaguar_state::main_gpu_wait_r)
{
if (m_gpu_command_pending)
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
return *m_main_gpu_wait;
}
@@ -972,7 +972,7 @@ WRITE32_MEMBER(jaguar_state::area51_main_speedup_w)
/* increment the count; if we hit 5, we can spin until an interrupt comes */
if (m_main_speedup_hits++ > 5)
{
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
m_main_speedup_hits = 0;
}
}
@@ -1006,7 +1006,7 @@ WRITE32_MEMBER(jaguar_state::area51mx_main_speedup_w)
/* increment the count; if we hit 5, we can spin until an interrupt comes */
if (m_main_speedup_hits++ > 10)
{
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
m_main_speedup_hits = 0;
}
}
diff --git a/src/mame/drivers/jailbrek.c b/src/mame/drivers/jailbrek.c
index 9c142eb4a07..16840050ff0 100644
--- a/src/mame/drivers/jailbrek.c
+++ b/src/mame/drivers/jailbrek.c
@@ -105,7 +105,7 @@ static INTERRUPT_GEN( jb_interrupt )
jailbrek_state *state = device->machine().driver_data<jailbrek_state>();
if (state->m_irq_enable)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static INTERRUPT_GEN( jb_interrupt_nmi )
@@ -113,7 +113,7 @@ static INTERRUPT_GEN( jb_interrupt_nmi )
jailbrek_state *state = device->machine().driver_data<jailbrek_state>();
if (state->m_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c
index bb511e49f7d..c73f4bf4161 100644
--- a/src/mame/drivers/jangou.c
+++ b/src/mame/drivers/jangou.c
@@ -306,12 +306,12 @@ READ8_MEMBER(jangou_state::input_system_r)
WRITE8_MEMBER(jangou_state::sound_latch_w)
{
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_cpu_1, INPUT_LINE_NMI, ASSERT_LINE);
+ m_cpu_1->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
READ8_MEMBER(jangou_state::sound_latch_r)
{
- device_set_input_line(m_cpu_1, INPUT_LINE_NMI, CLEAR_LINE);
+ m_cpu_1->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return soundlatch_byte_r(space, 0);
}
@@ -331,7 +331,7 @@ static TIMER_CALLBACK( cvsd_bit_timer_callback )
/* Trigger an IRQ for every 8 shifted bits */
if ((++state->m_cvsd_shift_cnt & 7) == 0)
- device_set_input_line(state->m_cpu_1, 0, HOLD_LINE);
+ state->m_cpu_1->execute().set_input_line(0, HOLD_LINE);
}
@@ -350,7 +350,7 @@ static void jngolady_vclk_cb( device_t *device )
else
{
msm5205_data_w(device, state->m_adpcm_byte & 0xf);
- device_set_input_line(state->m_cpu_1, 0, HOLD_LINE);
+ state->m_cpu_1->execute().set_input_line(0, HOLD_LINE);
}
state->m_msm5205_vclk_toggle ^= 1;
@@ -371,7 +371,7 @@ READ8_MEMBER(jangou_state::master_com_r)
WRITE8_MEMBER(jangou_state::master_com_w)
{
- device_set_input_line(m_nsc, 0, HOLD_LINE);
+ m_nsc->execute().set_input_line(0, HOLD_LINE);
m_nsc_latch = data;
}
diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c
index 454b991cbfe..fe19372ebfe 100644
--- a/src/mame/drivers/jchan.c
+++ b/src/mame/drivers/jchan.c
@@ -247,21 +247,21 @@ static TIMER_DEVICE_CALLBACK( jchan_vblank )
int scanline = param;
if(scanline == 240)
- device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
+ state->m_maincpu->set_input_line(1, HOLD_LINE);
if(scanline == 11)
- device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
+ state->m_maincpu->set_input_line(2, HOLD_LINE);
if (state->m_irq_sub_enable)
{
if(scanline == 240)
- device_set_input_line(state->m_subcpu, 1, HOLD_LINE);
+ state->m_subcpu->set_input_line(1, HOLD_LINE);
if(scanline == 249)
- device_set_input_line(state->m_subcpu, 2, HOLD_LINE);
+ state->m_subcpu->set_input_line(2, HOLD_LINE);
if(scanline == 11)
- device_set_input_line(state->m_subcpu, 3, HOLD_LINE);
+ state->m_subcpu->set_input_line(3, HOLD_LINE);
}
}
diff --git a/src/mame/drivers/jclub2.c b/src/mame/drivers/jclub2.c
index 4c43266aee1..b4a150054d6 100644
--- a/src/mame/drivers/jclub2.c
+++ b/src/mame/drivers/jclub2.c
@@ -674,13 +674,13 @@ static TIMER_DEVICE_CALLBACK( darkhors_irq )
int scanline = param;
if(scanline == 248)
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE);
+ state->m_maincpu->set_input_line(5, HOLD_LINE);
if(scanline == 0)
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
if(scanline == 128)
- device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
+ state->m_maincpu->set_input_line(4, HOLD_LINE);
}
static MACHINE_CONFIG_START( darkhors, darkhors_state )
diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c
index d240bcbfdde..c6342ce4a79 100644
--- a/src/mame/drivers/jollyjgr.c
+++ b/src/mame/drivers/jollyjgr.c
@@ -622,7 +622,7 @@ static INTERRUPT_GEN( jollyjgr_interrupt )
{
jollyjgr_state *state = device->machine().driver_data<jollyjgr_state>();
if(state->m_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
diff --git a/src/mame/drivers/jrpacman.c b/src/mame/drivers/jrpacman.c
index e0a54c69f5e..d0e412785e8 100644
--- a/src/mame/drivers/jrpacman.c
+++ b/src/mame/drivers/jrpacman.c
@@ -118,7 +118,7 @@ public:
WRITE8_MEMBER(jrpacman_state::jrpacman_interrupt_vector_w)
{
- device_set_input_line_vector(machine().device("maincpu"), 0, data);
+ machine().device("maincpu")->execute().set_input_line_vector(0, data);
machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
}
@@ -285,7 +285,7 @@ static INTERRUPT_GEN( vblank_irq )
jrpacman_state *state = device->machine().driver_data<jrpacman_state>();
if(state->m_irq_mask)
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static MACHINE_CONFIG_START( jrpacman, jrpacman_state )
diff --git a/src/mame/drivers/jubilee.c b/src/mame/drivers/jubilee.c
index 94916dc2a01..cb4694e8ab7 100644
--- a/src/mame/drivers/jubilee.c
+++ b/src/mame/drivers/jubilee.c
@@ -154,7 +154,7 @@ static PALETTE_INIT( jubileep )
static INTERRUPT_GEN( jubileep_interrupt )
{
/* doesn't seems to work properly. need to set level1 interrupts */
- device_set_input_line_and_vector(device, 0, ASSERT_LINE, 3);//2=nmi 3,4,5,6
+ device->execute().set_input_line_and_vector(0, ASSERT_LINE, 3);//2=nmi 3,4,5,6
}
diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c
index d8873e66673..e7e39d791dc 100644
--- a/src/mame/drivers/junofrst.c
+++ b/src/mame/drivers/junofrst.c
@@ -240,7 +240,7 @@ WRITE8_MEMBER(junofrst_state::junofrst_sh_irqtrigger_w)
if (m_last_irq == 0 && data == 1)
{
/* setting bit 0 low then high triggers IRQ on the sound CPU */
- device_set_input_line_and_vector(m_soundcpu, 0, HOLD_LINE, 0xff);
+ m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
m_last_irq = data;
@@ -250,7 +250,7 @@ WRITE8_MEMBER(junofrst_state::junofrst_sh_irqtrigger_w)
WRITE8_MEMBER(junofrst_state::junofrst_i8039_irq_w)
{
- device_set_input_line(m_i8039, 0, ASSERT_LINE);
+ m_i8039->execute().set_input_line(0, ASSERT_LINE);
}
@@ -259,7 +259,7 @@ WRITE8_MEMBER(junofrst_state::i8039_irqen_and_status_w)
if ((data & 0x80) == 0)
- device_set_input_line(m_i8039, 0, CLEAR_LINE);
+ m_i8039->execute().set_input_line(0, CLEAR_LINE);
m_i8039_status = (data & 0x70) >> 4;
}
@@ -283,7 +283,7 @@ WRITE8_MEMBER(junofrst_state::junofrst_irq_enable_w)
m_irq_enable = data & 1;
if (!m_irq_enable)
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, junofrst_state )
@@ -425,7 +425,7 @@ static INTERRUPT_GEN( junofrst_30hz_irq )
/* flip flops cause the interrupt to be signalled every other frame */
state->m_irq_toggle ^= 1;
if (state->m_irq_toggle && state->m_irq_enable)
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
static MACHINE_CONFIG_START( junofrst, junofrst_state )
diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c
index 392b08a23f4..e4d597ff00a 100644
--- a/src/mame/drivers/kaneko16.c
+++ b/src/mame/drivers/kaneko16.c
@@ -1587,15 +1587,15 @@ static TIMER_DEVICE_CALLBACK( kaneko16_interrupt )
// main vblank interrupt
if(scanline == 224)
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE);
+ state->m_maincpu->set_input_line(5, HOLD_LINE);
// each of these 2 int are responsible of translating a part of sprite buffer
// from work ram to sprite ram. How these are scheduled is unknown.
if(scanline == 64)
- device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
+ state->m_maincpu->set_input_line(4, HOLD_LINE);
if(scanline == 144)
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
}
static const ay8910_interface ay8910_intf_dsw =
@@ -2019,14 +2019,14 @@ static TIMER_DEVICE_CALLBACK( shogwarr_interrupt )
if(scanline == 224)
{
// the code for this interrupt is provided by the MCU..
- device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
+ state->m_maincpu->set_input_line(4, HOLD_LINE);
}
if(scanline == 64)
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
if(scanline == 144)
- device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
+ state->m_maincpu->set_input_line(2, HOLD_LINE);
}
/*
diff --git a/src/mame/drivers/karnov.c b/src/mame/drivers/karnov.c
index 830602de41f..4c2ddc99f39 100644
--- a/src/mame/drivers/karnov.c
+++ b/src/mame/drivers/karnov.c
@@ -126,7 +126,7 @@ static void karnov_i8751_w( running_machine &machine, int data )
// if (!state->m_i8751_return && data != 0x300) logerror("%s - Unknown Write %02x intel\n", machine.describe_context(), data);
- device_set_input_line(state->m_maincpu, 6, HOLD_LINE); /* Signal main cpu task is complete */
+ state->m_maincpu->set_input_line(6, HOLD_LINE); /* Signal main cpu task is complete */
state->m_i8751_needs_ack = 1;
}
@@ -186,7 +186,7 @@ static void wndrplnt_i8751_w( running_machine &machine, int data )
if (data == 0x501) state->m_i8751_return = 0x6bf8;
if (data == 0x500) state->m_i8751_return = 0x4e75;
- device_set_input_line(state->m_maincpu, 6, HOLD_LINE); /* Signal main cpu task is complete */
+ state->m_maincpu->set_input_line(6, HOLD_LINE); /* Signal main cpu task is complete */
state->m_i8751_needs_ack = 1;
}
@@ -318,7 +318,7 @@ static void chelnov_i8751_w( running_machine &machine, int data )
// logerror("%s - Unknown Write %02x intel\n", machine.describe_context(), data);
- device_set_input_line(state->m_maincpu, 6, HOLD_LINE); /* Signal main cpu task is complete */
+ state->m_maincpu->set_input_line(6, HOLD_LINE); /* Signal main cpu task is complete */
state->m_i8751_needs_ack = 1;
}
@@ -335,7 +335,7 @@ WRITE16_MEMBER(karnov_state::karnov_control_w)
switch (offset << 1)
{
case 0: /* SECLR (Interrupt ack for Level 6 i8751 interrupt) */
- device_set_input_line(m_maincpu, 6, CLEAR_LINE);
+ m_maincpu->set_input_line(6, CLEAR_LINE);
if (m_i8751_needs_ack)
{
@@ -343,7 +343,7 @@ WRITE16_MEMBER(karnov_state::karnov_control_w)
if (m_i8751_coin_pending)
{
m_i8751_return = m_i8751_coin_pending;
- device_set_input_line(m_maincpu, 6, HOLD_LINE);
+ m_maincpu->set_input_line(6, HOLD_LINE);
m_i8751_coin_pending = 0;
}
else if (m_i8751_command_queue)
@@ -362,7 +362,7 @@ WRITE16_MEMBER(karnov_state::karnov_control_w)
case 2: /* SONREQ (Sound CPU byte) */
soundlatch_byte_w(space, 0, data & 0xff);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
break;
case 4: /* DM (DMA to buffer spriteram) */
@@ -396,7 +396,7 @@ WRITE16_MEMBER(karnov_state::karnov_control_w)
break;
case 0xe: /* INTCLR (Interrupt ack for Level 7 vbl interrupt) */
- device_set_input_line(m_maincpu, 7, CLEAR_LINE);
+ m_maincpu->set_input_line(7, CLEAR_LINE);
break;
}
}
@@ -744,14 +744,14 @@ static INTERRUPT_GEN( karnov_interrupt )
else
{
state->m_i8751_return = port | 0x8000;
- device_set_input_line(device, 6, HOLD_LINE);
+ device->execute().set_input_line(6, HOLD_LINE);
state->m_i8751_needs_ack = 1;
}
state->m_latch = 0;
}
- device_set_input_line(device, 7, HOLD_LINE); /* VBL */
+ device->execute().set_input_line(7, HOLD_LINE); /* VBL */
}
static const ym3526_interface ym3526_config =
@@ -769,8 +769,8 @@ static MACHINE_START( karnov )
{
karnov_state *state = machine.driver_data<karnov_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_flipscreen));
state->save_item(NAME(state->m_scroll));
diff --git a/src/mame/drivers/kas89.c b/src/mame/drivers/kas89.c
index bfdbc89bbba..8d931fcc655 100644
--- a/src/mame/drivers/kas89.c
+++ b/src/mame/drivers/kas89.c
@@ -214,8 +214,8 @@ public:
UINT8 m_leds_mux_data;
UINT8 m_outdata; /* Muxed with the sound latch. Output to a sign? */
- device_t *m_maincpu;
- device_t *m_audiocpu;
+ cpu_device *m_maincpu;
+ cpu_device *m_audiocpu;
required_device<v9938_device> m_v9938;
DECLARE_WRITE8_MEMBER(mux_w);
@@ -257,8 +257,8 @@ static TIMER_DEVICE_CALLBACK( kas89_interrupt )
static MACHINE_START( kas89 )
{
kas89_state *state = machine.driver_data<kas89_state>();
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
output_set_lamp_value(37, 0); /* turning off the operator led */
}
@@ -315,14 +315,14 @@ static TIMER_DEVICE_CALLBACK ( kas89_nmi_cb )
kas89_state *state = timer.machine().driver_data<kas89_state>();
if (state->m_main_nmi_enable)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static TIMER_DEVICE_CALLBACK ( kas89_sound_nmi_cb )
{
kas89_state *state = timer.machine().driver_data<kas89_state>();
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -379,13 +379,13 @@ WRITE8_MEMBER(kas89_state::sound_comm_w)
else
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, 0, ASSERT_LINE );
+ m_audiocpu->set_input_line(0, ASSERT_LINE );
}
}
WRITE8_MEMBER(kas89_state::int_ack_w)
{
- device_set_input_line(m_audiocpu, 0, CLEAR_LINE );
+ m_audiocpu->set_input_line(0, CLEAR_LINE );
}
diff --git a/src/mame/drivers/kchamp.c b/src/mame/drivers/kchamp.c
index ac1a16e73c4..ea018b2093f 100644
--- a/src/mame/drivers/kchamp.c
+++ b/src/mame/drivers/kchamp.c
@@ -82,7 +82,7 @@ WRITE8_MEMBER(kchamp_state::control_w)
WRITE8_MEMBER(kchamp_state::sound_reset_w)
{
if (!(data & 1))
- device_set_input_line(m_audiocpu, INPUT_LINE_RESET, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
WRITE8_MEMBER(kchamp_state::sound_control_w)
@@ -95,7 +95,7 @@ WRITE8_MEMBER(kchamp_state::sound_control_w)
WRITE8_MEMBER(kchamp_state::sound_command_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(kchamp_state::sound_msm_w)
@@ -144,7 +144,7 @@ ADDRESS_MAP_END
********************/
READ8_MEMBER(kchamp_state::sound_reset_r)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_RESET, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
return 0;
}
@@ -344,7 +344,7 @@ static INTERRUPT_GEN( kc_interrupt )
{
kchamp_state *state = device->machine().driver_data<kchamp_state>();
if (state->m_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static void msmint( device_t *device )
@@ -361,7 +361,7 @@ static void msmint( device_t *device )
if (!(state->m_counter ^= 1))
{
if (state->m_sound_nmi_enable)
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -379,7 +379,7 @@ static INTERRUPT_GEN( sound_int )
{
kchamp_state *state = device->machine().driver_data<kchamp_state>();
if (state->m_sound_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -387,7 +387,7 @@ static MACHINE_START( kchamp )
{
kchamp_state *state = machine.driver_data<kchamp_state>();
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->save_item(NAME(state->m_nmi_enable));
state->save_item(NAME(state->m_sound_nmi_enable));
diff --git a/src/mame/drivers/kingobox.c b/src/mame/drivers/kingobox.c
index 8b9d5ec690f..654d04f6fe8 100644
--- a/src/mame/drivers/kingobox.c
+++ b/src/mame/drivers/kingobox.c
@@ -23,12 +23,12 @@ Main CPU:
WRITE8_MEMBER(kingofb_state::video_interrupt_w)
{
- device_set_input_line_and_vector(m_video_cpu, 0, HOLD_LINE, 0xff);
+ m_video_cpu->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(kingofb_state::sprite_interrupt_w)
{
- device_set_input_line_and_vector(m_sprite_cpu, 0, HOLD_LINE, 0xff);
+ m_sprite_cpu->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
WRITE8_MEMBER(kingofb_state::scroll_interrupt_w)
@@ -40,7 +40,7 @@ WRITE8_MEMBER(kingofb_state::scroll_interrupt_w)
WRITE8_MEMBER(kingofb_state::sound_command_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line_and_vector(m_audio_cpu, 0, HOLD_LINE, 0xff);
+ m_audio_cpu->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
@@ -447,7 +447,7 @@ static INTERRUPT_GEN( kingofb_interrupt )
kingofb_state *state = device->machine().driver_data<kingofb_state>();
if (state->m_nmi_enable)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_START( kingofb )
diff --git a/src/mame/drivers/kingpin.c b/src/mame/drivers/kingpin.c
index 9a2aac91cf2..a2e00248bdd 100644
--- a/src/mame/drivers/kingpin.c
+++ b/src/mame/drivers/kingpin.c
@@ -56,7 +56,7 @@ public:
WRITE8_MEMBER(kingpin_state::sound_nmi_w)
{
soundlatch_byte_w(space, 0, data);
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static ADDRESS_MAP_START( kingpin_program_map, AS_PROGRAM, 8, kingpin_state )
@@ -144,7 +144,7 @@ static I8255A_INTERFACE( ppi8255_1_intf )
WRITE_LINE_MEMBER(kingpin_state::vdp_interrupt)
{
- device_set_input_line(m_maincpu, 0, state ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
static TMS9928A_INTERFACE(kingpin_tms9928a_interface)
diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c
index 612adc0a81a..63cf9a5e18d 100644
--- a/src/mame/drivers/kinst.c
+++ b/src/mame/drivers/kinst.c
@@ -283,7 +283,7 @@ static TIMER_CALLBACK( irq0_stop )
static INTERRUPT_GEN( irq0_start )
{
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(irq0_stop));
}
@@ -363,7 +363,7 @@ READ32_MEMBER(kinst_state::kinst_control_r)
case 4: /* $a0 */
result = ioport(portnames[offset])->read();
if (space.device().safe_pc() == 0x802d428)
- device_spin_until_interrupt(&space.device());
+ space.device().execute().spin_until_interrupt();
break;
}
diff --git a/src/mame/drivers/kncljoe.c b/src/mame/drivers/kncljoe.c
index cfd15950ed9..464b2f3a3b1 100644
--- a/src/mame/drivers/kncljoe.c
+++ b/src/mame/drivers/kncljoe.c
@@ -39,7 +39,7 @@ WRITE8_MEMBER(kncljoe_state::sound_cmd_w)
if ((data & 0x80) == 0)
soundlatch_byte_w(space, 0, data & 0x7f);
else
- device_set_input_line(m_soundcpu, 0, ASSERT_LINE);
+ m_soundcpu->set_input_line(0, ASSERT_LINE);
}
@@ -97,7 +97,7 @@ READ8_MEMBER(kncljoe_state::m6803_port2_r)
WRITE8_MEMBER(kncljoe_state::sound_irq_ack_w)
{
- device_set_input_line(m_soundcpu, 0, CLEAR_LINE);
+ m_soundcpu->set_input_line(0, CLEAR_LINE);
}
WRITE8_MEMBER(kncljoe_state::unused_w)
@@ -259,14 +259,14 @@ static const ay8910_interface ay8910_config =
static INTERRUPT_GEN (sound_nmi)
{
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static MACHINE_START( kncljoe )
{
kncljoe_state *state = machine.driver_data<kncljoe_state>();
- state->m_soundcpu = machine.device("soundcpu");
+ state->m_soundcpu = machine.device<cpu_device>("soundcpu");
state->save_item(NAME(state->m_port1));
state->save_item(NAME(state->m_port2));
diff --git a/src/mame/drivers/koftball.c b/src/mame/drivers/koftball.c
index 9501a2de8e1..0e0bcf753e0 100644
--- a/src/mame/drivers/koftball.c
+++ b/src/mame/drivers/koftball.c
@@ -215,13 +215,13 @@ static TIMER_DEVICE_CALLBACK( bmc_interrupt )
int scanline = param;
if(scanline == 240)
- device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
+ state->m_maincpu->set_input_line(2, HOLD_LINE);
if(scanline == 128)
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
if(scanline == 64)
- device_set_input_line(state->m_maincpu, 6, HOLD_LINE);
+ state->m_maincpu->set_input_line(6, HOLD_LINE);
}
static const gfx_layout tilelayout =
diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c
index 34c0ef7e5ce..37718cd08b2 100644
--- a/src/mame/drivers/konamigx.c
+++ b/src/mame/drivers/konamigx.c
@@ -548,7 +548,7 @@ READ32_MEMBER(konamigx_state::waitskip_r)
if (space.device().safe_pc() == waitskip.pc && (data & mem_mask) == (waitskip.data & mem_mask))
{
- device_spin_until_trigger(&space.device(), resume_trigger);
+ space.device().execute().spin_until_trigger(resume_trigger);
suspension_active = 1;
}
@@ -650,7 +650,7 @@ static INTERRUPT_GEN(konamigx_vbinterrupt)
if ((konamigx_wrport1_1 & 0x81) == 0x81 || (gx_syncen & 1))
{
gx_syncen &= ~1;
- device_set_input_line(device, 1, HOLD_LINE);
+ device->execute().set_input_line(1, HOLD_LINE);
}
}
@@ -681,7 +681,7 @@ static TIMER_DEVICE_CALLBACK(konamigx_hbinterrupt)
if ((konamigx_wrport1_1 & 0x81) == 0x81 || (gx_syncen & 1))
{
gx_syncen &= ~1;
- device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
+ state->m_maincpu->set_input_line(1, HOLD_LINE);
}
}
@@ -698,7 +698,7 @@ static TIMER_DEVICE_CALLBACK(konami