From 17e66e39fd2aeb6e083a8567d281df9235b9f2f4 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 12 Sep 2012 06:07:51 +0000 Subject: Clear out remaining global inlines in diexec.h. --- src/emu/cpu/cp1610/cp1610.c | 2 +- src/emu/cpu/i386/i386.c | 2 +- src/emu/cpu/i386/x87ops.c | 2 +- src/emu/cpu/i86/instr286.c | 2 +- src/emu/cpu/jaguar/jaguar.c | 12 ++-- src/emu/cpu/m37710/m37710.c | 2 +- src/emu/cpu/m6502/m6502.h | 2 +- src/emu/cpu/m6502/m6509.h | 2 +- src/emu/cpu/m68000/m68kcpu.c | 2 +- src/emu/cpu/mips/mips3com.c | 2 +- src/emu/cpu/sh4/sh4comn.c | 4 +- src/emu/cpu/tms34010/34010ops.c | 2 +- src/emu/cpu/tms34010/tms34010.c | 6 +- src/emu/cpu/tms7000/tms7000.c | 2 +- src/emu/diexec.c | 2 +- src/emu/diexec.h | 140 --------------------------------------- src/emu/machine/8042kbdc.c | 2 +- src/emu/machine/k056230.c | 6 +- src/emu/machine/tmp68301.c | 6 +- src/emu/sound/scsp.c | 2 +- src/emu/video/voodoo.c | 8 +-- src/mame/audio/aztarac.c | 2 +- src/mame/audio/beezer.c | 6 +- src/mame/audio/cage.c | 16 ++--- src/mame/audio/dcs.c | 30 ++++----- src/mame/audio/decobsmt.c | 8 +-- src/mame/audio/dsbz80.c | 4 +- src/mame/audio/exidy.c | 12 ++-- src/mame/audio/harddriv.c | 12 ++-- src/mame/audio/leland.c | 4 +- src/mame/audio/namco52.c | 4 +- src/mame/audio/namco54.c | 4 +- src/mame/audio/scramble.c | 2 +- src/mame/audio/segasnd.c | 6 +- src/mame/audio/seibu.c | 4 +- src/mame/audio/t5182.c | 4 +- src/mame/audio/taito_en.c | 6 +- src/mame/audio/taitosnd.c | 12 ++-- src/mame/audio/timeplt.c | 2 +- src/mame/audio/trackfld.c | 2 +- src/mame/drivers/1942.c | 2 +- src/mame/drivers/20pacgal.c | 6 +- src/mame/drivers/2mindril.c | 10 +-- src/mame/drivers/3do.c | 2 +- src/mame/drivers/40love.c | 6 +- src/mame/drivers/88games.c | 4 +- src/mame/drivers/acefruit.c | 2 +- src/mame/drivers/aces1.c | 4 +- src/mame/drivers/actfancr.c | 8 +-- src/mame/drivers/adp.c | 8 +-- src/mame/drivers/aeroboto.c | 2 +- src/mame/drivers/aerofgt.c | 10 +-- src/mame/drivers/airbustr.c | 8 +-- src/mame/drivers/aliens.c | 8 +-- src/mame/drivers/alpha68k.c | 10 +-- src/mame/drivers/amaticmg.c | 2 +- src/mame/drivers/amspdwy.c | 6 +- src/mame/drivers/angelkds.c | 4 +- src/mame/drivers/appoooh.c | 2 +- src/mame/drivers/aquarium.c | 6 +- src/mame/drivers/ashnojoe.c | 6 +- src/mame/drivers/asterix.c | 12 ++-- src/mame/drivers/astinvad.c | 6 +- src/mame/drivers/astrof.c | 14 ++-- src/mame/drivers/asuka.c | 8 +-- src/mame/drivers/atarifb.c | 2 +- src/mame/drivers/avt.c | 2 +- src/mame/drivers/aztarac.c | 2 +- src/mame/drivers/backfire.c | 10 +-- src/mame/drivers/bagman.c | 2 +- src/mame/drivers/bankp.c | 2 +- src/mame/drivers/battlane.c | 16 ++--- src/mame/drivers/battlex.c | 2 +- src/mame/drivers/battlnts.c | 6 +- src/mame/drivers/bbusters.c | 2 +- src/mame/drivers/beaminv.c | 6 +- src/mame/drivers/beathead.c | 4 +- src/mame/drivers/beezer.c | 2 +- src/mame/drivers/bfcobra.c | 2 +- src/mame/drivers/bfm_sc5.c | 2 +- src/mame/drivers/bigevglf.c | 6 +- src/mame/drivers/bingor.c | 6 +- src/mame/drivers/bishi.c | 4 +- src/mame/drivers/bking.c | 4 +- src/mame/drivers/bladestl.c | 4 +- src/mame/drivers/blktiger.c | 8 +-- src/mame/drivers/blockade.c | 4 +- src/mame/drivers/blockhl.c | 8 +-- src/mame/drivers/blockout.c | 16 ++--- src/mame/drivers/blueprnt.c | 4 +- src/mame/drivers/bnstars.c | 4 +- src/mame/drivers/bombjack.c | 2 +- src/mame/drivers/boogwing.c | 2 +- src/mame/drivers/bottom9.c | 10 +-- src/mame/drivers/boxer.c | 12 ++-- src/mame/drivers/brkthru.c | 14 ++-- src/mame/drivers/btime.c | 20 +++--- src/mame/drivers/bublbobl.c | 6 +- src/mame/drivers/buggychl.c | 6 +- src/mame/drivers/bwing.c | 30 ++++----- src/mame/drivers/byvid.c | 8 +-- src/mame/drivers/bzone.c | 2 +- src/mame/drivers/cabal.c | 2 +- src/mame/drivers/cabaret.c | 2 +- src/mame/drivers/calchase.c | 4 +- src/mame/drivers/capbowl.c | 10 +-- src/mame/drivers/carjmbre.c | 2 +- src/mame/drivers/cave.c | 12 ++-- src/mame/drivers/cball.c | 4 +- src/mame/drivers/cbuster.c | 8 +-- src/mame/drivers/ccastles.c | 4 +- src/mame/drivers/cclimber.c | 2 +- src/mame/drivers/cesclass.c | 4 +- src/mame/drivers/champbas.c | 12 ++-- src/mame/drivers/chanbara.c | 6 +- src/mame/drivers/cheekyms.c | 6 +- src/mame/drivers/chihiro.c | 2 +- src/mame/drivers/chinagat.c | 18 ++--- src/mame/drivers/chqflag.c | 8 +-- src/mame/drivers/circus.c | 2 +- src/mame/drivers/circusc.c | 4 +- src/mame/drivers/citycon.c | 4 +- src/mame/drivers/cloud9.c | 4 +- src/mame/drivers/cmmb.c | 2 +- src/mame/drivers/cninja.c | 14 ++-- src/mame/drivers/cntsteer.c | 32 ++++----- src/mame/drivers/cobra.c | 4 +- src/mame/drivers/coinmvga.c | 2 +- src/mame/drivers/combatsc.c | 4 +- src/mame/drivers/commando.c | 4 +- src/mame/drivers/contra.c | 6 +- src/mame/drivers/coolpool.c | 8 +-- src/mame/drivers/coolridr.c | 8 +-- src/mame/drivers/cop01.c | 6 +- src/mame/drivers/cps1.c | 10 +-- src/mame/drivers/cps2.c | 12 ++-- src/mame/drivers/cps3.c | 4 +- src/mame/drivers/crbaloon.c | 2 +- src/mame/drivers/crgolf.c | 12 ++-- src/mame/drivers/crimfght.c | 8 +-- src/mame/drivers/crospang.c | 4 +- src/mame/drivers/crystal.c | 18 ++--- src/mame/drivers/csplayh5.c | 2 +- src/mame/drivers/cubeqst.c | 2 +- src/mame/drivers/cultures.c | 2 +- src/mame/drivers/cvs.c | 12 ++-- src/mame/drivers/cyclemb.c | 14 ++-- src/mame/drivers/dacholer.c | 8 +-- src/mame/drivers/darius.c | 10 +-- src/mame/drivers/dassault.c | 12 ++-- src/mame/drivers/dblewing.c | 14 ++-- src/mame/drivers/dbz.c | 8 +-- src/mame/drivers/dcheese.c | 12 ++-- src/mame/drivers/ddayjlc.c | 10 +-- src/mame/drivers/ddealer.c | 2 +- src/mame/drivers/ddenlovr.c | 44 ++++++------ src/mame/drivers/ddragon.c | 32 ++++----- src/mame/drivers/ddragon3.c | 18 ++--- src/mame/drivers/ddribble.c | 4 +- src/mame/drivers/dec8.c | 50 +++++++------- src/mame/drivers/deco156.c | 2 +- src/mame/drivers/deco32.c | 6 +- src/mame/drivers/deco_ld.c | 6 +- src/mame/drivers/deco_mlc.c | 2 +- src/mame/drivers/deniam.c | 4 +- src/mame/drivers/deshoros.c | 6 +- src/mame/drivers/destroyr.c | 8 +-- src/mame/drivers/dfruit.c | 6 +- src/mame/drivers/dgpix.c | 2 +- src/mame/drivers/dietgo.c | 6 +- src/mame/drivers/discoboy.c | 8 +-- src/mame/drivers/diverboy.c | 6 +- src/mame/drivers/djboy.c | 12 ++-- src/mame/drivers/djmain.c | 2 +- src/mame/drivers/dkong.c | 12 ++-- src/mame/drivers/dogfgt.c | 6 +- src/mame/drivers/drgnmst.c | 2 +- src/mame/drivers/dribling.c | 4 +- src/mame/drivers/drmicro.c | 2 +- src/mame/drivers/dwarfd.c | 4 +- src/mame/drivers/dynax.c | 34 +++++----- src/mame/drivers/dynduke.c | 2 +- src/mame/drivers/egghunt.c | 6 +- src/mame/drivers/enigma2.c | 14 ++-- src/mame/drivers/eolithsp.c | 4 +- src/mame/drivers/eprom.c | 2 +- src/mame/drivers/equites.c | 10 +-- src/mame/drivers/esd16.c | 6 +- src/mame/drivers/esh.c | 2 +- src/mame/drivers/espial.c | 6 +- src/mame/drivers/ettrivia.c | 4 +- src/mame/drivers/exerion.c | 4 +- src/mame/drivers/exprraid.c | 16 ++--- src/mame/drivers/f1gp.c | 6 +- src/mame/drivers/fantland.c | 8 +-- src/mame/drivers/fastfred.c | 4 +- src/mame/drivers/fastlane.c | 4 +- src/mame/drivers/fcombat.c | 4 +- src/mame/drivers/fcrash.c | 12 ++-- src/mame/drivers/fgoal.c | 10 +-- src/mame/drivers/finalizr.c | 4 +- src/mame/drivers/firebeat.c | 2 +- src/mame/drivers/firetrap.c | 16 ++--- src/mame/drivers/firetrk.c | 2 +- src/mame/drivers/fitfight.c | 2 +- src/mame/drivers/flipjack.c | 8 +-- src/mame/drivers/flkatck.c | 6 +- src/mame/drivers/flstory.c | 10 +-- src/mame/drivers/flyball.c | 4 +- src/mame/drivers/freekick.c | 2 +- src/mame/drivers/fromanc2.c | 14 ++-- src/mame/drivers/fromance.c | 4 +- src/mame/drivers/funkball.c | 6 +- src/mame/drivers/funkyjet.c | 6 +- src/mame/drivers/funybubl.c | 4 +- src/mame/drivers/fuukifg2.c | 16 ++--- src/mame/drivers/fuukifg3.c | 12 ++-- src/mame/drivers/gaelco.c | 4 +- src/mame/drivers/gaelco3d.c | 2 +- src/mame/drivers/gaiden.c | 8 +-- src/mame/drivers/galaga.c | 4 +- src/mame/drivers/galastrm.c | 2 +- src/mame/drivers/galaxia.c | 2 +- src/mame/drivers/galaxian.c | 4 +- src/mame/drivers/galaxold.c | 2 +- src/mame/drivers/galgame.c | 6 +- src/mame/drivers/galpani2.c | 14 ++-- src/mame/drivers/galpani3.c | 6 +- src/mame/drivers/galspnbl.c | 6 +- src/mame/drivers/gamecstl.c | 2 +- src/mame/drivers/gameplan.c | 8 +-- src/mame/drivers/gbusters.c | 8 +-- src/mame/drivers/gcpinbal.c | 6 +- src/mame/drivers/gei.c | 2 +- src/mame/drivers/ghosteo.c | 4 +- src/mame/drivers/gijoe.c | 12 ++-- src/mame/drivers/ginganin.c | 2 +- src/mame/drivers/glass.c | 2 +- src/mame/drivers/go2000.c | 6 +- src/mame/drivers/goal92.c | 8 +-- src/mame/drivers/goldstar.c | 2 +- src/mame/drivers/goodejan.c | 2 +- src/mame/drivers/gotcha.c | 4 +- src/mame/drivers/gottlieb.c | 2 +- src/mame/drivers/gpworld.c | 4 +- src/mame/drivers/gradius3.c | 14 ++-- src/mame/drivers/grchamp.c | 4 +- src/mame/drivers/groundfx.c | 2 +- src/mame/drivers/gsword.c | 2 +- src/mame/drivers/gticlub.c | 2 +- src/mame/drivers/gunbustr.c | 4 +- src/mame/drivers/gunpey.c | 2 +- src/mame/drivers/gyruss.c | 10 +-- src/mame/drivers/hcastle.c | 4 +- src/mame/drivers/highvdeo.c | 2 +- src/mame/drivers/himesiki.c | 4 +- src/mame/drivers/hitpoker.c | 2 +- src/mame/drivers/hng64.c | 4 +- src/mame/drivers/homedata.c | 10 +-- src/mame/drivers/hotblock.c | 2 +- src/mame/drivers/hvyunit.c | 14 ++-- src/mame/drivers/hyperspt.c | 2 +- src/mame/drivers/hyprduel.c | 24 +++---- src/mame/drivers/igs009.c | 2 +- src/mame/drivers/igs011.c | 8 +-- src/mame/drivers/igs017.c | 12 ++-- src/mame/drivers/igspoker.c | 6 +- src/mame/drivers/ikki.c | 2 +- src/mame/drivers/imolagp.c | 10 +-- src/mame/drivers/inufuku.c | 6 +- src/mame/drivers/iqblock.c | 4 +- src/mame/drivers/ironhors.c | 16 ++--- src/mame/drivers/istellar.c | 2 +- src/mame/drivers/itech32.c | 2 +- src/mame/drivers/jack.c | 4 +- src/mame/drivers/jackal.c | 8 +-- src/mame/drivers/jackie.c | 4 +- src/mame/drivers/jackpool.c | 2 +- src/mame/drivers/jaguar.c | 8 +-- src/mame/drivers/jailbrek.c | 4 +- src/mame/drivers/jangou.c | 10 +-- src/mame/drivers/jchan.c | 10 +-- src/mame/drivers/jclub2.c | 6 +- src/mame/drivers/jollyjgr.c | 2 +- src/mame/drivers/jrpacman.c | 4 +- src/mame/drivers/jubilee.c | 2 +- src/mame/drivers/junofrst.c | 10 +-- src/mame/drivers/kaneko16.c | 12 ++-- src/mame/drivers/karnov.c | 22 +++--- src/mame/drivers/kas89.c | 16 ++--- src/mame/drivers/kchamp.c | 14 ++-- src/mame/drivers/kingobox.c | 8 +-- src/mame/drivers/kingpin.c | 4 +- src/mame/drivers/kinst.c | 4 +- src/mame/drivers/kncljoe.c | 8 +-- src/mame/drivers/koftball.c | 6 +- src/mame/drivers/konamigx.c | 8 +-- src/mame/drivers/konamim2.c | 2 +- src/mame/drivers/kontest.c | 4 +- src/mame/drivers/kopunch.c | 10 +-- src/mame/drivers/kungfur.c | 2 +- src/mame/drivers/kyugo.c | 8 +-- src/mame/drivers/labyrunr.c | 4 +- src/mame/drivers/ladybug.c | 8 +-- src/mame/drivers/ladyfrog.c | 8 +-- src/mame/drivers/laserbat.c | 6 +- src/mame/drivers/lasso.c | 10 +-- src/mame/drivers/lastbank.c | 4 +- src/mame/drivers/lastduel.c | 6 +- src/mame/drivers/lastfght.c | 2 +- src/mame/drivers/lazercmd.c | 2 +- src/mame/drivers/lemmings.c | 8 +-- src/mame/drivers/lethal.c | 10 +-- src/mame/drivers/lgp.c | 4 +- src/mame/drivers/liberate.c | 16 ++--- src/mame/drivers/littlerb.c | 2 +- src/mame/drivers/lkage.c | 10 +-- src/mame/drivers/lockon.c | 16 ++--- src/mame/drivers/looping.c | 2 +- src/mame/drivers/lsasquad.c | 6 +- src/mame/drivers/lucky74.c | 2 +- src/mame/drivers/lwings.c | 4 +- src/mame/drivers/m10.c | 20 +++--- src/mame/drivers/m14.c | 12 ++-- src/mame/drivers/m63.c | 10 +-- src/mame/drivers/m72.c | 2 +- src/mame/drivers/m79amb.c | 2 +- src/mame/drivers/m90.c | 4 +- src/mame/drivers/m92.c | 18 ++--- src/mame/drivers/macrossp.c | 14 ++-- src/mame/drivers/madmotor.c | 8 +-- src/mame/drivers/magicard.c | 4 +- src/mame/drivers/magictg.c | 2 +- src/mame/drivers/magtouch.c | 2 +- src/mame/drivers/mainevt.c | 10 +-- src/mame/drivers/marineb.c | 6 +- src/mame/drivers/mario.c | 2 +- src/mame/drivers/mastboy.c | 2 +- src/mame/drivers/matmania.c | 8 +-- src/mame/drivers/mayumi.c | 2 +- src/mame/drivers/mazerbla.c | 22 +++--- src/mame/drivers/mcatadv.c | 8 +-- src/mame/drivers/mcr68.c | 2 +- src/mame/drivers/meadows.c | 6 +- src/mame/drivers/mediagx.c | 6 +- src/mame/drivers/megaplay.c | 4 +- src/mame/drivers/megasys1.c | 2 +- src/mame/drivers/megazone.c | 6 +- src/mame/drivers/meijinsn.c | 4 +- src/mame/drivers/mermaid.c | 4 +- src/mame/drivers/metalmx.c | 8 +-- src/mame/drivers/metlclsh.c | 14 ++-- src/mame/drivers/metro.c | 20 +++--- src/mame/drivers/mexico86.c | 6 +- src/mame/drivers/mgolf.c | 6 +- src/mame/drivers/midqslvr.c | 6 +- src/mame/drivers/midvunit.c | 2 +- src/mame/drivers/midzeus.c | 2 +- src/mame/drivers/mikie.c | 4 +- src/mame/drivers/mirax.c | 2 +- src/mame/drivers/missb2.c | 6 +- src/mame/drivers/missile.c | 10 +-- src/mame/drivers/mitchell.c | 6 +- src/mame/drivers/mjkjidai.c | 2 +- src/mame/drivers/mjsister.c | 4 +- src/mame/drivers/model1.c | 6 +- src/mame/drivers/model2.c | 26 ++++---- src/mame/drivers/mogura.c | 4 +- src/mame/drivers/moo.c | 12 ++-- src/mame/drivers/mouser.c | 12 ++-- src/mame/drivers/mrflea.c | 8 +-- src/mame/drivers/ms32.c | 6 +- src/mame/drivers/msisaac.c | 6 +- src/mame/drivers/mugsmash.c | 8 +-- src/mame/drivers/munchmo.c | 14 ++-- src/mame/drivers/mustache.c | 2 +- src/mame/drivers/mystwarr.c | 18 ++--- src/mame/drivers/n8080.c | 8 +-- src/mame/drivers/namcofl.c | 8 +-- src/mame/drivers/namcona1.c | 8 +-- src/mame/drivers/namconb1.c | 6 +- src/mame/drivers/namcos1.c | 4 +- src/mame/drivers/namcos11.c | 8 +-- src/mame/drivers/namcos21.c | 2 +- src/mame/drivers/namcos22.c | 72 ++++++++++---------- src/mame/drivers/namcos23.c | 4 +- src/mame/drivers/nemesis.c | 16 ++--- src/mame/drivers/neogeo.c | 10 +-- src/mame/drivers/nightgal.c | 16 ++--- src/mame/drivers/ninjakd2.c | 2 +- src/mame/drivers/ninjaw.c | 10 +-- src/mame/drivers/niyanpai.c | 2 +- src/mame/drivers/nmg5.c | 12 ++-- src/mame/drivers/nsmpoker.c | 2 +- src/mame/drivers/nss.c | 14 ++-- src/mame/drivers/nycaptor.c | 14 ++-- src/mame/drivers/nyny.c | 20 +++--- src/mame/drivers/ojankohs.c | 4 +- src/mame/drivers/oneshot.c | 6 +- src/mame/drivers/onetwo.c | 12 ++-- src/mame/drivers/opwolf.c | 2 +- src/mame/drivers/orbit.c | 8 +-- src/mame/drivers/othello.c | 8 +-- src/mame/drivers/othunder.c | 10 +-- src/mame/drivers/overdriv.c | 16 ++--- src/mame/drivers/pacman.c | 14 ++-- src/mame/drivers/pandoras.c | 20 +++--- src/mame/drivers/pangofun.c | 2 +- src/mame/drivers/parodius.c | 14 ++-- src/mame/drivers/pasha2.c | 2 +- src/mame/drivers/pastelg.c | 2 +- src/mame/drivers/pbaction.c | 10 +-- src/mame/drivers/pcat_dyn.c | 2 +- src/mame/drivers/pcat_nit.c | 2 +- src/mame/drivers/pcxt.c | 2 +- src/mame/drivers/pengo.c | 2 +- src/mame/drivers/pgm.c | 14 ++-- src/mame/drivers/photon.c | 4 +- src/mame/drivers/photon2.c | 4 +- src/mame/drivers/photoply.c | 2 +- src/mame/drivers/pingpong.c | 8 +-- src/mame/drivers/pipedrm.c | 8 +-- src/mame/drivers/pitnrun.c | 2 +- src/mame/drivers/pktgaldx.c | 2 +- src/mame/drivers/playch10.c | 4 +- src/mame/drivers/playmark.c | 2 +- src/mame/drivers/plygonet.c | 4 +- src/mame/drivers/pntnpuzl.c | 6 +- src/mame/drivers/polepos.c | 6 +- src/mame/drivers/policetr.c | 4 +- src/mame/drivers/polyplay.c | 4 +- src/mame/drivers/pooyan.c | 4 +- src/mame/drivers/popeye.c | 2 +- src/mame/drivers/popobear.c | 8 +-- src/mame/drivers/popper.c | 6 +- src/mame/drivers/psikyo.c | 10 +-- src/mame/drivers/psikyo4.c | 6 +- src/mame/drivers/psikyosh.c | 8 +-- src/mame/drivers/pturn.c | 4 +- src/mame/drivers/punchout.c | 2 +- src/mame/drivers/pushman.c | 10 +-- src/mame/drivers/qdrmfgp.c | 6 +- src/mame/drivers/quakeat.c | 2 +- src/mame/drivers/quasar.c | 2 +- src/mame/drivers/queen.c | 6 +- src/mame/drivers/r2dx_v33.c | 2 +- src/mame/drivers/raiden.c | 6 +- src/mame/drivers/raiden2.c | 2 +- src/mame/drivers/rainbow.c | 8 +-- src/mame/drivers/rallyx.c | 10 +-- src/mame/drivers/rastan.c | 6 +- src/mame/drivers/redalert.c | 4 +- src/mame/drivers/redclash.c | 8 +-- src/mame/drivers/renegade.c | 4 +- src/mame/drivers/retofinv.c | 4 +- src/mame/drivers/rltennis.c | 6 +- src/mame/drivers/rockrage.c | 6 +- src/mame/drivers/rocnrope.c | 2 +- src/mame/drivers/rohga.c | 6 +- src/mame/drivers/rollerg.c | 10 +-- src/mame/drivers/rollrace.c | 4 +- src/mame/drivers/rotaryf.c | 6 +- src/mame/drivers/route16.c | 2 +- src/mame/drivers/royalmah.c | 12 ++-- src/mame/drivers/rungun.c | 14 ++-- src/mame/drivers/sandscrp.c | 2 +- src/mame/drivers/saturn.c | 36 +++++----- src/mame/drivers/sauro.c | 2 +- src/mame/drivers/savquest.c | 6 +- src/mame/drivers/sbasketb.c | 4 +- src/mame/drivers/sbowling.c | 4 +- src/mame/drivers/scotrsht.c | 2 +- src/mame/drivers/scregg.c | 8 +-- src/mame/drivers/seattle.c | 10 +-- src/mame/drivers/seibuspi.c | 50 +++++++------- src/mame/drivers/seicross.c | 2 +- src/mame/drivers/sengokmj.c | 2 +- src/mame/drivers/senjyo.c | 2 +- src/mame/drivers/seta.c | 42 ++++++------ src/mame/drivers/seta2.c | 8 +-- src/mame/drivers/sf.c | 8 +-- src/mame/drivers/sfcbox.c | 8 +-- src/mame/drivers/shanghai.c | 2 +- src/mame/drivers/shaolins.c | 4 +- src/mame/drivers/sigmab98.c | 8 +-- src/mame/drivers/silvmil.c | 2 +- src/mame/drivers/simpl156.c | 12 ++-- src/mame/drivers/simpsons.c | 10 +-- src/mame/drivers/skimaxx.c | 4 +- src/mame/drivers/skyarmy.c | 2 +- src/mame/drivers/skydiver.c | 2 +- src/mame/drivers/skyfox.c | 4 +- src/mame/drivers/skykid.c | 4 +- src/mame/drivers/skylncr.c | 2 +- src/mame/drivers/slapfght.c | 2 +- src/mame/drivers/slapshot.c | 12 ++-- src/mame/drivers/sliver.c | 2 +- src/mame/drivers/snk6502.c | 4 +- src/mame/drivers/snowbros.c | 12 ++-- src/mame/drivers/solomon.c | 2 +- src/mame/drivers/sonson.c | 4 +- src/mame/drivers/spcforce.c | 2 +- src/mame/drivers/splash.c | 8 +-- src/mame/drivers/spoker.c | 2 +- src/mame/drivers/sprcros2.c | 6 +- src/mame/drivers/sprint2.c | 2 +- src/mame/drivers/spy.c | 12 ++-- src/mame/drivers/srumbler.c | 4 +- src/mame/drivers/ssfindo.c | 8 +-- src/mame/drivers/ssozumo.c | 2 +- src/mame/drivers/ssv.c | 2 +- src/mame/drivers/st0016.c | 4 +- src/mame/drivers/stactics.c | 2 +- src/mame/drivers/statriv2.c | 4 +- src/mame/drivers/strnskil.c | 2 +- src/mame/drivers/su2000.c | 2 +- src/mame/drivers/subsino2.c | 2 +- src/mame/drivers/suna16.c | 4 +- src/mame/drivers/suna8.c | 8 +-- src/mame/drivers/supbtime.c | 8 +-- src/mame/drivers/superchs.c | 4 +- src/mame/drivers/superdq.c | 2 +- src/mame/drivers/superqix.c | 4 +- src/mame/drivers/supertnk.c | 2 +- src/mame/drivers/superwng.c | 8 +-- src/mame/drivers/suprloco.c | 2 +- src/mame/drivers/suprnova.c | 36 +++++----- src/mame/drivers/suprridr.c | 2 +- src/mame/drivers/suprslam.c | 6 +- src/mame/drivers/surpratk.c | 6 +- src/mame/drivers/system1.c | 12 ++-- src/mame/drivers/system16.c | 18 ++--- src/mame/drivers/tagteam.c | 2 +- src/mame/drivers/tail2nos.c | 8 +-- src/mame/drivers/taito_b.c | 52 +++++++-------- src/mame/drivers/taito_f2.c | 14 ++-- src/mame/drivers/taito_f3.c | 2 +- src/mame/drivers/taito_h.c | 4 +- src/mame/drivers/taito_l.c | 18 ++--- src/mame/drivers/taito_o.c | 6 +- src/mame/drivers/taito_z.c | 18 ++--- src/mame/drivers/taitoair.c | 6 +- src/mame/drivers/taitojc.c | 16 ++--- src/mame/drivers/taitotz.c | 12 ++-- src/mame/drivers/taitowlf.c | 2 +- src/mame/drivers/tankbatt.c | 2 +- src/mame/drivers/tankbust.c | 2 +- src/mame/drivers/targeth.c | 6 +- src/mame/drivers/tasman.c | 4 +- src/mame/drivers/tatsumi.c | 2 +- src/mame/drivers/tceptor.c | 6 +- src/mame/drivers/tetrisp2.c | 2 +- src/mame/drivers/thedeep.c | 14 ++-- src/mame/drivers/thepit.c | 2 +- src/mame/drivers/thief.c | 4 +- src/mame/drivers/thunderx.c | 10 +-- src/mame/drivers/timelimt.c | 2 +- src/mame/drivers/timeplt.c | 4 +- src/mame/drivers/timetrv.c | 4 +- src/mame/drivers/tmaster.c | 4 +- src/mame/drivers/tmnt.c | 24 +++---- src/mame/drivers/tmspoker.c | 2 +- src/mame/drivers/tnzs.c | 4 +- src/mame/drivers/toaplan2.c | 24 +++---- src/mame/drivers/tomcat.c | 4 +- src/mame/drivers/topspeed.c | 18 ++--- src/mame/drivers/toratora.c | 6 +- src/mame/drivers/toypop.c | 6 +- src/mame/drivers/tp84.c | 2 +- src/mame/drivers/trackfld.c | 6 +- src/mame/drivers/trucocl.c | 2 +- src/mame/drivers/trvquest.c | 4 +- src/mame/drivers/tsamurai.c | 4 +- src/mame/drivers/ttchamp.c | 2 +- src/mame/drivers/tumbleb.c | 12 ++-- src/mame/drivers/tumblep.c | 8 +-- src/mame/drivers/turbo.c | 2 +- src/mame/drivers/tutankhm.c | 4 +- src/mame/drivers/twin16.c | 4 +- src/mame/drivers/twinkle.c | 8 +-- src/mame/drivers/tx1.c | 2 +- src/mame/drivers/ultraman.c | 6 +- src/mame/drivers/ultrsprt.c | 2 +- src/mame/drivers/undrfire.c | 2 +- src/mame/drivers/unkhorse.c | 4 +- src/mame/drivers/vamphalf.c | 70 ++++++++++---------- src/mame/drivers/vaportra.c | 10 +-- src/mame/drivers/vastar.c | 2 +- src/mame/drivers/vcombat.c | 8 +-- src/mame/drivers/vegas.c | 2 +- src/mame/drivers/vendetta.c | 14 ++-- src/mame/drivers/volfied.c | 6 +- src/mame/drivers/voyager.c | 2 +- src/mame/drivers/vulgus.c | 2 +- src/mame/drivers/warpwarp.c | 2 +- src/mame/drivers/warriorb.c | 6 +- src/mame/drivers/wgp.c | 18 ++--- src/mame/drivers/wheelfir.c | 8 +-- src/mame/drivers/whitestar.c | 10 +-- src/mame/drivers/wiping.c | 4 +- src/mame/drivers/witch.c | 6 +- src/mame/drivers/wiz.c | 4 +- src/mame/drivers/xexex.c | 14 ++-- src/mame/drivers/xmen.c | 6 +- src/mame/drivers/xtom3d.c | 6 +- src/mame/drivers/xxmissio.c | 4 +- src/mame/drivers/yiear.c | 4 +- src/mame/drivers/yunsun16.c | 6 +- src/mame/drivers/yunsung8.c | 4 +- src/mame/drivers/zac_1.c | 6 +- src/mame/drivers/zaccaria.c | 2 +- src/mame/drivers/zaxxon.c | 2 +- src/mame/drivers/zerozone.c | 2 +- src/mame/drivers/zn.c | 2 +- src/mame/drivers/zodiack.c | 2 +- src/mame/drivers/zr107.c | 2 +- src/mame/includes/1942.h | 2 +- src/mame/includes/20pacgal.h | 2 +- src/mame/includes/40love.h | 2 +- src/mame/includes/88games.h | 2 +- src/mame/includes/actfancr.h | 4 +- src/mame/includes/aerofgt.h | 2 +- src/mame/includes/airbustr.h | 2 +- src/mame/includes/ajax.h | 6 +- src/mame/includes/aliens.h | 4 +- src/mame/includes/alpha68k.h | 2 +- src/mame/includes/amspdwy.h | 2 +- src/mame/includes/angelkds.h | 2 +- src/mame/includes/aquarium.h | 2 +- src/mame/includes/ashnojoe.h | 2 +- src/mame/includes/asterix.h | 4 +- src/mame/includes/astrof.h | 2 +- src/mame/includes/asuka.h | 4 +- src/mame/includes/atarifb.h | 2 +- src/mame/includes/battlane.h | 4 +- src/mame/includes/battlnts.h | 2 +- src/mame/includes/beezer.h | 2 +- src/mame/includes/bigevglf.h | 2 +- src/mame/includes/bishi.h | 4 +- src/mame/includes/bking.h | 2 +- src/mame/includes/bladestl.h | 2 +- src/mame/includes/blktiger.h | 2 +- src/mame/includes/blockhl.h | 4 +- src/mame/includes/blockout.h | 4 +- src/mame/includes/blueprnt.h | 2 +- src/mame/includes/bottom9.h | 4 +- src/mame/includes/brkthru.h | 4 +- src/mame/includes/btime.h | 4 +- src/mame/includes/bublbobl.h | 4 +- src/mame/includes/buggychl.h | 2 +- src/mame/includes/bwing.h | 6 +- src/mame/includes/capbowl.h | 4 +- src/mame/includes/cave.h | 4 +- src/mame/includes/cbuster.h | 4 +- src/mame/includes/champbas.h | 4 +- src/mame/includes/cheekyms.h | 2 +- src/mame/includes/chqflag.h | 4 +- src/mame/includes/circus.h | 2 +- src/mame/includes/citycon.h | 2 +- src/mame/includes/commando.h | 2 +- src/mame/includes/contra.h | 2 +- src/mame/includes/coolpool.h | 2 +- src/mame/includes/cps1.h | 4 +- src/mame/includes/crgolf.h | 4 +- src/mame/includes/crimfght.h | 4 +- src/mame/includes/crospang.h | 2 +- src/mame/includes/cvs.h | 4 +- src/mame/includes/darius.h | 4 +- src/mame/includes/dbz.h | 4 +- src/mame/includes/dcheese.h | 4 +- src/mame/includes/ddragon.h | 2 +- src/mame/includes/ddragon3.h | 4 +- src/mame/includes/dec8.h | 6 +- src/mame/includes/dietgo.h | 4 +- src/mame/includes/djboy.h | 2 +- src/mame/includes/dogfgt.h | 2 +- src/mame/includes/dynax.h | 4 +- src/mame/includes/espial.h | 4 +- src/mame/includes/exerion.h | 2 +- src/mame/includes/exprraid.h | 2 +- src/mame/includes/f1gp.h | 2 +- src/mame/includes/fcombat.h | 2 +- src/mame/includes/fgoal.h | 2 +- src/mame/includes/firetrap.h | 4 +- src/mame/includes/flkatck.h | 2 +- src/mame/includes/flstory.h | 4 +- src/mame/includes/fromanc2.h | 4 +- src/mame/includes/fromance.h | 2 +- src/mame/includes/funkyjet.h | 4 +- src/mame/includes/funybubl.h | 2 +- src/mame/includes/fuukifg2.h | 4 +- src/mame/includes/fuukifg3.h | 4 +- src/mame/includes/gaelco.h | 2 +- src/mame/includes/gaiden.h | 2 +- src/mame/includes/galspnbl.h | 2 +- src/mame/includes/gameplan.h | 4 +- src/mame/includes/gbusters.h | 4 +- src/mame/includes/gijoe.h | 4 +- src/mame/includes/ginganin.h | 2 +- src/mame/includes/goal92.h | 2 +- src/mame/includes/gotcha.h | 2 +- src/mame/includes/gradius3.h | 6 +- src/mame/includes/hcastle.h | 2 +- src/mame/includes/himesiki.h | 2 +- src/mame/includes/homedata.h | 4 +- src/mame/includes/hyprduel.h | 4 +- src/mame/includes/inufuku.h | 2 +- src/mame/includes/ironhors.h | 4 +- src/mame/includes/jackal.h | 4 +- src/mame/includes/karnov.h | 4 +- src/mame/includes/kchamp.h | 2 +- src/mame/includes/kncljoe.h | 2 +- src/mame/includes/kopunch.h | 2 +- src/mame/includes/kyugo.h | 4 +- src/mame/includes/ladybug.h | 2 +- src/mame/includes/ladyfrog.h | 2 +- src/mame/includes/lasso.h | 4 +- src/mame/includes/lemmings.h | 2 +- src/mame/includes/lethal.h | 4 +- src/mame/includes/liberate.h | 4 +- src/mame/includes/lkage.h | 4 +- src/mame/includes/lockon.h | 4 +- src/mame/includes/lsasquad.h | 4 +- src/mame/includes/m10.h | 2 +- src/mame/includes/macrossp.h | 4 +- src/mame/includes/madmotor.h | 4 +- src/mame/includes/mainevt.h | 4 +- src/mame/includes/marineb.h | 4 +- src/mame/includes/matmania.h | 4 +- src/mame/includes/mcatadv.h | 4 +- src/mame/includes/mermaid.h | 2 +- src/mame/includes/metlclsh.h | 4 +- src/mame/includes/mexico86.h | 6 +- src/mame/includes/moo.h | 4 +- src/mame/includes/mouser.h | 4 +- src/mame/includes/mrflea.h | 4 +- src/mame/includes/msisaac.h | 2 +- src/mame/includes/mugsmash.h | 4 +- src/mame/includes/munchmo.h | 4 +- src/mame/includes/n8080.h | 2 +- src/mame/includes/neogeo.h | 4 +- src/mame/includes/ninjaw.h | 6 +- src/mame/includes/nitedrvr.h | 2 +- src/mame/includes/nycaptor.h | 6 +- src/mame/includes/ojankohs.h | 2 +- src/mame/includes/oneshot.h | 4 +- src/mame/includes/orbit.h | 2 +- src/mame/includes/othunder.h | 4 +- src/mame/includes/overdriv.h | 6 +- src/mame/includes/parodius.h | 4 +- src/mame/includes/pbaction.h | 4 +- src/mame/includes/pktgaldx.h | 2 +- src/mame/includes/popper.h | 2 +- src/mame/includes/psikyo.h | 2 +- src/mame/includes/psikyo4.h | 2 +- src/mame/includes/psikyosh.h | 2 +- src/mame/includes/pushman.h | 4 +- src/mame/includes/rainbow.h | 4 +- src/mame/includes/rastan.h | 4 +- src/mame/includes/rltennis.h | 2 +- src/mame/includes/rockrage.h | 2 +- src/mame/includes/rollerg.h | 4 +- src/mame/includes/rungun.h | 4 +- src/mame/includes/sf.h | 4 +- src/mame/includes/simpsons.h | 4 +- src/mame/includes/skyfox.h | 2 +- src/mame/includes/slapshot.h | 4 +- src/mame/includes/sonson.h | 2 +- src/mame/includes/spy.h | 4 +- src/mame/includes/supbtime.h | 4 +- src/mame/includes/suprslam.h | 2 +- src/mame/includes/surpratk.h | 2 +- src/mame/includes/system16.h | 4 +- src/mame/includes/tail2nos.h | 4 +- src/mame/includes/taito_b.h | 4 +- src/mame/includes/taito_f2.h | 4 +- src/mame/includes/taito_h.h | 4 +- src/mame/includes/taito_l.h | 4 +- src/mame/includes/taito_o.h | 2 +- src/mame/includes/taito_z.h | 6 +- src/mame/includes/taitoair.h | 2 +- src/mame/includes/thunderx.h | 4 +- src/mame/includes/tmnt.h | 4 +- src/mame/includes/tnzs.h | 4 +- src/mame/includes/topspeed.h | 6 +- src/mame/includes/tumbleb.h | 4 +- src/mame/includes/tumblep.h | 4 +- src/mame/includes/ultraman.h | 4 +- src/mame/includes/vaportra.h | 4 +- src/mame/includes/vendetta.h | 4 +- src/mame/includes/volfied.h | 4 +- src/mame/includes/warriorb.h | 4 +- src/mame/includes/wgp.h | 6 +- src/mame/includes/xexex.h | 4 +- src/mame/includes/xmen.h | 4 +- src/mame/includes/yunsun16.h | 2 +- src/mame/includes/yunsung8.h | 2 +- src/mame/machine/ajax.c | 12 ++-- src/mame/machine/amiga.c | 2 +- src/mame/machine/asic65.c | 8 +-- src/mame/machine/asteroid.c | 6 +- src/mame/machine/atarigen.c | 16 ++--- src/mame/machine/bigevglf.c | 4 +- src/mame/machine/bublbobl.c | 22 +++--- src/mame/machine/buggychl.c | 4 +- src/mame/machine/cdi070.c | 6 +- src/mame/machine/cdicdic.c | 12 ++-- src/mame/machine/cdislave.c | 2 +- src/mame/machine/dec0.c | 2 +- src/mame/machine/decocass.c | 22 +++--- src/mame/machine/decocass.h | 4 +- src/mame/machine/docastle.c | 4 +- src/mame/machine/fd1094.c | 2 +- src/mame/machine/flstory.c | 4 +- src/mame/machine/gaelco2.c | 4 +- src/mame/machine/galaxold.c | 6 +- src/mame/machine/harddriv.c | 82 +++++++++++------------ src/mame/machine/konppc.c | 8 +-- src/mame/machine/leland.c | 2 +- src/mame/machine/lkage.c | 4 +- src/mame/machine/lsasquad.c | 8 +-- src/mame/machine/mega32x.c | 40 +++++------ src/mame/machine/megacd.c | 6 +- src/mame/machine/megadriv.c | 6 +- src/mame/machine/megasvp.c | 2 +- src/mame/machine/megavdp.c | 2 +- src/mame/machine/mexico86.c | 16 ++--- src/mame/machine/midwunit.c | 2 +- src/mame/machine/model1.c | 4 +- src/mame/machine/mw8080bw.c | 2 +- src/mame/machine/n64.c | 12 ++-- src/mame/machine/namco06.c | 2 +- src/mame/machine/namco50.c | 4 +- src/mame/machine/namco53.c | 4 +- src/mame/machine/namcos2.c | 26 ++++---- src/mame/machine/naomi.c | 22 +++--- src/mame/machine/nb1413m3.c | 2 +- src/mame/machine/nitedrvr.c | 2 +- src/mame/machine/nycaptor.c | 4 +- src/mame/machine/pgmprot2.c | 10 +-- src/mame/machine/pgmprot3.c | 6 +- src/mame/machine/playch10.c | 2 +- src/mame/machine/scudsp.c | 2 +- src/mame/machine/simpsons.c | 6 +- src/mame/machine/slapfght.c | 2 +- src/mame/machine/smpc.c | 22 +++--- src/mame/machine/snes.c | 16 ++--- src/mame/machine/stfight.c | 2 +- src/mame/machine/subs.c | 2 +- src/mame/machine/tnzs.c | 14 ++-- src/mame/machine/toaplan1.c | 4 +- src/mame/machine/twincobr.c | 4 +- src/mame/machine/vsnes.c | 2 +- src/mame/machine/xevious.c | 2 +- src/mame/video/1942.c | 2 +- src/mame/video/antic.c | 4 +- src/mame/video/arkanoid.c | 2 +- src/mame/video/astrocde.c | 2 +- src/mame/video/atari.c | 2 +- src/mame/video/battlera.c | 4 +- src/mame/video/beezer.c | 4 +- src/mame/video/bfm_adr2.c | 2 +- src/mame/video/bfm_dm01.c | 2 +- src/mame/video/blktiger.c | 2 +- src/mame/video/blockade.c | 2 +- src/mame/video/capbowl.c | 2 +- src/mame/video/circus.c | 2 +- src/mame/video/commando.c | 2 +- src/mame/video/dec8.c | 4 +- src/mame/video/decocass.c | 2 +- src/mame/video/exidy.c | 2 +- src/mame/video/fromance.c | 2 +- src/mame/video/gameplan.c | 2 +- src/mame/video/ginganin.c | 2 +- src/mame/video/gticlub.c | 4 +- src/mame/video/homedata.c | 6 +- src/mame/video/konicdev.c | 16 ++--- src/mame/video/liberate.c | 12 ++-- src/mame/video/lockon.c | 8 +-- src/mame/video/mcd212.c | 8 +-- src/mame/video/nemesis.c | 4 +- src/mame/video/ppu2c0x.c | 2 +- src/mame/video/rltennis.c | 2 +- src/mame/video/spdodgeb.c | 4 +- src/mame/video/system1.c | 2 +- src/mame/video/taito_z.c | 2 +- src/mame/video/tia.c | 2 +- src/mame/video/tmnt.c | 6 +- src/mame/video/williams.c | 2 +- src/mame/video/zaxxon.c | 2 +- src/mess/drivers/abc1600.c | 2 +- src/mess/drivers/adam.c | 6 +- src/mess/drivers/alphatro.c | 2 +- src/mess/drivers/apollo.c | 2 +- src/mess/drivers/apple2.c | 4 +- src/mess/drivers/apple2gs.c | 2 +- src/mess/drivers/apricot.c | 2 +- src/mess/drivers/apricotp.c | 2 +- src/mess/drivers/atarist.c | 6 +- src/mess/drivers/avigo.c | 4 +- src/mess/drivers/bml3.c | 6 +- src/mess/drivers/bw2.c | 4 +- src/mess/drivers/cat.c | 2 +- src/mess/drivers/cxhumax.c | 12 ++-- src/mess/drivers/d6800.c | 2 +- src/mess/drivers/dc.c | 4 +- src/mess/drivers/dmv.c | 2 +- src/mess/drivers/eacc.c | 6 +- src/mess/drivers/elwro800.c | 2 +- src/mess/drivers/enterp.c | 2 +- src/mess/drivers/esq5505.c | 12 ++-- src/mess/drivers/exelv.c | 2 +- src/mess/drivers/fidelz80.c | 6 +- src/mess/drivers/fk1.c | 2 +- src/mess/drivers/fm7.c | 4 +- src/mess/drivers/fmtowns.c | 10 +-- src/mess/drivers/gba.c | 6 +- src/mess/drivers/geneve.c | 4 +- src/mess/drivers/gp32.c | 6 +- src/mess/drivers/h8.c | 6 +- src/mess/drivers/h89.c | 2 +- src/mess/drivers/homelab.c | 4 +- src/mess/drivers/homez80.c | 2 +- src/mess/drivers/iq151.c | 4 +- src/mess/drivers/jr200.c | 2 +- src/mess/drivers/kyocera.c | 2 +- src/mess/drivers/m20.c | 10 +-- src/mess/drivers/m5.c | 4 +- src/mess/drivers/mac.c | 24 +++---- src/mess/drivers/micronic.c | 2 +- src/mess/drivers/mikromik.c | 2 +- src/mess/drivers/mirage.c | 4 +- src/mess/drivers/mk1.c | 2 +- src/mess/drivers/mod8.c | 2 +- src/mess/drivers/mstation.c | 4 +- src/mess/drivers/multi16.c | 2 +- src/mess/drivers/mz2500.c | 2 +- src/mess/drivers/nakajies.c | 4 +- src/mess/drivers/ng_aes.c | 10 +-- src/mess/drivers/ngp.c | 26 ++++---- src/mess/drivers/ondra.c | 2 +- src/mess/drivers/osbexec.c | 4 +- src/mess/drivers/paso1600.c | 2 +- src/mess/drivers/pasogo.c | 2 +- src/mess/drivers/pc100.c | 2 +- src/mess/drivers/pc1512.c | 4 +- src/mess/drivers/pc6001.c | 12 ++-- src/mess/drivers/pc8801.c | 8 +-- src/mess/drivers/pc88va.c | 4 +- src/mess/drivers/pc9801.c | 4 +- src/mess/drivers/pce220.c | 6 +- src/mess/drivers/pcfx.c | 4 +- src/mess/drivers/pcw.c | 2 +- src/mess/drivers/pdp1.c | 2 +- src/mess/drivers/pegasus.c | 2 +- src/mess/drivers/pk8000.c | 4 +- src/mess/drivers/pockstat.c | 8 +-- src/mess/drivers/portfoli.c | 4 +- src/mess/drivers/prestige.c | 4 +- src/mess/drivers/pv1000.c | 4 +- src/mess/drivers/pv2000.c | 2 +- src/mess/drivers/pyl601.c | 2 +- src/mess/drivers/ql.c | 10 +-- src/mess/drivers/qx10.c | 2 +- src/mess/drivers/rainbow.c | 22 +++--- src/mess/drivers/rex6000.c | 12 ++-- src/mess/drivers/samcoupe.c | 2 +- src/mess/drivers/sm1800.c | 2 +- src/mess/drivers/smc777.c | 2 +- src/mess/drivers/socrates.c | 4 +- src/mess/drivers/spectrum.c | 2 +- src/mess/drivers/supracan.c | 28 ++++---- src/mess/drivers/svision.c | 2 +- src/mess/drivers/tandy2k.c | 4 +- src/mess/drivers/tek405x.c | 4 +- src/mess/drivers/ti99_2.c | 2 +- src/mess/drivers/ti99_4p.c | 2 +- src/mess/drivers/trs80m2.c | 2 +- src/mess/drivers/tsispch.c | 2 +- src/mess/drivers/tvc.c | 4 +- src/mess/drivers/v1050.c | 14 ++-- src/mess/drivers/vboy.c | 10 +-- src/mess/drivers/victor9k.c | 4 +- src/mess/drivers/vidbrain.c | 2 +- src/mess/drivers/vixen.c | 4 +- src/mess/drivers/vk100.c | 10 +-- src/mess/drivers/vt100.c | 4 +- src/mess/drivers/vt240.c | 2 +- src/mess/drivers/wangpc.c | 2 +- src/mess/drivers/x07.c | 14 ++-- src/mess/drivers/x1.c | 10 +-- src/mess/drivers/x1twin.c | 4 +- src/mess/drivers/x68k.c | 2 +- src/mess/drivers/xerox820.c | 8 +-- src/mess/drivers/xor100.c | 6 +- src/mess/drivers/z100.c | 2 +- src/mess/includes/fmtowns.h | 2 +- src/mess/includes/nes.h | 2 +- src/mess/includes/pc.h | 2 +- src/mess/machine/a2bus.c | 2 +- src/mess/machine/a2bus.h | 2 +- src/mess/machine/a2eauxslot.c | 2 +- src/mess/machine/a2eauxslot.h | 2 +- src/mess/machine/a2softcard.c | 10 +-- src/mess/machine/a2themill.c | 22 +++--- src/mess/machine/abc77.c | 8 +-- src/mess/machine/abc99.c | 14 ++-- src/mess/machine/advision.c | 8 +-- src/mess/machine/amigacrt.c | 2 +- src/mess/machine/amstrad.c | 8 +-- src/mess/machine/at.c | 4 +- src/mess/machine/b2m.c | 2 +- src/mess/machine/bbc.c | 2 +- src/mess/machine/bk.c | 4 +- src/mess/machine/c64_cpm.c | 8 +-- src/mess/machine/compis.c | 8 +-- src/mess/machine/cuda.c | 32 ++++----- src/mess/machine/dec_lk201.c | 14 ++-- src/mess/machine/dgn_beta.c | 6 +- src/mess/machine/ecbbus.c | 2 +- src/mess/machine/ecbbus.h | 2 +- src/mess/machine/egret.c | 10 +-- src/mess/machine/galaxy.c | 10 +-- src/mess/machine/genpc.c | 4 +- src/mess/machine/hd63450.c | 4 +- src/mess/machine/i82371ab.c | 2 +- src/mess/machine/i82371sb.c | 2 +- src/mess/machine/intv.c | 18 ++--- src/mess/machine/isa.c | 88 ++++++++++++------------ src/mess/machine/isa.h | 2 +- src/mess/machine/kb_keytro.c | 4 +- src/mess/machine/kc_d004.c | 10 +-- src/mess/machine/lisa.c | 2 +- src/mess/machine/mac.c | 4 +- src/mess/machine/macpci.c | 4 +- src/mess/machine/mbc55x.c | 2 +- src/mess/machine/mboard.c | 6 +- src/mess/machine/mc68328.c | 28 ++++---- src/mess/machine/mc80.c | 4 +- src/mess/machine/mpc105.c | 4 +- src/mess/machine/mpc105.h | 2 +- src/mess/machine/msx.c | 2 +- src/mess/machine/nes.c | 8 +-- src/mess/machine/nes_ines.c | 2 +- src/mess/machine/nes_pcb.c | 46 ++++++------- src/mess/machine/nubus.c | 46 ++++++------- src/mess/machine/nubus.h | 2 +- src/mess/machine/orion.c | 2 +- src/mess/machine/pc.c | 20 +++--- src/mess/machine/pc1512kb.c | 6 +- src/mess/machine/pet.c | 14 ++-- src/mess/machine/pk8020.c | 2 +- src/mess/machine/poly88.c | 8 +-- src/mess/machine/primo.c | 2 +- src/mess/machine/rmnimbus.c | 4 +- src/mess/machine/s100.c | 2 +- src/mess/machine/s100.h | 2 +- src/mess/machine/sms.c | 2 +- src/mess/machine/southbridge.c | 4 +- src/mess/machine/svi318.c | 2 +- src/mess/machine/tf20.c | 2 +- src/mess/machine/ti85.c | 10 +-- src/mess/machine/ti99/spchsyn.c | 6 +- src/mess/machine/ti99/speech8.c | 6 +- src/mess/machine/trs80.c | 4 +- src/mess/machine/vector06.c | 4 +- src/mess/machine/x68k_neptunex.c | 2 +- src/mess/machine/zx.c | 2 +- src/mess/video/a7800.c | 4 +- src/mess/video/atarist.c | 4 +- src/mess/video/mac.c | 12 ++-- src/mess/video/mos6566.c | 6 +- src/mess/video/v1050.c | 2 +- src/mess/video/vic6567.c | 6 +- src/mess/video/zx8301.c | 4 +- 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 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("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_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("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(); - 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("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("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("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("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( machine.device("maincpu") ); + state->m_maincpu = downcast( machine.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(); 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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("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(); - 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(); // 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(); // 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); 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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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("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(); 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("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); 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(); 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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_subcpu = machine.device("sub"); + state->m_subcpu = machine.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(); 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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - 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(); /* 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(); - 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("maincpu"); state->m_samples = machine.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("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("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(); - 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(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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); 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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.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(); 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(); 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("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(); create_interrupt_timer(machine); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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("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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); 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("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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<m_irqreq &= ~(1<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(); 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(); 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(); - 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(); 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(); 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("maincpu"); + state->m_audiocpu = machine.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(); 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); 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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_mcu = machine.device("mcu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); 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("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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("sub"); + state->m_audiocpu = machine.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(); 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(); - 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); 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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_dac = machine.device("dac"); } @@ -121,7 +121,7 @@ static INTERRUPT_GEN( vblank_irq ) cheekyms_state *state = device->machine().driver_data(); 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - 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("maincpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_samples = machine.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(); 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - 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(); - 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(); - 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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("subcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); 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("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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - 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(); 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("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); int i; - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_ds1302 = machine.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(); 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(); 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("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_speech = machine.device("speech"); state->m_dac3 = machine.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(); 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(); - 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(); 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(); - 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("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); 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(); 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); - state->m_soundcpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_soundcpu = machine.device("soundcpu"); state->m_oki = machine.device("oki"); state->save_item(NAME(state->m_input_sel)); @@ -8608,14 +8608,14 @@ static INTERRUPT_GEN( quizchq_irq ) // if (downcast(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(); - 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(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(); - 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(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(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(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(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(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(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(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(); 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(); 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("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(); - 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); 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(); 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(); - 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(); 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(); - 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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("sub"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); } static MACHINE_CONFIG_START( diverboy, diverboy_state ) diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c index 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("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(); 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(); - state->m_subcpu = machine.device("sub"); + state->m_subcpu = machine.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(); 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(); 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(); 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(); 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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_soundcpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_soundcpu = machine.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(); 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(); 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 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); create_interrupt_timers(machine); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); - 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("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(); 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(); - 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(); 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(); 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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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("maincpu"); + state->m_audiocpu = machine.device("soundcpu"); state->m_msm_1 = machine.device("msm1"); state->m_msm_2 = machine.device("msm2"); @@ -712,8 +712,8 @@ static MACHINE_START( kodb ) { cps_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); 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("maincpu"); + state->m_audiocpu = machine.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(); 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("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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.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(); 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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("sub"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.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("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(); - 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); UINT8 *ROM = state->memregion("maincpu")->base(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); - 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(); - 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(); - 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("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - 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(); - 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("maincpu"); + state->m_audiocpu = machine.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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - 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(); 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(); 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(); 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(); 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(); 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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); 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("maincpu"); + state->m_audiocpu = machine.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(); - 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(device)->cycles_to_attotime(500), FUNC(gcpinbal_interrupt1)); // device->machine().scheduler().timer_set(downcast(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(); 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(); 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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("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(); - //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("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(); 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(); - 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); /* 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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.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(); 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(); 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(); 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(); 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(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(); 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(); 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("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("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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_ym = machine.device("ymsnd"); state->m_sn = machine.device("snsnd"); state->m_dac = machine.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(); 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(); 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(); - 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(); - 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.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(); 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(); - 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(); - 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(); - state->m_slavecpu = machine.device("slave"); + state->m_slavecpu = machine.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(); - 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("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(); - state->m_maincpu = machine.device("maincpu"); - state->m_soundcpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_soundcpu = machine.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()->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("master"); + state->m_slavecpu = machine.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(); 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(); 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(); 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(); 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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 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(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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(); 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(); - 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(); 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(); 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(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.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(); 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(); - state->m_soundcpu = machine.device("soundcpu"); + state->m_soundcpu = machine.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(konamigx_hbinterrupt) if ((konamigx_wrport1_1 & 0x82) == 0x82 || (gx_syncen & 2)) { gx_syncen &= ~2; - 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/konamim2.c b/src/mame/drivers/konamim2.c index 6b3d3d06c92..5ad216d2eb1 100644 --- a/src/mame/drivers/konamim2.c +++ b/src/mame/drivers/konamim2.c @@ -1162,7 +1162,7 @@ static INTERRUPT_GEN(m2) state->m_irq_active |= 0x8; }*/ - device_set_input_line(device, INPUT_LINE_IRQ0, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } static MACHINE_CONFIG_START( m2, konamim2_state ) diff --git a/src/mame/drivers/kontest.c b/src/mame/drivers/kontest.c index ead408ef830..342461e0b51 100644 --- a/src/mame/drivers/kontest.c +++ b/src/mame/drivers/kontest.c @@ -154,7 +154,7 @@ WRITE8_MEMBER(kontest_state::control_w) // other bits: ? m_control = data; - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); } static ADDRESS_MAP_START( kontest_map, AS_PROGRAM, 8, kontest_state ) @@ -243,7 +243,7 @@ static INTERRUPT_GEN( kontest_interrupt ) { kontest_state *state = device->machine().driver_data(); if (state->m_control & 8) - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } void kontest_state::machine_start() diff --git a/src/mame/drivers/kopunch.c b/src/mame/drivers/kopunch.c index b9e4a889192..1379d1ab848 100644 --- a/src/mame/drivers/kopunch.c +++ b/src/mame/drivers/kopunch.c @@ -10,8 +10,8 @@ static INTERRUPT_GEN( kopunch_interrupt ) { - device_set_input_line(device, I8085_RST75_LINE, ASSERT_LINE); - device_set_input_line(device, I8085_RST75_LINE, CLEAR_LINE); + device->execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE); + device->execute().set_input_line(I8085_RST75_LINE, CLEAR_LINE); } READ8_MEMBER(kopunch_state::kopunch_in_r) @@ -73,7 +73,7 @@ INPUT_CHANGED_MEMBER(kopunch_state::left_coin_inserted) /* left coin insertion causes a rst6.5 (vector 0x34) */ if (newval) - device_set_input_line(m_maincpu, I8085_RST65_LINE, HOLD_LINE); + m_maincpu->set_input_line(I8085_RST65_LINE, HOLD_LINE); } INPUT_CHANGED_MEMBER(kopunch_state::right_coin_inserted) @@ -81,7 +81,7 @@ INPUT_CHANGED_MEMBER(kopunch_state::right_coin_inserted) /* right coin insertion causes a rst5.5 (vector 0x2c) */ if (newval) - device_set_input_line(m_maincpu, I8085_RST55_LINE, HOLD_LINE); + m_maincpu->set_input_line(I8085_RST55_LINE, HOLD_LINE); } static INPUT_PORTS_START( kopunch ) @@ -173,7 +173,7 @@ static MACHINE_START( kopunch ) { kopunch_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->save_item(NAME(state->m_gfxbank)); } diff --git a/src/mame/drivers/kungfur.c b/src/mame/drivers/kungfur.c index e64e616d60f..c0293c52d5a 100644 --- a/src/mame/drivers/kungfur.c +++ b/src/mame/drivers/kungfur.c @@ -88,7 +88,7 @@ static INTERRUPT_GEN( kungfur_irq ) { kungfur_state *state = device->machine().driver_data(); if (state->m_control & 0x10) - device_set_input_line(device, M6809_IRQ_LINE, ASSERT_LINE); + device->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } diff --git a/src/mame/drivers/kyugo.c b/src/mame/drivers/kyugo.c index 11809a5255c..09b15102794 100644 --- a/src/mame/drivers/kyugo.c +++ b/src/mame/drivers/kyugo.c @@ -62,7 +62,7 @@ WRITE8_MEMBER(kyugo_state::kyugo_nmi_mask_w) WRITE8_MEMBER(kyugo_state::kyugo_sub_cpu_control_w) { - device_set_input_line(m_subcpu, INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE); + m_subcpu->set_input_line(INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE); } static ADDRESS_MAP_START( kyugo_main_portmap, AS_IO, 8, kyugo_state ) @@ -498,8 +498,8 @@ static MACHINE_START( kyugo ) { kyugo_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("sub"); state->save_item(NAME(state->m_scroll_x_lo)); state->save_item(NAME(state->m_scroll_x_hi)); @@ -530,7 +530,7 @@ static INTERRUPT_GEN( vblank_irq ) kyugo_state *state = device->machine().driver_data(); 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/labyrunr.c b/src/mame/drivers/labyrunr.c index db64f70d1a5..c190d59bfe8 100644 --- a/src/mame/drivers/labyrunr.c +++ b/src/mame/drivers/labyrunr.c @@ -20,14 +20,14 @@ static INTERRUPT_GEN( labyrunr_vblank_interrupt ) { labyrunr_state *state = device->machine().driver_data(); if (k007121_ctrlram_r(state->m_k007121, 7) & 0x02) - device_set_input_line(device, HD6309_IRQ_LINE, HOLD_LINE); + device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); } static INTERRUPT_GEN( labyrunr_timer_interrupt ) { labyrunr_state *state = device->machine().driver_data(); if (k007121_ctrlram_r(state->m_k007121, 7) & 0x01) - 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/ladybug.c b/src/mame/drivers/ladybug.c index c52c5d62503..d09ff30b9d1 100644 --- a/src/mame/drivers/ladybug.c +++ b/src/mame/drivers/ladybug.c @@ -186,7 +186,7 @@ INPUT_CHANGED_MEMBER(ladybug_state::coin1_inserted) { /* left 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); } INPUT_CHANGED_MEMBER(ladybug_state::coin2_inserted) @@ -194,7 +194,7 @@ INPUT_CHANGED_MEMBER(ladybug_state::coin2_inserted) /* right coin insertion causes an IRQ */ if (newval) - device_set_input_line(m_maincpu, 0, HOLD_LINE); + m_maincpu->set_input_line(0, HOLD_LINE); } @@ -729,14 +729,14 @@ static const sn76496_config psg_intf = static MACHINE_START( ladybug ) { ladybug_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); } static MACHINE_START( sraider ) { ladybug_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->save_item(NAME(state->m_grid_color)); state->save_item(NAME(state->m_sound_low)); diff --git a/src/mame/drivers/ladyfrog.c b/src/mame/drivers/ladyfrog.c index 58fb53a20f4..14cbaa701c1 100644 --- a/src/mame/drivers/ladyfrog.c +++ b/src/mame/drivers/ladyfrog.c @@ -67,7 +67,7 @@ WRITE8_MEMBER(ladyfrog_state::to_main_w) WRITE8_MEMBER(ladyfrog_state::sound_cpu_reset_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_RESET, (data & 1 ) ? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 1 ) ? ASSERT_LINE : CLEAR_LINE); } static TIMER_CALLBACK( nmi_callback ) @@ -75,7 +75,7 @@ static TIMER_CALLBACK( nmi_callback ) ladyfrog_state *state = machine.driver_data(); 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; } @@ -97,7 +97,7 @@ WRITE8_MEMBER(ladyfrog_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; } } @@ -280,7 +280,7 @@ static MACHINE_START( ladyfrog ) { ladyfrog_state *state = machine.driver_data(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_tilebank)); state->save_item(NAME(state->m_palette_bank)); diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c index 3a2b2cb7a6f..f609b29b637 100644 --- a/src/mame/drivers/laserbat.c +++ b/src/mame/drivers/laserbat.c @@ -572,12 +572,12 @@ static const sn76477_interface laserbat_sn76477_interface = WRITE_LINE_MEMBER(laserbat_state::zaccaria_irq0a) { - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); } WRITE_LINE_MEMBER(laserbat_state::zaccaria_irq0b) { - device_set_input_line(m_audiocpu, 0, state ? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); } READ8_MEMBER(laserbat_state::zaccaria_port0a_r) @@ -650,7 +650,7 @@ static const ay8910_interface ay8910_config = static INTERRUPT_GEN( laserbat_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x0a); + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x0a); } static INTERRUPT_GEN( zaccaria_cb1_toggle ) diff --git a/src/mame/drivers/lasso.c b/src/mame/drivers/lasso.c index 7f8126bb4b2..834a7787c98 100644 --- a/src/mame/drivers/lasso.c +++ b/src/mame/drivers/lasso.c @@ -40,7 +40,7 @@ INPUT_CHANGED_MEMBER(lasso_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); } @@ -48,13 +48,13 @@ INPUT_CHANGED_MEMBER(lasso_state::coin_inserted) WRITE8_MEMBER(lasso_state::sound_command_w) { soundlatch_byte_w(space, offset, data); - generic_pulse_irq_line(m_audiocpu->execute(), 0, 1); + generic_pulse_irq_line(*m_audiocpu, 0, 1); } WRITE8_MEMBER(lasso_state::pinbo_sound_command_w) { soundlatch_byte_w(space, offset, data); - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); } READ8_MEMBER(lasso_state::sound_status_r) @@ -479,8 +479,8 @@ static MACHINE_START( lasso ) { lasso_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_gfxbank)); } diff --git a/src/mame/drivers/lastbank.c b/src/mame/drivers/lastbank.c index d717b933deb..c77cd1bc136 100644 --- a/src/mame/drivers/lastbank.c +++ b/src/mame/drivers/lastbank.c @@ -440,12 +440,12 @@ static TIMER_DEVICE_CALLBACK( lastbank_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]); } } diff --git a/src/mame/drivers/lastduel.c b/src/mame/drivers/lastduel.c index dff06320ff3..4e3b69e3bed 100644 --- a/src/mame/drivers/lastduel.c +++ b/src/mame/drivers/lastduel.c @@ -442,7 +442,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { lastduel_state *state = device->machine().driver_data(); - 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 = @@ -459,14 +459,14 @@ static TIMER_DEVICE_CALLBACK( lastduel_timer_cb ) { lastduel_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); /* Controls */ + state->m_maincpu->set_input_line(4, HOLD_LINE); /* Controls */ } static TIMER_DEVICE_CALLBACK( madgear_timer_cb ) { lastduel_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); /* Controls */ + state->m_maincpu->set_input_line(6, HOLD_LINE); /* Controls */ } static MACHINE_START( lastduel ) diff --git a/src/mame/drivers/lastfght.c b/src/mame/drivers/lastfght.c index 004d159cd8a..f6796534180 100644 --- a/src/mame/drivers/lastfght.c +++ b/src/mame/drivers/lastfght.c @@ -529,7 +529,7 @@ static INTERRUPT_GEN( unknown_interrupt ) { lastfght_state *state = device->machine().driver_data(); - device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE); + state->m_maincpu->set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); } static MACHINE_START( lastfght ) diff --git a/src/mame/drivers/lazercmd.c b/src/mame/drivers/lazercmd.c index 9b5cc58adf8..4969c79c19c 100644 --- a/src/mame/drivers/lazercmd.c +++ b/src/mame/drivers/lazercmd.c @@ -248,7 +248,7 @@ static TIMER_DEVICE_CALLBACK( lazercmd_timer ) { state->m_timer_count = 0; state->m_sense_state ^= 1; - device_set_input_line(state->m_maincpu, 1, (state->m_sense_state) ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(1, (state->m_sense_state) ? ASSERT_LINE : CLEAR_LINE); } } diff --git a/src/mame/drivers/lemmings.c b/src/mame/drivers/lemmings.c index 587eeb3df2c..8bc29f5c61b 100644 --- a/src/mame/drivers/lemmings.c +++ b/src/mame/drivers/lemmings.c @@ -80,12 +80,12 @@ WRITE16_MEMBER(lemmings_state::lemmings_palette_24bit_w) WRITE16_MEMBER(lemmings_state::lemmings_sound_w) { soundlatch_byte_w(space, 0, data & 0xff); - device_set_input_line(m_audiocpu, 1, HOLD_LINE); + m_audiocpu->set_input_line(1, HOLD_LINE); } WRITE8_MEMBER(lemmings_state::lemmings_sound_ack_w) { - device_set_input_line(m_audiocpu, 1, CLEAR_LINE); + m_audiocpu->set_input_line(1, CLEAR_LINE); } /******************************************************************************/ @@ -244,7 +244,7 @@ GFXDECODE_END static void sound_irq( device_t *device, int state ) { lemmings_state *lemmings = device->machine().driver_data(); - device_set_input_line(lemmings->m_audiocpu, 0, state); + lemmings->m_audiocpu->set_input_line(0, state); } static const ym2151_interface ym2151_config = @@ -256,7 +256,7 @@ static MACHINE_START( lemmings ) { lemmings_state *state = machine.driver_data(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); } static MACHINE_CONFIG_START( lemmings, lemmings_state ) diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c index 11476703fe7..9670c1257dc 100644 --- a/src/mame/drivers/lethal.c +++ b/src/mame/drivers/lethal.c @@ -208,7 +208,7 @@ static INTERRUPT_GEN(lethalen_interrupt) lethal_state *state = device->machine().driver_data(); if (k056832_is_irq_enabled(state->m_k056832, 0)) - device_set_input_line(device, HD6309_IRQ_LINE, HOLD_LINE); + device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(lethal_state::sound_cmd_w) @@ -218,7 +218,7 @@ WRITE8_MEMBER(lethal_state::sound_cmd_w) WRITE8_MEMBER(lethal_state::sound_irq_w) { - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); } READ8_MEMBER(lethal_state::sound_status_r) @@ -229,7 +229,7 @@ READ8_MEMBER(lethal_state::sound_status_r) static void sound_nmi( device_t *device ) { lethal_state *state = device->machine().driver_data(); - device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(lethal_state::le_bankswitch_w) @@ -586,8 +586,8 @@ static MACHINE_START( lethalen ) state->m_generic_paletteram_8.allocate(0x3800 + 0x02); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("soundcpu"); state->m_k054539 = machine.device("k054539"); state->m_k053244 = machine.device("k053244"); state->m_k056832 = machine.device("k056832"); diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c index aea815c57b6..fccd49456f7 100644 --- a/src/mame/drivers/lgp.c +++ b/src/mame/drivers/lgp.c @@ -339,10 +339,10 @@ static INTERRUPT_GEN( vblank_callback_lgp ) { lgp_state *state = device->machine().driver_data(); // NMI - //device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + //device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); // IRQ - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); state->m_irq_timer->adjust(attotime::from_usec(50)); } diff --git a/src/mame/drivers/liberate.c b/src/mame/drivers/liberate.c index 6154f93f9b0..44ac422dde7 100644 --- a/src/mame/drivers/liberate.c +++ b/src/mame/drivers/liberate.c @@ -69,9 +69,9 @@ WRITE8_MEMBER(liberate_state::deco16_bank_w) m_bank = data; if (m_bank) - m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x8000, 0x800f, read8_delegate(FUNC(liberate_state::deco16_io_r),this)); + m_maincpu->space(AS_PROGRAM)->install_read_handler(0x8000, 0x800f, read8_delegate(FUNC(liberate_state::deco16_io_r),this)); else - m_maincpu->memory().space(AS_PROGRAM)->install_read_bank(0x8000, 0x800f, "bank1"); + m_maincpu->space(AS_PROGRAM)->install_read_bank(0x8000, 0x800f, "bank1"); } READ8_MEMBER(liberate_state::prosoccr_bank_r) @@ -174,9 +174,9 @@ WRITE8_MEMBER(liberate_state::prosoccr_io_bank_w) m_bank = data & 1; if (m_bank) - m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x8000, 0x800f, read8_delegate(FUNC(liberate_state::deco16_io_r),this)); + m_maincpu->space(AS_PROGRAM)->install_read_handler(0x8000, 0x800f, read8_delegate(FUNC(liberate_state::deco16_io_r),this)); else - m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x8000, 0x800f, read8_delegate(FUNC(liberate_state::prosoccr_charram_r),this)); + m_maincpu->space(AS_PROGRAM)->install_read_handler(0x8000, 0x800f, read8_delegate(FUNC(liberate_state::prosoccr_charram_r),this)); } @@ -766,7 +766,7 @@ static INTERRUPT_GEN( deco16_interrupt ) int p = ~state->ioport("IN3")->read(); if ((p & 0x43) && !state->m_latch) { - device_set_input_line(device, DECO16_IRQ_LINE, ASSERT_LINE); + device->execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); state->m_latch = 1; } else @@ -780,7 +780,7 @@ static INTERRUPT_GEN( deco16_interrupt ) static INTERRUPT_GEN( prosport_interrupt ) { /* ??? */ - device_set_input_line(device, DECO16_IRQ_LINE, ASSERT_LINE); + device->execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); } #endif @@ -794,8 +794,8 @@ static MACHINE_START( liberate ) { liberate_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_background_disable)); state->save_item(NAME(state->m_background_color)); diff --git a/src/mame/drivers/littlerb.c b/src/mame/drivers/littlerb.c index 3ea530e765e..2cae88c8da7 100644 --- a/src/mame/drivers/littlerb.c +++ b/src/mame/drivers/littlerb.c @@ -587,7 +587,7 @@ static TIMER_DEVICE_CALLBACK( littlerb_scanline ) // logerror("IRQ\n"); if(scanline == 288) { - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } } diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c index 39f2d51d057..97136ae2dbe 100644 --- a/src/mame/drivers/lkage.c +++ b/src/mame/drivers/lkage.c @@ -99,7 +99,7 @@ static TIMER_CALLBACK( nmi_callback ) { lkage_state *state = machine.driver_data(); 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; } @@ -122,7 +122,7 @@ WRITE8_MEMBER(lkage_state::lkage_sh_nmi_enable_w) if (m_pending_nmi) { /* probably wrong but commands may go lost otherwise */ - 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; } } @@ -479,7 +479,7 @@ GFXDECODE_END static void irqhandler(device_t *device, int irq) { lkage_state *state = device->machine().driver_data(); - 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 = @@ -496,8 +496,8 @@ static MACHINE_START( lkage ) { lkage_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_mcu = machine.device("mcu"); state->save_item(NAME(state->m_bg_tile_bank)); diff --git a/src/mame/drivers/lockon.c b/src/mame/drivers/lockon.c index ed1129ef6a7..3d8e9fb0411 100644 --- a/src/mame/drivers/lockon.c +++ b/src/mame/drivers/lockon.c @@ -56,9 +56,9 @@ WRITE16_MEMBER(lockon_state::adrst_w) m_ctrl_reg = data & 0xff; /* Bus mastering for shared access */ - device_set_input_line(m_ground, INPUT_LINE_HALT, data & 0x04 ? ASSERT_LINE : CLEAR_LINE); - device_set_input_line(m_object, INPUT_LINE_HALT, data & 0x20 ? ASSERT_LINE : CLEAR_LINE); - device_set_input_line(m_audiocpu, INPUT_LINE_HALT, data & 0x40 ? CLEAR_LINE : ASSERT_LINE); + m_ground->execute().set_input_line(INPUT_LINE_HALT, data & 0x04 ? ASSERT_LINE : CLEAR_LINE); + m_object->execute().set_input_line(INPUT_LINE_HALT, data & 0x20 ? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_HALT, data & 0x40 ? CLEAR_LINE : ASSERT_LINE); } READ16_MEMBER(lockon_state::main_gnd_r) @@ -115,13 +115,13 @@ WRITE16_MEMBER(lockon_state::tst_w) READ16_MEMBER(lockon_state::main_z80_r) { - address_space *sndspace = m_audiocpu->memory().space(AS_PROGRAM); + address_space *sndspace = m_audiocpu->space(AS_PROGRAM); return 0xff00 | sndspace->read_byte(offset); } WRITE16_MEMBER(lockon_state::main_z80_w) { - address_space *sndspace = m_audiocpu->memory().space(AS_PROGRAM); + address_space *sndspace = m_audiocpu->space(AS_PROGRAM); sndspace->write_byte(offset, data); } @@ -418,7 +418,7 @@ WRITE8_MEMBER(lockon_state::sound_vol) static void ym2203_irq(device_t *device, int irq) { lockon_state *state = device->machine().driver_data(); - 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(lockon_state::ym2203_out_b) @@ -455,8 +455,8 @@ static MACHINE_START( lockon ) { lockon_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_ground = machine.device("ground"); state->m_object = machine.device("object"); state->m_f2203_1l = machine.device("f2203.1l"); diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index 29e3091882c..5c6fee46fff 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -334,7 +334,7 @@ static MACHINE_START( looping ) static INTERRUPT_GEN( looping_interrupt ) { - device_set_input_line_and_vector(device, 0, ASSERT_LINE, 4); + device->execute().set_input_line_and_vector(0, ASSERT_LINE, 4); } diff --git a/src/mame/drivers/lsasquad.c b/src/mame/drivers/lsasquad.c index 79dc215f994..00722f34aa8 100644 --- a/src/mame/drivers/lsasquad.c +++ b/src/mame/drivers/lsasquad.c @@ -541,7 +541,7 @@ GFXDECODE_END static void irqhandler(device_t *device, int irq) { lsasquad_state *state = device->machine().driver_data(); - 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(lsasquad_state::unk) @@ -571,8 +571,8 @@ static MACHINE_START( lsasquad ) state->membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x2000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_mcu = machine.device("mcu"); state->save_item(NAME(state->m_port_a_in)); diff --git a/src/mame/drivers/lucky74.c b/src/mame/drivers/lucky74.c index af9647fe4c7..32d6df3675d 100644 --- a/src/mame/drivers/lucky74.c +++ b/src/mame/drivers/lucky74.c @@ -906,7 +906,7 @@ static INTERRUPT_GEN( nmi_interrupt ) lucky74_state *state = device->machine().driver_data(); if ((state->m_ym2149_portb & 0x10) == 0) /* ym2149 portB bit 4 trigger the NMI */ { - 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/lwings.c b/src/mame/drivers/lwings.c index 53047211d13..28b6818f2e1 100644 --- a/src/mame/drivers/lwings.c +++ b/src/mame/drivers/lwings.c @@ -92,7 +92,7 @@ static INTERRUPT_GEN( lwings_interrupt ) lwings_state *state = device->machine().driver_data(); if(state->m_nmi_mask) - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xd7); /* RST 10h */ + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ } static INTERRUPT_GEN( avengers_interrupt ) @@ -100,7 +100,7 @@ static INTERRUPT_GEN( avengers_interrupt ) lwings_state *state = device->machine().driver_data(); 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/m10.c b/src/mame/drivers/m10.c index f32ea92fcbd..3a906a79e20 100644 --- a/src/mame/drivers/m10.c +++ b/src/mame/drivers/m10.c @@ -132,7 +132,7 @@ static WRITE8_DEVICE_HANDLER( ic8j1_output_changed ) { m10_state *state = device->machine().driver_data(); LOG(("ic8j1: %d %d\n", data, device->machine().primary_screen->vpos())); - device_set_input_line(state->m_maincpu, 0, !data ? CLEAR_LINE : ASSERT_LINE); + state->m_maincpu->set_input_line(0, !data ? CLEAR_LINE : ASSERT_LINE); } static WRITE8_DEVICE_HANDLER( ic8j2_output_changed ) @@ -196,7 +196,7 @@ static MACHINE_START( m10 ) { m10_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_ic8j1 = machine.device("ic8j1"); state->m_ic8j2 = machine.device("ic8j2"); state->m_samples = machine.device("samples"); @@ -486,7 +486,7 @@ READ8_MEMBER(m10_state::m10_a700_r) READ8_MEMBER(m10_state::m11_a700_r) { //LOG(("rd:%d\n",machine().primary_screen->vpos())); - //device_set_input_line(m_maincpu, 0, CLEAR_LINE); + //m_maincpu->set_input_line(0, CLEAR_LINE); LOG(("clear\n")); ttl74123_clear_w(m_ic8j1, 0, 0); ttl74123_clear_w(m_ic8j1, 0, 1); @@ -502,7 +502,7 @@ READ8_MEMBER(m10_state::m11_a700_r) INPUT_CHANGED_MEMBER(m10_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); } @@ -511,35 +511,35 @@ static TIMER_CALLBACK( interrupt_callback ) m10_state *state = machine.driver_data(); if (param == 0) { - device_set_input_line(state->m_maincpu, 0, ASSERT_LINE); + state->m_maincpu->set_input_line(0, ASSERT_LINE); machine.scheduler().timer_set(machine.primary_screen->time_until_pos(IREMM10_VBSTART + 16), FUNC(interrupt_callback), 1); } if (param == 1) { - device_set_input_line(state->m_maincpu, 0, ASSERT_LINE); + state->m_maincpu->set_input_line(0, ASSERT_LINE); machine.scheduler().timer_set(machine.primary_screen->time_until_pos(IREMM10_VBSTART + 24), FUNC(interrupt_callback), 2); } if (param == -1) - device_set_input_line(state->m_maincpu, 0, CLEAR_LINE); + state->m_maincpu->set_input_line(0, CLEAR_LINE); } #if 0 static INTERRUPT_GEN( m11_interrupt ) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); //device->machine().scheduler().timer_set(machine.primary_screen->time_until_pos(IREMM10_VBEND), FUNC(interrupt_callback), -1); } static INTERRUPT_GEN( m10_interrupt ) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } #endif static INTERRUPT_GEN( m15_interrupt ) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); device->machine().scheduler().timer_set(device->machine().primary_screen->time_until_pos(IREMM10_VBSTART + 1, 80), FUNC(interrupt_callback), -1); } diff --git a/src/mame/drivers/m14.c b/src/mame/drivers/m14.c index ce3e2a673d5..fdbc96aae99 100644 --- a/src/mame/drivers/m14.c +++ b/src/mame/drivers/m14.c @@ -71,7 +71,7 @@ public: UINT8 m_hop_mux; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_WRITE8_MEMBER(m14_vram_w); DECLARE_WRITE8_MEMBER(m14_cram_w); DECLARE_READ8_MEMBER(m14_rng_r); @@ -230,14 +230,14 @@ INPUT_CHANGED_MEMBER(m14_state::left_coin_inserted) { /* left coin insertion causes a rst6.5 (vector 0x34) */ if (newval) - device_set_input_line(m_maincpu, I8085_RST65_LINE, HOLD_LINE); + m_maincpu->set_input_line(I8085_RST65_LINE, HOLD_LINE); } INPUT_CHANGED_MEMBER(m14_state::right_coin_inserted) { /* right coin insertion causes a rst5.5 (vector 0x2c) */ if (newval) - device_set_input_line(m_maincpu, I8085_RST55_LINE, HOLD_LINE); + m_maincpu->set_input_line(I8085_RST55_LINE, HOLD_LINE); } static INPUT_PORTS_START( m14 ) @@ -312,15 +312,15 @@ GFXDECODE_END static INTERRUPT_GEN( m14_irq ) { - device_set_input_line(device, I8085_RST75_LINE, ASSERT_LINE); - device_set_input_line(device, I8085_RST75_LINE, CLEAR_LINE); + device->execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE); + device->execute().set_input_line(I8085_RST75_LINE, CLEAR_LINE); } static MACHINE_START( m14 ) { m14_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->save_item(NAME(state->m_hop_mux)); } diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c index eec9a07c44b..ddb294d1d7c 100644 --- a/src/mame/drivers/m63.c +++ b/src/mame/drivers/m63.c @@ -155,7 +155,7 @@ public: INT16 *m_samplebuf; /* sound devices */ - device_t *m_soundcpu; + cpu_device *m_soundcpu; device_t *m_ay1; device_t *m_ay2; samples_device *m_samples; @@ -379,7 +379,7 @@ WRITE8_MEMBER(m63_state::coin_w) WRITE8_MEMBER(m63_state::snd_irq_w) { - device_set_input_line(m_soundcpu, 0, ASSERT_LINE); + m_soundcpu->set_input_line(0, ASSERT_LINE); machine().scheduler().synchronize(); } @@ -409,7 +409,7 @@ WRITE8_MEMBER(m63_state::p2_w) m_p2 = data; if((m_p2 & 0xf0) == 0x50) { - device_set_input_line(m_soundcpu, 0, CLEAR_LINE); + m_soundcpu->set_input_line(0, CLEAR_LINE); } } @@ -725,7 +725,7 @@ static MACHINE_START( m63 ) { m63_state *state = machine.driver_data(); - state->m_soundcpu = machine.device("soundcpu"); + state->m_soundcpu = machine.device("soundcpu"); state->m_ay1 = machine.device("ay1"); state->m_ay2 = machine.device("ay2"); state->m_samples = machine.device("samples"); @@ -759,7 +759,7 @@ static INTERRUPT_GEN( vblank_irq ) m63_state *state = device->machine().driver_data(); 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( m63, m63_state ) diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c index a1e06749a1a..19ea68df9a7 100644 --- a/src/mame/drivers/m72.c +++ b/src/mame/drivers/m72.c @@ -293,7 +293,7 @@ static INTERRUPT_GEN( m72_mcu_int ) m72_state *state = device->machine().driver_data(); //state->m_mcu_snd_cmd_latch |= 0x11; /* 0x10 is special as well - FIXME */ state->m_mcu_snd_cmd_latch = 0x11;// | (machine.rand() & 1); /* 0x10 is special as well - FIXME */ - device_set_input_line(device, 1, ASSERT_LINE); + device->execute().set_input_line(1, ASSERT_LINE); } READ8_MEMBER(m72_state::m72_mcu_sample_r) diff --git a/src/mame/drivers/m79amb.c b/src/mame/drivers/m79amb.c index 406a27010ef..ff6383e1c74 100644 --- a/src/mame/drivers/m79amb.c +++ b/src/mame/drivers/m79amb.c @@ -204,7 +204,7 @@ INPUT_PORTS_END static INTERRUPT_GEN( m79amb_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xcf); /* RST 08h */ + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */ } static MACHINE_CONFIG_START( m79amb, m79amb_state ) diff --git a/src/mame/drivers/m90.c b/src/mame/drivers/m90.c index 78e41f922b4..cc72b4fbfa8 100644 --- a/src/mame/drivers/m90.c +++ b/src/mame/drivers/m90.c @@ -701,12 +701,12 @@ static INTERRUPT_GEN( m90_interrupt ) static INTERRUPT_GEN( dynablsb_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x60/4); + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x60/4); } static INTERRUPT_GEN( bomblord_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x50/4); + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x50/4); } diff --git a/src/mame/drivers/m92.c b/src/mame/drivers/m92.c index f4a12b0966e..ca41e4d9773 100644 --- a/src/mame/drivers/m92.c +++ b/src/mame/drivers/m92.c @@ -237,14 +237,14 @@ static TIMER_DEVICE_CALLBACK( m92_scanline_interrupt ) if (scanline == state->m_raster_irq_position) { machine.primary_screen->update_partial(scanline); - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, M92_IRQ_2); + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_2); } /* VBLANK interrupt */ else if (scanline == machine.primary_screen->visible_area().max_y + 1) { machine.primary_screen->update_partial(scanline); - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, M92_IRQ_0); + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_0); } } @@ -297,7 +297,7 @@ CUSTOM_INPUT_MEMBER(m92_state::m92_sprite_busy_r) WRITE16_MEMBER(m92_state::m92_soundlatch_w) { if (m_soundcpu) - device_set_input_line(m_soundcpu, NEC_INPUT_LINE_INTP1, ASSERT_LINE); + m_soundcpu->set_input_line(NEC_INPUT_LINE_INTP1, ASSERT_LINE); soundlatch_byte_w(space, 0, data & 0xff); } @@ -311,7 +311,7 @@ READ16_MEMBER(m92_state::m92_sound_status_r) READ16_MEMBER(m92_state::m92_soundlatch_r) { if (m_soundcpu) - device_set_input_line(m_soundcpu, NEC_INPUT_LINE_INTP1, CLEAR_LINE); + m_soundcpu->set_input_line(NEC_INPUT_LINE_INTP1, CLEAR_LINE); return soundlatch_byte_r(space, offset) | 0xff00; } @@ -319,20 +319,20 @@ READ16_MEMBER(m92_state::m92_soundlatch_r) WRITE16_MEMBER(m92_state::m92_sound_irq_ack_w) { if (m_soundcpu) - device_set_input_line(m_soundcpu, NEC_INPUT_LINE_INTP1, CLEAR_LINE); + m_soundcpu->set_input_line(NEC_INPUT_LINE_INTP1, CLEAR_LINE); } WRITE16_MEMBER(m92_state::m92_sound_status_w) { COMBINE_DATA(&m_sound_status); - device_set_input_line_and_vector(m_maincpu, 0, HOLD_LINE, M92_IRQ_3); + m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_3); } WRITE16_MEMBER(m92_state::m92_sound_reset_w) { if (m_soundcpu) - device_set_input_line(m_soundcpu, INPUT_LINE_RESET, (data) ? CLEAR_LINE : ASSERT_LINE); + m_soundcpu->set_input_line(INPUT_LINE_RESET, (data) ? CLEAR_LINE : ASSERT_LINE); } /*****************************************************************************/ @@ -916,7 +916,7 @@ static void sound_irq(device_t *device, int pinstate) { m92_state *state = device->machine().driver_data(); - device_set_input_line(state->m_soundcpu, NEC_INPUT_LINE_INTP0, pinstate ? ASSERT_LINE : CLEAR_LINE); + state->m_soundcpu->set_input_line(NEC_INPUT_LINE_INTP0, pinstate ? ASSERT_LINE : CLEAR_LINE); } static const ym2151_interface ym2151_config = @@ -930,7 +930,7 @@ void m92_sprite_interrupt(running_machine &machine) { m92_state *state = machine.driver_data(); - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, M92_IRQ_1); + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_1); } static MACHINE_CONFIG_START( m92, m92_state ) diff --git a/src/mame/drivers/macrossp.c b/src/mame/drivers/macrossp.c index 14f014c1d2b..09ec2e33ddf 100644 --- a/src/mame/drivers/macrossp.c +++ b/src/mame/drivers/macrossp.c @@ -338,9 +338,9 @@ WRITE32_MEMBER(macrossp_state::macrossp_soundcmd_w) //logerror("%08x write soundcmd %08x (%08x)\n",space.device().safe_pc(),data,mem_mask); soundlatch_word_w(space, 0, data >> 16, 0xffff); m_sndpending = 1; - device_set_input_line(m_audiocpu, 2, HOLD_LINE); + m_audiocpu->set_input_line(2, HOLD_LINE); /* spin for a while to let the sound CPU read the command */ - device_spin_until_time(&space.device(), attotime::from_usec(50)); + space.device().execute().spin_until_time(attotime::from_usec(50)); } } @@ -584,7 +584,7 @@ static void irqhandler(device_t *device, int irq) /* IRQ lines 1 & 4 on the sound 68000 are definitely triggered by the ES5506, but I haven't noticed the ES5506 ever assert the line - maybe only used when developing the game? */ - // 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); } static const es5506_interface es5506_config = @@ -601,8 +601,8 @@ static MACHINE_START( macrossp ) { macrossp_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_sndpending)); state->save_item(NAME(state->m_snd_toggle)); @@ -770,7 +770,7 @@ PC :00018110 018110: beq 18104 */ COMBINE_DATA(&m_mainram[0x10158 / 4]); - if (space.device().safe_pc() == 0x001810A) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc() == 0x001810A) space.device().execute().spin_until_interrupt(); } #ifdef UNUSED_FUNCTION @@ -778,7 +778,7 @@ WRITE32_MEMBER(macrossp_state::quizmoon_speedup_w) { COMBINE_DATA(&m_mainram[0x00020 / 4]); - if (space.device().safe_pc() == 0x1cc) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc() == 0x1cc) space.device().execute().spin_until_interrupt(); } #endif diff --git a/src/mame/drivers/madmotor.c b/src/mame/drivers/madmotor.c index 1216baa67dd..a84ed68080d 100644 --- a/src/mame/drivers/madmotor.c +++ b/src/mame/drivers/madmotor.c @@ -30,7 +30,7 @@ WRITE16_MEMBER(madmotor_state::madmotor_sound_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); } } @@ -222,7 +222,7 @@ GFXDECODE_END static void sound_irq(device_t *device, int state) { madmotor_state *driver_state = device->machine().driver_data(); - 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 = @@ -234,8 +234,8 @@ static MACHINE_START( madmotor ) { madmotor_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_flipscreen)); } diff --git a/src/mame/drivers/magicard.c b/src/mame/drivers/magicard.c index 8e8db148c60..c8cada60fb0 100644 --- a/src/mame/drivers/magicard.c +++ b/src/mame/drivers/magicard.c @@ -709,9 +709,9 @@ static MACHINE_RESET( magicard ) static INTERRUPT_GEN( magicard_irq ) { if(device->machine().input().code_pressed(KEYCODE_Z)) //vblank? - device_set_input_line_and_vector(device, 1, HOLD_LINE,0xe4/4); + device->execute().set_input_line_and_vector(1, HOLD_LINE,0xe4/4); if(device->machine().input().code_pressed(KEYCODE_X)) //uart irq - device_set_input_line_and_vector(device, 1, HOLD_LINE,0xf0/4); + device->execute().set_input_line_and_vector(1, HOLD_LINE,0xf0/4); } static MACHINE_CONFIG_START( magicard, magicard_state ) diff --git a/src/mame/drivers/magictg.c b/src/mame/drivers/magictg.c index 72ba6adc2c5..3fe126ac560 100644 --- a/src/mame/drivers/magictg.c +++ b/src/mame/drivers/magictg.c @@ -804,7 +804,7 @@ WRITE16_MEMBER( magictg_state::adsp_control_w ) m_adsp_regs.bdma_control |= ((src_addr >> 14) & 0xff) << 8; if (m_adsp_regs.bdma_control & 8) - device_set_input_line(m_adsp, INPUT_LINE_RESET, PULSE_LINE); + m_adsp->set_input_line(INPUT_LINE_RESET, PULSE_LINE); } break; } diff --git a/src/mame/drivers/magtouch.c b/src/mame/drivers/magtouch.c index 17b448dfffd..f0ff4cb335e 100644 --- a/src/mame/drivers/magtouch.c +++ b/src/mame/drivers/magtouch.c @@ -199,7 +199,7 @@ static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color static MACHINE_START( magtouch ) { - device_set_irq_callback(machine.device("maincpu"), pcat_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pcat_irq_callback); init_pc_common(machine, PCCOMMON_KEYBOARD_AT, magtouch_set_keyb_int); diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c index 9da494c34a6..04d12ccf7d5 100644 --- a/src/mame/drivers/mainevt.c +++ b/src/mame/drivers/mainevt.c @@ -82,7 +82,7 @@ WRITE8_MEMBER(mainevt_state::mainevt_coin_w) WRITE8_MEMBER(mainevt_state::mainevt_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(mainevt_state::mainevt_sh_busy_r) @@ -418,8 +418,8 @@ static MACHINE_START( mainevt ) 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("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_upd = machine.device("upd"); state->m_k007232 = machine.device("k007232"); state->m_k052109 = machine.device("k052109"); @@ -440,7 +440,7 @@ static INTERRUPT_GEN( mainevt_sound_timer_irq ) mainevt_state *state = device->machine().driver_data(); if(state->m_sound_irq_mask) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static INTERRUPT_GEN( devstors_sound_timer_irq ) @@ -448,7 +448,7 @@ static INTERRUPT_GEN( devstors_sound_timer_irq ) mainevt_state *state = device->machine().driver_data(); if(state->m_sound_irq_mask) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( mainevt, mainevt_state ) diff --git a/src/mame/drivers/marineb.c b/src/mame/drivers/marineb.c index 91d81a9e581..8ef260eb693 100644 --- a/src/mame/drivers/marineb.c +++ b/src/mame/drivers/marineb.c @@ -65,7 +65,7 @@ static MACHINE_START( marineb ) { marineb_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_audiocpu = NULL; state->save_item(NAME(state->m_marineb_active_low_flipscreen)); @@ -531,7 +531,7 @@ static INTERRUPT_GEN( marineb_vblank_irq ) marineb_state *state = device->machine().driver_data(); if(state->m_irq_mask) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static INTERRUPT_GEN( wanted_vblank_irq ) @@ -539,7 +539,7 @@ static INTERRUPT_GEN( wanted_vblank_irq ) marineb_state *state = device->machine().driver_data(); 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/mario.c b/src/mame/drivers/mario.c index cdb9f7ef993..1b6d8d1ab15 100644 --- a/src/mame/drivers/mario.c +++ b/src/mame/drivers/mario.c @@ -328,7 +328,7 @@ static INTERRUPT_GEN( vblank_irq ) mario_state *state = device->machine().driver_data(); 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( mario_base, mario_state ) diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c index 86e566c8c16..c4a0e390e6c 100644 --- a/src/mame/drivers/mastboy.c +++ b/src/mame/drivers/mastboy.c @@ -697,7 +697,7 @@ static INTERRUPT_GEN( mastboy_interrupt ) mastboy_state *state = device->machine().driver_data(); if ((state->m_irq0_ack & 1) == 1) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } } diff --git a/src/mame/drivers/matmania.c b/src/mame/drivers/matmania.c index 345ff363eae..54f437b6467 100644 --- a/src/mame/drivers/matmania.c +++ b/src/mame/drivers/matmania.c @@ -47,13 +47,13 @@ The driver has been updated accordingly. WRITE8_MEMBER(matmania_state::matmania_sh_command_w) { soundlatch_byte_w(space, offset, data); - device_set_input_line(m_audiocpu, M6502_IRQ_LINE, HOLD_LINE); + m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(matmania_state::maniach_sh_command_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); } @@ -300,8 +300,8 @@ static MACHINE_START( matmania ) { matmania_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_mcu = machine.device("mcu"); } diff --git a/src/mame/drivers/mayumi.c b/src/mame/drivers/mayumi.c index 5b2cbec7296..f936f53daea 100644 --- a/src/mame/drivers/mayumi.c +++ b/src/mame/drivers/mayumi.c @@ -89,7 +89,7 @@ static INTERRUPT_GEN( mayumi_interrupt ) mayumi_state *state = device->machine().driver_data(); if (state->m_int_enable) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } /************************************* diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c index dff849096e1..91ed8d768c7 100644 --- a/src/mame/drivers/mazerbla.c +++ b/src/mame/drivers/mazerbla.c @@ -98,8 +98,8 @@ public: UINT8 m_soundlatch; /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; #if 0 int m_dbg_info; @@ -763,7 +763,7 @@ WRITE8_MEMBER(mazerbla_state::cfb_zpu_int_req_set_w) m_zpu_int_vector &= ~2; /* clear D1 on INTA (interrupt acknowledge) */ - device_set_input_line(m_maincpu, 0, ASSERT_LINE); /* main cpu interrupt (comes from CFB (generated at the start of INT routine on CFB) - vblank?) */ + m_maincpu->set_input_line(0, ASSERT_LINE); /* main cpu interrupt (comes from CFB (generated at the start of INT routine on CFB) - vblank?) */ } READ8_MEMBER(mazerbla_state::cfb_zpu_int_req_clr) @@ -773,7 +773,7 @@ READ8_MEMBER(mazerbla_state::cfb_zpu_int_req_clr) /* clear the INT line when there are no more interrupt requests */ if (m_zpu_int_vector == 0xff) - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); return 0; } @@ -958,7 +958,7 @@ static TIMER_CALLBACK( delayed_sound_w ) state->m_soundlatch = param; /* cause NMI on sound CPU */ - device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, ASSERT_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } WRITE8_MEMBER(mazerbla_state::main_sound_w) @@ -968,12 +968,12 @@ WRITE8_MEMBER(mazerbla_state::main_sound_w) WRITE8_MEMBER(mazerbla_state::sound_int_clear_w) { - device_set_input_line(m_subcpu, 0, CLEAR_LINE); + m_subcpu->set_input_line(0, CLEAR_LINE); } WRITE8_MEMBER(mazerbla_state::sound_nmi_clear_w) { - device_set_input_line(m_subcpu, INPUT_LINE_NMI, CLEAR_LINE); + m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } @@ -1421,7 +1421,7 @@ static IRQ_CALLBACK(irq_callback) /* frequency is 14.318 MHz/16/16/16/16 */ static INTERRUPT_GEN( sound_interrupt ) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } @@ -1435,8 +1435,8 @@ static MACHINE_START( mazerbla ) { mazerbla_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("sub"); state->save_item(NAME(state->m_vcu_video_reg)); state->save_item(NAME(state->m_vcu_gfx_addr)); @@ -1502,7 +1502,7 @@ static MACHINE_RESET( mazerbla ) memset(state->m_lookup_ram, 0, ARRAY_LENGTH(state->m_lookup_ram)); - 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/mcatadv.c b/src/mame/drivers/mcatadv.c index 5968adfd7ba..3075ab2ecc6 100644 --- a/src/mame/drivers/mcatadv.c +++ b/src/mame/drivers/mcatadv.c @@ -148,7 +148,7 @@ WRITE16_MEMBER(mcatadv_state::mcat_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); } #if 0 // mcat only.. install read handler? @@ -416,7 +416,7 @@ GFXDECODE_END static void sound_irq( device_t *device, int irq ) { mcatadv_state *state = device->machine().driver_data(); - device_set_input_line(state->m_soundcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); + state->m_soundcpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE); } static const ym2610_interface mcatadv_ym2610_interface = @@ -433,8 +433,8 @@ static MACHINE_START( mcatadv ) state->membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); state->membank("bank1")->set_entry(1); - state->m_maincpu = machine.device("maincpu"); - state->m_soundcpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_soundcpu = machine.device("soundcpu"); state->save_item(NAME(state->m_palette_bank1)); state->save_item(NAME(state->m_palette_bank2)); diff --git a/src/mame/drivers/mcr68.c b/src/mame/drivers/mcr68.c index f1ff7258984..b10c447d6c1 100644 --- a/src/mame/drivers/mcr68.c +++ b/src/mame/drivers/mcr68.c @@ -86,7 +86,7 @@ READ16_MEMBER(mcr68_state::zwackery_6840_r) /* It expects D1 to end up between 0 and 5; in order to */ /* make this happen, we must assume that reads from the */ /* 6840 take 14 additional cycles */ - device_adjust_icount(&space.device(), -14); + space.device().execute().adjust_icount(-14); return mcr68_6840_upper_r(space,offset,0xffff); } diff --git a/src/mame/drivers/meadows.c b/src/mame/drivers/meadows.c index 63ea93ebdde..ba87fe51584 100644 --- a/src/mame/drivers/meadows.c +++ b/src/mame/drivers/meadows.c @@ -214,7 +214,7 @@ static INTERRUPT_GEN( meadows_interrupt ) meadows_state *state = device->machine().driver_data(); /* fake something toggling the sense input line of the S2650 */ state->m_main_sense_state ^= 1; - device_set_input_line(device, 1, state->m_main_sense_state ? ASSERT_LINE : CLEAR_LINE); + device->execute().set_input_line(1, state->m_main_sense_state ? ASSERT_LINE : CLEAR_LINE); } @@ -229,7 +229,7 @@ static INTERRUPT_GEN( minferno_interrupt ) { meadows_state *state = device->machine().driver_data(); state->m_main_sense_state++; - device_set_input_line(device, 1, (state->m_main_sense_state & 0x40) ? ASSERT_LINE : CLEAR_LINE ); + device->execute().set_input_line(1, (state->m_main_sense_state & 0x40) ? ASSERT_LINE : CLEAR_LINE ); } @@ -312,7 +312,7 @@ static INTERRUPT_GEN( audio_interrupt ) meadows_state *state = device->machine().driver_data(); /* fake something toggling the sense input line of the S2650 */ state->m_audio_sense_state ^= 1; - device_set_input_line(device, 1, state->m_audio_sense_state ? ASSERT_LINE : CLEAR_LINE); + device->execute().set_input_line(1, state->m_audio_sense_state ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c index 853963e83fa..4643a7f543d 100644 --- a/src/mame/drivers/mediagx.c +++ b/src/mame/drivers/mediagx.c @@ -405,7 +405,7 @@ READ32_MEMBER(mediagx_state::disp_ctrl_r) #if SPEEDUP_HACKS // wait for vblank speedup - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); #endif break; } @@ -1069,7 +1069,7 @@ static MACHINE_RESET(mediagx) mediagx_state *state = machine.driver_data(); UINT8 *rom = state->memregion("bios")->base(); - device_set_irq_callback(machine.device("maincpu"), irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback); memcpy(state->m_bios_ram, rom, 0x40000); machine.device("maincpu")->reset(); @@ -1269,7 +1269,7 @@ INLINE UINT32 generic_speedup(address_space *space, int idx) if (space->device().safe_pc() == state->m_speedup_table[idx].pc) { state->m_speedup_hits[idx]++; - device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_interrupt(); } return state->m_main_ram[state->m_speedup_table[idx].offset/4]; } diff --git a/src/mame/drivers/megaplay.c b/src/mame/drivers/megaplay.c index 9178ba53dbd..54cfdf927cd 100644 --- a/src/mame/drivers/megaplay.c +++ b/src/mame/drivers/megaplay.c @@ -87,7 +87,7 @@ static INTERRUPT_GEN (megaplay_bios_irq) segae_hintpending = 1; if ((segae_vdp_regs[0][0] & 0x10)) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); return; } @@ -100,7 +100,7 @@ static INTERRUPT_GEN (megaplay_bios_irq) hintcount = segae_vdp_regs[0][10]; if ( (sline<0xe0) && (segae_vintpending) ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } } diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c index 10d125d73bd..180127f54b3 100644 --- a/src/mame/drivers/megasys1.c +++ b/src/mame/drivers/megasys1.c @@ -296,7 +296,7 @@ ADDRESS_MAP_END static INTERRUPT_GEN( megasys1D_irq ) { - device_set_input_line(device, 2, HOLD_LINE); + device->execute().set_input_line(2, HOLD_LINE); } static ADDRESS_MAP_START( megasys1D_map, AS_PROGRAM, 16, megasys1_state ) diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c index 0e215d885e4..634ca999fe3 100644 --- a/src/mame/drivers/megazone.c +++ b/src/mame/drivers/megazone.c @@ -57,14 +57,14 @@ WRITE8_MEMBER(megazone_state::megazone_port_b_w) WRITE8_MEMBER(megazone_state::megazone_i8039_irq_w) { - device_set_input_line(m_daccpu, 0, ASSERT_LINE); + m_daccpu->set_input_line(0, ASSERT_LINE); } WRITE8_MEMBER(megazone_state::i8039_irqen_and_status_w) { if ((data & 0x80) == 0) - device_set_input_line(m_daccpu, 0, CLEAR_LINE); + m_daccpu->set_input_line(0, CLEAR_LINE); m_i8039_status = (data & 0x70) >> 4; } @@ -251,7 +251,7 @@ static INTERRUPT_GEN( vblank_irq ) megazone_state *state = device->machine().driver_data(); 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/meijinsn.c b/src/mame/drivers/meijinsn.c index de6f0a3fd7d..85925b122ef 100644 --- a/src/mame/drivers/meijinsn.c +++ b/src/mame/drivers/meijinsn.c @@ -318,10 +318,10 @@ static TIMER_DEVICE_CALLBACK( meijinsn_interrupt ) 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 == 0) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); } static const ay8910_interface ay8910_config = diff --git a/src/mame/drivers/mermaid.c b/src/mame/drivers/mermaid.c index 4b597624fe1..da08f4b861c 100644 --- a/src/mame/drivers/mermaid.c +++ b/src/mame/drivers/mermaid.c @@ -366,7 +366,7 @@ static MACHINE_START( mermaid ) { mermaid_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_ay1 = machine.device("ay1"); state->m_ay2 = machine.device("ay2"); @@ -446,7 +446,7 @@ static INTERRUPT_GEN( vblank_irq ) mermaid_state *state = device->machine().driver_data(); 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( mermaid, mermaid_state ) diff --git a/src/mame/drivers/metalmx.c b/src/mame/drivers/metalmx.c index 8d03b23f7fb..3aa90cf3339 100644 --- a/src/mame/drivers/metalmx.c +++ b/src/mame/drivers/metalmx.c @@ -333,8 +333,8 @@ WRITE32_MEMBER(metalmx_state::reset_w) if (ACCESSING_BITS_16_31) { data >>= 16; - device_set_input_line(m_dsp32c_1, INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE); - device_set_input_line(m_dsp32c_2, INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE); + m_dsp32c_1->set_input_line(INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE); + m_dsp32c_2->set_input_line(INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE); } } @@ -782,8 +782,8 @@ static MACHINE_RESET( metalmx ) { metalmx_state *state = machine.driver_data(); - device_set_input_line(state->m_dsp32c_1, INPUT_LINE_RESET, ASSERT_LINE); - device_set_input_line(state->m_dsp32c_2, INPUT_LINE_RESET, ASSERT_LINE); + state->m_dsp32c_1->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); + state->m_dsp32c_2->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } diff --git a/src/mame/drivers/metlclsh.c b/src/mame/drivers/metlclsh.c index c10f7730e66..fcfc60f6b2d 100644 --- a/src/mame/drivers/metlclsh.c +++ b/src/mame/drivers/metlclsh.c @@ -46,12 +46,12 @@ metlclsh: WRITE8_MEMBER(metlclsh_state::metlclsh_cause_irq) { - device_set_input_line(m_subcpu, M6809_IRQ_LINE, ASSERT_LINE); + m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } WRITE8_MEMBER(metlclsh_state::metlclsh_ack_nmi) { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } static ADDRESS_MAP_START( metlclsh_master_map, AS_PROGRAM, 8, metlclsh_state ) @@ -83,17 +83,17 @@ ADDRESS_MAP_END WRITE8_MEMBER(metlclsh_state::metlclsh_cause_nmi2) { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } WRITE8_MEMBER(metlclsh_state::metlclsh_ack_irq2) { - device_set_input_line(m_subcpu, M6809_IRQ_LINE, CLEAR_LINE); + m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); } WRITE8_MEMBER(metlclsh_state::metlclsh_ack_nmi2) { - device_set_input_line(m_subcpu, INPUT_LINE_NMI, CLEAR_LINE); + m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } WRITE8_MEMBER(metlclsh_state::metlclsh_flipscreen_w) @@ -264,8 +264,8 @@ static MACHINE_START( metlclsh ) { metlclsh_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("sub"); state->save_item(NAME(state->m_write_mask)); state->save_item(NAME(state->m_gfxbank)); diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c index 3adb3465130..e56f9d8f4f3 100644 --- a/src/mame/drivers/metro.c +++ b/src/mame/drivers/metro.c @@ -149,7 +149,7 @@ static void update_irq_state( running_machine &machine ) irq_level[state->m_irq_levels[i] & 7] = 1; for (i = 0; i < 8; i++) - device_set_input_line(state->m_maincpu, i, irq_level[i] ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(i, irq_level[i] ? ASSERT_LINE : CLEAR_LINE); } else { @@ -157,7 +157,7 @@ static void update_irq_state( running_machine &machine ) then reads the actual source by peeking a register (metro_irq_cause_r) */ int irq_state = (irq ? ASSERT_LINE : CLEAR_LINE); - device_set_input_line(state->m_maincpu, state->m_irq_line, irq_state); + state->m_maincpu->set_input_line(state->m_irq_line, irq_state); } } @@ -245,13 +245,13 @@ static INTERRUPT_GEN( puzzlet_interrupt ) state->m_requested_int[state->m_vblank_bit] = 1; update_irq_state(device->machine()); - device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE); + state->m_maincpu->set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); } static void ymf278b_interrupt( device_t *device, int active ) { metro_state *state = device->machine().driver_data(); - device_set_input_line(state->m_maincpu, 2, active); + state->m_maincpu->set_input_line(2, active); } @@ -288,8 +288,8 @@ WRITE16_MEMBER(metro_state::metro_soundlatch_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_interrupt(&space.device()); + m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + space.device().execute().spin_until_interrupt(); m_busy_sndcpu = 1; } } @@ -445,7 +445,7 @@ WRITE8_MEMBER(metro_state::daitorid_portb_w) static void metro_sound_irq_handler( device_t *device, int state ) { metro_state *driver_state = device->machine().driver_data(); - device_set_input_line(driver_state->m_audiocpu, UPD7810_INTF2, state ? ASSERT_LINE : CLEAR_LINE); + driver_state->m_audiocpu->set_input_line(UPD7810_INTF2, state ? ASSERT_LINE : CLEAR_LINE); } static const ym2151_interface ym2151_config = @@ -1610,7 +1610,7 @@ WRITE16_MEMBER(metro_state::blzntrnd_sound_w) { soundlatch_byte_w(space, offset, data >> 8); - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(metro_state::blzntrnd_sh_bankswitch_w) @@ -1625,7 +1625,7 @@ WRITE8_MEMBER(metro_state::blzntrnd_sh_bankswitch_w) static void blzntrnd_irqhandler(device_t *device, int irq) { metro_state *state = device->machine().driver_data(); - 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 blzntrnd_ym2610_interface = @@ -3408,7 +3408,7 @@ static MACHINE_RESET( metro ) metro_state *state = machine.driver_data(); if (state->m_irq_line == -1) - device_set_irq_callback(machine.device("maincpu"), metro_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(metro_irq_callback); } diff --git a/src/mame/drivers/mexico86.c b/src/mame/drivers/mexico86.c index d498995ef25..bb3c9d4a0b1 100644 --- a/src/mame/drivers/mexico86.c +++ b/src/mame/drivers/mexico86.c @@ -426,9 +426,9 @@ static MACHINE_START( mexico86 ) state->membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.device("sub"); state->m_mcu = machine.device("mcu"); state->save_item(NAME(state->m_port_a_in)); diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c index 68fd26019b8..bd54149b05c 100644 --- a/src/mame/drivers/mgolf.c +++ b/src/mame/drivers/mgolf.c @@ -27,7 +27,7 @@ public: attotime m_time_released; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_WRITE8_MEMBER(mgolf_vram_w); DECLARE_READ8_MEMBER(mgolf_wram_r); DECLARE_READ8_MEMBER(mgolf_dial_r); @@ -100,7 +100,7 @@ static void update_plunger( running_machine &machine ) state->m_time_released = machine.time(); if (!state->m_mask) - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } else state->m_time_pushed = machine.time(); @@ -306,7 +306,7 @@ static MACHINE_START( mgolf ) { mgolf_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->save_item(NAME(state->m_prev)); state->save_item(NAME(state->m_mask)); diff --git a/src/mame/drivers/midqslvr.c b/src/mame/drivers/midqslvr.c index 6a9dbaf3a8f..ad662efd41c 100644 --- a/src/mame/drivers/midqslvr.c +++ b/src/mame/drivers/midqslvr.c @@ -582,7 +582,7 @@ static const struct pit8253_config midqslvr_pit8254_config = WRITE_LINE_MEMBER(midqslvr_state::midqslvr_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( midqslvr_state::get_slave_ack ) @@ -612,7 +612,7 @@ static void set_gate_a20(running_machine &machine, int a20) { midqslvr_state *state = machine.driver_data(); - 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) @@ -666,7 +666,7 @@ static MACHINE_START( midqslvr ) init_pc_common(machine, PCCOMMON_KEYBOARD_AT, midqslvr_set_keyb_int); - device_set_irq_callback(state->m_maincpu, irq_callback); + state->m_maincpu->set_irq_acknowledge_callback(irq_callback); intel82439tx_init(machine); kbdc8042_init(machine, &at8042); diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c index 4d4843900f5..5591e55b941 100644 --- a/src/mame/drivers/midvunit.c +++ b/src/mame/drivers/midvunit.c @@ -1720,7 +1720,7 @@ ROM_END READ32_MEMBER(midvunit_state::generic_speedup_r) { - device_eat_cycles(&space.device(), 100); + space.device().execute().eat_cycles(100); return m_generic_speedup[offset]; } diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c index 4ee63f0a0f7..f66ce515cbf 100644 --- a/src/mame/drivers/midzeus.c +++ b/src/mame/drivers/midzeus.c @@ -117,7 +117,7 @@ static TIMER_CALLBACK( display_irq_off ) static INTERRUPT_GEN( display_irq ) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); device->machine().scheduler().timer_set(attotime::from_hz(30000000), FUNC(display_irq_off)); } diff --git a/src/mame/drivers/mikie.c b/src/mame/drivers/mikie.c index 8c707aa4cfe..26fb11916d2 100644 --- a/src/mame/drivers/mikie.c +++ b/src/mame/drivers/mikie.c @@ -70,7 +70,7 @@ WRITE8_MEMBER(mikie_state::mikie_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_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); } m_last_irq = data; @@ -271,7 +271,7 @@ static INTERRUPT_GEN( vblank_irq ) mikie_state *state = device->machine().driver_data(); 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( mikie, mikie_state ) diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c index 01a0501edfb..1359b2e4d98 100644 --- a/src/mame/drivers/mirax.c +++ b/src/mame/drivers/mirax.c @@ -446,7 +446,7 @@ static INTERRUPT_GEN( mirax_vblank_irq ) { mirax_state *state = device->machine().driver_data(); 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( mirax, mirax_state ) diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c index ddabbf31a6c..df1852a9542 100644 --- a/src/mame/drivers/missb2.c +++ b/src/mame/drivers/missb2.c @@ -428,7 +428,7 @@ static const ym3526_interface ym3526_config = static INTERRUPT_GEN( missb2_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } /* Machine Driver */ @@ -437,8 +437,8 @@ static MACHINE_START( missb2 ) { missb2_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_slave = machine.device("slave"); state->m_mcu = NULL; diff --git a/src/mame/drivers/missile.c b/src/mame/drivers/missile.c index d31b7d11c09..3d12001a3d1 100644 --- a/src/mame/drivers/missile.c +++ b/src/mame/drivers/missile.c @@ -440,7 +440,7 @@ static TIMER_CALLBACK( clock_irq ) /* assert the IRQ if not already asserted */ state->m_irq_state = (~curv >> 5) & 1; - device_set_input_line(state->m_maincpu, 0, state->m_irq_state ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(0, state->m_irq_state ? ASSERT_LINE : CLEAR_LINE); /* force an update while we're here */ machine.primary_screen->update_partial(v_to_scanline(state, curv)); @@ -540,7 +540,7 @@ static MACHINE_START( missile ) static MACHINE_RESET( missile ) { missile_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 0, CLEAR_LINE); + state->m_maincpu->set_input_line(0, CLEAR_LINE); state->m_irq_state = 0; } @@ -617,7 +617,7 @@ static void write_vram(address_space *space, offs_t address, UINT8 data) videoram[vramaddr] = (videoram[vramaddr] & vrammask) | (vramdata & ~vrammask); /* account for the extra clock cycle */ - device_adjust_icount(&space->device(), -1); + space->device().execute().adjust_icount(-1); } } @@ -653,7 +653,7 @@ static UINT8 read_vram(address_space *space, offs_t address) result &= ~0x20; /* account for the extra clock cycle */ - device_adjust_icount(&space->device(), -1); + space->device().execute().adjust_icount(-1); } return result; } @@ -759,7 +759,7 @@ WRITE8_MEMBER(missile_state::missile_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/mitchell.c b/src/mame/drivers/mitchell.c index 386d50ef7e7..d9ff986d0b1 100644 --- a/src/mame/drivers/mitchell.c +++ b/src/mame/drivers/mitchell.c @@ -394,7 +394,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(mitchell_state::mstworld_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); } static ADDRESS_MAP_START( mstworld_io_map, AS_IO, 8, mitchell_state ) @@ -1105,7 +1105,7 @@ static TIMER_DEVICE_CALLBACK( mitchell_irq ) if (scanline == 240 || scanline == 0) { - 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); } @@ -1211,7 +1211,7 @@ static void spangbl_adpcm_int( device_t *device ) state->m_sample_buffer >>= 4; state->m_sample_select ^= 1; if(state->m_sample_select == 0) - device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/drivers/mjkjidai.c b/src/mame/drivers/mjkjidai.c index 0cbf5902b5f..411a67137f9 100644 --- a/src/mame/drivers/mjkjidai.c +++ b/src/mame/drivers/mjkjidai.c @@ -420,7 +420,7 @@ static INTERRUPT_GEN( vblank_irq ) mjkjidai_state *state = device->machine().driver_data(); 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/mjsister.c b/src/mame/drivers/mjsister.c index 75c0cbf315d..798cc4aa65f 100644 --- a/src/mame/drivers/mjsister.c +++ b/src/mame/drivers/mjsister.c @@ -43,7 +43,7 @@ public: UINT32 m_dac_busy; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; dac_device *m_dac; /* memory */ @@ -453,7 +453,7 @@ static MACHINE_START( mjsister ) state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x8000); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_dac = machine.device("dac"); state->save_item(NAME(state->m_dac_busy)); diff --git a/src/mame/drivers/model1.c b/src/mame/drivers/model1.c index cc6785b05d2..8533aab6497 100644 --- a/src/mame/drivers/model1.c +++ b/src/mame/drivers/model1.c @@ -722,7 +722,7 @@ static IRQ_CALLBACK(irq_callback) static void irq_init(running_machine &machine) { 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 TIMER_DEVICE_CALLBACK( model1_interrupt ) @@ -854,7 +854,7 @@ READ16_MEMBER(model1_state::snd_68k_ready_r) if ((sr & 0x0700) > 0x0100) { - device_spin_until_time(&space.device(), attotime::from_usec(40)); + space.device().execute().spin_until_time(attotime::from_usec(40)); return 0; // not ready yet, interrupts disabled } @@ -875,7 +875,7 @@ WRITE16_MEMBER(model1_state::snd_latch_to_68k_w) // signal the 68000 that there's data waiting machine().device("audiocpu")->execute().set_input_line(2, HOLD_LINE); // give the 68k time to reply - device_spin_until_time(&space.device(), attotime::from_usec(40)); + space.device().execute().spin_until_time(attotime::from_usec(40)); } static ADDRESS_MAP_START( model1_mem, AS_PROGRAM, 16, model1_state ) diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index 1832fa87ca0..4b60cdc2b52 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -187,7 +187,7 @@ static UINT32 copro_fifoout_pop(address_space *space) i960_stall(&space->device()); /* spin the main cpu and let the TGP catch up */ - device_spin_until_time(&space->device(), attotime::from_usec(100)); + space->device().execute().spin_until_time(attotime::from_usec(100)); return 0; } @@ -246,13 +246,13 @@ static void copro_fifoout_push(device_t *device, UINT32 data) { sharc_set_flag_input(device, 1, ASSERT_LINE); - //device_set_input_line(device, SHARC_INPUT_FLAG1, ASSERT_LINE); + //device->execute().set_input_line(SHARC_INPUT_FLAG1, ASSERT_LINE); } else { sharc_set_flag_input(device, 1, CLEAR_LINE); - //device_set_input_line(device, SHARC_INPUT_FLAG1, CLEAR_LINE); + //device->execute().set_input_line(SHARC_INPUT_FLAG1, CLEAR_LINE); } } } @@ -747,7 +747,7 @@ WRITE32_MEMBER(model2_state::geo_sharc_ctl1_w) { logerror("Boot geo, %d dwords\n", m_geocnt); machine().device("dsp2")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE); - //device_spin_until_time(&space.device(), attotime::from_usec(1000)); // Give the SHARC enough time to boot itself + //space.device().execute().spin_until_time(attotime::from_usec(1000)); // Give the SHARC enough time to boot itself } } @@ -976,7 +976,7 @@ static int snd_68k_ready_r(address_space *space) if ((sr & 0x0700) > 0x0100) { - device_spin_until_time(&space->device(), attotime::from_usec(40)); + space->device().execute().spin_until_time(attotime::from_usec(40)); return 0; // not ready yet, interrupts disabled } @@ -988,7 +988,7 @@ static void snd_latch_to_68k_w(address_space *space, int data) model2_state *state = space->machine().driver_data(); if (!snd_68k_ready_r(space)) { - device_spin_until_time(&space->device(), attotime::from_usec(40)); + space->device().execute().spin_until_time(attotime::from_usec(40)); } state->m_to_68k = data; @@ -996,7 +996,7 @@ static void snd_latch_to_68k_w(address_space *space, int data) space->machine().device("audiocpu")->execute().set_input_line(2, HOLD_LINE); // give the 68k time to notice - device_spin_until_time(&space->device(), attotime::from_usec(40)); + space->device().execute().spin_until_time(attotime::from_usec(40)); } READ32_MEMBER(model2_state::model2_serial_r) @@ -1024,7 +1024,7 @@ WRITE32_MEMBER(model2_state::model2_serial_w) scsp_midi_in(machine().device("scsp"), 0, data&0xff, 0); // give the 68k time to notice - device_spin_until_time(&space.device(), attotime::from_usec(40)); + space.device().execute().spin_until_time(attotime::from_usec(40)); } } @@ -1762,14 +1762,14 @@ static TIMER_DEVICE_CALLBACK(model2_interrupt) { state->m_intreq |= (1<<10); if (state->m_intena & (1<<10)) - device_set_input_line(state->m_maincpu, I960_IRQ3, ASSERT_LINE); + state->m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE); } if(scanline == 384/2) { state->m_intreq |= (1<<0); if (state->m_intena & (1<<0)) - device_set_input_line(state->m_maincpu, I960_IRQ0, ASSERT_LINE); + state->m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE); } } @@ -1782,21 +1782,21 @@ static TIMER_DEVICE_CALLBACK(model2c_interrupt) { state->m_intreq |= (1<<10); if (state->m_intena & (1<<10)) - device_set_input_line(state->m_maincpu, I960_IRQ3, ASSERT_LINE); + state->m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE); } if(scanline == 256) { state->m_intreq |= (1<<2); if (state->m_intena & (1<<2)) - device_set_input_line(state->m_maincpu, I960_IRQ2, ASSERT_LINE); + state->m_maincpu->set_input_line(I960_IRQ2, ASSERT_LINE); } if(scanline == 128) { state->m_intreq |= (1<<0); if (state->m_intena & (1<<0)) - device_set_input_line(state->m_maincpu, I960_IRQ0, ASSERT_LINE); + state->m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE); } } diff --git a/src/mame/drivers/mogura.c b/src/mame/drivers/mogura.c index 17e59e7a020..b14fb6ac449 100644 --- a/src/mame/drivers/mogura.c +++ b/src/mame/drivers/mogura.c @@ -21,7 +21,7 @@ public: tilemap_t *m_tilemap; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; dac_device *m_dac1; dac_device *m_dac2; DECLARE_WRITE8_MEMBER(mogura_tileram_w); @@ -192,7 +192,7 @@ static MACHINE_START( mogura ) { mogura_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_dac1 = machine.device("dac1"); state->m_dac2 = machine.device("dac2"); } diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c index 894c8644b25..5108ba28e71 100644 --- a/src/mame/drivers/moo.c +++ b/src/mame/drivers/moo.c @@ -122,7 +122,7 @@ static TIMER_CALLBACK( dmaend_callback ) { moo_state *state = machine.driver_data(); if (state->m_cur_control2 & 0x800) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } static INTERRUPT_GEN( moo_interrupt ) @@ -138,7 +138,7 @@ static INTERRUPT_GEN( moo_interrupt ) // trigger V-blank interrupt if (state->m_cur_control2 & 0x20) - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } static INTERRUPT_GEN( moobl_interrupt ) @@ -150,7 +150,7 @@ static INTERRUPT_GEN( moobl_interrupt ) state->m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); // trigger V-blank interrupt - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } WRITE16_MEMBER(moo_state::sound_cmd1_w) @@ -170,7 +170,7 @@ WRITE16_MEMBER(moo_state::sound_cmd2_w) WRITE16_MEMBER(moo_state::sound_irq_w) { - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); } READ16_MEMBER(moo_state::sound_status_r) @@ -427,8 +427,8 @@ static MACHINE_START( moo ) { moo_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("soundcpu"); state->m_k054539 = machine.device("k054539"); state->m_k053246 = machine.device("k053246"); state->m_k053251 = machine.device("k053251"); diff --git a/src/mame/drivers/mouser.c b/src/mame/drivers/mouser.c index 275cca59f89..e136850cb29 100644 --- a/src/mame/drivers/mouser.c +++ b/src/mame/drivers/mouser.c @@ -39,26 +39,26 @@ WRITE8_MEMBER(mouser_state::mouser_sound_interrupt_w) { //logerror("int %02x\n", data); m_sound_byte = data; - device_set_input_line(m_audiocpu, 0, ASSERT_LINE); + m_audiocpu->set_input_line(0, ASSERT_LINE); } READ8_MEMBER(mouser_state::mouser_sound_byte_r) { //logerror("sound r\n"); - device_set_input_line(m_audiocpu, 0, CLEAR_LINE); + m_audiocpu->set_input_line(0, CLEAR_LINE); return m_sound_byte; } WRITE8_MEMBER(mouser_state::mouser_sound_nmi_clear_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } static INTERRUPT_GEN( mouser_sound_nmi_assert ) { mouser_state *state = device->machine().driver_data(); if (BIT(state->m_nmi_enable, 0)) - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } static ADDRESS_MAP_START( mouser_map, AS_PROGRAM, 8, mouser_state ) @@ -187,8 +187,8 @@ static MACHINE_START( mouser ) { mouser_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_sound_byte)); state->save_item(NAME(state->m_nmi_enable)); diff --git a/src/mame/drivers/mrflea.c b/src/mame/drivers/mrflea.c index bc1ebdd2dd1..13c24f15297 100644 --- a/src/mame/drivers/mrflea.c +++ b/src/mame/drivers/mrflea.c @@ -85,7 +85,7 @@ WRITE8_MEMBER(mrflea_state::mrflea_io_w) { m_status |= 0x08; // pending command to IO CPU m_io = data; - device_set_input_line(m_subcpu, 0, HOLD_LINE ); + m_subcpu->set_input_line(0, HOLD_LINE ); } READ8_MEMBER(mrflea_state::mrflea_main_r) @@ -122,7 +122,7 @@ static TIMER_DEVICE_CALLBACK( mrflea_slave_interrupt ) int scanline = param; if ((scanline == 248) || (scanline == 248/2 && (state->m_status & 0x08))) - device_set_input_line(state->m_subcpu, 0, HOLD_LINE); + state->m_subcpu->set_input_line(0, HOLD_LINE); } READ8_MEMBER(mrflea_state::mrflea_interrupt_type_r) @@ -332,8 +332,8 @@ static MACHINE_START( mrflea ) { mrflea_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("sub"); state->save_item(NAME(state->m_gfx_bank)); state->save_item(NAME(state->m_io)); diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c index 68710289246..88e0e1c1f06 100644 --- a/src/mame/drivers/ms32.c +++ b/src/mame/drivers/ms32.c @@ -223,7 +223,7 @@ WRITE32_MEMBER(ms32_state::ms32_sound_w) machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); // give the Z80 time to respond - device_spin_until_time(&space.device(), attotime::from_usec(40)); + space.device().execute().spin_until_time(attotime::from_usec(40)); } READ32_MEMBER(ms32_state::ms32_sound_r) @@ -1284,7 +1284,7 @@ static IRQ_CALLBACK(irq_callback) for(i=15; i>=0 && !(state->m_irqreq & (1<m_irqreq &= ~(1<m_irqreq) - device_set_input_line(device, 0, CLEAR_LINE); + device->execute().set_input_line(0, CLEAR_LINE); return i; } @@ -1293,7 +1293,7 @@ static void irq_init(running_machine &machine) ms32_state *state = machine.driver_data(); 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/msisaac.c b/src/mame/drivers/msisaac.c index b8e9c590f33..5ed944af06b 100644 --- a/src/mame/drivers/msisaac.c +++ b/src/mame/drivers/msisaac.c @@ -26,7 +26,7 @@ static TIMER_CALLBACK( nmi_callback ) { msisaac_state *state = machine.driver_data(); 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; } @@ -47,7 +47,7 @@ WRITE8_MEMBER(msisaac_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; } } @@ -435,7 +435,7 @@ static MACHINE_START( msisaac ) { msisaac_state *state = machine.driver_data(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); /* video */ state->save_item(NAME(state->m_bg2_textbank)); diff --git a/src/mame/drivers/mugsmash.c b/src/mame/drivers/mugsmash.c index 5bfdcdf60c4..d5b2eb1561e 100644 --- a/src/mame/drivers/mugsmash.c +++ b/src/mame/drivers/mugsmash.c @@ -56,7 +56,7 @@ WRITE16_MEMBER(mugsmash_state::mugsmash_reg2_w) { case 1: 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 ); break; default: @@ -391,7 +391,7 @@ GFXDECODE_END static void irq_handler(device_t *device, int irq) { mugsmash_state *state = device->machine().driver_data(); - 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 = @@ -403,8 +403,8 @@ static MACHINE_START( mugsmash ) { mugsmash_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); } static MACHINE_CONFIG_START( mugsmash, mugsmash_state ) diff --git a/src/mame/drivers/munchmo.c b/src/mame/drivers/munchmo.c index afbdf88e45b..9423b9e1c27 100644 --- a/src/mame/drivers/munchmo.c +++ b/src/mame/drivers/munchmo.c @@ -46,29 +46,29 @@ static INTERRUPT_GEN( mnchmobl_vblank_irq ) munchmo_state *state = device->machine().driver_data(); if (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); - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } static INTERRUPT_GEN( mnchmobl_sound_irq ) { //munchmo_state *state = device->machine().driver_data(); - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } WRITE8_MEMBER(munchmo_state::mnchmobl_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 ); } WRITE8_MEMBER(munchmo_state::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); } READ8_MEMBER(munchmo_state::munchmo_ay1reset_r) @@ -310,8 +310,8 @@ static MACHINE_START( munchmo ) { munchmo_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_palette_bank)); state->save_item(NAME(state->m_flipscreen)); diff --git a/src/mame/drivers/mustache.c b/src/mame/drivers/mustache.c index 1b2f479b461..2c9eccb7e95 100644 --- a/src/mame/drivers/mustache.c +++ b/src/mame/drivers/mustache.c @@ -165,7 +165,7 @@ static TIMER_CALLBACK( clear_irq_cb ) static INTERRUPT_GEN( assert_irq ) { mustache_state *state = device->machine().driver_data(); - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); state->m_clear_irq_timer->adjust(downcast(device)->cycles_to_attotime(14288)); /* Timing here is an educated GUESS, Z80 /INT must stay high so the irq fires no less than TWICE per frame, else game doesn't work right. diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index 192d31ed2f2..95f5a031161 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -112,13 +112,13 @@ static TIMER_DEVICE_CALLBACK(mystwarr_interrupt) if (!(state->m_mw_irq_control & 0x01)) return; if(scanline == 240) - device_set_input_line(state->m_maincpu, M68K_IRQ_2, HOLD_LINE); + state->m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE); if(scanline == 0) - device_set_input_line(state->m_maincpu, M68K_IRQ_4, HOLD_LINE); + state->m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE); /* writes to LSB of 0x410000 port and clears a work RAM flag, almost likely not really necessary. */ -// device_set_input_line(state->m_maincpu, M68K_IRQ_6, HOLD_LINE); +// state->m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE); } static TIMER_DEVICE_CALLBACK(metamrph_interrupt) @@ -127,13 +127,13 @@ static TIMER_DEVICE_CALLBACK(metamrph_interrupt) int scanline = param; /* irq 4 has an irq routine in metamrph, but it's not really called */ -// device_set_input_line(state->m_maincpu, M68K_IRQ_4, HOLD_LINE); +// state->m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE); if(scanline == 24) - device_set_input_line(state->m_maincpu, M68K_IRQ_6, HOLD_LINE); + state->m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE); if(scanline == 248) - if (K053246_is_IRQ_enabled()) device_set_input_line(state->m_maincpu, M68K_IRQ_5, HOLD_LINE); + if (K053246_is_IRQ_enabled()) state->m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE); } static TIMER_DEVICE_CALLBACK(mchamp_interrupt) @@ -145,16 +145,16 @@ static TIMER_DEVICE_CALLBACK(mchamp_interrupt) if(scanline == 247) { - if (K053246_is_IRQ_enabled()) device_set_input_line(state->m_maincpu, M68K_IRQ_6, HOLD_LINE); + if (K053246_is_IRQ_enabled()) state->m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE); } if(scanline == 23) - device_set_input_line(state->m_maincpu, M68K_IRQ_2, HOLD_LINE); + state->m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE); } static INTERRUPT_GEN(ddd_interrupt) { - device_set_input_line(device, M68K_IRQ_5, HOLD_LINE); + device->execute().set_input_line(M68K_IRQ_5, HOLD_LINE); } diff --git a/src/mame/drivers/n8080.c b/src/mame/drivers/n8080.c index 304d7f4a53e..ee0a76f5546 100644 --- a/src/mame/drivers/n8080.c +++ b/src/mame/drivers/n8080.c @@ -434,7 +434,7 @@ static TIMER_DEVICE_CALLBACK( rst1_tick ) int state = n8080->m_inte ? ASSERT_LINE : CLEAR_LINE; /* V7 = 1, V6 = 0 */ - device_set_input_line_and_vector(n8080->m_maincpu, INPUT_LINE_IRQ0, state, 0xcf); + n8080->m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xcf); } static TIMER_DEVICE_CALLBACK( rst2_tick ) @@ -443,7 +443,7 @@ static TIMER_DEVICE_CALLBACK( rst2_tick ) int state = n8080->m_inte ? ASSERT_LINE : CLEAR_LINE; /* vblank */ - device_set_input_line_and_vector(n8080->m_maincpu, INPUT_LINE_IRQ0, state, 0xd7); + n8080->m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xd7); } WRITE_LINE_MEMBER(n8080_state::n8080_inte_callback) @@ -457,7 +457,7 @@ WRITE8_MEMBER(n8080_state::n8080_status_callback) if (data & I8085_STATUS_INTA) { /* interrupt acknowledge */ - device_set_input_line(device, INPUT_LINE_IRQ0, CLEAR_LINE); + device->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); } } @@ -473,7 +473,7 @@ static MACHINE_START( n8080 ) { n8080_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->save_item(NAME(state->m_shift_data)); state->save_item(NAME(state->m_shift_bits)); diff --git a/src/mame/drivers/namcofl.c b/src/mame/drivers/namcofl.c index ad8016705b4..ec4cbf2cb25 100644 --- a/src/mame/drivers/namcofl.c +++ b/src/mame/drivers/namcofl.c @@ -261,7 +261,7 @@ WRITE16_MEMBER(namcofl_state::mcu_shared_w) // C75 BIOS has a very short window on the CPU sync signal, so immediately let the i960 at it if ((offset == 0x6000/2) && (data & 0x80)) { - device_yield(&space.device()); + space.device().execute().yield(); } } @@ -548,21 +548,21 @@ static TIMER_DEVICE_CALLBACK( mcu_irq0_cb ) { namcofl_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_mcu, M37710_LINE_IRQ0, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE); } static TIMER_DEVICE_CALLBACK( mcu_irq2_cb ) { namcofl_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_mcu, M37710_LINE_IRQ2, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); } static TIMER_DEVICE_CALLBACK( mcu_adc_cb ) { namcofl_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_mcu, M37710_LINE_ADC, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); } diff --git a/src/mame/drivers/namcona1.c b/src/mame/drivers/namcona1.c index c90d1bb2495..91f22a72e21 100644 --- a/src/mame/drivers/namcona1.c +++ b/src/mame/drivers/namcona1.c @@ -968,7 +968,7 @@ static TIMER_DEVICE_CALLBACK( namcona1_interrupt ) { simulate_mcu( timer.machine() ); if (enabled & 8) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } // posirq, used with dolphin in Emeraldia's "how to play" attract mode @@ -978,7 +978,7 @@ static TIMER_DEVICE_CALLBACK( namcona1_interrupt ) if (posirq_scanline) timer.machine().primary_screen->update_partial(posirq_scanline); - device_set_input_line(state->m_maincpu, 3, HOLD_LINE); + state->m_maincpu->set_input_line(3, HOLD_LINE); } } @@ -993,11 +993,11 @@ static TIMER_DEVICE_CALLBACK( mcu_interrupt ) // vblank if (scanline == 224) - device_set_input_line(state->m_mcu, M37710_LINE_IRQ1, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_IRQ1, HOLD_LINE); // adc (timing guessed, when does this trigger?) if (scanline == 0) - device_set_input_line(state->m_mcu, M37710_LINE_ADC, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); } static const c140_interface C140_interface_typeA = diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c index 5cad337aa78..892802094aa 100644 --- a/src/mame/drivers/namconb1.c +++ b/src/mame/drivers/namconb1.c @@ -347,7 +347,7 @@ static INTERRUPT_GEN( namconb1_interrupt ) int scanline = (state->m_generic_paletteram_32[0x1808/4]&0xffff)-32; if((!state->m_vblank_irq_active) && (state->m_namconb_cpureg[0x04] & 0xf0)) { - device_set_input_line(device, state->m_namconb_cpureg[0x04] & 0xf, ASSERT_LINE); + device->execute().set_input_line(state->m_namconb_cpureg[0x04] & 0xf, ASSERT_LINE); state->m_vblank_irq_active = 1; } @@ -405,7 +405,7 @@ static INTERRUPT_GEN( namconb2_interrupt ) int scanline = (state->m_generic_paletteram_32[0x1808/4]&0xffff)-32; if((!state->m_vblank_irq_active) && state->m_namconb_cpureg[0x00]) { - device_set_input_line(device, state->m_namconb_cpureg[0x00], ASSERT_LINE); + device->execute().set_input_line(state->m_namconb_cpureg[0x00], ASSERT_LINE); state->m_vblank_irq_active = 1; } @@ -904,7 +904,7 @@ WRITE16_MEMBER(namconb1_state::nbmcu_shared_w) // C74 BIOS has a very short window on the CPU sync signal, so immediately let the '020 at it if ((offset == 0x6000/2) && (data & 0x80)) { - device_spin_until_time(&space.device(), downcast(&space.device())->cycles_to_attotime(300)); // was 300 + space.device().execute().spin_until_time(downcast(&space.device())->cycles_to_attotime(300)); // was 300 } } diff --git a/src/mame/drivers/namcos1.c b/src/mame/drivers/namcos1.c index e6b0af0004a..3319accb96a 100644 --- a/src/mame/drivers/namcos1.c +++ b/src/mame/drivers/namcos1.c @@ -357,12 +357,12 @@ WRITE8_MEMBER(namcos1_state::namcos1_sub_firq_w) WRITE8_MEMBER(namcos1_state::irq_ack_w) { - device_set_input_line(&space.device(), 0, CLEAR_LINE); + space.device().execute().set_input_line(0, CLEAR_LINE); } WRITE8_MEMBER(namcos1_state::firq_ack_w) { - device_set_input_line(&space.device(), M6809_FIRQ_LINE, CLEAR_LINE); + space.device().execute().set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); } diff --git a/src/mame/drivers/namcos11.c b/src/mame/drivers/namcos11.c index 5560efdc7b1..97d78e7238d 100644 --- a/src/mame/drivers/namcos11.c +++ b/src/mame/drivers/namcos11.c @@ -857,7 +857,7 @@ READ16_MEMBER(namcos11_state::c76_speedup_r) if ((space.device().safe_pc() == 0xc153) && (!(m_su_83 & 0xff00))) { - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } return m_su_83; @@ -1004,21 +1004,21 @@ static TIMER_DEVICE_CALLBACK( mcu_irq0_cb ) { namcos11_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_mcu, M37710_LINE_IRQ0, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE); } static TIMER_DEVICE_CALLBACK( mcu_irq2_cb ) { namcos11_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_mcu, M37710_LINE_IRQ2, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); } static TIMER_DEVICE_CALLBACK( mcu_adc_cb ) { namcos11_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_mcu, M37710_LINE_ADC, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); } static MACHINE_CONFIG_START( coh100, namcos11_state ) diff --git a/src/mame/drivers/namcos21.c b/src/mame/drivers/namcos21.c index fb390956a0d..1439a0dc021 100644 --- a/src/mame/drivers/namcos21.c +++ b/src/mame/drivers/namcos21.c @@ -578,7 +578,7 @@ WRITE16_MEMBER(namcos21_state::dspram16_w) offset == 0x103 && &space.device() == machine().device("maincpu")) { /* hack; synchronization for solvalou */ - device_yield(&space.device()); + space.device().execute().yield(); } } } /* dspram16_w */ diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c index e844ff2946e..83241c0ef9d 100644 --- a/src/mame/drivers/namcos22.c +++ b/src/mame/drivers/namcos22.c @@ -1356,9 +1356,9 @@ static void InitDSP( running_machine &machine ) { namcos22_state *state = machine.driver_data(); - device_set_input_line(state->m_master, INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */ - device_set_input_line(state->m_slave, INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */ - device_set_input_line(state->m_mcu, INPUT_LINE_RESET, ASSERT_LINE); /* MCU */ + state->m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */ + state->m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */ + state->m_mcu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* MCU */ } /* InitDSP */ READ16_MEMBER(namcos22_state::pdp_status_r) @@ -1513,14 +1513,14 @@ WRITE16_MEMBER(namcos22_state::slave_external_ram_w) static void HaltSlaveDSP( running_machine &machine ) { namcos22_state *state = machine.driver_data(); - device_set_input_line(state->m_slave, INPUT_LINE_RESET, ASSERT_LINE); + state->m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); namcos22_enable_slave_simulation(machine, 0); } static void EnableSlaveDSP( running_machine &machine ) { // namcos22_state *state = machine.driver_data(); -// device_set_input_line(state->m_slave, INPUT_LINE_RESET, CLEAR_LINE); +// state->m_slave->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); namcos22_enable_slave_simulation(machine, 1); } @@ -1693,11 +1693,11 @@ static TIMER_DEVICE_CALLBACK( dsp_master_serial_irq ) state->m_mSerialDataSlaveToMasterCurrent = state->m_mSerialDataSlaveToMasterNext; if(scanline == 480) - device_set_input_line(state->m_master, TMS32025_INT0, HOLD_LINE); + state->m_master->set_input_line(TMS32025_INT0, HOLD_LINE); else if((scanline % 2) == 0) { - device_set_input_line(state->m_master, TMS32025_RINT, HOLD_LINE); - device_set_input_line(state->m_master, TMS32025_XINT, HOLD_LINE); + state->m_master->set_input_line(TMS32025_RINT, HOLD_LINE); + state->m_master->set_input_line(TMS32025_XINT, HOLD_LINE); } } } @@ -1711,8 +1711,8 @@ static TIMER_DEVICE_CALLBACK( dsp_slave_serial_irq ) { if((scanline % 2) == 0) { - device_set_input_line(state->m_slave, TMS32025_RINT, HOLD_LINE); - device_set_input_line(state->m_slave, TMS32025_XINT, HOLD_LINE); + state->m_slave->set_input_line(TMS32025_RINT, HOLD_LINE); + state->m_slave->set_input_line(TMS32025_XINT, HOLD_LINE); } } } @@ -2109,7 +2109,7 @@ WRITE32_MEMBER(namcos22_state::namcos22s_system_controller_w) { // vblank m_irq_state &= ~1; - device_set_input_line(m_maincpu, nthbyte(m_system_controller, 0x00) & 7, CLEAR_LINE); + m_maincpu->set_input_line(nthbyte(m_system_controller, 0x00) & 7, CLEAR_LINE); } // irq level / enable irqs @@ -2120,9 +2120,9 @@ WRITE32_MEMBER(namcos22_state::namcos22s_system_controller_w) newreg = data >> 24 & 7; if (m_irq_state & 1 && oldreg != newreg) { - device_set_input_line(m_maincpu, oldreg, CLEAR_LINE); + m_maincpu->set_input_line(oldreg, CLEAR_LINE); if (newreg) - device_set_input_line(m_maincpu, newreg, ASSERT_LINE); + m_maincpu->set_input_line(newreg, ASSERT_LINE); else m_irq_state &= ~1; } @@ -2132,9 +2132,9 @@ WRITE32_MEMBER(namcos22_state::namcos22s_system_controller_w) if (offset == 0x16/4 && mem_mask & 0x0000ff00) { if (data & 0x0000ff00) - device_set_input_line(m_mcu, INPUT_LINE_RESET, CLEAR_LINE); + m_mcu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); else - device_set_input_line(m_mcu, INPUT_LINE_RESET, ASSERT_LINE); + m_mcu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } // dsp control @@ -2146,20 +2146,20 @@ WRITE32_MEMBER(namcos22_state::namcos22s_system_controller_w) { if( newreg == 0 ) { /* disable DSPs */ - device_set_input_line(m_master, INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */ - device_set_input_line(m_slave, INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */ + m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */ + m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */ namcos22_enable_slave_simulation(machine(), 0); m_mbEnableDspIrqs = 0; } else if( newreg == 1 ) { /* enable dsp and rendering subsystem */ - device_set_input_line(m_master, INPUT_LINE_RESET, CLEAR_LINE); + m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); namcos22_enable_slave_simulation(machine(), 1); m_mbEnableDspIrqs = 1; } else if( newreg == 0xff ) { /* used to upload game-specific code to master/slave dsps */ - device_set_input_line(m_master, INPUT_LINE_RESET, CLEAR_LINE); + m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); m_mbEnableDspIrqs = 0; } } @@ -2189,7 +2189,7 @@ static INTERRUPT_GEN( namcos22s_interrupt ) { // vblank irq state->m_irq_state |= 1; - device_set_input_line(device, nthbyte(state->m_system_controller, 0x00) & 7, ASSERT_LINE); + device->execute().set_input_line(nthbyte(state->m_system_controller, 0x00) & 7, ASSERT_LINE); } } @@ -2239,7 +2239,7 @@ WRITE32_MEMBER(namcos22_state::namcos22_system_controller_w) { // vblank m_irq_state &= ~1; - device_set_input_line(m_maincpu, nthbyte(m_system_controller, 0x04) & 7, CLEAR_LINE); + m_maincpu->set_input_line(nthbyte(m_system_controller, 0x04) & 7, CLEAR_LINE); } // irq level / enable irqs @@ -2250,9 +2250,9 @@ WRITE32_MEMBER(namcos22_state::namcos22_system_controller_w) newreg = data >> 24 & 7; if (m_irq_state & 1 && oldreg != newreg) { - device_set_input_line(m_maincpu, oldreg, CLEAR_LINE); + m_maincpu->set_input_line(oldreg, CLEAR_LINE); if (newreg) - device_set_input_line(m_maincpu, newreg, ASSERT_LINE); + m_maincpu->set_input_line(newreg, ASSERT_LINE); else m_irq_state &= ~1; } @@ -2262,9 +2262,9 @@ WRITE32_MEMBER(namcos22_state::namcos22_system_controller_w) if (offset == 0x1a/4 && mem_mask & 0xff000000) { if (data & 0xff000000) - device_set_input_line(m_mcu, INPUT_LINE_RESET, CLEAR_LINE); + m_mcu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); else - device_set_input_line(m_mcu, INPUT_LINE_RESET, ASSERT_LINE); + m_mcu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } // dsp control @@ -2276,20 +2276,20 @@ WRITE32_MEMBER(namcos22_state::namcos22_system_controller_w) { if( newreg == 0 ) { /* disable DSPs */ - device_set_input_line(m_master, INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */ - device_set_input_line(m_slave, INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */ + m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */ + m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */ namcos22_enable_slave_simulation(machine(), 0); m_mbEnableDspIrqs = 0; } else if( newreg == 1 ) { /* enable dsp and rendering subsystem */ - device_set_input_line(m_master, INPUT_LINE_RESET, CLEAR_LINE); + m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); namcos22_enable_slave_simulation(machine(), 1); m_mbEnableDspIrqs = 1; } else if( newreg == 0xff ) { /* used to upload game-specific code to master/slave dsps */ - device_set_input_line(m_master, INPUT_LINE_RESET, CLEAR_LINE); + m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); m_mbEnableDspIrqs = 0; } } @@ -2369,7 +2369,7 @@ static INTERRUPT_GEN( namcos22_interrupt ) { // vblank irq state->m_irq_state |= 1; - device_set_input_line(device, nthbyte(state->m_system_controller, 0x04) & 7, ASSERT_LINE); + device->execute().set_input_line(nthbyte(state->m_system_controller, 0x04) & 7, ASSERT_LINE); } } @@ -2930,11 +2930,11 @@ static TIMER_DEVICE_CALLBACK( mcu_irq ) /* TODO: real sources of these */ if(scanline == 480) - device_set_input_line(state->m_mcu, M37710_LINE_IRQ0, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE); else if(scanline == 500) - device_set_input_line(state->m_mcu, M37710_LINE_ADC, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); else if(scanline == 0) - device_set_input_line(state->m_mcu, M37710_LINE_IRQ2, HOLD_LINE); + state->m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); } static MACHINE_RESET(namcos22) @@ -5411,7 +5411,7 @@ READ16_MEMBER(namcos22_state::mcu141_speedup_r) { if ((space.device().safe_pc() == 0xc12d) && (!(m_su_82 & 0xff00))) { - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } return m_su_82; @@ -5427,7 +5427,7 @@ READ16_MEMBER(namcos22_state::mcu130_speedup_r) { if ((space.device().safe_pc() == 0xc12a) && (!(m_su_82 & 0xff00))) { - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } return m_su_82; @@ -5438,7 +5438,7 @@ READ16_MEMBER(namcos22_state::mcuc74_speedup_r) { if (((space.device().safe_pc() == 0xc0df) || (space.device().safe_pc() == 0xc101)) && (!(m_su_82 & 0xff00))) { - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } return m_su_82; diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c index ea1ce884a71..1396bbf15ee 100644 --- a/src/mame/drivers/namcos23.c +++ b/src/mame/drivers/namcos23.c @@ -1711,7 +1711,7 @@ WRITE16_MEMBER(namcos23_state::s23_ctl_w) case 5: if(m_ctl_vbl_active) { m_ctl_vbl_active = false; - device_set_input_line(&space.device(), MIPS3_IRQ0, CLEAR_LINE); + space.device().execute().set_input_line(MIPS3_IRQ0, CLEAR_LINE); } break; @@ -2437,7 +2437,7 @@ static INTERRUPT_GEN(s23_interrupt) if(!state->m_ctl_vbl_active) { state->m_ctl_vbl_active = true; - device_set_input_line(device, MIPS3_IRQ0, ASSERT_LINE); + device->execute().set_input_line(MIPS3_IRQ0, ASSERT_LINE); } render.cur = !render.cur; diff --git a/src/mame/drivers/nemesis.c b/src/mame/drivers/nemesis.c index 4789706eacf..45ae796da9f 100644 --- a/src/mame/drivers/nemesis.c +++ b/src/mame/drivers/nemesis.c @@ -61,7 +61,7 @@ static INTERRUPT_GEN( nemesis_interrupt ) nemesis_state *state = device->machine().driver_data(); if (state->m_irq_on) - device_set_input_line(device, 1, HOLD_LINE); + device->execute().set_input_line(1, HOLD_LINE); } static INTERRUPT_GEN( blkpnthr_interrupt ) @@ -69,7 +69,7 @@ static INTERRUPT_GEN( blkpnthr_interrupt ) nemesis_state *state = device->machine().driver_data(); if (state->m_irq_on) - device_set_input_line(device, 2, HOLD_LINE); + device->execute().set_input_line(2, HOLD_LINE); } static TIMER_DEVICE_CALLBACK( konamigt_interrupt ) @@ -78,10 +78,10 @@ static TIMER_DEVICE_CALLBACK( konamigt_interrupt ) int scanline = param; if (scanline == 240 && state->m_irq_on && (timer.machine().primary_screen->frame_number() & 1) == 0) - 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_on) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); } static TIMER_DEVICE_CALLBACK( gx400_interrupt ) @@ -90,13 +90,13 @@ static TIMER_DEVICE_CALLBACK( gx400_interrupt ) int scanline = param; if (scanline == 240 && state->m_irq1_on && (timer.machine().primary_screen->frame_number() & 1) == 0) - 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_on) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); if (scanline == 120 && state->m_irq4_on) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } @@ -1490,7 +1490,7 @@ static void sound_irq(device_t *device, int state) { /* Interrupts _are_ generated, I wonder where they go.. */ // nemesis_state *driver_state = device->machine().driver_data(); -// device_set_input_line(driver_state->audiocpu, 0, HOLD_LINE); +// driver_state->audiocpu->set_input_line(0, HOLD_LINE); } static const ym2151_interface ym2151_config = diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c index 5cc97173237..813717104d3 100644 --- a/src/mame/drivers/neogeo.c +++ b/src/mame/drivers/neogeo.c @@ -351,20 +351,20 @@ static void start_interrupt_timers( running_machine &machine ) static void audio_cpu_irq(device_t *device, int assert) { neogeo_state *state = device->machine().driver_data(); - device_set_input_line(state->m_audiocpu, 0, assert ? ASSERT_LINE : CLEAR_LINE); + state->m_audiocpu->set_input_line(0, assert ? ASSERT_LINE : CLEAR_LINE); } static void audio_cpu_assert_nmi(running_machine &machine) { neogeo_state *state = machine.driver_data(); - 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(neogeo_state::audio_cpu_clear_nmi_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } @@ -1012,8 +1012,8 @@ static MACHINE_START( neogeo ) state->m_irq3_pending = 1; /* get devices */ - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_upd4990a = machine.device("upd4990a"); /* register state save */ diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c index 8c6fcb20659..1473364b5e7 100644 --- a/src/mame/drivers/nightgal.c +++ b/src/mame/drivers/nightgal.c @@ -48,8 +48,8 @@ public: required_shared_ptr m_comms_ram; /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; /* memory */ UINT8 m_blit_buffer[256*256]; @@ -246,7 +246,7 @@ WRITE8_MEMBER(nightgal_state::sexygal_nsc_true_blitter_w) count++; } } - //device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE ); + //m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); } } } @@ -322,7 +322,7 @@ master-slave algorithm #ifdef UNUSED_CODE WRITE8_MEMBER(nightgal_state::nsc_latch_w) { - device_set_input_line(m_subcpu, 0, HOLD_LINE ); + m_subcpu->set_input_line(0, HOLD_LINE ); } READ8_MEMBER(nightgal_state::nsc_latch_r) @@ -369,14 +369,14 @@ WRITE8_MEMBER(nightgal_state::royalqn_blitter_1_w) WRITE8_MEMBER(nightgal_state::royalqn_blitter_2_w) { m_blit_raw_data[2] = data; - device_set_input_line(m_subcpu, 0, ASSERT_LINE ); + m_subcpu->set_input_line(0, ASSERT_LINE ); } READ8_MEMBER(nightgal_state::royalqn_nsc_blit_r) { if(offset == 2) - device_set_input_line(m_subcpu, 0, CLEAR_LINE ); + m_subcpu->set_input_line(0, CLEAR_LINE ); return m_blit_raw_data[offset]; } @@ -834,8 +834,8 @@ static MACHINE_START( nightgal ) { nightgal_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("sub"); state->save_item(NAME(state->m_nsc_latch)); state->save_item(NAME(state->m_z80_latch)); diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c index b08d22edfe3..a7db299dc8b 100644 --- a/src/mame/drivers/ninjakd2.c +++ b/src/mame/drivers/ninjakd2.c @@ -168,7 +168,7 @@ static void omegaf_io_protection_reset(running_machine &machine); static INTERRUPT_GEN( ninjakd2_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xd7); /* RST 10h */ + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ } diff --git a/src/mame/drivers/ninjaw.c b/src/mame/drivers/ninjaw.c index 77aec683fbd..0d3af52080b 100644 --- a/src/mame/drivers/ninjaw.c +++ b/src/mame/drivers/ninjaw.c @@ -331,7 +331,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 !! */ ninjaw_state *state = machine.driver_data(); - device_set_input_line(state->m_subcpu, INPUT_LINE_RESET, (state->m_cpua_ctrl & 0x1) ? CLEAR_LINE : ASSERT_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_RESET, (state->m_cpua_ctrl & 0x1) ? CLEAR_LINE : ASSERT_LINE); } @@ -645,7 +645,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { ninjaw_state *state = device->machine().driver_data(); - 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 = @@ -806,9 +806,9 @@ static MACHINE_START( ninjaw ) state->membank("bank10")->configure_entries(0, 8, state->memregion("audiocpu")->base() + 0xc000, 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.device("sub"); state->m_tc0140syt = machine.device("tc0140syt"); state->m_tc0100scn_1 = machine.device("tc0100scn_1"); state->m_tc0100scn_2 = machine.device("tc0100scn_2"); diff --git a/src/mame/drivers/niyanpai.c b/src/mame/drivers/niyanpai.c index b863aafbf3e..3289e324a1e 100644 --- a/src/mame/drivers/niyanpai.c +++ b/src/mame/drivers/niyanpai.c @@ -929,7 +929,7 @@ INPUT_PORTS_END static INTERRUPT_GEN( niyanpai_interrupt ) { - device_set_input_line_and_vector(device, 1, HOLD_LINE,0x100/4); + device->execute().set_input_line_and_vector(1, HOLD_LINE,0x100/4); } static const z80_daisy_config daisy_chain_sound[] = diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index 80cb156fedc..065ef6035fd 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -256,8 +256,8 @@ public: UINT8 m_gfx_bank; /* devices */ - device_t *m_maincpu; - device_t *m_soundcpu; + cpu_device *m_maincpu; + cpu_device *m_soundcpu; DECLARE_WRITE16_MEMBER(fg_videoram_w); DECLARE_WRITE16_MEMBER(bg_videoram_w); DECLARE_WRITE16_MEMBER(nmg5_soundlatch_w); @@ -294,7 +294,7 @@ WRITE16_MEMBER(nmg5_state::nmg5_soundlatch_w) if (ACCESSING_BITS_0_7) { soundlatch_byte_w(space, 0, data & 0xff); - device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); + m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -974,7 +974,7 @@ GFXDECODE_END static void soundirq( device_t *device, int state ) { nmg5_state *driver_state = device->machine().driver_data(); - device_set_input_line(driver_state->m_soundcpu, 0, state); + driver_state->m_soundcpu->set_input_line(0, state); } static const ym3812_interface ym3812_intf = @@ -986,8 +986,8 @@ static MACHINE_START( nmg5 ) { nmg5_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_soundcpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_soundcpu = machine.device("soundcpu"); state->save_item(NAME(state->m_gfx_bank)); state->save_item(NAME(state->m_priority_reg)); diff --git a/src/mame/drivers/nsmpoker.c b/src/mame/drivers/nsmpoker.c index a564ead9f88..b862c721d30 100644 --- a/src/mame/drivers/nsmpoker.c +++ b/src/mame/drivers/nsmpoker.c @@ -146,7 +146,7 @@ static PALETTE_INIT( nsmpoker ) static INTERRUPT_GEN( nsmpoker_interrupt ) { - 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 } //WRITE8_MEMBER(nsmpoker_state::debug_w) diff --git a/src/mame/drivers/nss.c b/src/mame/drivers/nss.c index 7d9c426d636..4403bb22925 100644 --- a/src/mame/drivers/nss.c +++ b/src/mame/drivers/nss.c @@ -556,10 +556,10 @@ WRITE8_MEMBER(nss_state::port_01_w) m_cart_sel = (data & 0xc) >> 2; - device_set_input_line(m_maincpu, INPUT_LINE_HALT, (data & 2) ? CLEAR_LINE : ASSERT_LINE); - device_set_input_line(m_soundcpu, INPUT_LINE_HALT, (data & 2) ? CLEAR_LINE : ASSERT_LINE); - device_set_input_line(m_maincpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); - device_set_input_line(m_soundcpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, (data & 2) ? CLEAR_LINE : ASSERT_LINE); + m_soundcpu->set_input_line(INPUT_LINE_HALT, (data & 2) ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); + m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); /* also reset the device */ if((data & 1) == 0) spc700_reset(machine().device("spc700")); @@ -821,7 +821,7 @@ static INTERRUPT_GEN ( nss_vblank_irq ) nss_state *state = device->machine().driver_data(); 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_RESET( nss ) @@ -831,8 +831,8 @@ static MACHINE_RESET( nss ) MACHINE_RESET_CALL( snes ); /* start with both CPUs disabled */ - device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, ASSERT_LINE); - device_set_input_line(state->m_soundcpu, INPUT_LINE_RESET, ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); + state->m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); state->m_game_over_flag = 1; state->m_joy_flag = 1; diff --git a/src/mame/drivers/nycaptor.c b/src/mame/drivers/nycaptor.c index b73ade6628f..fb202016c90 100644 --- a/src/mame/drivers/nycaptor.c +++ b/src/mame/drivers/nycaptor.c @@ -202,7 +202,7 @@ Stephh's additional notes (based on the game Z80 code and some tests) : WRITE8_MEMBER(nycaptor_state::sub_cpu_halt_w) { - device_set_input_line(m_subcpu, INPUT_LINE_HALT, (data) ? ASSERT_LINE : CLEAR_LINE); + m_subcpu->set_input_line(INPUT_LINE_HALT, (data) ? ASSERT_LINE : CLEAR_LINE); } READ8_MEMBER(nycaptor_state::from_snd_r) @@ -249,7 +249,7 @@ READ8_MEMBER(nycaptor_state::nycaptor_bx_r) WRITE8_MEMBER(nycaptor_state::sound_cpu_reset_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_RESET, (data&1 )? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data&1 )? ASSERT_LINE : CLEAR_LINE); } @@ -275,7 +275,7 @@ static TIMER_CALLBACK( nmi_callback ) { nycaptor_state *state = machine.driver_data(); 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; } @@ -297,7 +297,7 @@ WRITE8_MEMBER(nycaptor_state::nmi_enable_w) 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; } } @@ -767,9 +767,9 @@ static MACHINE_START( nycaptor ) { nycaptor_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.device("sub"); state->m_mcu = machine.device("mcu"); state->save_item(NAME(state->m_generic_control_reg)); diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index 799116ea134..0fc528d35a4 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -107,8 +107,8 @@ public: UINT16 m_star_shift_reg; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_audiocpu2; device_t *m_ic48_1; mc6845_device *m_mc6845; @@ -150,13 +150,13 @@ WRITE_LINE_MEMBER(nyny_state::main_cpu_irq) { int combined_state = m_pia1->irq_a_state() | m_pia1->irq_b_state() | m_pia2->irq_b_state(); - device_set_input_line(m_maincpu, M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); } WRITE_LINE_MEMBER(nyny_state::main_cpu_firq) { - device_set_input_line(m_maincpu, M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); } @@ -226,7 +226,7 @@ WRITE8_MEMBER(nyny_state::pia_2_port_b_w) m_star_enable = data & 0x10; /* bits 5-7 go to the music board connector */ - audio_2_command_w(*m_maincpu->memory().space(AS_PROGRAM), 0, data & 0xe0); + audio_2_command_w(*m_maincpu->space(AS_PROGRAM), 0, data & 0xe0); } @@ -448,7 +448,7 @@ WRITE8_MEMBER(nyny_state::audio_1_command_w) { soundlatch_byte_w(space, 0, data); - device_set_input_line(m_audiocpu, M6800_IRQ_LINE, HOLD_LINE); + m_audiocpu->set_input_line(M6800_IRQ_LINE, HOLD_LINE); } @@ -456,7 +456,7 @@ WRITE8_MEMBER(nyny_state::audio_1_answer_w) { soundlatch3_byte_w(space, 0, data); - device_set_input_line(m_maincpu, M6809_IRQ_LINE, HOLD_LINE); + m_maincpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE); } @@ -501,7 +501,7 @@ WRITE8_MEMBER(nyny_state::audio_2_command_w) { soundlatch2_byte_w(space, 0, (data & 0x60) >> 5); - device_set_input_line(m_audiocpu2, M6800_IRQ_LINE, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE); + m_audiocpu2->execute().set_input_line(M6800_IRQ_LINE, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE); } @@ -677,8 +677,8 @@ static MACHINE_START( nyny ) { nyny_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_audiocpu2 = machine.device("audio2"); state->m_ic48_1 = machine.device("ic48_1"); state->m_mc6845 = machine.device("crtc"); diff --git a/src/mame/drivers/ojankohs.c b/src/mame/drivers/ojankohs.c index 7f370f6bbd2..c7e03a40316 100644 --- a/src/mame/drivers/ojankohs.c +++ b/src/mame/drivers/ojankohs.c @@ -89,7 +89,7 @@ static void ojankohs_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_maincpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(ojankohs_state::ojankoc_ctrl_w) @@ -793,7 +793,7 @@ static MACHINE_START( common ) { ojankohs_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_msm = machine.device("msm"); state->save_item(NAME(state->m_gfxreg)); diff --git a/src/mame/drivers/oneshot.c b/src/mame/drivers/oneshot.c index 86866426c3a..39673966bef 100644 --- a/src/mame/drivers/oneshot.c +++ b/src/mame/drivers/oneshot.c @@ -332,7 +332,7 @@ GFXDECODE_END static void irq_handler(device_t *device, int irq) { oneshot_state *state = device->machine().driver_data(); - 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 ym3812_interface ym3812_config = @@ -344,8 +344,8 @@ static MACHINE_START( oneshot ) { oneshot_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_gun_x_p1)); state->save_item(NAME(state->m_gun_y_p1)); diff --git a/src/mame/drivers/onetwo.c b/src/mame/drivers/onetwo.c index 1dacaa2f0c4..72e596fe176 100644 --- a/src/mame/drivers/onetwo.c +++ b/src/mame/drivers/onetwo.c @@ -64,8 +64,8 @@ public: tilemap_t *m_fg_tilemap; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(onetwo_fgram_w); DECLARE_WRITE8_MEMBER(onetwo_cpubank_w); DECLARE_WRITE8_MEMBER(onetwo_coin_counters_w); @@ -133,7 +133,7 @@ WRITE8_MEMBER(onetwo_state::onetwo_coin_counters_w) WRITE8_MEMBER(onetwo_state::onetwo_soundlatch_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 set_color(running_machine &machine, int offset) @@ -331,7 +331,7 @@ GFXDECODE_END static void irqhandler(device_t *device, int linestate) { onetwo_state *state = device->machine().driver_data(); - device_set_input_line(state->m_audiocpu, 0, linestate); + state->m_audiocpu->set_input_line(0, linestate); } static const ym3812_interface ym3812_config = @@ -352,8 +352,8 @@ static MACHINE_START( onetwo ) state->membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); } static MACHINE_CONFIG_START( onetwo, onetwo_state ) diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index 7d2d8df5caa..93782debaab 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -693,7 +693,7 @@ GFXDECODE_END static void irq_handler( device_t *device, int irq ) { opwolf_state *state = device->machine().driver_data(); - 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); } diff --git a/src/mame/drivers/orbit.c b/src/mame/drivers/orbit.c index 82bf20d8ae9..9001824f6ce 100644 --- a/src/mame/drivers/orbit.c +++ b/src/mame/drivers/orbit.c @@ -36,20 +36,20 @@ static TIMER_DEVICE_CALLBACK( nmi_32v ) orbit_state *state = timer.machine().driver_data(); int scanline = param; int nmistate = (scanline & 32) && (state->m_misc_flags & 4); - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, nmistate ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, nmistate ? ASSERT_LINE : CLEAR_LINE); } static TIMER_CALLBACK( irq_off ) { orbit_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 0, CLEAR_LINE); + state->m_maincpu->set_input_line(0, CLEAR_LINE); } static INTERRUPT_GEN( orbit_interrupt ) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); device->machine().scheduler().timer_set(device->machine().primary_screen->time_until_vblank_end(), FUNC(irq_off)); } @@ -275,7 +275,7 @@ static MACHINE_START( orbit ) { orbit_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_discrete = machine.device("discrete"); state->save_item(NAME(state->m_misc_flags)); diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c index e5dc1535f25..834c105b9cb 100644 --- a/src/mame/drivers/othello.c +++ b/src/mame/drivers/othello.c @@ -69,7 +69,7 @@ public: int m_n7751_busy; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; mc6845_device *m_mc6845; device_t *m_n7751; device_t *m_ay1; @@ -153,8 +153,8 @@ WRITE8_MEMBER(othello_state::unk_8a_w) m_n7751_command = (data & 0x07); - device_set_input_line(m_n7751, 0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); - //device_set_input_line(m_n7751, 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE); + m_n7751->execute().set_input_line(0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); + //m_n7751->execute().set_input_line(0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE); machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); */ @@ -384,7 +384,7 @@ static MACHINE_START( othello ) { othello_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_mc6845 = machine.device("crtc"); state->m_n7751 = machine.device("n7751"); state->m_ay1 = machine.device("ay1"); diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c index 34842174c68..ff1e7d2255a 100644 --- a/src/mame/drivers/othunder.c +++ b/src/mame/drivers/othunder.c @@ -252,8 +252,8 @@ TODO: static void update_irq( running_machine &machine ) { othunder_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 6, state->m_ad_irq ? ASSERT_LINE : CLEAR_LINE); - device_set_input_line(state->m_maincpu, 5, state->m_vblank_irq ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(6, state->m_ad_irq ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(5, state->m_vblank_irq ? ASSERT_LINE : CLEAR_LINE); } WRITE16_MEMBER(othunder_state::irq_ack_w) @@ -630,7 +630,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { othunder_state *state = device->machine().driver_data(); - 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 = @@ -676,8 +676,8 @@ static MACHINE_START( othunder ) state->membank("bank10")->configure_entries(0, 4, state->memregion("audiocpu")->base() + 0xc000, 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_eeprom = machine.device("eeprom"); state->m_tc0220ioc = machine.device("tc0220ioc"); state->m_tc0100scn = machine.device("tc0100scn"); diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c index 0c81567162a..8745ec22a6c 100644 --- a/src/mame/drivers/overdriv.c +++ b/src/mame/drivers/overdriv.c @@ -91,7 +91,7 @@ static INTERRUPT_GEN( cpuB_interrupt ) overdriv_state *state = device->machine().driver_data(); if (k053246_is_irq_enabled(state->m_k053246)) - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } @@ -101,7 +101,7 @@ WRITE16_MEMBER(overdriv_state::cpuA_ctrl_w) if (ACCESSING_BITS_0_7) { /* bit 0 probably enables the second 68000 */ - device_set_input_line(m_subcpu, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); + m_subcpu->set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); /* bit 1 is clear during service mode - function unknown */ @@ -148,17 +148,17 @@ READ8_MEMBER(overdriv_state::overdriv_2_sound_r) WRITE16_MEMBER(overdriv_state::overdriv_soundirq_w) { - device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE); + m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE); } WRITE16_MEMBER(overdriv_state::overdriv_cpuB_irq5_w) { - device_set_input_line(m_subcpu, 5, HOLD_LINE); + m_subcpu->set_input_line(5, HOLD_LINE); } WRITE16_MEMBER(overdriv_state::overdriv_cpuB_irq6_w) { - device_set_input_line(m_subcpu, 6, HOLD_LINE); + m_subcpu->set_input_line(6, HOLD_LINE); } static ADDRESS_MAP_START( overdriv_master_map, AS_PROGRAM, 16, overdriv_state ) @@ -284,9 +284,9 @@ static MACHINE_START( overdriv ) { overdriv_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.device("sub"); state->m_k051316_1 = machine.device("k051316_1"); state->m_k051316_2 = machine.device("k051316_2"); state->m_k053260_1 = machine.device("k053260_1"); diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c index f130e1e0dc9..37d3f554c7a 100644 --- a/src/mame/drivers/pacman.c +++ b/src/mame/drivers/pacman.c @@ -405,7 +405,7 @@ static INTERRUPT_GEN( vblank_irq ) pacman_state *state = device->machine().driver_data(); if(state->m_irq_mask) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static INTERRUPT_GEN( vblank_nmi ) @@ -413,7 +413,7 @@ static INTERRUPT_GEN( vblank_nmi ) pacman_state *state = device->machine().driver_data(); if(state->m_irq_mask) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(pacman_state::irq_mask_w) @@ -423,8 +423,8 @@ WRITE8_MEMBER(pacman_state::irq_mask_w) WRITE8_MEMBER(pacman_state::pacman_interrupt_vector_w) { - device_set_input_line_vector(m_maincpu, 0, data); - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line_vector(0, data); + m_maincpu->set_input_line(0, CLEAR_LINE); } @@ -488,7 +488,7 @@ WRITE8_MEMBER(pacman_state::piranha_interrupt_vector_w) { if (data == 0xfa) data = 0x78; if (data == 0xfc) data = 0xfc; - device_set_input_line_vector(m_maincpu, 0, data ); + m_maincpu->set_input_line_vector(0, data ); } @@ -497,7 +497,7 @@ WRITE8_MEMBER(pacman_state::nmouse_interrupt_vector_w) if (data == 0xbf) data = 0x3c; if (data == 0xc6) data = 0x40; if (data == 0xfc) data = 0xfc; - device_set_input_line_vector(m_maincpu, 0, data ); + m_maincpu->set_input_line_vector(0, data ); } @@ -697,7 +697,7 @@ READ8_MEMBER(pacman_state::bigbucks_question_r) 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); } WRITE8_MEMBER(pacman_state::porky_banking_w) diff --git a/src/mame/drivers/pandoras.c b/src/mame/drivers/pandoras.c index 96b9c723968..3b26df5c2a0 100644 --- a/src/mame/drivers/pandoras.c +++ b/src/mame/drivers/pandoras.c @@ -40,7 +40,7 @@ static INTERRUPT_GEN( pandoras_master_interrupt ) pandoras_state *state = device->machine().driver_data(); if (state->m_irq_enable_a) - device_set_input_line(device, M6809_IRQ_LINE, HOLD_LINE); + device->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE); } static INTERRUPT_GEN( pandoras_slave_interrupt ) @@ -48,7 +48,7 @@ static INTERRUPT_GEN( pandoras_slave_interrupt ) pandoras_state *state = device->machine().driver_data(); if (state->m_irq_enable_b) - device_set_input_line(device, M6809_IRQ_LINE, HOLD_LINE); + device->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(pandoras_state::pandoras_int_control_w) @@ -66,7 +66,7 @@ WRITE8_MEMBER(pandoras_state::pandoras_int_control_w) switch (offset) { case 0x00: if (!data) - device_set_input_line(m_maincpu, M6809_IRQ_LINE, CLEAR_LINE); + m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); m_irq_enable_a = data; break; case 0x02: coin_counter_w(machine(), 0,data & 0x01); @@ -76,10 +76,10 @@ WRITE8_MEMBER(pandoras_state::pandoras_int_control_w) case 0x05: pandoras_flipscreen_w(space, 0, data); break; case 0x06: if (!data) - device_set_input_line(m_subcpu, M6809_IRQ_LINE, CLEAR_LINE); + m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); m_irq_enable_b = data; break; - case 0x07: device_set_input_line(m_subcpu, INPUT_LINE_NMI, PULSE_LINE); + case 0x07: m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); break; default: logerror("%04x: (irq_ctrl) write %02x to %02x\n",space.device().safe_pc(), data, offset); @@ -91,7 +91,7 @@ WRITE8_MEMBER(pandoras_state::pandoras_cpua_irqtrigger_w) { if (!m_firq_old_data_a && data) - device_set_input_line(m_maincpu, M6809_FIRQ_LINE, HOLD_LINE); + m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); m_firq_old_data_a = data; } @@ -100,14 +100,14 @@ WRITE8_MEMBER(pandoras_state::pandoras_cpub_irqtrigger_w) { if (!m_firq_old_data_b && data) - device_set_input_line(m_subcpu, M6809_FIRQ_LINE, HOLD_LINE); + m_subcpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); m_firq_old_data_b = data; } WRITE8_MEMBER(pandoras_state::pandoras_i8039_irqtrigger_w) { - device_set_input_line(m_mcu, 0, ASSERT_LINE); + m_mcu->set_input_line(0, ASSERT_LINE); } WRITE8_MEMBER(pandoras_state::i8039_irqen_and_status_w) @@ -115,7 +115,7 @@ WRITE8_MEMBER(pandoras_state::i8039_irqen_and_status_w) /* bit 7 enables IRQ */ if ((data & 0x80) == 0) - device_set_input_line(m_mcu, 0, CLEAR_LINE); + m_mcu->set_input_line(0, CLEAR_LINE); /* bit 5 goes to 8910 port A */ m_i8039_status = (data & 0x20) >> 5; @@ -123,7 +123,7 @@ WRITE8_MEMBER(pandoras_state::i8039_irqen_and_status_w) WRITE8_MEMBER(pandoras_state::pandoras_z80_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); } diff --git a/src/mame/drivers/pangofun.c b/src/mame/drivers/pangofun.c index 7f977423780..49951fd3241 100644 --- a/src/mame/drivers/pangofun.c +++ b/src/mame/drivers/pangofun.c @@ -187,7 +187,7 @@ static const struct kbdc8042_interface at8042 = static MACHINE_START( pangofun ) { - device_set_irq_callback(machine.device("maincpu"), pcat_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pcat_irq_callback); init_pc_common(machine, PCCOMMON_KEYBOARD_AT, pangofun_set_keyb_int); kbdc8042_init(machine, &at8042); } diff --git a/src/mame/drivers/parodius.c b/src/mame/drivers/parodius.c index 220e06b1053..22b75027d38 100644 --- a/src/mame/drivers/parodius.c +++ b/src/mame/drivers/parodius.c @@ -23,7 +23,7 @@ static INTERRUPT_GEN( parodius_interrupt ) { parodius_state *state = device->machine().driver_data(); 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(parodius_state::bankedram_r) @@ -108,7 +108,7 @@ READ8_MEMBER(parodius_state::parodius_sound_r) WRITE8_MEMBER(parodius_state::parodius_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); } #if 0 @@ -116,7 +116,7 @@ WRITE8_MEMBER(parodius_state::parodius_sh_irqtrigger_w) static void sound_nmi_callback( running_machine &machine, int param ) { parodius_state *state = machine.driver_data(); - device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, ( state->m_nmi_enabled ) ? CLEAR_LINE : ASSERT_LINE ); + state->m_audiocpu->set_input_line(INPUT_LINE_NMI, ( state->m_nmi_enabled ) ? CLEAR_LINE : ASSERT_LINE ); nmi_enabled = 0; } @@ -125,13 +125,13 @@ static void sound_nmi_callback( running_machine &machine, int param ) static TIMER_CALLBACK( nmi_callback ) { parodius_state *state = machine.driver_data(); - 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(parodius_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(50), FUNC(nmi_callback)); /* kludge until the K053260 is emulated correctly */ } @@ -257,8 +257,8 @@ static MACHINE_START( parodius ) state->m_generic_paletteram_8.allocate(0x1000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k053260 = machine.device("k053260"); state->m_k053245 = machine.device("k053245"); state->m_k053251 = machine.device("k053251"); diff --git a/src/mame/drivers/pasha2.c b/src/mame/drivers/pasha2.c index 20aa3af6b48..70419b1bf05 100644 --- a/src/mame/drivers/pasha2.c +++ b/src/mame/drivers/pasha2.c @@ -477,7 +477,7 @@ READ16_MEMBER(pasha2_state::pasha2_speedup_r) { if(space.device().safe_pc() == 0x8302) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); return m_wram[(0x95744 / 2) + offset]; } diff --git a/src/mame/drivers/pastelg.c b/src/mame/drivers/pastelg.c index 27fd3c6ec40..df089b65fcd 100644 --- a/src/mame/drivers/pastelg.c +++ b/src/mame/drivers/pastelg.c @@ -57,7 +57,7 @@ ADDRESS_MAP_END READ8_MEMBER(pastelg_state::pastelg_irq_ack_r) { - device_set_input_line(&space.device(), 0, CLEAR_LINE); + space.device().execute().set_input_line(0, CLEAR_LINE); return 0; } diff --git a/src/mame/drivers/pbaction.c b/src/mame/drivers/pbaction.c index 944e5a7298f..11a142417ba 100644 --- a/src/mame/drivers/pbaction.c +++ b/src/mame/drivers/pbaction.c @@ -73,7 +73,7 @@ Stephh's notes (based on the game Z80 code and some tests) : WRITE8_MEMBER(pbaction_state::pbaction_sh_command_w) { soundlatch_byte_w(space, offset, data); - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0x00); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0x00); } WRITE8_MEMBER(pbaction_state::nmi_mask_w) @@ -251,7 +251,7 @@ GFXDECODE_END static INTERRUPT_GEN( pbaction_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x02); /* the CPU is in Interrupt Mode 2 */ + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x02); /* the CPU is in Interrupt Mode 2 */ } @@ -259,8 +259,8 @@ static MACHINE_START( pbaction ) { pbaction_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_scroll)); } @@ -277,7 +277,7 @@ static INTERRUPT_GEN( vblank_irq ) pbaction_state *state = device->machine().driver_data(); 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( pbaction, pbaction_state ) diff --git a/src/mame/drivers/pcat_dyn.c b/src/mame/drivers/pcat_dyn.c index 4e9fea6189f..f28dca5812d 100644 --- a/src/mame/drivers/pcat_dyn.c +++ b/src/mame/drivers/pcat_dyn.c @@ -133,7 +133,7 @@ static const struct kbdc8042_interface at8042 = static MACHINE_START( pcat_dyn ) { - device_set_irq_callback(machine.device("maincpu"), pcat_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pcat_irq_callback); init_pc_common(machine, PCCOMMON_KEYBOARD_AT, pcat_dyn_set_keyb_int); kbdc8042_init(machine, &at8042); } diff --git a/src/mame/drivers/pcat_nit.c b/src/mame/drivers/pcat_nit.c index 4316ae11d36..715fcc62640 100644 --- a/src/mame/drivers/pcat_nit.c +++ b/src/mame/drivers/pcat_nit.c @@ -230,7 +230,7 @@ static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color static MACHINE_START( streetg2 ) { - device_set_irq_callback(machine.device("maincpu"), pcat_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pcat_irq_callback); init_pc_common(machine, PCCOMMON_KEYBOARD_AT, streetg2_set_keyb_int); diff --git a/src/mame/drivers/pcxt.c b/src/mame/drivers/pcxt.c index 2675e8c84ef..438a62f6578 100644 --- a/src/mame/drivers/pcxt.c +++ b/src/mame/drivers/pcxt.c @@ -719,7 +719,7 @@ static MACHINE_RESET( filetto ) device_t *speaker = machine.device("speaker"); state->m_bank = -1; state->m_lastvalue = -1; - device_set_irq_callback(machine.device("maincpu"), irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback); state->m_pc_spkrdata = 0; state->m_pc_input = 0; diff --git a/src/mame/drivers/pengo.c b/src/mame/drivers/pengo.c index af721515fe6..c184a53dc7e 100644 --- a/src/mame/drivers/pengo.c +++ b/src/mame/drivers/pengo.c @@ -374,7 +374,7 @@ static INTERRUPT_GEN( vblank_irq ) pengo_state *state = device->machine().driver_data(); 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/pgm.c b/src/mame/drivers/pgm.c index 8eb3e42e6bf..517979b1d19 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -245,8 +245,8 @@ WRITE16_MEMBER(pgm_state::z80_reset_w) if (data == 0x5050) { m_ics->reset(); - device_set_input_line(m_soundcpu, INPUT_LINE_HALT, CLEAR_LINE); - device_set_input_line(m_soundcpu, INPUT_LINE_RESET, PULSE_LINE); + m_soundcpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); + m_soundcpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); if(0) { FILE *out; @@ -259,7 +259,7 @@ WRITE16_MEMBER(pgm_state::z80_reset_w) { /* this might not be 100% correct, but several of the games (ddp2, puzzli2 etc. expect the z80 to be turned off during data uploads, they write here before the upload */ - device_set_input_line(m_soundcpu, INPUT_LINE_HALT, ASSERT_LINE); + m_soundcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); } } @@ -277,7 +277,7 @@ WRITE16_MEMBER(pgm_state::m68k_l1_w) if (PGMLOGERROR) logerror("SL 1 m68.w %02x (%06x) IRQ\n", data & 0xff, space.device().safe_pc()); 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 ); } } @@ -291,7 +291,7 @@ WRITE8_MEMBER(pgm_state::z80_l3_w) void pgm_sound_irq( device_t *device, int level ) { pgm_state *state = device->machine().driver_data(); - device_set_input_line(state->m_soundcpu, 0, level); + state->m_soundcpu->set_input_line(0, level); } /*static const ics2115_interface pgm_ics2115_interface = @@ -497,10 +497,10 @@ TIMER_DEVICE_CALLBACK( pgm_interrupt ) int scanline = param; if(scanline == 224) - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); if(scanline == 0) - if (!state->m_irq4_disabled) device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + if (!state->m_irq4_disabled) state->m_maincpu->set_input_line(4, HOLD_LINE); } MACHINE_START( pgm ) diff --git a/src/mame/drivers/photon.c b/src/mame/drivers/photon.c index a48555ce12f..01e8dbaa334 100644 --- a/src/mame/drivers/photon.c +++ b/src/mame/drivers/photon.c @@ -184,7 +184,7 @@ INPUT_PORTS_END static INTERRUPT_GEN( pk8000_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static IRQ_CALLBACK(pk8000_irq_callback) @@ -196,7 +196,7 @@ static IRQ_CALLBACK(pk8000_irq_callback) static MACHINE_RESET(pk8000) { pk8000_set_bank(machine,0); - device_set_irq_callback(machine.device("maincpu"), pk8000_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pk8000_irq_callback); } static VIDEO_START( photon ) diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c index 4020ffecd47..ee7088541f6 100644 --- a/src/mame/drivers/photon2.c +++ b/src/mame/drivers/photon2.c @@ -299,13 +299,13 @@ static TIMER_DEVICE_CALLBACK( spec_interrupt_hack ) if (scanline == SPEC_SCREEN_HEIGHT/2) { - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } else if(scanline == 0) { if ( 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); } } } diff --git a/src/mame/drivers/photoply.c b/src/mame/drivers/photoply.c index 423fdd0b622..c03f4769f0c 100644 --- a/src/mame/drivers/photoply.c +++ b/src/mame/drivers/photoply.c @@ -309,7 +309,7 @@ static void photoply_set_keyb_int(running_machine &machine, int state) static MACHINE_START( photoply ) { photoply_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback); state->m_pit8253 = machine.device( "pit8254" ); state->m_pic8259_1 = machine.device( "pic8259_1" ); state->m_pic8259_2 = machine.device( "pic8259_2" ); diff --git a/src/mame/drivers/pingpong.c b/src/mame/drivers/pingpong.c index b5690ade462..c14ea6624da 100644 --- a/src/mame/drivers/pingpong.c +++ b/src/mame/drivers/pingpong.c @@ -62,11 +62,11 @@ static TIMER_DEVICE_CALLBACK( pingpong_interrupt ) if (scanline == 240) { - if (state->m_intenable & 0x04) device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + if (state->m_intenable & 0x04) state->m_maincpu->set_input_line(0, HOLD_LINE); } else if ((scanline % 32) == 0) { - if (state->m_intenable & 0x08) device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + if (state->m_intenable & 0x08) state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -77,11 +77,11 @@ static TIMER_DEVICE_CALLBACK( merlinmm_interrupt ) if (scanline == 240) { - if (state->m_intenable & 0x04) device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + if (state->m_intenable & 0x04) state->m_maincpu->set_input_line(0, HOLD_LINE); } else if (scanline == 0) { - if (state->m_intenable & 0x08) device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + if (state->m_intenable & 0x08) state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } diff --git a/src/mame/drivers/pipedrm.c b/src/mame/drivers/pipedrm.c index e9af1935bf2..f2d4426b90b 100644 --- a/src/mame/drivers/pipedrm.c +++ b/src/mame/drivers/pipedrm.c @@ -219,7 +219,7 @@ static TIMER_CALLBACK( delayed_command_w ) /* sound commands. It's possible the NMI isn't really hooked up on the YM2608 */ /* sound board. */ if (param & 0x100) - device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, ASSERT_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } @@ -239,7 +239,7 @@ static WRITE8_HANDLER( pending_command_clear_w ) { fromance_state *state = space->machine().driver_data(); state->m_pending_command = 0; - device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, CLEAR_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } @@ -560,7 +560,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { fromance_state *state = device->machine().driver_data(); - 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); } @@ -592,7 +592,7 @@ static MACHINE_START( pipedrm ) { fromance_state *state = machine.driver_data(); - state->m_subcpu = machine.device("sub"); + state->m_subcpu = machine.device("sub"); /* initialize main Z80 bank */ state->membank("bank1")->configure_entries(0, 8, state->memregion("maincpu")->base() + 0x10000, 0x2000); diff --git a/src/mame/drivers/pitnrun.c b/src/mame/drivers/pitnrun.c index 392a273ef6b..a46850c5725 100644 --- a/src/mame/drivers/pitnrun.c +++ b/src/mame/drivers/pitnrun.c @@ -73,7 +73,7 @@ K1000233A static INTERRUPT_GEN( pitnrun_nmi_source ) { pitnrun_state *state = device->machine().driver_data(); - if(state->m_nmi) device_set_input_line(device,INPUT_LINE_NMI, PULSE_LINE); + if(state->m_nmi) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(pitnrun_state::nmi_enable_w) diff --git a/src/mame/drivers/pktgaldx.c b/src/mame/drivers/pktgaldx.c index a9b7bbd262b..db8181b6fcf 100644 --- a/src/mame/drivers/pktgaldx.c +++ b/src/mame/drivers/pktgaldx.c @@ -318,7 +318,7 @@ static MACHINE_START( pktgaldx ) { pktgaldx_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_deco_tilegen1 = machine.device("tilegen1"); } diff --git a/src/mame/drivers/playch10.c b/src/mame/drivers/playch10.c index 12b3a44f04d..680e10a7f27 100644 --- a/src/mame/drivers/playch10.c +++ b/src/mame/drivers/playch10.c @@ -661,11 +661,11 @@ static INTERRUPT_GEN( playch10_interrupt ) { /* LS161A, Sheet 1 - bottom left of Z80 */ if ( !state->m_pc10_dog_di && !state->m_pc10_nmi_enable ) { - device_set_input_line(device, INPUT_LINE_RESET, PULSE_LINE ); + device->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE ); } else if ( state->m_pc10_nmi_enable ) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static const nes_interface nes_config = diff --git a/src/mame/drivers/playmark.c b/src/mame/drivers/playmark.c index 0f3338a0a1d..ff1c600301f 100644 --- a/src/mame/drivers/playmark.c +++ b/src/mame/drivers/playmark.c @@ -124,7 +124,7 @@ WRITE16_MEMBER(playmark_state::playmark_snd_command_w) { m_snd_command = (data & 0xff); m_snd_flag = 1; - device_yield(&space.device()); + space.device().execute().yield(); } } diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c index e08e029c861..78867bfd64e 100644 --- a/src/mame/drivers/plygonet.c +++ b/src/mame/drivers/plygonet.c @@ -156,7 +156,7 @@ READ32_MEMBER(polygonet_state::psac_rom_r) /* irq 7 does nothing (it jsrs to a rts and then rte) */ static INTERRUPT_GEN(polygonet_interrupt) { - device_set_input_line(device, M68K_IRQ_5, HOLD_LINE); + device->execute().set_input_line(M68K_IRQ_5, HOLD_LINE); } /* sound CPU communications */ @@ -557,7 +557,7 @@ WRITE8_MEMBER(polygonet_state::sound_bankswitch_w) static INTERRUPT_GEN(audio_interrupt) { - 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, polygonet_state ) diff --git a/src/mame/drivers/pntnpuzl.c b/src/mame/drivers/pntnpuzl.c index 020802e1ed6..0455c2cae73 100644 --- a/src/mame/drivers/pntnpuzl.c +++ b/src/mame/drivers/pntnpuzl.c @@ -274,19 +274,19 @@ READ16_MEMBER(pntnpuzl_state::pntnpuzl_28001a_r) READ16_MEMBER(pntnpuzl_state::irq1_ack_r) { -// device_set_input_line(m_maincpu, 1, CLEAR_LINE); +// m_maincpu->set_input_line(1, CLEAR_LINE); return 0; } READ16_MEMBER(pntnpuzl_state::irq2_ack_r) { -// device_set_input_line(m_maincpu, 2, CLEAR_LINE); +// m_maincpu->set_input_line(2, CLEAR_LINE); return 0; } READ16_MEMBER(pntnpuzl_state::irq4_ack_r) { -// device_set_input_line(m_maincpu, 4, CLEAR_LINE); +// m_maincpu->set_input_line(4, CLEAR_LINE); return 0; } diff --git a/src/mame/drivers/polepos.c b/src/mame/drivers/polepos.c index df93f625231..f1079b1b549 100644 --- a/src/mame/drivers/polepos.c +++ b/src/mame/drivers/polepos.c @@ -336,7 +336,7 @@ WRITE16_MEMBER(polepos_state::polepos_z8002_nvi_enable_w) m_sub_irq_mask = data; if (!data) - device_set_input_line(&space.device(), 0, CLEAR_LINE); + space.device().execute().set_input_line(0, CLEAR_LINE); } @@ -472,8 +472,8 @@ static MACHINE_RESET( polepos ) state->polepos_latch_w(*space, i, 0); /* set the interrupt vectors (this shouldn't be needed) */ - device_set_input_line_vector(machine.device("sub"), 0, Z8000_NVI); - device_set_input_line_vector(machine.device("sub2"), 0, Z8000_NVI); + machine.device("sub")->execute().set_input_line_vector(0, Z8000_NVI); + machine.device("sub2")->execute().set_input_line_vector(0, Z8000_NVI); } diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c index ee897cba39a..8f18cd97235 100644 --- a/src/mame/drivers/policetr.c +++ b/src/mame/drivers/policetr.c @@ -109,7 +109,7 @@ static TIMER_CALLBACK( irq5_gen ) static INTERRUPT_GEN( irq4_gen ) { - device_set_input_line(device, R3000_IRQ4, ASSERT_LINE); + device->execute().set_input_line(R3000_IRQ4, ASSERT_LINE); device->machine().scheduler().timer_set(device->machine().primary_screen->time_until_pos(0), FUNC(irq5_gen)); } @@ -214,7 +214,7 @@ WRITE32_MEMBER(policetr_state::speedup_w) /* more than 2 in a row and we spin */ if (m_loop_count > 2) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } else m_loop_count = 0; diff --git a/src/mame/drivers/polyplay.c b/src/mame/drivers/polyplay.c index f8e56aa050a..aeed2e38df7 100644 --- a/src/mame/drivers/polyplay.c +++ b/src/mame/drivers/polyplay.c @@ -121,7 +121,7 @@ static MACHINE_RESET( polyplay ) static INTERRUPT_GEN( periodic_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x4e); + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x4e); } @@ -134,7 +134,7 @@ static INTERRUPT_GEN( coin_interrupt ) else { if (state->m_last == 0) /* coin inserted */ - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x50); + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x50); state->m_last = 1; } diff --git a/src/mame/drivers/pooyan.c b/src/mame/drivers/pooyan.c index 6fe8f17199d..8bf5865f4f8 100644 --- a/src/mame/drivers/pooyan.c +++ b/src/mame/drivers/pooyan.c @@ -29,7 +29,7 @@ static INTERRUPT_GEN( pooyan_interrupt ) pooyan_state *state = device->machine().driver_data(); if (state->m_irq_enable) - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } @@ -38,7 +38,7 @@ WRITE8_MEMBER(pooyan_state::irq_enable_w) m_irq_enable = data & 1; if (!m_irq_enable) - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } diff --git a/src/mame/drivers/popeye.c b/src/mame/drivers/popeye.c index 0f3786bafb1..cc411857607 100644 --- a/src/mame/drivers/popeye.c +++ b/src/mame/drivers/popeye.c @@ -25,7 +25,7 @@ static INTERRUPT_GEN( popeye_interrupt ) { /* NMIs are enabled by the I register?? How can that be? */ if (device->state().state_int(Z80_I) & 1) /* skyskipr: 0/1, popeye: 2/3 but also 0/1 */ - 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/popobear.c b/src/mame/drivers/popobear.c index 743d2467bad..11f92a14c2e 100644 --- a/src/mame/drivers/popobear.c +++ b/src/mame/drivers/popobear.c @@ -285,7 +285,7 @@ WRITE8_MEMBER(popobear_state::popobear_irq_ack_w) for(i=0;i<8;i++) { if(data & 1 << i) - device_set_input_line(m_maincpu, i, CLEAR_LINE); + m_maincpu->set_input_line(i, CLEAR_LINE); } } @@ -443,14 +443,14 @@ static TIMER_DEVICE_CALLBACK( popobear_irq ) /* Order is trusted (5 as vblank-out makes the title screen logo spinning to behave wrongly) */ if(scanline == 240) - device_set_input_line(state->m_maincpu, 3, ASSERT_LINE); + state->m_maincpu->set_input_line(3, ASSERT_LINE); if(scanline == 0) - device_set_input_line(state->m_maincpu, 5, ASSERT_LINE); + state->m_maincpu->set_input_line(5, ASSERT_LINE); /* TODO: actually a timer irq, tied with YM2413 sound chip (controls BGM tempo) */ if(scanline == 64 || scanline == 192) - device_set_input_line(state->m_maincpu, 2, ASSERT_LINE); + state->m_maincpu->set_input_line(2, ASSERT_LINE); } static MACHINE_CONFIG_START( popobear, popobear_state ) diff --git a/src/mame/drivers/popper.c b/src/mame/drivers/popper.c index 65afdb88100..36455069218 100644 --- a/src/mame/drivers/popper.c +++ b/src/mame/drivers/popper.c @@ -140,7 +140,7 @@ READ8_MEMBER(popper_state::popper_input_ports_r) READ8_MEMBER(popper_state::popper_soundcpu_nmi_r) { - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); return 0; } @@ -314,7 +314,7 @@ static MACHINE_START( popper ) { popper_state *state = machine.driver_data(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_flipscreen)); state->save_item(NAME(state->m_e002)); @@ -335,7 +335,7 @@ static INTERRUPT_GEN( vblank_irq ) popper_state *state = device->machine().driver_data(); 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/psikyo.c b/src/mame/drivers/psikyo.c index 3461fc87298..e20f772f89c 100644 --- a/src/mame/drivers/psikyo.c +++ b/src/mame/drivers/psikyo.c @@ -148,7 +148,7 @@ static TIMER_CALLBACK( psikyo_soundlatch_callback ) { psikyo_state *state = machine.driver_data(); state->m_soundlatch = param; - 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_z80_nmi = 1; } @@ -382,7 +382,7 @@ ADDRESS_MAP_END static void sound_irq( device_t *device, int irq ) { psikyo_state *state = device->machine().driver_data(); - 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); } READ8_MEMBER(psikyo_state::psikyo_soundlatch_r) @@ -392,7 +392,7 @@ READ8_MEMBER(psikyo_state::psikyo_soundlatch_r) WRITE8_MEMBER(psikyo_state::psikyo_clear_nmi_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); m_z80_nmi = 0; } @@ -1017,7 +1017,7 @@ static MACHINE_START( psikyo ) { psikyo_state *state = machine.driver_data(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_soundlatch)); state->save_item(NAME(state->m_z80_nmi)); @@ -1178,7 +1178,7 @@ MACHINE_CONFIG_END static void irqhandler( device_t *device, int linestate ) { psikyo_state *state = device->machine().driver_data(); - device_set_input_line(state->m_audiocpu, 0, linestate ? ASSERT_LINE : CLEAR_LINE); + state->m_audiocpu->set_input_line(0, linestate ? ASSERT_LINE : CLEAR_LINE); } static const ymf278b_interface ymf278b_config = diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c index a073b8b4d26..d8d7f81ef34 100644 --- a/src/mame/drivers/psikyo4.c +++ b/src/mame/drivers/psikyo4.c @@ -193,7 +193,7 @@ READ32_MEMBER(psikyo4_state::ps4_eeprom_r) static INTERRUPT_GEN(psikyosh_interrupt) { - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } CUSTOM_INPUT_MEMBER(psikyo4_state::system_port_r) @@ -651,7 +651,7 @@ INPUT_PORTS_END static void irqhandler( device_t *device, int linestate ) { psikyo4_state *state = device->machine().driver_data(); - device_set_input_line(state->m_maincpu, 12, linestate ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(12, linestate ? ASSERT_LINE : CLEAR_LINE); } static const ymf278b_interface ymf278b_config = @@ -664,7 +664,7 @@ static MACHINE_START( psikyo4 ) { psikyo4_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->save_item(NAME(state->m_oldbrt1)); state->save_item(NAME(state->m_oldbrt2)); diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c index 2e80da12597..7df19722d51 100644 --- a/src/mame/drivers/psikyosh.c +++ b/src/mame/drivers/psikyosh.c @@ -349,7 +349,7 @@ READ32_MEMBER(psikyosh_state::psh_eeprom_r) static INTERRUPT_GEN(psikyosh_interrupt) { - device_set_input_line(device, 4, ASSERT_LINE); + device->execute().set_input_line(4, ASSERT_LINE); } // VBL handler writes 0x00 on entry, 0xc0 on exit @@ -358,7 +358,7 @@ WRITE32_MEMBER(psikyosh_state::psikyosh_irqctrl_w) { if (!(data & 0x00c00000)) { - device_set_input_line(m_maincpu, 4, CLEAR_LINE); + m_maincpu->set_input_line(4, CLEAR_LINE); } } @@ -785,7 +785,7 @@ INPUT_PORTS_END static void irqhandler(device_t *device, int linestate) { psikyosh_state *state = device->machine().driver_data(); - device_set_input_line(state->m_maincpu, 12, linestate ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(12, linestate ? ASSERT_LINE : CLEAR_LINE); } static const ymf278b_interface ymf278b_config = @@ -798,7 +798,7 @@ static MACHINE_START( psikyosh ) { psikyosh_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->membank("bank2")->configure_entries(0, 0x1000, state->memregion("gfx1")->base(), 0x20000); } diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c index f8a67c7063d..4483d886659 100644 --- a/src/mame/drivers/pturn.c +++ b/src/mame/drivers/pturn.c @@ -463,7 +463,7 @@ static INTERRUPT_GEN( pturn_sub_intgen ) pturn_state *state = device->machine().driver_data(); if(state->m_nmi_sub) { - device_set_input_line(device,INPUT_LINE_NMI,PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); } } @@ -472,7 +472,7 @@ static INTERRUPT_GEN( pturn_main_intgen ) pturn_state *state = device->machine().driver_data(); if (state->m_nmi_main) { - 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/punchout.c b/src/mame/drivers/punchout.c index d0377be6440..e02be32594a 100644 --- a/src/mame/drivers/punchout.c +++ b/src/mame/drivers/punchout.c @@ -934,7 +934,7 @@ static INTERRUPT_GEN( vblank_irq ) punchout_state *state = device->machine().driver_data(); 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/pushman.c b/src/mame/drivers/pushman.c index 8769281e287..6146622b273 100644 --- a/src/mame/drivers/pushman.c +++ b/src/mame/drivers/pushman.c @@ -74,8 +74,8 @@ WRITE16_MEMBER(pushman_state::pushman_68705_w) if (offset == 1) { - device_set_input_line(m_mcu, M68705_IRQ_LINE, HOLD_LINE); - device_spin(&space.device()); + m_mcu->execute().set_input_line(M68705_IRQ_LINE, HOLD_LINE); + space.device().execute().spin(); m_new_latch = 0; } } @@ -386,7 +386,7 @@ GFXDECODE_END static void irqhandler(device_t *device, int irq) { pushman_state *state = device->machine().driver_data(); - 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 = @@ -404,8 +404,8 @@ static MACHINE_START( pushman ) { pushman_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_mcu = machine.device("mcu"); state->save_item(NAME(state->m_control)); diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c index 96f9bdbebf7..8838300d5a6 100644 --- a/src/mame/drivers/qdrmfgp.c +++ b/src/mame/drivers/qdrmfgp.c @@ -271,12 +271,12 @@ static TIMER_DEVICE_CALLBACK(qdrmfgp_interrupt) if(scanline == 0) if (state->m_control & 0x0001) - device_set_input_line(state->m_maincpu, 1, HOLD_LINE); + state->m_maincpu->set_input_line(1, HOLD_LINE); /* trigger V-blank interrupt */ if(scanline == 240) if (state->m_control & 0x0004) - device_set_input_line(state->m_maincpu, 3, HOLD_LINE); + state->m_maincpu->set_input_line(3, HOLD_LINE); } static void ide_interrupt(device_t *device, int state) @@ -305,7 +305,7 @@ static INTERRUPT_GEN(qdrmfgp2_interrupt) qdrmfgp_state *state = device->machine().driver_data(); /* trigger V-blank interrupt */ if (state->m_control & 0x0008) - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } static void gp2_ide_interrupt(device_t *device, int state) diff --git a/src/mame/drivers/quakeat.c b/src/mame/drivers/quakeat.c index 553c47eb118..85b8b5e6df8 100644 --- a/src/mame/drivers/quakeat.c +++ b/src/mame/drivers/quakeat.c @@ -158,7 +158,7 @@ static IRQ_CALLBACK(irq_callback) static MACHINE_START(quakeat) { quakeat_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback); state->m_pic8259_1 = machine.device( "pic8259_1" ); state->m_pic8259_2 = machine.device( "pic8259_2" ); diff --git a/src/mame/drivers/quasar.c b/src/mame/drivers/quasar.c index 4760dfbb394..c8b6dcd59be 100644 --- a/src/mame/drivers/quasar.c +++ b/src/mame/drivers/quasar.c @@ -270,7 +270,7 @@ GFXDECODE_END static INTERRUPT_GEN( quasar_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x03); + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); } static const s2636_interface s2636_0_config = diff --git a/src/mame/drivers/queen.c b/src/mame/drivers/queen.c index d7bc2371355..a2a363506b7 100644 --- a/src/mame/drivers/queen.c +++ b/src/mame/drivers/queen.c @@ -566,7 +566,7 @@ static const struct pit8253_config queen_pit8254_config = WRITE_LINE_MEMBER(queen_state::queen_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( queen_state::get_slave_ack ) @@ -596,7 +596,7 @@ static void set_gate_a20(running_machine &machine, int a20) { queen_state *state = machine.driver_data(); - 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) @@ -650,7 +650,7 @@ static MACHINE_START( queen ) init_pc_common(machine, PCCOMMON_KEYBOARD_AT, queen_set_keyb_int); - device_set_irq_callback(state->m_maincpu, irq_callback); + state->m_maincpu->set_irq_acknowledge_callback(irq_callback); intel82439tx_init(machine); kbdc8042_init(machine, &at8042); diff --git a/src/mame/drivers/r2dx_v33.c b/src/mame/drivers/r2dx_v33.c index 34905f94cde..0129e78d27c 100644 --- a/src/mame/drivers/r2dx_v33.c +++ b/src/mame/drivers/r2dx_v33.c @@ -500,7 +500,7 @@ ADDRESS_MAP_END static INTERRUPT_GEN( rdx_v33_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xc0/4); /* VBL */ + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xc0/4); /* VBL */ } static const gfx_layout rdx_v33_charlayout = diff --git a/src/mame/drivers/raiden.c b/src/mame/drivers/raiden.c index f1a1593cefb..71f0115519b 100644 --- a/src/mame/drivers/raiden.c +++ b/src/mame/drivers/raiden.c @@ -239,7 +239,7 @@ GFXDECODE_END static INTERRUPT_GEN( raiden_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 */ } static MACHINE_CONFIG_START( raiden, raiden_state ) @@ -560,11 +560,11 @@ READ16_MEMBER(raiden_state::sub_cpu_spin_r) // main set if (pc==0xfcde6 && ret!=0x40) - device_spin(&space.device()); + space.device().execute().spin(); // alt sets if (pc==0xfcde8 && ret!=0x40) - device_spin(&space.device()); + space.device().execute().spin(); return ret; } diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c index 57099efd664..22ec22590fa 100644 --- a/src/mame/drivers/raiden2.c +++ b/src/mame/drivers/raiden2.c @@ -975,7 +975,7 @@ static SCREEN_UPDATE_IND16( raiden2 ) static INTERRUPT_GEN( raiden2_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xc0/4); /* VBL */ + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xc0/4); /* VBL */ } diff --git a/src/mame/drivers/rainbow.c b/src/mame/drivers/rainbow.c index 49c99cfe42d..040aa84baee 100644 --- a/src/mame/drivers/rainbow.c +++ b/src/mame/drivers/rainbow.c @@ -335,7 +335,7 @@ WRITE16_MEMBER(rbisland_state::jumping_sound_w) if (ACCESSING_BITS_0_7) { m_jumping_latch = data & 0xff; /*M68000 writes .b to $400007*/ - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); } } @@ -626,7 +626,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { rbisland_state *state = device->machine().driver_data(); - 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 = @@ -666,8 +666,8 @@ static MACHINE_START( rbisland ) { rbisland_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_pc080sn = machine.device("pc080sn"); state->m_pc090oj = machine.device("pc090oj"); } diff --git a/src/mame/drivers/rallyx.c b/src/mame/drivers/rallyx.c index 46f0362267a..9a623490741 100644 --- a/src/mame/drivers/rallyx.c +++ b/src/mame/drivers/rallyx.c @@ -207,8 +207,8 @@ TODO: WRITE8_MEMBER(rallyx_state::rallyx_interrupt_vector_w) { - device_set_input_line_vector(m_maincpu, 0, data); - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line_vector(0, data); + m_maincpu->set_input_line(0, CLEAR_LINE); } @@ -234,7 +234,7 @@ WRITE8_MEMBER(rallyx_state::rallyx_latch_w) case 0x01: /* INT ON */ m_main_irq_mask = bit; if (!bit) - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); break; case 0x02: /* SOUND ON */ @@ -895,7 +895,7 @@ static INTERRUPT_GEN( rallyx_vblank_irq ) rallyx_state *state = device->machine().driver_data(); 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( jungler_vblank_irq ) @@ -903,7 +903,7 @@ static INTERRUPT_GEN( jungler_vblank_irq ) rallyx_state *state = device->machine().driver_data(); if(state->m_main_irq_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( rallyx, rallyx_state ) diff --git a/src/mame/drivers/rastan.c b/src/mame/drivers/rastan.c index b744e517a3f..b7094f2127d 100644 --- a/src/mame/drivers/rastan.c +++ b/src/mame/drivers/rastan.c @@ -342,7 +342,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { rastan_state *state = device->machine().driver_data(); - 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 = @@ -365,8 +365,8 @@ static MACHINE_START( rastan ) state->membank("bank1")->configure_entry(0, &ROM[0x00000]); state->membank("bank1")->configure_entries(1, 3, &ROM[0x10000], 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_pc080sn = machine.device("pc080sn"); state->m_pc090oj = machine.device("pc090oj"); diff --git a/src/mame/drivers/redalert.c b/src/mame/drivers/redalert.c index c7768eff7fe..bd80b5f315e 100644 --- a/src/mame/drivers/redalert.c +++ b/src/mame/drivers/redalert.c @@ -111,9 +111,9 @@ static INTERRUPT_GEN( redalert_vblank_interrupt ) { if( device->machine().root_device().ioport("COIN")->read() ) /* the service coin as conntected to the CPU's RDY pin as well */ - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); - device_set_input_line(device, M6502_IRQ_LINE, ASSERT_LINE); + device->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); } diff --git a/src/mame/drivers/redclash.c b/src/mame/drivers/redclash.c index 613a36532f8..1dcae5fdea6 100644 --- a/src/mame/drivers/redclash.c +++ b/src/mame/drivers/redclash.c @@ -28,7 +28,7 @@ TODO: static WRITE8_HANDLER( irqack_w ) { ladybug_state *state = space->machine().driver_data(); - device_set_input_line(state->m_maincpu, 0, CLEAR_LINE); + state->m_maincpu->set_input_line(0, CLEAR_LINE); } static ADDRESS_MAP_START( zerohour_map, AS_PROGRAM, 8, ladybug_state ) @@ -79,13 +79,13 @@ ADDRESS_MAP_END INPUT_CHANGED_MEMBER( ladybug_state::left_coin_inserted ) { if(newval) - device_set_input_line(m_maincpu, 0, ASSERT_LINE); + m_maincpu->set_input_line(0, ASSERT_LINE); } INPUT_CHANGED_MEMBER( ladybug_state::right_coin_inserted ) { if(newval) - device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static INPUT_PORTS_START( redclash ) @@ -328,7 +328,7 @@ static MACHINE_START( redclash ) { ladybug_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->save_item(NAME(state->m_star_speed)); state->save_item(NAME(state->m_gfxbank)); diff --git a/src/mame/drivers/renegade.c b/src/mame/drivers/renegade.c index 3266c5d5aff..aad1fcd14d7 100644 --- a/src/mame/drivers/renegade.c +++ b/src/mame/drivers/renegade.c @@ -672,9 +672,9 @@ static TIMER_DEVICE_CALLBACK( renegade_interrupt ) int scanline = param; if (scanline == 112) // ??? - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); else if(scanline == 240) - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } WRITE8_MEMBER(renegade_state::renegade_coin_counter_w) diff --git a/src/mame/drivers/retofinv.c b/src/mame/drivers/retofinv.c index 89aa569afd7..585c3eccd92 100644 --- a/src/mame/drivers/retofinv.c +++ b/src/mame/drivers/retofinv.c @@ -333,7 +333,7 @@ static INTERRUPT_GEN( main_vblank_irq ) retofinv_state *state = device->machine().driver_data(); 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 ) @@ -341,7 +341,7 @@ static INTERRUPT_GEN( sub_vblank_irq ) retofinv_state *state = device->machine().driver_data(); if(state->m_sub_irq_mask) - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } diff --git a/src/mame/drivers/rltennis.c b/src/mame/drivers/rltennis.c index 279149ddcfd..7f0f2005fca 100644 --- a/src/mame/drivers/rltennis.c +++ b/src/mame/drivers/rltennis.c @@ -151,14 +151,14 @@ static INTERRUPT_GEN( rltennis_interrupt ) { rltennis_state *state = device->machine().driver_data(); ++state->m_unk_counter; /* frame counter? verify */ - device_set_input_line(device, 4, HOLD_LINE); - device_set_input_line(device, 1, HOLD_LINE); /* hack, to avoid dead loop */ + device->execute().set_input_line(4, HOLD_LINE); + device->execute().set_input_line(1, HOLD_LINE); /* hack, to avoid dead loop */ } static MACHINE_START( rltennis ) { rltennis_state *state = machine.driver_data(); - state->m_maincpu = machine.device( "maincpu"); + state->m_maincpu = machine.device( "maincpu"); state->m_screen = machine.device( "screen"); state->m_dac_1 = machine.device("dac1"); state->m_dac_2 = machine.device("dac2"); diff --git a/src/mame/drivers/rockrage.c b/src/mame/drivers/rockrage.c index 3ca34c087ed..f35ccb0c635 100644 --- a/src/mame/drivers/rockrage.c +++ b/src/mame/drivers/rockrage.c @@ -61,7 +61,7 @@ static INTERRUPT_GEN( rockrage_interrupt ) { rockrage_state *state = device->machine().driver_data(); 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(rockrage_state::rockrage_bankswitch_w) @@ -79,7 +79,7 @@ WRITE8_MEMBER(rockrage_state::rockrage_bankswitch_w) WRITE8_MEMBER(rockrage_state::rockrage_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); } READ8_MEMBER(rockrage_state::rockrage_VLM5030_busy_r) @@ -243,7 +243,7 @@ static MACHINE_START( rockrage ) state->membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x2000); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k007342 = machine.device("k007342"); state->m_k007420 = machine.device("k007420"); diff --git a/src/mame/drivers/rocnrope.c b/src/mame/drivers/rocnrope.c index ab9c3857af6..58c80db5747 100644 --- a/src/mame/drivers/rocnrope.c +++ b/src/mame/drivers/rocnrope.c @@ -191,7 +191,7 @@ static INTERRUPT_GEN( vblank_irq ) rocnrope_state *state = device->machine().driver_data(); 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/rohga.c b/src/mame/drivers/rohga.c index 6e3c7a27368..563bc7ca506 100644 --- a/src/mame/drivers/rohga.c +++ b/src/mame/drivers/rohga.c @@ -118,7 +118,7 @@ READ16_MEMBER(rohga_state::rohga_irq_ack_r) { - device_set_input_line(m_maincpu, 6, CLEAR_LINE); + m_maincpu->set_input_line(6, CLEAR_LINE); return 0; } @@ -127,7 +127,7 @@ WRITE16_MEMBER(rohga_state::wizdfire_irq_ack_w) /* This might actually do more, nitrobal for example sets 0xca->0xffff->0x80 at startup then writes 7 all the time except when a credit is inserted (writes 6 twice). Wizard Fire / Dark Seal 2 just writes 1 all the time, so I just don't trust it much for now... -AS */ - device_set_input_line(m_maincpu, 6, CLEAR_LINE); + m_maincpu->set_input_line(6, CLEAR_LINE); } /**********************************************************************************/ @@ -720,7 +720,7 @@ GFXDECODE_END static void sound_irq(device_t *device, int state) { rohga_state *driver_state = device->machine().driver_data(); - 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(rohga_state::sound_bankswitch_w) diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c index bb5fc0d4ece..0832f9f6374 100644 --- a/src/mame/drivers/rollerg.c +++ b/src/mame/drivers/rollerg.c @@ -58,18 +58,18 @@ READ8_MEMBER(rollerg_state::rollerg_sound_r) WRITE8_MEMBER(rollerg_state::soundirq_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 TIMER_CALLBACK( nmi_callback ) { rollerg_state *state = machine.driver_data(); - 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(rollerg_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(50), FUNC(nmi_callback)); /* kludge until the K053260 is emulated correctly */ } @@ -256,8 +256,8 @@ static MACHINE_START( rollerg ) state->membank("bank1")->configure_entries(6, 2, &ROM[0x10000], 0x4000); state->membank("bank1")->set_entry(0); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k053244 = machine.device("k053244"); state->m_k051316 = machine.device("k051316"); state->m_k053260 = machine.device("k053260"); diff --git a/src/mame/drivers/rollrace.c b/src/mame/drivers/rollrace.c index f56e4da7551..5f217f53969 100644 --- a/src/mame/drivers/rollrace.c +++ b/src/mame/drivers/rollrace.c @@ -213,7 +213,7 @@ static INTERRUPT_GEN( vblank_irq ) rollrace_state *state = device->machine().driver_data(); 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 ) @@ -221,7 +221,7 @@ static INTERRUPT_GEN( sound_timer_irq ) rollrace_state *state = device->machine().driver_data(); 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( rollrace, rollrace_state ) diff --git a/src/mame/drivers/rotaryf.c b/src/mame/drivers/rotaryf.c index f03320421f0..038ff849ee3 100644 --- a/src/mame/drivers/rotaryf.c +++ b/src/mame/drivers/rotaryf.c @@ -45,11 +45,11 @@ static TIMER_DEVICE_CALLBACK( rotaryf_interrupt ) int scanline = param; if (scanline == 256) - device_set_input_line(state->m_maincpu, I8085_RST55_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(I8085_RST55_LINE, HOLD_LINE); else if((scanline % 64) == 0) { - device_set_input_line(state->m_maincpu, I8085_RST75_LINE, ASSERT_LINE); - device_set_input_line(state->m_maincpu, I8085_RST75_LINE, CLEAR_LINE); + state->m_maincpu->set_input_line(I8085_RST75_LINE, ASSERT_LINE); + state->m_maincpu->set_input_line(I8085_RST75_LINE, CLEAR_LINE); } } diff --git a/src/mame/drivers/route16.c b/src/mame/drivers/route16.c index 36b612220a3..6f82dccb27d 100644 --- a/src/mame/drivers/route16.c +++ b/src/mame/drivers/route16.c @@ -107,7 +107,7 @@ WRITE8_MEMBER(route16_state::route16_sharedram_w) if (offset >= 0x0313 && offset <= 0x0319 && data == 0xff) { // Let the other CPU run - device_yield(&space.device()); + space.device().execute().yield(); } } diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c index 744dc2d2925..6058cbd0299 100644 --- a/src/mame/drivers/royalmah.c +++ b/src/mame/drivers/royalmah.c @@ -3249,7 +3249,7 @@ static INTERRUPT_GEN( suzume_irq ) { royalmah_state *state = device->machine().driver_data(); if ( state->m_suzume_bank & 0x40 ) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_DERIVED( suzume, dondenmj ) @@ -3295,15 +3295,15 @@ static TIMER_DEVICE_CALLBACK( janptr96_interrupt ) int scanline = param; if(scanline == 248) - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x80); // vblank + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x80); // vblank if(scanline == 0) - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x84); // demo + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x84); // demo } WRITE_LINE_MEMBER(royalmah_state::janptr96_rtc_irq) { - device_set_input_line_and_vector(m_maincpu, 0, HOLD_LINE, 0x82); // rtc + m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x82); // rtc } static MSM6242_INTERFACE( janptr96_rtc_intf ) @@ -3353,12 +3353,12 @@ static INTERRUPT_GEN( mjtensin_interrupt ) { royalmah_state *state = device->machine().driver_data(); - device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE); // vblank + state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); // vblank } WRITE_LINE_MEMBER(royalmah_state::mjtensin_rtc_irq) { - device_set_input_line(m_maincpu, INPUT_LINE_IRQ1, HOLD_LINE); // rtc + m_maincpu->set_input_line(INPUT_LINE_IRQ1, HOLD_LINE); // rtc } diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index 10daa76b023..c468e505105 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -128,7 +128,7 @@ WRITE16_MEMBER(rungun_state::rng_sysregs_w) ioport("EEPROMOUT")->write(data, 0xff); if (!(data & 0x40)) - device_set_input_line(m_maincpu, M68K_IRQ_5, CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_5, CLEAR_LINE); break; case 0x0c/2: @@ -159,7 +159,7 @@ WRITE16_MEMBER(rungun_state::sound_irq_w) { if (ACCESSING_BITS_8_15) - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); } READ16_MEMBER(rungun_state::sound_status_msb_r) @@ -176,7 +176,7 @@ static INTERRUPT_GEN(rng_interrupt) rungun_state *state = device->machine().driver_data(); if (state->m_sysreg[0x0c / 2] & 0x09) - device_set_input_line(device, M68K_IRQ_5, ASSERT_LINE); + device->execute().set_input_line(M68K_IRQ_5, ASSERT_LINE); } static ADDRESS_MAP_START( rungun_map, AS_PROGRAM, 16, rungun_state ) @@ -223,7 +223,7 @@ WRITE8_MEMBER(rungun_state::z80ctrl_w) membank("bank2")->set_entry(data & 0x07); if (data & 0x10) - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } static INTERRUPT_GEN(audio_interrupt) @@ -233,7 +233,7 @@ static INTERRUPT_GEN(audio_interrupt) if (state->m_z80_control & 0x80) return; - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } /* sound (this should be split into audio/xexex.c or pregx.c or so someday) */ @@ -370,8 +370,8 @@ static MACHINE_START( rng ) state->membank("bank2")->configure_entries(0, 8, &ROM[0x10000], 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("soundcpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("soundcpu"); state->m_k053936 = machine.device("k053936"); state->m_k055673 = machine.device("k055673"); state->m_k053252 = machine.device("k053252"); diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c index c3e4c62e528..420ca967ff4 100644 --- a/src/mame/drivers/sandscrp.c +++ b/src/mame/drivers/sandscrp.c @@ -255,7 +255,7 @@ WRITE16_MEMBER(sandscrp_state::sandscrp_soundlatch_word_w) m_latch1_full = 1; soundlatch_byte_w(space, 0, data & 0xff); machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); - device_spin_until_time(&space.device(), attotime::from_usec(100)); // Allow the other cpu to reply + space.device().execute().spin_until_time(attotime::from_usec(100)); // Allow the other cpu to reply } } diff --git a/src/mame/drivers/saturn.c b/src/mame/drivers/saturn.c index 0272e74c9bc..833e7a9adcf 100644 --- a/src/mame/drivers/saturn.c +++ b/src/mame/drivers/saturn.c @@ -272,7 +272,7 @@ static void scu_test_pending_irq(running_machine &machine) { if(irq_level[i] != -1) /* TODO: cheap check for undefined irqs */ { - device_set_input_line_and_vector(state->m_maincpu, irq_level[i], HOLD_LINE, 0x40 + i); + state->m_maincpu->set_input_line_and_vector(irq_level[i], HOLD_LINE, 0x40 + i); state->m_scu.ist &= ~(1 << i); return; /* avoid spurious irqs, correct? */ } @@ -408,7 +408,7 @@ static TIMER_CALLBACK( dma_lv0_ended ) saturn_state *state = machine.driver_data(); if(!(state->m_scu.ism & IRQ_DMALV0)) - device_set_input_line_and_vector(state->m_maincpu, 5, HOLD_LINE, 0x4b); + state->m_maincpu->set_input_line_and_vector(5, HOLD_LINE, 0x4b); else state->m_scu.ist |= (IRQ_DMALV0); @@ -421,7 +421,7 @@ static TIMER_CALLBACK( dma_lv1_ended ) saturn_state *state = machine.driver_data(); if(!(state->m_scu.ism & IRQ_DMALV1)) - device_set_input_line_and_vector(state->m_maincpu, 6, HOLD_LINE, 0x4a); + state->m_maincpu->set_input_line_and_vector(6, HOLD_LINE, 0x4a); else state->m_scu.ist |= (IRQ_DMALV1); @@ -434,7 +434,7 @@ static TIMER_CALLBACK( dma_lv2_ended ) saturn_state *state = machine.driver_data(); if(!(state->m_scu.ism & IRQ_DMALV2)) - device_set_input_line_and_vector(state->m_maincpu, 6, HOLD_LINE, 0x49); + state->m_maincpu->set_input_line_and_vector(6, HOLD_LINE, 0x49); else state->m_scu.ist |= (IRQ_DMALV2); @@ -901,7 +901,7 @@ INPUT_CHANGED_MEMBER(saturn_state::nmi_reset) /* TODO: NMI doesn't stay held on SH-2 core so we can't use ASSERT_LINE/CLEAR_LINE with that yet */ if(newval) - device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } INPUT_CHANGED_MEMBER(saturn_state::tray_open) @@ -1661,7 +1661,7 @@ static WRITE_LINE_DEVICE_HANDLER( scsp_to_main_irq ) if(!(drvstate->m_scu.ism & IRQ_SOUND_REQ)) { - device_set_input_line_and_vector(drvstate->m_maincpu, 9, HOLD_LINE, 0x46); + drvstate->m_maincpu->set_input_line_and_vector(9, HOLD_LINE, 0x46); scu_do_transfer(device->machine(),5); } else @@ -1751,9 +1751,9 @@ static MACHINE_START( stv ) system_time systime; machine.base_datetime(systime); - state->m_maincpu = downcast( machine.device("maincpu") ); + state->m_maincpu = downcast( machine.device("maincpu") ); state->m_slave = downcast( machine.device("slave") ); - state->m_audiocpu = downcast( machine.device("audiocpu") ); + state->m_audiocpu = downcast( machine.device("audiocpu") ); scsp_set_ram_base(machine.device("scsp"), state->m_sound_ram); @@ -1795,9 +1795,9 @@ static MACHINE_START( saturn ) system_time systime; machine.base_datetime(systime); - state->m_maincpu = downcast( machine.device("maincpu") ); + state->m_maincpu = downcast( machine.device("maincpu") ); state->m_slave = downcast( machine.device("slave") ); - state->m_audiocpu = downcast( machine.device("audiocpu") ); + state->m_audiocpu = downcast( machine.device("audiocpu") ); scsp_set_ram_base(machine.device("scsp"), state->m_sound_ram); @@ -1883,7 +1883,7 @@ static TIMER_DEVICE_CALLBACK( saturn_scanline ) if(!(state->m_scu.ism & IRQ_VDP1_END)) { - device_set_input_line_and_vector(state->m_maincpu, 0x2, HOLD_LINE, 0x4d); + state->m_maincpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d); scu_do_transfer(timer.machine(),6); } else @@ -1894,7 +1894,7 @@ static TIMER_DEVICE_CALLBACK( saturn_scanline ) { if(!(state->m_scu.ism & IRQ_VBLANK_OUT)) { - device_set_input_line_and_vector(state->m_maincpu, 0xe, HOLD_LINE, 0x41); + state->m_maincpu->set_input_line_and_vector(0xe, HOLD_LINE, 0x41); scu_do_transfer(timer.machine(),1); } else @@ -1905,7 +1905,7 @@ static TIMER_DEVICE_CALLBACK( saturn_scanline ) { if(!(state->m_scu.ism & IRQ_VBLANK_IN)) { - device_set_input_line_and_vector(state->m_maincpu, 0xf, HOLD_LINE ,0x40); + state->m_maincpu->set_input_line_and_vector(0xf, HOLD_LINE ,0x40); scu_do_transfer(timer.machine(),0); } else @@ -1915,7 +1915,7 @@ static TIMER_DEVICE_CALLBACK( saturn_scanline ) { if(!(state->m_scu.ism & IRQ_HBLANK_IN)) { - device_set_input_line_and_vector(state->m_maincpu, 0xd, HOLD_LINE, 0x42); + state->m_maincpu->set_input_line_and_vector(0xd, HOLD_LINE, 0x42); scu_do_transfer(timer.machine(),2); } else @@ -1926,7 +1926,7 @@ static TIMER_DEVICE_CALLBACK( saturn_scanline ) { if(!(state->m_scu.ism & IRQ_TIMER_0)) { - device_set_input_line_and_vector(state->m_maincpu, 0xc, HOLD_LINE, 0x43 ); + state->m_maincpu->set_input_line_and_vector(0xc, HOLD_LINE, 0x43 ); scu_do_transfer(timer.machine(),3); } else @@ -1941,7 +1941,7 @@ static TIMER_DEVICE_CALLBACK( saturn_scanline ) { if(!(state->m_scu.ism & IRQ_TIMER_1)) { - device_set_input_line_and_vector(state->m_maincpu, 0xb, HOLD_LINE, 0x44 ); + state->m_maincpu->set_input_line_and_vector(0xb, HOLD_LINE, 0x44 ); scu_do_transfer(timer.machine(),4); } else @@ -1965,9 +1965,9 @@ static TIMER_DEVICE_CALLBACK( saturn_slave_scanline ) vblank_line = (state->m_vdp2.pal) ? 288 : 240; if(scanline == vblank_line*y_step) - device_set_input_line_and_vector(state->m_slave, 0x6, HOLD_LINE, 0x43); + state->m_slave->set_input_line_and_vector(0x6, HOLD_LINE, 0x43); else if((scanline % y_step) == 0 && scanline < vblank_line*y_step) - device_set_input_line_and_vector(state->m_slave, 0x2, HOLD_LINE, 0x41); + state->m_slave->set_input_line_and_vector(0x2, HOLD_LINE, 0x41); } /* Die Hard Trilogy tests RAM address 0x25e7ffe bit 2 with Slave during FRT minit irq, in-development tool for breaking execution of it? */ diff --git a/src/mame/drivers/sauro.c b/src/mame/drivers/sauro.c index d06b5f86ef4..e432f81b745 100644 --- a/src/mame/drivers/sauro.c +++ b/src/mame/drivers/sauro.c @@ -369,7 +369,7 @@ GFXDECODE_END static INTERRUPT_GEN( sauro_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( tecfri, sauro_state ) diff --git a/src/mame/drivers/savquest.c b/src/mame/drivers/savquest.c index ed8fa2e0ca0..4478637367b 100644 --- a/src/mame/drivers/savquest.c +++ b/src/mame/drivers/savquest.c @@ -446,7 +446,7 @@ static const struct pit8253_config savquest_pit8254_config = WRITE_LINE_MEMBER(savquest_state::savquest_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( savquest_state::get_slave_ack ) @@ -476,7 +476,7 @@ static void set_gate_a20(running_machine &machine, int a20) { savquest_state *state = machine.driver_data(); - 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) @@ -523,7 +523,7 @@ static MACHINE_START( savquest ) init_pc_common(machine, PCCOMMON_KEYBOARD_AT, savquest_set_keyb_int); - device_set_irq_callback(state->m_maincpu, irq_callback); + state->m_maincpu->set_irq_acknowledge_callback(irq_callback); intel82439tx_init(machine); kbdc8042_init(machine, &at8042); diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c index 666f1a0545a..f444dedab2e 100644 --- a/src/mame/drivers/sbasketb.c +++ b/src/mame/drivers/sbasketb.c @@ -52,7 +52,7 @@ CPU/Video Board Parts: WRITE8_MEMBER(sbasketb_state::sbasketb_sh_irqtrigger_w) { - device_set_input_line_and_vector(machine().device("audiocpu"), 0, HOLD_LINE, 0xff); + machine().device("audiocpu")->set_input_line_and_vector(0, HOLD_LINE, 0xff); } WRITE8_MEMBER(sbasketb_state::sbasketb_coin_counter_w) @@ -181,7 +181,7 @@ static INTERRUPT_GEN( vblank_irq ) sbasketb_state *state = device->machine().driver_data(); 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/sbowling.c b/src/mame/drivers/sbowling.c index b2e649b4b65..a28c25a1190 100644 --- a/src/mame/drivers/sbowling.c +++ b/src/mame/drivers/sbowling.c @@ -165,10 +165,10 @@ static TIMER_DEVICE_CALLBACK( sbw_interrupt ) int scanline = param; if(scanline == 256) - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xcf); /* RST 08h */ + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */ if(scanline == 128) - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xd7); /* RST 10h */ + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ } diff --git a/src/mame/drivers/scotrsht.c b/src/mame/drivers/scotrsht.c index 66573e18bea..23349e64bcc 100644 --- a/src/mame/drivers/scotrsht.c +++ b/src/mame/drivers/scotrsht.c @@ -51,7 +51,7 @@ static INTERRUPT_GEN( scotrsht_interrupt ) scotrsht_state *state = device->machine().driver_data(); if (state->m_irq_enable) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } WRITE8_MEMBER(scotrsht_state::scotrsht_soundlatch_w) diff --git a/src/mame/drivers/scregg.c b/src/mame/drivers/scregg.c index b767157f97b..06557f776f6 100644 --- a/src/mame/drivers/scregg.c +++ b/src/mame/drivers/scregg.c @@ -72,17 +72,17 @@ static TIMER_DEVICE_CALLBACK( scregg_interrupt ) { // assume that the irq generator is similar to burgertime hw scregg_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_maincpu, 0, (param & 8) ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(0, (param & 8) ? ASSERT_LINE : CLEAR_LINE); } WRITE8_MEMBER(scregg_state::scregg_irqack_w) { - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); } READ8_MEMBER(scregg_state::scregg_irqack_r) { - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); return 0; } @@ -235,7 +235,7 @@ static MACHINE_START( scregg ) { scregg_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_audiocpu = NULL; state->save_item(NAME(state->m_btime_palette)); diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c index b34bcdf6e2f..3f1c16d6868 100644 --- a/src/mame/drivers/seattle.c +++ b/src/mame/drivers/seattle.c @@ -1150,7 +1150,7 @@ READ32_MEMBER(seattle_state::galileo_r) } /* eat some time for those which poll this register */ - device_eat_cycles(&space.device(), 100); + space.device().execute().eat_cycles(100); if (LOG_TIMERS) logerror("%08X:hires_timer_r = %08X\n", space.device().safe_pc(), result); @@ -1371,7 +1371,7 @@ WRITE32_MEMBER(seattle_state::seattle_voodoo_w) m_cpu_stalled_mem_mask = mem_mask; /* spin until we send the magic trigger */ - device_spin_until_trigger(&space.device(), 45678); + space.device().execute().spin_until_trigger(45678); if (LOG_DMA) logerror("%08X:Stalling CPU on voodoo (already stalled)\n", space.device().safe_pc()); } @@ -1393,7 +1393,7 @@ static void voodoo_stall(device_t *device, int stall) else { if (LOG_DMA) logerror("%08X:Stalling CPU on voodoo\n", device->machine().device("maincpu")->safe_pc()); - device_spin_until_trigger(device->machine().device("maincpu"), 45678); + device->machine().device("maincpu")->execute().spin_until_trigger(45678); } } @@ -1672,7 +1672,7 @@ READ32_MEMBER(seattle_state::cmos_protect_r) WRITE32_MEMBER(seattle_state::seattle_watchdog_w) { - device_eat_cycles(&space.device(), 100); + space.device().execute().eat_cycles(100); } @@ -1786,7 +1786,7 @@ READ32_MEMBER(seattle_state::seattle_ide_r) device_t *device = machine().device("ide"); /* note that blitz times out if we don't have this cycle stealing */ if (offset == 0x3f6/4) - device_eat_cycles(machine().device("maincpu"), 100); + machine().device("maincpu")->execute().eat_cycles(100); return ide_controller32_r(device, offset, mem_mask); } diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c index d715a5cd9e4..9c070a9f707 100644 --- a/src/mame/drivers/seibuspi.c +++ b/src/mame/drivers/seibuspi.c @@ -1791,7 +1791,7 @@ static const eeprom_interface eeprom_intf = static INTERRUPT_GEN( spi_interrupt ) { - device_set_input_line(device, 0, ASSERT_LINE ); + device->execute().set_input_line(0, ASSERT_LINE ); } static IRQ_CALLBACK(spi_irq_callback) @@ -1817,7 +1817,7 @@ static MACHINE_RESET( spi ) UINT8 flash_data = rombase[0x1ffffc]; machine.device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE ); - device_set_irq_callback(machine.device("maincpu"), spi_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(spi_irq_callback); machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x00000680, 0x00000683, read32_delegate(FUNC(seibuspi_state::sound_fifo_r),state)); machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0x00000688, 0x0000068b, write32_delegate(FUNC(seibuspi_state::z80_prg_fifo_w),state)); @@ -1906,7 +1906,7 @@ static MACHINE_RESET( sxx2f ) machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0x0000068c, 0x0000068f, write32_delegate(FUNC(seibuspi_state::eeprom_w),state)); machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x00000680, 0x00000683, read32_delegate(FUNC(seibuspi_state::sb_coin_r),state)); - device_set_irq_callback(machine.device("maincpu"), spi_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(spi_irq_callback); state->m_sb_coin_latch = 0; } @@ -1945,13 +1945,13 @@ MACHINE_CONFIG_END READ32_MEMBER(seibuspi_state::senkyu_speedup_r) { - if (space.device().safe_pc()==0x00305bb2) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x00305bb2) space.device().execute().spin_until_interrupt(); // idle return m_spimainram[(0x0018cb4-0x800)/4]; } READ32_MEMBER(seibuspi_state::senkyua_speedup_r) { - if (space.device().safe_pc()== 0x30582e) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()== 0x30582e) space.device().execute().spin_until_interrupt(); // idle return m_spimainram[(0x0018c9c-0x800)/4]; } @@ -1960,10 +1960,10 @@ READ32_MEMBER(seibuspi_state::batlball_speedup_r) // printf("space.device().safe_pc() %06x\n", space.device().safe_pc()); /* batlbalu */ - if (space.device().safe_pc()==0x00305996) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x00305996) space.device().execute().spin_until_interrupt(); // idle /* batlball */ - if (space.device().safe_pc()==0x003058aa) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x003058aa) space.device().execute().spin_until_interrupt(); // idle return m_spimainram[(0x0018db4-0x800)/4]; } @@ -1971,19 +1971,19 @@ READ32_MEMBER(seibuspi_state::batlball_speedup_r) READ32_MEMBER(seibuspi_state::rdft_speedup_r) { /* rdft */ - if (space.device().safe_pc()==0x0203f0a) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0203f0a) space.device().execute().spin_until_interrupt(); // idle /* rdftau */ - if (space.device().safe_pc()==0x0203f16) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0203f16) space.device().execute().spin_until_interrupt(); // idle /* rdftj */ - if (space.device().safe_pc()==0x0203f22) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0203f22) space.device().execute().spin_until_interrupt(); // idle /* rdftdi */ - if (space.device().safe_pc()==0x0203f46) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0203f46) space.device().execute().spin_until_interrupt(); // idle /* rdftu */ - if (space.device().safe_pc()==0x0203f3a) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0203f3a) space.device().execute().spin_until_interrupt(); // idle // mame_printf_debug("%08x\n",space.device().safe_pc()); @@ -1993,13 +1993,13 @@ READ32_MEMBER(seibuspi_state::rdft_speedup_r) READ32_MEMBER(seibuspi_state::viprp1_speedup_r) { /* viprp1 */ - if (space.device().safe_pc()==0x0202769) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0202769) space.device().execute().spin_until_interrupt(); // idle /* viprp1s */ - if (space.device().safe_pc()==0x02027e9) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x02027e9) space.device().execute().spin_until_interrupt(); // idle /* viprp1ot */ - if (space.device().safe_pc()==0x02026bd) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x02026bd) space.device().execute().spin_until_interrupt(); // idle // mame_printf_debug("%08x\n",space.device().safe_pc()); @@ -2009,7 +2009,7 @@ READ32_MEMBER(seibuspi_state::viprp1_speedup_r) READ32_MEMBER(seibuspi_state::viprp1o_speedup_r) { /* viperp1o */ - if (space.device().safe_pc()==0x0201f99) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0201f99) space.device().execute().spin_until_interrupt(); // idle // mame_printf_debug("%08x\n",space.device().safe_pc()); return m_spimainram[(0x001d49c-0x800)/4]; } @@ -2019,7 +2019,7 @@ READ32_MEMBER(seibuspi_state::viprp1o_speedup_r) READ32_MEMBER(seibuspi_state::ejanhs_speedup_r) { // mame_printf_debug("%08x\n",space.device().safe_pc()); - if (space.device().safe_pc()==0x03032c7) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x03032c7) space.device().execute().spin_until_interrupt(); // idle return m_spimainram[(0x002d224-0x800)/4]; } #endif @@ -2028,16 +2028,16 @@ READ32_MEMBER(seibuspi_state::rf2_speedup_r) { /* rdft22kc */ - if (space.device().safe_pc()==0x0203926) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0203926) space.device().execute().spin_until_interrupt(); // idle /* rdft2, rdft2j */ - if (space.device().safe_pc()==0x0204372) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0204372) space.device().execute().spin_until_interrupt(); // idle /* rdft2us */ - if (space.device().safe_pc()==0x020420e) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x020420e) space.device().execute().spin_until_interrupt(); // idle /* rdft2a */ - if (space.device().safe_pc()==0x0204366) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0204366) space.device().execute().spin_until_interrupt(); // idle // mame_printf_debug("%08x\n",space.device().safe_pc()); @@ -2047,20 +2047,20 @@ READ32_MEMBER(seibuspi_state::rf2_speedup_r) READ32_MEMBER(seibuspi_state::rfjet_speedup_r) { /* rfjet, rfjetu, rfjeta */ - if (space.device().safe_pc()==0x0206082) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0206082) space.device().execute().spin_until_interrupt(); // idle /* rfjetus */ if (space.device().safe_pc()==0x0205b39) { UINT32 r; - device_spin_until_interrupt(&space.device()); // idle + space.device().execute().spin_until_interrupt(); // idle // Hack to enter test mode r = m_spimainram[(0x002894c-0x800)/4] & (~0x400); return r | (((ioport("SYSTEM")->read() ^ 0xff)<<8) & 0x400); } /* rfjetj */ - if (space.device().safe_pc()==0x0205f2e) device_spin_until_interrupt(&space.device()); // idle + if (space.device().safe_pc()==0x0205f2e) space.device().execute().spin_until_interrupt(); // idle // mame_printf_debug("%08x\n",space.device().safe_pc()); @@ -2189,7 +2189,7 @@ DRIVER_INIT_MEMBER(seibuspi_state,rfjet2k) static MACHINE_RESET( seibu386 ) { - device_set_irq_callback(machine.device("maincpu"), spi_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(spi_irq_callback); } static MACHINE_CONFIG_START( seibu386, seibuspi_state ) diff --git a/src/mame/drivers/seicross.c b/src/mame/drivers/seicross.c index c843511971a..61e6883bbad 100644 --- a/src/mame/drivers/seicross.c +++ b/src/mame/drivers/seicross.c @@ -393,7 +393,7 @@ static INTERRUPT_GEN( vblank_irq ) seicross_state *state = device->machine().driver_data(); 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/sengokmj.c b/src/mame/drivers/sengokmj.c index c17ca96f6d4..c11b8ab3f7f 100644 --- a/src/mame/drivers/sengokmj.c +++ b/src/mame/drivers/sengokmj.c @@ -287,7 +287,7 @@ GFXDECODE_END static INTERRUPT_GEN( sengokmj_interrupt ) { - device_set_input_line_and_vector(device,0,HOLD_LINE,0xc8/4); + device->execute().set_input_line_and_vector(0,HOLD_LINE,0xc8/4); } static MACHINE_CONFIG_START( sengokmj, sengokmj_state ) diff --git a/src/mame/drivers/senjyo.c b/src/mame/drivers/senjyo.c index 9c28c4a4d58..4448e683db6 100644 --- a/src/mame/drivers/senjyo.c +++ b/src/mame/drivers/senjyo.c @@ -93,7 +93,7 @@ static INTERRUPT_GEN( senjyo_interrupt ) { senjyo_state *state = device->machine().driver_data(); - if (state->m_int_delay_kludge == 0) device_set_input_line(device, 0, HOLD_LINE); + if (state->m_int_delay_kludge == 0) device->execute().set_input_line(0, HOLD_LINE); else state->m_int_delay_kludge--; } diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index 20cf7844506..1f729f05df4 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -1709,7 +1709,7 @@ WRITE16_MEMBER(seta_state::calibr50_soundlatch_w) { soundlatch_word_w(space, 0, data, mem_mask); machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); - device_spin_until_time(&space.device(), attotime::from_usec(50)); // Allow the other cpu to reply + space.device().execute().spin_until_time(attotime::from_usec(50)); // Allow the other cpu to reply } } @@ -3186,7 +3186,7 @@ static MACHINE_RESET(calibr50) WRITE8_MEMBER(seta_state::calibr50_soundlatch2_w) { soundlatch2_byte_w(space,0,data); - device_spin_until_time(&space.device(), attotime::from_usec(50)); // Allow the other cpu to reply + space.device().execute().spin_until_time(attotime::from_usec(50)); // Allow the other cpu to reply } static ADDRESS_MAP_START( calibr50_sub_map, AS_PROGRAM, 8, seta_state ) @@ -7420,10 +7420,10 @@ static TIMER_DEVICE_CALLBACK( seta_interrupt_1_and_2 ) 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 == 112) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); } static TIMER_DEVICE_CALLBACK( seta_interrupt_2_and_4 ) @@ -7432,10 +7432,10 @@ static TIMER_DEVICE_CALLBACK( seta_interrupt_2_and_4 ) 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 == 112) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } @@ -7445,10 +7445,10 @@ static TIMER_DEVICE_CALLBACK( seta_sub_interrupt ) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); if(scanline == 112) - device_set_input_line(state->m_subcpu, 0, HOLD_LINE); + state->m_subcpu->set_input_line(0, HOLD_LINE); } @@ -7476,10 +7476,10 @@ static TIMER_DEVICE_CALLBACK( tndrcade_sub_interrupt ) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); if((scanline % 16) == 0) - device_set_input_line(state->m_subcpu, 0, HOLD_LINE); + state->m_subcpu->set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( tndrcade, seta_state ) @@ -7624,10 +7624,10 @@ static TIMER_DEVICE_CALLBACK( calibr50_interrupt ) int scanline = param; if((scanline % 64) == 0) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); if(scanline == 248) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); } @@ -8029,10 +8029,10 @@ static TIMER_DEVICE_CALLBACK( setaroul_interrupt ) int scanline = param; if(scanline == 248) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); if(scanline == 112) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); } @@ -8156,7 +8156,7 @@ MACHINE_CONFIG_END #if __uPD71054_TIMER static INTERRUPT_GEN( wrofaero_interrupt ) { - device_set_input_line(device, 2, HOLD_LINE ); + device->execute().set_input_line(2, HOLD_LINE ); } static MACHINE_START( wrofaero ) { uPD71054_timer_init(machine); } @@ -9088,10 +9088,10 @@ static TIMER_DEVICE_CALLBACK( crazyfgt_interrupt ) int scanline = param; if((scanline % 48) == 0) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); // should this be triggered by the 3812? + state->m_maincpu->set_input_line(2, HOLD_LINE); // should this be triggered by the 3812? if(scanline == 240) - device_set_input_line(state->m_maincpu, 1, HOLD_LINE); + state->m_maincpu->set_input_line(1, HOLD_LINE); } static MACHINE_CONFIG_START( crazyfgt, seta_state ) @@ -9139,16 +9139,16 @@ static TIMER_DEVICE_CALLBACK( inttoote_interrupt ) /* ACIA irq */ if(scanline == 15) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); if(scanline == 38) - device_set_input_line(state->m_maincpu, 1, HOLD_LINE); + state->m_maincpu->set_input_line(1, HOLD_LINE); if(scanline == 61) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); if(scanline >= 85 && (scanline % 23) == 0) - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); } static const pia6821_interface inttoote_pia0_intf = diff --git a/src/mame/drivers/seta2.c b/src/mame/drivers/seta2.c index 35a7c940cd4..833a7eb570d 100644 --- a/src/mame/drivers/seta2.c +++ b/src/mame/drivers/seta2.c @@ -2168,10 +2168,10 @@ static TIMER_DEVICE_CALLBACK( funcube_interrupt ) int scanline = param; if(scanline == 368) - device_set_input_line(state->m_maincpu, 1, HOLD_LINE); + state->m_maincpu->set_input_line(1, HOLD_LINE); if(scanline == 0) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); } static INTERRUPT_GEN( funcube_sub_timer_irq ) @@ -2180,7 +2180,7 @@ static INTERRUPT_GEN( funcube_sub_timer_irq ) if ( state->m_funcube_serial_count ) { - device_set_input_line(device, H8_SCI_1_RX, HOLD_LINE); + device->execute().set_input_line(H8_SCI_1_RX, HOLD_LINE); } else { @@ -2199,7 +2199,7 @@ static INTERRUPT_GEN( funcube_sub_timer_irq ) state->m_funcube_press = press; } - device_set_input_line(device, H8_METRO_TIMER_HACK, HOLD_LINE); + device->execute().set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); } static MACHINE_RESET( funcube ) diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c index 8613dfc1fb5..c53306921b3 100644 --- a/src/mame/drivers/sf.c +++ b/src/mame/drivers/sf.c @@ -45,7 +45,7 @@ WRITE16_MEMBER(sf_state::soundcmd_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); } } @@ -799,7 +799,7 @@ GFXDECODE_END static void irq_handler( device_t *device, int irq ) { sf_state *state = device->machine().driver_data(); - 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 = @@ -818,8 +818,8 @@ static MACHINE_START( sf ) sf_state *state = machine.driver_data(); /* devices */ - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_sf_active)); state->save_item(NAME(state->m_bgscroll)); diff --git a/src/mame/drivers/sfcbox.c b/src/mame/drivers/sfcbox.c index cfc9e602412..1fc3327e1c4 100644 --- a/src/mame/drivers/sfcbox.c +++ b/src/mame/drivers/sfcbox.c @@ -237,8 +237,8 @@ READ8_MEMBER( sfcbox_state::port_81_r ) WRITE8_MEMBER( sfcbox_state::port_81_w ) { - device_set_input_line(m_maincpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); - device_set_input_line(m_soundcpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); + m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); ioport("OSD_CS")->write(data, 0xff); } @@ -478,8 +478,8 @@ static MACHINE_RESET( sfcbox ) MACHINE_RESET_CALL( snes ); /* start with both CPUs disabled */ - device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, ASSERT_LINE); - device_set_input_line(state->m_soundcpu, INPUT_LINE_RESET, ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); + state->m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } static MACHINE_CONFIG_DERIVED( sfcbox, snes ) diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c index 1c77d1ee885..e7e46e82537 100644 --- a/src/mame/drivers/shanghai.c +++ b/src/mame/drivers/shanghai.c @@ -122,7 +122,7 @@ static SCREEN_UPDATE_IND16( shanghai ) static INTERRUPT_GEN( shanghai_interrupt ) { - device_set_input_line_and_vector(device,0,HOLD_LINE,0x80); + device->execute().set_input_line_and_vector(0,HOLD_LINE,0x80); } WRITE16_MEMBER(shanghai_state::shanghai_coin_w) diff --git a/src/mame/drivers/shaolins.c b/src/mame/drivers/shaolins.c index 5516a482a25..e7e735a357e 100644 --- a/src/mame/drivers/shaolins.c +++ b/src/mame/drivers/shaolins.c @@ -19,9 +19,9 @@ static TIMER_DEVICE_CALLBACK( shaolins_interrupt ) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); else if((scanline % 32) == 0) - if (state->m_nmi_enable & 0x02) device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + if (state->m_nmi_enable & 0x02) state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/drivers/sigmab98.c b/src/mame/drivers/sigmab98.c index 5e20589f812..9851970e46c 100644 --- a/src/mame/drivers/sigmab98.c +++ b/src/mame/drivers/sigmab98.c @@ -1690,7 +1690,7 @@ const eeprom_interface eeprom_intf = static INTERRUPT_GEN( gegege_vblank_interrupt ) { - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x5a); + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x5a); } static MACHINE_CONFIG_START( gegege, sigmab98_state ) @@ -1788,13 +1788,13 @@ static TIMER_DEVICE_CALLBACK( sammymd1_irq ) int scanline = param; if(scanline == 240) - device_set_input_line_and_vector(state->m_maincpu,0,HOLD_LINE, state->m_vblank_vector); + state->m_maincpu->set_input_line_and_vector(0,HOLD_LINE, state->m_vblank_vector); if(scanline == 128) - device_set_input_line_and_vector(state->m_maincpu,0,HOLD_LINE, state->m_timer0_vector); + state->m_maincpu->set_input_line_and_vector(0,HOLD_LINE, state->m_timer0_vector); if(scanline == 32) - device_set_input_line_and_vector(state->m_maincpu,0,HOLD_LINE, state->m_timer1_vector); + state->m_maincpu->set_input_line_and_vector(0,HOLD_LINE, state->m_timer1_vector); } static MACHINE_CONFIG_DERIVED( animalc, sammymdl ) diff --git a/src/mame/drivers/silvmil.c b/src/mame/drivers/silvmil.c index 1b51cb36332..8b62dc5193a 100644 --- a/src/mame/drivers/silvmil.c +++ b/src/mame/drivers/silvmil.c @@ -302,7 +302,7 @@ ADDRESS_MAP_END static void silvmil_irqhandler( device_t *device, int irq ) { - device_set_input_line(device->machine().device("audiocpu"), 0, irq ? ASSERT_LINE : CLEAR_LINE); + device->machine().device("audiocpu")->execute().set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/simpl156.c b/src/mame/drivers/simpl156.c index 819c7a21ab4..8444b979717 100644 --- a/src/mame/drivers/simpl156.c +++ b/src/mame/drivers/simpl156.c @@ -385,7 +385,7 @@ GFXDECODE_END static INTERRUPT_GEN( simpl156_vbl_interrupt ) { - device_set_input_line(device, ARM_IRQ_LINE, HOLD_LINE); + device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); } @@ -1055,7 +1055,7 @@ DRIVER_INIT_MEMBER(simpl156_state,simpl156) READ32_MEMBER(simpl156_state::joemacr_speedup_r) { if (space.device().safe_pc() == 0x284) - device_spin_until_time(&space.device(), attotime::from_usec(400)); + space.device().execute().spin_until_time(attotime::from_usec(400)); return m_systemram[0x18/4]; } @@ -1069,7 +1069,7 @@ DRIVER_INIT_MEMBER(simpl156_state,joemacr) READ32_MEMBER(simpl156_state::chainrec_speedup_r) { if (space.device().safe_pc() == 0x2d4) - device_spin_until_time(&space.device(), attotime::from_usec(400)); + space.device().execute().spin_until_time(attotime::from_usec(400)); return m_systemram[0x18/4]; } @@ -1082,7 +1082,7 @@ DRIVER_INIT_MEMBER(simpl156_state,chainrec) READ32_MEMBER(simpl156_state::prtytime_speedup_r) { if (space.device().safe_pc() == 0x4f0) - device_spin_until_time(&space.device(), attotime::from_usec(400)); + space.device().execute().spin_until_time(attotime::from_usec(400)); return m_systemram[0xae0/4]; } @@ -1096,7 +1096,7 @@ DRIVER_INIT_MEMBER(simpl156_state,prtytime) READ32_MEMBER(simpl156_state::charlien_speedup_r) { if (space.device().safe_pc() == 0xc8c8) - device_spin_until_time(&space.device(), attotime::from_usec(400)); + space.device().execute().spin_until_time(attotime::from_usec(400)); return m_systemram[0x10/4]; } @@ -1109,7 +1109,7 @@ DRIVER_INIT_MEMBER(simpl156_state,charlien) READ32_MEMBER(simpl156_state::osman_speedup_r) { if (space.device().safe_pc() == 0x5974) - device_spin_until_time(&space.device(), attotime::from_usec(400)); + space.device().execute().spin_until_time(attotime::from_usec(400)); return m_systemram[0x10/4]; } diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c index 714d3b392e3..94acce240ce 100644 --- a/src/mame/drivers/simpsons.c +++ b/src/mame/drivers/simpsons.c @@ -115,7 +115,7 @@ WRITE8_MEMBER(simpsons_state::z80_bankswitch_w) static void sound_nmi_callback( running_machine &machine, int param ) { simpsons_state *state = machine.driver_data(); - device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, (state->m_nmi_enabled) ? CLEAR_LINE : ASSERT_LINE ); + state->m_audiocpu->set_input_line(INPUT_LINE_NMI, (state->m_nmi_enabled) ? CLEAR_LINE : ASSERT_LINE ); state->m_nmi_enabled = 0; } #endif @@ -123,12 +123,12 @@ static void sound_nmi_callback( running_machine &machine, int param ) static TIMER_CALLBACK( nmi_callback ) { simpsons_state *state = machine.driver_data(); - 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(simpsons_state::z80_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(25), FUNC(nmi_callback)); /* kludge until the K053260 is emulated correctly */ } @@ -256,7 +256,7 @@ static TIMER_CALLBACK( dmaend_callback ) { simpsons_state *state = machine.driver_data(); if (state->m_firq_enabled) - device_set_input_line(state->m_maincpu, KONAMI_FIRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(KONAMI_FIRQ_LINE, HOLD_LINE); } @@ -272,7 +272,7 @@ static INTERRUPT_GEN( simpsons_irq ) } 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); } static const k052109_interface simpsons_k052109_intf = diff --git a/src/mame/drivers/skimaxx.c b/src/mame/drivers/skimaxx.c index 266b80f0b52..1af0fb80ce5 100644 --- a/src/mame/drivers/skimaxx.c +++ b/src/mame/drivers/skimaxx.c @@ -292,8 +292,8 @@ WRITE32_MEMBER(skimaxx_state::skimaxx_sub_ctrl_w) { device_t *subcpu = machine().device("subcpu"); - device_set_input_line(subcpu, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); - device_set_input_line(subcpu, INPUT_LINE_HALT, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); + subcpu->execute().set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); + subcpu->execute().set_input_line(INPUT_LINE_HALT, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); } } diff --git a/src/mame/drivers/skyarmy.c b/src/mame/drivers/skyarmy.c index dcea9f6b04a..3d5b1c36591 100644 --- a/src/mame/drivers/skyarmy.c +++ b/src/mame/drivers/skyarmy.c @@ -158,7 +158,7 @@ static INTERRUPT_GEN( skyarmy_nmi_source ) { skyarmy_state *state = device->machine().driver_data(); - if(state->m_nmi) device_set_input_line(device,INPUT_LINE_NMI, PULSE_LINE); + if(state->m_nmi) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/drivers/skydiver.c b/src/mame/drivers/skydiver.c index 20793844904..8ee983c60c9 100644 --- a/src/mame/drivers/skydiver.c +++ b/src/mame/drivers/skydiver.c @@ -156,7 +156,7 @@ static INTERRUPT_GEN( skydiver_interrupt ) discrete_sound_w(discrete, SKYDIVER_NOISE_DATA, state->m_videoram[0x396] & 0x0f); // NAM - Noise Amplitude if (state->m_nmion) - 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/skyfox.c b/src/mame/drivers/skyfox.c index b21fe159454..5ee9910cb7e 100644 --- a/src/mame/drivers/skyfox.c +++ b/src/mame/drivers/skyfox.c @@ -84,7 +84,7 @@ ADDRESS_MAP_END INPUT_CHANGED_MEMBER(skyfox_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( skyfox ) @@ -223,7 +223,7 @@ static MACHINE_START( skyfox ) { skyfox_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->save_item(NAME(state->m_bg_pos)); state->save_item(NAME(state->m_bg_ctrl)); diff --git a/src/mame/drivers/skykid.c b/src/mame/drivers/skykid.c index cdea77fd970..79b7f0ce235 100644 --- a/src/mame/drivers/skykid.c +++ b/src/mame/drivers/skykid.c @@ -428,7 +428,7 @@ static INTERRUPT_GEN( main_vblank_irq ) skykid_state *state = device->machine().driver_data(); if(state->m_main_irq_mask) - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } @@ -437,7 +437,7 @@ static INTERRUPT_GEN( mcu_vblank_irq ) skykid_state *state = device->machine().driver_data(); if(state->m_mcu_irq_mask) - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c index 9d3cde2d9cd..2018e70114a 100644 --- a/src/mame/drivers/skylncr.c +++ b/src/mame/drivers/skylncr.c @@ -698,7 +698,7 @@ static const ay8910_interface ay8910_config = static INTERRUPT_GEN( skylncr_vblank_interrupt ) { skylncr_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + if (state->m_nmi_enable) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/drivers/slapfght.c b/src/mame/drivers/slapfght.c index 297e5991990..c1529195962 100644 --- a/src/mame/drivers/slapfght.c +++ b/src/mame/drivers/slapfght.c @@ -739,7 +739,7 @@ static INTERRUPT_GEN( vblank_irq ) slapfght_state *state = device->machine().driver_data(); 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/slapshot.c b/src/mame/drivers/slapshot.c index bbe178877f0..a6532decafb 100644 --- a/src/mame/drivers/slapshot.c +++ b/src/mame/drivers/slapshot.c @@ -174,14 +174,14 @@ WRITE16_MEMBER(slapshot_state::color_ram_word_w) static TIMER_CALLBACK( slapshot_interrupt6 ) { slapshot_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); } static INTERRUPT_GEN( slapshot_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000 - 500), FUNC(slapshot_interrupt6)); - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } @@ -232,7 +232,7 @@ WRITE16_MEMBER(slapshot_state::opwolf3_adc_req_w) } /* 4 writes a frame - one for each analogue port */ - device_set_input_line(m_maincpu, 3, HOLD_LINE); + m_maincpu->set_input_line(3, HOLD_LINE); } /***************************************************** @@ -486,7 +486,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { slapshot_state *state = device->machine().driver_data(); - 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 = @@ -526,8 +526,8 @@ static MACHINE_START( slapshot ) state->membank("bank10")->configure_entries(0, 4, state->memregion("audiocpu")->base() + 0xc000, 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_tc0140syt = machine.device("tc0140syt"); state->m_tc0480scp = machine.device("tc0480scp"); state->m_tc0360pri = machine.device("tc0360pri"); diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c index a253ae3d691..3cbeaa66a7b 100644 --- a/src/mame/drivers/sliver.c +++ b/src/mame/drivers/sliver.c @@ -467,7 +467,7 @@ static TIMER_DEVICE_CALLBACK ( obj_irq_cb ) { sliver_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_maincpu, 3, HOLD_LINE); + state->m_maincpu->set_input_line(3, HOLD_LINE); } static MACHINE_CONFIG_START( sliver, sliver_state ) diff --git a/src/mame/drivers/snk6502.c b/src/mame/drivers/snk6502.c index e8d97fe3fbc..480e74ddf66 100644 --- a/src/mame/drivers/snk6502.c +++ b/src/mame/drivers/snk6502.c @@ -745,12 +745,12 @@ static INTERRUPT_GEN( satansat_interrupt ) snk6502_state *state = device->machine().driver_data(); if(state->m_irq_mask) - device_set_input_line(device, M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ + device->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ } static INTERRUPT_GEN( snk6502_interrupt ) { - device_set_input_line(device, M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ + device->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ } diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c index 548bff0b5a3..217df1a7469 100644 --- a/src/mame/drivers/snowbros.c +++ b/src/mame/drivers/snowbros.c @@ -126,13 +126,13 @@ static TIMER_DEVICE_CALLBACK( snowbros_irq ) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_maincpu, 2, ASSERT_LINE); + state->m_maincpu->set_input_line(2, ASSERT_LINE); if(scanline == 128) - device_set_input_line(state->m_maincpu, 3, ASSERT_LINE); + state->m_maincpu->set_input_line(3, ASSERT_LINE); if(scanline == 32) - device_set_input_line(state->m_maincpu, 4, ASSERT_LINE); + state->m_maincpu->set_input_line(4, ASSERT_LINE); } static TIMER_DEVICE_CALLBACK( snowbros3_irq ) @@ -143,13 +143,13 @@ static TIMER_DEVICE_CALLBACK( snowbros3_irq ) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_maincpu, 2, ASSERT_LINE); + state->m_maincpu->set_input_line(2, ASSERT_LINE); if(scanline == 128) - device_set_input_line(state->m_maincpu, 3, ASSERT_LINE); + state->m_maincpu->set_input_line(3, ASSERT_LINE); if(scanline == 32) - device_set_input_line(state->m_maincpu, 4, ASSERT_LINE); + state->m_maincpu->set_input_line(4, ASSERT_LINE); if (state->m_sb3_music_is_playing) { diff --git a/src/mame/drivers/solomon.c b/src/mame/drivers/solomon.c index 9dd68503ed4..b7704dfb3c4 100644 --- a/src/mame/drivers/solomon.c +++ b/src/mame/drivers/solomon.c @@ -198,7 +198,7 @@ static INTERRUPT_GEN( vblank_irq ) solomon_state *state = device->machine().driver_data(); 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/sonson.c b/src/mame/drivers/sonson.c index 090a1d9bee8..877bae873f4 100644 --- a/src/mame/drivers/sonson.c +++ b/src/mame/drivers/sonson.c @@ -61,7 +61,7 @@ WRITE8_MEMBER(sonson_state::sonson_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(m_audiocpu, M6809_FIRQ_LINE, HOLD_LINE); + m_audiocpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } m_last_irq = data; @@ -229,7 +229,7 @@ static MACHINE_START( sonson ) { sonson_state *state = machine.driver_data(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_last_irq)); } diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c index 21b05b123bf..713e6953d0f 100644 --- a/src/mame/drivers/spcforce.c +++ b/src/mame/drivers/spcforce.c @@ -258,7 +258,7 @@ static INTERRUPT_GEN( vblank_irq ) spcforce_state *state = device->machine().driver_data(); if(state->m_irq_mask) - device_set_input_line(device, 3, HOLD_LINE); + device->execute().set_input_line(3, HOLD_LINE); } static MACHINE_CONFIG_START( spcforce, spcforce_state ) diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c index f022cffee65..95630f22204 100644 --- a/src/mame/drivers/splash.c +++ b/src/mame/drivers/splash.c @@ -67,7 +67,7 @@ WRITE16_MEMBER(splash_state::roldf_sh_irqtrigger_w) } // give the z80 time to see it - device_spin_until_time(&space.device(), attotime::from_usec(40)); + space.device().execute().spin_until_time(attotime::from_usec(40)); } WRITE16_MEMBER(splash_state::splash_coin_w) @@ -148,7 +148,7 @@ static void roldfrog_update_irq( running_machine &machine ) { splash_state * state = machine.driver_data(); int irq = (state->m_sound_irq ? 0x08 : 0) | ((state->m_vblank_irq) ? 0x18 : 0); - device_set_input_line_and_vector(machine.device("audiocpu"), 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); + machine.device("audiocpu")->execute().set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); } WRITE8_MEMBER(splash_state::roldfrog_vblank_ack_w) @@ -600,7 +600,7 @@ static void adpcm_int1( device_t *device ) if (state->m_msm_toggle1 == 0) { state->m_msm_source|=1; - device_set_input_line_and_vector(device->machine().device("audiocpu"), 0, HOLD_LINE, 0x38); + device->machine().device("audiocpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0x38); } } } @@ -616,7 +616,7 @@ static void adpcm_int2( device_t *device ) if (state->m_msm_toggle2 == 0) { state->m_msm_source|=2; - device_set_input_line_and_vector(device->machine().device("audiocpu"), 0, HOLD_LINE, 0x38); + device->machine().device("audiocpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0x38); } } } diff --git a/src/mame/drivers/spoker.c b/src/mame/drivers/spoker.c index 2c77f9ba56c..63e79c241f1 100644 --- a/src/mame/drivers/spoker.c +++ b/src/mame/drivers/spoker.c @@ -523,7 +523,7 @@ static INTERRUPT_GEN( spoker_interrupt ) { // spoker_state *state = device->machine().driver_data(); - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } static MACHINE_CONFIG_START( spoker, spoker_state ) diff --git a/src/mame/drivers/sprcros2.c b/src/mame/drivers/sprcros2.c index 0f38a6c6873..cd79f01b2c4 100644 --- a/src/mame/drivers/sprcros2.c +++ b/src/mame/drivers/sprcros2.c @@ -253,12 +253,12 @@ static TIMER_DEVICE_CALLBACK( sprcros2_m_interrupt ) if (scanline == 240) { if(state->m_port7&0x01) - device_set_input_line(state->m_master, INPUT_LINE_NMI, PULSE_LINE); + state->m_master->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } else if(scanline == 0) { if(state->m_port7&0x08) - device_set_input_line(state->m_master, 0, HOLD_LINE); + state->m_master->set_input_line(0, HOLD_LINE); } } @@ -267,7 +267,7 @@ static INTERRUPT_GEN( sprcros2_s_interrupt ) sprcros2_state *state = device->machine().driver_data(); if(state->m_s_port3&0x01) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_START( sprcros2 ) diff --git a/src/mame/drivers/sprint2.c b/src/mame/drivers/sprint2.c index 1f223a9d032..6d2532ef065 100644 --- a/src/mame/drivers/sprint2.c +++ b/src/mame/drivers/sprint2.c @@ -111,7 +111,7 @@ static INTERRUPT_GEN( sprint2 ) device->machine().watchdog_enable(!service_mode(device->machine())); if (!service_mode(device->machine())) - 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/spy.c b/src/mame/drivers/spy.c index fe938570ccc..b67bde7472f 100644 --- a/src/mame/drivers/spy.c +++ b/src/mame/drivers/spy.c @@ -31,7 +31,7 @@ static INTERRUPT_GEN( spy_interrupt ) spy_state *state = device->machine().driver_data(); 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(spy_state::spy_bankedram1_r) @@ -324,7 +324,7 @@ WRITE8_MEMBER(spy_state::spy_3f90_w) } spy_collision(machine()); //ZT - device_set_input_line(m_maincpu, M6809_FIRQ_LINE, HOLD_LINE); + m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } m_old_3f90 = data; @@ -333,7 +333,7 @@ WRITE8_MEMBER(spy_state::spy_3f90_w) WRITE8_MEMBER(spy_state::spy_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(spy_state::sound_bank_w) @@ -470,7 +470,7 @@ static const k007232_interface spy_k007232_interface = static void irqhandler( device_t *device, int linestate ) { spy_state *state = device->machine().driver_data(); - device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, linestate); + state->m_audiocpu->set_input_line(INPUT_LINE_NMI, linestate); } static const ym3812_interface ym3812_config = @@ -505,8 +505,8 @@ static MACHINE_START( spy ) state->m_generic_paletteram_8.allocate(0x800); memset(state->m_pmcram, 0, sizeof(state->m_pmcram)); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k052109 = machine.device("k052109"); state->m_k051960 = machine.device("k051960"); state->m_k007232_1 = machine.device("k007232_1"); diff --git a/src/mame/drivers/srumbler.c b/src/mame/drivers/srumbler.c index d9b646b4ae9..5e2141aa0c0 100644 --- a/src/mame/drivers/srumbler.c +++ b/src/mame/drivers/srumbler.c @@ -57,10 +57,10 @@ static TIMER_DEVICE_CALLBACK( srumbler_interrupt ) int scanline = param; if (scanline == 248) - device_set_input_line(state->m_maincpu,0,HOLD_LINE); + state->m_maincpu->set_input_line(0,HOLD_LINE); if (scanline == 0) - device_set_input_line(state->m_maincpu,M6809_FIRQ_LINE,HOLD_LINE); + state->m_maincpu->set_input_line(M6809_FIRQ_LINE,HOLD_LINE); } /* diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c index a3dde6d692a..f868e0d28b0 100644 --- a/src/mame/drivers/ssfindo.c +++ b/src/mame/drivers/ssfindo.c @@ -355,17 +355,17 @@ ssfindo_speedup_func ssfindo_speedup; static void ssfindo_speedups(address_space* space) { if (space->device().safe_pc()==0x2d6c8) // ssfindo - device_spin_until_time(&space->device(), attotime::from_usec(20)); + space->device().execute().spin_until_time(attotime::from_usec(20)); else if (space->device().safe_pc()==0x2d6bc) // ssfindo - device_spin_until_time(&space->device(), attotime::from_usec(20)); + space->device().execute().spin_until_time(attotime::from_usec(20)); } static void ppcar_speedups(address_space* space) { if (space->device().safe_pc()==0x000bc8) // ppcar - device_spin_until_time(&space->device(), attotime::from_usec(20)); + space->device().execute().spin_until_time(attotime::from_usec(20)); else if (space->device().safe_pc()==0x000bbc) // ppcar - device_spin_until_time(&space->device(), attotime::from_usec(20)); + space->device().execute().spin_until_time(attotime::from_usec(20)); } diff --git a/src/mame/drivers/ssozumo.c b/src/mame/drivers/ssozumo.c index 5d591428969..9e28fb4225e 100644 --- a/src/mame/drivers/ssozumo.c +++ b/src/mame/drivers/ssozumo.c @@ -185,7 +185,7 @@ static INTERRUPT_GEN( sound_timer_irq ) ssozumo_state *state = device->machine().driver_data(); 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( ssozumo, ssozumo_state ) diff --git a/src/mame/drivers/ssv.c b/src/mame/drivers/ssv.c index 9bf411e586a..7234105d4b7 100644 --- a/src/mame/drivers/ssv.c +++ b/src/mame/drivers/ssv.c @@ -325,7 +325,7 @@ static MACHINE_RESET( ssv ) { ssv_state *state = machine.driver_data(); state->m_requested_int = 0; - device_set_irq_callback(machine.device("maincpu"), ssv_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(ssv_irq_callback); state->membank("bank1")->set_base(state->memregion("user1")->base()); } diff --git a/src/mame/drivers/st0016.c b/src/mame/drivers/st0016.c index de5e85b0505..902194651fd 100644 --- a/src/mame/drivers/st0016.c +++ b/src/mame/drivers/st0016.c @@ -423,10 +423,10 @@ static TIMER_DEVICE_CALLBACK(st0016_int) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_maincpu,0,HOLD_LINE); + state->m_maincpu->set_input_line(0,HOLD_LINE); else if((scanline % 64) == 0) if(state->m_maincpu->state_int(Z80_IFF1)) /* dirty hack ... */ - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE ); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); } static const st0016_interface st0016_config = diff --git a/src/mame/drivers/stactics.c b/src/mame/drivers/stactics.c index 787b491b2e6..a7275346712 100644 --- a/src/mame/drivers/stactics.c +++ b/src/mame/drivers/stactics.c @@ -157,7 +157,7 @@ static INTERRUPT_GEN( stactics_interrupt ) move_motor(device->machine(), state); - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c index e4cba884d74..3b734b79cbe 100644 --- a/src/mame/drivers/statriv2.c +++ b/src/mame/drivers/statriv2.c @@ -217,8 +217,8 @@ static INTERRUPT_GEN( statriv2_interrupt ) state->m_latched_coin |= new_coin & (new_coin ^ state->m_last_coin); state->m_last_coin = new_coin; - device_set_input_line(device, I8085_RST75_LINE, ASSERT_LINE); - device_set_input_line(device, I8085_RST75_LINE, CLEAR_LINE); + device->execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE); + device->execute().set_input_line(I8085_RST75_LINE, CLEAR_LINE); } diff --git a/src/mame/drivers/strnskil.c b/src/mame/drivers/strnskil.c index 671591ce750..489c09b6ad2 100644 --- a/src/mame/drivers/strnskil.c +++ b/src/mame/drivers/strnskil.c @@ -324,7 +324,7 @@ static TIMER_DEVICE_CALLBACK( strnskil_irq ) if(scanline == 240 || scanline == 96) { - 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/su2000.c b/src/mame/drivers/su2000.c index e7d74742647..b686cb555bd 100644 --- a/src/mame/drivers/su2000.c +++ b/src/mame/drivers/su2000.c @@ -279,7 +279,7 @@ static MACHINE_START( su2000 ) space->install_write_bank(0x100000, ram_limit - 1, "hma_bank"); state->membank("hma_bank")->set_base(state->m_pc_ram + 0xa0000); - device_set_irq_callback(machine.device("maincpu"), pc_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc_irq_callback); init_pc_common(machine, PCCOMMON_KEYBOARD_AT, su2000_set_keyb_int); diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c index 3eafd82122b..0e7e707108f 100644 --- a/src/mame/drivers/subsino2.c +++ b/src/mame/drivers/subsino2.c @@ -866,7 +866,7 @@ static INTERRUPT_GEN( am188em_int0_irq ) subsino2_state *state = device->machine().driver_data(); if ( ((state->m_am188em_regs[AM188EM_IMASK+0] & 0x10) == 0) || // IMASK.I0 mask ((state->m_am188em_regs[AM188EM_I0CON+0] & 0x08) == 0) ) // I0CON.MSK mask - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x0c); // INT0 (background scrolling in xplan) + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x0c); // INT0 (background scrolling in xplan) } static TIMER_DEVICE_CALLBACK( am188em_timer2_irq ) diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c index 5bde3d7aa09..5e668f603b6 100644 --- a/src/mame/drivers/suna16.c +++ b/src/mame/drivers/suna16.c @@ -760,10 +760,10 @@ static TIMER_DEVICE_CALLBACK( bssoccer_interrupt ) 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 == 0) - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); // does RAM to sprite buffer copy here + state->m_maincpu->set_input_line(2, HOLD_LINE); // does RAM to sprite buffer copy here } static MACHINE_CONFIG_START( bssoccer, suna16_state ) diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c index 3a4b65d8085..c1fed0a566a 100644 --- a/src/mame/drivers/suna8.c +++ b/src/mame/drivers/suna8.c @@ -1743,9 +1743,9 @@ static TIMER_DEVICE_CALLBACK( brickzn_interrupt ) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); if(scanline == 112) - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); // TODO: NMI enable } @@ -1826,9 +1826,9 @@ static TIMER_DEVICE_CALLBACK( hardhea2_interrupt ) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); if(scanline == 112) - if (state->m_nmi_enable) device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + if (state->m_nmi_enable) state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_RESET( hardhea2 ) diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c index eda89b9f932..a2bfd6810ef 100644 --- a/src/mame/drivers/supbtime.c +++ b/src/mame/drivers/supbtime.c @@ -53,7 +53,7 @@ READ16_MEMBER(supbtime_state::supbtime_controls_r) WRITE16_MEMBER(supbtime_state::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); } /******************************************************************************/ @@ -311,7 +311,7 @@ GFXDECODE_END static void sound_irq(device_t *device, int state) { supbtime_state *driver_state = device->machine().driver_data(); - 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 = @@ -334,8 +334,8 @@ static MACHINE_START( supbtime ) { supbtime_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_deco_tilegen1 = machine.device("tilegen1"); } diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c index 3e2b95fe0e0..b82d3dcddee 100644 --- a/src/mame/drivers/superchs.c +++ b/src/mame/drivers/superchs.c @@ -438,7 +438,7 @@ ROM_END READ32_MEMBER(superchs_state::main_cycle_r) { if (space.device().safe_pc()==0x702) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); return m_ram[0]; } @@ -446,7 +446,7 @@ READ32_MEMBER(superchs_state::main_cycle_r) READ16_MEMBER(superchs_state::sub_cycle_r) { if (space.device().safe_pc()==0x454) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); return m_ram[2]&0xffff; } diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c index 3eb26761dbc..cbf175663c7 100644 --- a/src/mame/drivers/superdq.c +++ b/src/mame/drivers/superdq.c @@ -142,7 +142,7 @@ static INTERRUPT_GEN( superdq_vblank ) toggles (680usec after the vblank). We could set up a timer to do that, but this works as well */ state->m_laserdisc->data_w(state->m_ld_out_latch); - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } WRITE8_MEMBER(superdq_state::superdq_videoram_w) diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c index d2df76e3547..cfb2d0775b3 100644 --- a/src/mame/drivers/superqix.c +++ b/src/mame/drivers/superqix.c @@ -987,7 +987,7 @@ static INTERRUPT_GEN( vblank_irq ) superqix_state *state = device->machine().driver_data(); 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( sqix_timer_irq ) @@ -995,7 +995,7 @@ static INTERRUPT_GEN( sqix_timer_irq ) superqix_state *state = device->machine().driver_data(); if (state->m_nmi_mask) - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c index 15260bf845e..6257a0f8fe9 100644 --- a/src/mame/drivers/supertnk.c +++ b/src/mame/drivers/supertnk.c @@ -167,7 +167,7 @@ WRITE8_MEMBER(supertnk_state::supertnk_bankswitch_1_w) static INTERRUPT_GEN( supertnk_interrupt ) { /* On a TMS9980, a 6 on the interrupt bus means a level 4 interrupt */ - device_set_input_line_and_vector(device, 0, ASSERT_LINE, 6); + device->execute().set_input_line_and_vector(0, ASSERT_LINE, 6); } diff --git a/src/mame/drivers/superwng.c b/src/mame/drivers/superwng.c index 691ee088bf1..aa37b42c02c 100644 --- a/src/mame/drivers/superwng.c +++ b/src/mame/drivers/superwng.c @@ -212,25 +212,25 @@ static INTERRUPT_GEN( superwng_nmi_interrupt ) WRITE8_MEMBER(superwng_state::superwng_sound_interrupt_w) { m_sound_byte = data; - device_set_input_line(m_audiocpu, 0, ASSERT_LINE); + m_audiocpu->set_input_line(0, ASSERT_LINE); } READ8_MEMBER(superwng_state::superwng_sound_byte_r) { - device_set_input_line(m_audiocpu, 0, CLEAR_LINE); + m_audiocpu->set_input_line(0, CLEAR_LINE); return m_sound_byte; } WRITE8_MEMBER(superwng_state::superwng_sound_nmi_clear_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } static INTERRUPT_GEN( superwng_sound_nmi_assert ) { superwng_state *state = device->machine().driver_data(); if (BIT(state->m_nmi_enable, 0)) - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } WRITE8_MEMBER(superwng_state::superwng_bg_vram_w) diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c index 512553978e0..c585516c0d6 100644 --- a/src/mame/drivers/suprloco.c +++ b/src/mame/drivers/suprloco.c @@ -22,7 +22,7 @@ WRITE8_MEMBER(suprloco_state::suprloco_soundport_w) soundlatch_byte_w(space, 0, data); machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* spin for a while to let the Z80 read the command (fixes hanging sound in Regulus) */ - device_spin_until_time(&space.device(), attotime::from_usec(50)); + space.device().execute().spin_until_time(attotime::from_usec(50)); } static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, suprloco_state ) diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c index 380835809ce..6bcdbc2e50e 100644 --- a/src/mame/drivers/suprnova.c +++ b/src/mame/drivers/suprnova.c @@ -441,9 +441,9 @@ static TIMER_DEVICE_CALLBACK(skns_irq) int scanline = param; if(scanline == 240) - device_set_input_line(state->m_maincpu,5,HOLD_LINE); //vblank + state->m_maincpu->set_input_line(5,HOLD_LINE); //vblank else if(scanline == 0) - device_set_input_line(state->m_maincpu,1,HOLD_LINE); // spc + state->m_maincpu->set_input_line(1,HOLD_LINE); // spc } /********************************************************************************** @@ -646,7 +646,7 @@ WRITE32_MEMBER(skns_state::skns_io_w) { if (!strcmp(machine().system().name,"vblokbrk") || !strcmp(machine().system().name,"sarukani")) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } } @@ -870,32 +870,32 @@ READ32_MEMBER(skns_state::gutsn_speedup_r) if (space.device().safe_pc()==0x402206e) { if(m_main_ram[0x00078/4] == m_main_ram[0x0c780/4]) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } return m_main_ram[0x0c780/4]; } READ32_MEMBER(skns_state::cyvern_speedup_r) { - if (space.device().safe_pc()==0x402ebd2) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x402ebd2) space.device().execute().spin_until_interrupt(); return m_main_ram[0x4d3c8/4]; } READ32_MEMBER(skns_state::puzzloopj_speedup_r) { - if (space.device().safe_pc()==0x401dca0) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x401dca0) space.device().execute().spin_until_interrupt(); return m_main_ram[0x86714/4]; } READ32_MEMBER(skns_state::puzzloopa_speedup_r) { - if (space.device().safe_pc()==0x401d9d4) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x401d9d4) space.device().execute().spin_until_interrupt(); return m_main_ram[0x85bcc/4]; } READ32_MEMBER(skns_state::puzzloopu_speedup_r) { - if (space.device().safe_pc()==0x401dab0) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x401dab0) space.device().execute().spin_until_interrupt(); return m_main_ram[0x85cec/4]; } @@ -908,61 +908,61 @@ READ32_MEMBER(skns_state::puzzloope_speedup_r) 0401DA18: BF $0401DA26 0401DA26: BRA $0401DA12 */ - if (space.device().safe_pc()==0x401da14) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x401da14) space.device().execute().spin_until_interrupt(); return m_main_ram[0x81d38/4]; } READ32_MEMBER(skns_state::senknow_speedup_r) { - if (space.device().safe_pc()==0x4017dce) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x4017dce) space.device().execute().spin_until_interrupt(); return m_main_ram[0x0000dc/4]; } READ32_MEMBER(skns_state::teljan_speedup_r) { - if (space.device().safe_pc()==0x401ba32) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x401ba32) space.device().execute().spin_until_interrupt(); return m_main_ram[0x002fb4/4]; } READ32_MEMBER(skns_state::jjparads_speedup_r) { - if (space.device().safe_pc()==0x4015e84) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x4015e84) space.device().execute().spin_until_interrupt(); return m_main_ram[0x000994/4]; } READ32_MEMBER(skns_state::jjparad2_speedup_r) { - if (space.device().safe_pc()==0x401620a) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x401620a) space.device().execute().spin_until_interrupt(); return m_main_ram[0x000984/4]; } READ32_MEMBER(skns_state::ryouran_speedup_r) { - if (space.device().safe_pc()==0x40182ce) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x40182ce) space.device().execute().spin_until_interrupt(); return m_main_ram[0x000a14/4]; } READ32_MEMBER(skns_state::galpans2_speedup_r) { - if (space.device().safe_pc()==0x4049ae2) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x4049ae2) space.device().execute().spin_until_interrupt(); return m_main_ram[0x0fb6bc/4]; } READ32_MEMBER(skns_state::panicstr_speedup_r) { - if (space.device().safe_pc()==0x404e68a) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x404e68a) space.device().execute().spin_until_interrupt(); return m_main_ram[0x0f19e4/4]; } READ32_MEMBER(skns_state::sengekis_speedup_r)// 60006ee 600308e { - if (space.device().safe_pc()==0x60006ec) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x60006ec) space.device().execute().spin_until_interrupt(); return m_main_ram[0xb74bc/4]; } READ32_MEMBER(skns_state::sengekij_speedup_r)// 60006ee 600308e { - if (space.device().safe_pc()==0x60006ec) device_spin_until_interrupt(&space.device()); + if (space.device().safe_pc()==0x60006ec) space.device().execute().spin_until_interrupt(); return m_main_ram[0xb7380/4]; } diff --git a/src/mame/drivers/suprridr.c b/src/mame/drivers/suprridr.c index 5e2a20c8a23..bddf079b80c 100644 --- a/src/mame/drivers/suprridr.c +++ b/src/mame/drivers/suprridr.c @@ -103,7 +103,7 @@ static INTERRUPT_GEN( main_nmi_gen ) { suprridr_state *state = device->machine().driver_data(); 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/suprslam.c b/src/mame/drivers/suprslam.c index bf5875ba1c1..7d9c1315158 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -96,7 +96,7 @@ WRITE16_MEMBER(suprslam_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); } } @@ -278,7 +278,7 @@ GFXDECODE_END static void irqhandler(device_t *device, int irq) { suprslam_state *state = device->machine().driver_data(); - 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 = @@ -297,7 +297,7 @@ static MACHINE_START( suprslam ) { suprslam_state *state = machine.driver_data(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k053936 = machine.device("k053936"); state->save_item(NAME(state->m_screen_bank)); diff --git a/src/mame/drivers/surpratk.c b/src/mame/drivers/surpratk.c index 218ce3311d4..92c7f2853ae 100644 --- a/src/mame/drivers/surpratk.c +++ b/src/mame/drivers/surpratk.c @@ -22,7 +22,7 @@ static INTERRUPT_GEN( surpratk_interrupt ) { surpratk_state *state = device->machine().driver_data(); 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(surpratk_state::bankedram_r) @@ -161,7 +161,7 @@ INPUT_PORTS_END static void irqhandler( device_t *device, int linestate ) { surpratk_state *state = device->machine().driver_data(); - device_set_input_line(state->m_maincpu, KONAMI_FIRQ_LINE, linestate); + state->m_maincpu->set_input_line(KONAMI_FIRQ_LINE, linestate); } static const ym2151_interface ym2151_config = @@ -199,7 +199,7 @@ static MACHINE_START( surpratk ) state->m_generic_paletteram_8.allocate(0x1000); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_k053244 = machine.device("k053244"); state->m_k053251 = machine.device("k053251"); state->m_k052109 = machine.device("k052109"); diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index 83dde265610..c0a2ed75e77 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -417,7 +417,7 @@ WRITE8_MEMBER(system1_state::videomode_w) /* bit 6 is connected to the 8751 IRQ */ if (i8751 != NULL) - device_set_input_line(i8751, MCS51_INT1_LINE, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); + i8751->execute().set_input_line(MCS51_INT1_LINE, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); /* handle any custom banking or other stuff */ if (m_videomode_custom != NULL) @@ -597,8 +597,8 @@ READ8_MEMBER(system1_state::mcu_io_r) static INTERRUPT_GEN( mcu_irq_assert ) { /* toggle the INT0 line on the MCU */ - device_set_input_line(device, MCS51_INT0_LINE, ASSERT_LINE); - device_set_input_line(device, MCS51_INT0_LINE, CLEAR_LINE); + device->execute().set_input_line(MCS51_INT0_LINE, ASSERT_LINE); + device->execute().set_input_line(MCS51_INT0_LINE, CLEAR_LINE); /* boost interleave to ensure that the MCU can break the Z80 out of a HALT */ device->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10)); @@ -614,8 +614,8 @@ static TIMER_DEVICE_CALLBACK( mcu_t0_callback ) */ device_t *mcu = timer.machine().device("mcu"); - device_set_input_line(mcu, MCS51_T0_LINE, ASSERT_LINE); - device_set_input_line(mcu, MCS51_T0_LINE, CLEAR_LINE); + mcu->execute().set_input_line(MCS51_T0_LINE, ASSERT_LINE); + mcu->execute().set_input_line(MCS51_T0_LINE, CLEAR_LINE); } @@ -638,7 +638,7 @@ WRITE8_MEMBER(system1_state::nob_mcu_control_p2_w) /* bit 2 is toggled once near the end of an IRQ */ if (((m_mcu_control ^ data) & 0x04) && !(data & 0x04)) - device_set_input_line(&space.device(), MCS51_INT0_LINE, CLEAR_LINE); + space.device().execute().set_input_line(MCS51_INT0_LINE, CLEAR_LINE); /* bit 3 is toggled once at the start of an IRQ, and again at the end */ if (((m_mcu_control ^ data) & 0x08) && !(data & 0x08)) diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c index a809f145f25..c110bc631df 100644 --- a/src/mame/drivers/system16.c +++ b/src/mame/drivers/system16.c @@ -102,7 +102,7 @@ static INTERRUPT_GEN( sys16_interrupt ) { - device_set_input_line(device, 4, HOLD_LINE); /* Interrupt vector 4, used by VBlank */ + device->execute().set_input_line(4, HOLD_LINE); /* Interrupt vector 4, used by VBlank */ } @@ -114,7 +114,7 @@ WRITE16_MEMBER(segas1x_bootleg_state::sound_command_nmi_w) if (ACCESSING_BITS_0_7) { soundlatch_byte_w(space, 0, data & 0xff); - device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); + m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -152,7 +152,7 @@ WRITE16_MEMBER(segas1x_bootleg_state::sound_command_w) if (ACCESSING_BITS_0_7) { soundlatch_byte_w(space, 0, data & 0xff); - device_set_input_line(m_soundcpu, 0, HOLD_LINE); + m_soundcpu->set_input_line(0, HOLD_LINE); } } @@ -369,7 +369,7 @@ static void tturfbl_msm5205_callback( device_t *device ) state->m_sample_buffer <<= 4; state->m_sample_select ^= 1; if(state->m_sample_select == 0) - device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static const msm5205_interface tturfbl_msm5205_interface = @@ -1109,7 +1109,7 @@ WRITE16_MEMBER(segas1x_bootleg_state::sound_command_irq_w) if (ACCESSING_BITS_0_7) { soundlatch_byte_w(space, 0, data & 0xff); - device_set_input_line(m_soundcpu, 0, HOLD_LINE); + m_soundcpu->set_input_line(0, HOLD_LINE); } } @@ -1185,7 +1185,7 @@ static void shdancbl_msm5205_callback(device_t *device) state->m_sample_buffer >>= 4; state->m_sample_select ^= 1; if (state->m_sample_select == 0) - device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static const msm5205_interface shdancbl_msm5205_interface = @@ -2048,7 +2048,7 @@ static void sound_cause_nmi( device_t *device, int chip ) segas1x_bootleg_state *state = device->machine().driver_data(); /* upd7759 callback */ - device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -3255,8 +3255,8 @@ DRIVER_INIT_MEMBER(segas1x_bootleg_state,common) m_beautyb_unkx = 0; - m_maincpu = machine().device("maincpu"); - m_soundcpu = machine().device("soundcpu"); + m_maincpu = machine().device("maincpu"); + m_soundcpu = machine().device("soundcpu"); } /* Sys16A */ diff --git a/src/mame/drivers/tagteam.c b/src/mame/drivers/tagteam.c index 2eab73eae49..f4677946861 100644 --- a/src/mame/drivers/tagteam.c +++ b/src/mame/drivers/tagteam.c @@ -200,7 +200,7 @@ static INTERRUPT_GEN( sound_timer_irq ) tagteam_state *state = device->machine().driver_data(); 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); } diff --git a/src/mame/drivers/tail2nos.c b/src/mame/drivers/tail2nos.c index 0fdd01300ae..55dbc951182 100644 --- a/src/mame/drivers/tail2nos.c +++ b/src/mame/drivers/tail2nos.c @@ -23,7 +23,7 @@ WRITE16_MEMBER(tail2nos_state::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); } } @@ -180,7 +180,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { tail2nos_state *state = device->machine().driver_data(); - 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 ym2608_interface ym2608_config = @@ -213,8 +213,8 @@ static MACHINE_START( tail2nos ) state->membank("bank3")->configure_entries(0, 2, &ROM[0x10000], 0x8000); state->membank("bank3")->set_entry(0); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k051316 = machine.device("k051316"); state->save_item(NAME(state->m_charbank)); diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c index e650ceaf039..7fe7a11c92a 100644 --- a/src/mame/drivers/taito_b.c +++ b/src/mame/drivers/taito_b.c @@ -199,137 +199,137 @@ WRITE8_MEMBER(taitob_state::bankswitch_w) static TIMER_CALLBACK( rsaga2_interrupt2 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); } static INTERRUPT_GEN( rastansaga2_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(rsaga2_interrupt2)); - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } static TIMER_CALLBACK( crimec_interrupt3 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 3, HOLD_LINE); + state->m_maincpu->set_input_line(3, HOLD_LINE); } static INTERRUPT_GEN( crimec_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(crimec_interrupt3)); - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } static TIMER_CALLBACK( hitice_interrupt6 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); } static INTERRUPT_GEN( hitice_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(hitice_interrupt6)); - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } static TIMER_CALLBACK( rambo3_interrupt1 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 1, HOLD_LINE); + state->m_maincpu->set_input_line(1, HOLD_LINE); } static INTERRUPT_GEN( rambo3_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(rambo3_interrupt1)); - device_set_input_line(device, 6, HOLD_LINE); + device->execute().set_input_line(6, HOLD_LINE); } static TIMER_CALLBACK( pbobble_interrupt5 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 5, HOLD_LINE); + state->m_maincpu->set_input_line(5, HOLD_LINE); } static INTERRUPT_GEN( pbobble_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(pbobble_interrupt5)); - device_set_input_line(device, 3, HOLD_LINE); + device->execute().set_input_line(3, HOLD_LINE); } static TIMER_CALLBACK( viofight_interrupt1 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 1, HOLD_LINE); + state->m_maincpu->set_input_line(1, HOLD_LINE); } static INTERRUPT_GEN( viofight_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(viofight_interrupt1)); - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } static TIMER_CALLBACK( masterw_interrupt4 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } static INTERRUPT_GEN( masterw_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(masterw_interrupt4)); - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } static TIMER_CALLBACK( silentd_interrupt4 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } static INTERRUPT_GEN( silentd_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(silentd_interrupt4)); - device_set_input_line(device, 6, HOLD_LINE); + device->execute().set_input_line(6, HOLD_LINE); } static TIMER_CALLBACK( selfeena_interrupt4 ) { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } static INTERRUPT_GEN( selfeena_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(selfeena_interrupt4)); - device_set_input_line(device, 6, HOLD_LINE); + device->execute().set_input_line(6, HOLD_LINE); } static TIMER_CALLBACK( sbm_interrupt5 )//4 { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 5, HOLD_LINE); + state->m_maincpu->set_input_line(5, HOLD_LINE); } static INTERRUPT_GEN( sbm_interrupt )//5 { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(10000), FUNC(sbm_interrupt5)); - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } static TIMER_CALLBACK( realpunc_interrupt3 )//3 { taitob_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 3, HOLD_LINE); + state->m_maincpu->set_input_line(3, HOLD_LINE); } static INTERRUPT_GEN( realpunc_interrupt )//2 { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(10000), FUNC(realpunc_interrupt3)); - device_set_input_line(device, 2, HOLD_LINE); + device->execute().set_input_line(2, HOLD_LINE); } @@ -394,7 +394,7 @@ WRITE16_MEMBER(taitob_state::gain_control_w) INPUT_CHANGED_MEMBER(taitob_state::realpunc_sensor) { - device_set_input_line(m_maincpu, 4, HOLD_LINE); + m_maincpu->set_input_line(4, HOLD_LINE); } /*************************************************************************** @@ -1906,7 +1906,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { taitob_state *state = device->machine().driver_data(); - 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 = @@ -2017,8 +2017,8 @@ static MACHINE_START( taitob ) { taitob_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_mb87078 = machine.device("mb87078"); state->m_ym = machine.device("ymsnd"); state->m_tc0180vcu = machine.device("tc0180vcu"); diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c index d312727abfb..7f3cf670cd7 100644 --- a/src/mame/drivers/taito_f2.c +++ b/src/mame/drivers/taito_f2.c @@ -575,13 +575,13 @@ driftout 8000 0000/8 0000 0000 The first control changes from 8000 to 0000 static TIMER_CALLBACK( taitof2_interrupt6 ) { taitof2_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); } static INTERRUPT_GEN( taitof2_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(500), FUNC(taitof2_interrupt6)); - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } @@ -603,7 +603,7 @@ WRITE8_MEMBER(taitof2_state::sound_bankswitch_w) READ8_MEMBER(taitof2_state::driveout_sound_command_r) { - device_set_input_line(m_audiocpu, 0, CLEAR_LINE); + m_audiocpu->set_input_line(0, CLEAR_LINE); // logerror("sound IRQ OFF (sound command=%02x)\n", m_driveout_sound_latch); return m_driveout_sound_latch; } @@ -644,7 +644,7 @@ WRITE16_MEMBER(taitof2_state::driveout_sound_command_w) else { m_driveout_sound_latch = ((data << 4) & 0xf0) | (m_driveout_sound_latch & 0x0f); - device_set_input_line(m_audiocpu, 0, ASSERT_LINE); + m_audiocpu->set_input_line(0, ASSERT_LINE); } } } @@ -2811,7 +2811,7 @@ GFXDECODE_END static void irq_handler( device_t *device, int irq ) { taitof2_state *state = device->machine().driver_data(); - 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 = @@ -3020,8 +3020,8 @@ static MACHINE_START( common ) { taitof2_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu");; + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu");; state->m_tc0100scn = machine.device("tc0100scn");; state->m_tc0100scn_1 = machine.device("tc0100scn_1");; state->m_tc0100scn_2 = machine.device("tc0100scn_2");; diff --git a/src/mame/drivers/taito_f3.c b/src/mame/drivers/taito_f3.c index 37dffa46855..4584682f529 100644 --- a/src/mame/drivers/taito_f3.c +++ b/src/mame/drivers/taito_f3.c @@ -397,7 +397,7 @@ static TIMER_CALLBACK( f3_interrupt3 ) static INTERRUPT_GEN( f3_interrupt2 ) { - device_set_input_line(device, 2, HOLD_LINE); // vblank + device->execute().set_input_line(2, HOLD_LINE); // vblank device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(10000), FUNC(f3_interrupt3)); } diff --git a/src/mame/drivers/taito_h.c b/src/mame/drivers/taito_h.c index d34e9582199..cd8d620a09b 100644 --- a/src/mame/drivers/taito_h.c +++ b/src/mame/drivers/taito_h.c @@ -159,7 +159,7 @@ some kind of zoom table? static void irqhandler( device_t *device, int irq ) { taitoh_state *state = device->machine().driver_data(); - 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 = @@ -529,7 +529,7 @@ static MACHINE_START( taitoh ) state->membank("bank1")->configure_entries(0, 4, &ROM[0xc000], 0x4000); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_tc0220ioc = machine.device("tc0220ioc"); state->m_tc0080vco = machine.device("tc0080vco"); diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c index 3012e587e1c..70181420b9f 100644 --- a/src/mame/drivers/taito_l.c +++ b/src/mame/drivers/taito_l.c @@ -144,8 +144,8 @@ static MACHINE_START( taito_l ) { taitol_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_rambanks)); state->save_item(NAME(state->m_palette_ram)); @@ -312,10 +312,10 @@ static TIMER_DEVICE_CALLBACK( vbl_interrupt ) { taitol_state *state = timer.machine().driver_data(); int scanline = param; - device_set_irq_callback(state->m_maincpu, irq_callback); + state->m_maincpu->set_irq_acknowledge_callback(irq_callback); /* kludge to make plgirls boot */ - if (state->m_maincpu->state().state_int(Z80_IM) != 2) + if (state->m_maincpu->state_int(Z80_IM) != 2) return; // What is really generating interrupts 0 and 1 is still to be found @@ -323,17 +323,17 @@ static TIMER_DEVICE_CALLBACK( vbl_interrupt ) if (scanline == 120 && (state->m_irq_enable & 1)) { state->m_last_irq_level = 0; - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } else if (scanline == 0 && (state->m_irq_enable & 2)) { state->m_last_irq_level = 1; - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } else if (scanline == 240 && (state->m_irq_enable & 4)) { state->m_last_irq_level = 2; - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } } @@ -355,7 +355,7 @@ WRITE8_MEMBER(taitol_state::irq_enable_w) // fix Plotting test mode if ((m_irq_enable & (1 << m_last_irq_level)) == 0) - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); } READ8_MEMBER(taitol_state::irq_enable_r) @@ -1774,7 +1774,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { taitol_state *state = device->machine().driver_data(); - 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(taitol_state::portA_w) diff --git a/src/mame/drivers/taito_o.c b/src/mame/drivers/taito_o.c index 9e7a4534210..bec0dee5cf4 100644 --- a/src/mame/drivers/taito_o.c +++ b/src/mame/drivers/taito_o.c @@ -218,10 +218,10 @@ static TIMER_DEVICE_CALLBACK( parentj_interrupt ) int scanline = param; if(scanline == 448) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); if(scanline == 0) - device_set_input_line(state->m_maincpu, 5, HOLD_LINE); + state->m_maincpu->set_input_line(5, HOLD_LINE); } static const ym2203_interface ym2203_config = @@ -246,7 +246,7 @@ static MACHINE_START( taitoo ) { taitoo_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_tc0080vco = machine.device("tc0080vco"); } diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c index 35fdb65f1d3..37c445b0e50 100644 --- a/src/mame/drivers/taito_z.c +++ b/src/mame/drivers/taito_z.c @@ -983,7 +983,7 @@ static void parse_cpu_control( running_machine &machine ) { /* bit 0 enables cpu B */ taitoz_state *state = machine.driver_data(); - device_set_input_line(state->m_subcpu, INPUT_LINE_RESET, (state->m_cpua_ctrl & 0x1) ? CLEAR_LINE : ASSERT_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_RESET, (state->m_cpua_ctrl & 0x1) ? CLEAR_LINE : ASSERT_LINE); } WRITE16_MEMBER(taitoz_state::cpua_ctrl_w) @@ -1022,7 +1022,7 @@ WRITE16_MEMBER(taitoz_state::dblaxle_cpua_ctrl_w) static TIMER_CALLBACK( taitoz_interrupt6 ) { taitoz_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); } /* 68000 B */ @@ -1030,7 +1030,7 @@ static TIMER_CALLBACK( taitoz_interrupt6 ) static TIMER_CALLBACK( taitoz_cpub_interrupt5 ) { taitoz_state *state = machine.driver_data(); - device_set_input_line(state->m_subcpu, 5, HOLD_LINE); + state->m_subcpu->set_input_line(5, HOLD_LINE); } @@ -1048,7 +1048,7 @@ static INTERRUPT_GEN( sci_interrupt ) if (state->m_sci_int6) device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000 - 500), FUNC(taitoz_interrupt6)); - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } @@ -2900,7 +2900,7 @@ Interface B is for games which lack a Z80 (Spacegun, Bshark). static void irqhandler(device_t *device, int irq) { taitoz_state *state = device->machine().driver_data(); - 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); } /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ @@ -2908,7 +2908,7 @@ static void irqhandlerb(device_t *device, int irq) { // DG: this is probably specific to Z80 and wrong? // taitoz_state *state = device->machine().driver_data(); -// 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 = @@ -3031,9 +3031,9 @@ static MACHINE_START( bshark ) { taitoz_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("sub"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("sub"); + state->m_audiocpu = machine.device("audiocpu"); state->m_eeprom = machine.device("eeprom"); state->m_tc0100scn = machine.device("tc0100scn"); state->m_tc0150rod = machine.device("tc0150rod"); diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c index b4f207b4ae8..706852da8b6 100644 --- a/src/mame/drivers/taitoair.c +++ b/src/mame/drivers/taitoair.c @@ -238,7 +238,7 @@ WRITE16_MEMBER(taitoair_state::system_control_w) m_dsp_hold_signal = (data & 4) ? CLEAR_LINE : ASSERT_LINE; - device_set_input_line(m_dsp, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); + m_dsp->execute().set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); logerror("68K:%06x writing %04x to TMS32025. %s HOLD , %s RESET\n", space.device().safe_pcbase(), data, ((data & 4) ? "Clear" : "Assert"), ((data & 1) ? "Clear" : "Assert")); } @@ -635,7 +635,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { taitoair_state *state = device->machine().driver_data(); - 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 airsys_ym2610_interface = @@ -674,7 +674,7 @@ static MACHINE_START( taitoair ) state->membank("bank1")->configure_entries(0, 4, &ROM[0xc000], 0x4000); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_dsp = machine.device("dsp"); state->m_tc0080vco = machine.device("tc0080vco"); diff --git a/src/mame/drivers/taitojc.c b/src/mame/drivers/taitojc.c index 8240dcac569..a11a54dab5e 100644 --- a/src/mame/drivers/taitojc.c +++ b/src/mame/drivers/taitojc.c @@ -538,7 +538,7 @@ WRITE32_MEMBER(taitojc_state::dsp_shared_w) #endif if (offset == 0x1ff8/4) - device_set_input_line(m_maincpu, 6, CLEAR_LINE); + m_maincpu->set_input_line(6, CLEAR_LINE); if (offset == 0x1ffc/4) { @@ -556,13 +556,13 @@ WRITE32_MEMBER(taitojc_state::dsp_shared_w) */ if (!m_first_dsp_reset || !m_has_dsp_hack) { - device_set_input_line(m_dsp, INPUT_LINE_RESET, CLEAR_LINE); + m_dsp->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); } m_first_dsp_reset = 0; } else { - device_set_input_line(m_dsp, INPUT_LINE_RESET, ASSERT_LINE); + m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } } } @@ -1010,7 +1010,7 @@ READ16_MEMBER(taitojc_state::dsp_to_main_r) WRITE16_MEMBER(taitojc_state::dsp_to_main_w) { - device_set_input_line(m_maincpu, 6, ASSERT_LINE); + m_maincpu->set_input_line(6, ASSERT_LINE); COMBINE_DATA(&m_dsp_shared_ram[0x7fe]); } @@ -1215,12 +1215,12 @@ static MACHINE_RESET( taitojc ) memset(state->m_intersection_data, 0, sizeof(state->m_intersection_data)); // hold the TMS in reset until we have code - device_set_input_line(state->m_dsp, INPUT_LINE_RESET, ASSERT_LINE); + state->m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } static INTERRUPT_GEN( taitojc_vblank ) { - device_set_input_line_and_vector(device, 2, HOLD_LINE, 130); + device->execute().set_input_line_and_vector(2, HOLD_LINE, 130); } static const tc0640fio_interface taitojc_io_intf = @@ -1302,7 +1302,7 @@ MACHINE_CONFIG_END READ16_MEMBER(taitojc_state::taitojc_dsp_idle_skip_r) { if(space.device().safe_pc()==0x404c) - device_spin_until_time(&space.device(), attotime::from_usec(500)); + space.device().execute().spin_until_time(attotime::from_usec(500)); return m_dsp_shared_ram[0x7f0]; } @@ -1310,7 +1310,7 @@ READ16_MEMBER(taitojc_state::taitojc_dsp_idle_skip_r) READ16_MEMBER(taitojc_state::dendego2_dsp_idle_skip_r) { if(space.device().safe_pc()==0x402e) - device_spin_until_time(&space.device(), attotime::from_usec(500)); + space.device().execute().spin_until_time(attotime::from_usec(500)); return m_dsp_shared_ram[0x7f0]; } diff --git a/src/mame/drivers/taitotz.c b/src/mame/drivers/taitotz.c index 7a26ac1616d..a38027fbd75 100644 --- a/src/mame/drivers/taitotz.c +++ b/src/mame/drivers/taitotz.c @@ -1845,14 +1845,14 @@ WRITE64_MEMBER(taitotz_state::ppc_common_w) if (m_io_share_ram[0xfff] == 0x1010 || m_io_share_ram[0xfff] == 0x1020 || m_io_share_ram[0xfff] == 0x6000 || m_io_share_ram[0xfff] == 0x6010) { - //device_spin_until_trigger(machine().device("maincpu"), PPC_TLCS_COMM_TRIGGER); - device_spin_until_interrupt(machine().device("maincpu")); + //machine().device("maincpu")->execute().spin_until_trigger(PPC_TLCS_COMM_TRIGGER); + machine().device("maincpu")->execute().spin_until_interrupt(); } // pwrshovl sometimes writes commands during command handling... make sure that doesn't happen if (m_io_share_ram[0xfff] == 0x0000) { - device_spin_until_time(machine().device("maincpu"), attotime::from_usec(50)); + machine().device("maincpu")->execute().spin_until_time(attotime::from_usec(50)); } machine().scheduler().trigger(TLCS_PPC_COMM_TRIGGER); @@ -1931,15 +1931,15 @@ WRITE8_MEMBER(taitotz_state::tlcs_common_w) // The PPC is now free to continue running //machine().scheduler().trigger(PPC_TLCS_COMM_TRIGGER); - //device_yield(machine().device("iocpu")); + //machine().device("iocpu")->execute().yield(); } if (offset == 0x1ffe) { if (m_io_share_ram[0xfff] == 0 && m_io_share_ram[0xffe] == 0x1012) { - //device_spin_until_trigger(machine().device("iocpu"), TLCS_PPC_COMM_TRIGGER); - device_yield(machine().device("iocpu")); + //machine().device("iocpu")->execute().spin_until_trigger(TLCS_PPC_COMM_TRIGGER); + machine().device("iocpu")->execute().yield(); machine().scheduler().trigger(PPC_TLCS_COMM_TRIGGER); } } diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c index 9277fa8b255..54837f49bf5 100644 --- a/src/mame/drivers/taitowlf.c +++ b/src/mame/drivers/taitowlf.c @@ -530,7 +530,7 @@ static IRQ_CALLBACK(irq_callback) static MACHINE_START(taitowlf) { taitowlf_state *state = machine.driver_data(); - 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" ); diff --git a/src/mame/drivers/tankbatt.c b/src/mame/drivers/tankbatt.c index 9c7de121c6b..8f603589d4b 100644 --- a/src/mame/drivers/tankbatt.c +++ b/src/mame/drivers/tankbatt.c @@ -182,7 +182,7 @@ ADDRESS_MAP_END static INTERRUPT_GEN( tankbatt_interrupt ) { tankbatt_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) device_set_input_line(device,INPUT_LINE_NMI,PULSE_LINE); + if (state->m_nmi_enable) device->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); } INPUT_CHANGED_MEMBER(tankbatt_state::coin_inserted) diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c index b424d05114e..81ddc870d62 100644 --- a/src/mame/drivers/tankbust.c +++ b/src/mame/drivers/tankbust.c @@ -323,7 +323,7 @@ static INTERRUPT_GEN( vblank_irq ) tankbust_state *state = device->machine().driver_data(); 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( tankbust, tankbust_state ) diff --git a/src/mame/drivers/targeth.c b/src/mame/drivers/targeth.c index ffaa59318e2..95977691de9 100644 --- a/src/mame/drivers/targeth.c +++ b/src/mame/drivers/targeth.c @@ -37,15 +37,15 @@ static TIMER_DEVICE_CALLBACK(targeth_interrupt ) if(scanline == 240) { /* IRQ 2: drives the game */ - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); } if(scanline == 0) { /* IRQ 4: Read 1P Gun */ - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); /* IRQ 6: Read 2P Gun */ - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); } } diff --git a/src/mame/drivers/tasman.c b/src/mame/drivers/tasman.c index acaf18a5f22..a04c3330bb3 100644 --- a/src/mame/drivers/tasman.c +++ b/src/mame/drivers/tasman.c @@ -584,10 +584,10 @@ static TIMER_DEVICE_CALLBACK( kongambl_vblank ) int scanline = param; if(scanline == 512) - device_set_input_line(state->m_maincpu, 1, HOLD_LINE); // vblank? + state->m_maincpu->set_input_line(1, HOLD_LINE); // vblank? if(scanline == 0) - device_set_input_line(state->m_maincpu, 3, HOLD_LINE); // sprite irq? + state->m_maincpu->set_input_line(3, HOLD_LINE); // sprite irq? } static MACHINE_CONFIG_START( kongambl, kongambl_state ) diff --git a/src/mame/drivers/tatsumi.c b/src/mame/drivers/tatsumi.c index 32a7cfe357a..e1f266a105c 100644 --- a/src/mame/drivers/tatsumi.c +++ b/src/mame/drivers/tatsumi.c @@ -851,7 +851,7 @@ static const ym2151_interface ym2151_config = static INTERRUPT_GEN( roundup5_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 */ } static void apache3_68000_reset(device_t *device) diff --git a/src/mame/drivers/tceptor.c b/src/mame/drivers/tceptor.c index 178d7228024..a96723c6d68 100644 --- a/src/mame/drivers/tceptor.c +++ b/src/mame/drivers/tceptor.c @@ -41,7 +41,7 @@ static INTERRUPT_GEN( m6809_vb_interrupt ) { tceptor_state *state = device->machine().driver_data(); if (state->m_m6809_irq_enable) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); else state->m_m6809_irq_enable = 1; } @@ -61,7 +61,7 @@ static INTERRUPT_GEN( m68k_vb_interrupt ) { tceptor_state *state = device->machine().driver_data(); if (state->m_m68k_irq_enable) - device_set_input_line(device, M68K_IRQ_1, HOLD_LINE); + device->execute().set_input_line(M68K_IRQ_1, HOLD_LINE); } WRITE16_MEMBER(tceptor_state::m68k_irq_enable_w) @@ -74,7 +74,7 @@ static INTERRUPT_GEN( mcu_vb_interrupt ) { tceptor_state *state = device->machine().driver_data(); if (state->m_mcu_irq_enable) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); else state->m_mcu_irq_enable = 1; } diff --git a/src/mame/drivers/tetrisp2.c b/src/mame/drivers/tetrisp2.c index b5fff5af825..54826012e8a 100644 --- a/src/mame/drivers/tetrisp2.c +++ b/src/mame/drivers/tetrisp2.c @@ -566,7 +566,7 @@ WRITE16_MEMBER(stepstag_state::stepstag_soundlatch_word_w) state->soundlatch_word_w(space, offset, data, mem_mask); - device_set_input_line(machine().device("sub"), M68K_IRQ_6, HOLD_LINE); + machine().device("sub")->execute().set_input_line(M68K_IRQ_6, HOLD_LINE); machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); } diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c index fdbe2b02a92..4fc032d15af 100644 --- a/src/mame/drivers/thedeep.c +++ b/src/mame/drivers/thedeep.c @@ -232,15 +232,15 @@ WRITE8_MEMBER(thedeep_state::thedeep_p3_w) /* bit 0 0->1 transition IRQ0 to main */ if((!(m_mcu_p3_reg & 0x01)) && data & 0x01) - device_set_input_line(m_maincpu, 0, HOLD_LINE); + m_maincpu->set_input_line(0, HOLD_LINE); /* bit 6 0->1 transition INT1 IRQ ACK */ if((!(m_mcu_p3_reg & 0x40)) && data & 0x40) - device_set_input_line(m_mcu, MCS51_INT1_LINE, CLEAR_LINE); + m_mcu->set_input_line(MCS51_INT1_LINE, CLEAR_LINE); /* bit 7 0->1 transition INT0 IRQ ACK */ if((!(m_mcu_p3_reg & 0x80)) && data & 0x80) - device_set_input_line(m_mcu, MCS51_INT0_LINE, CLEAR_LINE); + m_mcu->set_input_line(MCS51_INT0_LINE, CLEAR_LINE); m_mcu_p3_reg = data; logerror("P3 %02x\n",data); @@ -426,14 +426,14 @@ static TIMER_DEVICE_CALLBACK( thedeep_interrupt ) state->m_protection_irq = 1; } if (state->m_protection_irq) - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } else if(scanline == 0) { if (state->m_nmi_enable) { - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } } } @@ -442,7 +442,7 @@ static INTERRUPT_GEN( thedeep_mcu_irq ) { thedeep_state *state = device->machine().driver_data(); - device_set_input_line(state->m_mcu, MCS51_INT1_LINE, ASSERT_LINE); + state->m_mcu->set_input_line(MCS51_INT1_LINE, ASSERT_LINE); } static MACHINE_CONFIG_START( thedeep, thedeep_state ) diff --git a/src/mame/drivers/thepit.c b/src/mame/drivers/thepit.c index c122964c1a9..541d8c1fba3 100644 --- a/src/mame/drivers/thepit.c +++ b/src/mame/drivers/thepit.c @@ -640,7 +640,7 @@ static INTERRUPT_GEN( vblank_irq ) thepit_state *state = device->machine().driver_data(); 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( thepit, thepit_state ) diff --git a/src/mame/drivers/thief.c b/src/mame/drivers/thief.c index 042b2334757..4f74394b8a1 100644 --- a/src/mame/drivers/thief.c +++ b/src/mame/drivers/thief.c @@ -37,9 +37,9 @@ static INTERRUPT_GEN( thief_interrupt ) { /* SLAM switch causes an NMI if it's pressed */ if( (device->machine().root_device().ioport("P2")->read() & 0x10) == 0 ) - 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); } /**********************************************************/ diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c index 3bcb13b26b3..452b1fb0ce2 100644 --- a/src/mame/drivers/thunderx.c +++ b/src/mame/drivers/thunderx.c @@ -26,13 +26,13 @@ static INTERRUPT_GEN( scontra_interrupt ) thunderx_state *state = device->machine().driver_data(); 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); } static TIMER_CALLBACK( thunderx_firq_callback ) { thunderx_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, KONAMI_FIRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(KONAMI_FIRQ_LINE, HOLD_LINE); } READ8_MEMBER(thunderx_state::scontra_bankedram_r) @@ -353,7 +353,7 @@ WRITE8_MEMBER(thunderx_state::thunderx_videobank_w) WRITE8_MEMBER(thunderx_state::thunderx_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(thunderx_state::scontra_snd_bankswitch_w) @@ -609,8 +609,8 @@ static MACHINE_START( scontra ) state->m_generic_paletteram_8.allocate(0x800); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.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/timelimt.c b/src/mame/drivers/timelimt.c index 4544f92bb3c..1a6ef50329b 100644 --- a/src/mame/drivers/timelimt.c +++ b/src/mame/drivers/timelimt.c @@ -220,7 +220,7 @@ static INTERRUPT_GEN( timelimt_irq ) { timelimt_state *state = device->machine().driver_data(); if ( state->m_nmi_enabled ) - 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/timeplt.c b/src/mame/drivers/timeplt.c index 6a6e706f2a9..1f245ee97e3 100644 --- a/src/mame/drivers/timeplt.c +++ b/src/mame/drivers/timeplt.c @@ -64,7 +64,7 @@ static INTERRUPT_GEN( timeplt_interrupt ) timeplt_state *state = device->machine().driver_data(); if (state->m_nmi_enable) - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } @@ -72,7 +72,7 @@ WRITE8_MEMBER(timeplt_state::timeplt_nmi_enable_w) { m_nmi_enable = data & 1; if (!m_nmi_enable) - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } diff --git a/src/mame/drivers/timetrv.c b/src/mame/drivers/timetrv.c index 64b980bd6e5..38eb20b83ec 100644 --- a/src/mame/drivers/timetrv.c +++ b/src/mame/drivers/timetrv.c @@ -135,12 +135,12 @@ INPUT_PORTS_END static INTERRUPT_GEN( vblank_irq ) { - device_set_input_line_and_vector(device,0,HOLD_LINE,0x20/4); //vblank bit flag clear + device->execute().set_input_line_and_vector(0,HOLD_LINE,0x20/4); //vblank bit flag clear } static INTERRUPT_GEN( ld_irq ) { - device_set_input_line_and_vector(device,0,HOLD_LINE,0x48/4); //ld irq + device->execute().set_input_line_and_vector(0,HOLD_LINE,0x48/4); //ld irq } static MACHINE_CONFIG_START( timetrv, timetrv_state ) diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c index c7d3cb78c1c..abcd804c2c5 100644 --- a/src/mame/drivers/tmaster.c +++ b/src/mame/drivers/tmaster.c @@ -907,9 +907,9 @@ static TIMER_DEVICE_CALLBACK( tm3k_interrupt ) int scanline = param; if(scanline == 0) // vblank, FIXME - device_set_input_line(state->m_maincpu, 3, HOLD_LINE); + state->m_maincpu->set_input_line(3, HOLD_LINE); else if((scanline % 16) == 0) - device_set_input_line(state->m_maincpu, 1, HOLD_LINE); + state->m_maincpu->set_input_line(1, HOLD_LINE); // lev 2 triggered at the end of the blit } diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index 2990a0e7b33..4c4ccef1c18 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -169,7 +169,7 @@ static INTERRUPT_GEN(cuebrick_interrupt) tmnt_state *state = device->machine().driver_data(); if (state->m_irq5_mask) - device_set_input_line(device, M68K_IRQ_5, HOLD_LINE); + device->execute().set_input_line(M68K_IRQ_5, HOLD_LINE); } static INTERRUPT_GEN( punkshot_interrupt ) @@ -210,7 +210,7 @@ WRITE8_MEMBER(tmnt_state::glfgreat_sound_w) k053260_w(device, offset, data); if (offset) - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); } READ16_MEMBER(tmnt_state::prmrsocr_sound_r) @@ -232,7 +232,7 @@ WRITE16_MEMBER(tmnt_state::prmrsocr_sound_cmd_w) WRITE16_MEMBER(tmnt_state::prmrsocr_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(tmnt_state::prmrsocr_audio_bankswitch_w) @@ -321,13 +321,13 @@ static void sound_nmi_callback( int param ) static TIMER_CALLBACK( nmi_callback ) { tmnt_state *state = machine.driver_data(); - 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(tmnt_state::sound_arm_nmi_w) { // sound_nmi_enabled = 1; - 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(50), FUNC(nmi_callback)); /* kludge until the K053260 is emulated correctly */ } @@ -518,7 +518,7 @@ WRITE16_MEMBER(tmnt_state::thndrx2_eeprom_w) /* bit 5 triggers IRQ on sound cpu */ if (m_last == 0 && (data & 0x20) != 0) - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); m_last = data & 0x20; /* bit 6 = enable char ROM reading through the video RAM */ @@ -666,7 +666,7 @@ WRITE16_MEMBER(tmnt_state::ssriders_soundkludge_w) { /* I think this is more than just a trigger */ - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); } static ADDRESS_MAP_START( blswhstl_main_map, AS_PROGRAM, 16, tmnt_state ) @@ -2036,7 +2036,7 @@ static void cuebrick_irq_handler( device_t *device, int state ) { tmnt_state *tmnt = device->machine().driver_data(); - device_set_input_line(tmnt->m_maincpu, M68K_IRQ_6, (state) ? ASSERT_LINE : CLEAR_LINE); + tmnt->m_maincpu->set_input_line(M68K_IRQ_6, (state) ? ASSERT_LINE : CLEAR_LINE); } static const ym2151_interface ym2151_interface_cbj = @@ -2207,8 +2207,8 @@ static MACHINE_START( common ) { tmnt_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k007232 = machine.device("k007232"); state->m_k053260 = machine.device("k053260"); state->m_k054539 = machine.device("k054539"); @@ -2249,7 +2249,7 @@ static INTERRUPT_GEN( tmnt_vblank_irq ) tmnt_state *state = device->machine().driver_data(); if(state->m_irq5_mask) - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } @@ -2594,7 +2594,7 @@ MACHINE_CONFIG_END static void sound_nmi( device_t *device ) { tmnt_state *state = device->machine().driver_data(); - 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 k054539_interface k054539_config = diff --git a/src/mame/drivers/tmspoker.c b/src/mame/drivers/tmspoker.c index 54c758ab28c..ee28c094b91 100644 --- a/src/mame/drivers/tmspoker.c +++ b/src/mame/drivers/tmspoker.c @@ -284,7 +284,7 @@ static PALETTE_INIT( tmspoker ) static INTERRUPT_GEN( tmspoker_interrupt ) { - 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/tnzs.c b/src/mame/drivers/tnzs.c index e7c6296b33f..804911aa0e0 100644 --- a/src/mame/drivers/tnzs.c +++ b/src/mame/drivers/tnzs.c @@ -808,7 +808,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(tnzs_state::tnzsb_sound_command_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); } static ADDRESS_MAP_START( tnzsb_cpu1_map, AS_PROGRAM, 8, tnzs_state ) @@ -1569,7 +1569,7 @@ static const ym2203_interface ym2203_config = static void irqhandler( device_t *device, int irq ) { tnzs_state *state = device->machine().driver_data(); - 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 kageki_ym2203_interface = diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 86b03c1bb31..5defb778dd2 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -387,7 +387,7 @@ static void toaplan2_reset(device_t *device) toaplan2_state *state = device->machine().driver_data(); if (state->m_sub_cpu != NULL) - device_set_input_line(state->m_sub_cpu, INPUT_LINE_RESET, PULSE_LINE); + state->m_sub_cpu->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); } @@ -491,7 +491,7 @@ static TIMER_CALLBACK( toaplan2_raise_irq ) { toaplan2_state *state = machine.driver_data(); - device_set_input_line(state->m_main_cpu, param, HOLD_LINE); + state->m_main_cpu->execute().set_input_line(param, HOLD_LINE); } static void toaplan2_vblank_irq(running_machine &machine, int irq_line) @@ -588,7 +588,7 @@ WRITE16_MEMBER(toaplan2_state::toaplan2_v25_coin_word_w) toaplan2_coin_w(space, offset, data & 0x0f); - device_set_input_line(m_sub_cpu, INPUT_LINE_RESET, (data & m_v25_reset_line) ? CLEAR_LINE : ASSERT_LINE); + m_sub_cpu->execute().set_input_line(INPUT_LINE_RESET, (data & m_v25_reset_line) ? CLEAR_LINE : ASSERT_LINE); } if (ACCESSING_BITS_8_15 && (data & 0xff00) ) { @@ -759,7 +759,7 @@ WRITE16_MEMBER(toaplan2_state::ghox_shared_ram_w) WRITE16_MEMBER(toaplan2_state::fixeight_subcpu_ctrl_w) { - device_set_input_line(m_sub_cpu, INPUT_LINE_RESET, (data & m_v25_reset_line) ? CLEAR_LINE : ASSERT_LINE); + m_sub_cpu->execute().set_input_line(INPUT_LINE_RESET, (data & m_v25_reset_line) ? CLEAR_LINE : ASSERT_LINE); } @@ -869,7 +869,7 @@ WRITE16_MEMBER(toaplan2_state::bgaregga_soundlatch_w) { soundlatch_byte_w(space, offset, data & 0xff); - device_set_input_line(m_sub_cpu, 0, HOLD_LINE); + m_sub_cpu->execute().set_input_line(0, HOLD_LINE); } } @@ -927,7 +927,7 @@ WRITE16_MEMBER(toaplan2_state::batrider_soundlatch_w) { soundlatch_byte_w(space, offset, data & 0xff); - device_set_input_line(m_sub_cpu, INPUT_LINE_NMI, ASSERT_LINE); + m_sub_cpu->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } } @@ -938,7 +938,7 @@ WRITE16_MEMBER(toaplan2_state::batrider_soundlatch2_w) { soundlatch2_byte_w(space, offset, data & 0xff); - device_set_input_line(m_sub_cpu, INPUT_LINE_NMI, ASSERT_LINE); + m_sub_cpu->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } } @@ -955,7 +955,7 @@ WRITE16_MEMBER(toaplan2_state::batrider_clear_sndirq_w) // not sure whether this is correct // the 68K writes here during the sound IRQ handler, and nowhere else... - device_set_input_line(m_main_cpu, m_sndirq_line, CLEAR_LINE); + m_main_cpu->execute().set_input_line(m_sndirq_line, CLEAR_LINE); } @@ -963,14 +963,14 @@ WRITE8_MEMBER(toaplan2_state::batrider_sndirq_w) { // if batrider_clear_sndirq_w() is correct, should this be ASSERT_LINE? - device_set_input_line(m_main_cpu, m_sndirq_line, HOLD_LINE); + m_main_cpu->execute().set_input_line(m_sndirq_line, HOLD_LINE); } WRITE8_MEMBER(toaplan2_state::batrider_clear_nmi_w) { - device_set_input_line(m_sub_cpu, INPUT_LINE_NMI, CLEAR_LINE); + m_sub_cpu->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } @@ -1023,7 +1023,7 @@ WRITE16_MEMBER(toaplan2_state::bbakraid_eeprom_w) static INTERRUPT_GEN( bbakraid_snd_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } @@ -3005,7 +3005,7 @@ static void irqhandler(device_t *device, int linestate) toaplan2_state *state = device->machine().driver_data(); if (state->m_sub_cpu != NULL) // wouldn't tekipaki have problem without this? "mcu" is not generally added - device_set_input_line(state->m_sub_cpu, 0, linestate); + state->m_sub_cpu->execute().set_input_line(0, linestate); } static const ym3812_interface ym3812_config = diff --git a/src/mame/drivers/tomcat.c b/src/mame/drivers/tomcat.c index 155fc9463b4..d5f554e9b9f 100644 --- a/src/mame/drivers/tomcat.c +++ b/src/mame/drivers/tomcat.c @@ -182,7 +182,7 @@ WRITE16_MEMBER(tomcat_state::tomcat_mresl_w) { // 320 Reset Low (Address Strobe) // Reset TMS320 - device_set_input_line(machine().device("dsp"), INPUT_LINE_RESET, ASSERT_LINE); + machine().device("dsp")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } WRITE16_MEMBER(tomcat_state::tomcat_mresh_w) @@ -190,7 +190,7 @@ WRITE16_MEMBER(tomcat_state::tomcat_mresh_w) // 320 Reset high (Address Strobe) // Release reset of TMS320 m_dsp_BIO = 0; - device_set_input_line(machine().device("dsp"), INPUT_LINE_RESET, CLEAR_LINE); + machine().device("dsp")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE); } WRITE16_MEMBER(tomcat_state::tomcat_irqclr_w) diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c index c551f5a6a2a..684dc8d4204 100644 --- a/src/mame/drivers/topspeed.c +++ b/src/mame/drivers/topspeed.c @@ -300,7 +300,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 !! */ topspeed_state *state = machine.driver_data(); - device_set_input_line(state->m_subcpu, INPUT_LINE_RESET, (state->m_cpua_ctrl &0x1) ? CLEAR_LINE : ASSERT_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_RESET, (state->m_cpua_ctrl &0x1) ? CLEAR_LINE : ASSERT_LINE); } WRITE16_MEMBER(topspeed_state::cpua_ctrl_w) @@ -325,7 +325,7 @@ WRITE16_MEMBER(topspeed_state::cpua_ctrl_w) static TIMER_CALLBACK( topspeed_interrupt6 ) { topspeed_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); } /* 68000 B */ @@ -333,7 +333,7 @@ static TIMER_CALLBACK( topspeed_interrupt6 ) static TIMER_CALLBACK( topspeed_cpub_interrupt6 ) { topspeed_state *state = machine.driver_data(); - device_set_input_line(state->m_subcpu, 6, HOLD_LINE); /* assumes Z80 sandwiched between the 68Ks */ + state->m_subcpu->set_input_line(6, HOLD_LINE); /* assumes Z80 sandwiched between the 68Ks */ } @@ -341,14 +341,14 @@ static INTERRUPT_GEN( topspeed_interrupt ) { /* Unsure how many int6's per frame */ device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000 - 500), FUNC(topspeed_interrupt6)); - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } static INTERRUPT_GEN( topspeed_cpub_interrupt ) { /* Unsure how many int6's per frame */ device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000 - 500), FUNC(topspeed_cpub_interrupt6)); - device_set_input_line(device, 5, HOLD_LINE); + device->execute().set_input_line(5, HOLD_LINE); } @@ -661,7 +661,7 @@ GFXDECODE_END static void irq_handler( device_t *device, int irq ) /* assumes Z80 sandwiched between 68Ks */ { topspeed_state *state = device->machine().driver_data(); - 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 = @@ -699,9 +699,9 @@ static MACHINE_START( topspeed ) state->membank("bank10")->configure_entries(0, 4, state->memregion("audiocpu")->base() + 0xc000, 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_subcpu = machine.device("subcpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_subcpu = machine.device("subcpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_tc0220ioc = machine.device("tc0220ioc"); state->m_pc080sn_1 = machine.device("pc080sn_1"); state->m_pc080sn_2 = machine.device("pc080sn_2"); diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c index 69705fc183f..db1ebe58738 100644 --- a/src/mame/drivers/toratora.c +++ b/src/mame/drivers/toratora.c @@ -39,7 +39,7 @@ public: UINT8 m_clear_tv; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; pia6821_device *m_pia_u1; pia6821_device *m_pia_u2; pia6821_device *m_pia_u3; @@ -144,7 +144,7 @@ WRITE_LINE_MEMBER(toratora_state::main_cpu_irq) int combined_state = pia->irq_a_state() | pia->irq_b_state(); logerror("GEN IRQ: %x\n", combined_state); - device_set_input_line(m_maincpu, 0, combined_state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(0, combined_state ? ASSERT_LINE : CLEAR_LINE); } @@ -425,7 +425,7 @@ static MACHINE_START( toratora ) { toratora_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_pia_u1 = machine.device("pia_u1"); state->m_pia_u2 = machine.device("pia_u2"); state->m_pia_u3 = machine.device("pia_u3"); diff --git a/src/mame/drivers/toypop.c b/src/mame/drivers/toypop.c index 9dd3eec6152..9f1e2d2b32a 100644 --- a/src/mame/drivers/toypop.c +++ b/src/mame/drivers/toypop.c @@ -107,7 +107,7 @@ static INTERRUPT_GEN( toypop_main_vblank_irq ) device_t *namcoio_2 = device->machine().device("56xx_2"); if(state->m_main_irq_mask) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); if (!namcoio_read_reset_line(namcoio_0)) /* give the cpu a tiny bit of time to write the command before processing it */ device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run)); @@ -125,7 +125,7 @@ static INTERRUPT_GEN( toypop_sound_timer_irq ) toypop_state *state = device->machine().driver_data(); if(state->m_sound_irq_mask) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } WRITE8_MEMBER(toypop_state::toypop_sound_clear_w) @@ -165,7 +165,7 @@ static INTERRUPT_GEN( toypop_m68000_interrupt ) { toypop_state *state = device->machine().driver_data(); if (state->m_interrupt_enable_68k) - device_set_input_line(device, 6, HOLD_LINE); + device->execute().set_input_line(6, HOLD_LINE); } WRITE16_MEMBER(toypop_state::toypop_m68000_interrupt_enable_w) diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index 3cb010a7c4c..31d107cceb2 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -284,7 +284,7 @@ static INTERRUPT_GEN( sub_vblank_irq ) tp84_state *state = device->machine().driver_data(); if(state->m_sub_irq_mask) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } diff --git a/src/mame/drivers/trackfld.c b/src/mame/drivers/trackfld.c index f6c25d81266..3f14f16271c 100644 --- a/src/mame/drivers/trackfld.c +++ b/src/mame/drivers/trackfld.c @@ -890,7 +890,7 @@ static INTERRUPT_GEN( vblank_irq ) trackfld_state *state = device->machine().driver_data(); if(state->m_irq_mask) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static INTERRUPT_GEN( vblank_nmi ) @@ -898,7 +898,7 @@ static INTERRUPT_GEN( vblank_nmi ) trackfld_state *state = device->machine().driver_data(); if(state->m_irq_mask) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } //------------------------------------------------- @@ -960,7 +960,7 @@ static INTERRUPT_GEN( yieartf_timer_irq ) trackfld_state *state = device->machine().driver_data(); if (state->m_yieartf_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( yieartf, trackfld_state ) diff --git a/src/mame/drivers/trucocl.c b/src/mame/drivers/trucocl.c index 27bed402060..e89ce3b212f 100644 --- a/src/mame/drivers/trucocl.c +++ b/src/mame/drivers/trucocl.c @@ -127,7 +127,7 @@ static INTERRUPT_GEN( trucocl_interrupt ) trucocl_state *state = device->machine().driver_data(); 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/trvquest.c b/src/mame/drivers/trvquest.c index f13dad62de3..f979a829604 100644 --- a/src/mame/drivers/trvquest.c +++ b/src/mame/drivers/trvquest.c @@ -150,7 +150,7 @@ INPUT_PORTS_END static TIMER_CALLBACK( via_irq_delayed ) { gameplan_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 0, param); + state->m_maincpu->set_input_line(0, param); } static void via_irq( device_t *device, int state ) @@ -187,7 +187,7 @@ static MACHINE_START( trvquest ) { gameplan_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); /* register for save states */ state->save_item(NAME(state->m_video_x)); diff --git a/src/mame/drivers/tsamurai.c b/src/mame/drivers/tsamurai.c index 1adbfadfb17..301bc9bbd38 100644 --- a/src/mame/drivers/tsamurai.c +++ b/src/mame/drivers/tsamurai.c @@ -49,7 +49,7 @@ WRITE8_MEMBER(tsamurai_state::nmi_enable_w) static INTERRUPT_GEN( samurai_interrupt ) { tsamurai_state *state = device->machine().driver_data(); - if (state->m_nmi_enabled) device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + if (state->m_nmi_enabled) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } READ8_MEMBER(tsamurai_state::unknown_d803_r) @@ -270,7 +270,7 @@ WRITE8_MEMBER(tsamurai_state::vsgongf_sound_nmi_enable_w) static INTERRUPT_GEN( vsgongf_sound_interrupt ) { tsamurai_state *state = device->machine().driver_data(); - if (state->m_vsgongf_sound_nmi_enabled) device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + if (state->m_vsgongf_sound_nmi_enabled) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } /* what are these, protection of some kind? */ diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 6dd817fe42d..30ee367e5bf 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -271,7 +271,7 @@ INPUT_PORTS_END static INTERRUPT_GEN( ttchamp_irq ) /* right? */ { - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( ttchamp, ttchamp_state ) diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c index 53dfabe3433..58f0e6fe1fe 100644 --- a/src/mame/drivers/tumbleb.c +++ b/src/mame/drivers/tumbleb.c @@ -441,7 +441,7 @@ static void tumbleb2_playmusic( device_t *device ) static INTERRUPT_GEN( tumbleb2_interrupt ) { tumbleb_state *state = device->machine().driver_data(); - device_set_input_line(device, 6, HOLD_LINE); + device->execute().set_input_line(6, HOLD_LINE); tumbleb2_playmusic(state->m_oki); } @@ -701,7 +701,7 @@ ADDRESS_MAP_END WRITE16_MEMBER(tumbleb_state::jumpkids_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); } static ADDRESS_MAP_START( suprtrio_main_map, AS_PROGRAM, 16, tumbleb_state ) @@ -740,7 +740,7 @@ WRITE16_MEMBER(tumbleb_state::semicom_soundcmd_w) { soundlatch_byte_w(space, 0, data & 0xff); // needed for Super Trio which reads the sound with polling - // device_spin_until_time(&space.device(), attotime::from_usec(100)); + // space.device().execute().spin_until_time(attotime::from_usec(100)); machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20)); } @@ -1867,8 +1867,8 @@ static MACHINE_START( tumbleb ) { tumbleb_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_oki = machine.device("oki"); state->save_item(NAME(state->m_music_command)); @@ -2044,7 +2044,7 @@ MACHINE_CONFIG_END static void semicom_irqhandler( device_t *device, int irq ) { tumbleb_state *state = device->machine().driver_data(); - 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); } diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c index be91a8c46e7..21bbf74369b 100644 --- a/src/mame/drivers/tumblep.c +++ b/src/mame/drivers/tumblep.c @@ -71,7 +71,7 @@ READ16_MEMBER(tumblep_state::tumblep_prot_r) WRITE16_MEMBER(tumblep_state::tumblep_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); } #ifdef UNUSED_FUNCTION @@ -275,7 +275,7 @@ GFXDECODE_END static void sound_irq(device_t *device, int state) { tumblep_state *driver_state = device->machine().driver_data(); - 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 = @@ -298,8 +298,8 @@ static MACHINE_START( tumblep ) { tumblep_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_deco_tilegen1 = machine.device("tilegen1"); } diff --git a/src/mame/drivers/turbo.c b/src/mame/drivers/turbo.c index 4593ebea1ee..2a72ee8cb1c 100644 --- a/src/mame/drivers/turbo.c +++ b/src/mame/drivers/turbo.c @@ -393,7 +393,7 @@ WRITE8_MEMBER(turbo_state::buckrog_ppi0c_w) /* bit 6 = /IOREQ on the 2nd CPU */ /* bit 7 = /INT on the 2nd CPU */ m_buckrog_fchg = data & 0x07; - device_set_input_line(m_subcpu, 0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); + m_subcpu->set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); } diff --git a/src/mame/drivers/tutankhm.c b/src/mame/drivers/tutankhm.c index ef83c30e665..8018db7c77c 100644 --- a/src/mame/drivers/tutankhm.c +++ b/src/mame/drivers/tutankhm.c @@ -68,7 +68,7 @@ static INTERRUPT_GEN( tutankhm_interrupt ) /* 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); } @@ -77,7 +77,7 @@ WRITE8_MEMBER(tutankhm_state::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); } diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c index c18d73314ea..287de91d458 100644 --- a/src/mame/drivers/twin16.c +++ b/src/mame/drivers/twin16.c @@ -688,13 +688,13 @@ static const k007232_interface k007232_config = static INTERRUPT_GEN( CPUA_interrupt ) { twin16_state *state = device->machine().driver_data(); - if (CPUA_IRQ_ENABLE) device_set_input_line(device, 5, HOLD_LINE); + if (CPUA_IRQ_ENABLE) device->execute().set_input_line(5, HOLD_LINE); } static INTERRUPT_GEN( CPUB_interrupt ) { twin16_state *state = device->machine().driver_data(); - if (CPUB_IRQ_ENABLE) device_set_input_line(device, 5, HOLD_LINE); + if (CPUB_IRQ_ENABLE) device->execute().set_input_line(5, HOLD_LINE); } /* Machine Drivers */ diff --git a/src/mame/drivers/twinkle.c b/src/mame/drivers/twinkle.c index a31ceea70ee..44418e9ba9d 100644 --- a/src/mame/drivers/twinkle.c +++ b/src/mame/drivers/twinkle.c @@ -702,19 +702,19 @@ WRITE16_MEMBER(twinkle_state::twinkle_spu_ctrl_w) if ((!(data & 0x0080)) && (m_spu_ctrl & 0x0080)) { - device_set_input_line(&space.device(), M68K_IRQ_1, CLEAR_LINE); + space.device().execute().set_input_line(M68K_IRQ_1, CLEAR_LINE); } else if ((!(data & 0x0100)) && (m_spu_ctrl & 0x0100)) { - device_set_input_line(&space.device(), M68K_IRQ_2, CLEAR_LINE); + space.device().execute().set_input_line(M68K_IRQ_2, CLEAR_LINE); } else if ((!(data & 0x0200)) && (m_spu_ctrl & 0x0200)) { - device_set_input_line(&space.device(), M68K_IRQ_4, CLEAR_LINE); + space.device().execute().set_input_line(M68K_IRQ_4, CLEAR_LINE); } else if ((!(data & 0x0400)) && (m_spu_ctrl & 0x0400)) { - device_set_input_line(&space.device(), M68K_IRQ_6, CLEAR_LINE); + space.device().execute().set_input_line(M68K_IRQ_6, CLEAR_LINE); } m_spu_ctrl = data; diff --git a/src/mame/drivers/tx1.c b/src/mame/drivers/tx1.c index e5cca2d5cf4..b954b9be81a 100644 --- a/src/mame/drivers/tx1.c +++ b/src/mame/drivers/tx1.c @@ -83,7 +83,7 @@ WRITE8_MEMBER(tx1_state::z80_intreq_w) /* Periodic Z80 interrupt */ static INTERRUPT_GEN( z80_irq ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } READ16_MEMBER(tx1_state::z80_shared_r) diff --git a/src/mame/drivers/ultraman.c b/src/mame/drivers/ultraman.c index a6600bdd607..e05e77097cf 100644 --- a/src/mame/drivers/ultraman.c +++ b/src/mame/drivers/ultraman.c @@ -27,7 +27,7 @@ WRITE16_MEMBER(ultraman_state::sound_irq_trigger_w) { if (ACCESSING_BITS_0_7) - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -194,8 +194,8 @@ static MACHINE_START( ultraman ) { ultraman_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k051960 = machine.device("k051960"); state->m_k051316_1 = machine.device("k051316_1"); state->m_k051316_2 = machine.device("k051316_2"); diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c index ce12704d797..47d462459e8 100644 --- a/src/mame/drivers/ultrsprt.c +++ b/src/mame/drivers/ultrsprt.c @@ -205,7 +205,7 @@ INPUT_PORTS_END static INTERRUPT_GEN( ultrsprt_vblank ) { - device_set_input_line(device, INPUT_LINE_IRQ1, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_IRQ1, ASSERT_LINE); } static void sound_irq_callback(running_machine &machine, int irq) diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c index b808b443821..98ee3646938 100644 --- a/src/mame/drivers/undrfire.c +++ b/src/mame/drivers/undrfire.c @@ -701,7 +701,7 @@ static INTERRUPT_GEN( undrfire_interrupt ) { undrfire_state *state = device->machine().driver_data(); state->m_frame_counter ^= 1; - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } static const tc0100scn_interface undrfire_tc0100scn_intf = diff --git a/src/mame/drivers/unkhorse.c b/src/mame/drivers/unkhorse.c index 458ec863b91..56a3374bbb3 100644 --- a/src/mame/drivers/unkhorse.c +++ b/src/mame/drivers/unkhorse.c @@ -192,8 +192,8 @@ INPUT_PORTS_END static INTERRUPT_GEN( horse_interrupt ) { - device_set_input_line(device, I8085_RST75_LINE, ASSERT_LINE); - device_set_input_line(device, I8085_RST75_LINE, CLEAR_LINE); + device->execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE); + device->execute().set_input_line(I8085_RST75_LINE, CLEAR_LINE); } static MACHINE_CONFIG_START( horse, horse_state ) diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index 193963f43a7..335965f1bc7 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -2221,9 +2221,9 @@ READ16_MEMBER(vamphalf_state::vamphalf_speedup_r) if(space.device().safe_pc() == 0x82de) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x4a840/2)+offset]; @@ -2234,9 +2234,9 @@ READ16_MEMBER(vamphalf_state::vamphafk_speedup_r) if(space.device().safe_pc() == 0x82de) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x4a6d0/2)+offset]; @@ -2247,9 +2247,9 @@ READ16_MEMBER(vamphalf_state::misncrft_speedup_r) if(space.device().safe_pc() == 0xecc8) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x72eb4/2)+offset]; @@ -2260,9 +2260,9 @@ READ16_MEMBER(vamphalf_state::coolmini_speedup_r) if(space.device().safe_pc() == 0x75f7a) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0xd2e80/2)+offset]; @@ -2273,9 +2273,9 @@ READ16_MEMBER(vamphalf_state::suplup_speedup_r) if(space.device().safe_pc() == 0xaf18a ) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x11605c/2)+offset]; @@ -2286,9 +2286,9 @@ READ16_MEMBER(vamphalf_state::luplup_speedup_r) if(space.device().safe_pc() == 0xaefac ) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x115e84/2)+offset]; @@ -2299,9 +2299,9 @@ READ16_MEMBER(vamphalf_state::luplup29_speedup_r) if(space.device().safe_pc() == 0xae6c0 ) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x113f08/2)+offset]; @@ -2312,9 +2312,9 @@ READ16_MEMBER(vamphalf_state::puzlbang_speedup_r) if(space.device().safe_pc() == 0xae6d2 ) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x113ecc/2)+offset]; @@ -2327,9 +2327,9 @@ READ32_MEMBER(vamphalf_state::wyvernwg_speedup_r) if(pc == 0x10758) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram32[0x00b56fc/4]; @@ -2342,9 +2342,9 @@ READ32_MEMBER(vamphalf_state::wyvernwga_speedup_r) if(pc == 0x10758) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram32[0x00b74f8/4]; @@ -2357,9 +2357,9 @@ READ32_MEMBER(vamphalf_state::finalgdr_speedup_r) if(space.device().safe_pc() == 0x1c212) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram32[0x005e874/4]; @@ -2371,9 +2371,9 @@ READ32_MEMBER(vamphalf_state::mrkicker_speedup_r) if(pc == 0x469de || pc == 0x46a36) { // if(irq_active(&space)) -// device_spin_until_interrupt(&space.device()); +// space.device().execute().spin_until_interrupt(); // else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram32[0x00701a4/4]; @@ -2385,9 +2385,9 @@ READ16_MEMBER(vamphalf_state::dquizgo2_speedup_r) if(space.device().safe_pc() == 0xaa622) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0xcde70/2)+offset]; @@ -2397,11 +2397,11 @@ READ32_MEMBER(vamphalf_state::aoh_speedup_r) { if(space.device().safe_pc() == 0xb994 ) { - device_eat_cycles(&space.device(), 500); + space.device().execute().eat_cycles(500); } else if (space.device().safe_pc() == 0xba40 ) { - device_eat_cycles(&space.device(), 500); + space.device().execute().eat_cycles(500); } @@ -2413,9 +2413,9 @@ READ16_MEMBER(vamphalf_state::jmpbreak_speedup_r) if(space.device().safe_pc() == 0x983c) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x00906fc / 2)+offset]; @@ -2426,9 +2426,9 @@ READ16_MEMBER(vamphalf_state::mrdig_speedup_r) if(space.device().safe_pc() == 0x1710) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); else - device_eat_cycles(&space.device(), 50); + space.device().execute().eat_cycles(50); } return m_wram[(0x00a99c / 2)+offset]; @@ -2440,7 +2440,7 @@ READ16_MEMBER(vamphalf_state::dtfamily_speedup_r) int pc = space.device().safe_pc(); if (pc == 0x12fa6) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); return m_wram[0xcc2a8 / 2]; @@ -2450,7 +2450,7 @@ READ16_MEMBER(vamphalf_state::toyland_speedup_r) { if (space.device().safe_pc() == 0x130c2) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); return m_wram[0x780d8 / 2]; @@ -2461,7 +2461,7 @@ READ16_MEMBER(vamphalf_state::boonggab_speedup_r) if(space.device().safe_pc() == 0x13198) { if(irq_active(&space)) - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } return m_wram[(0xf1b7c / 2)+offset]; diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c index 35a17f0b72d..cdffee85f19 100644 --- a/src/mame/drivers/vaportra.c +++ b/src/mame/drivers/vaportra.c @@ -26,7 +26,7 @@ WRITE16_MEMBER(vaportra_state::vaportra_sound_w) /* Force synchronisation between CPUs with fake timer */ machine().scheduler().synchronize(); soundlatch_byte_w(space, 0, data & 0xff); - device_set_input_line(m_audiocpu, 0, ASSERT_LINE); + m_audiocpu->set_input_line(0, ASSERT_LINE); } READ16_MEMBER(vaportra_state::vaportra_control_r) @@ -71,7 +71,7 @@ ADDRESS_MAP_END READ8_MEMBER(vaportra_state::vaportra_soundlatch_r) { - device_set_input_line(m_audiocpu, 0, CLEAR_LINE); + m_audiocpu->set_input_line(0, CLEAR_LINE); return soundlatch_byte_r(space, offset); } @@ -202,7 +202,7 @@ GFXDECODE_END static void sound_irq( device_t *device, int state ) { vaportra_state *driver_state = device->machine().driver_data(); - 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 = @@ -245,8 +245,8 @@ static MACHINE_START( vaportra ) { vaportra_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_deco_tilegen1 = machine.device("tilegen1"); state->m_deco_tilegen2 = machine.device("tilegen2"); diff --git a/src/mame/drivers/vastar.c b/src/mame/drivers/vastar.c index d508162ef83..978aff6af96 100644 --- a/src/mame/drivers/vastar.c +++ b/src/mame/drivers/vastar.c @@ -294,7 +294,7 @@ static INTERRUPT_GEN( vblank_irq ) vastar_state *state = device->machine().driver_data(); 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( vastar, vastar_state ) diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c index 48743494e8f..c74891ebf62 100644 --- a/src/mame/drivers/vcombat.c +++ b/src/mame/drivers/vcombat.c @@ -256,15 +256,15 @@ WRITE16_MEMBER(vcombat_state::wiggle_i860p1_pins_w) READ16_MEMBER(vcombat_state::main_irqiack_r) { //fprintf(stderr, "M0: irq iack\n"); - device_set_input_line(machine().device("maincpu"), M68K_IRQ_1, CLEAR_LINE); - //device_set_input_line(machine().device("maincpu"), INPUT_LINE_RESET, CLEAR_LINE); + machine().device("maincpu")->execute().set_input_line(M68K_IRQ_1, CLEAR_LINE); + //machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE); return 0; } READ16_MEMBER(vcombat_state::sound_resetmain_r) { //fprintf(stderr, "M1: reset line to M0\n"); - //device_set_input_line(machine().device("maincpu"), INPUT_LINE_RESET, PULSE_LINE); + //machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); return 0; } @@ -559,7 +559,7 @@ INPUT_PORTS_END WRITE_LINE_MEMBER(vcombat_state::sound_update) { /* Seems reasonable */ - device_set_input_line(machine().device("soundcpu"), M68K_IRQ_1, state ? ASSERT_LINE : CLEAR_LINE); + machine().device("soundcpu")->execute().set_input_line(M68K_IRQ_1, state ? ASSERT_LINE : CLEAR_LINE); } static const mc6845_interface mc6845_intf = diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c index 571edb4cd90..09cc82b211f 100644 --- a/src/mame/drivers/vegas.c +++ b/src/mame/drivers/vegas.c @@ -1452,7 +1452,7 @@ static WRITE32_HANDLER( analog_port_w ) static WRITE32_HANDLER( vegas_watchdog_w ) { - device_eat_cycles(&space->device(), 100); + space->device().execute().eat_cycles(100); } diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c index 528e59a61c7..3636afc1e64 100644 --- a/src/mame/drivers/vendetta.c +++ b/src/mame/drivers/vendetta.c @@ -201,24 +201,24 @@ WRITE8_MEMBER(vendetta_state::vendetta_5fe0_w) static TIMER_CALLBACK( z80_nmi_callback ) { vendetta_state *state = machine.driver_data(); - 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(vendetta_state::z80_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(25), FUNC(z80_nmi_callback)); } WRITE8_MEMBER(vendetta_state::z80_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); } READ8_MEMBER(vendetta_state::vendetta_sound_interrupt_r) { - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); return 0x00; } @@ -408,7 +408,7 @@ static INTERRUPT_GEN( vendetta_irq ) { vendetta_state *state = device->machine().driver_data(); if (state->m_irq_enabled) - device_set_input_line(device, KONAMI_IRQ_LINE, HOLD_LINE); + device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } static const k052109_interface vendetta_k052109_intf = @@ -467,8 +467,8 @@ static MACHINE_START( vendetta ) state->m_generic_paletteram_8.allocate(0x1000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k053246 = machine.device("k053246"); state->m_k053251 = machine.device("k053251"); state->m_k052109 = machine.device("k052109"); diff --git a/src/mame/drivers/volfied.c b/src/mame/drivers/volfied.c index 4e52e6eb10f..a02c06604d9 100644 --- a/src/mame/drivers/volfied.c +++ b/src/mame/drivers/volfied.c @@ -210,7 +210,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { volfied_state *state = device->machine().driver_data(); - 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 = @@ -237,8 +237,8 @@ static MACHINE_START( volfied ) volfied_cchip_init(machine); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_pc090oj = machine.device("pc090oj"); } diff --git a/src/mame/drivers/voyager.c b/src/mame/drivers/voyager.c index f4328629dbe..f0a761c41a5 100644 --- a/src/mame/drivers/voyager.c +++ b/src/mame/drivers/voyager.c @@ -653,7 +653,7 @@ static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color static MACHINE_START(voyager) { voyager_state *state = machine.driver_data(); - 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" ); diff --git a/src/mame/drivers/vulgus.c b/src/mame/drivers/vulgus.c index a28c4db7164..0a583536e07 100644 --- a/src/mame/drivers/vulgus.c +++ b/src/mame/drivers/vulgus.c @@ -49,7 +49,7 @@ All Clocks and Vsync verified by Corrado Tomaselli (August 2012) static INTERRUPT_GEN( vulgus_vblank_irq ) { - 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 */ } static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, vulgus_state ) diff --git a/src/mame/drivers/warpwarp.c b/src/mame/drivers/warpwarp.c index 8ce843f1f73..dc0762afb73 100644 --- a/src/mame/drivers/warpwarp.c +++ b/src/mame/drivers/warpwarp.c @@ -144,7 +144,7 @@ static INTERRUPT_GEN( vblank_irq ) warpwarp_state *state = device->machine().driver_data(); if(state->m_ball_on) - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } diff --git a/src/mame/drivers/warriorb.c b/src/mame/drivers/warriorb.c index f7bceb638e7..6ede8645252 100644 --- a/src/mame/drivers/warriorb.c +++ b/src/mame/drivers/warriorb.c @@ -427,7 +427,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) { warriorb_state *state = device->machine().driver_data(); - 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 = @@ -514,8 +514,8 @@ static MACHINE_START( warriorb ) state->membank("bank10")->configure_entries(0, 8, state->memregion("audiocpu")->base() + 0xc000, 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_tc0140syt = machine.device("tc0140syt"); state->m_tc0100scn_1 = machine.device("tc0100scn_1"); state->m_tc0100scn_2 = machine.device("tc0100scn_2"); diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c index 95206ee09c6..10104baa6e6 100644 --- a/src/mame/drivers/wgp.c +++ b/src/mame/drivers/wgp.c @@ -419,7 +419,7 @@ static void parse_control(running_machine &machine) /* however this fails when recovering from a save state if cpu B is disabled !! */ wgp_state *state = machine.driver_data(); - device_set_input_line(state->m_subcpu, INPUT_LINE_RESET, (state->m_cpua_ctrl & 0x1) ? CLEAR_LINE : ASSERT_LINE); + state->m_subcpu->set_input_line(INPUT_LINE_RESET, (state->m_cpua_ctrl & 0x1) ? CLEAR_LINE : ASSERT_LINE); /* bit 1 is "vibration" acc. to test mode */ } @@ -447,14 +447,14 @@ WRITE16_MEMBER(wgp_state::cpua_ctrl_w)/* assumes Z80 sandwiched between 68Ks */ static TIMER_CALLBACK( wgp_interrupt4 ) { wgp_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } #endif static TIMER_CALLBACK( wgp_interrupt6 ) { wgp_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 6, HOLD_LINE); + state->m_maincpu->set_input_line(6, HOLD_LINE); } /* 68000 B */ @@ -462,7 +462,7 @@ static TIMER_CALLBACK( wgp_interrupt6 ) static TIMER_CALLBACK( wgp_cpub_interrupt6 ) { wgp_state *state = machine.driver_data(); - device_set_input_line(state->m_subcpu, 6, HOLD_LINE); /* assumes Z80 sandwiched between the 68Ks */ + state->m_subcpu->set_input_line(6, HOLD_LINE); /* assumes Z80 sandwiched between the 68Ks */ } @@ -475,7 +475,7 @@ static TIMER_CALLBACK( wgp_cpub_interrupt6 ) static INTERRUPT_GEN( wgp_cpub_interrupt ) { device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000-500), FUNC(wgp_cpub_interrupt6)); - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } @@ -899,7 +899,7 @@ GFXDECODE_END static void irqhandler( device_t *device, int irq ) // assumes Z80 sandwiched between 68Ks { wgp_state *state = device->machine().driver_data(); - 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 = @@ -948,9 +948,9 @@ static MACHINE_START( wgp ) state->membank("bank10")->configure_entries(0, 4, state->memregion("audiocpu")->base() + 0xc000, 0x4000); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.device("sub"); state->m_tc0140syt = machine.device("tc0140syt"); state->m_tc0100scn = machine.device("tc0100scn"); diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c index 0e299439bfc..6784812ae4f 100644 --- a/src/mame/drivers/wheelfir.c +++ b/src/mame/drivers/wheelfir.c @@ -231,8 +231,8 @@ public: wheelfir_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) { } - device_t *m_maincpu; - device_t *m_subcpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; device_t *m_screen; device_t *m_eeprom; @@ -772,8 +772,8 @@ static MACHINE_START( wheelfir ) { wheelfir_state *state = machine.driver_data(); - state->m_maincpu = machine.device( "maincpu"); - state->m_subcpu = machine.device( "subcpu"); + state->m_maincpu = machine.device( "maincpu"); + state->m_subcpu = machine.device( "subcpu"); state->m_screen = machine.device( "screen"); state->m_eeprom = machine.device( "eeprom"); diff --git a/src/mame/drivers/whitestar.c b/src/mame/drivers/whitestar.c index d0cd92a52df..8bbc7552bac 100644 --- a/src/mame/drivers/whitestar.c +++ b/src/mame/drivers/whitestar.c @@ -110,7 +110,7 @@ WRITE8_MEMBER(whitestar_state::dmd_bank_w) READ8_MEMBER(whitestar_state::dmd_latch_r) { m_dmd_busy = 0; - device_set_input_line(m_dmdcpu, M6809_IRQ_LINE, CLEAR_LINE); + m_dmdcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); return m_dmd_latch; } @@ -118,8 +118,8 @@ WRITE8_MEMBER(whitestar_state::dmd_latch_w) { m_dmd_latch = data; m_dmd_busy = 1; - device_set_input_line(m_dmdcpu, M6809_IRQ_LINE, CLEAR_LINE); - device_set_input_line(m_dmdcpu, M6809_IRQ_LINE, ASSERT_LINE); + m_dmdcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); + m_dmdcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } READ8_MEMBER(whitestar_state::dmd_ctrl_r) @@ -130,7 +130,7 @@ READ8_MEMBER(whitestar_state::dmd_ctrl_r) WRITE8_MEMBER(whitestar_state::dmd_ctrl_w) { m_dmd_ctrl = data; - device_set_input_line(m_dmdcpu, M6809_IRQ_LINE, CLEAR_LINE); + m_dmdcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); if (data!=0) { bank_w(space,0,0); m_dmdcpu->reset(); @@ -182,7 +182,7 @@ DRIVER_INIT_MEMBER(whitestar_state,whitestar) // the appropriate device is passed in, so we can share this routine static INTERRUPT_GEN( whitestar_firq_interrupt ) { - device_set_input_line(device, M6809_FIRQ_LINE, HOLD_LINE); + device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } #define DMD_CHUNK_SIZE 10 diff --git a/src/mame/drivers/wiping.c b/src/mame/drivers/wiping.c index e6f66e50471..36f0d87a8f4 100644 --- a/src/mame/drivers/wiping.c +++ b/src/mame/drivers/wiping.c @@ -267,7 +267,7 @@ static INTERRUPT_GEN( vblank_irq ) wiping_state *state = device->machine().driver_data(); if(state->m_main_irq_mask) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static INTERRUPT_GEN( sound_timer_irq ) @@ -275,7 +275,7 @@ static INTERRUPT_GEN( sound_timer_irq ) wiping_state *state = device->machine().driver_data(); if(state->m_sound_irq_mask) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c index f8647ff831c..fc5e0e5b498 100644 --- a/src/mame/drivers/witch.c +++ b/src/mame/drivers/witch.c @@ -396,7 +396,7 @@ WRITE8_MEMBER(witch_state::write_a00x) break; case 0x08: //A008 - device_set_input_line(&space.device(),0,CLEAR_LINE); + space.device().execute().set_input_line(0,CLEAR_LINE); break; } } @@ -781,12 +781,12 @@ static SCREEN_UPDATE_IND16(witch) static INTERRUPT_GEN( witch_main_interrupt ) { - device_set_input_line(device,0,ASSERT_LINE); + device->execute().set_input_line(0,ASSERT_LINE); } static INTERRUPT_GEN( witch_sub_interrupt ) { - device_set_input_line(device,0,ASSERT_LINE); + device->execute().set_input_line(0,ASSERT_LINE); } static MACHINE_CONFIG_START( witch, witch_state ) diff --git a/src/mame/drivers/wiz.c b/src/mame/drivers/wiz.c index 5114553a1cf..f3a3b46df8a 100644 --- a/src/mame/drivers/wiz.c +++ b/src/mame/drivers/wiz.c @@ -706,7 +706,7 @@ static INTERRUPT_GEN( wiz_vblank_interrupt ) wiz_state *state = device->machine().driver_data(); if(state->m_main_nmi_mask & 1) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static INTERRUPT_GEN( wiz_sound_interrupt ) @@ -714,7 +714,7 @@ static INTERRUPT_GEN( wiz_sound_interrupt ) wiz_state *state = device->machine().driver_data(); if(state->m_sound_nmi_mask & 1) - 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/xexex.c b/src/mame/drivers/xexex.c index c4f4b1495a5..1c3e566c84d 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -165,7 +165,7 @@ READ16_MEMBER(xexex_state::xexex_waitskip_r) if (space.device().safe_pc() == 0x1158) { - device_spin_until_trigger(&space.device(), m_resume_trigger); + space.device().execute().spin_until_trigger(m_resume_trigger); m_suspension_active = 1; } @@ -226,7 +226,7 @@ WRITE16_MEMBER(xexex_state::sound_cmd2_w) WRITE16_MEMBER(xexex_state::sound_irq_w) { - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); } READ16_MEMBER(xexex_state::sound_status_r) @@ -270,7 +270,7 @@ static TIMER_CALLBACK( dmaend_callback ) // IRQ 5 is the "object DMA end interrupt" and shouldn't be triggered // if object data isn't ready for DMA within the frame. - device_set_input_line(state->m_maincpu, 5, HOLD_LINE); + state->m_maincpu->set_input_line(5, HOLD_LINE); } } @@ -289,7 +289,7 @@ static TIMER_DEVICE_CALLBACK( xexex_interrupt ) { // IRQ 6 is for test mode only 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); } /* TODO: vblank is at 256! (enable CCU then have fun in fixing offsetted layers) */ @@ -307,7 +307,7 @@ static TIMER_DEVICE_CALLBACK( xexex_interrupt ) // IRQ 4 is the V-blank interrupt. It controls color, sound and // vital game logics that shouldn't be interfered by frame-drop. if (state->m_cur_control2 & 0x0800) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } } @@ -461,8 +461,8 @@ static MACHINE_START( xexex ) state->membank("bank2")->configure_entries(0, 8, &ROM[0x10000], 0x4000); state->membank("bank2")->set_entry(0); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k053246 = machine.device("k053246"); state->m_k053250 = machine.device("k053250"); state->m_k053251 = machine.device("k053251"); diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c index c84550c7778..7b3d0fc48cb 100644 --- a/src/mame/drivers/xmen.c +++ b/src/mame/drivers/xmen.c @@ -81,7 +81,7 @@ WRITE16_MEMBER(xmen_state::sound_cmd_w) WRITE16_MEMBER(xmen_state::sound_irq_w) { - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); } WRITE16_MEMBER(xmen_state::xmen_18fa00_w) @@ -300,8 +300,8 @@ static MACHINE_START( xmen ) state->membank("bank4")->configure_entries(0, 8, &ROM[0x10000], 0x4000); state->membank("bank4")->set_entry(0); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k053246 = machine.device("k053246"); state->m_k053251 = machine.device("k053251"); state->m_k052109 = machine.device("k052109"); diff --git a/src/mame/drivers/xtom3d.c b/src/mame/drivers/xtom3d.c index f27d2a11945..c384d96ffce 100644 --- a/src/mame/drivers/xtom3d.c +++ b/src/mame/drivers/xtom3d.c @@ -574,7 +574,7 @@ static const struct pit8253_config xtom3d_pit8254_config = WRITE_LINE_MEMBER(xtom3d_state::xtom3d_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( xtom3d_state::get_slave_ack ) @@ -604,7 +604,7 @@ static void set_gate_a20(running_machine &machine, int a20) { xtom3d_state *state = machine.driver_data(); - 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) @@ -658,7 +658,7 @@ static MACHINE_START( xtom3d ) init_pc_common(machine, PCCOMMON_KEYBOARD_AT, xtom3d_set_keyb_int); - device_set_irq_callback(state->m_maincpu, irq_callback); + state->m_maincpu->set_irq_acknowledge_callback(irq_callback); intel82439tx_init(machine); kbdc8042_init(machine, &at8042); diff --git a/src/mame/drivers/xxmissio.c b/src/mame/drivers/xxmissio.c index 2681b14dc32..94fac5f9de3 100644 --- a/src/mame/drivers/xxmissio.c +++ b/src/mame/drivers/xxmissio.c @@ -67,14 +67,14 @@ static INTERRUPT_GEN( xxmissio_interrupt_m ) { xxmissio_state *state = device->machine().driver_data(); state->m_status &= ~0x20; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static INTERRUPT_GEN( xxmissio_interrupt_s ) { xxmissio_state *state = device->machine().driver_data(); state->m_status &= ~0x10; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static MACHINE_START( xxmissio ) diff --git a/src/mame/drivers/yiear.c b/src/mame/drivers/yiear.c index c46d7bf3a53..013f61503bd 100644 --- a/src/mame/drivers/yiear.c +++ b/src/mame/drivers/yiear.c @@ -126,7 +126,7 @@ static INTERRUPT_GEN( yiear_vblank_interrupt ) yiear_state *state = device->machine().driver_data(); if (state->m_yiear_irq_enable) - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } @@ -135,7 +135,7 @@ static INTERRUPT_GEN( yiear_nmi_interrupt ) yiear_state *state = device->machine().driver_data(); if (state->m_yiear_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/yunsun16.c b/src/mame/drivers/yunsun16.c index 067f5420742..47d7eb37103 100644 --- a/src/mame/drivers/yunsun16.c +++ b/src/mame/drivers/yunsun16.c @@ -148,7 +148,7 @@ number 0 on each voice. That sample is 00000-00000. if ((data & 0xff) != 0x3a) { 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); } } } @@ -558,7 +558,7 @@ static MACHINE_START( yunsun16 ) { yunsun16_state *state = machine.driver_data(); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_sprites_scrolldx)); state->save_item(NAME(state->m_sprites_scrolldy)); @@ -579,7 +579,7 @@ static MACHINE_RESET( yunsun16 ) static void soundirq(device_t *device, int state) { yunsun16_state *yunsun16 = device->machine().driver_data(); - device_set_input_line(yunsun16->m_audiocpu, 0, state); + yunsun16->m_audiocpu->set_input_line(0, state); } static const ym3812_interface magicbub_ym3812_intf = diff --git a/src/mame/drivers/yunsung8.c b/src/mame/drivers/yunsung8.c index 30dfef870ce..7b38def2543 100644 --- a/src/mame/drivers/yunsung8.c +++ b/src/mame/drivers/yunsung8.c @@ -454,7 +454,7 @@ static void yunsung8_adpcm_int( device_t *device ) state->m_toggle ^= 1; if (state->m_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 yunsung8_msm5205_interface = @@ -478,7 +478,7 @@ static MACHINE_START( yunsung8 ) state->membank("bank2")->configure_entries(0, 3, &AUDIO[0x00000], 0x4000); state->membank("bank2")->configure_entries(3, 5, &AUDIO[0x10000], 0x4000); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->save_item(NAME(state->m_videoram)); state->save_item(NAME(state->m_layers_ctrl)); diff --git a/src/mame/drivers/zac_1.c b/src/mame/drivers/zac_1.c index 3a49bc5f909..424abd1ac53 100644 --- a/src/mame/drivers/zac_1.c +++ b/src/mame/drivers/zac_1.c @@ -163,7 +163,7 @@ WRITE8_MEMBER( zac_1_state::ctrl_w ) WRITE8_MEMBER( zac_1_state::reset_int_w ) { - device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); } READ8_MEMBER( zac_1_state::serial_r ) @@ -199,7 +199,7 @@ static TIMER_DEVICE_CALLBACK( zac_1_inttimer ) if (state->m_t_c > 0x40) { UINT8 vector = (state->ioport("TEST")->read() ) ? 0x10 : 0x18; - device_set_input_line_and_vector(state->m_maincpu, INPUT_LINE_IRQ0, ASSERT_LINE, vector); + state->m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, vector); } else state->m_t_c++; @@ -253,7 +253,7 @@ ADDRESS_MAP_END READ8_MEMBER( zac_1_state::reset_int_r ) { - device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); return 0; } diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c index 99022918dd2..3ab606680cc 100644 --- a/src/mame/drivers/zaccaria.c +++ b/src/mame/drivers/zaccaria.c @@ -575,7 +575,7 @@ static INTERRUPT_GEN( vblank_irq ) zaccaria_state *state = device->machine().driver_data(); 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/zaxxon.c b/src/mame/drivers/zaxxon.c index 649539e08b3..8fd2e92be8b 100644 --- a/src/mame/drivers/zaxxon.c +++ b/src/mame/drivers/zaxxon.c @@ -302,7 +302,7 @@ static INTERRUPT_GEN( vblank_int ) zaxxon_state *state = device->machine().driver_data(); if (state->m_int_enabled) - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } diff --git a/src/mame/drivers/zerozone.c b/src/mame/drivers/zerozone.c index 85fffddf624..a7e1aed0959 100644 --- a/src/mame/drivers/zerozone.c +++ b/src/mame/drivers/zerozone.c @@ -40,7 +40,7 @@ WRITE16_MEMBER( zerozone_state::sound_w ) if (ACCESSING_BITS_8_15) { soundlatch_byte_w(space, offset, data >> 8); - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); } } diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c index b54dffcea6c..0e351f92cb9 100644 --- a/src/mame/drivers/zn.c +++ b/src/mame/drivers/zn.c @@ -710,7 +710,7 @@ WRITE8_MEMBER(zn_state::qsound_bankswitch_w) static INTERRUPT_GEN( qsound_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } WRITE32_MEMBER(zn_state::zn_qsound_w) diff --git a/src/mame/drivers/zodiack.c b/src/mame/drivers/zodiack.c index a924d354786..69fef8deeb0 100644 --- a/src/mame/drivers/zodiack.c +++ b/src/mame/drivers/zodiack.c @@ -127,7 +127,7 @@ static INTERRUPT_GEN( zodiack_sound_nmi_gen ) WRITE8_MEMBER( zodiack_state::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); } WRITE8_MEMBER( zodiack_state::control_w ) diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index 608aef9a4f3..cf59ea35ac1 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -715,7 +715,7 @@ static const k056230_interface zr107_k056230_intf = */ static INTERRUPT_GEN( zr107_vblank ) { - device_set_input_line(device, INPUT_LINE_IRQ0, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } static MACHINE_RESET( zr107 ) diff --git a/src/mame/includes/1942.h b/src/mame/includes/1942.h index ae7f3e5d34f..28c4e919bf6 100644 --- a/src/mame/includes/1942.h +++ b/src/mame/includes/1942.h @@ -25,7 +25,7 @@ public: UINT8 m_scroll[2]; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(c1942_bankswitch_w); DECLARE_WRITE8_MEMBER(c1942_fgvideoram_w); DECLARE_WRITE8_MEMBER(c1942_bgvideoram_w); diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h index d9e73551285..cba880bf267 100644 --- a/src/mame/includes/20pacgal.h +++ b/src/mame/includes/20pacgal.h @@ -29,7 +29,7 @@ public: UINT8 m_game_selected; /* 0 = Ms. Pac-Man, 1 = Galaga */ /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_eeprom; /* memory */ diff --git a/src/mame/includes/40love.h b/src/mame/includes/40love.h index 4b8d8277230..3734af5784e 100644 --- a/src/mame/includes/40love.h +++ b/src/mame/includes/40love.h @@ -56,7 +56,7 @@ public: UINT8 m_snd_ctrl3; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(nmi_disable_w); DECLARE_WRITE8_MEMBER(nmi_enable_w); diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index 13402e42637..92fd8278989 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -30,7 +30,7 @@ public: int m_speech_chip; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k052109; device_t *m_k051960; device_t *m_k051316; diff --git a/src/mame/includes/actfancr.h b/src/mame/includes/actfancr.h index 85d2befb9cf..a53876a56a5 100644 --- a/src/mame/includes/actfancr.h +++ b/src/mame/includes/actfancr.h @@ -22,8 +22,8 @@ public: int m_trio_control_select; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(triothep_control_select_w); DECLARE_READ8_MEMBER(triothep_control_r); DECLARE_WRITE8_MEMBER(actfancr_sound_w); diff --git a/src/mame/includes/aerofgt.h b/src/mame/includes/aerofgt.h index 31e4ea32d58..6c65b9e37ba 100644 --- a/src/mame/includes/aerofgt.h +++ b/src/mame/includes/aerofgt.h @@ -43,7 +43,7 @@ public: int m_pending_command; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(sound_command_w); DECLARE_WRITE16_MEMBER(turbofrc_sound_command_w); DECLARE_WRITE16_MEMBER(aerfboot_soundlatch_w); diff --git a/src/mame/includes/airbustr.h b/src/mame/includes/airbustr.h index 96b6cacec30..e5f674dfb09 100644 --- a/src/mame/includes/airbustr.h +++ b/src/mame/includes/airbustr.h @@ -41,7 +41,7 @@ public: /* devices */ device_t *m_master; device_t *m_slave; - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_pandora; DECLARE_READ8_MEMBER(devram_r); DECLARE_WRITE8_MEMBER(master_nmi_trigger_w); diff --git a/src/mame/includes/ajax.h b/src/mame/includes/ajax.h index 5a8c3b6b7b7..2cf8a647b91 100644 --- a/src/mame/includes/ajax.h +++ b/src/mame/includes/ajax.h @@ -18,9 +18,9 @@ public: int m_firq_enable; /* 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; device_t *m_k007232_1; device_t *m_k007232_2; device_t *m_k052109; diff --git a/src/mame/includes/aliens.h b/src/mame/includes/aliens.h index df453025547..92bcb293652 100644 --- a/src/mame/includes/aliens.h +++ b/src/mame/includes/aliens.h @@ -23,8 +23,8 @@ public: int m_palette_selected; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/alpha68k.h b/src/mame/includes/alpha68k.h index a82d2c978e1..7741e36c0ad 100644 --- a/src/mame/includes/alpha68k.h +++ b/src/mame/includes/alpha68k.h @@ -43,7 +43,7 @@ public: unsigned m_game_id; // see below /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; UINT8 m_sound_nmi_mask; UINT8 m_sound_pa_latch; DECLARE_WRITE16_MEMBER(tnextspc_coin_counters_w); diff --git a/src/mame/includes/amspdwy.h b/src/mame/includes/amspdwy.h index 2ab88ee947c..809b1dd3544 100644 --- a/src/mame/includes/amspdwy.h +++ b/src/mame/includes/amspdwy.h @@ -28,7 +28,7 @@ public: UINT8 m_wheel_return[2]; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_READ8_MEMBER(amspdwy_wheel_0_r); DECLARE_READ8_MEMBER(amspdwy_wheel_1_r); DECLARE_WRITE8_MEMBER(amspdwy_sound_w); diff --git a/src/mame/includes/angelkds.h b/src/mame/includes/angelkds.h index 0a6237174a6..4570beaa12f 100644 --- a/src/mame/includes/angelkds.h +++ b/src/mame/includes/angelkds.h @@ -34,7 +34,7 @@ public: UINT8 m_layer_ctrl; /* devices */ - device_t *m_subcpu; + cpu_device *m_subcpu; DECLARE_WRITE8_MEMBER(angelkds_cpu_bank_write); DECLARE_READ8_MEMBER(angelkds_input_r); DECLARE_WRITE8_MEMBER(angelkds_main_sound_w); diff --git a/src/mame/includes/aquarium.h b/src/mame/includes/aquarium.h index bade9881034..2e404f362fa 100644 --- a/src/mame/includes/aquarium.h +++ b/src/mame/includes/aquarium.h @@ -29,7 +29,7 @@ public: int m_aquarium_snd_ack; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_READ16_MEMBER(aquarium_coins_r); DECLARE_WRITE8_MEMBER(aquarium_snd_ack_w); DECLARE_WRITE16_MEMBER(aquarium_sound_w); diff --git a/src/mame/includes/ashnojoe.h b/src/mame/includes/ashnojoe.h index 1888cc01dc4..7a69af2630e 100644 --- a/src/mame/includes/ashnojoe.h +++ b/src/mame/includes/ashnojoe.h @@ -45,7 +45,7 @@ public: int m_msm5205_vclk_toggle; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_READ16_MEMBER(fake_4a00a_r); DECLARE_WRITE16_MEMBER(ashnojoe_soundlatch_w); DECLARE_WRITE8_MEMBER(adpcm_w); diff --git a/src/mame/includes/asterix.h b/src/mame/includes/asterix.h index 17d28be44d7..7dcce5c6f24 100644 --- a/src/mame/includes/asterix.h +++ b/src/mame/includes/asterix.h @@ -26,8 +26,8 @@ public: UINT16 m_prot[2]; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k053260; device_t *m_k056832; device_t *m_k053244; diff --git a/src/mame/includes/astrof.h b/src/mame/includes/astrof.h index 196dc5feb55..4f434165248 100644 --- a/src/mame/includes/astrof.h +++ b/src/mame/includes/astrof.h @@ -36,7 +36,7 @@ public: UINT8 m_astrof_bosskill_playing; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; samples_device *m_samples; // astrof & abattle device_t *m_sn; // tomahawk DECLARE_READ8_MEMBER(irq_clear_r); diff --git a/src/mame/includes/asuka.h b/src/mame/includes/asuka.h index 730d24185f0..ecd361b450b 100644 --- a/src/mame/includes/asuka.h +++ b/src/mame/includes/asuka.h @@ -30,8 +30,8 @@ public: int m_adpcm_data; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_pc090oj; device_t *m_tc0100scn; DECLARE_WRITE8_MEMBER(sound_bankswitch_w); diff --git a/src/mame/includes/atarifb.h b/src/mame/includes/atarifb.h index 86b2cd0c67e..f8e5c29666a 100644 --- a/src/mame/includes/atarifb.h +++ b/src/mame/includes/atarifb.h @@ -57,7 +57,7 @@ public: int m_counter_y_in2b; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_WRITE8_MEMBER(atarifb_out1_w); DECLARE_WRITE8_MEMBER(atarifb4_out1_w); DECLARE_WRITE8_MEMBER(abaseb_out1_w); diff --git a/src/mame/includes/battlane.h b/src/mame/includes/battlane.h index 9a2b6aed5b8..37ab96a049d 100644 --- a/src/mame/includes/battlane.h +++ b/src/mame/includes/battlane.h @@ -23,8 +23,8 @@ public: int m_cpu_control; /* CPU interrupt control register */ /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; DECLARE_WRITE8_MEMBER(battlane_cpu_command_w); DECLARE_WRITE8_MEMBER(battlane_palette_w); DECLARE_WRITE8_MEMBER(battlane_scrollx_w); diff --git a/src/mame/includes/battlnts.h b/src/mame/includes/battlnts.h index 95483c98efb..0d6c1fbf8c4 100644 --- a/src/mame/includes/battlnts.h +++ b/src/mame/includes/battlnts.h @@ -19,7 +19,7 @@ public: /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k007342; device_t *m_k007420; DECLARE_WRITE8_MEMBER(battlnts_sh_irqtrigger_w); diff --git a/src/mame/includes/beezer.h b/src/mame/includes/beezer.h index d309c912aaa..fcdd2b2b2d0 100644 --- a/src/mame/includes/beezer.h +++ b/src/mame/includes/beezer.h @@ -11,7 +11,7 @@ public: int m_pbus; int m_banklatch; - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_WRITE8_MEMBER(beezer_bankswitch_w); DECLARE_WRITE8_MEMBER(beezer_map_w); DECLARE_READ8_MEMBER(beezer_line_r); diff --git a/src/mame/includes/bigevglf.h b/src/mame/includes/bigevglf.h index e7777f5fcb8..0e19b88b06e 100644 --- a/src/mame/includes/bigevglf.h +++ b/src/mame/includes/bigevglf.h @@ -48,7 +48,7 @@ public: UINT8 m_port_select; /* for muxed controls */ /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(beg_banking_w); DECLARE_WRITE8_MEMBER(beg_fromsound_w); diff --git a/src/mame/includes/bishi.h b/src/mame/includes/bishi.h index d71a50386e4..77062c571ca 100644 --- a/src/mame/includes/bishi.h +++ b/src/mame/includes/bishi.h @@ -25,8 +25,8 @@ public: UINT16 m_cur_control2; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232; device_t *m_k056832; device_t *m_k054338; diff --git a/src/mame/includes/bking.h b/src/mame/includes/bking.h index baeaab2602a..da4b4b0525e 100644 --- a/src/mame/includes/bking.h +++ b/src/mame/includes/bking.h @@ -37,7 +37,7 @@ public: int m_addr_l; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; #if 0 /* 68705 */ diff --git a/src/mame/includes/bladestl.h b/src/mame/includes/bladestl.h index 94b00f0529f..7f44743c808 100644 --- a/src/mame/includes/bladestl.h +++ b/src/mame/includes/bladestl.h @@ -22,7 +22,7 @@ public: int m_last_track[4]; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k007342; device_t *m_k007420; DECLARE_READ8_MEMBER(trackball_r); diff --git a/src/mame/includes/blktiger.h b/src/mame/includes/blktiger.h index cb2cf23c220..8e1cd2a668d 100644 --- a/src/mame/includes/blktiger.h +++ b/src/mame/includes/blktiger.h @@ -39,7 +39,7 @@ public: /* devices */ device_t *m_mcu; - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_READ8_MEMBER(blktiger_from_mcu_r); DECLARE_WRITE8_MEMBER(blktiger_to_mcu_w); DECLARE_READ8_MEMBER(blktiger_from_main_r); diff --git a/src/mame/includes/blockhl.h b/src/mame/includes/blockhl.h index d22e69e4ef8..c46e4426694 100644 --- a/src/mame/includes/blockhl.h +++ b/src/mame/includes/blockhl.h @@ -24,8 +24,8 @@ public: int m_rombank; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k052109; device_t *m_k051960; DECLARE_READ8_MEMBER(bankedram_r); diff --git a/src/mame/includes/blockout.h b/src/mame/includes/blockout.h index c7c5df808b0..b2d69633c04 100644 --- a/src/mame/includes/blockout.h +++ b/src/mame/includes/blockout.h @@ -23,8 +23,8 @@ public: UINT16 m_color; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(blockout_sound_command_w); DECLARE_WRITE16_MEMBER(blockout_irq6_ack_w); DECLARE_WRITE16_MEMBER(blockout_irq5_ack_w); diff --git a/src/mame/includes/blueprnt.h b/src/mame/includes/blueprnt.h index f4446920a98..79a323d9c57 100644 --- a/src/mame/includes/blueprnt.h +++ b/src/mame/includes/blueprnt.h @@ -28,7 +28,7 @@ public: int m_dipsw; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_READ8_MEMBER(blueprnt_sh_dipsw_r); DECLARE_WRITE8_MEMBER(blueprnt_sound_command_w); DECLARE_WRITE8_MEMBER(blueprnt_coin_counter_w); diff --git a/src/mame/includes/bottom9.h b/src/mame/includes/bottom9.h index d11251353da..9d0cfa095d1 100644 --- a/src/mame/includes/bottom9.h +++ b/src/mame/includes/bottom9.h @@ -25,8 +25,8 @@ public: int m_nmienable; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232_1; device_t *m_k007232_2; device_t *m_k052109; diff --git a/src/mame/includes/brkthru.h b/src/mame/includes/brkthru.h index 143da7110e0..73e554f1580 100644 --- a/src/mame/includes/brkthru.h +++ b/src/mame/includes/brkthru.h @@ -27,8 +27,8 @@ public: //UINT8 *m_brkthru_nmi_enable; /* needs to be tracked down */ /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; UINT8 m_nmi_mask; DECLARE_WRITE8_MEMBER(brkthru_1803_w); diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index 1e58cd8eca0..87131c57755 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -52,8 +52,8 @@ public: int m_protection_ret; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(audio_nmi_enable_w); DECLARE_WRITE8_MEMBER(lnc_w); diff --git a/src/mame/includes/bublbobl.h b/src/mame/includes/bublbobl.h index 93ad2d067ad..a7a78d0813e 100644 --- a/src/mame/includes/bublbobl.h +++ b/src/mame/includes/bublbobl.h @@ -52,9 +52,9 @@ public: int m_ic43_b; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_mcu; - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_slave; DECLARE_WRITE8_MEMBER(bublbobl_bankswitch_w); DECLARE_WRITE8_MEMBER(tokio_bankswitch_w); diff --git a/src/mame/includes/buggychl.h b/src/mame/includes/buggychl.h index fd4ab79e990..e4a76c393f7 100644 --- a/src/mame/includes/buggychl.h +++ b/src/mame/includes/buggychl.h @@ -36,7 +36,7 @@ public: int m_pending_nmi; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(bankswitch_w); DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(nmi_disable_w); diff --git a/src/mame/includes/bwing.h b/src/mame/includes/bwing.h index 22e0988d322..4e1815d35f3 100644 --- a/src/mame/includes/bwing.h +++ b/src/mame/includes/bwing.h @@ -48,9 +48,9 @@ public: UINT8 *m_bwp123_membase[3]; /* device */ - device_t *m_maincpu; - device_t *m_subcpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(bwp12_sharedram1_w); DECLARE_WRITE8_MEMBER(bwp3_u8F_w); DECLARE_WRITE8_MEMBER(bwp3_nmimask_w); diff --git a/src/mame/includes/capbowl.h b/src/mame/includes/capbowl.h index 7ec157a1595..0d3d507876d 100644 --- a/src/mame/includes/capbowl.h +++ b/src/mame/includes/capbowl.h @@ -25,8 +25,8 @@ public: UINT8 m_last_trackball_val[2]; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(capbowl_rom_select_w); DECLARE_READ8_MEMBER(track_0_r); DECLARE_READ8_MEMBER(track_1_r); diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h index 16a2de2fb55..5724622c460 100644 --- a/src/mame/includes/cave.h +++ b/src/mame/includes/cave.h @@ -110,8 +110,8 @@ public: int m_hopper; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; required_device m_int_timer; int m_rasflag; int m_old_rasflag; diff --git a/src/mame/includes/cbuster.h b/src/mame/includes/cbuster.h index cf277eee2f7..6159c82d45e 100644 --- a/src/mame/includes/cbuster.h +++ b/src/mame/includes/cbuster.h @@ -30,8 +30,8 @@ public: int m_pri; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_deco_tilegen1; device_t *m_deco_tilegen2; DECLARE_WRITE16_MEMBER(twocrude_control_w); diff --git a/src/mame/includes/champbas.h b/src/mame/includes/champbas.h index 1e3e646a4e8..8e392f5dee6 100644 --- a/src/mame/includes/champbas.h +++ b/src/mame/includes/champbas.h @@ -31,8 +31,8 @@ public: int m_watchdog_count; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_mcu; UINT8 m_irq_mask; diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h index 1ce8c404e30..0491a4010c1 100644 --- a/src/mame/includes/cheekyms.h +++ b/src/mame/includes/cheekyms.h @@ -24,7 +24,7 @@ public: bitmap_ind16 *m_bitmap_buffer; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; dac_device *m_dac; UINT8 m_irq_mask; diff --git a/src/mame/includes/chqflag.h b/src/mame/includes/chqflag.h index b706f2d0d76..bd1b8bd6b2f 100644 --- a/src/mame/includes/chqflag.h +++ b/src/mame/includes/chqflag.h @@ -26,8 +26,8 @@ public: int m_wheel; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232_1; device_t *m_k007232_2; device_t *m_k051960; diff --git a/src/mame/includes/circus.h b/src/mame/includes/circus.h index a8656078967..9f9b1a6f92a 100644 --- a/src/mame/includes/circus.h +++ b/src/mame/includes/circus.h @@ -17,7 +17,7 @@ public: int m_clown_z; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; samples_device *m_samples; device_t *m_discrete; diff --git a/src/mame/includes/citycon.h b/src/mame/includes/citycon.h index 6dc5e0cd774..0f6cfc016bb 100644 --- a/src/mame/includes/citycon.h +++ b/src/mame/includes/citycon.h @@ -27,7 +27,7 @@ public: int m_bg_image; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_READ8_MEMBER(citycon_in_r); DECLARE_READ8_MEMBER(citycon_irq_ack_r); DECLARE_WRITE8_MEMBER(citycon_videoram_w); diff --git a/src/mame/includes/commando.h b/src/mame/includes/commando.h index feae3d745c4..358174b5bb9 100644 --- a/src/mame/includes/commando.h +++ b/src/mame/includes/commando.h @@ -31,7 +31,7 @@ public: UINT8 m_scroll_y[2]; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(commando_videoram_w); DECLARE_WRITE8_MEMBER(commando_colorram_w); DECLARE_WRITE8_MEMBER(commando_videoram2_w); diff --git a/src/mame/includes/contra.h b/src/mame/includes/contra.h index 00cbbcd1830..d4da776e63a 100644 --- a/src/mame/includes/contra.h +++ b/src/mame/includes/contra.h @@ -39,7 +39,7 @@ public: rectangle m_tx_clip; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k007121_1; device_t *m_k007121_2; DECLARE_WRITE8_MEMBER(contra_bankswitch_w); diff --git a/src/mame/includes/coolpool.h b/src/mame/includes/coolpool.h index b973181c515..a356df158ef 100644 --- a/src/mame/includes/coolpool.h +++ b/src/mame/includes/coolpool.h @@ -26,7 +26,7 @@ public: UINT16 m_result; UINT16 m_lastresult; - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_dsp; UINT16 m_nvram_write_seq[NVRAM_UNLOCK_SEQ_LEN]; UINT8 m_nvram_write_enable; diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h index 7f6f6d20add..e21c8f2ad5e 100644 --- a/src/mame/includes/cps1.h +++ b/src/mame/includes/cps1.h @@ -141,8 +141,8 @@ public: int m_cps_version; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; msm5205_device *m_msm_1; // fcrash msm5205_device *m_msm_2; // fcrash DECLARE_READ16_MEMBER(cps1_hack_dsw_r); diff --git a/src/mame/includes/crgolf.h b/src/mame/includes/crgolf.h index 4f4ff6bd224..adfc944cc72 100644 --- a/src/mame/includes/crgolf.h +++ b/src/mame/includes/crgolf.h @@ -35,8 +35,8 @@ public: UINT8 m_sample_count; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(rom_bank_select_w); DECLARE_READ8_MEMBER(switch_input_r); DECLARE_READ8_MEMBER(analog_input_r); diff --git a/src/mame/includes/crimfght.h b/src/mame/includes/crimfght.h index 4776dad294d..473163e285d 100644 --- a/src/mame/includes/crimfght.h +++ b/src/mame/includes/crimfght.h @@ -18,8 +18,8 @@ public: int m_sprite_colorbase; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/crospang.h b/src/mame/includes/crospang.h index bdf5e4655ae..8976830e285 100644 --- a/src/mame/includes/crospang.h +++ b/src/mame/includes/crospang.h @@ -25,7 +25,7 @@ public: int m_bestri_tilebank; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(crospang_soundlatch_w); DECLARE_WRITE16_MEMBER(bestri_tilebank_w); DECLARE_WRITE16_MEMBER(bestri_bg_scrolly_w); diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h index a2c37604a39..690ec5bd984 100644 --- a/src/mame/includes/cvs.h +++ b/src/mame/includes/cvs.h @@ -55,8 +55,8 @@ public: UINT16 m_speech_rom_bit_address; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_speech; dac_device *m_dac3; device_t *m_tms; diff --git a/src/mame/includes/darius.h b/src/mame/includes/darius.h index ac8ec866773..471721c7048 100644 --- a/src/mame/includes/darius.h +++ b/src/mame/includes/darius.h @@ -33,8 +33,8 @@ public: UINT8 m_pan[DARIUS_PAN_MAX]; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_cpub; device_t *m_adpcm; device_t *m_tc0140syt; diff --git a/src/mame/includes/dbz.h b/src/mame/includes/dbz.h index 447d9a66f6a..bc0766d9451 100644 --- a/src/mame/includes/dbz.h +++ b/src/mame/includes/dbz.h @@ -28,8 +28,8 @@ public: int m_control; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k053246; device_t *m_k053251; device_t *m_k056832; diff --git a/src/mame/includes/dcheese.h b/src/mame/includes/dcheese.h index 3bd9e12285a..02673bad8e4 100644 --- a/src/mame/includes/dcheese.h +++ b/src/mame/includes/dcheese.h @@ -27,8 +27,8 @@ public: UINT8 m_sound_msb_latch; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_bsmt; DECLARE_WRITE16_MEMBER(eeprom_control_w); DECLARE_WRITE16_MEMBER(sound_command_w); diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index 9dcf7df304c..e6b0b02a752 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -59,7 +59,7 @@ public: #endif /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_snd_cpu; device_t *m_sub_cpu; device_t *m_adpcm_1; diff --git a/src/mame/includes/ddragon3.h b/src/mame/includes/ddragon3.h index dba603e5321..01df3309691 100644 --- a/src/mame/includes/ddragon3.h +++ b/src/mame/includes/ddragon3.h @@ -34,8 +34,8 @@ public: UINT16 m_io_reg[8]; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(ddragon3_io_w); DECLARE_WRITE16_MEMBER(ddragon3_scroll_w); DECLARE_READ16_MEMBER(ddragon3_scroll_r); diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h index ac943093b74..32cdb205350 100644 --- a/src/mame/includes/dec8.h +++ b/src/mame/includes/dec8.h @@ -10,9 +10,9 @@ public: m_bg_data(*this, "bg_data"){ } /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; + cpu_device *m_audiocpu; device_t *m_mcu; required_device m_spriteram; diff --git a/src/mame/includes/dietgo.h b/src/mame/includes/dietgo.h index 2a42bbb4f03..9800bc9a5b7 100644 --- a/src/mame/includes/dietgo.h +++ b/src/mame/includes/dietgo.h @@ -20,8 +20,8 @@ public: // UINT16 * m_paletteram; // currently this uses generic palette handling (in decocomn.c) /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_deco_tilegen1; DECLARE_DRIVER_INIT(dietgo); }; diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h index ec717b9b7d0..022992fd612 100644 --- a/src/mame/includes/djboy.h +++ b/src/mame/includes/djboy.h @@ -39,7 +39,7 @@ public: UINT8 m_beast_p3; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_cpu1; device_t *m_cpu2; device_t *m_pandora; diff --git a/src/mame/includes/dogfgt.h b/src/mame/includes/dogfgt.h index e36aab993ed..4cde28bf9c0 100644 --- a/src/mame/includes/dogfgt.h +++ b/src/mame/includes/dogfgt.h @@ -33,7 +33,7 @@ public: int m_last_snd_ctrl; /* devices */ - device_t *m_subcpu; + cpu_device *m_subcpu; DECLARE_READ8_MEMBER(sharedram_r); DECLARE_WRITE8_MEMBER(sharedram_w); DECLARE_WRITE8_MEMBER(subirqtrigger_w); diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h index 79cdde8f284..658a94f1c0a 100644 --- a/src/mame/includes/dynax.h +++ b/src/mame/includes/dynax.h @@ -154,8 +154,8 @@ public: /* devices */ - device_t *m_maincpu; - device_t *m_soundcpu; + cpu_device *m_maincpu; + cpu_device *m_soundcpu; device_t *m_rtc; device_t *m_ymsnd; okim6295_device *m_oki; diff --git a/src/mame/includes/espial.h b/src/mame/includes/espial.h index 39b3a0350a6..2ffc5c44210 100644 --- a/src/mame/includes/espial.h +++ b/src/mame/includes/espial.h @@ -35,8 +35,8 @@ public: UINT8 m_sound_nmi_enabled; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(espial_master_interrupt_mask_w); DECLARE_WRITE8_MEMBER(espial_master_soundlatch_w); DECLARE_WRITE8_MEMBER(espial_sound_nmi_mask_w); diff --git a/src/mame/includes/exerion.h b/src/mame/includes/exerion.h index bd477a0af40..8a33d9d9550 100644 --- a/src/mame/includes/exerion.h +++ b/src/mame/includes/exerion.h @@ -46,7 +46,7 @@ public: UINT8 m_portb; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_READ8_MEMBER(exerion_protection_r); DECLARE_WRITE8_MEMBER(exerion_videoreg_w); DECLARE_WRITE8_MEMBER(exerion_video_latch_w); diff --git a/src/mame/includes/exprraid.h b/src/mame/includes/exprraid.h index 4a7586e5678..e63afc1098b 100644 --- a/src/mame/includes/exprraid.h +++ b/src/mame/includes/exprraid.h @@ -30,7 +30,7 @@ public: //int m_coin; // used in the commented out INTERRUPT_GEN - can this be removed? /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_slave; DECLARE_READ8_MEMBER(exprraid_protection_r); DECLARE_WRITE8_MEMBER(sound_cpu_command_w); diff --git a/src/mame/includes/f1gp.h b/src/mame/includes/f1gp.h index 3feb3e3f32c..e08d456b982 100644 --- a/src/mame/includes/f1gp.h +++ b/src/mame/includes/f1gp.h @@ -45,7 +45,7 @@ public: int m_pending_command; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k053936; DECLARE_READ16_MEMBER(sharedram_r); DECLARE_WRITE16_MEMBER(sharedram_w); diff --git a/src/mame/includes/fcombat.h b/src/mame/includes/fcombat.h index cb89c11962f..d991618f230 100644 --- a/src/mame/includes/fcombat.h +++ b/src/mame/includes/fcombat.h @@ -48,7 +48,7 @@ public: int m_ty; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_READ8_MEMBER(fcombat_protection_r); DECLARE_READ8_MEMBER(fcombat_port01_r); DECLARE_WRITE8_MEMBER(e900_w); diff --git a/src/mame/includes/fgoal.h b/src/mame/includes/fgoal.h index e463041ffe9..82152707a46 100644 --- a/src/mame/includes/fgoal.h +++ b/src/mame/includes/fgoal.h @@ -24,7 +24,7 @@ public: int m_prev_coin; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_mb14241; DECLARE_READ8_MEMBER(fgoal_analog_r); DECLARE_READ8_MEMBER(fgoal_nmi_reset_r); diff --git a/src/mame/includes/firetrap.h b/src/mame/includes/firetrap.h index 170f9f2834b..4ffd4ef1f7e 100644 --- a/src/mame/includes/firetrap.h +++ b/src/mame/includes/firetrap.h @@ -40,8 +40,8 @@ public: int m_coin_command_pending; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_msm; DECLARE_WRITE8_MEMBER(firetrap_nmi_disable_w); DECLARE_WRITE8_MEMBER(firetrap_bankselect_w); diff --git a/src/mame/includes/flkatck.h b/src/mame/includes/flkatck.h index c4d1b36a7de..aa04064f1a6 100644 --- a/src/mame/includes/flkatck.h +++ b/src/mame/includes/flkatck.h @@ -24,7 +24,7 @@ public: int m_multiply_reg[2]; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k007121; DECLARE_WRITE8_MEMBER(flkatck_bankswitch_w); DECLARE_READ8_MEMBER(flkatck_ls138_r); diff --git a/src/mame/includes/flstory.h b/src/mame/includes/flstory.h index acc1e5f0ae9..74872280f98 100644 --- a/src/mame/includes/flstory.h +++ b/src/mame/includes/flstory.h @@ -52,8 +52,8 @@ public: int m_mcu_select; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_mcu; /* mcu */ diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h index e5434ecddbc..89fbb387a7e 100644 --- a/src/mame/includes/fromanc2.h +++ b/src/mame/includes/fromanc2.h @@ -25,8 +25,8 @@ public: UINT8 m_datalatch_2l; /* devices */ - device_t *m_audiocpu; - device_t *m_subcpu; + cpu_device *m_audiocpu; + cpu_device *m_subcpu; device_t *m_eeprom; device_t *m_left_screen; device_t *m_right_screen; diff --git a/src/mame/includes/fromance.h b/src/mame/includes/fromance.h index 979bd51a8d9..5aa61e0b1de 100644 --- a/src/mame/includes/fromance.h +++ b/src/mame/includes/fromance.h @@ -50,7 +50,7 @@ public: UINT8 m_sound_command; /* devices */ - device_t *m_subcpu; + cpu_device *m_subcpu; DECLARE_READ8_MEMBER(fromance_commanddata_r); DECLARE_WRITE8_MEMBER(fromance_commanddata_w); DECLARE_READ8_MEMBER(fromance_busycheck_main_r); diff --git a/src/mame/includes/funkyjet.h b/src/mame/includes/funkyjet.h index 4adf82abd66..b0ad7b11a2f 100644 --- a/src/mame/includes/funkyjet.h +++ b/src/mame/includes/funkyjet.h @@ -20,8 +20,8 @@ public: // UINT16 * paletteram; // currently this uses generic palette handling (in decocomn.c) /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_deco_tilegen1; DECLARE_DRIVER_INIT(funkyjet); }; diff --git a/src/mame/includes/funybubl.h b/src/mame/includes/funybubl.h index 9739cf1dbf9..fd248247b36 100644 --- a/src/mame/includes/funybubl.h +++ b/src/mame/includes/funybubl.h @@ -11,7 +11,7 @@ public: required_shared_ptr m_paletteram; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; /* memory */ UINT8 m_banked_vram[0x2000]; diff --git a/src/mame/includes/fuukifg2.h b/src/mame/includes/fuukifg2.h index dadff92fa29..504c5054fc8 100644 --- a/src/mame/includes/fuukifg2.h +++ b/src/mame/includes/fuukifg2.h @@ -26,8 +26,8 @@ public: emu_timer *m_raster_interrupt_timer; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(fuuki16_vregs_w); DECLARE_WRITE16_MEMBER(fuuki16_sound_command_w); DECLARE_WRITE8_MEMBER(fuuki16_sound_rombank_w); diff --git a/src/mame/includes/fuukifg3.h b/src/mame/includes/fuukifg3.h index 28759d52574..15f522c9441 100644 --- a/src/mame/includes/fuukifg3.h +++ b/src/mame/includes/fuukifg3.h @@ -40,8 +40,8 @@ public: UINT8 m_shared_ram[16]; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE32_MEMBER(paletteram32_xRRRRRGGGGGBBBBB_dword_w); DECLARE_READ32_MEMBER(snd_020_r); DECLARE_WRITE32_MEMBER(snd_020_w); diff --git a/src/mame/includes/gaelco.h b/src/mame/includes/gaelco.h index 1dc9f97e6c5..cbf51e671e5 100644 --- a/src/mame/includes/gaelco.h +++ b/src/mame/includes/gaelco.h @@ -25,7 +25,7 @@ public: tilemap_t *m_tilemap[2]; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(bigkarnk_sound_command_w); DECLARE_WRITE16_MEMBER(bigkarnk_coin_w); DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w); diff --git a/src/mame/includes/gaiden.h b/src/mame/includes/gaiden.h index e1a8aaa6e04..25947a92d01 100644 --- a/src/mame/includes/gaiden.h +++ b/src/mame/includes/gaiden.h @@ -45,7 +45,7 @@ public: const int *m_raiga_jumppoints; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(gaiden_sound_command_w); DECLARE_WRITE16_MEMBER(drgnbowl_sound_command_w); DECLARE_WRITE16_MEMBER(wildfang_protection_w); diff --git a/src/mame/includes/galspnbl.h b/src/mame/includes/galspnbl.h index a92c18b336f..35e7e9f2373 100644 --- a/src/mame/includes/galspnbl.h +++ b/src/mame/includes/galspnbl.h @@ -25,7 +25,7 @@ public: // UINT16 * paletteram; // currently this uses generic palette handling /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(soundcommand_w); }; diff --git a/src/mame/includes/gameplan.h b/src/mame/includes/gameplan.h index a59a473ab8d..6fd6286565c 100644 --- a/src/mame/includes/gameplan.h +++ b/src/mame/includes/gameplan.h @@ -45,8 +45,8 @@ public: emu_timer *m_via_0_ca1_timer; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_riot; required_device m_via_0; required_device m_via_1; diff --git a/src/mame/includes/gbusters.h b/src/mame/includes/gbusters.h index a3242d74b99..f8563064da5 100644 --- a/src/mame/includes/gbusters.h +++ b/src/mame/includes/gbusters.h @@ -23,8 +23,8 @@ public: int m_priority; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/gijoe.h b/src/mame/includes/gijoe.h index 641f14abea8..1c6f17b6c68 100644 --- a/src/mame/includes/gijoe.h +++ b/src/mame/includes/gijoe.h @@ -30,8 +30,8 @@ public: emu_timer *m_dmadelay_timer; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k054539; device_t *m_k056832; device_t *m_k053246; diff --git a/src/mame/includes/ginganin.h b/src/mame/includes/ginganin.h index cd25bbcfb7b..904757d9d68 100644 --- a/src/mame/includes/ginganin.h +++ b/src/mame/includes/ginganin.h @@ -33,7 +33,7 @@ public: #endif /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(ginganin_fgram16_w); DECLARE_WRITE16_MEMBER(ginganin_txtram16_w); DECLARE_WRITE16_MEMBER(ginganin_vregs16_w); diff --git a/src/mame/includes/goal92.h b/src/mame/includes/goal92.h index 497e53ba81d..bbf029752e7 100644 --- a/src/mame/includes/goal92.h +++ b/src/mame/includes/goal92.h @@ -35,7 +35,7 @@ public: int m_adpcm_toggle; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(goal92_sound_command_w); DECLARE_READ16_MEMBER(goal92_inputs_r); DECLARE_WRITE8_MEMBER(adpcm_data_w); diff --git a/src/mame/includes/gotcha.h b/src/mame/includes/gotcha.h index a18a56b2928..b4f18145cde 100644 --- a/src/mame/includes/gotcha.h +++ b/src/mame/includes/gotcha.h @@ -27,7 +27,7 @@ public: UINT16 m_scroll[4]; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(gotcha_lamps_w); DECLARE_WRITE16_MEMBER(gotcha_fgvideoram_w); DECLARE_WRITE16_MEMBER(gotcha_bgvideoram_w); diff --git a/src/mame/includes/gradius3.h b/src/mame/includes/gradius3.h index a9bcffd3602..e68c3019327 100644 --- a/src/mame/includes/gradius3.h +++ b/src/mame/includes/gradius3.h @@ -25,9 +25,9 @@ public: int m_irqBmask; /* 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; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/hcastle.h b/src/mame/includes/hcastle.h index 3544a34da42..9053457f416 100644 --- a/src/mame/includes/hcastle.h +++ b/src/mame/includes/hcastle.h @@ -34,7 +34,7 @@ public: int m_gfx_bank; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k007121_1; device_t *m_k007121_2; diff --git a/src/mame/includes/himesiki.h b/src/mame/includes/himesiki.h index 78bc85656bb..bc9ce4b0442 100644 --- a/src/mame/includes/himesiki.h +++ b/src/mame/includes/himesiki.h @@ -23,7 +23,7 @@ public: int m_flipscreen; /* devices */ - device_t *m_subcpu; + cpu_device *m_subcpu; DECLARE_WRITE8_MEMBER(himesiki_rombank_w); DECLARE_WRITE8_MEMBER(himesiki_sound_w); DECLARE_WRITE8_MEMBER(himesiki_bg_ram_w); diff --git a/src/mame/includes/homedata.h b/src/mame/includes/homedata.h index 2860aedce15..dc5c158a136 100644 --- a/src/mame/includes/homedata.h +++ b/src/mame/includes/homedata.h @@ -36,8 +36,8 @@ public: int m_from_cpu; /* device */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; dac_device *m_dac; device_t *m_ym; sn76489a_new_device *m_sn; diff --git a/src/mame/includes/hyprduel.h b/src/mame/includes/hyprduel.h index cd3c82b42f1..4c2accb1d14 100644 --- a/src/mame/includes/hyprduel.h +++ b/src/mame/includes/hyprduel.h @@ -59,8 +59,8 @@ public: int m_int_num; /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; DECLARE_READ16_MEMBER(hyprduel_irq_cause_r); DECLARE_WRITE16_MEMBER(hyprduel_irq_cause_w); DECLARE_WRITE16_MEMBER(hyprduel_subcpu_control_w); diff --git a/src/mame/includes/inufuku.h b/src/mame/includes/inufuku.h index b8acfceb1fd..601372b70ca 100644 --- a/src/mame/includes/inufuku.h +++ b/src/mame/includes/inufuku.h @@ -33,7 +33,7 @@ public: UINT16 m_pending_command; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(inufuku_soundcommand_w); DECLARE_WRITE8_MEMBER(pending_command_clear_w); DECLARE_WRITE8_MEMBER(inufuku_soundrombank_w); diff --git a/src/mame/includes/ironhors.h b/src/mame/includes/ironhors.h index a4d6928f0ea..b6a651fe8a0 100644 --- a/src/mame/includes/ironhors.h +++ b/src/mame/includes/ironhors.h @@ -31,8 +31,8 @@ public: int m_spriterambank; /* devices */ - device_t *m_maincpu; - device_t *m_soundcpu; + cpu_device *m_maincpu; + cpu_device *m_soundcpu; DECLARE_WRITE8_MEMBER(ironhors_sh_irqtrigger_w); DECLARE_WRITE8_MEMBER(ironhors_videoram_w); DECLARE_WRITE8_MEMBER(ironhors_colorram_w); diff --git a/src/mame/includes/jackal.h b/src/mame/includes/jackal.h index 6354464e9c5..9a4f3d981bb 100644 --- a/src/mame/includes/jackal.h +++ b/src/mame/includes/jackal.h @@ -26,8 +26,8 @@ public: UINT8 *m_spritebank; /* devices */ - device_t *m_mastercpu; - device_t *m_slavecpu; + cpu_device *m_mastercpu; + cpu_device *m_slavecpu; DECLARE_READ8_MEMBER(topgunbl_rotary_r); DECLARE_WRITE8_MEMBER(jackal_flipscreen_w); DECLARE_READ8_MEMBER(jackal_zram_r); diff --git a/src/mame/includes/karnov.h b/src/mame/includes/karnov.h index 66594f1b66f..49484e605bb 100644 --- a/src/mame/includes/karnov.h +++ b/src/mame/includes/karnov.h @@ -39,8 +39,8 @@ public: int m_latch; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(karnov_control_w); DECLARE_READ16_MEMBER(karnov_control_r); DECLARE_WRITE16_MEMBER(karnov_videoram_w); diff --git a/src/mame/includes/kchamp.h b/src/mame/includes/kchamp.h index af5a771ade3..5fffb7fdbbb 100644 --- a/src/mame/includes/kchamp.h +++ b/src/mame/includes/kchamp.h @@ -29,7 +29,7 @@ public: int m_counter; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(control_w); DECLARE_WRITE8_MEMBER(sound_reset_w); DECLARE_WRITE8_MEMBER(sound_command_w); diff --git a/src/mame/includes/kncljoe.h b/src/mame/includes/kncljoe.h index 82d2e28b116..b49acd6b411 100644 --- a/src/mame/includes/kncljoe.h +++ b/src/mame/includes/kncljoe.h @@ -29,7 +29,7 @@ public: UINT8 m_port2; /* devices */ - device_t *m_soundcpu; + cpu_device *m_soundcpu; DECLARE_WRITE8_MEMBER(sound_cmd_w); DECLARE_WRITE8_MEMBER(sound_irq_ack_w); DECLARE_WRITE8_MEMBER(kncljoe_videoram_w); diff --git a/src/mame/includes/kopunch.h b/src/mame/includes/kopunch.h index 7c7009917c3..6f8a8cfa9f8 100644 --- a/src/mame/includes/kopunch.h +++ b/src/mame/includes/kopunch.h @@ -25,7 +25,7 @@ public: int m_gfxbank; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_READ8_MEMBER(kopunch_in_r); DECLARE_WRITE8_MEMBER(kopunch_lamp_w); DECLARE_WRITE8_MEMBER(kopunch_coin_w); diff --git a/src/mame/includes/kyugo.h b/src/mame/includes/kyugo.h index f39d8092a06..bd24ae87004 100644 --- a/src/mame/includes/kyugo.h +++ b/src/mame/includes/kyugo.h @@ -36,8 +36,8 @@ public: const UINT8 *m_color_codes; /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; UINT8 m_nmi_mask; DECLARE_WRITE8_MEMBER(kyugo_nmi_mask_w); diff --git a/src/mame/includes/ladybug.h b/src/mame/includes/ladybug.h index b4f816d7aff..b694c06e8fb 100644 --- a/src/mame/includes/ladybug.h +++ b/src/mame/includes/ladybug.h @@ -43,7 +43,7 @@ public: UINT8 m_sraider_0x38; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_READ8_MEMBER(sraider_sound_low_r); DECLARE_READ8_MEMBER(sraider_sound_high_r); DECLARE_WRITE8_MEMBER(sraider_sound_low_w); diff --git a/src/mame/includes/ladyfrog.h b/src/mame/includes/ladyfrog.h index 9f2f28316e0..35c3515e307 100644 --- a/src/mame/includes/ladyfrog.h +++ b/src/mame/includes/ladyfrog.h @@ -32,7 +32,7 @@ public: UINT8 m_snd_data; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_READ8_MEMBER(from_snd_r); DECLARE_WRITE8_MEMBER(to_main_w); DECLARE_WRITE8_MEMBER(sound_cpu_reset_w); diff --git a/src/mame/includes/lasso.h b/src/mame/includes/lasso.h index 004afc6a215..d6540610f5d 100644 --- a/src/mame/includes/lasso.h +++ b/src/mame/includes/lasso.h @@ -39,8 +39,8 @@ public: UINT8 m_track_enable; /* used by wwjgtin */ /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; optional_device m_sn_1; optional_device m_sn_2; DECLARE_WRITE8_MEMBER(sound_command_w); diff --git a/src/mame/includes/lemmings.h b/src/mame/includes/lemmings.h index f6d408a794e..29fdc2a51a1 100644 --- a/src/mame/includes/lemmings.h +++ b/src/mame/includes/lemmings.h @@ -21,7 +21,7 @@ public: UINT16 m_sprite_triple_buffer_1[0x800]; UINT8 m_vram_buffer[2048 * 64]; // 64 bytes per VRAM character /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; required_device m_spriteram; required_device m_spriteram2; /* memory pointers */ diff --git a/src/mame/includes/lethal.h b/src/mame/includes/lethal.h index 75ad7747bd3..ed0a027c6b3 100644 --- a/src/mame/includes/lethal.h +++ b/src/mame/includes/lethal.h @@ -18,8 +18,8 @@ public: UINT8 m_cur_control2; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k054539; device_t *m_k056832; device_t *m_k053244; diff --git a/src/mame/includes/liberate.h b/src/mame/includes/liberate.h index e155f373d95..d683e133184 100644 --- a/src/mame/includes/liberate.h +++ b/src/mame/includes/liberate.h @@ -29,8 +29,8 @@ public: tilemap_t *m_back_tilemap; tilemap_t *m_fix_tilemap; - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_READ8_MEMBER(deco16_bank_r); DECLARE_READ8_MEMBER(deco16_io_r); DECLARE_WRITE8_MEMBER(deco16_bank_w); diff --git a/src/mame/includes/lkage.h b/src/mame/includes/lkage.h index 96d43ad305a..2fd0568233c 100644 --- a/src/mame/includes/lkage.h +++ b/src/mame/includes/lkage.h @@ -49,8 +49,8 @@ public: int m_mcu_ready; /* cpu data/mcu ready status */ /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(lkage_sound_command_w); DECLARE_WRITE8_MEMBER(lkage_sh_nmi_disable_w); diff --git a/src/mame/includes/lockon.h b/src/mame/includes/lockon.h index 067565cf70f..372671a3b08 100644 --- a/src/mame/includes/lockon.h +++ b/src/mame/includes/lockon.h @@ -64,8 +64,8 @@ public: UINT32 m_main_inten; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_ground; device_t *m_object; device_t *m_f2203_1l; diff --git a/src/mame/includes/lsasquad.h b/src/mame/includes/lsasquad.h index 0390851892f..67aae1834ae 100644 --- a/src/mame/includes/lsasquad.h +++ b/src/mame/includes/lsasquad.h @@ -33,8 +33,8 @@ public: UINT8 m_ddr_b; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(lsasquad_bankswitch_w); DECLARE_WRITE8_MEMBER(lsasquad_sh_nmi_disable_w); diff --git a/src/mame/includes/m10.h b/src/mame/includes/m10.h index 4cd142b00cd..740c80bbcba 100644 --- a/src/mame/includes/m10.h +++ b/src/mame/includes/m10.h @@ -61,7 +61,7 @@ public: int m_last; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_ic8j1; device_t *m_ic8j2; samples_device *m_samples; diff --git a/src/mame/includes/macrossp.h b/src/mame/includes/macrossp.h index 9186914aca9..4dcca1896a7 100644 --- a/src/mame/includes/macrossp.h +++ b/src/mame/includes/macrossp.h @@ -49,8 +49,8 @@ public: INT32 m_old_fade; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE32_MEMBER(paletteram32_macrossp_w); DECLARE_READ32_MEMBER(macrossp_soundstatus_r); DECLARE_WRITE32_MEMBER(macrossp_soundcmd_w); diff --git a/src/mame/includes/madmotor.h b/src/mame/includes/madmotor.h index daf02067728..beb525c0258 100644 --- a/src/mame/includes/madmotor.h +++ b/src/mame/includes/madmotor.h @@ -19,8 +19,8 @@ public: int m_flipscreen; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(madmotor_sound_w); DECLARE_DRIVER_INIT(madmotor); }; diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h index da1b36a6354..e2879d4a9f5 100644 --- a/src/mame/includes/mainevt.h +++ b/src/mame/includes/mainevt.h @@ -22,8 +22,8 @@ public: UINT8 m_sound_irq_mask; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_upd; device_t *m_k007232; device_t *m_k052109; diff --git a/src/mame/includes/marineb.h b/src/mame/includes/marineb.h index de6c78ba881..2842b7817ef 100644 --- a/src/mame/includes/marineb.h +++ b/src/mame/includes/marineb.h @@ -21,8 +21,8 @@ public: UINT8 m_marineb_active_low_flipscreen; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; UINT8 m_irq_mask; DECLARE_WRITE8_MEMBER(irq_mask_w); diff --git a/src/mame/includes/matmania.h b/src/mame/includes/matmania.h index 2697291e9d4..502a7cb131c 100644 --- a/src/mame/includes/matmania.h +++ b/src/mame/includes/matmania.h @@ -48,8 +48,8 @@ public: int m_main_sent; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(matmania_sh_command_w); DECLARE_WRITE8_MEMBER(maniach_sh_command_w); diff --git a/src/mame/includes/mcatadv.h b/src/mame/includes/mcatadv.h index 165c7193271..c65e3f503b6 100644 --- a/src/mame/includes/mcatadv.h +++ b/src/mame/includes/mcatadv.h @@ -29,8 +29,8 @@ public: int m_palette_bank2; /* devices */ - device_t *m_maincpu; - device_t *m_soundcpu; + cpu_device *m_maincpu; + cpu_device *m_soundcpu; DECLARE_WRITE16_MEMBER(mcat_soundlatch_w); DECLARE_WRITE16_MEMBER(mcat_coin_w); DECLARE_READ16_MEMBER(mcat_wd_r); diff --git a/src/mame/includes/mermaid.h b/src/mame/includes/mermaid.h index c1fd9339256..9a0bb44d8f5 100644 --- a/src/mame/includes/mermaid.h +++ b/src/mame/includes/mermaid.h @@ -49,7 +49,7 @@ public: UINT8 m_adpcm_play_reg; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_ay1; device_t *m_ay2; diff --git a/src/mame/includes/metlclsh.h b/src/mame/includes/metlclsh.h index 3372660a132..c1a7126404c 100644 --- a/src/mame/includes/metlclsh.h +++ b/src/mame/includes/metlclsh.h @@ -30,8 +30,8 @@ public: UINT8 m_gfxbank; /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; DECLARE_WRITE8_MEMBER(metlclsh_cause_irq); DECLARE_WRITE8_MEMBER(metlclsh_ack_nmi); DECLARE_WRITE8_MEMBER(metlclsh_cause_nmi2); diff --git a/src/mame/includes/mexico86.h b/src/mame/includes/mexico86.h index b432120f7cf..be84b81c66a 100644 --- a/src/mame/includes/mexico86.h +++ b/src/mame/includes/mexico86.h @@ -32,9 +32,9 @@ public: int m_coin_last; /* 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; device_t *m_mcu; /* queue */ diff --git a/src/mame/includes/moo.h b/src/mame/includes/moo.h index d4a496c372c..6f4d68f1d79 100644 --- a/src/mame/includes/moo.h +++ b/src/mame/includes/moo.h @@ -29,8 +29,8 @@ public: UINT16 m_cur_control2; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k054539; device_t *m_k053246; device_t *m_k053251; diff --git a/src/mame/includes/mouser.h b/src/mame/includes/mouser.h index 448174aff0d..b0c532d6614 100644 --- a/src/mame/includes/mouser.h +++ b/src/mame/includes/mouser.h @@ -23,8 +23,8 @@ public: UINT8 m_nmi_enable; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(mouser_nmi_enable_w); DECLARE_WRITE8_MEMBER(mouser_sound_interrupt_w); DECLARE_READ8_MEMBER(mouser_sound_byte_r); diff --git a/src/mame/includes/mrflea.h b/src/mame/includes/mrflea.h index c55579c7e80..1994ab4ffff 100644 --- a/src/mame/includes/mrflea.h +++ b/src/mame/includes/mrflea.h @@ -27,8 +27,8 @@ public: int m_select1; /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; DECLARE_WRITE8_MEMBER(mrflea_main_w); DECLARE_WRITE8_MEMBER(mrflea_io_w); DECLARE_READ8_MEMBER(mrflea_main_r); diff --git a/src/mame/includes/msisaac.h b/src/mame/includes/msisaac.h index b3bb8eb2860..256b3236203 100644 --- a/src/mame/includes/msisaac.h +++ b/src/mame/includes/msisaac.h @@ -42,7 +42,7 @@ public: UINT8 m_snd_ctrl3; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(nmi_disable_w); DECLARE_WRITE8_MEMBER(nmi_enable_w); diff --git a/src/mame/includes/mugsmash.h b/src/mame/includes/mugsmash.h index 64083dfb449..2658ac5eadc 100644 --- a/src/mame/includes/mugsmash.h +++ b/src/mame/includes/mugsmash.h @@ -19,8 +19,8 @@ public: tilemap_t *m_tilemap1; tilemap_t *m_tilemap2; - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(mugsmash_reg2_w); DECLARE_READ16_MEMBER(mugsmash_input_ports_r); DECLARE_WRITE16_MEMBER(mugsmash_videoram1_w); diff --git a/src/mame/includes/munchmo.h b/src/mame/includes/munchmo.h index 389d867a1fd..1eece77c81d 100644 --- a/src/mame/includes/munchmo.h +++ b/src/mame/includes/munchmo.h @@ -33,8 +33,8 @@ public: int m_nmi_enable; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(mnchmobl_nmi_enable_w); DECLARE_WRITE8_MEMBER(mnchmobl_soundlatch_w); DECLARE_WRITE8_MEMBER(sound_nmi_ack_w); diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h index 8579d8c9a91..80f10bb7c59 100644 --- a/src/mame/includes/n8080.h +++ b/src/mame/includes/n8080.h @@ -39,7 +39,7 @@ public: int m_inte; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_WRITE8_MEMBER(n8080_shift_bits_w); DECLARE_WRITE8_MEMBER(n8080_shift_data_w); DECLARE_READ8_MEMBER(n8080_shift_r); diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h index 660a368dfe6..e6ab8b281a5 100644 --- a/src/mame/includes/neogeo.h +++ b/src/mame/includes/neogeo.h @@ -109,8 +109,8 @@ public: int m_fixed_layer_bank_type; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_upd4990a; DECLARE_WRITE8_MEMBER(audio_cpu_clear_nmi_w); DECLARE_WRITE16_MEMBER(io_control_w); diff --git a/src/mame/includes/ninjaw.h b/src/mame/includes/ninjaw.h index d4f3d1a8e93..423f1c2cd43 100644 --- a/src/mame/includes/ninjaw.h +++ b/src/mame/includes/ninjaw.h @@ -20,9 +20,9 @@ public: int m_pandata[4]; /* 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; device_t *m_tc0140syt; device_t *m_tc0100scn_1; device_t *m_tc0100scn_2; diff --git a/src/mame/includes/nitedrvr.h b/src/mame/includes/nitedrvr.h index 8640dfe539a..6a441a85511 100644 --- a/src/mame/includes/nitedrvr.h +++ b/src/mame/includes/nitedrvr.h @@ -42,7 +42,7 @@ public: INT32 m_last_steering_val; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_discrete; DECLARE_READ8_MEMBER(nitedrvr_steering_reset_r); DECLARE_WRITE8_MEMBER(nitedrvr_steering_reset_w); diff --git a/src/mame/includes/nycaptor.h b/src/mame/includes/nycaptor.h index c22ca7aa9e5..d92a9f937ce 100644 --- a/src/mame/includes/nycaptor.h +++ b/src/mame/includes/nycaptor.h @@ -46,9 +46,9 @@ public: int m_mask; /* 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; device_t *m_mcu; DECLARE_WRITE8_MEMBER(sub_cpu_halt_w); DECLARE_READ8_MEMBER(from_snd_r); diff --git a/src/mame/includes/ojankohs.h b/src/mame/includes/ojankohs.h index c579eb35ff4..fce069022db 100644 --- a/src/mame/includes/ojankohs.h +++ b/src/mame/includes/ojankohs.h @@ -35,7 +35,7 @@ public: int m_vclk_left; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_msm; DECLARE_WRITE8_MEMBER(ojankohs_rombank_w); DECLARE_WRITE8_MEMBER(ojankoy_rombank_w); diff --git a/src/mame/includes/oneshot.h b/src/mame/includes/oneshot.h index edf692f13fd..63f331d21a5 100644 --- a/src/mame/includes/oneshot.h +++ b/src/mame/includes/oneshot.h @@ -32,8 +32,8 @@ public: int m_p2_wobble; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_READ16_MEMBER(oneshot_in0_word_r); DECLARE_READ16_MEMBER(oneshot_gun_x_p1_r); DECLARE_READ16_MEMBER(oneshot_gun_y_p1_r); diff --git a/src/mame/includes/orbit.h b/src/mame/includes/orbit.h index d7a8c664035..ffd4abaede4 100644 --- a/src/mame/includes/orbit.h +++ b/src/mame/includes/orbit.h @@ -35,7 +35,7 @@ public: UINT8 m_misc_flags; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_discrete; DECLARE_WRITE8_MEMBER(orbit_misc_w); DECLARE_WRITE8_MEMBER(orbit_playfield_w); diff --git a/src/mame/includes/othunder.h b/src/mame/includes/othunder.h index ec3a09315dc..02f2eddba84 100644 --- a/src/mame/includes/othunder.h +++ b/src/mame/includes/othunder.h @@ -37,8 +37,8 @@ public: int m_pan[4]; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; eeprom_device *m_eeprom; device_t *m_tc0220ioc; device_t *m_tc0100scn; diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h index d8fb42209ee..9bd37de01c3 100644 --- a/src/mame/includes/overdriv.h +++ b/src/mame/includes/overdriv.h @@ -22,9 +22,9 @@ public: UINT16 m_cpuB_ctrl; /* devices */ - device_t *m_maincpu; - device_t *m_subcpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_subcpu; + cpu_device *m_audiocpu; device_t *m_k053260_1; device_t *m_k053260_2; device_t *m_k051316_1; diff --git a/src/mame/includes/parodius.h b/src/mame/includes/parodius.h index 74916e82ff2..040e7832648 100644 --- a/src/mame/includes/parodius.h +++ b/src/mame/includes/parodius.h @@ -25,8 +25,8 @@ public: //int m_nmi_enabled; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k053260; device_t *m_k052109; device_t *m_k053245; diff --git a/src/mame/includes/pbaction.h b/src/mame/includes/pbaction.h index 76ea12e4f4d..bbd513ac6bd 100644 --- a/src/mame/includes/pbaction.h +++ b/src/mame/includes/pbaction.h @@ -31,8 +31,8 @@ public: int m_scroll; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; UINT8 m_nmi_mask; DECLARE_WRITE8_MEMBER(pbaction_sh_command_w); diff --git a/src/mame/includes/pktgaldx.h b/src/mame/includes/pktgaldx.h index d6761948354..d4bb1bc3ba1 100644 --- a/src/mame/includes/pktgaldx.h +++ b/src/mame/includes/pktgaldx.h @@ -25,7 +25,7 @@ public: optional_shared_ptr m_pktgaldb_sprites; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_deco_tilegen1; DECLARE_READ16_MEMBER(pckgaldx_unknown_r); DECLARE_READ16_MEMBER(pckgaldx_protection_r); diff --git a/src/mame/includes/popper.h b/src/mame/includes/popper.h index a325e74515e..4397d0cb50a 100644 --- a/src/mame/includes/popper.h +++ b/src/mame/includes/popper.h @@ -33,7 +33,7 @@ public: rectangle m_tilemap_clip; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; UINT8 m_nmi_mask; DECLARE_READ8_MEMBER(popper_input_ports_r); diff --git a/src/mame/includes/psikyo.h b/src/mame/includes/psikyo.h index 6936037c575..e3de8741d19 100644 --- a/src/mame/includes/psikyo.h +++ b/src/mame/includes/psikyo.h @@ -44,7 +44,7 @@ public: int m_mcu_status; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; /* game-specific */ // 1945 MCU diff --git a/src/mame/includes/psikyo4.h b/src/mame/includes/psikyo4.h index e4a3c02311f..98d4a5e8dfb 100644 --- a/src/mame/includes/psikyo4.h +++ b/src/mame/includes/psikyo4.h @@ -34,7 +34,7 @@ public: double m_oldbrt2; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_WRITE32_MEMBER(ps4_paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w); DECLARE_WRITE32_MEMBER(ps4_bgpen_1_dword_w); DECLARE_WRITE32_MEMBER(ps4_bgpen_2_dword_w); diff --git a/src/mame/includes/psikyosh.h b/src/mame/includes/psikyosh.h index 058468d5538..516fd721fe9 100644 --- a/src/mame/includes/psikyosh.h +++ b/src/mame/includes/psikyosh.h @@ -45,7 +45,7 @@ public: UINT8 m_alphatable[256]; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_WRITE32_MEMBER(psikyosh_irqctrl_w); DECLARE_WRITE32_MEMBER(paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w); diff --git a/src/mame/includes/pushman.h b/src/mame/includes/pushman.h index 120caae0eac..9e52f65e1a7 100644 --- a/src/mame/includes/pushman.h +++ b/src/mame/includes/pushman.h @@ -28,8 +28,8 @@ public: UINT16 m_new_latch; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_mcu; DECLARE_WRITE16_MEMBER(pushman_flipscreen_w); DECLARE_WRITE16_MEMBER(pushman_control_w); diff --git a/src/mame/includes/rainbow.h b/src/mame/includes/rainbow.h index 560b7439220..baa26b090b0 100644 --- a/src/mame/includes/rainbow.h +++ b/src/mame/includes/rainbow.h @@ -28,8 +28,8 @@ public: UINT8 m_current_bank; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_pc080sn; device_t *m_pc090oj; DECLARE_WRITE16_MEMBER(jumping_sound_w); diff --git a/src/mame/includes/rastan.h b/src/mame/includes/rastan.h index e4e01b39162..5ec21d43c84 100644 --- a/src/mame/includes/rastan.h +++ b/src/mame/includes/rastan.h @@ -22,8 +22,8 @@ public: int m_adpcm_data; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_pc090oj; device_t *m_pc080sn; DECLARE_WRITE8_MEMBER(rastan_msm5205_address_w); diff --git a/src/mame/includes/rltennis.h b/src/mame/includes/rltennis.h index f7d2df5776e..216910cee09 100644 --- a/src/mame/includes/rltennis.h +++ b/src/mame/includes/rltennis.h @@ -11,7 +11,7 @@ public: m_data760000(0), m_data740000(0), m_dac_counter(0), m_sample_rom_offset_1(0), m_sample_rom_offset_2(0), m_offset_shift(0){ } - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_screen; UINT16 m_blitter[RLT_NUM_BLITTER_REGS]; diff --git a/src/mame/includes/rockrage.h b/src/mame/includes/rockrage.h index 9eff0b82581..4e527ed20c3 100644 --- a/src/mame/includes/rockrage.h +++ b/src/mame/includes/rockrage.h @@ -19,7 +19,7 @@ public: int m_vreg; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k007342; device_t *m_k007420; DECLARE_WRITE8_MEMBER(rockrage_bankswitch_w); diff --git a/src/mame/includes/rollerg.h b/src/mame/includes/rollerg.h index 0fb00e8412a..6af58cda337 100644 --- a/src/mame/includes/rollerg.h +++ b/src/mame/includes/rollerg.h @@ -21,8 +21,8 @@ public: int m_readzoomroms; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k053260; device_t *m_k053244; device_t *m_k051316; diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index de2c1ca8863..f4b64d9b2af 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -29,8 +29,8 @@ public: int m_sound_status; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k054539_1; device_t *m_k054539_2; device_t *m_k053936; diff --git a/src/mame/includes/sf.h b/src/mame/includes/sf.h index 59f164c10f7..4e0132072de 100644 --- a/src/mame/includes/sf.h +++ b/src/mame/includes/sf.h @@ -26,8 +26,8 @@ public: UINT16 m_fgscroll; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; DECLARE_READ16_MEMBER(dummy_r); DECLARE_WRITE16_MEMBER(sf_coin_w); DECLARE_WRITE16_MEMBER(soundcmd_w); diff --git a/src/mame/includes/simpsons.h b/src/mame/includes/simpsons.h index 8b4beebe25e..302c0f582f8 100644 --- a/src/mame/includes/simpsons.h +++ b/src/mame/includes/simpsons.h @@ -22,8 +22,8 @@ public: //int m_nmi_enabled; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k053260; device_t *m_k052109; device_t *m_k053246; diff --git a/src/mame/includes/skyfox.h b/src/mame/includes/skyfox.h index 5a87b1efcec..6e96231a00c 100644 --- a/src/mame/includes/skyfox.h +++ b/src/mame/includes/skyfox.h @@ -23,7 +23,7 @@ public: int m_palette_selected; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; DECLARE_READ8_MEMBER(skyfox_vregs_r); DECLARE_WRITE8_MEMBER(skyfox_vregs_w); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); diff --git a/src/mame/includes/slapshot.h b/src/mame/includes/slapshot.h index e7a6648f2e9..2755312a154 100644 --- a/src/mame/includes/slapshot.h +++ b/src/mame/includes/slapshot.h @@ -47,8 +47,8 @@ public: INT32 m_banknum; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_tc0140syt; device_t *m_tc0480scp; device_t *m_tc0360pri; diff --git a/src/mame/includes/sonson.h b/src/mame/includes/sonson.h index c8b54c96427..747ce2e9c0b 100644 --- a/src/mame/includes/sonson.h +++ b/src/mame/includes/sonson.h @@ -25,7 +25,7 @@ public: int m_last_irq; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE8_MEMBER(sonson_sh_irqtrigger_w); DECLARE_WRITE8_MEMBER(sonson_coin1_counter_w); DECLARE_WRITE8_MEMBER(sonson_coin2_counter_w); diff --git a/src/mame/includes/spy.h b/src/mame/includes/spy.h index 614e15f58e7..2c696e9fe4c 100644 --- a/src/mame/includes/spy.h +++ b/src/mame/includes/spy.h @@ -27,8 +27,8 @@ public: int m_old_3f90; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232_1; device_t *m_k007232_2; device_t *m_k052109; diff --git a/src/mame/includes/supbtime.h b/src/mame/includes/supbtime.h index adbd1071104..ef9cda5108d 100644 --- a/src/mame/includes/supbtime.h +++ b/src/mame/includes/supbtime.h @@ -22,8 +22,8 @@ public: /* video-related */ /* 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(supbtime_controls_r); DECLARE_WRITE16_MEMBER(sound_w); diff --git a/src/mame/includes/suprslam.h b/src/mame/includes/suprslam.h index f7f3a609b9f..212af1f83a5 100644 --- a/src/mame/includes/suprslam.h +++ b/src/mame/includes/suprslam.h @@ -35,7 +35,7 @@ public: int m_pending_command; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_k053936; DECLARE_WRITE16_MEMBER(sound_command_w); DECLARE_READ16_MEMBER(pending_command_r); diff --git a/src/mame/includes/surpratk.h b/src/mame/includes/surpratk.h index fda49794e40..263c6b674a7 100644 --- a/src/mame/includes/surpratk.h +++ b/src/mame/includes/surpratk.h @@ -24,7 +24,7 @@ public: int m_videobank; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_k052109; device_t *m_k053244; device_t *m_k053251; diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index d0ffa7fdd5d..db789899af8 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -108,8 +108,8 @@ public: UINT8 *m_decrypted_region; // goldnaxeb1 & bayrouteb1 /* devices */ - device_t *m_maincpu; - device_t *m_soundcpu; + cpu_device *m_maincpu; + cpu_device *m_soundcpu; DECLARE_WRITE16_MEMBER(sound_command_nmi_w); DECLARE_WRITE16_MEMBER(sound_command_w); DECLARE_WRITE16_MEMBER(sys16_coinctrl_w); diff --git a/src/mame/includes/tail2nos.h b/src/mame/includes/tail2nos.h index 0d4e9a62729..cea15f07321 100644 --- a/src/mame/includes/tail2nos.h +++ b/src/mame/includes/tail2nos.h @@ -25,8 +25,8 @@ public: int m_video_enable; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k051316; DECLARE_WRITE16_MEMBER(sound_command_w); DECLARE_WRITE16_MEMBER(tail2nos_bgvideoram_w); diff --git a/src/mame/includes/taito_b.h b/src/mame/includes/taito_b.h index fe0cb0305a3..fb1c111e11c 100644 --- a/src/mame/includes/taito_b.h +++ b/src/mame/includes/taito_b.h @@ -30,8 +30,8 @@ public: UINT16 m_realpunc_video_ctrl; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_mb87078; device_t *m_ym; device_t *m_tc0180vcu; diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index b61fabfa874..126a1d3c82a 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -71,8 +71,8 @@ public: INT32 m_oki_bank; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; optional_device m_oki; device_t *m_tc0100scn; device_t *m_tc0100scn_1; diff --git a/src/mame/includes/taito_h.h b/src/mame/includes/taito_h.h index b57820caf6d..943a440d330 100644 --- a/src/mame/includes/taito_h.h +++ b/src/mame/includes/taito_h.h @@ -19,8 +19,8 @@ public: INT32 m_banknum; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_tc0080vco; device_t *m_tc0220ioc; DECLARE_READ8_MEMBER(syvalion_input_bypass_r); diff --git a/src/mame/includes/taito_l.h b/src/mame/includes/taito_l.h index f731ae78ff0..67e271c8821 100644 --- a/src/mame/includes/taito_l.h +++ b/src/mame/includes/taito_l.h @@ -52,8 +52,8 @@ public: const char *m_portf1_tag; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; /* memory buffers */ UINT8 m_rambanks[0x1000 * 12]; diff --git a/src/mame/includes/taito_o.h b/src/mame/includes/taito_o.h index e07e591fc97..bf690fe84b8 100644 --- a/src/mame/includes/taito_o.h +++ b/src/mame/includes/taito_o.h @@ -14,7 +14,7 @@ public: // UINT16 * paletteram; // currently this uses generic palette handling /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_tc0080vco; DECLARE_WRITE16_MEMBER(io_w); DECLARE_READ16_MEMBER(io_r); diff --git a/src/mame/includes/taito_z.h b/src/mame/includes/taito_z.h index b2e1b5c391a..f76ac41aa6e 100644 --- a/src/mame/includes/taito_z.h +++ b/src/mame/includes/taito_z.h @@ -30,9 +30,9 @@ public: UINT16 m_eep_latch; /* 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; eeprom_device *m_eeprom; device_t *m_tc0480scp; device_t *m_tc0150rod; diff --git a/src/mame/includes/taitoair.h b/src/mame/includes/taitoair.h index 28a22071f8d..f146f49221e 100644 --- a/src/mame/includes/taitoair.h +++ b/src/mame/includes/taitoair.h @@ -43,7 +43,7 @@ public: INT32 m_banknum; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; device_t *m_dsp; device_t *m_tc0080vco; diff --git a/src/mame/includes/thunderx.h b/src/mame/includes/thunderx.h index b2a4cfdc4a9..a4252d50d0c 100644 --- a/src/mame/includes/thunderx.h +++ b/src/mame/includes/thunderx.h @@ -28,8 +28,8 @@ public: int m_pmcbank; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232; device_t *m_k052109; device_t *m_k051960; diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h index df4f94f0b7a..a986a5a040e 100644 --- a/src/mame/includes/tmnt.h +++ b/src/mame/includes/tmnt.h @@ -47,8 +47,8 @@ public: UINT16 m_cuebrick_nvram[0x400 * 0x20]; // 32k paged in a 1k window /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k007232; device_t *m_k053260; device_t *m_k054539; diff --git a/src/mame/includes/tnzs.h b/src/mame/includes/tnzs.h index 2455c15447a..800a22282b1 100644 --- a/src/mame/includes/tnzs.h +++ b/src/mame/includes/tnzs.h @@ -52,8 +52,8 @@ public: UINT8* m_ROM; /* devices */ - device_t *m_audiocpu; - device_t *m_subcpu; + cpu_device *m_audiocpu; + cpu_device *m_subcpu; device_t *m_mcu; DECLARE_WRITE8_MEMBER(tnzsb_sound_command_w); DECLARE_WRITE8_MEMBER(jpopnics_palette_w); diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h index 42b648cc5c6..322773f8d4a 100644 --- a/src/mame/includes/topspeed.h +++ b/src/mame/includes/topspeed.h @@ -35,9 +35,9 @@ public: INT32 m_banknum; /* 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; device_t *m_pc080sn_1; device_t *m_pc080sn_2; device_t *m_tc0220ioc; diff --git a/src/mame/includes/tumbleb.h b/src/mame/includes/tumbleb.h index 9f0c847e5e7..15b1275f0f8 100644 --- a/src/mame/includes/tumbleb.h +++ b/src/mame/includes/tumbleb.h @@ -33,8 +33,8 @@ public: UINT16 m_tilebank; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_oki; UINT8 m_semicom_prot_offset; UINT16 m_protbase; diff --git a/src/mame/includes/tumblep.h b/src/mame/includes/tumblep.h index d0abad85e73..ce9b0c99f24 100644 --- a/src/mame/includes/tumblep.h +++ b/src/mame/includes/tumblep.h @@ -20,8 +20,8 @@ public: // UINT16 * m_paletteram; // currently this uses generic palette handling (in decocomn.c) /* 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(tumblep_prot_r); DECLARE_WRITE16_MEMBER(tumblep_sound_w); diff --git a/src/mame/includes/ultraman.h b/src/mame/includes/ultraman.h index 1c179b645c7..e30ab97c5f1 100644 --- a/src/mame/includes/ultraman.h +++ b/src/mame/includes/ultraman.h @@ -21,8 +21,8 @@ public: int m_bank2; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k051316_1; device_t *m_k051316_2; device_t *m_k051316_3; diff --git a/src/mame/includes/vaportra.h b/src/mame/includes/vaportra.h index 477bc65540a..0e797ff6e97 100644 --- a/src/mame/includes/vaportra.h +++ b/src/mame/includes/vaportra.h @@ -23,8 +23,8 @@ public: UINT16 m_priority[2]; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_deco_tilegen1; device_t *m_deco_tilegen2; required_device m_spriteram; diff --git a/src/mame/includes/vendetta.h b/src/mame/includes/vendetta.h index 7c0db36d538..e508d24aa6e 100644 --- a/src/mame/includes/vendetta.h +++ b/src/mame/includes/vendetta.h @@ -24,8 +24,8 @@ public: offs_t m_video_banking_base; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k053260; device_t *m_k052109; device_t *m_k053246; diff --git a/src/mame/includes/volfied.h b/src/mame/includes/volfied.h index ee5a517c267..0b171f04c4f 100644 --- a/src/mame/includes/volfied.h +++ b/src/mame/includes/volfied.h @@ -26,8 +26,8 @@ public: UINT8 m_current_cmd; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_pc090oj; DECLARE_WRITE16_MEMBER(volfied_cchip_ctrl_w); DECLARE_WRITE16_MEMBER(volfied_cchip_bank_w); diff --git a/src/mame/includes/warriorb.h b/src/mame/includes/warriorb.h index 5b97920db8a..1d34c5857dc 100644 --- a/src/mame/includes/warriorb.h +++ b/src/mame/includes/warriorb.h @@ -19,8 +19,8 @@ public: int m_pandata[4]; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_tc0140syt; device_t *m_tc0100scn_1; device_t *m_tc0100scn_2; diff --git a/src/mame/includes/wgp.h b/src/mame/includes/wgp.h index 106d70bf1ae..7fa09419dc4 100644 --- a/src/mame/includes/wgp.h +++ b/src/mame/includes/wgp.h @@ -40,9 +40,9 @@ public: INT32 m_banknum; /* 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; device_t *m_tc0100scn; device_t *m_tc0140syt; DECLARE_READ16_MEMBER(sharedram_r); diff --git a/src/mame/includes/xexex.h b/src/mame/includes/xexex.h index b32f78346a0..33e12d45c83 100644 --- a/src/mame/includes/xexex.h +++ b/src/mame/includes/xexex.h @@ -35,8 +35,8 @@ public: int m_frame; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k054539; device_t *m_filter1l; device_t *m_filter1r; diff --git a/src/mame/includes/xmen.h b/src/mame/includes/xmen.h index 0e9cb37a9a8..dda0adc49b8 100644 --- a/src/mame/includes/xmen.h +++ b/src/mame/includes/xmen.h @@ -31,8 +31,8 @@ public: UINT8 m_vblank_irq_mask; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_k054539; device_t *m_k052109; device_t *m_k053246; diff --git a/src/mame/includes/yunsun16.h b/src/mame/includes/yunsun16.h index 2e4ba5d4a7a..229798491f4 100644 --- a/src/mame/includes/yunsun16.h +++ b/src/mame/includes/yunsun16.h @@ -32,7 +32,7 @@ public: int m_sprites_scrolldy; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; DECLARE_WRITE16_MEMBER(yunsun16_sound_bank_w); DECLARE_WRITE16_MEMBER(magicbub_sound_command_w); DECLARE_WRITE16_MEMBER(yunsun16_vram_0_w); diff --git a/src/mame/includes/yunsung8.h b/src/mame/includes/yunsung8.h index da96ef385c5..fb5ac0f8a68 100644 --- a/src/mame/includes/yunsung8.h +++ b/src/mame/includes/yunsung8.h @@ -23,7 +23,7 @@ public: int m_toggle; /* devices */ - device_t *m_audiocpu; + cpu_device *m_audiocpu; /* memory */ UINT8 m_videoram[0x4000]; diff --git a/src/mame/machine/ajax.c b/src/mame/machine/ajax.c index 4a55c4f2733..0b2c276b932 100644 --- a/src/mame/machine/ajax.c +++ b/src/mame/machine/ajax.c @@ -142,11 +142,11 @@ WRITE8_MEMBER(ajax_state::ajax_ls138_f10_w) watchdog_reset_w(space, 0, data); else{ if (m_firq_enable) /* Cause interrupt on slave CPU */ - device_set_input_line(m_subcpu, M6809_FIRQ_LINE, HOLD_LINE); + m_subcpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } break; case 0x01: /* Cause interrupt on audio CPU */ - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); break; case 0x02: /* Sound command number */ soundlatch_byte_w(space, offset, data); @@ -206,9 +206,9 @@ MACHINE_START( ajax ) state->membank("bank1")->set_entry(0); state->membank("bank2")->set_entry(0); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); - state->m_subcpu = machine.device("sub"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); + state->m_subcpu = machine.device("sub"); state->m_k007232_1 = machine.device("k007232_1"); state->m_k007232_2 = machine.device("k007232_2"); state->m_k052109 = machine.device("k052109"); @@ -232,5 +232,5 @@ INTERRUPT_GEN( ajax_interrupt ) ajax_state *state = device->machine().driver_data(); 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); } diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c index 2bf4dbd9961..578a3112cfe 100644 --- a/src/mame/machine/amiga.c +++ b/src/mame/machine/amiga.c @@ -995,7 +995,7 @@ static void blitter_setup(address_space *space) if ( CUSTOM_REG(REG_DMACON) & 0x0400 ) { /* simulate the 68k not running while the blit is going */ - device_adjust_icount( &space->device(), -(blittime/2) ); + space->device().execute().adjust_icount(-(blittime/2) ); blittime = BLITTER_NASTY_DELAY; } diff --git a/src/mame/machine/asic65.c b/src/mame/machine/asic65.c index da50800f478..4e0b8d86739 100644 --- a/src/mame/machine/asic65.c +++ b/src/mame/machine/asic65.c @@ -142,7 +142,7 @@ void asic65_reset(running_machine &machine, int state) /* rom-based means reset and clear states */ if (asic65.cpu != NULL) - device_set_input_line(asic65.cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); + asic65.cpu->execute().set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); /* otherwise, do it manually */ else @@ -179,7 +179,7 @@ static TIMER_CALLBACK( m68k_asic65_deferred_w ) asic65.cmd = param >> 16; asic65.tdata = param; if (asic65.cpu != NULL) - device_set_input_line(asic65.cpu, 0, ASSERT_LINE); + asic65.cpu->execute().set_input_line(0, ASSERT_LINE); } @@ -477,7 +477,7 @@ static READ16_HANDLER( asic65_68k_r ) { asic65.tfull = 0; if (asic65.cpu != NULL) - device_set_input_line(asic65.cpu, 0, CLEAR_LINE); + asic65.cpu->execute().set_input_line(0, CLEAR_LINE); return asic65.tdata; } @@ -501,7 +501,7 @@ static READ16_HANDLER( asic65_stat_r ) static READ16_HANDLER( asci65_get_bio ) { if (!asic65.tfull) - device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_interrupt(); return asic65.tfull ? CLEAR_LINE : ASSERT_LINE; } diff --git a/src/mame/machine/asteroid.c b/src/mame/machine/asteroid.c index 0e0f12a55a8..bb4658a5231 100644 --- a/src/mame/machine/asteroid.c +++ b/src/mame/machine/asteroid.c @@ -17,21 +17,21 @@ INTERRUPT_GEN( asteroid_interrupt ) { /* Turn off interrupts if self-test is enabled */ if (!(device->machine().root_device().ioport("IN0")->read() & 0x80)) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } INTERRUPT_GEN( asterock_interrupt ) { /* Turn off interrupts if self-test is enabled */ if ((device->machine().root_device().ioport("IN0")->read() & 0x80)) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } INTERRUPT_GEN( llander_interrupt ) { /* Turn off interrupts if self-test is enabled */ if (device->machine().root_device().ioport("IN0")->read() & 0x02) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } READ8_MEMBER(asteroid_state::asteroid_IN0_r) diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c index bce95e21c66..1764dfc2831 100644 --- a/src/mame/machine/atarigen.c +++ b/src/mame/machine/atarigen.c @@ -734,7 +734,7 @@ READ8_HANDLER( atarigen_6502_sound_r ) { atarigen_state *state = space->machine().driver_data(); state->m_cpu_to_sound_ready = 0; - device_set_input_line(state->m_sound_cpu, INPUT_LINE_NMI, CLEAR_LINE); + state->m_sound_cpu->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE); return state->m_cpu_to_sound; } @@ -750,9 +750,9 @@ static void update_6502_irq(running_machine &machine) { atarigen_state *state = machine.driver_data(); if (state->m_timed_int || state->m_ym2151_int) - device_set_input_line(state->m_sound_cpu, M6502_IRQ_LINE, ASSERT_LINE); + state->m_sound_cpu->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); else - device_set_input_line(state->m_sound_cpu, M6502_IRQ_LINE, CLEAR_LINE); + state->m_sound_cpu->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE); } @@ -769,8 +769,8 @@ static TIMER_CALLBACK( delayed_sound_reset ) /* unhalt and reset the sound CPU */ if (param == 0) { - device_set_input_line(state->m_sound_cpu, INPUT_LINE_HALT, CLEAR_LINE); - device_set_input_line(state->m_sound_cpu, INPUT_LINE_RESET, PULSE_LINE); + state->m_sound_cpu->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE); + state->m_sound_cpu->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); } /* reset the sound write state */ @@ -799,7 +799,7 @@ static TIMER_CALLBACK( delayed_sound_w ) /* set up the states and signal an NMI to the sound CPU */ state->m_cpu_to_sound = param; state->m_cpu_to_sound_ready = 1; - device_set_input_line(state->m_sound_cpu, INPUT_LINE_NMI, ASSERT_LINE); + state->m_sound_cpu->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); /* allocate a high frequency timer until a response is generated */ /* the main CPU is *very* sensistive to the timing of the response */ @@ -1385,7 +1385,7 @@ void atarigen_halt_until_hblank_0(screen_device &screen) /* halt and set a timer to wake up */ screen.machine().scheduler().timer_set(screen.scan_period() * (hblank - hpos) / width, FUNC(unhalt_cpu), 0, (void *)cpu); - device_set_input_line(cpu, INPUT_LINE_HALT, ASSERT_LINE); + cpu->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); } @@ -1477,7 +1477,7 @@ WRITE32_HANDLER( atarigen_666_paletteram32_w ) static TIMER_CALLBACK( unhalt_cpu ) { device_t *cpu = (device_t *)ptr; - device_set_input_line(cpu, INPUT_LINE_HALT, CLEAR_LINE); + cpu->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE); } diff --git a/src/mame/machine/bigevglf.c b/src/mame/machine/bigevglf.c index b3db98bb56f..5ea00e778b8 100644 --- a/src/mame/machine/bigevglf.c +++ b/src/mame/machine/bigevglf.c @@ -36,7 +36,7 @@ WRITE8_MEMBER(bigevglf_state::bigevglf_68705_port_b_w) if ((m_ddr_b & 0x02) && (~m_port_b_out & 0x02) && (data & 0x02)) /* positive going transition of the clock */ { - device_set_input_line(m_mcu, 0, CLEAR_LINE); + m_mcu->execute().set_input_line(0, CLEAR_LINE); m_main_sent = 0; } @@ -81,7 +81,7 @@ WRITE8_MEMBER(bigevglf_state::bigevglf_mcu_w) m_port_a_in = data; m_main_sent = 1; - device_set_input_line(m_mcu, 0, ASSERT_LINE); + m_mcu->execute().set_input_line(0, ASSERT_LINE); } diff --git a/src/mame/machine/bublbobl.c b/src/mame/machine/bublbobl.c index 939ebf8b913..25e485f8beb 100644 --- a/src/mame/machine/bublbobl.c +++ b/src/mame/machine/bublbobl.c @@ -21,11 +21,11 @@ WRITE8_MEMBER(bublbobl_state::bublbobl_bankswitch_w) /* bit 3 n.c. */ /* bit 4 resets second Z80 */ - device_set_input_line(m_slave, INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); + m_slave->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); /* bit 5 resets mcu */ if (m_mcu != NULL) // only if we have a MCU - device_set_input_line(m_mcu, INPUT_LINE_RESET, (data & 0x20) ? CLEAR_LINE : ASSERT_LINE); + m_mcu->execute().set_input_line(INPUT_LINE_RESET, (data & 0x20) ? CLEAR_LINE : ASSERT_LINE); /* bit 6 enables display */ m_video_enable = data & 0x40; @@ -52,7 +52,7 @@ WRITE8_MEMBER(bublbobl_state::tokio_videoctrl_w) WRITE8_MEMBER(bublbobl_state::bublbobl_nmitrigger_w) { - device_set_input_line(m_slave, INPUT_LINE_NMI, PULSE_LINE); + m_slave->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -91,7 +91,7 @@ static TIMER_CALLBACK( nmi_callback ) bublbobl_state *state = machine.driver_data(); 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; } @@ -113,14 +113,14 @@ WRITE8_MEMBER(bublbobl_state::bublbobl_sh_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; } } WRITE8_MEMBER(bublbobl_state::bublbobl_soundcpu_reset_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_RESET, data ? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, data ? ASSERT_LINE : CLEAR_LINE); } READ8_MEMBER(bublbobl_state::bublbobl_sound_status_r) @@ -203,8 +203,8 @@ WRITE8_MEMBER(bublbobl_state::bublbobl_mcu_port1_w) if ((m_port1_out & 0x40) && (~data & 0x40)) { // logerror("triggering IRQ on main CPU\n"); - device_set_input_line_vector(m_maincpu, 0, m_mcu_sharedram[0]); - device_set_input_line(m_maincpu, 0, HOLD_LINE); + m_maincpu->set_input_line_vector(0, m_mcu_sharedram[0]); + m_maincpu->set_input_line(0, HOLD_LINE); } // bit 7: select read or write shared RAM @@ -374,7 +374,7 @@ static TIMER_CALLBACK( bublbobl_m68705_irq_ack ) INTERRUPT_GEN( bublbobl_m68705_interrupt ) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); device->machine().scheduler().timer_set(attotime::from_msec(1000/60), FUNC(bublbobl_m68705_irq_ack)); /* TODO: understand how this is ack'ed */ } @@ -474,8 +474,8 @@ WRITE8_MEMBER(bublbobl_state::bublbobl_68705_port_b_w) /* hack to get random EXTEND letters (who is supposed to do this? 68705? PAL?) */ m_mcu_sharedram[0x7c] = machine().rand() % 6; - device_set_input_line_vector(m_maincpu, 0, m_mcu_sharedram[0]); - device_set_input_line(m_maincpu, 0, HOLD_LINE); + m_maincpu->set_input_line_vector(0, m_mcu_sharedram[0]); + m_maincpu->set_input_line(0, HOLD_LINE); } if ((m_ddr_b & 0x40) && (~data & 0x40) && (m_port_b_out & 0x40)) { diff --git a/src/mame/machine/buggychl.c b/src/mame/machine/buggychl.c index 8a1e2d873e4..34f4d409e37 100644 --- a/src/mame/machine/buggychl.c +++ b/src/mame/machine/buggychl.c @@ -94,7 +94,7 @@ static WRITE8_DEVICE_HANDLER( buggychl_68705_port_b_w ) { state->m_port_a_in = state->m_from_main; if (state->m_main_sent) - device_set_input_line(state->m_mcu, 0, CLEAR_LINE); + state->m_mcu->execute().set_input_line(0, CLEAR_LINE); state->m_main_sent = 0; logerror("read command %02x from main cpu\n", state->m_port_a_in); } @@ -156,7 +156,7 @@ WRITE8_DEVICE_HANDLER( buggychl_mcu_w ) logerror("%04x: mcu_w %02x\n", state->m_mcu->safe_pc(), data); state->m_from_main = data; state->m_main_sent = 1; - device_set_input_line(state->m_mcu, 0, ASSERT_LINE); + state->m_mcu->execute().set_input_line(0, ASSERT_LINE); } READ8_DEVICE_HANDLER( buggychl_mcu_r ) diff --git a/src/mame/machine/cdi070.c b/src/mame/machine/cdi070.c index 6ffec691fcd..a87fb590847 100644 --- a/src/mame/machine/cdi070.c +++ b/src/mame/machine/cdi070.c @@ -83,7 +83,7 @@ TIMER_CALLBACK( scc68070_timer0_callback ) scc68070->timers.timer_status_register |= TSR_OV0; if(interrupt) { - device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); + machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); machine.device("maincpu")->execute().set_input_line(M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); } } @@ -170,7 +170,7 @@ TIMER_CALLBACK( scc68070_rx_callback ) UINT8 interrupt = (scc68070->picr2 >> 4) & 7; if(interrupt) { - device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); + machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); machine.device("maincpu")->execute().set_input_line(M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); } @@ -381,7 +381,7 @@ TIMER_CALLBACK( scc68070_tx_callback ) UINT8 interrupt = scc68070->picr2 & 7; if(interrupt) { - device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); + machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); machine.device("maincpu")->execute().set_input_line(M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); } diff --git a/src/mame/machine/cdicdic.c b/src/mame/machine/cdicdic.c index a378ea7194e..f77d152eee0 100644 --- a/src/mame/machine/cdicdic.c +++ b/src/mame/machine/cdicdic.c @@ -553,7 +553,7 @@ void cdicdic_device::sample_trigger() // Set the CDIC interrupt line verboselog(machine(), 0, "Setting CDIC interrupt line for soundmap decode\n" ); - device_set_input_line_vector(machine().device("maincpu"), M68K_IRQ_4, 128); + machine().device("maincpu")->execute().set_input_line_vector(M68K_IRQ_4, 128); machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, ASSERT_LINE); } else @@ -707,7 +707,7 @@ void cdicdic_device::process_delayed_command() //printf( "Setting CDIC interrupt line\n" ); verboselog(machine(), 0, "Setting CDIC interrupt line for audio sector\n" ); - device_set_input_line_vector(machine().device("maincpu"), M68K_IRQ_4, 128); + machine().device("maincpu")->execute().set_input_line_vector(M68K_IRQ_4, 128); machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, ASSERT_LINE); } else if((buffer[CDIC_SECTOR_SUBMODE2] & (CDIC_SUBMODE_DATA | CDIC_SUBMODE_AUDIO | CDIC_SUBMODE_VIDEO)) == 0x00) @@ -726,7 +726,7 @@ void cdicdic_device::process_delayed_command() { //printf( "Setting CDIC interrupt line\n" ); verboselog(machine(), 0, "Setting CDIC interrupt line for message sector\n" ); - device_set_input_line_vector(machine().device("maincpu"), M68K_IRQ_4, 128); + machine().device("maincpu")->execute().set_input_line_vector(M68K_IRQ_4, 128); machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, ASSERT_LINE); } else @@ -746,7 +746,7 @@ void cdicdic_device::process_delayed_command() //printf( "Setting CDIC interrupt line\n" ); verboselog(machine(), 0, "Setting CDIC interrupt line for data sector\n" ); - device_set_input_line_vector(machine().device("maincpu"), M68K_IRQ_4, 128); + machine().device("maincpu")->execute().set_input_line_vector(M68K_IRQ_4, 128); machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, ASSERT_LINE); } @@ -841,7 +841,7 @@ void cdicdic_device::process_delayed_command() } verboselog(machine(), 0, "Setting CDIC interrupt line for CDDA sector\n" ); - device_set_input_line_vector(machine().device("maincpu"), M68K_IRQ_4, 128); + machine().device("maincpu")->execute().set_input_line_vector(M68K_IRQ_4, 128); machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, ASSERT_LINE); break; } @@ -892,7 +892,7 @@ void cdicdic_device::process_delayed_command() m_time = next_msf << 8; verboselog(machine(), 0, "Setting CDIC interrupt line for Seek sector\n" ); - device_set_input_line_vector(machine().device("maincpu"), M68K_IRQ_4, 128); + machine().device("maincpu")->execute().set_input_line_vector(M68K_IRQ_4, 128); machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, ASSERT_LINE); break; } diff --git a/src/mame/machine/cdislave.c b/src/mame/machine/cdislave.c index a105054a7e8..b952a259323 100644 --- a/src/mame/machine/cdislave.c +++ b/src/mame/machine/cdislave.c @@ -59,7 +59,7 @@ TIMER_CALLBACK( cdislave_device::trigger_readback_int ) void cdislave_device::readback_trigger() { verboselog(machine(), 0, "Asserting IRQ2\n" ); - device_set_input_line_vector(machine().device("maincpu"), M68K_IRQ_2, 26); + machine().device("maincpu")->execute().set_input_line_vector(M68K_IRQ_2, 26); machine().device("maincpu")->execute().set_input_line(M68K_IRQ_2, ASSERT_LINE); m_interrupt_timer->adjust(attotime::never); } diff --git a/src/mame/machine/dec0.c b/src/mame/machine/dec0.c index 5c5d95d3b47..4dce6529919 100644 --- a/src/mame/machine/dec0.c +++ b/src/mame/machine/dec0.c @@ -118,7 +118,7 @@ WRITE8_MEMBER(dec0_state::hippodrm_shared_w) READ16_MEMBER(dec0_state::hippodrm_68000_share_r) { - if (offset==0) device_yield(&space.device()); /* A wee helper */ + if (offset==0) space.device().execute().yield(); /* A wee helper */ return m_share[offset]&0xff; } diff --git a/src/mame/machine/decocass.c b/src/mame/machine/decocass.c index 18abebb699c..0421eb82dca 100644 --- a/src/mame/machine/decocass.c +++ b/src/mame/machine/decocass.c @@ -65,7 +65,7 @@ WRITE8_HANDLER( decocass_sound_command_w ) state->m_sound_ack |= 0x80; /* remove snd cpu data ack bit. i don't see it in the schems, but... */ state->m_sound_ack &= ~0x40; - device_set_input_line(state->m_audiocpu, M6502_IRQ_LINE, ASSERT_LINE); + state->m_audiocpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); } READ8_HANDLER( decocass_sound_data_r ) @@ -97,7 +97,7 @@ READ8_HANDLER( decocass_sound_command_r ) decocass_state *state = space->machine().driver_data(); UINT8 data = state->soundlatch_byte_r(*space, 0); LOG(4,("CPU %s sound command <- $%02x\n", space->device().tag(), data)); - device_set_input_line(state->m_audiocpu, M6502_IRQ_LINE, CLEAR_LINE); + state->m_audiocpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); state->m_sound_ack &= ~0x80; return data; } @@ -107,21 +107,21 @@ TIMER_DEVICE_CALLBACK( decocass_audio_nmi_gen ) decocass_state *state = timer.machine().driver_data(); 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); } WRITE8_HANDLER( decocass_sound_nmi_enable_w ) { decocass_state *state = space->machine().driver_data(); state->m_audio_nmi_enabled = 1; - 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); } READ8_HANDLER( decocass_sound_nmi_enable_r ) { decocass_state *state = space->machine().driver_data(); state->m_audio_nmi_enabled = 1; - 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); return 0xff; } @@ -144,7 +144,7 @@ WRITE8_HANDLER( decocass_sound_data_ack_reset_w ) WRITE8_HANDLER( decocass_nmi_reset_w ) { decocass_state *state = space->machine().driver_data(); - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, CLEAR_LINE ); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE ); } WRITE8_HANDLER( decocass_quadrature_decoder_reset_w ) @@ -214,17 +214,17 @@ WRITE8_HANDLER( decocass_reset_w ) state->m_decocass_reset = data; /* CPU #1 active high reset */ - device_set_input_line(state->m_audiocpu, INPUT_LINE_RESET, data & 0x01); + state->m_audiocpu->set_input_line(INPUT_LINE_RESET, data & 0x01); /* on reset also disable audio NMI */ if (data & 1) { state->m_audio_nmi_enabled = 0; - 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); } /* 8041 active low reset */ - device_set_input_line(state->m_mcu, INPUT_LINE_RESET, (data & 0x08) ? ASSERT_LINE : CLEAR_LINE); + state->m_mcu->execute().set_input_line(INPUT_LINE_RESET, (data & 0x08) ? ASSERT_LINE : CLEAR_LINE); } @@ -1352,8 +1352,8 @@ MACHINE_START( decocass ) { decocass_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_mcu = machine.device("mcu"); state->m_cassette = machine.device("cassette"); } diff --git a/src/mame/machine/decocass.h b/src/mame/machine/decocass.h index b8d92b9fa46..14e67cfa836 100644 --- a/src/mame/machine/decocass.h +++ b/src/mame/machine/decocass.h @@ -131,8 +131,8 @@ public: UINT8 m_mux_data; /* devices */ - device_t *m_maincpu; - device_t *m_audiocpu; + cpu_device *m_maincpu; + cpu_device *m_audiocpu; device_t *m_mcu; device_t *m_cassette; DECLARE_DRIVER_INIT(decocass); diff --git a/src/mame/machine/docastle.c b/src/mame/machine/docastle.c index 13843224b81..d09f0d6d1e5 100644 --- a/src/mame/machine/docastle.c +++ b/src/mame/machine/docastle.c @@ -68,7 +68,7 @@ WRITE8_MEMBER(docastle_state::docastle_shared1_w) data, (UINT32)m_maincpu->total_cycles()); /* freeze execution of the master CPU until the slave has used the shared memory */ - device_spin_until_trigger(&space.device(), 500); + space.device().execute().spin_until_trigger(500); } } @@ -76,5 +76,5 @@ WRITE8_MEMBER(docastle_state::docastle_shared1_w) WRITE8_MEMBER(docastle_state::docastle_nmitrigger_w) { - device_set_input_line(m_slave, INPUT_LINE_NMI, PULSE_LINE); + m_slave->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/machine/fd1094.c b/src/mame/machine/fd1094.c index 15fe77f92d8..652ed749756 100644 --- a/src/mame/machine/fd1094.c +++ b/src/mame/machine/fd1094.c @@ -721,7 +721,7 @@ void fd1094_device::device_start() // register for the state changing callbacks we need in the m68000 m68k_set_cmpild_callback(this, &fd1094_device::cmp_callback); m68k_set_rte_callback(this, &fd1094_device::rte_callback); - device_set_irq_callback(this, &fd1094_device::irq_callback); + set_irq_acknowledge_callback(&fd1094_device::irq_callback); // save state save_item(NAME(m_state)); diff --git a/src/mame/machine/flstory.c b/src/mame/machine/flstory.c index 2dc30065cd5..cb91d3bdfe1 100644 --- a/src/mame/machine/flstory.c +++ b/src/mame/machine/flstory.c @@ -63,7 +63,7 @@ WRITE8_MEMBER(flstory_state::flstory_68705_port_b_w) { m_port_a_in = m_from_main; if (m_main_sent) - device_set_input_line(m_mcu, 0, CLEAR_LINE); + m_mcu->execute().set_input_line(0, CLEAR_LINE); m_main_sent = 0; logerror("read command %02x from main cpu\n", m_port_a_in); } @@ -114,7 +114,7 @@ WRITE8_MEMBER(flstory_state::flstory_mcu_w) logerror("%04x: mcu_w %02x\n", space.device().safe_pc(), data); m_from_main = data; m_main_sent = 1; - device_set_input_line(m_mcu, 0, ASSERT_LINE); + m_mcu->execute().set_input_line(0, ASSERT_LINE); } READ8_MEMBER(flstory_state::flstory_mcu_r) diff --git a/src/mame/machine/gaelco2.c b/src/mame/machine/gaelco2.c index 43e3f7a2689..f6e450b7571 100644 --- a/src/mame/machine/gaelco2.c +++ b/src/mame/machine/gaelco2.c @@ -192,12 +192,12 @@ TIMER_DEVICE_CALLBACK( bang_irq ) int scanline = param; if (scanline == 256){ - device_set_input_line(state->m_maincpu, 2, HOLD_LINE); + state->m_maincpu->set_input_line(2, HOLD_LINE); state->m_clr_gun_int = 0; } if ((scanline % 64) == 0 && state->m_clr_gun_int) - device_set_input_line(state->m_maincpu, 4, HOLD_LINE); + state->m_maincpu->set_input_line(4, HOLD_LINE); } /*************************************************************************** diff --git a/src/mame/machine/galaxold.c b/src/mame/machine/galaxold.c index ff11817ec0b..009e7aa5a9f 100644 --- a/src/mame/machine/galaxold.c +++ b/src/mame/machine/galaxold.c @@ -18,11 +18,11 @@ static IRQ_CALLBACK(hunchbkg_irq_callback) /* for some reason a call to cputag_set_input_line * is significantly delayed .... * - * device->machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE); + * device->machine().device("maincpu")->set_input_line(0, CLEAR_LINE); * * Therefore we reset the line without any detour .... */ - device_set_input_line(device->machine().firstcpu, 0, CLEAR_LINE); + device->machine().firstcpu->set_input_line(0, CLEAR_LINE); //cpu_set_info(device->machine().firstcpu, CPUINFO_INT_INPUT_STATE + state->m_irq_line, CLEAR_LINE); return 0x03; } @@ -98,7 +98,7 @@ MACHINE_RESET( devilfsg ) MACHINE_RESET( hunchbkg ) { machine_reset_common(machine, 0); - device_set_irq_callback(machine.device("maincpu"), hunchbkg_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(hunchbkg_irq_callback); } WRITE8_MEMBER(galaxold_state::galaxold_coin_lockout_w) diff --git a/src/mame/machine/harddriv.c b/src/mame/machine/harddriv.c index d6922860ee0..3a963aa767a 100644 --- a/src/mame/machine/harddriv.c +++ b/src/mame/machine/harddriv.c @@ -74,9 +74,9 @@ MACHINE_RESET( harddriv ) atarigen_interrupt_reset(state, hd68k_update_interrupts); /* halt several of the DSPs to start */ - if (state->m_adsp != NULL) device_set_input_line(state->m_adsp, INPUT_LINE_HALT, ASSERT_LINE); - if (state->m_dsp32 != NULL) device_set_input_line(state->m_dsp32, INPUT_LINE_HALT, ASSERT_LINE); - if (state->m_sounddsp != NULL) device_set_input_line(state->m_sounddsp, INPUT_LINE_HALT, ASSERT_LINE); + if (state->m_adsp != NULL) state->m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + if (state->m_dsp32 != NULL) state->m_dsp32->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + if (state->m_sounddsp != NULL) state->m_sounddsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); /* if we found a 6502, reset the JSA board */ if (state->m_jsacpu != NULL) @@ -106,12 +106,12 @@ MACHINE_RESET( harddriv ) static void hd68k_update_interrupts(running_machine &machine) { harddriv_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 1, state->m_msp_irq_state ? ASSERT_LINE : CLEAR_LINE); - device_set_input_line(state->m_maincpu, 2, state->m_adsp_irq_state ? ASSERT_LINE : CLEAR_LINE); - device_set_input_line(state->m_maincpu, 3, state->m_gsp_irq_state ? ASSERT_LINE : CLEAR_LINE); - device_set_input_line(state->m_maincpu, 4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE); /* /LINKIRQ on STUN Runner */ - device_set_input_line(state->m_maincpu, 5, state->m_irq_state ? ASSERT_LINE : CLEAR_LINE); - device_set_input_line(state->m_maincpu, 6, state->m_duart_irq_state ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(1, state->m_msp_irq_state ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(2, state->m_adsp_irq_state ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(3, state->m_gsp_irq_state ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE); /* /LINKIRQ on STUN Runner */ + state->m_maincpu->set_input_line(5, state->m_irq_state ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(6, state->m_duart_irq_state ? ASSERT_LINE : CLEAR_LINE); } @@ -428,12 +428,12 @@ WRITE16_HANDLER( hd68k_nwr_w ) case 6: /* /GSPRES */ logerror("Write to /GSPRES(%d)\n", data); if (state->m_gsp != NULL) - device_set_input_line(state->m_gsp, INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); + state->m_gsp->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); break; case 7: /* /MSPRES */ logerror("Write to /MSPRES(%d)\n", data); if (state->m_msp != NULL) - device_set_input_line(state->m_msp, INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); + state->m_msp->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); break; } } @@ -502,7 +502,7 @@ WRITE16_HANDLER( hdgsp_io_w ) { state->m_last_gsp_shiftreg = new_shiftreg; if (new_shiftreg) - device_yield(&space->device()); + space->device().execute().yield(); } } @@ -599,7 +599,7 @@ WRITE16_HANDLER( hd68k_adsp_data_w ) { logerror("%06X:ADSP sync address written (%04X)\n", space->device().safe_pcbase(), data); space->machine().scheduler().synchronize(); - device_triggerint(state->m_adsp); + state->m_adsp->signal_interrupt_trigger(); } else logerror("%06X:ADSP W@%04X (%04X)\n", space->device().safe_pcbase(), offset, data); @@ -714,14 +714,14 @@ WRITE16_HANDLER( hd68k_adsp_control_w ) state->m_adsp_br = !val; logerror("ADSP /BR = %d\n", !state->m_adsp_br); if (state->m_adsp_br || state->m_adsp_halt) - device_set_input_line(state->m_adsp, INPUT_LINE_HALT, ASSERT_LINE); + state->m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); else { - device_set_input_line(state->m_adsp, INPUT_LINE_HALT, CLEAR_LINE); + state->m_adsp->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); /* a yield in this case is not enough */ /* we would need to increase the interleaving otherwise */ /* note that this only affects the test mode */ - device_spin(&space->device()); + space->device().execute().spin(); } break; @@ -731,21 +731,21 @@ WRITE16_HANDLER( hd68k_adsp_control_w ) state->m_adsp_halt = !val; logerror("ADSP /HALT = %d\n", !state->m_adsp_halt); if (state->m_adsp_br || state->m_adsp_halt) - device_set_input_line(state->m_adsp, INPUT_LINE_HALT, ASSERT_LINE); + state->m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); else { - device_set_input_line(state->m_adsp, INPUT_LINE_HALT, CLEAR_LINE); + state->m_adsp->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); /* a yield in this case is not enough */ /* we would need to increase the interleaving otherwise */ /* note that this only affects the test mode */ - device_spin(&space->device()); + space->device().execute().spin(); } break; case 7: logerror("ADSP reset = %d\n", val); - device_set_input_line(state->m_adsp, INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); - device_yield(&space->device()); + state->m_adsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); + space->device().execute().yield(); break; default: @@ -864,9 +864,9 @@ static void update_ds3_irq(harddriv_state *state) { /* update the IRQ2 signal to the ADSP2101 */ if (!(!state->m_ds3_g68flag && state->m_ds3_g68irqs) && !(state->m_ds3_gflag && state->m_ds3_gfirqs)) - device_set_input_line(state->m_adsp, ADSP2100_IRQ2, ASSERT_LINE); + state->m_adsp->set_input_line(ADSP2100_IRQ2, ASSERT_LINE); else - device_set_input_line(state->m_adsp, ADSP2100_IRQ2, CLEAR_LINE); + state->m_adsp->set_input_line(ADSP2100_IRQ2, CLEAR_LINE); } @@ -890,19 +890,19 @@ WRITE16_HANDLER( hd68k_ds3_control_w ) /* the ADSP at the next instruction boundary */ state->m_adsp_br = !val; if (state->m_adsp_br) - device_set_input_line(state->m_adsp, INPUT_LINE_HALT, ASSERT_LINE); + state->m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); else { - device_set_input_line(state->m_adsp, INPUT_LINE_HALT, CLEAR_LINE); + state->m_adsp->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); /* a yield in this case is not enough */ /* we would need to increase the interleaving otherwise */ /* note that this only affects the test mode */ - device_spin(&space->device()); + space->device().execute().spin(); } break; case 3: - device_set_input_line(state->m_adsp, INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); + state->m_adsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); if (val && !state->m_ds3_reset) { state->m_ds3_gflag = 0; @@ -913,7 +913,7 @@ WRITE16_HANDLER( hd68k_ds3_control_w ) update_ds3_irq(state); } state->m_ds3_reset = val; - device_yield(&space->device()); + space->device().execute().yield(); logerror("DS III reset = %d\n", val); break; @@ -988,7 +988,7 @@ READ16_HANDLER( hd68k_ds3_gdata_r ) /* if we just cleared the IRQ, we are going to do some VERY timing critical reads */ /* it is important that all the CPUs be in sync before we continue, so spin a little */ /* while to let everyone else catch up */ - device_spin_until_trigger(&space->device(), DS3_TRIGGER); + space->device().execute().spin_until_trigger(DS3_TRIGGER); space->machine().scheduler().trigger(DS3_TRIGGER, attotime::from_usec(5)); return state->m_ds3_gdata; @@ -1004,7 +1004,7 @@ WRITE16_HANDLER( hd68k_ds3_gdata_w ) COMBINE_DATA(&state->m_ds3_g68data); state->m_ds3_g68flag = 1; state->m_ds3_gcmd = offset & 1; - device_triggerint(state->m_adsp); + state->m_adsp->signal_interrupt_trigger(); update_ds3_irq(state); } @@ -1202,11 +1202,11 @@ WRITE16_HANDLER( hd68k_dsk_control_w ) switch (offset & 7) { case 0: /* DSPRESTN */ - device_set_input_line(state->m_dsp32, INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); + state->m_dsp32->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); break; case 1: /* DSPZN */ - device_set_input_line(state->m_dsp32, INPUT_LINE_HALT, val ? CLEAR_LINE : ASSERT_LINE); + state->m_dsp32->set_input_line(INPUT_LINE_HALT, val ? CLEAR_LINE : ASSERT_LINE); break; case 2: /* ZW1 */ @@ -1549,7 +1549,7 @@ READ16_HANDLER( hdgsp_speedup_r ) &space->device() == state->m_gsp && space->device().safe_pc() == state->m_gsp_speedup_pc) { state->m_gsp_speedup_count[0]++; - device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_interrupt(); } return result; @@ -1564,7 +1564,7 @@ WRITE16_HANDLER( hdgsp_speedup1_w ) /* if $ffff is written, send an "interrupt" trigger to break us out of the spin loop */ if (state->m_gsp_speedup_addr[0][offset] == 0xffff) - device_triggerint(state->m_gsp); + state->m_gsp->signal_interrupt_trigger(); } @@ -1576,7 +1576,7 @@ WRITE16_HANDLER( hdgsp_speedup2_w ) /* if $ffff is written, send an "interrupt" trigger to break us out of the spin loop */ if (state->m_gsp_speedup_addr[1][offset] == 0xffff) - device_triggerint(state->m_gsp); + state->m_gsp->signal_interrupt_trigger(); } @@ -1599,7 +1599,7 @@ READ16_HANDLER( rdgsp_speedup1_r ) (result & 0xff) < space->device().state().state_int(TMS34010_A1)) { state->m_gsp_speedup_count[0]++; - device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_interrupt(); } return result; @@ -1611,7 +1611,7 @@ WRITE16_HANDLER( rdgsp_speedup1_w ) harddriv_state *state = space->machine().driver_data(); COMBINE_DATA(&state->m_gsp_speedup_addr[0][offset]); if (&space->device() != state->m_gsp) - device_triggerint(state->m_gsp); + state->m_gsp->signal_interrupt_trigger(); } @@ -1635,7 +1635,7 @@ READ16_HANDLER( hdmsp_speedup_r ) if (data == 0 && &space->device() == state->m_msp && space->device().safe_pc() == state->m_msp_speedup_pc) { state->m_msp_speedup_count[0]++; - device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_interrupt(); } return data; @@ -1647,7 +1647,7 @@ WRITE16_HANDLER( hdmsp_speedup_w ) harddriv_state *state = space->machine().driver_data(); COMBINE_DATA(&state->m_msp_speedup_addr[offset]); if (offset == 0 && state->m_msp_speedup_addr[offset] != 0) - device_triggerint(state->m_msp); + state->m_msp->signal_interrupt_trigger(); } @@ -1670,7 +1670,7 @@ READ16_HANDLER( hdadsp_speedup_r ) if (data == 0xffff && &space->device() == state->m_adsp && space->device().safe_pc() <= 0x3b) { state->m_adsp_speedup_count[0]++; - device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_interrupt(); } return data; @@ -1685,7 +1685,7 @@ READ16_HANDLER( hdds3_speedup_r ) if (data != 0 && &space->device() == state->m_adsp && space->device().safe_pc() == state->m_ds3_speedup_pc) { state->m_adsp_speedup_count[2]++; - device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_interrupt(); } return data; diff --git a/src/mame/machine/konppc.c b/src/mame/machine/konppc.c index 1db24b6fde6..d5939ae72c6 100644 --- a/src/mame/machine/konppc.c +++ b/src/mame/machine/konppc.c @@ -161,15 +161,15 @@ WRITE32_HANDLER( cgboard_dsp_comm_w_ppc ) k033906_set_reg(k033906, (data & 0x20000000) ? 1 : 0); if (data & 0x10000000) - device_set_input_line(dsp, INPUT_LINE_RESET, CLEAR_LINE); + dsp->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE); else - device_set_input_line(dsp, INPUT_LINE_RESET, ASSERT_LINE); + dsp->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE); if (data & 0x02000000) - device_set_input_line(dsp, INPUT_LINE_IRQ0, ASSERT_LINE); + dsp->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); if (data & 0x04000000) - device_set_input_line(dsp, INPUT_LINE_IRQ1, ASSERT_LINE); + dsp->execute().set_input_line(INPUT_LINE_IRQ1, ASSERT_LINE); } if (ACCESSING_BITS_0_7) diff --git a/src/mame/machine/leland.c b/src/mame/machine/leland.c index 2097b9bf074..077f8c48aad 100644 --- a/src/mame/machine/leland.c +++ b/src/mame/machine/leland.c @@ -453,7 +453,7 @@ INTERRUPT_GEN( leland_master_interrupt ) { /* check for coins here */ if ((device->machine().root_device().ioport("IN1")->read() & 0x0e) != 0x0e) - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } diff --git a/src/mame/machine/lkage.c b/src/mame/machine/lkage.c index 395f6b4b1a3..33130910ec6 100644 --- a/src/mame/machine/lkage.c +++ b/src/mame/machine/lkage.c @@ -64,7 +64,7 @@ WRITE8_MEMBER(lkage_state::lkage_68705_port_b_w) { m_port_a_in = m_from_main; if (m_main_sent) - device_set_input_line(m_mcu, 0, CLEAR_LINE); + m_mcu->execute().set_input_line(0, CLEAR_LINE); m_main_sent = 0; logerror("read command %02x from main cpu\n", m_port_a_in); @@ -119,7 +119,7 @@ WRITE8_MEMBER(lkage_state::lkage_mcu_w) logerror("%04x: mcu_w %02x\n", space.device().safe_pc(), data); m_from_main = data; m_main_sent = 1; - device_set_input_line(m_mcu, 0, ASSERT_LINE); + m_mcu->execute().set_input_line(0, ASSERT_LINE); } READ8_MEMBER(lkage_state::lkage_mcu_r) diff --git a/src/mame/machine/lsasquad.c b/src/mame/machine/lsasquad.c index e9cca55b9d7..308623bff06 100644 --- a/src/mame/machine/lsasquad.c +++ b/src/mame/machine/lsasquad.c @@ -13,7 +13,7 @@ static TIMER_CALLBACK( nmi_callback ) lsasquad_state *state = machine.driver_data(); 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; } @@ -29,7 +29,7 @@ WRITE8_MEMBER(lsasquad_state::lsasquad_sh_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; } } @@ -142,7 +142,7 @@ WRITE8_MEMBER(lsasquad_state::lsasquad_68705_port_b_w) { m_port_a_in = m_from_main; if (m_main_sent) - device_set_input_line(m_mcu, 0, CLEAR_LINE); + m_mcu->execute().set_input_line(0, CLEAR_LINE); m_main_sent = 0; //logerror("read command %02x from main cpu\n", m_port_a_in); } @@ -168,7 +168,7 @@ WRITE8_MEMBER(lsasquad_state::lsasquad_mcu_w) //logerror("%04x: mcu_w %02x\n", space.device().safe_pc(), data); m_from_main = data; m_main_sent = 1; - device_set_input_line(m_mcu, 0, ASSERT_LINE); + m_mcu->execute().set_input_line(0, ASSERT_LINE); } READ8_MEMBER(lsasquad_state::lsasquad_mcu_r) diff --git a/src/mame/machine/mega32x.c b/src/mame/machine/mega32x.c index bdaec546baa..86f377d8fde 100644 --- a/src/mame/machine/mega32x.c +++ b/src/mame/machine/mega32x.c @@ -666,8 +666,8 @@ WRITE16_MEMBER( sega_32x_device::_32x_68k_a15100_w ) if (data & 0x02) { - device_set_input_line(_32x_master_cpu, INPUT_LINE_RESET, CLEAR_LINE); - device_set_input_line(_32x_slave_cpu, INPUT_LINE_RESET, CLEAR_LINE); + _32x_master_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); + _32x_slave_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); } if (data & 0x01) @@ -727,13 +727,13 @@ WRITE16_MEMBER( sega_32x_device::_32x_68k_a15102_w ) if (data&0x1) { - if (m_sh2_master_cmdint_enable) device_set_input_line(_32x_master_cpu,SH2_CINT_IRQ_LEVEL,ASSERT_LINE); + if (m_sh2_master_cmdint_enable) _32x_master_cpu->set_input_line(SH2_CINT_IRQ_LEVEL,ASSERT_LINE); else printf("master cmdint when masked!\n"); } if (data&0x2) { - if (m_sh2_slave_cmdint_enable) device_set_input_line(_32x_slave_cpu,SH2_CINT_IRQ_LEVEL,ASSERT_LINE); + if (m_sh2_slave_cmdint_enable) _32x_slave_cpu->set_input_line(SH2_CINT_IRQ_LEVEL,ASSERT_LINE); else printf("slave cmdint when masked!\n"); } } @@ -859,8 +859,8 @@ void sega_32x_device::handle_pwm_callback(void) if(m_pwm_timer_tick == m_pwm_tm_reg) { m_pwm_timer_tick = 0; - if(sh2_master_pwmint_enable) { device_set_input_line(_32x_master_cpu, SH2_PINT_IRQ_LEVEL,ASSERT_LINE); } - if(sh2_slave_pwmint_enable) { device_set_input_line(_32x_slave_cpu, SH2_PINT_IRQ_LEVEL,ASSERT_LINE); } + if(sh2_master_pwmint_enable) { _32x_master_cpu->set_input_line(SH2_PINT_IRQ_LEVEL,ASSERT_LINE); } + if(sh2_slave_pwmint_enable) { _32x_slave_cpu->set_input_line(SH2_PINT_IRQ_LEVEL,ASSERT_LINE); } } m_32x_pwm_timer->adjust(attotime::from_hz((PWM_CLOCK) / (m_pwm_cycle - 1))); @@ -1322,8 +1322,8 @@ WRITE16_MEMBER( sega_32x_device::_32x_sh2_common_4006_w ) // VRES (md reset button interrupt) clear /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::_32x_sh2_master_4014_w ){ device_set_input_line(_32x_master_cpu,SH2_VRES_IRQ_LEVEL,CLEAR_LINE);} -WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_4014_w ) { device_set_input_line(_32x_slave_cpu, SH2_VRES_IRQ_LEVEL,CLEAR_LINE);} +WRITE16_MEMBER( sega_32x_device::_32x_sh2_master_4014_w ){ _32x_master_cpu->set_input_line(SH2_VRES_IRQ_LEVEL,CLEAR_LINE);} +WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_4014_w ) { _32x_slave_cpu->set_input_line(SH2_VRES_IRQ_LEVEL,CLEAR_LINE);} /**********************************************************************************************/ // SH2 side 4016 @@ -1338,8 +1338,8 @@ WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_4016_w ) { m_sh2_slave_vint_pend // HINT (horizontal interrupt) clear /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::_32x_sh2_master_4018_w ){ device_set_input_line(_32x_master_cpu,SH2_HINT_IRQ_LEVEL,CLEAR_LINE);} -WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_4018_w ) { device_set_input_line(_32x_slave_cpu, SH2_HINT_IRQ_LEVEL,CLEAR_LINE);} +WRITE16_MEMBER( sega_32x_device::_32x_sh2_master_4018_w ){ _32x_master_cpu->set_input_line(SH2_HINT_IRQ_LEVEL,CLEAR_LINE);} +WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_4018_w ) { _32x_slave_cpu->set_input_line(SH2_HINT_IRQ_LEVEL,CLEAR_LINE);} /**********************************************************************************************/ // SH2 side 401A @@ -1347,16 +1347,16 @@ WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_4018_w ) { device_set_input_line // Note: flag cleared here is a guess, according to After Burner behaviour /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::_32x_sh2_master_401a_w ){ m_32x_68k_a15102_reg &= ~1; device_set_input_line(_32x_master_cpu,SH2_CINT_IRQ_LEVEL,CLEAR_LINE);} -WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_401a_w ) { m_32x_68k_a15102_reg &= ~2; device_set_input_line(_32x_slave_cpu, SH2_CINT_IRQ_LEVEL,CLEAR_LINE);} +WRITE16_MEMBER( sega_32x_device::_32x_sh2_master_401a_w ){ m_32x_68k_a15102_reg &= ~1; _32x_master_cpu->set_input_line(SH2_CINT_IRQ_LEVEL,CLEAR_LINE);} +WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_401a_w ) { m_32x_68k_a15102_reg &= ~2; _32x_slave_cpu->set_input_line(SH2_CINT_IRQ_LEVEL,CLEAR_LINE);} /**********************************************************************************************/ // SH2 side 401C // PINT (PWM timer interrupt) clear /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::_32x_sh2_master_401c_w ){ device_set_input_line(_32x_master_cpu,SH2_PINT_IRQ_LEVEL,CLEAR_LINE);} -WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_401c_w ) { device_set_input_line(_32x_slave_cpu, SH2_PINT_IRQ_LEVEL,CLEAR_LINE);} +WRITE16_MEMBER( sega_32x_device::_32x_sh2_master_401c_w ){ _32x_master_cpu->set_input_line(SH2_PINT_IRQ_LEVEL,CLEAR_LINE);} +WRITE16_MEMBER( sega_32x_device::_32x_sh2_slave_401c_w ) { _32x_slave_cpu->set_input_line(SH2_PINT_IRQ_LEVEL,CLEAR_LINE);} /**********************************************************************************************/ // SH2 side 401E @@ -1569,11 +1569,11 @@ ADDRESS_MAP_END void sega_32x_device::_32x_check_irqs(running_machine& machine) { - if (m_sh2_master_vint_enable && m_sh2_master_vint_pending) device_set_input_line(_32x_master_cpu,SH2_VINT_IRQ_LEVEL,ASSERT_LINE); - else device_set_input_line(_32x_master_cpu,SH2_VINT_IRQ_LEVEL,CLEAR_LINE); + if (m_sh2_master_vint_enable && m_sh2_master_vint_pending) _32x_master_cpu->set_input_line(SH2_VINT_IRQ_LEVEL,ASSERT_LINE); + else _32x_master_cpu->set_input_line(SH2_VINT_IRQ_LEVEL,CLEAR_LINE); - if (m_sh2_slave_vint_enable && m_sh2_slave_vint_pending) device_set_input_line(_32x_slave_cpu,SH2_VINT_IRQ_LEVEL,ASSERT_LINE); - else device_set_input_line(_32x_slave_cpu,SH2_VINT_IRQ_LEVEL,CLEAR_LINE); + if (m_sh2_slave_vint_enable && m_sh2_slave_vint_pending) _32x_slave_cpu->set_input_line(SH2_VINT_IRQ_LEVEL,ASSERT_LINE); + else _32x_slave_cpu->set_input_line(SH2_VINT_IRQ_LEVEL,CLEAR_LINE); } void sega_32x_device::_32x_scanline_cb0(running_machine& machine) @@ -1594,8 +1594,8 @@ void sega_32x_device::_32x_scanline_cb1() if(genesis_scanline_counter < 224 || m_sh2_hint_in_vbl) { - if(m_sh2_master_hint_enable) { device_set_input_line(_32x_master_cpu,SH2_HINT_IRQ_LEVEL,ASSERT_LINE); } - if(m_sh2_slave_hint_enable) { device_set_input_line(_32x_slave_cpu,SH2_HINT_IRQ_LEVEL,ASSERT_LINE); } + if(m_sh2_master_hint_enable) { _32x_master_cpu->set_input_line(SH2_HINT_IRQ_LEVEL,ASSERT_LINE); } + if(m_sh2_slave_hint_enable) { _32x_slave_cpu->set_input_line(SH2_HINT_IRQ_LEVEL,ASSERT_LINE); } } } } diff --git a/src/mame/machine/megacd.c b/src/mame/machine/megacd.c index e1bf11dd973..be84b868747 100644 --- a/src/mame/machine/megacd.c +++ b/src/mame/machine/megacd.c @@ -2266,7 +2266,7 @@ void segacd_init_main_cpu( running_machine& machine ) - device_set_irq_callback(machine.device("segacd_68k"), segacd_sub_int_callback); + machine.device("segacd_68k")->execute().set_irq_acknowledge_callback(segacd_sub_int_callback); space->install_legacy_read_handler (0x0000070, 0x0000073, FUNC(scd_hint_vector_r) ); @@ -2331,8 +2331,8 @@ TIMER_DEVICE_CALLBACK( scd_dma_timer_callback ) MACHINE_RESET( segacd ) { - device_set_input_line(_segacd_68k_cpu, INPUT_LINE_RESET, ASSERT_LINE); - device_set_input_line(_segacd_68k_cpu, INPUT_LINE_HALT, ASSERT_LINE); + _segacd_68k_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); + _segacd_68k_cpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); segacd_hint_register = 0xffff; // -1 diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c index 140f517cdf5..58386f9eb0a 100644 --- a/src/mame/machine/megadriv.c +++ b/src/mame/machine/megadriv.c @@ -1019,12 +1019,12 @@ MACHINE_RESET( megadriv ) /* if any of these extra CPUs exist, pause them until we actually turn them on */ if (_32x_master_cpu != NULL) { - device_set_input_line(_32x_master_cpu, INPUT_LINE_RESET, ASSERT_LINE); + _32x_master_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } if (_32x_slave_cpu != NULL) { - device_set_input_line(_32x_slave_cpu, INPUT_LINE_RESET, ASSERT_LINE); + _32x_slave_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } if (_segacd_68k_cpu != NULL ) @@ -1427,7 +1427,7 @@ static void megadriv_init_common(running_machine &machine) printf("SVP (cpu) found '%s'\n", _svp_cpu->tag() ); } - device_set_irq_callback(machine.device("maincpu"), genesis_int_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(genesis_int_callback); megadriv_backupram = NULL; megadriv_backupram_length = 0; diff --git a/src/mame/machine/megasvp.c b/src/mame/machine/megasvp.c index d0d61c9b7e9..74b2c0d60a1 100644 --- a/src/mame/machine/megasvp.c +++ b/src/mame/machine/megasvp.c @@ -333,7 +333,7 @@ static UINT8 megadrive_io_read_data_port_svp(running_machine &machine, int portn static READ16_HANDLER( svp_speedup_r ) { - device_spin_until_time(&space->device(), attotime::from_usec(100)); + space->device().execute().spin_until_time(attotime::from_usec(100)); return 0x0425; } diff --git a/src/mame/machine/megavdp.c b/src/mame/machine/megavdp.c index 8fe077c7877..e08b1b84f7e 100644 --- a/src/mame/machine/megavdp.c +++ b/src/mame/machine/megavdp.c @@ -570,7 +570,7 @@ void sega_genesis_vdp_device::megadrive_do_insta_68k_to_vram_dma(running_machine if (length==0x00) length = 0xffff; /* This is a hack until real DMA timings are implemented */ - device_spin_until_time(m_cpu68k, attotime::from_nsec(length * 1000 / 3500)); + m_cpu68k->spin_until_time(attotime::from_nsec(length * 1000 / 3500)); for (count = 0;count<(length>>1);count++) { diff --git a/src/mame/machine/mexico86.c b/src/mame/machine/mexico86.c index 2ef66774aeb..abf17184579 100644 --- a/src/mame/machine/mexico86.c +++ b/src/mame/machine/mexico86.c @@ -15,12 +15,12 @@ bit 0 = ? (unused?) WRITE8_MEMBER(mexico86_state::mexico86_f008_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_RESET, (data & 4) ? CLEAR_LINE : ASSERT_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 4) ? CLEAR_LINE : ASSERT_LINE); if (m_mcu != NULL) { // mexico 86, knight boy - device_set_input_line(m_mcu, INPUT_LINE_RESET, (data & 2) ? CLEAR_LINE : ASSERT_LINE); + m_mcu->execute().set_input_line(INPUT_LINE_RESET, (data & 2) ? CLEAR_LINE : ASSERT_LINE); } else { @@ -157,8 +157,8 @@ INTERRUPT_GEN( kikikai_interrupt ) if (state->m_mcu_running) mcu_simulate(device->machine()); - device_set_input_line_vector(device, 0, state->m_protection_ram[0]); - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line_vector(0, state->m_protection_ram[0]); + device->execute().set_input_line(0, HOLD_LINE); } @@ -220,7 +220,7 @@ static void kiki_clogic(running_machine &machine, int address, int latch) INTERRUPT_GEN( mexico86_m68705_interrupt ) { - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } @@ -305,9 +305,9 @@ WRITE8_MEMBER(mexico86_state::mexico86_68705_port_b_w) if (BIT(m_ddr_b, 5) && BIT(data, 5) && BIT(~m_port_b_out, 5)) { - device_set_input_line_vector(m_maincpu, 0, m_protection_ram[0]); - device_set_input_line(m_maincpu, 0, HOLD_LINE); // HOLD_LINE works better in Z80 interrupt mode 1. - device_set_input_line(m_mcu, 0, CLEAR_LINE); + m_maincpu->set_input_line_vector(0, m_protection_ram[0]); + m_maincpu->set_input_line(0, HOLD_LINE); // HOLD_LINE works better in Z80 interrupt mode 1. + m_mcu->execute().set_input_line(0, CLEAR_LINE); } if (BIT(m_ddr_b, 6) && BIT(~data, 6) && BIT(m_port_b_out, 6)) diff --git a/src/mame/machine/midwunit.c b/src/mame/machine/midwunit.c index 081fbdff8e5..2b3545d858a 100644 --- a/src/mame/machine/midwunit.c +++ b/src/mame/machine/midwunit.c @@ -190,7 +190,7 @@ WRITE16_MEMBER(midwunit_state::umk3_palette_hack_w) without significantly impacting the rest of the system. */ COMBINE_DATA(&m_umk3_palette[offset]); - device_adjust_icount(&space.device(), -100); + space.device().execute().adjust_icount(-100); /* printf("in=%04X%04X out=%04X%04X\n", m_umk3_palette[3], m_umk3_palette[2], m_umk3_palette[1], m_umk3_palette[0]); */ } diff --git a/src/mame/machine/model1.c b/src/mame/machine/model1.c index edb8e4a3a6f..080a3d1dab2 100644 --- a/src/mame/machine/model1.c +++ b/src/mame/machine/model1.c @@ -2152,7 +2152,7 @@ READ16_MEMBER(model1_state::model1_tgp_vr_adr_r) if ( m_ram_adr == 0 && m_copro_fifoin_num != 0 ) { /* spin the main cpu and let the TGP catch up */ - device_spin_until_time(&space.device(), attotime::from_usec(100)); + space.device().execute().spin_until_time(attotime::from_usec(100)); } return m_ram_adr; @@ -2178,7 +2178,7 @@ READ16_MEMBER(model1_state::model1_vr_tgp_ram_r) if ( m_ram_adr == 0 && r == 0xffff ) { /* if the TGP is busy, spin some more */ - device_spin_until_time(&space.device(), attotime::from_usec(100)); + space.device().execute().spin_until_time(attotime::from_usec(100)); } if ( m_ram_adr & 0x8000 ) diff --git a/src/mame/machine/mw8080bw.c b/src/mame/machine/mw8080bw.c index 17253c23bbb..5ac8955bdb5 100644 --- a/src/mame/machine/mw8080bw.c +++ b/src/mame/machine/mw8080bw.c @@ -53,7 +53,7 @@ static TIMER_CALLBACK( mw8080bw_interrupt_callback ) int vpos = machine.primary_screen->vpos(); UINT8 counter = vpos_to_vysnc_chain_counter(vpos); UINT8 vector = 0xc7 | ((counter & 0x40) >> 2) | ((~counter & 0x40) >> 3); - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, vector); + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, vector); /* set up for next interrupt */ if (counter == MW8080BW_INT_TRIGGER_COUNT_1) diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index 563510e6d6a..5ea6201b07b 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -564,7 +564,7 @@ void n64_periphs::sp_set_status(UINT32 status) //printf("sp_set_status: %08x\n", status); if (status & 0x1) { - device_set_input_line(rspcpu, INPUT_LINE_HALT, ASSERT_LINE); + rspcpu->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); rspcpu->state().set_state_int(RSP_SR, rspcpu->state().state_int(RSP_SR) | RSP_STATUS_HALT); } @@ -612,7 +612,7 @@ UINT32 n64_periphs::sp_reg_r(UINT32 offset) case 0x1c/4: // SP_SEMAPHORE_REG //machine().scheduler().boost_interleave(attotime::from_usec(1), attotime::from_usec(1)); - device_yield(machine().device("maincpu")); + machine().device("maincpu")->execute().yield(); if( sp_semaphore ) { ret = 1; @@ -724,13 +724,13 @@ void n64_periphs::sp_reg_w(UINT32 offset, UINT32 data, UINT32 mem_mask) // printf( "RSP_STATUS_REG Write; %08x\n", data ); if (data & 0x00000001) // clear halt { - device_set_input_line(rspcpu, INPUT_LINE_HALT, CLEAR_LINE); + rspcpu->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE); newstatus &= ~RSP_STATUS_HALT; //printf("***SP HALT CLR***\n"); fflush(stdout); } if (data & 0x00000002) // set halt { - device_set_input_line(rspcpu, INPUT_LINE_HALT, ASSERT_LINE); + rspcpu->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); newstatus |= RSP_STATUS_HALT; //printf("***SP HALT SET***\n"); fflush(stdout); } @@ -761,7 +761,7 @@ void n64_periphs::sp_reg_w(UINT32 offset, UINT32 data, UINT32 mem_mask) if(!(oldstatus & (RSP_STATUS_BROKE | RSP_STATUS_HALT))) { rspcpu->state().set_state_int(RSP_STEPCNT, 1 ); - device_yield(machine().device("rsp")); + machine().device("rsp")->execute().yield(); } } if (data & 0x00000080) @@ -1407,7 +1407,7 @@ WRITE32_MEMBER( n64_periphs::ai_reg_w ) static TIMER_CALLBACK(pi_dma_callback) { machine.device("rcp")->pi_dma_tick(); - device_yield(machine.device("rsp")); + machine.device("rsp")->execute().yield(); } void n64_periphs::pi_dma_tick() diff --git a/src/mame/machine/namco06.c b/src/mame/machine/namco06.c index 619411a4280..ecb836f9cff 100644 --- a/src/mame/machine/namco06.c +++ b/src/mame/machine/namco06.c @@ -123,7 +123,7 @@ static TIMER_CALLBACK( nmi_generate ) { LOG(("NMI cpu '%s'\n",state->m_nmicpu->tag())); - device_set_input_line(state->m_nmicpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_nmicpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } else LOG(("NMI not generated because cpu '%s' is suspended\n",state->m_nmicpu->tag())); diff --git a/src/mame/machine/namco50.c b/src/mame/machine/namco50.c index 8a74ef6f800..f0c058bf8d1 100644 --- a/src/mame/machine/namco50.c +++ b/src/mame/machine/namco50.c @@ -205,14 +205,14 @@ static WRITE8_HANDLER( namco_50xx_O_w ) static TIMER_CALLBACK( namco_50xx_irq_clear ) { namco_50xx_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); } static void namco_50xx_irq_set(device_t *device) { namco_50xx_state *state = get_safe_token(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/machine/namco53.c b/src/mame/machine/namco53.c index c673c66e074..f5828e53a8d 100644 --- a/src/mame/machine/namco53.c +++ b/src/mame/machine/namco53.c @@ -113,13 +113,13 @@ static WRITE8_HANDLER( namco_53xx_P_w ) static TIMER_CALLBACK( namco_53xx_irq_clear ) { namco_53xx_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); } void namco_53xx_read_request(device_t *device) { namco_53xx_state *state = get_safe_token(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/machine/namcos2.c b/src/mame/machine/namcos2.c index 321420c7083..73a834e28e1 100644 --- a/src/mame/machine/namcos2.c +++ b/src/mame/machine/namcos2.c @@ -501,7 +501,7 @@ ReadWriteC148( address_space *space, offs_t offset, UINT16 data, int bWrite ) // If writing an IRQ priority register, clear any pending IRQs. // Dirt Fox and Winning Run require this behaviour if (reg < 8) - device_set_input_line(&space->device(), pC148Reg[reg], CLEAR_LINE); + space->device().execute().set_input_line(pC148Reg[reg], CLEAR_LINE); pC148Reg[reg] = data & 0x0007; } @@ -525,7 +525,7 @@ ReadWriteC148( address_space *space, offs_t offset, UINT16 data, int bWrite ) // mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); /* Dubious to assert IRQ for other CPU here, but Starblade seems to rely on it. It fails to show large polygons otherwise. */ - device_set_input_line(altcpu, pC148RegAlt[NAMCOS2_C148_CPUIRQ], ASSERT_LINE); + altcpu->execute().set_input_line(pC148RegAlt[NAMCOS2_C148_CPUIRQ], ASSERT_LINE); } break; @@ -536,7 +536,7 @@ ReadWriteC148( address_space *space, offs_t offset, UINT16 data, int bWrite ) { // mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); /* Dubious to assert IRQ for other CPU here: Rolling Thunder 2 and Fine Hour break. */ - // device_set_input_line(altcpu, pC148RegAlt[NAMCOS2_C148_CPUIRQ], ASSERT_LINE); + // altcpu->execute().set_input_line(pC148RegAlt[NAMCOS2_C148_CPUIRQ], ASSERT_LINE); } break; @@ -544,26 +544,26 @@ ReadWriteC148( address_space *space, offs_t offset, UINT16 data, int bWrite ) /* IRQ ack */ case 0x1d6000: /* NAMCOS2_C148_CPUIRQ */ // if( bWrite ) mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); - device_set_input_line(&space->device(), pC148Reg[NAMCOS2_C148_CPUIRQ], CLEAR_LINE); + space->device().execute().set_input_line(pC148Reg[NAMCOS2_C148_CPUIRQ], CLEAR_LINE); break; case 0x1d8000: /* NAMCOS2_C148_EXIRQ */ // if( bWrite ) mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); - device_set_input_line(&space->device(), pC148Reg[NAMCOS2_C148_EXIRQ], CLEAR_LINE); + space->device().execute().set_input_line(pC148Reg[NAMCOS2_C148_EXIRQ], CLEAR_LINE); break; case 0x1da000: /* NAMCOS2_C148_POSIRQ */ // if( bWrite ) mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); - device_set_input_line(&space->device(), pC148Reg[NAMCOS2_C148_POSIRQ], CLEAR_LINE); + space->device().execute().set_input_line(pC148Reg[NAMCOS2_C148_POSIRQ], CLEAR_LINE); break; case 0x1dc000: /* NAMCOS2_C148_SERIRQ */ // if( bWrite ) mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); - device_set_input_line(&space->device(), pC148Reg[NAMCOS2_C148_SERIRQ], CLEAR_LINE); + space->device().execute().set_input_line(pC148Reg[NAMCOS2_C148_SERIRQ], CLEAR_LINE); break; case 0x1de000: /* NAMCOS2_C148_VBLANKIRQ */ - device_set_input_line(&space->device(), pC148Reg[NAMCOS2_C148_VBLANKIRQ], CLEAR_LINE); + space->device().execute().set_input_line(pC148Reg[NAMCOS2_C148_VBLANKIRQ], CLEAR_LINE); break; @@ -578,7 +578,7 @@ ReadWriteC148( address_space *space, offs_t offset, UINT16 data, int bWrite ) { /* Resume execution */ space->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE); - device_yield(&space->device()); + space->device().execute().yield(); } else { @@ -603,7 +603,7 @@ ReadWriteC148( address_space *space, offs_t offset, UINT16 data, int bWrite ) { /* Resume execution */ ResetAllSubCPUs(space->machine(), CLEAR_LINE); /* Give the new CPU an immediate slice of the action */ - device_yield(&space->device()); + space->device().execute().yield(); } else { /* Suspend execution */ @@ -687,14 +687,14 @@ INTERRUPT_GEN( namcos2_68k_master_vblank ) { namcos2_shared_state *state = device->machine().driver_data(); if (!state->is_system21()) namcos2_adjust_posirq_timer(device->machine(), GetPosIRQScanline(device->machine())); - device_set_input_line(device, namcos2_68k_master_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); + device->execute().set_input_line(namcos2_68k_master_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); } INTERRUPT_GEN( namcos2_68k_slave_vblank ) { namcos2_shared_state *state = device->machine().driver_data(); if (!state->is_system21()) namcos2_adjust_posirq_timer(device->machine(), GetPosIRQScanline(device->machine())); - device_set_input_line(device, namcos2_68k_slave_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); + device->execute().set_input_line(namcos2_68k_slave_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); } INTERRUPT_GEN( namcos2_68k_gpu_vblank ) @@ -705,7 +705,7 @@ INTERRUPT_GEN( namcos2_68k_gpu_vblank ) //printf( "namcos2_68k_gpu_vblank(%d)\n",namcos2_68k_gpu_C148[NAMCOS2_C148_POSIRQ] ); namcos2_adjust_posirq_timer(device->machine(), scanline); - device_set_input_line(device, namcos2_68k_gpu_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); + device->execute().set_input_line(namcos2_68k_gpu_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); } /**************************************************************/ diff --git a/src/mame/machine/naomi.c b/src/mame/machine/naomi.c index deaa1b184df..0c5abd92500 100644 --- a/src/mame/machine/naomi.c +++ b/src/mame/machine/naomi.c @@ -29,8 +29,8 @@ UINT16 actel_id; static READ64_HANDLER( naomi_biose_idle_skip_r ) { if (space->device().safe_pc()==0xc04173c) - device_spin_until_time(&space->device(), attotime::from_usec(500)); - //device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_time(attotime::from_usec(500)); + //space->device().execute().spin_until_interrupt(); // else // printf("%08x\n", space->device().safe_pc()); @@ -40,7 +40,7 @@ static READ64_HANDLER( naomi_biose_idle_skip_r ) static READ64_HANDLER( naomi_biosh_idle_skip_r ) { if (space->device().safe_pc()==0xc045ffc) - device_spin_until_time(&space->device(), attotime::from_usec(500)); + space->device().execute().spin_until_time(attotime::from_usec(500)); // printf("%08x\n", space->device().safe_pc()); @@ -50,8 +50,8 @@ static READ64_HANDLER( naomi_biosh_idle_skip_r ) static READ64_HANDLER( naomi2_biose_idle_skip_r ) { if (space->device().safe_pc()==0xc04637c) - device_spin_until_time(&space->device(), attotime::from_usec(500)); - //device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_time(attotime::from_usec(500)); + //space->device().execute().spin_until_interrupt(); // else // printf("%08x\n", space->device().safe_pc()); @@ -244,7 +244,7 @@ DRIVER_INIT_MEMBER(dc_state,naomigd_mp) static READ64_HANDLER( naomigd_ggxxsla_idle_skip_r ) { if (space->device().safe_pc()==0x0c0c9adc) - device_spin_until_time(&space->device(), attotime::from_usec(500)); + space->device().execute().spin_until_time(attotime::from_usec(500)); return naomi_ram64[0x1aae18/8]; } @@ -258,7 +258,7 @@ DRIVER_INIT_MEMBER(dc_state,ggxxsla) static READ64_HANDLER( naomigd_ggxx_idle_skip_r ) { if (space->device().safe_pc()==0xc0b5c3c) // or 0xc0bab0c - device_spin_until_time(&space->device(), attotime::from_usec(500)); + space->device().execute().spin_until_time(attotime::from_usec(500)); return naomi_ram64[0x1837b8/8]; } @@ -273,7 +273,7 @@ DRIVER_INIT_MEMBER(dc_state,ggxx) static READ64_HANDLER( naomigd_ggxxrl_idle_skip_r ) { if (space->device().safe_pc()==0xc0b84bc) // or 0xc0bab0c - device_spin_until_time(&space->device(), attotime::from_usec(500)); + space->device().execute().spin_until_time(attotime::from_usec(500)); //printf("%08x\n", space->device().safe_pc()); @@ -290,7 +290,7 @@ DRIVER_INIT_MEMBER(dc_state,ggxxrl) static READ64_HANDLER( naomigd_sfz3ugd_idle_skip_r ) { if (space->device().safe_pc()==0xc36a2dc) - device_spin_until_time(&space->device(), attotime::from_usec(500)); + space->device().execute().spin_until_time(attotime::from_usec(500)); return naomi_ram64[0x5dc900/8]; } @@ -335,8 +335,8 @@ DRIVER_INIT_MEMBER(dc_state,kick4csh) static READ64_HANDLER( hotd2_idle_skip_r ) { if (space->device().safe_pc()==0xc0cfcbc) - device_spin_until_time(&space->device(), attotime::from_usec(500)); - //device_spin_until_interrupt(&space->device()); + space->device().execute().spin_until_time(attotime::from_usec(500)); + //space->device().execute().spin_until_interrupt(); // else // printf("%08x\n", space->device().safe_pc()); diff --git a/src/mame/machine/nb1413m3.c b/src/mame/machine/nb1413m3.c index c40741588fa..576b0c0c099 100644 --- a/src/mame/machine/nb1413m3.c +++ b/src/mame/machine/nb1413m3.c @@ -192,7 +192,7 @@ INTERRUPT_GEN( nb1413m3_interrupt ) { // nb1413m3_busyflag = 1; // nb1413m3_busyctr = 0; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); #if NB1413M3_DEBUG popmessage("NMI SW:%01X CLOCK:%02X COUNT:%02X", nb1413m3_nmi_enable, nb1413m3_nmi_clock, nb1413m3_nmi_count); diff --git a/src/mame/machine/nitedrvr.c b/src/mame/machine/nitedrvr.c index 735a8e116a1..655e600e32a 100644 --- a/src/mame/machine/nitedrvr.c +++ b/src/mame/machine/nitedrvr.c @@ -278,7 +278,7 @@ MACHINE_START( nitedrvr ) { nitedrvr_state *state = machine.driver_data(); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_discrete = machine.device("discrete"); state->save_item(NAME(state->m_gear)); diff --git a/src/mame/machine/nycaptor.c b/src/mame/machine/nycaptor.c index 1b8508b7c55..91dc34fc1b1 100644 --- a/src/mame/machine/nycaptor.c +++ b/src/mame/machine/nycaptor.c @@ -47,7 +47,7 @@ WRITE8_MEMBER(nycaptor_state::nycaptor_68705_port_b_w) m_port_a_in = m_from_main; if (m_main_sent) - device_set_input_line(m_mcu, 0, CLEAR_LINE); + m_mcu->execute().set_input_line(0, CLEAR_LINE); m_main_sent = 0; } @@ -94,7 +94,7 @@ WRITE8_MEMBER(nycaptor_state::nycaptor_mcu_w) m_from_main = data; m_main_sent = 1; - device_set_input_line(m_mcu, 0, ASSERT_LINE); + m_mcu->execute().set_input_line(0, ASSERT_LINE); } READ8_MEMBER(nycaptor_state::nycaptor_mcu_r) diff --git a/src/mame/machine/pgmprot2.c b/src/mame/machine/pgmprot2.c index 63526107a6f..01f37cb8c0d 100644 --- a/src/mame/machine/pgmprot2.c +++ b/src/mame/machine/pgmprot2.c @@ -37,7 +37,7 @@ static READ32_HANDLER( arm7_latch_arm_r ) { pgm_arm_type2_state *state = space->machine().driver_data(); - device_set_input_line(state->m_prot, ARM7_FIRQ_LINE, CLEAR_LINE ); // guess + state->m_prot->set_input_line(ARM7_FIRQ_LINE, CLEAR_LINE ); // guess if (PGMARM7LOGERROR) logerror("ARM7: Latch read: %08x (%08x) (%06x)\n", state->m_kov2_latchdata_68k_w, mem_mask, space->device().safe_pc()); @@ -89,7 +89,7 @@ static WRITE16_HANDLER( arm7_latch_68k_w ) logerror("M68K: Latch write: %04x (%04x) (%06x)\n", data & 0x0000ffff, mem_mask, space->device().safe_pc()); COMBINE_DATA(&state->m_kov2_latchdata_68k_w); - device_set_input_line(state->m_prot, ARM7_FIRQ_LINE, ASSERT_LINE ); // guess + state->m_prot->set_input_line(ARM7_FIRQ_LINE, ASSERT_LINE ); // guess } static READ16_HANDLER( arm7_ram_r ) @@ -271,7 +271,7 @@ static READ32_HANDLER( ddp2_speedup_r ) if (r4==0x18002f9e) { UINT32 data2 = state->m_arm_ram[0x2F9C/4]&0xffff0000; - if ((data==0x00000000) && (data2==0x00000000)) device_spin_until_interrupt(&space->device()); + if ((data==0x00000000) && (data2==0x00000000)) space->device().execute().spin_until_interrupt(); } } @@ -284,8 +284,8 @@ static READ16_HANDLER( ddp2_main_speedup_r ) UINT16 data = pgm_mainram[0x0ee54/2]; int pc = space->device().safe_pc(); - if (pc == 0x149dce) device_spin_until_interrupt(&space->device()); - if (pc == 0x149cfe) device_spin_until_interrupt(&space->device()); + if (pc == 0x149dce) space->device().execute().spin_until_interrupt(); + if (pc == 0x149cfe) space->device().execute().spin_until_interrupt(); return data; diff --git a/src/mame/machine/pgmprot3.c b/src/mame/machine/pgmprot3.c index 03fec839b7a..7f96592dbc4 100644 --- a/src/mame/machine/pgmprot3.c +++ b/src/mame/machine/pgmprot3.c @@ -270,7 +270,7 @@ static READ32_HANDLER( dmnfrnt_speedup_r ) { pgm_arm_type3_state *state = space->machine().driver_data(); int pc = space->device().safe_pc(); - if (pc == 0x8000fea) device_eat_cycles(&space->device(), 500); + if (pc == 0x8000fea) space->device().execute().eat_cycles(500); // else printf("dmn_speedup_r %08x\n", pc); return state->m_arm_ram[0x000444/4]; } @@ -279,8 +279,8 @@ static READ16_HANDLER( dmnfrnt_main_speedup_r ) { UINT16 data = pgm_mainram[0xa03c/2]; int pc = space->device().safe_pc(); - if (pc == 0x10193a) device_spin_until_interrupt(&space->device()); - else if (pc == 0x1019a4) device_spin_until_interrupt(&space->device()); + if (pc == 0x10193a) space->device().execute().spin_until_interrupt(); + else if (pc == 0x1019a4) space->device().execute().spin_until_interrupt(); return data; } diff --git a/src/mame/machine/playch10.c b/src/mame/machine/playch10.c index 1ea896c4e15..42372aa8500 100644 --- a/src/mame/machine/playch10.c +++ b/src/mame/machine/playch10.c @@ -843,7 +843,7 @@ static void gboard_scanline_cb( device_t *device, int scanline, int vblank, int if (state->m_IRQ_enable && !blanked && (state->m_IRQ_count == 0) && priorCount) // according to blargg the latter should be present as well, but it breaks Rampart and Joe & Mac US: they probably use the alt irq! { - device_set_input_line(device->machine().device("cart"), 0, HOLD_LINE); + device->machine().device("cart")->execute().set_input_line(0, HOLD_LINE); } } } diff --git a/src/mame/machine/scudsp.c b/src/mame/machine/scudsp.c index c028ed4b2cc..2d5ba1f4775 100644 --- a/src/mame/machine/scudsp.c +++ b/src/mame/machine/scudsp.c @@ -754,7 +754,7 @@ static TIMER_CALLBACK( dsp_ended ) saturn_state *state = machine.driver_data(); if(!(state->m_scu.ism & IRQ_DSP_END)) - device_set_input_line_and_vector(state->m_maincpu, 0xa, HOLD_LINE, 0x45); + state->m_maincpu->set_input_line_and_vector(0xa, HOLD_LINE, 0x45); else state->m_scu.ist |= (IRQ_DSP_END); diff --git a/src/mame/machine/simpsons.c b/src/mame/machine/simpsons.c index a573898d06c..f530c16e74a 100644 --- a/src/mame/machine/simpsons.c +++ b/src/mame/machine/simpsons.c @@ -47,7 +47,7 @@ WRITE8_MEMBER(simpsons_state::simpsons_coin_counter_w) READ8_MEMBER(simpsons_state::simpsons_sound_interrupt_r) { - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff ); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff ); return 0x00; } @@ -83,8 +83,8 @@ MACHINE_START( simpsons ) state->m_xtraram = auto_alloc_array_clear(machine, UINT8, 0x1000); state->m_spriteram = auto_alloc_array_clear(machine, UINT16, 0x1000 / 2); - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_k053260 = machine.device("k053260"); state->m_k052109 = machine.device("k052109"); state->m_k053246 = machine.device("k053246"); diff --git a/src/mame/machine/slapfght.c b/src/mame/machine/slapfght.c index 1b6b2768e9a..6956d9f5a59 100644 --- a/src/mame/machine/slapfght.c +++ b/src/mame/machine/slapfght.c @@ -766,7 +766,7 @@ INTERRUPT_GEN( getstar_interrupt ) { slapfght_state *state = device->machine().driver_data(); if (state->m_getstar_sh_intenabled) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } #ifdef UNUSED_FUNCTION diff --git a/src/mame/machine/smpc.c b/src/mame/machine/smpc.c index 1274c9308aa..5014eb11348 100644 --- a/src/mame/machine/smpc.c +++ b/src/mame/machine/smpc.c @@ -215,14 +215,14 @@ static void smpc_master_on(running_machine &machine) { saturn_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, CLEAR_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); } static TIMER_CALLBACK( smpc_slave_enable ) { saturn_state *state = machine.driver_data(); - device_set_input_line(state->m_slave, INPUT_LINE_RESET, param ? ASSERT_LINE : CLEAR_LINE); + state->m_slave->set_input_line(INPUT_LINE_RESET, param ? ASSERT_LINE : CLEAR_LINE); state->m_smpc.OREG[31] = param + 0x02; //read-back for last command issued state->m_smpc.SF = 0x00; //clear hand-shake flag } @@ -231,7 +231,7 @@ static TIMER_CALLBACK( smpc_sound_enable ) { saturn_state *state = machine.driver_data(); - device_set_input_line(state->m_audiocpu, INPUT_LINE_RESET, param ? ASSERT_LINE : CLEAR_LINE); + state->m_audiocpu->set_input_line(INPUT_LINE_RESET, param ? ASSERT_LINE : CLEAR_LINE); state->m_en_68k = param ^ 1; state->m_smpc.OREG[31] = param + 0x06; //read-back for last command issued state->m_smpc.SF = 0x00; //clear hand-shake flag @@ -253,7 +253,7 @@ static void smpc_system_reset(running_machine &machine) memset(state->m_vdp1_vram,0x00,0x100000); //A-Bus - device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, PULSE_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); } static TIMER_CALLBACK( smpc_change_clock ) @@ -272,8 +272,8 @@ static TIMER_CALLBACK( smpc_change_clock ) stv_vdp2_dynamic_res_change(machine); if(!state->m_NMI_reset) - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); - device_set_input_line(state->m_slave, INPUT_LINE_RESET, ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + state->m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* put issued command in OREG31 */ state->m_smpc.OREG[31] = 0x0e + param; @@ -316,7 +316,7 @@ static TIMER_CALLBACK( stv_smpc_intback ) // /*This is for RTC,cartridge code and similar stuff...*/ //if(LOG_SMPC) printf ("Interrupt: System Manager (SMPC) at scanline %04x, Vector 0x47 Level 0x08\n",scanline); if(!(state->m_scu.ism & IRQ_SMPC)) - device_set_input_line_and_vector(state->m_maincpu, 8, HOLD_LINE, 0x47); + state->m_maincpu->set_input_line_and_vector(8, HOLD_LINE, 0x47); else state->m_scu.ist |= (IRQ_SMPC); @@ -515,7 +515,7 @@ static TIMER_CALLBACK( intback_peripheral ) } if(!(state->m_scu.ism & IRQ_SMPC)) - device_set_input_line_and_vector(state->m_maincpu, 8, HOLD_LINE, 0x47); + state->m_maincpu->set_input_line_and_vector(8, HOLD_LINE, 0x47); else state->m_scu.ist |= (IRQ_SMPC); @@ -563,7 +563,7 @@ static TIMER_CALLBACK( saturn_smpc_intback ) state->m_smpc.pmode = state->m_smpc.IREG[0]>>4; if(!(state->m_scu.ism & IRQ_SMPC)) - device_set_input_line_and_vector(state->m_maincpu, 8, HOLD_LINE, 0x47); + state->m_maincpu->set_input_line_and_vector(8, HOLD_LINE, 0x47); else state->m_scu.ist |= (IRQ_SMPC); @@ -609,7 +609,7 @@ static void smpc_nmi_req(running_machine &machine) saturn_state *state = machine.driver_data(); /*NMI is unconditionally requested */ - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static void smpc_nmi_set(running_machine &machine,UINT8 cmd) @@ -810,7 +810,7 @@ WRITE8_HANDLER( stv_SMPC_w ) if(LOG_SMPC) printf("SMPC: M68k %s\n",(data & 0x10) ? "off" : "on"); //space->machine().scheduler().timer_set(attotime::from_usec(100), FUNC(smpc_sound_enable),(state->m_smpc_ram[0x77] & 0x10) >> 4); - device_set_input_line(state->m_audiocpu, INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); + state->m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); state->m_en_68k = ((data & 0x10) >> 4) ^ 1; //if(LOG_SMPC) printf("SMPC: ram [0x77] = %02x\n",data); diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c index 928900ce5a9..e7d069e8864 100644 --- a/src/mame/machine/snes.c +++ b/src/mame/machine/snes.c @@ -106,7 +106,7 @@ static TIMER_CALLBACK( snes_nmi_tick ) snes_state *state = machine.driver_data(); // pull NMI - device_set_input_line(state->m_maincpu, G65816_LINE_NMI, ASSERT_LINE); + state->m_maincpu->set_input_line(G65816_LINE_NMI, ASSERT_LINE); // don't happen again state->m_nmi_timer->adjust(attotime::never); @@ -120,7 +120,7 @@ static void snes_hirq_tick( running_machine &machine ) // (don't need to switch to the 65816 context, we don't do anything dependant on it) snes_latch_counters(machine); snes_ram[TIMEUP] = 0x80; /* Indicate that irq occurred */ - device_set_input_line(state->m_maincpu, G65816_LINE_IRQ, ASSERT_LINE); + state->m_maincpu->set_input_line(G65816_LINE_IRQ, ASSERT_LINE); // don't happen again state->m_hirq_timer->adjust(attotime::never); @@ -180,7 +180,7 @@ static TIMER_CALLBACK( snes_scanline_tick ) snes_ram[TIMEUP] = 0x80; /* Indicate that irq occurred */ // IRQ latches the counters, do it now snes_latch_counters(machine); - device_set_input_line(state->m_maincpu, G65816_LINE_IRQ, ASSERT_LINE ); + state->m_maincpu->set_input_line(G65816_LINE_IRQ, ASSERT_LINE ); } } /* Horizontal IRQ timer */ @@ -244,7 +244,7 @@ static TIMER_CALLBACK( snes_scanline_tick ) snes_ram[STAT78] ^= 0x80; /* Toggle field flag */ snes_ppu.stat77_flags &= 0x3f; /* Clear Time Over and Range Over bits */ - device_set_input_line(state->m_maincpu, G65816_LINE_NMI, CLEAR_LINE ); + state->m_maincpu->set_input_line(G65816_LINE_NMI, CLEAR_LINE ); } state->m_scanline_timer->adjust(attotime::never); @@ -511,7 +511,7 @@ READ8_HANDLER( snes_r_io ) return value | 2; //CPU version number case TIMEUP: /* IRQ flag by H/V count timer */ value = (snes_open_bus_r(space, 0) & 0x7f) | (snes_ram[TIMEUP] & 0x80); - device_set_input_line(state->m_maincpu, G65816_LINE_IRQ, CLEAR_LINE ); + state->m_maincpu->set_input_line(G65816_LINE_IRQ, CLEAR_LINE ); snes_ram[TIMEUP] = 0; // flag is cleared on both read and write return value; case HVBJOY: /* H/V blank and joypad controller enable */ @@ -688,7 +688,7 @@ WRITE8_HANDLER( snes_w_io ) case NMITIMEN: /* Flag for v-blank, timer int. and joy read */ if((data & 0x30) == 0x00) { - device_set_input_line(state->m_maincpu, G65816_LINE_IRQ, CLEAR_LINE ); + state->m_maincpu->set_input_line(G65816_LINE_IRQ, CLEAR_LINE ); snes_ram[TIMEUP] = 0; // clear pending IRQ if irq is disabled here, 3x3 Eyes - Seima Korin Den behaves on this } break; @@ -726,7 +726,7 @@ WRITE8_HANDLER( snes_w_io ) space->machine().scheduler().timer_set(space->machine().primary_screen->time_until_pos(snes_ppu.beam.current_vert + 1), FUNC(snes_reset_hdma)); break; case TIMEUP: // IRQ Flag is cleared on both read and write - device_set_input_line(state->m_maincpu, G65816_LINE_IRQ, CLEAR_LINE ); + state->m_maincpu->set_input_line(G65816_LINE_IRQ, CLEAR_LINE ); snes_ram[TIMEUP] = 0; return; /* Following are read-only */ @@ -759,7 +759,7 @@ WRITE8_HANDLER( snes_w_io ) WRITE_LINE_DEVICE_HANDLER( snes_extern_irq_w ) { snes_state *driver_state = device->machine().driver_data(); - device_set_input_line(driver_state->m_maincpu, G65816_LINE_IRQ, state); + driver_state->m_maincpu->set_input_line(G65816_LINE_IRQ, state); } /************************************* diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c index 811dff67024..e8a608de008 100644 --- a/src/mame/machine/stfight.c +++ b/src/mame/machine/stfight.c @@ -119,7 +119,7 @@ static TIMER_CALLBACK( stfight_interrupt_1 ) INTERRUPT_GEN( stfight_vb_interrupt ) { // Do a RST10 - device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xd7); + device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); device->machine().scheduler().timer_set(attotime::from_hz(120), FUNC(stfight_interrupt_1)); } diff --git a/src/mame/machine/subs.c b/src/mame/machine/subs.c index 393af691b3c..e64bc6df498 100644 --- a/src/mame/machine/subs.c +++ b/src/mame/machine/subs.c @@ -27,7 +27,7 @@ INTERRUPT_GEN( subs_interrupt ) { /* only do NMI interrupt if not in TEST mode */ if ((device->machine().root_device().ioport("IN1")->read() & 0x40)==0x40) - 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/machine/tnzs.c b/src/mame/machine/tnzs.c index d9e8217c946..9ee759afc46 100644 --- a/src/mame/machine/tnzs.c +++ b/src/mame/machine/tnzs.c @@ -48,7 +48,7 @@ READ8_MEMBER(tnzs_state::mcu_tnzs_r) UINT8 data; data = upi41_master_r(m_mcu, offset & 1); - device_yield(&space.device()); + space.device().execute().yield(); // logerror("PC %04x: read %02x from mcu $c00%01x\n", space.device().safe_pcbase(), data, offset); @@ -636,7 +636,7 @@ INTERRUPT_GEN( arknoid2_interrupt ) break; } - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } MACHINE_RESET( tnzs ) @@ -687,7 +687,7 @@ MACHINE_START( jpopnics ) state->membank("subbank")->configure_entries(0, 4, &SUB[0x08000], 0x2000); state->membank("subbank")->set_entry(state->m_bank2); - state->m_subcpu = machine.device("sub"); + state->m_subcpu = machine.device("sub"); state->m_mcu = NULL; state->m_bank1 = 2; @@ -707,7 +707,7 @@ MACHINE_START( tnzs ) MACHINE_START_CALL( jpopnics ); - state->m_audiocpu = machine.device("audiocpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_mcu = machine.device("mcu"); state->save_item(NAME(state->m_kageki_csport_sel)); @@ -733,9 +733,9 @@ WRITE8_MEMBER(tnzs_state::tnzs_ramrom_bankswitch_w) /* bit 4 resets the second CPU */ if (data & 0x10) - device_set_input_line(m_subcpu, INPUT_LINE_RESET, CLEAR_LINE); + m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); else - device_set_input_line(m_subcpu, INPUT_LINE_RESET, ASSERT_LINE); + m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* bits 0-2 select RAM/ROM bank */ m_bank1 = data & 0x07; @@ -753,7 +753,7 @@ WRITE8_MEMBER(tnzs_state::tnzs_bankswitch1_w) if (data & 0x04) { if (m_mcu != NULL && m_mcu->type() == I8742) - device_set_input_line(m_mcu, INPUT_LINE_RESET, PULSE_LINE); + m_mcu->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); } /* Coin count and lockout is handled by the i8742 */ break; diff --git a/src/mame/machine/toaplan1.c b/src/mame/machine/toaplan1.c index 36c13ad8a58..011f5624c75 100644 --- a/src/mame/machine/toaplan1.c +++ b/src/mame/machine/toaplan1.c @@ -44,7 +44,7 @@ INTERRUPT_GEN( toaplan1_interrupt ) toaplan1_state *state = device->machine().driver_data(); if (state->m_intenable) - device_set_input_line(device, 4, HOLD_LINE); + device->execute().set_input_line(4, HOLD_LINE); } WRITE16_MEMBER(toaplan1_state::toaplan1_intenable_w) @@ -317,7 +317,7 @@ WRITE16_MEMBER(toaplan1_state::toaplan1_reset_sound) devtag_reset(machine(), "ymsnd"); device_t *audiocpu = machine().device("audiocpu"); if (audiocpu != NULL && audiocpu->type() == Z80) - device_set_input_line(audiocpu, INPUT_LINE_RESET, PULSE_LINE); + audiocpu->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); } } diff --git a/src/mame/machine/twincobr.c b/src/mame/machine/twincobr.c index 72c305d6da6..133ea564d23 100644 --- a/src/mame/machine/twincobr.c +++ b/src/mame/machine/twincobr.c @@ -19,7 +19,7 @@ INTERRUPT_GEN( twincobr_interrupt ) twincobr_state *state = device->machine().driver_data(); if (state->m_intenable) { state->m_intenable = 0; - device_set_input_line(device, M68K_IRQ_4, HOLD_LINE); + device->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); } } @@ -28,7 +28,7 @@ INTERRUPT_GEN( wardner_interrupt ) twincobr_state *state = device->machine().driver_data(); if (state->m_intenable) { state->m_intenable = 0; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } } diff --git a/src/mame/machine/vsnes.c b/src/mame/machine/vsnes.c index ac9eb624ce1..d987d85512f 100644 --- a/src/mame/machine/vsnes.c +++ b/src/mame/machine/vsnes.c @@ -1002,7 +1002,7 @@ WRITE8_MEMBER(vsnes_state::vsdual_vrom_banking) (&space.device() == machine().device("maincpu")) ? membank("bank2")->set_entry(BIT(data, 2)) : membank("bank3")->set_entry(BIT(data, 2)); /* bit 1 ( data & 2 ) triggers irq on the other cpu */ - device_set_input_line(other_cpu, 0, (data & 2) ? CLEAR_LINE : ASSERT_LINE); + other_cpu->execute().set_input_line(0, (data & 2) ? CLEAR_LINE : ASSERT_LINE); /* move along */ if (&space.device() == machine().device("maincpu")) diff --git a/src/mame/machine/xevious.c b/src/mame/machine/xevious.c index f930a320f04..9b1b5bd563b 100644 --- a/src/mame/machine/xevious.c +++ b/src/mame/machine/xevious.c @@ -184,6 +184,6 @@ READ8_HANDLER( battles_input_port_r ) INTERRUPT_GEN( battles_interrupt_4 ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } diff --git a/src/mame/video/1942.c b/src/mame/video/1942.c index ed7a6634223..6b50f25c260 100644 --- a/src/mame/video/1942.c +++ b/src/mame/video/1942.c @@ -180,7 +180,7 @@ WRITE8_MEMBER(_1942_state::c1942_c804_w) coin_counter_w(machine(), 0,data & 0x01); - device_set_input_line(m_audiocpu, INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); flip_screen_set(data & 0x80); } diff --git a/src/mame/video/antic.c b/src/mame/video/antic.c index 2e2c29fa177..3a3dccae922 100644 --- a/src/mame/video/antic.c +++ b/src/mame/video/antic.c @@ -90,7 +90,7 @@ READ8_HANDLER ( atari_antic_r ) data = antic.r.antic09; break; case 10: /* WSYNC read */ - device_spin_until_trigger(space->machine().device("maincpu"), TRIGGER_HSYNC); + space->machine().device("maincpu")->execute().spin_until_trigger(TRIGGER_HSYNC); antic.w.wsync = 1; data = antic.r.antic0a; break; @@ -200,7 +200,7 @@ WRITE8_HANDLER ( atari_antic_w ) break; case 10: /* WSYNC write */ LOG(("ANTIC 0A write WSYNC $%02X\n", data)); - device_spin_until_trigger(space->machine().device("maincpu"), TRIGGER_HSYNC); + space->machine().device("maincpu")->execute().spin_until_trigger(TRIGGER_HSYNC); antic.w.wsync = 1; break; case 11: diff --git a/src/mame/video/arkanoid.c b/src/mame/video/arkanoid.c index 91aa1420fae..5e9a3a03c74 100644 --- a/src/mame/video/arkanoid.c +++ b/src/mame/video/arkanoid.c @@ -67,7 +67,7 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_d008_w) which resets itself). This bit is the likely candidate as it is flipped early in bootup just prior to accessing the MCU for the first time. */ if (m_mcu != NULL) // Bootlegs don't have the MCU but still set this bit - device_set_input_line(m_mcu, INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); + m_mcu->execute().set_input_line(INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); } /* different hook-up, everything except for bits 0-1 and 7 aren't tested afaik. */ diff --git a/src/mame/video/astrocde.c b/src/mame/video/astrocde.c index f5d86ce3ee5..99cd3e7b1ad 100644 --- a/src/mame/video/astrocde.c +++ b/src/mame/video/astrocde.c @@ -835,7 +835,7 @@ static void execute_blit(address_space *space) } while (state->m_pattern_height-- != 0); /* count cycles we ran the bus */ - device_adjust_icount(&space->device(), -cycles); + space->device().execute().adjust_icount(-cycles); } diff --git a/src/mame/video/atari.c b/src/mame/video/atari.c index 6a9ec7ebd3e..c00a6dbe933 100644 --- a/src/mame/video/atari.c +++ b/src/mame/video/atari.c @@ -1160,7 +1160,7 @@ static TIMER_CALLBACK( antic_steal_cycles ) LOG((" @cycle #%3d steal %d cycles\n", cycle(machine), antic.steal_cycles)); after(machine, antic.steal_cycles, FUNC(antic_line_done)); antic.steal_cycles = 0; - device_spin_until_trigger( machine.device("maincpu"), TRIGGER_STEAL ); + machine.device("maincpu")->execute().spin_until_trigger(TRIGGER_STEAL ); } diff --git a/src/mame/video/battlera.c b/src/mame/video/battlera.c index cbb5e3817ce..7cc6bf00607 100644 --- a/src/mame/video/battlera.c +++ b/src/mame/video/battlera.c @@ -371,7 +371,7 @@ TIMER_DEVICE_CALLBACK( battlera_irq ) /* If raster interrupt occurs, refresh screen _up_ to this point */ if (state->m_rcr_enable && (state->m_current_scanline+56)==state->m_HuC6270_registers[6]) { timer.machine().primary_screen->update_partial(state->m_current_scanline); - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); /* RCR interrupt */ + state->m_maincpu->set_input_line(0, HOLD_LINE); /* RCR interrupt */ } /* Start of vblank */ @@ -379,7 +379,7 @@ TIMER_DEVICE_CALLBACK( battlera_irq ) state->m_bldwolf_vblank=1; timer.machine().primary_screen->update_partial(240); if (state->m_irq_enable) - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); /* VBL */ + state->m_maincpu->set_input_line(0, HOLD_LINE); /* VBL */ } /* End of vblank */ diff --git a/src/mame/video/beezer.c b/src/mame/video/beezer.c index 0c20d03125d..1ed9c0c22cd 100644 --- a/src/mame/video/beezer.c +++ b/src/mame/video/beezer.c @@ -13,9 +13,9 @@ TIMER_DEVICE_CALLBACK( beezer_interrupt ) via_0->write_ca2((scanline & 0x20) ? 1 : 0); #if 0 if (scanline == 240) // actually unused by the game! (points to a tight loop) - device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, ASSERT_LINE); + state->m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); else - device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE); + state->m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); #endif } diff --git a/src/mame/video/bfm_adr2.c b/src/mame/video/bfm_adr2.c index 59b58c6b619..e4e2febb1a3 100644 --- a/src/mame/video/bfm_adr2.c +++ b/src/mame/video/bfm_adr2.c @@ -253,7 +253,7 @@ INTERRUPT_GEN( adder2_vbl ) if ( adder2_c101 & 0x01 ) { adder_vbl_triggered = 1; - device_set_input_line(device, M6809_IRQ_LINE, HOLD_LINE ); + device->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE ); } } diff --git a/src/mame/video/bfm_dm01.c b/src/mame/video/bfm_dm01.c index 7a1a3a3cce1..e486f592e07 100644 --- a/src/mame/video/bfm_dm01.c +++ b/src/mame/video/bfm_dm01.c @@ -238,7 +238,7 @@ void BFM_dm01_writedata(running_machine &machine, UINT8 data) INTERRUPT_GEN( bfm_dm01_vbl ) { - device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE ); + device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE ); } /////////////////////////////////////////////////////////////////////////// diff --git a/src/mame/video/blktiger.c b/src/mame/video/blktiger.c index 891007b2741..b8c34559fef 100644 --- a/src/mame/video/blktiger.c +++ b/src/mame/video/blktiger.c @@ -153,7 +153,7 @@ WRITE8_MEMBER(blktiger_state::blktiger_video_control_w) coin_counter_w(machine(), 1,data & 2); /* bit 5 resets the sound CPU */ - device_set_input_line(m_audiocpu, INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); /* bit 6 flips screen */ flip_screen_set(data & 0x40); diff --git a/src/mame/video/blockade.c b/src/mame/video/blockade.c index eb1f0aa6173..9645634c2e6 100644 --- a/src/mame/video/blockade.c +++ b/src/mame/video/blockade.c @@ -9,7 +9,7 @@ WRITE8_MEMBER(blockade_state::blockade_videoram_w) if (ioport("IN3")->read() & 0x80) { logerror("blockade_videoram_w: scanline %d\n", machine().primary_screen->vpos()); - device_spin_until_interrupt(&space.device()); + space.device().execute().spin_until_interrupt(); } } diff --git a/src/mame/video/capbowl.c b/src/mame/video/capbowl.c index fb47ac35d1c..728a49912c3 100644 --- a/src/mame/video/capbowl.c +++ b/src/mame/video/capbowl.c @@ -19,7 +19,7 @@ static void generate_interrupt( running_machine &machine, int state ) { capbowl_state *driver = machine.driver_data(); - device_set_input_line(driver->m_maincpu, M6809_FIRQ_LINE, state); + driver->m_maincpu->set_input_line(M6809_FIRQ_LINE, state); } static const struct tms34061_interface tms34061intf = diff --git a/src/mame/video/circus.c b/src/mame/video/circus.c index 40b72ab9625..9e7793e09f2 100644 --- a/src/mame/video/circus.c +++ b/src/mame/video/circus.c @@ -90,7 +90,7 @@ static void draw_sprite_collision( running_machine &machine, bitmap_ind16 &bitma } if (collision) - device_set_input_line(state->m_maincpu, 0, ASSERT_LINE); + state->m_maincpu->set_input_line(0, ASSERT_LINE); } static void circus_draw_fg( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect ) diff --git a/src/mame/video/commando.c b/src/mame/video/commando.c index ee1db6ab7e3..5d8511d2e8a 100644 --- a/src/mame/video/commando.c +++ b/src/mame/video/commando.c @@ -60,7 +60,7 @@ WRITE8_MEMBER(commando_state::commando_c804_w) coin_counter_w(machine(), 1, data & 0x02); // bit 4 resets the sound CPU - device_set_input_line(m_audiocpu, INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); // bit 7 flips screen flip_screen_set(data & 0x80); diff --git a/src/mame/video/dec8.c b/src/mame/video/dec8.c index 97b16dc0aac..b52f8707359 100644 --- a/src/mame/video/dec8.c +++ b/src/mame/video/dec8.c @@ -166,9 +166,9 @@ WRITE8_MEMBER(dec8_state::lastmisn_control_w) m_scroll2[2] = (data >> 6) & 1; if (data & 0x80) - device_set_input_line(m_subcpu, INPUT_LINE_RESET, CLEAR_LINE); + m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); else - device_set_input_line(m_subcpu, INPUT_LINE_RESET, ASSERT_LINE); + m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } WRITE8_MEMBER(dec8_state::shackled_control_w) diff --git a/src/mame/video/decocass.c b/src/mame/video/decocass.c index c9c9d6fc646..c6de544f26a 100644 --- a/src/mame/video/decocass.c +++ b/src/mame/video/decocass.c @@ -524,7 +524,7 @@ SCREEN_UPDATE_IND16( decocass ) rectangle clip; if (0xc0 != (screen.machine().root_device().ioport("IN2")->read() & 0xc0)) /* coin slots assert an NMI */ - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); if (0 == (state->m_watchdog_flip & 0x04)) screen.machine().watchdog_reset(); diff --git a/src/mame/video/exidy.c b/src/mame/video/exidy.c index 8d08cefa42b..200cf28cbf8 100644 --- a/src/mame/video/exidy.c +++ b/src/mame/video/exidy.c @@ -74,7 +74,7 @@ INTERRUPT_GEN( exidy_vblank_interrupt ) state->m_int_condition &= ~0x80; /* set the IRQ line */ - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } diff --git a/src/mame/video/fromance.c b/src/mame/video/fromance.c index 327e3bc3aff..e29dd12c3c9 100644 --- a/src/mame/video/fromance.c +++ b/src/mame/video/fromance.c @@ -258,7 +258,7 @@ WRITE8_MEMBER(fromance_state::fromance_scroll_w) static TIMER_CALLBACK( crtc_interrupt_gen ) { fromance_state *state = machine.driver_data(); - device_set_input_line(state->m_subcpu, 0, HOLD_LINE); + state->m_subcpu->set_input_line(0, HOLD_LINE); if (param != 0) state->m_crtc_timer->adjust(machine.primary_screen->frame_period() / param, 0, machine.primary_screen->frame_period() / param); } diff --git a/src/mame/video/gameplan.c b/src/mame/video/gameplan.c index 38f15b5e8ab..a4a0a4e36d1 100644 --- a/src/mame/video/gameplan.c +++ b/src/mame/video/gameplan.c @@ -214,7 +214,7 @@ static WRITE_LINE_DEVICE_HANDLER( video_command_trigger_w ) static TIMER_CALLBACK( via_irq_delayed ) { gameplan_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 0, param); + state->m_maincpu->set_input_line(0, param); } diff --git a/src/mame/video/ginganin.c b/src/mame/video/ginganin.c index 407dc2c1afc..131dd14af72 100644 --- a/src/mame/video/ginganin.c +++ b/src/mame/video/ginganin.c @@ -175,7 +175,7 @@ WRITE16_MEMBER(ginganin_state::ginganin_vregs16_w) break; case 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); break; default: logerror("CPU #0 PC %06X : Warning, videoreg %04X <- %04X\n", space.device().safe_pc(), offset, data); diff --git a/src/mame/video/gticlub.c b/src/mame/video/gticlub.c index 88c116ff73f..95919505e74 100644 --- a/src/mame/video/gticlub.c +++ b/src/mame/video/gticlub.c @@ -449,13 +449,13 @@ WRITE32_HANDLER( K001005_w ) if (space->device().safe_pc() == 0x201ee) { // This is used to make the SHARC timeout - device_spin_until_trigger(&space->device(), 10000); + space->device().execute().spin_until_trigger(10000); } // !!! HACK to get past the FIFO B test (Winding Heat & Midnight Run) !!! if (space->device().safe_pc() == 0x201e6) { // This is used to make the SHARC timeout - device_spin_until_trigger(&space->device(), 10000); + space->device().execute().spin_until_trigger(10000); } break; diff --git a/src/mame/video/homedata.c b/src/mame/video/homedata.c index a6b380b0e16..4073a875133 100644 --- a/src/mame/video/homedata.c +++ b/src/mame/video/homedata.c @@ -116,7 +116,7 @@ static void mrokumei_handleblit( address_space *space, int rom_base ) } /* for(;;) */ finish: - device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } static void reikaids_handleblit( address_space *space, int rom_base ) @@ -214,7 +214,7 @@ static void reikaids_handleblit( address_space *space, int rom_base ) } finish: - device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } static void pteacher_handleblit( address_space *space, int rom_base ) @@ -301,7 +301,7 @@ static void pteacher_handleblit( address_space *space, int rom_base ) } /* for(;;) */ finish: - device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } diff --git a/src/mame/video/konicdev.c b/src/mame/video/konicdev.c index b25ae638ba6..776e763b029 100644 --- a/src/mame/video/konicdev.c +++ b/src/mame/video/konicdev.c @@ -9346,18 +9346,18 @@ READ32_DEVICE_HANDLER( k001005_r ) { if (k001005->fifo_read_ptr < 0x3ff) { - //device_set_input_line(k001005->dsp, SHARC_INPUT_FLAG1, CLEAR_LINE); + //k001005->dsp->execute().set_input_line(SHARC_INPUT_FLAG1, CLEAR_LINE); sharc_set_flag_input(k001005->dsp, 1, CLEAR_LINE); } else { - //device_set_input_line(k001005->dsp, SHARC_INPUT_FLAG1, ASSERT_LINE); + //k001005->dsp->execute().set_input_line(SHARC_INPUT_FLAG1, ASSERT_LINE); sharc_set_flag_input(k001005->dsp, 1, ASSERT_LINE); } } else { - //device_set_input_line(k001005->dsp, SHARC_INPUT_FLAG1, ASSERT_LINE); + //k001005->dsp->execute().set_input_line(SHARC_INPUT_FLAG1, ASSERT_LINE); sharc_set_flag_input(k001005->dsp, 1, ASSERT_LINE); } @@ -9401,18 +9401,18 @@ WRITE32_DEVICE_HANDLER( k001005_w ) { if (k001005->fifo_write_ptr < 0x400) { - //device_set_input_line(k001005->dsp, SHARC_INPUT_FLAG1, ASSERT_LINE); + //k001005->dsp->execute().set_input_line(SHARC_INPUT_FLAG1, ASSERT_LINE); sharc_set_flag_input(k001005->dsp, 1, ASSERT_LINE); } else { - //device_set_input_line(k001005->dsp, SHARC_INPUT_FLAG1, CLEAR_LINE); + //k001005->dsp->execute().set_input_line(SHARC_INPUT_FLAG1, CLEAR_LINE); sharc_set_flag_input(k001005->dsp, 1, CLEAR_LINE); } } else { - //device_set_input_line(k001005->dsp, SHARC_INPUT_FLAG1, ASSERT_LINE); + //k001005->dsp->execute().set_input_line(SHARC_INPUT_FLAG1, ASSERT_LINE); sharc_set_flag_input(k001005->dsp, 1, ASSERT_LINE); } @@ -9427,13 +9427,13 @@ WRITE32_DEVICE_HANDLER( k001005_w ) if (k001005->cpu->safe_pc() == 0x201ee) { // This is used to make the SHARC timeout - device_spin_until_trigger(k001005->cpu, 10000); + k001005->cpu->execute().spin_until_trigger(10000); } // !!! HACK to get past the FIFO B test (Winding Heat & Midnight Run) !!! if (k001005->cpu->safe_pc() == 0x201e6) { // This is used to make the SHARC timeout - device_spin_until_trigger(k001005->cpu, 10000); + k001005->cpu->execute().spin_until_trigger(10000); } break; diff --git a/src/mame/video/liberate.c b/src/mame/video/liberate.c index 693feec1dfd..4cabf464dcd 100644 --- a/src/mame/video/liberate.c +++ b/src/mame/video/liberate.c @@ -120,11 +120,11 @@ WRITE8_MEMBER(liberate_state::deco16_io_w) /* Todo */ break; case 8: /* Irq ack */ - device_set_input_line(m_maincpu, DECO16_IRQ_LINE, CLEAR_LINE); + m_maincpu->set_input_line(DECO16_IRQ_LINE, CLEAR_LINE); break; case 9: /* Sound */ soundlatch_byte_w(space, 0, data); - device_set_input_line(m_audiocpu, M6502_IRQ_LINE, HOLD_LINE); + m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); break; } } @@ -148,11 +148,11 @@ WRITE8_MEMBER(liberate_state::prosoccr_io_w) /* x--- ---- used on the attract mode */ break; case 8: /* Irq ack */ - device_set_input_line(m_maincpu, DECO16_IRQ_LINE, CLEAR_LINE); + m_maincpu->set_input_line(DECO16_IRQ_LINE, CLEAR_LINE); break; case 9: /* Sound */ soundlatch_byte_w(space, 0, data); - device_set_input_line(m_audiocpu, M6502_IRQ_LINE, HOLD_LINE); + m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); break; } } @@ -171,10 +171,10 @@ WRITE8_MEMBER(liberate_state::prosport_io_w) break; case 2: /* Sound */ soundlatch_byte_w(space, 0, data); - device_set_input_line(m_audiocpu, M6502_IRQ_LINE, HOLD_LINE); + m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); break; case 4: /* Irq ack */ - device_set_input_line(m_maincpu, DECO16_IRQ_LINE, CLEAR_LINE); + m_maincpu->set_input_line(DECO16_IRQ_LINE, CLEAR_LINE); break; } } diff --git a/src/mame/video/lockon.c b/src/mame/video/lockon.c index dd5a6be3cad..4ada68b152e 100644 --- a/src/mame/video/lockon.c +++ b/src/mame/video/lockon.c @@ -67,7 +67,7 @@ static TIMER_CALLBACK( cursor_callback ) lockon_state *state = machine.driver_data(); if (state->m_main_inten) - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xff); + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); state->m_cursor_timer->adjust(machine.primary_screen->time_until_pos(CURSOR_YPOS, CURSOR_XPOS)); } @@ -284,8 +284,8 @@ WRITE16_MEMBER(lockon_state::lockon_ground_ctrl_w) static TIMER_CALLBACK( bufend_callback ) { lockon_state *state = machine.driver_data(); - device_set_input_line_and_vector(state->m_ground, 0, HOLD_LINE, 0xff); - device_set_input_line(state->m_object, NEC_INPUT_LINE_POLL, ASSERT_LINE); + state->m_ground->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff); + state->m_object->execute().set_input_line(NEC_INPUT_LINE_POLL, ASSERT_LINE); } /* Get data for a each 8x8x3 ground tile */ @@ -618,7 +618,7 @@ WRITE16_MEMBER(lockon_state::lockon_tza112_w) READ16_MEMBER(lockon_state::lockon_obj_4000_r) { - device_set_input_line(m_object, NEC_INPUT_LINE_POLL, CLEAR_LINE); + m_object->execute().set_input_line(NEC_INPUT_LINE_POLL, CLEAR_LINE); return 0xffff; } diff --git a/src/mame/video/mcd212.c b/src/mame/video/mcd212.c index f1791aa3b2f..0dd8b1ba517 100644 --- a/src/mame/video/mcd212.c +++ b/src/mame/video/mcd212.c @@ -623,7 +623,7 @@ static void mcd212_process_ica(mcd212_regs_t *mcd212, int channel) UINT8 interrupt = (state->m_scc68070_regs.lir >> 4) & 7; if(interrupt) { - device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); + machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); machine.device("maincpu")->execute().set_input_line(M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); } } @@ -633,7 +633,7 @@ static void mcd212_process_ica(mcd212_regs_t *mcd212, int channel) UINT8 interrupt = state->m_scc68070_regs.lir & 7; if(interrupt) { - device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 24 + interrupt); + machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 24 + interrupt); machine.device("maincpu")->execute().set_input_line(M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); } } @@ -714,7 +714,7 @@ static void mcd212_process_dca(mcd212_regs_t *mcd212, int channel) UINT8 interrupt = (state->m_scc68070_regs.lir >> 4) & 7; if(interrupt) { - device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); + machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 56 + interrupt); machine.device("maincpu")->execute().set_input_line(M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); } } @@ -724,7 +724,7 @@ static void mcd212_process_dca(mcd212_regs_t *mcd212, int channel) UINT8 interrupt = state->m_scc68070_regs.lir & 7; if(interrupt) { - device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 24 + interrupt); + machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 24 + interrupt); machine.device("maincpu")->execute().set_input_line(M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); } } diff --git a/src/mame/video/nemesis.c b/src/mame/video/nemesis.c index 2362a674db0..94c59186346 100644 --- a/src/mame/video/nemesis.c +++ b/src/mame/video/nemesis.c @@ -110,7 +110,7 @@ WRITE16_MEMBER(nemesis_state::nemesis_gfx_flipx_word_w) if (ACCESSING_BITS_8_15) { if (data & 0x0100) - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); } } @@ -162,7 +162,7 @@ WRITE16_MEMBER(nemesis_state::salamand_control_port_word_w) coin_lockout_w(machine(), 1, data & 0x0400); if (data & 0x0800) - device_set_input_line(m_audiocpu, 0, HOLD_LINE); + m_audiocpu->set_input_line(0, HOLD_LINE); m_selected_ip = (~data & 0x1000) >> 12; /* citybomb steering & accel */ } diff --git a/src/mame/video/ppu2c0x.c b/src/mame/video/ppu2c0x.c index 441906acc8f..5c22d2ad8d1 100644 --- a/src/mame/video/ppu2c0x.c +++ b/src/mame/video/ppu2c0x.c @@ -1283,7 +1283,7 @@ void ppu2c0x_device::spriteram_dma( address_space *space, const UINT8 page ) } // should last 513 CPU cycles. - device_adjust_icount(&space->device(), -513); + space->device().execute().adjust_icount(-513); } /************************************* diff --git a/src/mame/video/rltennis.c b/src/mame/video/rltennis.c index 4f7d37627f2..2b64155e730 100644 --- a/src/mame/video/rltennis.c +++ b/src/mame/video/rltennis.c @@ -133,7 +133,7 @@ WRITE16_MEMBER(rltennis_state::rlt_blitter_w) if(offset == BLT_START && (((new_data ^ old_data ) & new_data) & BLTSTRT_TRIGGER)) /* blit strobe 0->1 */ { - device_set_input_line(m_maincpu, 1, HOLD_LINE); + m_maincpu->set_input_line(1, HOLD_LINE); int src_x0=(m_blitter[BLT_X_START]>>SRC_SHIFT)+((m_blitter[BLT_FLAGS] & BLTFLAG_SRC_LR)?256:0); int src_y0=(m_blitter[BLT_Y_START]>>SRC_SHIFT)+((m_blitter[BLT_FLAGS]>>3)&0xff00)+(((m_blitter[BLT_START]) & BLTSTRT_ROM_MSB)?(1<<0xd):0); diff --git a/src/mame/video/spdodgeb.c b/src/mame/video/spdodgeb.c index 38591f85436..1d1848de7e2 100644 --- a/src/mame/video/spdodgeb.c +++ b/src/mame/video/spdodgeb.c @@ -90,12 +90,12 @@ TIMER_DEVICE_CALLBACK( spdodgeb_interrupt ) if (scanline == 256) { - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); timer.machine().primary_screen->update_partial(256); } else if ((scanline % 8) == 0) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); timer.machine().primary_screen->update_partial(scanline+16); /* TODO: pretty off ... */ } } diff --git a/src/mame/video/system1.c b/src/mame/video/system1.c index 91ac2ef42b2..ef12b9eefdb 100644 --- a/src/mame/video/system1.c +++ b/src/mame/video/system1.c @@ -250,7 +250,7 @@ INLINE void videoram_wait_states(cpu_device *cpu) const UINT32 fixst_offset = 2 * 4; UINT32 cycles_until_next_fixst = cpu_cycles_per_fixst - ((cpu->total_cycles() - fixst_offset) % cpu_cycles_per_fixst); - device_adjust_icount(cpu, -cycles_until_next_fixst); + cpu->adjust_icount(-cycles_until_next_fixst); } READ8_MEMBER(system1_state::system1_videoram_r) diff --git a/src/mame/video/taito_z.c b/src/mame/video/taito_z.c index c7410b65de4..9b085eb0cb8 100644 --- a/src/mame/video/taito_z.c +++ b/src/mame/video/taito_z.c @@ -824,7 +824,7 @@ WRITE16_MEMBER(taitoz_state::contcirc_out_w) if (ACCESSING_BITS_0_7) { /* bit 0 = reset sub CPU */ - device_set_input_line(m_audiocpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); /* bits 1-3 n.c. */ diff --git a/src/mame/video/tia.c b/src/mame/video/tia.c index 9578cfb171a..41903427c72 100644 --- a/src/mame/video/tia.c +++ b/src/mame/video/tia.c @@ -798,7 +798,7 @@ WRITE8_MEMBER( tia_video_device::WSYNC_w ) if (cycles % 76) { - device_adjust_icount(&space.device(), cycles % 76 - 76); + space.device().execute().adjust_icount(cycles % 76 - 76); } } diff --git a/src/mame/video/tmnt.c b/src/mame/video/tmnt.c index cea60ab83d5..62792be26a7 100644 --- a/src/mame/video/tmnt.c +++ b/src/mame/video/tmnt.c @@ -334,7 +334,7 @@ WRITE16_MEMBER(tmnt_state::tmnt_0a0000_w) /* bit 3 high then low triggers irq on sound CPU */ if (m_last == 0x08 && (data & 0x08) == 0) - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); m_last = data & 0x08; @@ -358,7 +358,7 @@ WRITE16_MEMBER(tmnt_state::punkshot_0a0020_w) /* bit 2 = trigger irq on sound CPU */ if (m_last == 0x04 && (data & 0x04) == 0) - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); m_last = data & 0x04; @@ -378,7 +378,7 @@ WRITE16_MEMBER(tmnt_state::lgtnfght_0a0018_w) /* bit 2 = trigger irq on sound CPU */ if (m_last == 0x00 && (data & 0x04) == 0x04) - device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); + m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); m_last = data & 0x04; diff --git a/src/mame/video/williams.c b/src/mame/video/williams.c index 94bdc9960eb..767da2199e7 100644 --- a/src/mame/video/williams.c +++ b/src/mame/video/williams.c @@ -539,7 +539,7 @@ WRITE8_MEMBER(williams_state::williams_blitter_w) /* based on the number of memory accesses needed to do the blit, compute how long the blit will take */ /* this is just a guess */ estimated_clocks_at_4MHz = 20 + ((data & 4) ? 4 : 2) * accesses; - device_adjust_icount(&space.device(), -((estimated_clocks_at_4MHz + 3) / 4)); + space.device().execute().adjust_icount(-((estimated_clocks_at_4MHz + 3) / 4)); /* Log blits */ logerror("%04X:Blit @ %3d : %02X%02X -> %02X%02X, %3dx%3d, mask=%02X, flags=%02X, icount=%d, win=%d\n", diff --git a/src/mame/video/zaxxon.c b/src/mame/video/zaxxon.c index e3c218d5136..dbdd901dd3b 100644 --- a/src/mame/video/zaxxon.c +++ b/src/mame/video/zaxxon.c @@ -288,7 +288,7 @@ WRITE8_MEMBER(zaxxon_state::congo_sprite_custom_w) int count = m_congo_custom[2]; /* count cycles (just a guess) */ - device_adjust_icount(&space.device(), -count * 5); + space.device().execute().adjust_icount(-count * 5); /* this is just a guess; the chip is hardwired to the spriteram */ while (count-- >= 0) diff --git a/src/mess/drivers/abc1600.c b/src/mess/drivers/abc1600.c index c78a4b14e02..904c11329e1 100644 --- a/src/mess/drivers/abc1600.c +++ b/src/mess/drivers/abc1600.c @@ -1849,7 +1849,7 @@ static IRQ_CALLBACK( abc1600_int_ack ) void abc1600_state::machine_start() { // interrupt callback - device_set_irq_callback(m_maincpu, abc1600_int_ack); + m_maincpu->set_irq_acknowledge_callback(abc1600_int_ack); // HACK fill segment RAM with non-zero values or no boot memset(m_segment_ram, 0xcd, 0x400); diff --git a/src/mess/drivers/adam.c b/src/mess/drivers/adam.c index d750d606c02..e09d02b883f 100644 --- a/src/mess/drivers/adam.c +++ b/src/mess/drivers/adam.c @@ -1171,7 +1171,7 @@ static TIMER_DEVICE_CALLBACK( paddle_tick ) // TODO: improve irq behaviour (see drivers/coleco.c) if (coleco_scan_paddles(timer.machine(), &state->m_joy_status0, &state->m_joy_status1)) - device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); } @@ -1606,8 +1606,8 @@ WRITE_LINE_MEMBER( adam_state::os3_w ) //logerror("Master 6801 read from %04x data %02x\n", m_ba, m_data_out); - device_set_input_line(m_netcpu, M6801_SC1_LINE, ASSERT_LINE); - device_set_input_line(m_netcpu, M6801_SC1_LINE, CLEAR_LINE); + m_netcpu->set_input_line(M6801_SC1_LINE, ASSERT_LINE); + m_netcpu->set_input_line(M6801_SC1_LINE, CLEAR_LINE); } } } diff --git a/src/mess/drivers/alphatro.c b/src/mess/drivers/alphatro.c index 866613afb88..8fb00b9cb4c 100644 --- a/src/mess/drivers/alphatro.c +++ b/src/mess/drivers/alphatro.c @@ -178,7 +178,7 @@ static MC6845_UPDATE_ROW( alphatro_update_row ) INPUT_CHANGED_MEMBER( alphatro_state::alphatro_break ) { - device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE); + m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); } static ADDRESS_MAP_START( alphatro_map, AS_PROGRAM, 8, alphatro_state ) diff --git a/src/mess/drivers/apollo.c b/src/mess/drivers/apollo.c index b67125493e5..37c962f98c1 100644 --- a/src/mess/drivers/apollo.c +++ b/src/mess/drivers/apollo.c @@ -1080,7 +1080,7 @@ DRIVER_INIT_MEMBER(apollo_state,dn3500) { // MLOG1(("driver_init_dn3500")); - device_set_irq_callback(machine().device(MAINCPU), apollo_irq_acknowledge); + machine().device(MAINCPU)->execute().set_irq_acknowledge_callback(apollo_irq_acknowledge); /* hook the RESET line, which resets a slew of other components */ m68k_set_reset_callback(machine().device(MAINCPU), apollo_reset_instr_callback); diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c index e3d5a360cc4..757aaca9112 100644 --- a/src/mess/drivers/apple2.c +++ b/src/mess/drivers/apple2.c @@ -225,14 +225,14 @@ static WRITE8_DEVICE_HANDLER(a2bus_irq_w) { apple2_state *a2 = device->machine().driver_data(); - device_set_input_line(a2->m_maincpu, M6502_IRQ_LINE, data); + a2->m_maincpu->set_input_line(M6502_IRQ_LINE, data); } static WRITE8_DEVICE_HANDLER(a2bus_nmi_w) { apple2_state *a2 = device->machine().driver_data(); - device_set_input_line(a2->m_maincpu, INPUT_LINE_NMI, data); + a2->m_maincpu->set_input_line(INPUT_LINE_NMI, data); } static WRITE8_DEVICE_HANDLER(a2bus_inh_w) diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c index 54fcb523d4c..439e7605644 100644 --- a/src/mess/drivers/apple2gs.c +++ b/src/mess/drivers/apple2gs.c @@ -198,7 +198,7 @@ static WRITE8_DEVICE_HANDLER(a2bus_nmi_w) { apple2gs_state *a2 = device->machine().driver_data(); - device_set_input_line(a2->m_maincpu, INPUT_LINE_NMI, data); + a2->m_maincpu->set_input_line(INPUT_LINE_NMI, data); } static WRITE8_DEVICE_HANDLER(a2bus_inh_w) diff --git a/src/mess/drivers/apricot.c b/src/mess/drivers/apricot.c index 8dc79faa328..a8a0c9dcb76 100644 --- a/src/mess/drivers/apricot.c +++ b/src/mess/drivers/apricot.c @@ -264,7 +264,7 @@ DRIVER_INIT_MEMBER(apricot_state,apricot) prg->unmap_readwrite(0x40000, 0xeffff); prg->install_ram(0x00000, ram_size - 1, ram); - device_set_irq_callback(m_maincpu, apricot_irq_ack); + m_maincpu->set_irq_acknowledge_callback(apricot_irq_ack); m_video_mode = 0; m_display_on = 1; diff --git a/src/mess/drivers/apricotp.c b/src/mess/drivers/apricotp.c index cc09df9bbc6..5aed9a8cad7 100644 --- a/src/mess/drivers/apricotp.c +++ b/src/mess/drivers/apricotp.c @@ -557,7 +557,7 @@ static const sn76496_config psg_intf = void fp_state::machine_start() { // register CPU IRQ callback - device_set_irq_callback(m_maincpu, fp_irq_callback); + m_maincpu->set_irq_acknowledge_callback(fp_irq_callback); // allocate memory m_work_ram = auto_alloc_array(machine(), UINT16, m_ram->size() / 2); diff --git a/src/mess/drivers/atarist.c b/src/mess/drivers/atarist.c index 08a83897d52..1b2a3adb9bf 100644 --- a/src/mess/drivers/atarist.c +++ b/src/mess/drivers/atarist.c @@ -2205,7 +2205,7 @@ void st_state::machine_start() configure_memory(); // set CPU interrupt callback - device_set_irq_callback(m_maincpu, atarist_int_ack); + m_maincpu->set_irq_acknowledge_callback(atarist_int_ack); // allocate timers m_mouse_timer = machine().scheduler().timer_alloc(FUNC(st_mouse_tick)); @@ -2262,7 +2262,7 @@ void ste_state::machine_start() configure_memory(); /* set CPU interrupt callback */ - device_set_irq_callback(m_maincpu, atarist_int_ack); + m_maincpu->set_irq_acknowledge_callback(atarist_int_ack); /* allocate timers */ m_dmasound_timer = machine().scheduler().timer_alloc(FUNC(atariste_dmasound_tick)); @@ -2302,7 +2302,7 @@ void stbook_state::machine_start() } /* set CPU interrupt callback */ - device_set_irq_callback(m_maincpu, atarist_int_ack); + m_maincpu->set_irq_acknowledge_callback(atarist_int_ack); /* register for state saving */ ste_state::state_save(); diff --git a/src/mess/drivers/avigo.c b/src/mess/drivers/avigo.c index d8d5b07f454..b835a3c8424 100644 --- a/src/mess/drivers/avigo.c +++ b/src/mess/drivers/avigo.c @@ -129,9 +129,9 @@ WRITE8_MEMBER(avigo_state::flash_0x8000_write_handler) void avigo_state::refresh_ints() { if (m_irq!=0) - device_set_input_line(m_maincpu, 0, HOLD_LINE); + m_maincpu->set_input_line(0, HOLD_LINE); else - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); } /* does not do anything yet */ diff --git a/src/mess/drivers/bml3.c b/src/mess/drivers/bml3.c index 55d96f8e8ef..0644bc45a77 100644 --- a/src/mess/drivers/bml3.c +++ b/src/mess/drivers/bml3.c @@ -381,7 +381,7 @@ WRITE8_MEMBER( bml3_state::bml3_firq_mask_w) if(m_firq_mask) { m_firq_status = 0; // clear pending firq - device_set_input_line(m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE); + m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); } } @@ -389,7 +389,7 @@ READ8_MEMBER( bml3_state::bml3_firq_status_r ) { UINT8 res = m_firq_status << 7; m_firq_status = 0; - device_set_input_line(m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE); + m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); return res; } @@ -610,7 +610,7 @@ static INTERRUPT_GEN( bml3_timer_firq ) if(!state->m_firq_mask) { - device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, ASSERT_LINE); + state->m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); state->m_firq_status = 1; } } diff --git a/src/mess/drivers/bw2.c b/src/mess/drivers/bw2.c index 2802705d58b..bb4d01aeefc 100644 --- a/src/mess/drivers/bw2.c +++ b/src/mess/drivers/bw2.c @@ -226,12 +226,12 @@ WRITE_LINE_MEMBER( bw2_state::fdc_drq_w ) { if (m_maincpu->state_int(Z80_HALT)) { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, HOLD_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, HOLD_LINE); } } else { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } } diff --git a/src/mess/drivers/cat.c b/src/mess/drivers/cat.c index debf6b54dc7..8da1025b68e 100644 --- a/src/mess/drivers/cat.c +++ b/src/mess/drivers/cat.c @@ -312,7 +312,7 @@ static MACHINE_START(cat) static MACHINE_RESET(cat) { cat_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), cat_int_ack); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(cat_int_ack); state->m_keyboard_timer->adjust(attotime::zero, 0, attotime::from_hz(120)); } diff --git a/src/mess/drivers/cxhumax.c b/src/mess/drivers/cxhumax.c index f1466d540b5..86d9a100a40 100644 --- a/src/mess/drivers/cxhumax.c +++ b/src/mess/drivers/cxhumax.c @@ -101,7 +101,7 @@ WRITE32_MEMBER( cxhumax_state::cx_gxa_w ) if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)]) || (m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)])) - device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); + machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); break; default: @@ -322,7 +322,7 @@ static TIMER_CALLBACK( timer_tick ) /* Interrupt if Timer interrupt is not masked in ITC_INTENABLE_REG */ if (state->m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)] & INT_TIMER_BIT) - device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); + machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); } } attotime period = attotime::from_hz(XTAL_54MHz)*state->m_timer_regs.timer[param].timebase; @@ -418,7 +418,7 @@ WRITE32_MEMBER( cxhumax_state::cx_uart2_w ) /* If INT is enabled at INT Ctrl raise it */ if(m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]&INT_UART2_BIT) { - device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); + machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); } } } @@ -548,9 +548,9 @@ WRITE32_MEMBER( cxhumax_state::cx_intctrl_w ) /* check if */ if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)]) || (m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)])) - device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); + machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); else - device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, CLEAR_LINE); + machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE); } @@ -734,7 +734,7 @@ WRITE32_MEMBER( cxhumax_state::cx_i2c1_w ) m_intctrl_regs[INTREG(INTGROUP1, INTSTATSET)] |= 1<<7; if (m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)] & (1<<7)) { verboselog( machine(), 9, "(I2C1) Int\n" ); - device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); + machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); } break; case I2C_STAT_REG: diff --git a/src/mess/drivers/d6800.c b/src/mess/drivers/d6800.c index 2db7581020e..5a31b311572 100644 --- a/src/mess/drivers/d6800.c +++ b/src/mess/drivers/d6800.c @@ -183,7 +183,7 @@ static TIMER_DEVICE_CALLBACK( d6800_p ) { d6800_state *state = timer.machine().driver_data(); state->m_rtc++; - device_set_input_line(state->m_maincpu, M6800_IRQ_LINE, (state->m_rtc > 0xf8) ? ASSERT_LINE : CLEAR_LINE); + state->m_maincpu->set_input_line(M6800_IRQ_LINE, (state->m_rtc > 0xf8) ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mess/drivers/dc.c b/src/mess/drivers/dc.c index ccc7f44275c..5f1a6d2872a 100644 --- a/src/mess/drivers/dc.c +++ b/src/mess/drivers/dc.c @@ -45,7 +45,7 @@ static UINT64 *dc_ram; static READ64_HANDLER( dcus_idle_skip_r ) { if (space->device().safe_pc()==0xc0ba52a) - device_spin_until_time(&space->device(), attotime::from_usec(2500)); + space->device().execute().spin_until_time(attotime::from_usec(2500)); // device_spinuntil_int(&space->device()); return dc_ram[0x2303b0/8]; @@ -54,7 +54,7 @@ static READ64_HANDLER( dcus_idle_skip_r ) static READ64_HANDLER( dcjp_idle_skip_r ) { if (space->device().safe_pc()==0xc0bac62) - device_spin_until_time(&space->device(), attotime::from_usec(2500)); + space->device().execute().spin_until_time(attotime::from_usec(2500)); // device_spinuntil_int(&space->device()); return dc_ram[0x2302f8/8]; diff --git a/src/mess/drivers/dmv.c b/src/mess/drivers/dmv.c index 2d717d7fc39..ebce5851c1c 100644 --- a/src/mess/drivers/dmv.c +++ b/src/mess/drivers/dmv.c @@ -271,7 +271,7 @@ static const upd765_interface dmv_interface = WRITE_LINE_MEMBER( dmv_state::dma_hrq_changed ) { - device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); // Assert HLDA i8237_hlda_w(m_dmac, state); diff --git a/src/mess/drivers/eacc.c b/src/mess/drivers/eacc.c index 1d5bcfa3488..7e2666ee3d5 100644 --- a/src/mess/drivers/eacc.c +++ b/src/mess/drivers/eacc.c @@ -138,7 +138,7 @@ static TIMER_DEVICE_CALLBACK( eacc_cb1 ) eacc_state *state = timer.machine().driver_data(); state->m_cb1 ^= 1; // 15hz if (state->m_cb2) - device_set_input_line(state->m_maincpu, M6800_IRQ_LINE, ASSERT_LINE); + state->m_maincpu->set_input_line(M6800_IRQ_LINE, ASSERT_LINE); } static TIMER_DEVICE_CALLBACK( eacc_nmi ) @@ -148,7 +148,7 @@ static TIMER_DEVICE_CALLBACK( eacc_nmi ) if (state->m_cb2) { state->m_nmi = true; - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } } @@ -226,7 +226,7 @@ WRITE8_MEMBER( eacc_state::eacc_digit_w ) { if (m_nmi) { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); m_nmi = false; } m_digit = data & 0xf8; diff --git a/src/mess/drivers/elwro800.c b/src/mess/drivers/elwro800.c index 7f27ada96eb..6d356393f0a 100644 --- a/src/mess/drivers/elwro800.c +++ b/src/mess/drivers/elwro800.c @@ -537,7 +537,7 @@ static const cassette_interface elwro800jr_cassette_interface = static INTERRUPT_GEN( elwro800jr_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static const floppy_interface elwro800jr_floppy_interface = diff --git a/src/mess/drivers/enterp.c b/src/mess/drivers/enterp.c index 32683d3e002..7dd4a07917d 100644 --- a/src/mess/drivers/enterp.c +++ b/src/mess/drivers/enterp.c @@ -172,7 +172,7 @@ static const dave_interface enterprise_dave_interface = static MACHINE_RESET( enterprise ) { - device_set_input_line_vector(machine.device("maincpu"), 0, 0xff); + machine.device("maincpu")->execute().set_input_line_vector(0, 0xff); } diff --git a/src/mess/drivers/esq5505.c b/src/mess/drivers/esq5505.c index 682d225a819..85d1be5843d 100644 --- a/src/mess/drivers/esq5505.c +++ b/src/mess/drivers/esq5505.c @@ -76,7 +76,7 @@ public: m_dmac(*this, "mc68450") { } - required_device m_maincpu; + required_device m_maincpu; required_device m_duart; optional_device m_fdc; optional_device m_epsvfd; @@ -270,12 +270,12 @@ static void duart_irq_handler(device_t *device, int state, UINT8 vector) // printf("\nDUART IRQ: state %d vector %d\n", state, vector); if (state == ASSERT_LINE) { - device_set_input_line_vector(esq5505->m_maincpu, 1, vector); - device_set_input_line(esq5505->m_maincpu, 1, ASSERT_LINE); + esq5505->m_maincpu->set_input_line_vector(1, vector); + esq5505->m_maincpu->set_input_line(1, ASSERT_LINE); } else { - device_set_input_line(esq5505->m_maincpu, 1, CLEAR_LINE); + esq5505->m_maincpu->set_input_line(1, CLEAR_LINE); } }; @@ -299,7 +299,7 @@ static void duart_output(device_t *device, UINT8 data) floppy->ss_w((data & 2)>>1); } -// printf("DUART output: %02x (PC=%x)\n", data, state->m_maincpu->safe_pc()); +// printf("DUART output: %02x (PC=%x)\n", data, state->m_maincpu->pc()); } static void duart_tx(device_t *device, int channel, UINT8 data) @@ -308,7 +308,7 @@ static void duart_tx(device_t *device, int channel, UINT8 data) if (channel == 1) { -// printf("ch %d: [%02x] (PC=%x)\n", channel, data, state->m_maincpu->safe_pc()); +// printf("ch %d: [%02x] (PC=%x)\n", channel, data, state->m_maincpu->pc()); switch (state->m_system_type) { case GENERIC: diff --git a/src/mess/drivers/exelv.c b/src/mess/drivers/exelv.c index 8618dd78c07..af87fba7c4a 100644 --- a/src/mess/drivers/exelv.c +++ b/src/mess/drivers/exelv.c @@ -321,7 +321,7 @@ WRITE8_MEMBER(exelv_state::tms7041_portb_w) tms5220_wsq_w(m_tms5220c, (data & 0x01) ? 1 : 0); tms5220_rsq_w(m_tms5220c, (data & 0x02) ? 1 : 0); - device_set_input_line(m_maincpu, TMS7000_IRQ1_LINE, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(TMS7000_IRQ1_LINE, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE); /* Check for low->high transition on B6 */ if (!(m_tms7041_portb & 0x40) && (data & 0x40)) diff --git a/src/mess/drivers/fidelz80.c b/src/mess/drivers/fidelz80.c index 10594ace3bb..f5e345e7940 100644 --- a/src/mess/drivers/fidelz80.c +++ b/src/mess/drivers/fidelz80.c @@ -1087,15 +1087,15 @@ static INPUT_CHANGED( fidelz80_trigger_reset ) { fidelz80_state *state = field.machine().driver_data(); - device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); } static INPUT_CHANGED( abc_trigger_reset ) { fidelz80_state *state = field.machine().driver_data(); - device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); - device_set_input_line(state->m_i8041, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); + state->m_i8041->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); } static INPUT_PORTS_START( fidelz80 ) diff --git a/src/mess/drivers/fk1.c b/src/mess/drivers/fk1.c index 1f21478eed4..80b86c3d9f9 100644 --- a/src/mess/drivers/fk1.c +++ b/src/mess/drivers/fk1.c @@ -434,7 +434,7 @@ MACHINE_RESET_MEMBER( fk1_state ) membank("bank3")->set_base(ram + 0x8000); membank("bank4")->set_base(ram + 0xc000); - device_set_irq_callback(machine().device("maincpu"), fk1_irq_callback); + machine().device("maincpu")->execute().set_irq_acknowledge_callback(fk1_irq_callback); } SCREEN_UPDATE16_MEMBER( fk1_state ) diff --git a/src/mess/drivers/fm7.c b/src/mess/drivers/fm7.c index 481acd1acff..c8ad1636d23 100644 --- a/src/mess/drivers/fm7.c +++ b/src/mess/drivers/fm7.c @@ -1838,8 +1838,8 @@ DRIVER_INIT_MEMBER(fm7_state,fm7) m_subtimer = machine().scheduler().timer_alloc(FUNC(fm7_subtimer_irq)); m_keyboard_timer = machine().scheduler().timer_alloc(FUNC(fm7_keyboard_poll)); m_fm77av_vsync_timer = machine().scheduler().timer_alloc(FUNC(fm77av_vsync)); - device_set_irq_callback(machine().device("maincpu"),fm7_irq_ack); - device_set_irq_callback(machine().device("sub"),fm7_sub_irq_ack); + machine().device("maincpu")->execute().set_irq_acknowledge_callback(fm7_irq_ack); + machine().device("sub")->execute().set_irq_acknowledge_callback(fm7_sub_irq_ack); } static MACHINE_START(fm7) diff --git a/src/mess/drivers/fmtowns.c b/src/mess/drivers/fmtowns.c index 14f81c1ac03..d9cd88dc2a1 100644 --- a/src/mess/drivers/fmtowns.c +++ b/src/mess/drivers/fmtowns.c @@ -374,7 +374,7 @@ void towns_state::intervaltimer2_timeout() void towns_state::wait_end() { - device_set_input_line(m_maincpu,INPUT_LINE_HALT,CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT,CLEAR_LINE); } READ8_MEMBER(towns_state::towns_sys6c_r) @@ -386,7 +386,7 @@ READ8_MEMBER(towns_state::towns_sys6c_r) WRITE8_MEMBER(towns_state::towns_sys6c_w) { // halts the CPU for 1 microsecond - device_set_input_line(m_maincpu,INPUT_LINE_HALT,ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT,ASSERT_LINE); m_towns_wait_timer->adjust(attotime::from_usec(1),0,attotime::never); } @@ -2458,7 +2458,7 @@ void towns_state::driver_start() // CD-ROM init m_towns_cd.read_timer = machine().scheduler().timer_alloc(FUNC(towns_cdrom_read_byte), (void*)machine().device("dma_1")); - device_set_irq_callback(machine().device("maincpu"), towns_irq_callback); + machine().device("maincpu")->execute().set_irq_acknowledge_callback(towns_irq_callback); machine().device("maincpu")->memory().space(AS_PROGRAM)->install_ram(0x100000,machine().device(RAM_TAG)->size()-1,0xffffffff,0,NULL); } @@ -2474,8 +2474,8 @@ void towns_state::machine_reset() { address_space *program; - m_maincpu = machine().device("maincpu"); - program = m_maincpu->memory().space(AS_PROGRAM); + m_maincpu = machine().device("maincpu"); + program = m_maincpu->space(AS_PROGRAM); m_dma_1 = machine().device("dma_1"); m_dma_2 = machine().device("dma_2"); m_fdc = machine().device("fdc"); diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c index 38452d36fc7..025e2538605 100644 --- a/src/mess/drivers/gba.c +++ b/src/mess/drivers/gba.c @@ -98,8 +98,8 @@ static void gba_request_irq(running_machine &machine, UINT32 int_type) // master enable? if (state->m_IME & 1) { - device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); - device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, CLEAR_LINE); + machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); + machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE); } } } @@ -1889,7 +1889,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) m_HALTCNT = data & 0x000000ff; // either way, wait for an IRQ - device_spin_until_interrupt(machine().device("maincpu")); + machine().device("maincpu")->execute().spin_until_interrupt(); } } if( (mem_mask) & 0xffff0000 ) diff --git a/src/mess/drivers/geneve.c b/src/mess/drivers/geneve.c index 48caeff9c3d..cc70070ae59 100644 --- a/src/mess/drivers/geneve.c +++ b/src/mess/drivers/geneve.c @@ -541,7 +541,7 @@ WRITE_LINE_MEMBER( geneve::video_wait_states ) WRITE8_MEMBER( geneve::tms9901_interrupt ) { /* INTREQ is connected to INT1. */ - device_execute(m_cpu)->set_input_line(INPUT_LINE_99XX_INT1, data); + m_cpu->set_input_line(INPUT_LINE_99XX_INT1, data); } /* tms9901 setup */ @@ -585,7 +585,7 @@ WRITE_LINE_MEMBER( geneve::inta ) { m_inta = (state!=0)? ASSERT_LINE : CLEAR_LINE; m_tms9901->set_single_int(1, state); - device_execute(m_cpu)->set_input_line(INPUT_LINE_99XX_INT4, state); + m_cpu->set_input_line(INPUT_LINE_99XX_INT4, state); } /* diff --git a/src/mess/drivers/gp32.c b/src/mess/drivers/gp32.c index 6dbb909a38d..692b7ee8925 100644 --- a/src/mess/drivers/gp32.c +++ b/src/mess/drivers/gp32.c @@ -492,11 +492,11 @@ static void s3c240x_check_pending_irq( running_machine &machine) } state->m_s3c240x_irq_regs[4] |= (1 << int_type); // INTPND state->m_s3c240x_irq_regs[5] = int_type; // INTOFFSET - device_set_input_line( machine.device( "maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); + machine.device( "maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); } else { - device_set_input_line( machine.device( "maincpu"), ARM7_IRQ_LINE, CLEAR_LINE); + machine.device( "maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE); } } @@ -509,7 +509,7 @@ static void s3c240x_request_irq( running_machine &machine, UINT32 int_type) state->m_s3c240x_irq_regs[0] |= (1 << int_type); // SRCPND state->m_s3c240x_irq_regs[4] |= (1 << int_type); // INTPND state->m_s3c240x_irq_regs[5] = int_type; // INTOFFSET - device_set_input_line( machine.device( "maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); + machine.device( "maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); } else { diff --git a/src/mess/drivers/h8.c b/src/mess/drivers/h8.c index 30b2515f6de..a2d518e4f07 100644 --- a/src/mess/drivers/h8.c +++ b/src/mess/drivers/h8.c @@ -57,7 +57,7 @@ static TIMER_DEVICE_CALLBACK( h8_irq_pulse ) { h8_state *state = timer.machine().driver_data(); if (state->m_irq_ctl & 1) - device_set_input_line_and_vector(timer.machine().device("maincpu"), INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf); + timer.machine().device("maincpu")->execute().set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf); } READ8_MEMBER( h8_state::h8_f0_r ) @@ -105,7 +105,7 @@ WRITE8_MEMBER( h8_state::h8_f0_w ) output_set_value("mon_led",(data & 0x20) ? 0 : 1); beep_set_state(m_beep, (data & 0x80) ? 0 : 1); - device_set_input_line(machine().device("maincpu"), INPUT_LINE_IRQ0, CLEAR_LINE); + machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); m_irq_ctl &= 0xf0; if (data & 0x40) m_irq_ctl |= 1; if (~data & 0x10) m_irq_ctl |= 2; @@ -197,7 +197,7 @@ But, all of this can only occur if bit 5 of port F0 is low. */ c=m_ff_b^1; // from /Q of 2nd flipflop m_ff_b=a; // from Q of 1st flipflop if (c) - device_set_input_line_and_vector(machine().device("maincpu"), INPUT_LINE_IRQ0, ASSERT_LINE, 0xd7); + machine().device("maincpu")->execute().set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xd7); } } else diff --git a/src/mess/drivers/h89.c b/src/mess/drivers/h89.c index b3d5d403487..6a148e87cca 100644 --- a/src/mess/drivers/h89.c +++ b/src/mess/drivers/h89.c @@ -101,7 +101,7 @@ static TIMER_DEVICE_CALLBACK( h89_irq_timer ) h89_state *state = timer.machine().driver_data(); if (state->m_port_f2 & 0x02) - device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xcf); + state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); } WRITE8_MEMBER( h89_state::port_f2_w ) diff --git a/src/mess/drivers/homelab.c b/src/mess/drivers/homelab.c index db510e05776..2eba18c7a59 100644 --- a/src/mess/drivers/homelab.c +++ b/src/mess/drivers/homelab.c @@ -72,14 +72,14 @@ static INTERRUPT_GEN( homelab_frame ) { homelab_state *state = device->machine().driver_data(); if (state->m_nmi) - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } READ8_MEMBER( homelab_state::key_r ) // offset 27F-2FE { if (offset == 0x38) // 0x3838 { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); return 0; } diff --git a/src/mess/drivers/homez80.c b/src/mess/drivers/homez80.c index 5db720f3206..e607313122d 100644 --- a/src/mess/drivers/homez80.c +++ b/src/mess/drivers/homez80.c @@ -277,7 +277,7 @@ GFXDECODE_END static INTERRUPT_GEN( homez80_interrupt ) { homez80_state *state = device->machine().driver_data(); - device_set_input_line(device, 0, (state->m_irq) ? HOLD_LINE : CLEAR_LINE); + device->execute().set_input_line(0, (state->m_irq) ? HOLD_LINE : CLEAR_LINE); state->m_irq ^= 1; } diff --git a/src/mess/drivers/iq151.c b/src/mess/drivers/iq151.c index c1e33a08189..ef39937b339 100644 --- a/src/mess/drivers/iq151.c +++ b/src/mess/drivers/iq151.c @@ -318,7 +318,7 @@ INPUT_PORTS_END WRITE_LINE_MEMBER( iq151_state::pic_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); } static INTERRUPT_GEN( iq151_vblank_interrupt ) @@ -352,7 +352,7 @@ DRIVER_INIT_MEMBER(iq151_state,iq151) membank("boot")->configure_entry(0, RAM + 0xf800); membank("boot")->configure_entry(1, RAM + 0x0000); - device_set_irq_callback(m_maincpu, iq151_irq_callback); + m_maincpu->set_irq_acknowledge_callback(iq151_irq_callback); // keep machine pointers to slots m_carts[0] = machine().device("slot1"); diff --git a/src/mess/drivers/jr200.c b/src/mess/drivers/jr200.c index eb4bb6bbeee..34cbc407f86 100644 --- a/src/mess/drivers/jr200.c +++ b/src/mess/drivers/jr200.c @@ -281,7 +281,7 @@ WRITE8_MEMBER(jr200_state::jr200_border_col_w) static TIMER_CALLBACK(timer_d_callback) { - device_set_input_line(machine.firstcpu, 0, HOLD_LINE); + machine.firstcpu->set_input_line(0, HOLD_LINE); } READ8_MEMBER(jr200_state::mn1271_io_r) diff --git a/src/mess/drivers/kyocera.c b/src/mess/drivers/kyocera.c index ee073857016..f64ee56507b 100644 --- a/src/mess/drivers/kyocera.c +++ b/src/mess/drivers/kyocera.c @@ -1291,7 +1291,7 @@ static TIMER_DEVICE_CALLBACK( tandy200_tp_tick ) { tandy200_state *state = timer.machine().driver_data(); - device_set_input_line(state->m_maincpu, I8085_RST75_LINE, state->m_tp); + state->m_maincpu->set_input_line(I8085_RST75_LINE, state->m_tp); state->m_tp = !state->m_tp; } diff --git a/src/mess/drivers/m20.c b/src/mess/drivers/m20.c index 64d4f5629e4..964880d6172 100644 --- a/src/mess/drivers/m20.c +++ b/src/mess/drivers/m20.c @@ -61,7 +61,7 @@ public: m_wd177x(*this, "fd1797"), m_p_videoram(*this, "p_videoram"){ } - required_device m_maincpu; + required_device m_maincpu; required_device m_kbdi8251; required_device m_ttyi8251; required_device m_i8255; @@ -243,12 +243,12 @@ WRITE_LINE_MEMBER( m20_state::pic_irq_line_w ) if (state) { //printf ("PIC raised VI\n"); - device_set_input_line(m_maincpu, 1, ASSERT_LINE); + m_maincpu->set_input_line(1, ASSERT_LINE); } else { //printf ("PIC lowered VI\n"); - device_set_input_line(m_maincpu, 1, CLEAR_LINE); + m_maincpu->set_input_line(1, CLEAR_LINE); } } @@ -274,7 +274,7 @@ WRITE_LINE_MEMBER( m20_state::timer_tick_w ) * 8253 is programmed in square wave mode, not rate * generator mode. */ - device_set_input_line(m_maincpu, 0, state ? HOLD_LINE /*ASSERT_LINE*/ : CLEAR_LINE); + m_maincpu->set_input_line(0, state ? HOLD_LINE /*ASSERT_LINE*/ : CLEAR_LINE); } /* from the M20 hardware reference manual: @@ -376,7 +376,7 @@ void m20_state::machine_reset() m_port21 = 0xff; m_port21_sd = 1; - device_set_irq_callback(m_maincpu, m20_irq_callback); + m_maincpu->set_irq_acknowledge_callback(m20_irq_callback); wd17xx_mr_w(m_wd177x, 0); //wd17xx_mr_w(m_wd177x, 1); diff --git a/src/mess/drivers/m5.c b/src/mess/drivers/m5.c index 795b0919174..7a51c316e8c 100644 --- a/src/mess/drivers/m5.c +++ b/src/mess/drivers/m5.c @@ -521,8 +521,8 @@ WRITE8_MEMBER( m5_state::ppi_pb_w ) if (data == 0xf0) { - device_set_input_line(m_fd5cpu, INPUT_LINE_RESET, ASSERT_LINE); - device_set_input_line(m_fd5cpu, INPUT_LINE_RESET, CLEAR_LINE); + m_fd5cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); + m_fd5cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); } } diff --git a/src/mess/drivers/mac.c b/src/mess/drivers/mac.c index 02074e7b124..e3c07bb4090 100644 --- a/src/mess/drivers/mac.c +++ b/src/mess/drivers/mac.c @@ -182,7 +182,7 @@ READ8_MEMBER( mac_state::mac_sonora_vctl_r ) { if (offset == 2) { -// printf("Sonora: read monitor ID at PC=%x\n", m_maincpu->safe_pc()); +// printf("Sonora: read monitor ID at PC=%x\n", m_maincpu->pc()); return (6 << 4); // 640x480 RGB monitor } @@ -256,12 +256,12 @@ READ8_MEMBER ( mac_state::mac_rbv_r ) switch (offset) { case 13: // IFR -// printf("Read IER = %02x (PC=%x) 2=%02x\n", m_rbv_ier, m_maincpu->safe_pc(), m_rbv_regs[2]); +// printf("Read IER = %02x (PC=%x) 2=%02x\n", m_rbv_ier, m_maincpu->pc(), m_rbv_regs[2]); data = m_rbv_ifr; break; case 14: // IER -// printf("Read IFR = %02x (PC=%x) 2=%02x\n", m_rbv_ifr, m_maincpu->safe_pc(), m_rbv_regs[2]); +// printf("Read IFR = %02x (PC=%x) 2=%02x\n", m_rbv_ifr, m_maincpu->pc(), m_rbv_regs[2]); data = m_rbv_ier; break; @@ -271,7 +271,7 @@ READ8_MEMBER ( mac_state::mac_rbv_r ) } } -// printf("rbv_r: %x = %02x (PC=%x)\n", offset, data, m_maincpu->safe_pc()); +// printf("rbv_r: %x = %02x (PC=%x)\n", offset, data, m_maincpu->pc()); return data; } @@ -281,7 +281,7 @@ WRITE8_MEMBER ( mac_state::mac_rbv_w ) if (offset < 0x100) { // if (offset == 0x10) -// printf("rbv_w: %02x to offset %x (PC=%x)\n", data, offset, m_maincpu->safe_pc()); +// printf("rbv_w: %02x to offset %x (PC=%x)\n", data, offset, m_maincpu->pc()); switch (offset) { case 0x00: @@ -364,7 +364,7 @@ WRITE8_MEMBER ( mac_state::mac_rbv_w ) switch (offset) { case 13: // IFR -// printf("%02x to IFR (PC=%x)\n", data, m_maincpu->safe_pc()); +// printf("%02x to IFR (PC=%x)\n", data, m_maincpu->pc()); if (data & 0x80) { data = 0x7f; @@ -373,7 +373,7 @@ WRITE8_MEMBER ( mac_state::mac_rbv_w ) break; case 14: // IER -// printf("%02x to IER (PC=%x)\n", data, m_maincpu->safe_pc()); +// printf("%02x to IER (PC=%x)\n", data, m_maincpu->pc()); if (data & 0x80) // 1 bits write 1s { m_rbv_ier |= data & 0x7f; @@ -440,24 +440,24 @@ READ32_MEMBER(mac_state::buserror_r) READ8_MEMBER(mac_state::scciop_r) { -// printf("scciop_r @ %x (PC=%x)\n", offset, m_maincpu->safe_pc()); +// printf("scciop_r @ %x (PC=%x)\n", offset, m_maincpu->pc()); return 0; } WRITE8_MEMBER(mac_state::scciop_w) { -// printf("scciop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->safe_pc()); +// printf("scciop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->pc()); } READ8_MEMBER(mac_state::swimiop_r) { -// printf("swimiop_r @ %x (PC=%x)\n", offset, m_maincpu->safe_pc()); +// printf("swimiop_r @ %x (PC=%x)\n", offset, m_maincpu->pc()); return 0; } WRITE8_MEMBER(mac_state::swimiop_w) { -// printf("swimiop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->safe_pc()); +// printf("swimiop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->pc()); } READ8_MEMBER(mac_state::pmac_diag_r) @@ -478,7 +478,7 @@ READ8_MEMBER(mac_state::amic_dma_r) WRITE8_MEMBER(mac_state::amic_dma_w) { -// printf("amic_dma_w: %02x at %x (PC=%x)\n", data, offset+0x1000, m_maincpu->safe_pc()); +// printf("amic_dma_w: %02x at %x (PC=%x)\n", data, offset+0x1000, m_maincpu->pc()); } // HMC has one register: a 35-bit shift register which is accessed one bit at a time (see pmac6100 code at 4030383c which makes this obvious) diff --git a/src/mess/drivers/micronic.c b/src/mess/drivers/micronic.c index 92155156777..f26430c1efa 100644 --- a/src/mess/drivers/micronic.c +++ b/src/mess/drivers/micronic.c @@ -348,7 +348,7 @@ void micronic_state::machine_reset() WRITE_LINE_MEMBER( micronic_state::mc146818_irq ) { - device_set_input_line(m_maincpu, 0, !state ? HOLD_LINE : CLEAR_LINE); + m_maincpu->set_input_line(0, !state ? HOLD_LINE : CLEAR_LINE); } const struct mc146818_interface micronic_mc146818_config = diff --git a/src/mess/drivers/mikromik.c b/src/mess/drivers/mikromik.c index c9a70dce2e4..9509b5ebc14 100644 --- a/src/mess/drivers/mikromik.c +++ b/src/mess/drivers/mikromik.c @@ -491,7 +491,7 @@ static I8212_INTERFACE( iop_intf ) WRITE_LINE_MEMBER( mm1_state::dma_hrq_changed ) { - device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); // Assert HLDA m_dmac->hack_w(state); diff --git a/src/mess/drivers/mirage.c b/src/mess/drivers/mirage.c index e15647e679a..235fac13b7e 100644 --- a/src/mess/drivers/mirage.c +++ b/src/mess/drivers/mirage.c @@ -83,7 +83,7 @@ public: m_fdc(*this, "wd1772") { } - required_device m_maincpu; + required_device m_maincpu; required_device m_fdc; virtual void machine_reset(); @@ -107,7 +107,7 @@ SLOT_INTERFACE_END void mirage_state::fdc_intrq_w(bool state) { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, state); + m_maincpu->set_input_line(INPUT_LINE_NMI, state); } static void mirage_doc_irq(device_t *device, int state) diff --git a/src/mess/drivers/mk1.c b/src/mess/drivers/mk1.c index 9c4e4970de9..037ce43924d 100644 --- a/src/mess/drivers/mk1.c +++ b/src/mess/drivers/mk1.c @@ -166,7 +166,7 @@ static MACHINE_START( mk1 ) static void mk1_interrupt( device_t *device, UINT16 addr, int level ) { - device_set_input_line_vector(device->machine().device("maincpu"), F8_INPUT_LINE_INT_REQ, addr ); + device->machine().device("maincpu")->execute().set_input_line_vector(F8_INPUT_LINE_INT_REQ, addr ); device->machine().device("maincpu")->execute().set_input_line(F8_INPUT_LINE_INT_REQ, level ? ASSERT_LINE : CLEAR_LINE ); } diff --git a/src/mess/drivers/mod8.c b/src/mess/drivers/mod8.c index 76c4abe7212..85d5a281047 100644 --- a/src/mess/drivers/mod8.c +++ b/src/mess/drivers/mod8.c @@ -88,7 +88,7 @@ static IRQ_CALLBACK ( mod8_irq_callback ) static MACHINE_RESET(mod8) { - device_set_irq_callback(machine.device("maincpu"), mod8_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(mod8_irq_callback); } WRITE8_MEMBER( mod8_state::kbd_put ) diff --git a/src/mess/drivers/mstation.c b/src/mess/drivers/mstation.c index a22b65fbea2..b755613ee94 100644 --- a/src/mess/drivers/mstation.c +++ b/src/mess/drivers/mstation.c @@ -262,9 +262,9 @@ WRITE8_MEMBER( mstation_state::port2_w ) void mstation_state::refresh_ints() { if (m_irq != 0) - device_set_input_line(m_maincpu, 0, HOLD_LINE); + m_maincpu->set_input_line(0, HOLD_LINE); else - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); } READ8_MEMBER( mstation_state::irq_r ) diff --git a/src/mess/drivers/multi16.c b/src/mess/drivers/multi16.c index fa2c572a965..7a2a2592694 100644 --- a/src/mess/drivers/multi16.c +++ b/src/mess/drivers/multi16.c @@ -133,7 +133,7 @@ static const struct pic8259_interface multi16_pic8259_config = static MACHINE_START(multi16) { - device_set_irq_callback(machine.device("maincpu"), multi16_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(multi16_irq_callback); } diff --git a/src/mess/drivers/mz2500.c b/src/mess/drivers/mz2500.c index 501b3cfe6f9..53bb212b094 100644 --- a/src/mess/drivers/mz2500.c +++ b/src/mess/drivers/mz2500.c @@ -1823,7 +1823,7 @@ static INTERRUPT_GEN( mz2500_vbl ) { mz2500_state *state = device->machine().driver_data(); if(state->m_irq_mask[0]) - device_set_input_line_and_vector(device, 0, HOLD_LINE, state->m_irq_vector[0]); + device->execute().set_input_line_and_vector(0, HOLD_LINE, state->m_irq_vector[0]); state->m_cg_clear_flag = 0; } diff --git a/src/mess/drivers/nakajies.c b/src/mess/drivers/nakajies.c index e49bec0f337..50959c81f67 100644 --- a/src/mess/drivers/nakajies.c +++ b/src/mess/drivers/nakajies.c @@ -419,11 +419,11 @@ void nakajies_state::nakajies_update_irqs( running_machine &machine ) if ( vector >= 0xf8 ) { - device_set_input_line_and_vector( m_maincpu, 0, ASSERT_LINE, vector ); + m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector ); } else { - device_set_input_line( m_maincpu, 0, CLEAR_LINE ); + m_maincpu->set_input_line(0, CLEAR_LINE ); } } diff --git a/src/mess/drivers/ng_aes.c b/src/mess/drivers/ng_aes.c index c1a9e9280cb..08035f30c80 100644 --- a/src/mess/drivers/ng_aes.c +++ b/src/mess/drivers/ng_aes.c @@ -248,20 +248,20 @@ static void start_interrupt_timers( running_machine &machine ) static void audio_cpu_irq(device_t *device, int assert) { neogeo_state *state = device->machine().driver_data(); - device_set_input_line(state->m_audiocpu, 0, assert ? ASSERT_LINE : CLEAR_LINE); + state->m_audiocpu->set_input_line(0, assert ? ASSERT_LINE : CLEAR_LINE); } static void audio_cpu_assert_nmi(running_machine &machine) { neogeo_state *state = machine.driver_data(); - 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(ng_aes_state::audio_cpu_clear_nmi_w) { - device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } @@ -1166,8 +1166,8 @@ static void common_machine_start(running_machine &machine) state->m_irq3_pending = 1; /* get devices */ - state->m_maincpu = machine.device("maincpu"); - state->m_audiocpu = machine.device("audiocpu"); + state->m_maincpu = machine.device("maincpu"); + state->m_audiocpu = machine.device("audiocpu"); state->m_upd4990a = machine.device("upd4990a"); /* register state save */ diff --git a/src/mess/drivers/ngp.c b/src/mess/drivers/ngp.c index 8503d2f5f7f..ab50dcba6d3 100644 --- a/src/mess/drivers/ngp.c +++ b/src/mess/drivers/ngp.c @@ -258,18 +258,18 @@ WRITE8_MEMBER( ngp_state::ngp_io_w ) switch( data ) { case 0x55: /* Enable Z80 */ - device_resume( m_z80, SUSPEND_REASON_HALT ); + m_z80->execute().resume(SUSPEND_REASON_HALT ); m_z80->reset(); - device_set_input_line( m_z80, 0, CLEAR_LINE ); + m_z80->execute().set_input_line(0, CLEAR_LINE ); break; case 0xAA: /* Disable Z80 */ - device_suspend( m_z80, SUSPEND_REASON_HALT, 1 ); + m_z80->execute().suspend(SUSPEND_REASON_HALT, 1 ); break; } break; case 0x3a: /* Trigger Z80 NMI */ - device_set_input_line( m_z80, INPUT_LINE_NMI, PULSE_LINE ); + m_z80->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE ); break; } m_io_reg[offset] = data; @@ -525,7 +525,7 @@ WRITE8_MEMBER( ngp_state::ngp_z80_comm_w ) WRITE8_MEMBER( ngp_state::ngp_z80_signal_main_w ) { - device_set_input_line( m_tlcs900, TLCS900_INT5, ASSERT_LINE ); + m_tlcs900->execute().set_input_line(TLCS900_INT5, ASSERT_LINE ); } @@ -539,10 +539,10 @@ ADDRESS_MAP_END WRITE8_MEMBER( ngp_state::ngp_z80_clear_irq ) { - device_set_input_line( m_z80, 0, CLEAR_LINE ); + m_z80->execute().set_input_line(0, CLEAR_LINE ); /* I am not exactly sure what causes the maincpu INT5 signal to be cleared. This will do for now. */ - device_set_input_line( m_tlcs900, TLCS900_INT5, CLEAR_LINE ); + m_tlcs900->execute().set_input_line(TLCS900_INT5, CLEAR_LINE ); } @@ -557,7 +557,7 @@ static INPUT_CHANGED( power_callback ) if ( state->m_io_reg[0x33] & 0x04 ) { - device_set_input_line( state->m_tlcs900, TLCS900_NMI, + state->m_tlcs900->execute().set_input_line(TLCS900_NMI, (field.machine().root_device().ioport("Power")->read() & 0x01 ) ? CLEAR_LINE : ASSERT_LINE ); } } @@ -581,20 +581,20 @@ INPUT_PORTS_END WRITE8_MEMBER( ngp_state::ngp_vblank_pin_w ) { - device_set_input_line( m_tlcs900, TLCS900_INT4, data ? ASSERT_LINE : CLEAR_LINE ); + m_tlcs900->execute().set_input_line(TLCS900_INT4, data ? ASSERT_LINE : CLEAR_LINE ); } WRITE8_MEMBER( ngp_state::ngp_hblank_pin_w ) { - device_set_input_line( m_tlcs900, TLCS900_TIO, data ? ASSERT_LINE : CLEAR_LINE ); + m_tlcs900->execute().set_input_line(TLCS900_TIO, data ? ASSERT_LINE : CLEAR_LINE ); } WRITE8_MEMBER( ngp_state::ngp_tlcs900_to3 ) { if ( data && ! m_old_to3 ) - device_set_input_line( m_z80, 0, ASSERT_LINE ); + m_z80->execute().set_input_line(0, ASSERT_LINE ); m_old_to3 = data; } @@ -617,8 +617,8 @@ void ngp_state::machine_reset() m_dac_r = machine().device( "dac_r" ); m_k1ge = machine().device( "k1ge" ); - device_suspend( m_z80, SUSPEND_REASON_HALT, 1 ); - device_set_input_line( m_z80, 0, CLEAR_LINE ); + m_z80->execute().suspend(SUSPEND_REASON_HALT, 1 ); + m_z80->execute().set_input_line(0, CLEAR_LINE ); } diff --git a/src/mess/drivers/ondra.c b/src/mess/drivers/ondra.c index 2a74e5b0baa..01d09bf1870 100644 --- a/src/mess/drivers/ondra.c +++ b/src/mess/drivers/ondra.c @@ -107,7 +107,7 @@ INPUT_PORTS_END static INTERRUPT_GEN( ondra_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static const cassette_interface ondra_cassette_interface = diff --git a/src/mess/drivers/osbexec.c b/src/mess/drivers/osbexec.c index 1243b6bf816..ff7d902593d 100644 --- a/src/mess/drivers/osbexec.c +++ b/src/mess/drivers/osbexec.c @@ -98,9 +98,9 @@ public: void update_irq_state(running_machine &machine) { if ( m_pia0_irq_state || m_pia1_irq_state ) - 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 ); } DECLARE_WRITE8_MEMBER(osbexec_0000_w); DECLARE_READ8_MEMBER(osbexec_c000_r); diff --git a/src/mess/drivers/paso1600.c b/src/mess/drivers/paso1600.c index 00e09e570a7..0a3c5b762c1 100644 --- a/src/mess/drivers/paso1600.c +++ b/src/mess/drivers/paso1600.c @@ -292,7 +292,7 @@ static const struct pic8259_interface paso1600_pic8259_config = static MACHINE_START(paso1600) { paso1600_state *state = machine.driver_data(); - device_set_irq_callback(state->m_maincpu, paso1600_irq_callback); + state->m_maincpu->set_irq_acknowledge_callback(paso1600_irq_callback); } diff --git a/src/mess/drivers/pasogo.c b/src/mess/drivers/pasogo.c index 86e3e8430fe..0963be05220 100644 --- a/src/mess/drivers/pasogo.c +++ b/src/mess/drivers/pasogo.c @@ -460,7 +460,7 @@ static IRQ_CALLBACK(pasogo_irq_callback) static MACHINE_RESET( pasogo ) { - device_set_irq_callback(machine.device("maincpu"), pasogo_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pasogo_irq_callback); } //static const unsigned i86_address_mask = 0x000fffff; diff --git a/src/mess/drivers/pc100.c b/src/mess/drivers/pc100.c index ed2dac1df8f..f8209487f73 100644 --- a/src/mess/drivers/pc100.c +++ b/src/mess/drivers/pc100.c @@ -331,7 +331,7 @@ static MACHINE_START(pc100) { pc100_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), pc100_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc100_irq_callback); state->m_kanji_rom = (UINT16 *)(*machine.root_device().memregion("kanji")); state->m_vram = (UINT16 *)(*state->memregion("vram")); } diff --git a/src/mess/drivers/pc1512.c b/src/mess/drivers/pc1512.c index 9f7511afbe3..fc489455c22 100644 --- a/src/mess/drivers/pc1512.c +++ b/src/mess/drivers/pc1512.c @@ -1203,7 +1203,7 @@ static const isa8bus_interface isabus_intf = void pc1512_state::machine_start() { // register CPU IRQ callback - device_set_irq_callback(m_maincpu, pc1512_irq_callback); + m_maincpu->set_irq_acknowledge_callback(pc1512_irq_callback); // set RAM size size_t ram_size = m_ram->size(); @@ -1286,7 +1286,7 @@ void pc1512_state::machine_reset() void pc1640_state::machine_start() { // register CPU IRQ callback - device_set_irq_callback(m_maincpu, pc1512_irq_callback); + m_maincpu->set_irq_acknowledge_callback(pc1512_irq_callback); // state saving save_item(NAME(m_pit1)); diff --git a/src/mess/drivers/pc6001.c b/src/mess/drivers/pc6001.c index 99588115301..9c4288676ce 100644 --- a/src/mess/drivers/pc6001.c +++ b/src/mess/drivers/pc6001.c @@ -1845,7 +1845,7 @@ static INTERRUPT_GEN( pc6001_interrupt ) state->m_cur_keycode = check_joy_press(device->machine()); if(IRQ_LOG) printf("Stick IRQ called 0x16\n"); state->m_irq_vector = 0x16; - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } static INTERRUPT_GEN( pc6001sr_interrupt ) @@ -1856,13 +1856,13 @@ static INTERRUPT_GEN( pc6001sr_interrupt ) state->m_cur_keycode = check_joy_press(device->machine()); if(IRQ_LOG) printf("VRTC IRQ called 0x16\n"); state->m_irq_vector = (state->m_kludge) ? 0x22 : 0x16; - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); } static IRQ_CALLBACK ( pc6001_irq_callback ) { pc6001_state *state = device->machine().driver_data(); - device_set_input_line(device, 0, CLEAR_LINE); + device->execute().set_input_line(0, CLEAR_LINE); return state->m_irq_vector; } @@ -2114,7 +2114,7 @@ static MACHINE_RESET(pc6001) state->m_port_c_8255=0; - device_set_irq_callback(machine.device("maincpu"),pc6001_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc6001_irq_callback); state->m_cas_switch = 0; state->m_cas_offset = 0; state->m_timer_irq_mask = 1; @@ -2132,7 +2132,7 @@ static MACHINE_RESET(pc6001m2) state->m_port_c_8255=0; - device_set_irq_callback(machine.device("maincpu"),pc6001_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc6001_irq_callback); state->m_cas_switch = 0; state->m_cas_offset = 0; @@ -2168,7 +2168,7 @@ static MACHINE_RESET(pc6001sr) state->m_port_c_8255=0; - device_set_irq_callback(machine.device("maincpu"),pc6001_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc6001_irq_callback); state->m_cas_switch = 0; state->m_cas_offset = 0; diff --git a/src/mess/drivers/pc8801.c b/src/mess/drivers/pc8801.c index f16ddc1c515..e4dd0f45eff 100644 --- a/src/mess/drivers/pc8801.c +++ b/src/mess/drivers/pc8801.c @@ -1887,7 +1887,7 @@ WRITE8_MEMBER(pc8801_state::upd765_mc_w) READ8_MEMBER(pc8801_state::upd765_tc_r) { - //printf("%04x 1\n",m_fdccpu->safe_pc()); + //printf("%04x 1\n",m_fdccpu->pc()); upd765_tc_w(machine().device("upd765"), 1); //TODO: I'm not convinced that this works correctly with current hook-up ... 1000 usec is needed by Aploon, a bigger value breaks Alpha. @@ -2411,7 +2411,7 @@ static INTERRUPT_GEN( pc8801_vrtc_irq ) { state->m_vrtc_irq_latch = 1; //IRQ_LOG(("vrtc\n")); - device_set_input_line(device,0,HOLD_LINE); + device->execute().set_input_line(0,HOLD_LINE); } } #endif @@ -2420,7 +2420,7 @@ static MACHINE_START( pc8801 ) { pc8801_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), pc8801_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc8801_irq_callback); state->m_rtc->cs_w(1); state->m_rtc->oe_w(1); @@ -2447,7 +2447,7 @@ static MACHINE_RESET( pc8801 ) state->m_fdc_irq_opcode = 0; //TODO: copied from PC-88VA, could be wrong here ... should be 0x7f ld a,a in the latter case state->m_mouse.phase = 0; - device_set_input_line_vector(machine.device("fdccpu"), 0, 0); + machine.device("fdccpu")->execute().set_input_line_vector(0, 0); { state->m_txt_color = 2; diff --git a/src/mess/drivers/pc88va.c b/src/mess/drivers/pc88va.c index cbd2d7a4e09..39ad87ed6ea 100644 --- a/src/mess/drivers/pc88va.c +++ b/src/mess/drivers/pc88va.c @@ -1528,7 +1528,7 @@ static const struct pic8259_interface pc88va_pic8259_slave_config = static MACHINE_START( pc88va ) { pc88va_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), pc88va_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc88va_irq_callback); state->m_t3_mouse_timer = machine.scheduler().timer_alloc(FUNC(t3_mouse_callback)); state->m_t3_mouse_timer->adjust(attotime::never); @@ -1558,7 +1558,7 @@ static MACHINE_RESET( pc88va ) state->m_fdc_mode = 0; state->m_fdc_irq_opcode = 0x00; //0x7f ld a,a ! - device_set_input_line_vector(machine.device("fdccpu"), 0, 0); + machine.device("fdccpu")->execute().set_input_line_vector(0, 0); } static INTERRUPT_GEN( pc88va_vrtc_irq ) diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c index 5e54e58e305..ee4a41106fd 100644 --- a/src/mess/drivers/pc9801.c +++ b/src/mess/drivers/pc9801.c @@ -719,7 +719,7 @@ READ8_MEMBER(pc9801_state::pc9801_40_r) printf("Read to undefined port [%02x]\n",offset+0x40); else { - //printf("Read to 8251 kbd port [%02x] %08x\n",offset+0x40,m_maincpu->safe_pc()); + //printf("Read to 8251 kbd port [%02x] %08x\n",offset+0x40,m_maincpu->pc()); if(offset == 1) { UINT8 res; @@ -2525,7 +2525,7 @@ static MACHINE_START(pc9801) { pc9801_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback); state->m_rtc->cs_w(1); state->m_rtc->oe_w(1); diff --git a/src/mess/drivers/pce220.c b/src/mess/drivers/pce220.c index ee8562b6706..5ffecbde431 100644 --- a/src/mess/drivers/pce220.c +++ b/src/mess/drivers/pce220.c @@ -618,7 +618,7 @@ static INPUT_CHANGED( kb_irq ) if (state->m_irq_mask & IRQ_FLAG_KEY) { - device_set_input_line( state->m_maincpu, 0, newval ? ASSERT_LINE : CLEAR_LINE ); + state->m_maincpu->set_input_line(0, newval ? ASSERT_LINE : CLEAR_LINE ); state->m_irq_flag = (state->m_irq_flag & 0xfe) | (newval & 0x01); } @@ -630,7 +630,7 @@ static INPUT_CHANGED( on_irq ) if (state->m_irq_mask & IRQ_FLAG_ON) { - device_set_input_line( state->m_maincpu, 0, newval ? ASSERT_LINE : CLEAR_LINE ); + state->m_maincpu->set_input_line(0, newval ? ASSERT_LINE : CLEAR_LINE ); state->m_irq_flag = (state->m_irq_flag & 0xfd) | ((newval & 0x01)<<1); } @@ -907,7 +907,7 @@ static TIMER_DEVICE_CALLBACK(pce220_timer_callback) if (state->m_irq_mask & IRQ_FLAG_TIMER) { - device_set_input_line( state->m_maincpu, 0, HOLD_LINE ); + state->m_maincpu->set_input_line(0, HOLD_LINE ); state->m_irq_flag = (state->m_irq_flag & 0xfb) | (state->m_timer_status<<2); } diff --git a/src/mess/drivers/pcfx.c b/src/mess/drivers/pcfx.c index f5acebf1fd5..e38d8c618f9 100644 --- a/src/mess/drivers/pcfx.c +++ b/src/mess/drivers/pcfx.c @@ -375,11 +375,11 @@ inline void pcfx_state::check_irqs() if ( highest_prio >= 0 ) { - device_set_input_line( m_maincpu, 8 + highest_prio, ASSERT_LINE ); + m_maincpu->set_input_line(8 + highest_prio, ASSERT_LINE ); } else { - device_set_input_line( m_maincpu, 0, CLEAR_LINE ); + m_maincpu->set_input_line(0, CLEAR_LINE ); } } diff --git a/src/mess/drivers/pcw.c b/src/mess/drivers/pcw.c index c23f4f06874..b30cd818ccb 100644 --- a/src/mess/drivers/pcw.c +++ b/src/mess/drivers/pcw.c @@ -1087,7 +1087,7 @@ static MACHINE_RESET( pcw ) DRIVER_INIT_MEMBER(pcw_state,pcw) { - device_set_input_line_vector(machine().device("maincpu"), 0, 0x0ff); + machine().device("maincpu")->execute().set_input_line_vector(0, 0x0ff); /* lower 4 bits are interrupt counter */ m_system_status = 0x000; diff --git a/src/mess/drivers/pdp1.c b/src/mess/drivers/pdp1.c index 560c3d6a818..c15247731b5 100644 --- a/src/mess/drivers/pdp1.c +++ b/src/mess/drivers/pdp1.c @@ -1604,7 +1604,7 @@ static void iot_dcc(device_t *device, int op2, int nac, int mb, int *io, int ac) if (state->m_parallel_drum.wc) delay = delay + PARALLEL_DRUM_WORD_TIME; } while (state->m_parallel_drum.wc); - device_adjust_icount(device->machine().device("maincpu"),-device->machine().device("maincpu")->attotime_to_cycles(delay)); + device->machine().device("maincpu")->execute().adjust_icount(-device->machine().device("maincpu")->attotime_to_cycles(delay)); /* if no error, skip */ device->machine().device("maincpu")->state().set_state_int(PDP1_PC, device->machine().device("maincpu")->state().state_int(PDP1_PC)+1); } diff --git a/src/mess/drivers/pegasus.c b/src/mess/drivers/pegasus.c index 250f4dc74ee..e8f20f696af 100644 --- a/src/mess/drivers/pegasus.c +++ b/src/mess/drivers/pegasus.c @@ -90,7 +90,7 @@ public: static TIMER_DEVICE_CALLBACK( pegasus_firq ) { device_t *cpu = timer.machine().device( "maincpu" ); - device_set_input_line(cpu, M6809_FIRQ_LINE, HOLD_LINE); + cpu->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } WRITE_LINE_MEMBER( pegasus_state::pegasus_firq_clr ) diff --git a/src/mess/drivers/pk8000.c b/src/mess/drivers/pk8000.c index a374f218708..39337a85a56 100644 --- a/src/mess/drivers/pk8000.c +++ b/src/mess/drivers/pk8000.c @@ -307,7 +307,7 @@ INPUT_PORTS_END static INTERRUPT_GEN( pk8000_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static IRQ_CALLBACK(pk8000_irq_callback) @@ -319,7 +319,7 @@ static IRQ_CALLBACK(pk8000_irq_callback) static MACHINE_RESET(pk8000) { pk8000_set_bank(machine,0); - device_set_irq_callback(machine.device("maincpu"), pk8000_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pk8000_irq_callback); } static VIDEO_START( pk8000 ) diff --git a/src/mess/drivers/pockstat.c b/src/mess/drivers/pockstat.c index 2c53019aa50..63d0cd15bbb 100644 --- a/src/mess/drivers/pockstat.c +++ b/src/mess/drivers/pockstat.c @@ -337,19 +337,19 @@ static void ps_intc_set_interrupt_line(running_machine &machine, UINT32 line, in } if(drvstate->m_intc_regs.hold & drvstate->m_intc_regs.enable & PS_INT_IRQ_MASK) { - device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE); + machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); } else { - device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, CLEAR_LINE); + machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE); } if(drvstate->m_intc_regs.hold & drvstate->m_intc_regs.enable & PS_INT_FIQ_MASK) { - device_set_input_line(machine.device("maincpu"), ARM7_FIRQ_LINE, ASSERT_LINE); + machine.device("maincpu")->execute().set_input_line(ARM7_FIRQ_LINE, ASSERT_LINE); } else { - device_set_input_line(machine.device("maincpu"), ARM7_FIRQ_LINE, CLEAR_LINE); + machine.device("maincpu")->execute().set_input_line(ARM7_FIRQ_LINE, CLEAR_LINE); } } diff --git a/src/mess/drivers/portfoli.c b/src/mess/drivers/portfoli.c index 9600bde67ae..8d223db3309 100644 --- a/src/mess/drivers/portfoli.c +++ b/src/mess/drivers/portfoli.c @@ -114,7 +114,7 @@ void portfolio_state::check_interrupt() { int level = (m_ip & m_ie) ? ASSERT_LINE : CLEAR_LINE; - device_set_input_line(m_maincpu, INPUT_LINE_INT0, level); + m_maincpu->set_input_line(INPUT_LINE_INT0, level); } //------------------------------------------------- @@ -766,7 +766,7 @@ void portfolio_state::machine_start() address_space *program = m_maincpu->space(AS_PROGRAM); /* set CPU interrupt vector callback */ - device_set_irq_callback(m_maincpu, portfolio_int_ack); + m_maincpu->set_irq_acknowledge_callback(portfolio_int_ack); /* memory expansions */ switch (machine().device(RAM_TAG)->size()) diff --git a/src/mess/drivers/prestige.c b/src/mess/drivers/prestige.c index 2e6aff20731..b70226aa449 100644 --- a/src/mess/drivers/prestige.c +++ b/src/mess/drivers/prestige.c @@ -396,7 +396,7 @@ static IRQ_CALLBACK( prestige_int_ack ) UINT32 vector; prestige_state *state = device->machine().driver_data(); - device_set_input_line(state->m_maincpu, 0, CLEAR_LINE); + state->m_maincpu->set_input_line(0, CLEAR_LINE); if (state->m_irq_counter == 0x02) { @@ -417,7 +417,7 @@ void prestige_state::machine_start() UINT8 *ram = m_ram->pointer(); memset(ram, 0x00, m_ram->size()); - device_set_irq_callback(m_maincpu, prestige_int_ack); + m_maincpu->set_irq_acknowledge_callback(prestige_int_ack); membank("bank1")->configure_entries(0, 64, memregion("maincpu")->base(), 0x4000); membank("bank2")->configure_entries(0, 64, memregion("maincpu")->base(), 0x4000); diff --git a/src/mess/drivers/pv1000.c b/src/mess/drivers/pv1000.c index a596cc10666..d60e86ac793 100644 --- a/src/mess/drivers/pv1000.c +++ b/src/mess/drivers/pv1000.c @@ -349,7 +349,7 @@ static TIMER_CALLBACK( d65010_irq_on_cb ) int next_vpos = vpos + 12; /* Set IRQ line and schedule release of IRQ line */ - device_set_input_line( state->m_maincpu, 0, ASSERT_LINE ); + state->m_maincpu->set_input_line(0, ASSERT_LINE ); state->m_irq_off_timer->adjust( state->m_screen->time_until_pos(vpos, 380/2 ) ); /* Schedule next IRQ trigger */ @@ -365,7 +365,7 @@ static TIMER_CALLBACK( d65010_irq_off_cb ) { pv1000_state *state = machine.driver_data(); - device_set_input_line( state->m_maincpu, 0, CLEAR_LINE ); + state->m_maincpu->set_input_line(0, CLEAR_LINE ); } diff --git a/src/mess/drivers/pv2000.c b/src/mess/drivers/pv2000.c index f722564ba4c..94126911521 100644 --- a/src/mess/drivers/pv2000.c +++ b/src/mess/drivers/pv2000.c @@ -373,7 +373,7 @@ static MACHINE_RESET( pv2000 ) state->m_key_pressed = 0; state->m_keyb_column = 0; - device_set_input_line_vector(machine.device("maincpu"), INPUT_LINE_IRQ0, 0xff); + machine.device("maincpu")->execute().set_input_line_vector(INPUT_LINE_IRQ0, 0xff); memset(&state->memregion("maincpu")->base()[0x7000], 0xff, 0x1000); // initialize RAM } diff --git a/src/mess/drivers/pyl601.c b/src/mess/drivers/pyl601.c index ea1dc5cf14a..33ec53817c0 100644 --- a/src/mess/drivers/pyl601.c +++ b/src/mess/drivers/pyl601.c @@ -518,7 +518,7 @@ static INTERRUPT_GEN( pyl601_interrupt ) { pyl601_state *state = device->machine().driver_data(); state->m_tick50_mark = 0x80; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static LEGACY_FLOPPY_OPTIONS_START(pyldin) diff --git a/src/mess/drivers/ql.c b/src/mess/drivers/ql.c index e59cb378f55..74c035416e7 100644 --- a/src/mess/drivers/ql.c +++ b/src/mess/drivers/ql.c @@ -163,10 +163,10 @@ WRITE8_MEMBER( ql_state::ipc_port2_w ) { switch (ipl) { - case 0: device_set_input_line(m_maincpu, M68K_IRQ_7, ASSERT_LINE); break; - case 1: device_set_input_line(m_maincpu, M68K_IRQ_5, ASSERT_LINE); break; // CTRL-ALT-7 pressed - case 2: device_set_input_line(m_maincpu, M68K_IRQ_2, ASSERT_LINE); break; - case 3: device_set_input_line(m_maincpu, M68K_IRQ_7, CLEAR_LINE); break; + case 0: m_maincpu->set_input_line(M68K_IRQ_7, ASSERT_LINE); break; + case 1: m_maincpu->set_input_line(M68K_IRQ_5, ASSERT_LINE); break; // CTRL-ALT-7 pressed + case 2: m_maincpu->set_input_line(M68K_IRQ_2, ASSERT_LINE); break; + case 3: m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE); break; } m_ipl = ipl; @@ -208,7 +208,7 @@ READ8_MEMBER( ql_state::ipc_port2_r ) // int irq = (m_ser2_rxd | m_ser1_txd); -// device_set_input_line(m_ipc, INPUT_LINE_IRQ0, irq); +// m_ipc->execute().set_input_line(INPUT_LINE_IRQ0, irq); return (m_comdata << 7); } diff --git a/src/mess/drivers/qx10.c b/src/mess/drivers/qx10.c index a7731e8b876..4c5e09bd419 100644 --- a/src/mess/drivers/qx10.c +++ b/src/mess/drivers/qx10.c @@ -899,7 +899,7 @@ INPUT_PORTS_END void qx10_state::machine_start() { - device_set_irq_callback(machine().device("maincpu"), irq_callback); + machine().device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback); } void qx10_state::machine_reset() diff --git a/src/mess/drivers/rainbow.c b/src/mess/drivers/rainbow.c index 4eb7ef22612..39672811754 100644 --- a/src/mess/drivers/rainbow.c +++ b/src/mess/drivers/rainbow.c @@ -194,7 +194,7 @@ static MACHINE_RESET( rainbow ) { rainbow_state *state = machine.driver_data(); - device_set_input_line(state->m_z80, INPUT_LINE_HALT, ASSERT_LINE); + state->m_z80->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); state->m_zflip = true; state->m_z80_halted = true; @@ -274,28 +274,28 @@ WRITE8_MEMBER(rainbow_state::share_z80_w) READ8_MEMBER(rainbow_state::i8088_latch_r) { // printf("Read %02x from 8088 mailbox\n", m_8088_mailbox); - device_set_input_line(m_i8088, INPUT_LINE_INT1, CLEAR_LINE); + m_i8088->execute().set_input_line(INPUT_LINE_INT1, CLEAR_LINE); return m_8088_mailbox; } WRITE8_MEMBER(rainbow_state::i8088_latch_w) { // printf("%02x to Z80 mailbox\n", data); - device_set_input_line_and_vector(m_z80, 0, ASSERT_LINE, 0xf7); + m_z80->execute().set_input_line_and_vector(0, ASSERT_LINE, 0xf7); m_z80_mailbox = data; } READ8_MEMBER(rainbow_state::z80_latch_r) { // printf("Read %02x from Z80 mailbox\n", m_z80_mailbox); - device_set_input_line(m_z80, 0, CLEAR_LINE); + m_z80->execute().set_input_line(0, CLEAR_LINE); return m_z80_mailbox; } WRITE8_MEMBER(rainbow_state::z80_latch_w) { // printf("%02x to 8088 mailbox\n", data); - device_set_input_line_and_vector(m_i8088, INPUT_LINE_INT1, ASSERT_LINE, 0x27); + m_i8088->execute().set_input_line_and_vector(INPUT_LINE_INT1, ASSERT_LINE, 0x27); m_8088_mailbox = data; } @@ -316,12 +316,12 @@ READ8_MEMBER( rainbow_state::read_video_ram_r ) static INTERRUPT_GEN( vblank_irq ) { - device_set_input_line_and_vector(device, INPUT_LINE_INT0, ASSERT_LINE, 0x20); + device->execute().set_input_line_and_vector(INPUT_LINE_INT0, ASSERT_LINE, 0x20); } WRITE8_MEMBER( rainbow_state::clear_video_interrupt ) { - device_set_input_line(m_i8088, INPUT_LINE_INT0, CLEAR_LINE); + m_i8088->execute().set_input_line(INPUT_LINE_INT0, CLEAR_LINE); } READ8_MEMBER( rainbow_state::diagnostic_r ) @@ -335,7 +335,7 @@ WRITE8_MEMBER( rainbow_state::diagnostic_w ) if (!(data & 1)) { - device_set_input_line(m_z80, INPUT_LINE_HALT, ASSERT_LINE); + m_z80->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_z80_halted = true; } @@ -343,7 +343,7 @@ WRITE8_MEMBER( rainbow_state::diagnostic_w ) { m_zflip = true; m_z80_halted = false; - device_set_input_line(m_z80, INPUT_LINE_HALT, CLEAR_LINE); + m_z80->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE); m_z80->reset(); } @@ -354,11 +354,11 @@ void rainbow_state::update_kbd_irq() { if ((m_kbd_rx_ready) || (m_kbd_tx_ready)) { - device_set_input_line_and_vector(m_i8088, INPUT_LINE_INT2, ASSERT_LINE, 0x26); + m_i8088->execute().set_input_line_and_vector(INPUT_LINE_INT2, ASSERT_LINE, 0x26); } else { - device_set_input_line(m_i8088, INPUT_LINE_INT2, CLEAR_LINE); + m_i8088->execute().set_input_line(INPUT_LINE_INT2, CLEAR_LINE); } } diff --git a/src/mess/drivers/rex6000.c b/src/mess/drivers/rex6000.c index 91b519051cc..0706c7b7ec9 100644 --- a/src/mess/drivers/rex6000.c +++ b/src/mess/drivers/rex6000.c @@ -141,7 +141,7 @@ UINT8 rex6000_state::identify_bank_type(UINT32 bank) } else { - //logerror("%04x: unkonwn memory bank %x\n", m_maincpu->safe_pc(), bank); + //logerror("%04x: unkonwn memory bank %x\n", m_maincpu->pc(), bank); return BANK_UNKNOWN; } } @@ -413,7 +413,7 @@ static INPUT_CHANGED( trigger_irq ) { state->m_irq_flag |= IRQ_FLAG_KEYCHANGE; - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } } @@ -519,7 +519,7 @@ static TIMER_DEVICE_CALLBACK( irq_timer1 ) { state->m_irq_flag |= IRQ_FLAG_IRQ2; - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } } @@ -532,7 +532,7 @@ static TIMER_DEVICE_CALLBACK( irq_timer2 ) { state->m_irq_flag |= IRQ_FLAG_IRQ1; - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } } @@ -544,7 +544,7 @@ static TIMER_DEVICE_CALLBACK( sec_timer ) { state->m_irq_flag |= IRQ_FLAG_1HZ; - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } } @@ -553,7 +553,7 @@ WRITE_LINE_MEMBER( rex6000_state::alarm_irq ) if (!(m_irq_mask & IRQ_FLAG_ALARM) && state) { m_irq_flag |= IRQ_FLAG_ALARM; - device_set_input_line(m_maincpu, 0, HOLD_LINE); + m_maincpu->set_input_line(0, HOLD_LINE); } } diff --git a/src/mess/drivers/samcoupe.c b/src/mess/drivers/samcoupe.c index e4433a03bb4..1e616dc70df 100644 --- a/src/mess/drivers/samcoupe.c +++ b/src/mess/drivers/samcoupe.c @@ -342,7 +342,7 @@ void samcoupe_irq(device_t *device, UINT8 src) samcoupe_state *state = device->machine().driver_data(); /* assert irq and a timer to set it off again */ - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); device->machine().scheduler().timer_set(attotime::from_usec(20), FUNC(irq_off), src); /* adjust STATUS register */ diff --git a/src/mess/drivers/sm1800.c b/src/mess/drivers/sm1800.c index 5e84e874ea6..c966c3028c6 100644 --- a/src/mess/drivers/sm1800.c +++ b/src/mess/drivers/sm1800.c @@ -74,7 +74,7 @@ static IRQ_CALLBACK(sm1800_irq_callback) MACHINE_RESET_MEMBER(sm1800_state) { - device_set_irq_callback(m_maincpu, sm1800_irq_callback); + m_maincpu->set_irq_acknowledge_callback(sm1800_irq_callback); } void sm1800_state::video_start() diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c index 109db93057a..849abbf5f23 100644 --- a/src/mess/drivers/smc777.c +++ b/src/mess/drivers/smc777.c @@ -1049,7 +1049,7 @@ static INTERRUPT_GEN( smc777_vblank_irq ) smc777_state *state = device->machine().driver_data(); 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/mess/drivers/socrates.c b/src/mess/drivers/socrates.c index ee0e7939106..8e4cb60f051 100644 --- a/src/mess/drivers/socrates.c +++ b/src/mess/drivers/socrates.c @@ -268,7 +268,7 @@ READ8_MEMBER(socrates_state::read_f3)// used for read-only i/o ports as mame/mes WRITE8_MEMBER(socrates_state::kbmcu_strobe) // strobe the keyboard MCU { - //logerror("0x%04X: kbmcu written with %02X!\n", m_maincpu->safe_pc(), data); //if (m_maincpu->safe_pc() != 0x31D) + //logerror("0x%04X: kbmcu written with %02X!\n", m_maincpu->pc(), data); //if (m_maincpu->pc() != 0x31D) // if two writes happen within one frame, reset the keyboard latches m_kbmcu_rscount++; if (m_kbmcu_rscount > 1) @@ -912,7 +912,7 @@ static TIMER_CALLBACK( clear_irq_cb ) static INTERRUPT_GEN( assert_irq ) { socrates_state *state = device->machine().driver_data(); - device_set_input_line(device, 0, ASSERT_LINE); + device->execute().set_input_line(0, ASSERT_LINE); device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(44), FUNC(clear_irq_cb)); // 44 is a complete and total guess, need to properly measure how many clocks/microseconds the int line is high for. state->m_vblankstate = 1; diff --git a/src/mess/drivers/spectrum.c b/src/mess/drivers/spectrum.c index b498eff0ead..3ee17e6826c 100644 --- a/src/mess/drivers/spectrum.c +++ b/src/mess/drivers/spectrum.c @@ -663,7 +663,7 @@ GFXDECODE_END static INTERRUPT_GEN( spec_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static const cassette_interface spectrum_cassette_interface = diff --git a/src/mess/drivers/supracan.c b/src/mess/drivers/supracan.c index bcfc07ff35e..6de295a19ae 100644 --- a/src/mess/drivers/supracan.c +++ b/src/mess/drivers/supracan.c @@ -1142,11 +1142,11 @@ READ8_MEMBER( supracan_state::supracan_6502_soundmem_r ) { if(m_sound_irq_enable_reg & m_sound_irq_source_reg) { - device_set_input_line(machine().device("soundcpu"), 0, ASSERT_LINE); + machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE); } else { - device_set_input_line(machine().device("soundcpu"), 0, CLEAR_LINE); + machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE); } } break; @@ -1156,7 +1156,7 @@ READ8_MEMBER( supracan_state::supracan_6502_soundmem_r ) if(!mem->debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", machine(), 3, "supracan_soundreg_r: IRQ source: %04x\n", data); if(!mem->debugger_access()) { - device_set_input_line(machine().device("soundcpu"), 0, CLEAR_LINE); + machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE); } break; case 0x420: @@ -1190,7 +1190,7 @@ WRITE8_MEMBER( supracan_state::supracan_6502_soundmem_w ) if(m_sound_cpu_68k_irq_reg &~ data) { verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", machine(), 0, "supracan_soundreg_w: sound_cpu_68k_irq_reg: %04x: Triggering M68k IRQ\n", data); - device_set_input_line(m_maincpu, 7, HOLD_LINE); + m_maincpu->set_input_line(7, HOLD_LINE); } else { @@ -1420,7 +1420,7 @@ WRITE16_MEMBER( supracan_state::supracan_sound_w ) switch ( offset ) { case 0x000a/2: /* Sound cpu IRQ request. */ - device_set_input_line(machine().device("soundcpu"), 0, ASSERT_LINE); + machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE); break; case 0x001c/2: /* Sound cpu control. Bit 0 tied to sound cpu RESET line */ if(data & 0x01) @@ -1460,7 +1460,7 @@ READ16_MEMBER( supracan_state::supracan_video_r ) if(!mem->debugger_access()) { //verboselog("maincpu", machine(), 0, "read video IRQ flags (%04x)\n", data); - device_set_input_line(m_maincpu, 7, CLEAR_LINE); + m_maincpu->set_input_line(7, CLEAR_LINE); } break; case 0x02/2: // Current scanline @@ -1489,7 +1489,7 @@ static TIMER_CALLBACK( supracan_hbl_callback ) { supracan_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 3, HOLD_LINE); + state->m_maincpu->set_input_line(3, HOLD_LINE); state->m_hbl_timer->adjust(attotime::never); } @@ -1498,7 +1498,7 @@ static TIMER_CALLBACK( supracan_line_on_callback ) { supracan_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 5, HOLD_LINE); + state->m_maincpu->set_input_line(5, HOLD_LINE); state->m_line_on_timer->adjust(attotime::never); } @@ -1507,7 +1507,7 @@ static TIMER_CALLBACK( supracan_line_off_callback ) { supracan_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, 5, CLEAR_LINE); + state->m_maincpu->set_input_line(5, CLEAR_LINE); state->m_line_on_timer->adjust(attotime::never); } @@ -1541,7 +1541,7 @@ static TIMER_CALLBACK( supracan_video_callback ) if(state->m_irq_mask & 1) { verboselog("maincpu", machine, 0, "Triggering VBL IRQ\n\n"); - device_set_input_line(state->m_maincpu, 7, HOLD_LINE); + state->m_maincpu->set_input_line(7, HOLD_LINE); } break; } @@ -1724,7 +1724,7 @@ WRITE16_MEMBER( supracan_state::supracan_video_w ) #if 0 if(!m_irq_mask && !m_hbl_mask) { - device_set_input_line(m_maincpu, 7, CLEAR_LINE); + m_maincpu->set_input_line(7, CLEAR_LINE); } #endif verboselog("maincpu", machine(), 3, "irq_mask = %04x\n", data); @@ -1878,7 +1878,7 @@ static INTERRUPT_GEN( supracan_irq ) if(state->m_irq_mask) { - device_set_input_line(device, 7, HOLD_LINE); + device->execute().set_input_line(7, HOLD_LINE); } #endif } @@ -1891,11 +1891,11 @@ static INTERRUPT_GEN( supracan_sound_irq ) if(state->m_sound_irq_enable_reg & state->m_sound_irq_source_reg) { - device_set_input_line(device->machine().device("soundcpu"), 0, ASSERT_LINE); + device->machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE); } else { - device_set_input_line(device->machine().device("soundcpu"), 0, CLEAR_LINE); + device->machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE); } } diff --git a/src/mess/drivers/svision.c b/src/mess/drivers/svision.c index a5aa5d36d5c..872b0c1ebba 100644 --- a/src/mess/drivers/svision.c +++ b/src/mess/drivers/svision.c @@ -418,7 +418,7 @@ static INTERRUPT_GEN( svision_frame_int ) { svision_state *state = device->machine().driver_data(); if (state->BANK&1) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); svision_sound_decrement(state->m_sound); } diff --git a/src/mess/drivers/tandy2k.c b/src/mess/drivers/tandy2k.c index d07481aa7bc..4a7cc1d7641 100644 --- a/src/mess/drivers/tandy2k.c +++ b/src/mess/drivers/tandy2k.c @@ -121,10 +121,10 @@ WRITE8_MEMBER( tandy2k_state::enable_w ) upd765_reset_w(m_fdc, BIT(data, 5)); // timer 0 enable - device_set_input_line(m_maincpu, INPUT_LINE_TMRIN0, BIT(data, 6)); + m_maincpu->set_input_line(INPUT_LINE_TMRIN0, BIT(data, 6)); // timer 1 enable - device_set_input_line(m_maincpu, INPUT_LINE_TMRIN1, BIT(data, 7)); + m_maincpu->set_input_line(INPUT_LINE_TMRIN1, BIT(data, 7)); } WRITE8_MEMBER( tandy2k_state::dma_mux_w ) diff --git a/src/mess/drivers/tek405x.c b/src/mess/drivers/tek405x.c index e1f9337cd7b..c15653f6d73 100644 --- a/src/mess/drivers/tek405x.c +++ b/src/mess/drivers/tek405x.c @@ -64,7 +64,7 @@ void tek4051_state::update_irq() { int state = m_kb_pia_irqa | m_kb_pia_irqb | m_x_pia_irqa | m_x_pia_irqb | m_gpib_pia_irqa | m_gpib_pia_irqb | m_com_pia_irqa | m_com_pia_irqb | m_acia_irq; - device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, state); + m_maincpu->set_input_line(INPUT_LINE_IRQ0, state); } @@ -76,7 +76,7 @@ void tek4051_state::update_nmi() { int state = m_y_pia_irqa | m_y_pia_irqb | m_tape_pia_irqa | m_tape_pia_irqb; - device_set_input_line(m_maincpu, INPUT_LINE_NMI, state); + m_maincpu->set_input_line(INPUT_LINE_NMI, state); } diff --git a/src/mess/drivers/ti99_2.c b/src/mess/drivers/ti99_2.c index c93ff6f19ab..04225709441 100644 --- a/src/mess/drivers/ti99_2.c +++ b/src/mess/drivers/ti99_2.c @@ -131,7 +131,7 @@ static MACHINE_RESET( ti99_2 ) static INTERRUPT_GEN( ti99_2_vblank_interrupt ) { ti99_2_state *state = device->machine().driver_data(); - device_set_input_line(device, 1, state->m_irq_state); + device->execute().set_input_line(1, state->m_irq_state); state->m_irq_state = (state->m_irq_state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE; } diff --git a/src/mess/drivers/ti99_4p.c b/src/mess/drivers/ti99_4p.c index c7363923dbe..7ce6f5bee1e 100644 --- a/src/mess/drivers/ti99_4p.c +++ b/src/mess/drivers/ti99_4p.c @@ -335,7 +335,7 @@ READ16_MEMBER( ti99_4p::memread ) WRITE16_MEMBER( ti99_4p::memwrite ) { -// device_adjust_icount(m_cpu, -4); +// m_cpu->execute().adjust_icount(-4); int addroff = offset << 1; UINT16 zone = addroff & 0xe000; diff --git a/src/mess/drivers/trs80m2.c b/src/mess/drivers/trs80m2.c index e8be6e6ba7b..b0e7c52fd48 100644 --- a/src/mess/drivers/trs80m2.c +++ b/src/mess/drivers/trs80m2.c @@ -956,7 +956,7 @@ void trs80m16_state::machine_start() trs80m2_state::machine_start(); // register CPU IRQ callback - device_set_irq_callback(m_maincpu, trs80m16_irq_callback); + m_maincpu->set_irq_acknowledge_callback(trs80m16_irq_callback); // register for state saving save_item(NAME(m_ual)); diff --git a/src/mess/drivers/tsispch.c b/src/mess/drivers/tsispch.c index 7ffdca9428d..8510638c00e 100644 --- a/src/mess/drivers/tsispch.c +++ b/src/mess/drivers/tsispch.c @@ -272,7 +272,7 @@ void tsispch_state::machine_reset() int i; for (i=0; i<32; i++) m_infifo[i] = 0; m_infifo_tail_ptr = m_infifo_head_ptr = 0; - device_set_irq_callback(machine().device("maincpu"), irq_callback); + machine().device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback); fprintf(stderr,"machine reset\n"); } diff --git a/src/mess/drivers/tvc.c b/src/mess/drivers/tvc.c index 7c0e506ce09..17711721e2b 100644 --- a/src/mess/drivers/tvc.c +++ b/src/mess/drivers/tvc.c @@ -193,7 +193,7 @@ WRITE8_MEMBER(tvc_state::tvc_flipflop_w) { // every write here clears the vblank flipflop m_int_flipflop = 1; - device_set_input_line(m_maincpu, 0, CLEAR_LINE); + m_maincpu->set_input_line(0, CLEAR_LINE); } READ8_MEMBER(tvc_state::tvc_exp_id_r) @@ -605,7 +605,7 @@ WRITE_LINE_MEMBER(tvc_state::tvc_int_ff_set) if (state) { m_int_flipflop = 0; - device_set_input_line(m_maincpu, 0, ASSERT_LINE); + m_maincpu->set_input_line(0, ASSERT_LINE); } } diff --git a/src/mess/drivers/v1050.c b/src/mess/drivers/v1050.c index f57a0787b1a..faeb420a727 100644 --- a/src/mess/drivers/v1050.c +++ b/src/mess/drivers/v1050.c @@ -343,7 +343,7 @@ WRITE8_MEMBER( v1050_state::dint_w ) WRITE8_MEMBER( v1050_state::dvint_clr_w ) { - device_set_input_line(m_subcpu, INPUT_LINE_IRQ0, CLEAR_LINE); + m_subcpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); } READ8_MEMBER( v1050_state::sasi_status_r ) @@ -604,7 +604,7 @@ static WRITE_LINE_DEVICE_HANDLER( pic_int_w ) { if (state == ASSERT_LINE) { - device_set_input_line(device, INPUT_LINE_IRQ0, ASSERT_LINE); + device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } } @@ -756,7 +756,7 @@ WRITE8_MEMBER( v1050_state::misc_ppi_pc_w ) if (!m_f_int_enb) { set_interrupt(INT_FLOPPY, 0); - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } // baud select @@ -948,11 +948,11 @@ WRITE_LINE_MEMBER( v1050_state::fdc_drq_w ) { if (m_f_int_enb) { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, state); + m_maincpu->set_input_line(INPUT_LINE_NMI, state); } else { - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } } @@ -1013,7 +1013,7 @@ static IRQ_CALLBACK( v1050_int_ack ) //logerror("Interrupt Acknowledge Vector: %02x\n", vector); - device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, CLEAR_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); return vector; } @@ -1033,7 +1033,7 @@ void v1050_state::machine_start() m_rtc->cs1_w(1); // set CPU interrupt callback - device_set_irq_callback(m_maincpu, v1050_int_ack); + m_maincpu->set_irq_acknowledge_callback(v1050_int_ack); // setup memory banking UINT8 *ram = machine().device(RAM_TAG)->pointer(); diff --git a/src/mess/drivers/vboy.c b/src/mess/drivers/vboy.c index fb7d71eda4f..25d00517705 100644 --- a/src/mess/drivers/vboy.c +++ b/src/mess/drivers/vboy.c @@ -616,7 +616,7 @@ WRITE32_MEMBER( vboy_state::io_w ) */ if (!(data & 0x08)) { - device_set_input_line(m_maincpu, 1, CLEAR_LINE); + m_maincpu->set_input_line(1, CLEAR_LINE); } if (data & 1) @@ -1201,7 +1201,7 @@ void vboy_state::m_timer_tick() m_vboy_regs.tcr |= 0x02; if(m_vboy_regs.tcr & 8) { - device_set_input_line(m_maincpu, 1, ASSERT_LINE); + m_maincpu->set_input_line(1, ASSERT_LINE); } } @@ -1227,7 +1227,7 @@ static TIMER_DEVICE_CALLBACK( timer_pad_tick ) vboy_state *state = timer.machine().driver_data(); if((state->m_vboy_regs.kcr & 0x80) == 0) - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); } static PALETTE_INIT( vboy ) @@ -1243,10 +1243,10 @@ void vboy_state::m_set_irq(UINT16 irq_vector) m_vip_regs.INTPND |= irq_vector; if(m_vip_regs.INTENB & m_vip_regs.INTPND) - device_set_input_line(m_maincpu, 4, ASSERT_LINE); + m_maincpu->set_input_line(4, ASSERT_LINE); if((m_vip_regs.INTENB & m_vip_regs.INTPND) == 0) - device_set_input_line(m_maincpu, 4, CLEAR_LINE); + m_maincpu->set_input_line(4, CLEAR_LINE); } /* TODO: obviously all of this needs clean-ups and better implementation ... */ diff --git a/src/mess/drivers/victor9k.c b/src/mess/drivers/victor9k.c index 9bd1c1a8f35..12b2e7ee0fd 100644 --- a/src/mess/drivers/victor9k.c +++ b/src/mess/drivers/victor9k.c @@ -825,7 +825,7 @@ WRITE8_MEMBER( victor9k_state::via6_pb_w ) */ // motor speed controller reset - device_set_input_line(m_fdc_cpu, INPUT_LINE_RESET, BIT(data, 2)); + m_fdc_cpu->set_input_line(INPUT_LINE_RESET, BIT(data, 2)); // stepper enable A m_se[0] = BIT(data, 6); @@ -923,7 +923,7 @@ static IRQ_CALLBACK( victor9k_irq_callback ) void victor9k_state::machine_start() { // set interrupt callback - device_set_irq_callback(m_maincpu, victor9k_irq_callback); + m_maincpu->set_irq_acknowledge_callback(victor9k_irq_callback); // memory banking address_space *program = m_maincpu->space(AS_PROGRAM); diff --git a/src/mess/drivers/vidbrain.c b/src/mess/drivers/vidbrain.c index 2318fcba0ff..f695d54e526 100644 --- a/src/mess/drivers/vidbrain.c +++ b/src/mess/drivers/vidbrain.c @@ -530,7 +530,7 @@ void vidbrain_state::device_timer(emu_timer &timer, device_timer_id id, int para void vidbrain_state::machine_start() { // register IRQ callback - device_set_irq_callback(m_maincpu, vidbrain_int_ack); + m_maincpu->set_irq_acknowledge_callback(vidbrain_int_ack); // allocate timers m_timer_ne555 = timer_alloc(TIMER_JOYSTICK); diff --git a/src/mess/drivers/vixen.c b/src/mess/drivers/vixen.c index d871fd6f394..e2363ade506 100644 --- a/src/mess/drivers/vixen.c +++ b/src/mess/drivers/vixen.c @@ -79,7 +79,7 @@ void vixen_state::update_interrupt() { int state = (m_cmd_d1 && m_fdint) || m_vsync || (!m_enb_srq_int && !m_srq) || (!m_enb_atn_int && !m_atn) || (!m_enb_xmt_int && m_txrdy) || (!m_enb_rcv_int && m_rxrdy); - device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE); } @@ -778,7 +778,7 @@ static IRQ_CALLBACK( vixen_int_ack ) void vixen_state::machine_start() { // interrupt callback - device_set_irq_callback(m_maincpu, vixen_int_ack); + m_maincpu->set_irq_acknowledge_callback(vixen_int_ack); // configure memory banking UINT8 *ram = m_ram->pointer(); diff --git a/src/mess/drivers/vk100.c b/src/mess/drivers/vk100.c index b36c412f1ee..b528ee3bef0 100644 --- a/src/mess/drivers/vk100.c +++ b/src/mess/drivers/vk100.c @@ -561,7 +561,7 @@ READ8_MEMBER(vk100_state::SYSTAT_A) { UINT8 dipswitchLUT[8] = { 1,3,5,7,6,4,2,0 }; // the dipswitches map in a weird order to offsets #ifdef SYSTAT_A_VERBOSE - if (m_maincpu->safe_pc() != 0x31D) logerror("0x%04X: SYSTAT_A Read!\n", m_maincpu->safe_pc()); + if (m_maincpu->pc() != 0x31D) logerror("0x%04X: SYSTAT_A Read!\n", m_maincpu->pc()); #endif return ((m_vgGO?0:1)<<7)|(vram_read(machine())<<3)|(((ioport("SWITCHES")->read()>>dipswitchLUT[offset])&1)?0x4:0)|(m_vsync?0x2:0); } @@ -585,7 +585,7 @@ READ8_MEMBER(vk100_state::SYSTAT_A) READ8_MEMBER(vk100_state::SYSTAT_B) { #ifdef SYSTAT_B_VERBOSE - logerror("0x%04X: SYSTAT_B Read!\n", m_maincpu->safe_pc()); + logerror("0x%04X: SYSTAT_B Read!\n", m_maincpu->pc()); #endif return (m_ACTS<<7)|0x7F; } @@ -875,20 +875,20 @@ static MACHINE_RESET( vk100 ) static WRITE_LINE_DEVICE_HANDLER(crtc_vsync) { vk100_state *m_state = device->machine().driver_data(); - device_set_input_line(m_state->m_maincpu, I8085_RST75_LINE, state? ASSERT_LINE : CLEAR_LINE); + m_state->m_maincpu->set_input_line(I8085_RST75_LINE, state? ASSERT_LINE : CLEAR_LINE); m_state->m_vsync = state; } static WRITE_LINE_DEVICE_HANDLER(i8251_rxrdy_int) { vk100_state *m_state = device->machine().driver_data(); - device_set_input_line(m_state->m_maincpu, I8085_RST65_LINE, state?ASSERT_LINE:CLEAR_LINE); + m_state->m_maincpu->set_input_line(I8085_RST65_LINE, state?ASSERT_LINE:CLEAR_LINE); } static WRITE_LINE_DEVICE_HANDLER(i8251_txrdy_int) { vk100_state *m_state = device->machine().driver_data(); - device_set_input_line(m_state->m_maincpu, I8085_RST55_LINE, state?ASSERT_LINE:CLEAR_LINE); + m_state->m_maincpu->set_input_line(I8085_RST55_LINE, state?ASSERT_LINE:CLEAR_LINE); } static WRITE_LINE_DEVICE_HANDLER(i8251_rts) diff --git a/src/mess/drivers/vt100.c b/src/mess/drivers/vt100.c index 354adebf952..17efcf701a3 100644 --- a/src/mess/drivers/vt100.c +++ b/src/mess/drivers/vt100.c @@ -356,7 +356,7 @@ static MACHINE_RESET(vt100) state->m_key_scan = 0; - device_set_irq_callback(machine.device("maincpu"), vt100_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(vt100_irq_callback); } READ8_MEMBER( vt100_state::vt100_read_video_ram_r ) @@ -381,7 +381,7 @@ static INTERRUPT_GEN( vt100_vertical_interrupt ) { vt100_state *state = device->machine().driver_data(); state->m_vertical_int = 1; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } /* F4 Character Displayer */ diff --git a/src/mess/drivers/vt240.c b/src/mess/drivers/vt240.c index 70ca1c5250b..43c2188f9a8 100644 --- a/src/mess/drivers/vt240.c +++ b/src/mess/drivers/vt240.c @@ -142,7 +142,7 @@ static UPD7220_INTERFACE( hgdc_intf ) static INTERRUPT_GEN( vt240_irq ) { - //device_set_input_line(device, I8085_RST65_LINE, ASSERT_LINE); + //device->execute().set_input_line(I8085_RST65_LINE, ASSERT_LINE); } static const gfx_layout vt240_chars_8x8 = diff --git a/src/mess/drivers/wangpc.c b/src/mess/drivers/wangpc.c index a6cdaabf50d..32a044cb718 100644 --- a/src/mess/drivers/wangpc.c +++ b/src/mess/drivers/wangpc.c @@ -1165,7 +1165,7 @@ SLOT_INTERFACE_END void wangpc_state::machine_start() { // register CPU IRQ callback - device_set_irq_callback(m_maincpu, wangpc_irq_callback); + m_maincpu->set_irq_acknowledge_callback(wangpc_irq_callback); // connect serial keyboard m_uart->connect(m_kb); diff --git a/src/mess/drivers/x07.c b/src/mess/drivers/x07.c index c1b3ace8eb9..f037ac03868 100644 --- a/src/mess/drivers/x07.c +++ b/src/mess/drivers/x07.c @@ -579,7 +579,7 @@ void x07_state::t6834_r () m_regs_r[0] = 0x40; m_regs_r[1] = m_out.data[m_out.read]; m_regs_r[2] |= 0x01; - device_set_input_line(m_maincpu, NSC800_RSTA, ASSERT_LINE); + m_maincpu->set_input_line(NSC800_RSTA, ASSERT_LINE); m_rsta_clear->adjust(attotime::from_msec(50)); } } @@ -648,7 +648,7 @@ void x07_state::t6834_w () m_regs_r[0] = 0x40; m_regs_r[1] = m_out.data[m_out.read]; m_regs_r[2] |= 0x01; - device_set_input_line(m_maincpu, NSC800_RSTA, ASSERT_LINE); + m_maincpu->set_input_line(NSC800_RSTA, ASSERT_LINE); m_rsta_clear->adjust(attotime::from_msec(50)); } } @@ -805,7 +805,7 @@ void x07_state::receive_bit(int bit) m_cass_data = 0; m_bit_count = 0; - device_set_input_line(m_maincpu, NSC800_RSTB, ASSERT_LINE); + m_maincpu->set_input_line(NSC800_RSTB, ASSERT_LINE); m_rstb_clear->adjust(attotime::from_usec(200)); } @@ -982,7 +982,7 @@ INPUT_CHANGED_MEMBER( x07_state::kb_break ) m_regs_r[0] = 0x80; m_regs_r[1] = 0x05; m_regs_r[2] |= 0x01; - device_set_input_line(m_maincpu, NSC800_RSTA, ASSERT_LINE ); + m_maincpu->set_input_line(NSC800_RSTA, ASSERT_LINE ); m_rsta_clear->adjust(attotime::from_msec(50)); } } @@ -998,7 +998,7 @@ void x07_state::kb_irq() memcpy(m_t6834_ram + 0x400, m_t6834_ram + 0x401, 0xff); m_kb_size--; m_regs_r[2] |= 0x01; - device_set_input_line(m_maincpu, NSC800_RSTA, ASSERT_LINE); + m_maincpu->set_input_line(NSC800_RSTA, ASSERT_LINE); m_rsta_clear->adjust(attotime::from_msec(50)); } } @@ -1370,7 +1370,7 @@ static TIMER_DEVICE_CALLBACK( blink_timer ) static TIMER_CALLBACK( rsta_clear ) { x07_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, NSC800_RSTA, CLEAR_LINE); + state->m_maincpu->set_input_line(NSC800_RSTA, CLEAR_LINE); if (state->m_kb_size) state->kb_irq(); @@ -1379,7 +1379,7 @@ static TIMER_CALLBACK( rsta_clear ) static TIMER_CALLBACK( rstb_clear ) { x07_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, NSC800_RSTB, CLEAR_LINE); + state->m_maincpu->set_input_line(NSC800_RSTB, CLEAR_LINE); } static TIMER_CALLBACK( beep_stop ) diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c index a185dc5d286..2bbed673aca 100644 --- a/src/mess/drivers/x1.c +++ b/src/mess/drivers/x1.c @@ -1942,7 +1942,7 @@ static INPUT_CHANGED( ipl_reset ) //address_space *space = field.machine().device("x1_cpu")->memory().space(AS_PROGRAM); x1_state *state = field.machine().driver_data(); - device_set_input_line(state->m_x1_cpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); + state->m_x1_cpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); state->m_ram_bank = 0x00; if(state->m_is_turbo) { state->m_ex_bank = 0x10; } @@ -1954,7 +1954,7 @@ static INPUT_CHANGED( nmi_reset ) { x1_state *state = field.machine().driver_data(); - device_set_input_line(state->m_x1_cpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); + state->m_x1_cpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); } INPUT_PORTS_START( x1 ) @@ -2391,14 +2391,14 @@ static IRQ_CALLBACK(x1_irq_callback) { state->m_ctc_irq_flag = 0; if(state->m_key_irq_flag == 0) // if no other devices are pulling the IRQ line high - device_set_input_line(device, 0, CLEAR_LINE); + device->execute().set_input_line(0, CLEAR_LINE); return state->m_irq_vector; } if(state->m_key_irq_flag != 0) { state->m_key_irq_flag = 0; if(state->m_ctc_irq_flag == 0) // if no other devices are pulling the IRQ line high - device_set_input_line(device, 0, CLEAR_LINE); + device->execute().set_input_line(0, CLEAR_LINE); return state->m_key_irq_vector; } return state->m_irq_vector; @@ -2483,7 +2483,7 @@ MACHINE_RESET( x1 ) state->m_io_bank_mode = 0; - //device_set_irq_callback(machine.device("x1_cpu"), x1_irq_callback); + //machine.device("x1_cpu")->execute().set_irq_acknowledge_callback(x1_irq_callback); state->m_cmt_current_cmd = 0; state->m_cmt_test = 0; diff --git a/src/mess/drivers/x1twin.c b/src/mess/drivers/x1twin.c index 56e79c9deba..0b1d28a2d18 100644 --- a/src/mess/drivers/x1twin.c +++ b/src/mess/drivers/x1twin.c @@ -110,7 +110,7 @@ static INPUT_CHANGED( ipl_reset ) //address_space *space = field.machine().device("x1_cpu")->memory().space(AS_PROGRAM); x1twin_state *state = field.machine().driver_data(); - device_set_input_line(state->m_x1_cpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); + state->m_x1_cpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); state->m_ram_bank = 0x00; if(state->m_is_turbo) { state->m_ex_bank = 0x10; } @@ -122,7 +122,7 @@ static INPUT_CHANGED( nmi_reset ) { x1twin_state *state = field.machine().driver_data(); - device_set_input_line(state->m_x1_cpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); + state->m_x1_cpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); } INPUT_PORTS_START( x1twin ) diff --git a/src/mess/drivers/x68k.c b/src/mess/drivers/x68k.c index a3b31f75159..faea45046f0 100644 --- a/src/mess/drivers/x68k.c +++ b/src/mess/drivers/x68k.c @@ -2706,7 +2706,7 @@ DRIVER_INIT_MEMBER(x68k_state,x68000) mfp_init(machine()); - device_set_irq_callback(machine().device("maincpu"), x68k_int_ack); + machine().device("maincpu")->execute().set_irq_acknowledge_callback(x68k_int_ack); // init keyboard m_keyboard.delay = 500; // 3*100+200 diff --git a/src/mess/drivers/xerox820.c b/src/mess/drivers/xerox820.c index 6db7d062bce..84d2328ac7e 100644 --- a/src/mess/drivers/xerox820.c +++ b/src/mess/drivers/xerox820.c @@ -599,9 +599,9 @@ WRITE_LINE_MEMBER( xerox820_state::intrq_w ) m_fdc_irq = state; if (halt && state) - device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); else - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } WRITE_LINE_MEMBER( xerox820_state::drq_w ) @@ -611,9 +611,9 @@ WRITE_LINE_MEMBER( xerox820_state::drq_w ) m_fdc_drq = state; if (halt && state) - device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); else - device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } static const wd17xx_interface fdc_intf = diff --git a/src/mess/drivers/xor100.c b/src/mess/drivers/xor100.c index 91b5ed33d0d..38a8fc5999d 100644 --- a/src/mess/drivers/xor100.c +++ b/src/mess/drivers/xor100.c @@ -191,7 +191,7 @@ READ8_MEMBER( xor100_state::fdc_wait_r ) if (!m_fdc_irq && !m_fdc_drq) { /* TODO: this is really connected to the Z80 _RDY line */ - device_set_input_line(m_maincpu, INPUT_LINE_HALT, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); } return !m_fdc_irq << 7; @@ -493,7 +493,7 @@ WRITE_LINE_MEMBER( xor100_state::fdc_irq_w ) if (state) { /* TODO: this is really connected to the Z80 _RDY line */ - device_set_input_line(m_maincpu, INPUT_LINE_HALT, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); } } @@ -504,7 +504,7 @@ WRITE_LINE_MEMBER( xor100_state::fdc_drq_w ) if (state) { /* TODO: this is really connected to the Z80 _RDY line */ - device_set_input_line(m_maincpu, INPUT_LINE_HALT, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); } } diff --git a/src/mess/drivers/z100.c b/src/mess/drivers/z100.c index e88ef74e405..b82f0d76601 100644 --- a/src/mess/drivers/z100.c +++ b/src/mess/drivers/z100.c @@ -750,7 +750,7 @@ static MACHINE_START(z100) { z100_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), z100_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(z100_irq_callback); state->m_mc6845 = machine.device("crtc"); } diff --git a/src/mess/includes/fmtowns.h b/src/mess/includes/fmtowns.h index fc038c264d0..9cd9d90f170 100644 --- a/src/mess/includes/fmtowns.h +++ b/src/mess/includes/fmtowns.h @@ -103,7 +103,7 @@ class towns_state : public driver_device { } /* devices */ - device_t* m_maincpu; + cpu_device* m_maincpu; device_t* m_dma_1; device_t* m_dma_2; device_t* m_fdc; diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h index c395c214249..1c34e305f45 100644 --- a/src/mess/includes/nes.h +++ b/src/mess/includes/nes.h @@ -126,7 +126,7 @@ public: nes_chr_callback m_mmc3_chr_cb; /* devices */ - device_t *m_maincpu; + cpu_device *m_maincpu; ppu2c0x_device *m_ppu; device_t *m_sound; device_t *m_cart; diff --git a/src/mess/includes/pc.h b/src/mess/includes/pc.h index 311cfe9515e..29adf1358d9 100644 --- a/src/mess/includes/pc.h +++ b/src/mess/includes/pc.h @@ -23,7 +23,7 @@ public: { } - device_t *m_maincpu; + cpu_device *m_maincpu; device_t *m_pic8259; device_t *m_dma8237; device_t *m_pit8253; diff --git a/src/mess/machine/a2bus.c b/src/mess/machine/a2bus.c index aa2f4d8f644..05532afc5e7 100644 --- a/src/mess/machine/a2bus.c +++ b/src/mess/machine/a2bus.c @@ -175,7 +175,7 @@ a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, cons void a2bus_device::device_start() { - m_maincpu = machine().device(m_cputag); + m_maincpu = machine().device(m_cputag); // resolve callbacks m_out_irq_func.resolve(m_out_irq_cb, *this); diff --git a/src/mess/machine/a2bus.h b/src/mess/machine/a2bus.h index 3fc80c25843..71e9a634137 100644 --- a/src/mess/machine/a2bus.h +++ b/src/mess/machine/a2bus.h @@ -105,7 +105,7 @@ protected: virtual void device_config_complete(); // internal state - device_t *m_maincpu; + cpu_device *m_maincpu; devcb_resolved_write_line m_out_irq_func; devcb_resolved_write_line m_out_nmi_func; diff --git a/src/mess/machine/a2eauxslot.c b/src/mess/machine/a2eauxslot.c index 568907b525b..39c5562c690 100644 --- a/src/mess/machine/a2eauxslot.c +++ b/src/mess/machine/a2eauxslot.c @@ -112,7 +112,7 @@ a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type void a2eauxslot_device::device_start() { - m_maincpu = machine().device(m_cputag); + m_maincpu = machine().device(m_cputag); // resolve callbacks m_out_irq_func.resolve(m_out_irq_cb, *this); diff --git a/src/mess/machine/a2eauxslot.h b/src/mess/machine/a2eauxslot.h index 8e645c7b352..bcead368242 100644 --- a/src/mess/machine/a2eauxslot.h +++ b/src/mess/machine/a2eauxslot.h @@ -97,7 +97,7 @@ protected: virtual void device_config_complete(); // internal state - device_t *m_maincpu; + cpu_device *m_maincpu; devcb_resolved_write_line m_out_irq_func; devcb_resolved_write_line m_out_nmi_func; diff --git a/src/mess/machine/a2softcard.c b/src/mess/machine/a2softcard.c index adc2836941e..b8610453d44 100644 --- a/src/mess/machine/a2softcard.c +++ b/src/mess/machine/a2softcard.c @@ -85,7 +85,7 @@ void a2bus_softcard_device::device_reset() m_bEnabled = false; m_6502space = NULL; m_FirstZ80Boot = true; - device_set_input_line(m_z80, INPUT_LINE_HALT, ASSERT_LINE); + m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); } void a2bus_softcard_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data) @@ -97,8 +97,8 @@ void a2bus_softcard_device::write_cnxx(address_space &space, UINT8 offset, UINT8 // steal the 6502's address space m_6502space = &space; - device_set_input_line(m_z80, INPUT_LINE_HALT, CLEAR_LINE); - device_set_input_line(state->m_maincpu, INPUT_LINE_HALT, ASSERT_LINE); + m_z80->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); if (m_FirstZ80Boot) { @@ -110,8 +110,8 @@ void a2bus_softcard_device::write_cnxx(address_space &space, UINT8 offset, UINT8 } else { - device_set_input_line(m_z80, INPUT_LINE_HALT, ASSERT_LINE); - device_set_input_line(state->m_maincpu, INPUT_LINE_HALT, CLEAR_LINE); + m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); m_bEnabled = false; } } diff --git a/src/mess/machine/a2themill.c b/src/mess/machine/a2themill.c index c080f04cba7..1f64df6cdf6 100644 --- a/src/mess/machine/a2themill.c +++ b/src/mess/machine/a2themill.c @@ -108,8 +108,8 @@ void a2bus_themill_device::device_reset() m_flipAddrSpace = false; m_6809Mode = false; m_status = 0xc0; // OS9 loader relies on this - device_set_input_line(m_6809, INPUT_LINE_HALT, ASSERT_LINE); - device_set_input_line(m_6809, INPUT_LINE_RESET, ASSERT_LINE); + m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } UINT8 a2bus_themill_device::read_c0nx(address_space &space, UINT8 offset) @@ -141,15 +141,15 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8 m_6502space = &space; m_6809->reset(); - device_set_input_line(m_6809, INPUT_LINE_HALT, CLEAR_LINE); - device_set_input_line(m_6809, INPUT_LINE_RESET, CLEAR_LINE); + m_6809->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); + m_6809->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); m_bEnabled = true; m_status &= ~0x04; } else { - device_set_input_line(m_6809, INPUT_LINE_HALT, ASSERT_LINE); + m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_bEnabled = false; m_status |= 0x04; } @@ -170,12 +170,12 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8 case 3: // 6809 NMI if (data & 0x80) { - device_set_input_line(m_6809, INPUT_LINE_NMI, CLEAR_LINE); + m_6809->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); m_status |= 0x08; } else { - device_set_input_line(m_6809, INPUT_LINE_NMI, ASSERT_LINE); + m_6809->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); m_status &= ~0x08; } break; @@ -183,12 +183,12 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8 case 4: // 6809 FIRQ if (data & 0x80) { - device_set_input_line(m_6809, M6809_FIRQ_LINE, CLEAR_LINE); + m_6809->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); m_status |= 0x10; } else { - device_set_input_line(m_6809, M6809_FIRQ_LINE, ASSERT_LINE); + m_6809->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); m_status &= ~0x10; } break; @@ -196,12 +196,12 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8 case 5: // 6809 IRQ if (data & 0x80) { - device_set_input_line(m_6809, M6809_IRQ_LINE, CLEAR_LINE); + m_6809->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); m_status |= 0x20; } else { - device_set_input_line(m_6809, M6809_IRQ_LINE, ASSERT_LINE); + m_6809->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); m_status &= ~0x20; } break; diff --git a/src/mess/machine/abc77.c b/src/mess/machine/abc77.c index b835e104cf6..6712b6e87fb 100644 --- a/src/mess/machine/abc77.c +++ b/src/mess/machine/abc77.c @@ -498,10 +498,10 @@ void abc77_device::device_reset() int ea = BIT(ioport("DSW")->read(), 7); // trigger reset - device_set_input_line(m_maincpu, INPUT_LINE_RESET, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); m_reset_timer->adjust(attotime::from_msec(t)); - device_set_input_line(m_maincpu, MCS48_INPUT_EA, ea ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(MCS48_INPUT_EA, ea ? CLEAR_LINE : ASSERT_LINE); } @@ -518,7 +518,7 @@ void abc77_device::device_timer(emu_timer &timer, device_timer_id id, int param, break; case TIMER_RESET: - device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); break; } } @@ -638,7 +638,7 @@ WRITE8_MEMBER( abc77_device::j3_w ) WRITE_LINE_MEMBER( abc77_device::rxd_w ) { - device_set_input_line(m_maincpu, MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE); } diff --git a/src/mess/machine/abc99.c b/src/mess/machine/abc99.c index e9eae6c1675..50dc2eae0a5 100644 --- a/src/mess/machine/abc99.c +++ b/src/mess/machine/abc99.c @@ -239,7 +239,7 @@ machine_config_constructor abc99_device::device_mconfig_additions() const INPUT_CHANGED_MEMBER( abc99_device::keyboard_reset ) { - device_set_input_line(m_mousecpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); + m_mousecpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); } @@ -459,8 +459,8 @@ ioport_constructor abc99_device::device_input_ports() const inline void abc99_device::serial_input() { - device_set_input_line(m_maincpu, MCS48_INPUT_IRQ, (m_si | m_si_en) ? CLEAR_LINE : ASSERT_LINE); - device_set_input_line(m_mousecpu, MCS48_INPUT_IRQ, m_si ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(MCS48_INPUT_IRQ, (m_si | m_si_en) ? CLEAR_LINE : ASSERT_LINE); + m_mousecpu->set_input_line(MCS48_INPUT_IRQ, m_si ? CLEAR_LINE : ASSERT_LINE); } @@ -578,8 +578,8 @@ void abc99_device::device_start() void abc99_device::device_reset() { // set EA lines - device_set_input_line(m_maincpu, MCS48_INPUT_EA, ASSERT_LINE); - device_set_input_line(m_mousecpu, MCS48_INPUT_EA, ASSERT_LINE); + m_maincpu->set_input_line(MCS48_INPUT_EA, ASSERT_LINE); + m_mousecpu->set_input_line(MCS48_INPUT_EA, ASSERT_LINE); } @@ -786,7 +786,7 @@ WRITE8_MEMBER( abc99_device::z5_p2_w ) if (m_reset != reset) { m_reset = reset; - device_set_input_line(m_maincpu, INPUT_LINE_RESET, m_reset ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_RESET, m_reset ? CLEAR_LINE : ASSERT_LINE); } // serial output @@ -854,5 +854,5 @@ READ_LINE_MEMBER( abc99_device::txd_r ) WRITE_LINE_MEMBER( abc99_device::reset_w ) { - device_set_input_line(m_mousecpu, INPUT_LINE_RESET, state ? CLEAR_LINE : ASSERT_LINE); + m_mousecpu->set_input_line(INPUT_LINE_RESET, state ? CLEAR_LINE : ASSERT_LINE); } diff --git a/src/mess/machine/advision.c b/src/mess/machine/advision.c index 928afd84e0b..f6868755f81 100644 --- a/src/mess/machine/advision.c +++ b/src/mess/machine/advision.c @@ -40,11 +40,11 @@ void advision_state::machine_start() void advision_state::machine_reset() { /* enable internal ROM */ - device_set_input_line(m_maincpu, MCS48_INPUT_EA, CLEAR_LINE); + m_maincpu->set_input_line(MCS48_INPUT_EA, CLEAR_LINE); membank("bank1")->set_entry(0); /* reset sound CPU */ - device_set_input_line(m_soundcpu, INPUT_LINE_RESET, ASSERT_LINE); + m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); m_rambank = 0x300; m_frame_start = 0; @@ -58,7 +58,7 @@ WRITE8_MEMBER( advision_state::bankswitch_w ) { int ea = BIT(data, 2); - device_set_input_line(m_maincpu, MCS48_INPUT_EA, ea ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(MCS48_INPUT_EA, ea ? ASSERT_LINE : CLEAR_LINE); membank("bank1")->set_entry(ea); @@ -79,7 +79,7 @@ READ8_MEMBER( advision_state::ext_ram_r ) if (m_video_bank == 0x06) { - device_set_input_line(m_soundcpu, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); + m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); } return data; diff --git a/src/mess/machine/amigacrt.c b/src/mess/machine/amigacrt.c index 53beead947c..84de5897c9a 100644 --- a/src/mess/machine/amigacrt.c +++ b/src/mess/machine/amigacrt.c @@ -166,7 +166,7 @@ static void amiga_ar1_init( running_machine &machine ) amigacrt.ar1_spurious = 0; /* Install IRQ ACK callback */ - device_set_irq_callback(machine.device("maincpu"), amiga_ar1_irqack); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(amiga_ar1_irqack); } /*************************************************************************** diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index c8f49e76fc7..df2a7c12ba5 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -1446,7 +1446,7 @@ WRITE8_MEMBER(amstrad_state::amstrad_plus_asic_6000_w) if ( m_asic.enabled ) { vector = (data & 0xf8) + (m_plus_irq_cause); - device_set_input_line_vector(m_maincpu, 0, vector); + m_maincpu->set_input_line_vector(0, vector); logerror("ASIC: IM 2 vector write %02x, data = &%02x\n",vector,data); } m_asic.dma_clear = data & 0x01; @@ -2888,9 +2888,9 @@ static void amstrad_common_init(running_machine &machine) state->m_maincpu->reset(); if ( state->m_system_type == SYSTEM_CPC || state->m_system_type == SYSTEM_ALESTE ) - device_set_input_line_vector(state->m_maincpu, 0, 0xff); + state->m_maincpu->set_input_line_vector(0, 0xff); else - device_set_input_line_vector(state->m_maincpu, 0, 0x00); + state->m_maincpu->set_input_line_vector(0, 0x00); /* The opcode timing in the Amstrad is different to the opcode timing in the core for the Z80 CPU. @@ -2911,7 +2911,7 @@ static void amstrad_common_init(running_machine &machine) (const UINT8*)amstrad_cycle_table_ex); /* Juergen is a cool dude! */ - device_set_irq_callback(state->m_maincpu, amstrad_cpu_acknowledge_int); + state->m_maincpu->set_irq_acknowledge_callback(amstrad_cpu_acknowledge_int); } static TIMER_CALLBACK( cb_set_resolution ) diff --git a/src/mess/machine/at.c b/src/mess/machine/at.c index e5ef24e96e2..e59d02387b2 100644 --- a/src/mess/machine/at.c +++ b/src/mess/machine/at.c @@ -155,7 +155,7 @@ WRITE8_MEMBER( at_state::at_page8_w ) WRITE_LINE_MEMBER( at_state::pc_dma_hrq_changed ) { - device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); /* Assert HLDA */ m_dma8237_2->hack_w(state); @@ -354,7 +354,7 @@ static IRQ_CALLBACK(at_irq_callback) MACHINE_START( at ) { - device_set_irq_callback(machine.device("maincpu"), at_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback); } MACHINE_RESET( at ) diff --git a/src/mess/machine/b2m.c b/src/mess/machine/b2m.c index ec4bffe4cdc..f56de201486 100644 --- a/src/mess/machine/b2m.c +++ b/src/mess/machine/b2m.c @@ -372,6 +372,6 @@ MACHINE_RESET(b2m) state->m_b2m_side = 0; state->m_b2m_drive = 0; - device_set_irq_callback(machine.device("maincpu"), b2m_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(b2m_irq_callback); b2m_set_bank(machine, 7); } diff --git a/src/mess/machine/bbc.c b/src/mess/machine/bbc.c index 1581b7e48bb..a356cf700f6 100644 --- a/src/mess/machine/bbc.c +++ b/src/mess/machine/bbc.c @@ -1425,7 +1425,7 @@ static void bbc_i8271_interrupt(device_t *device, int state) { /* I'll pulse it because if I used hold-line I'm not sure it would clear - to be checked */ - device_set_input_line(device->machine().device("maincpu"), INPUT_LINE_NMI,PULSE_LINE); + device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); } } diff --git a/src/mess/machine/bk.c b/src/mess/machine/bk.c index 8bf33c9e731..d8c24e57677 100644 --- a/src/mess/machine/bk.c +++ b/src/mess/machine/bk.c @@ -74,14 +74,14 @@ MACHINE_START(bk0010) static IRQ_CALLBACK(bk0010_irq_callback) { bk_state *state = device->machine().driver_data(); - device_set_input_line(device, 0, CLEAR_LINE); + device->execute().set_input_line(0, CLEAR_LINE); return state->m_key_irq_vector; } MACHINE_RESET( bk0010 ) { bk_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), bk0010_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(bk0010_irq_callback); state->m_kbd_state = 0; state->m_scrool = 01330; diff --git a/src/mess/machine/c64_cpm.c b/src/mess/machine/c64_cpm.c index 197d9f3e4ff..937f4ded1bd 100644 --- a/src/mess/machine/c64_cpm.c +++ b/src/mess/machine/c64_cpm.c @@ -89,8 +89,8 @@ inline void c64_cpm_cartridge_device::update_signals() { if (m_enabled) { - device_set_input_line(m_maincpu, INPUT_LINE_HALT, CLEAR_LINE); - device_set_input_line(machine().firstcpu, INPUT_LINE_HALT, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); + machine().firstcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); if (m_reset) { @@ -101,8 +101,8 @@ inline void c64_cpm_cartridge_device::update_signals() } else { - device_set_input_line(m_maincpu, INPUT_LINE_HALT, ASSERT_LINE); - device_set_input_line(machine().firstcpu, INPUT_LINE_HALT, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + machine().firstcpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); } /* diff --git a/src/mess/machine/compis.c b/src/mess/machine/compis.c index 0c781ba1453..efd590297a0 100644 --- a/src/mess/machine/compis.c +++ b/src/mess/machine/compis.c @@ -414,7 +414,7 @@ static IRQ_CALLBACK(int_callback) logerror("(%f) **** Acknowledged interrupt vector %02X\n", device->machine().time().as_double(), state->m_i186.intr.poll_status & 0x1f); /* clear the interrupt */ - device_set_input_line(device, 0, CLEAR_LINE); + device->execute().set_input_line(0, CLEAR_LINE); state->m_i186.intr.pending = 0; /* clear the request and set the in-service bit */ @@ -1216,7 +1216,7 @@ WRITE16_MEMBER( compis_state::compis_i186_internal_port_w ) /* we need to do this at a time when the I86 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(m_maincpu, int_callback); + m_maincpu->set_irq_acknowledge_callback(int_callback); break; case 0x60: @@ -1367,7 +1367,7 @@ static IRQ_CALLBACK( compis_irq_callback ) DRIVER_INIT_MEMBER(compis_state,compis) { - device_set_irq_callback(machine().device("maincpu"), compis_irq_callback); + machine().device("maincpu")->execute().set_irq_acknowledge_callback(compis_irq_callback); memset (&m_compis, 0, sizeof (m_compis) ); } @@ -1390,7 +1390,7 @@ MACHINE_RESET( compis ) compis_keyb_init(state); /* OSP PIC 8259 */ - device_set_irq_callback(state->m_maincpu, compis_irq_callback); + state->m_maincpu->set_irq_acknowledge_callback(compis_irq_callback); } /*-------------------------------------------------------------------------*/ diff --git a/src/mess/machine/cuda.c b/src/mess/machine/cuda.c index de423c2eb00..1086a1b3a85 100644 --- a/src/mess/machine/cuda.c +++ b/src/mess/machine/cuda.c @@ -108,7 +108,7 @@ const rom_entry *cuda_device::device_rom_region() const void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data) { -// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->safe_pc()); +// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->pc()); switch (offset) { @@ -138,21 +138,21 @@ void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data) if (treq != ((data>>1)&1)) { #ifdef CUDA_SUPER_VERBOSE - printf("CU-> TREQ: %d (PC=%x)\n", (data>>1)&1, m_maincpu->safe_pc()); + printf("CU-> TREQ: %d (PC=%x)\n", (data>>1)&1, m_maincpu->pc()); #endif treq = (data>>1) & 1; } if (via_data != ((data>>5)&1)) { #ifdef CUDA_SUPER_VERBOSE - printf("CU-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, m_maincpu->safe_pc()); + printf("CU-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, m_maincpu->pc()); #endif via_data = (data>>5) & 1; } if (via_clock != ((data>>4)&1)) { #ifdef CUDA_SUPER_VERBOSE - printf("CU-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, m_maincpu->safe_pc()); + printf("CU-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, m_maincpu->pc()); #endif via_clock = (data>>4) & 1; via6522_device *via1 = machine().device("via6522_0"); @@ -165,7 +165,7 @@ void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data) if ((data & 8) != reset_line) { #ifdef CUDA_SUPER_VERBOSE - printf("680x0 reset: %d -> %d (PC=%x)\n", (ports[2] & 8)>>3, (data & 8)>>3, m_maincpu->safe_pc()); + printf("680x0 reset: %d -> %d (PC=%x)\n", (ports[2] & 8)>>3, (data & 8)>>3, m_maincpu->pc()); #endif reset_line = (data & 8); // falling edge, should reset the machine too @@ -193,7 +193,7 @@ READ8_MEMBER( cuda_device::ddr_r ) WRITE8_MEMBER( cuda_device::ddr_w ) { -// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->safe_pc()); +// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->pc()); send_port(space, offset, ports[offset] & data); @@ -251,7 +251,7 @@ READ8_MEMBER( cuda_device::ports_r ) incoming |= 0x01; } -// printf("PORT %c read = %02x (DDR = %02x latch = %02x) (PC=%x)\n", 'A' + offset, ports[offset], ddrs[offset], ports[offset], m_maincpu->safe_pc()); +// printf("PORT %c read = %02x (DDR = %02x latch = %02x) (PC=%x)\n", 'A' + offset, ports[offset], ddrs[offset], ports[offset], m_maincpu->pc()); return incoming; } @@ -279,7 +279,7 @@ WRITE8_MEMBER( cuda_device::pll_w ) (data & 0x40) ? 1 : 0, (data & 0x20) ? 1 : 0, (data & 0x10) ? 1 : 0, - (data & 0x08) ? 1 : 0, m_maincpu->safe_pc()); + (data & 0x08) ? 1 : 0, m_maincpu->pc()); } #endif pll_ctrl = data; @@ -300,7 +300,7 @@ WRITE8_MEMBER( cuda_device::timer_ctrl_w ) { attotime::from_seconds(8), attotime::from_msec(250.0f), attotime::from_msec(125.1f), attotime::from_msec(62.5f), attotime::from_msec(31.3f) }, }; -// printf("%02x to timer control (PC=%x)\n", data, m_maincpu->safe_pc()); +// printf("%02x to timer control (PC=%x)\n", data, m_maincpu->pc()); if (data & 0x50) { @@ -314,12 +314,12 @@ WRITE8_MEMBER( cuda_device::timer_ctrl_w ) if ((timer_ctrl & 0x80) && !(data & 0x80)) { - device_set_input_line(m_maincpu, M68HC05EG_INT_TIMER, CLEAR_LINE); + m_maincpu->set_input_line(M68HC05EG_INT_TIMER, CLEAR_LINE); timer_ctrl &= ~0x80; } else if ((timer_ctrl & 0x40) && !(data & 0x40)) { - device_set_input_line(m_maincpu, M68HC05EG_INT_TIMER, CLEAR_LINE); + m_maincpu->set_input_line(M68HC05EG_INT_TIMER, CLEAR_LINE); timer_ctrl &= ~0x40; } @@ -334,7 +334,7 @@ READ8_MEMBER( cuda_device::timer_counter_r ) WRITE8_MEMBER( cuda_device::timer_counter_w ) { -// printf("%02x to timer counter (PC=%x)\n", data, m_maincpu->safe_pc()); +// printf("%02x to timer counter (PC=%x)\n", data, m_maincpu->pc()); timer_counter = data; ripple_counter = timer_counter; } @@ -350,7 +350,7 @@ WRITE8_MEMBER( cuda_device::onesec_w ) if ((onesec & 0x40) && !(data & 0x40)) { - device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, CLEAR_LINE); + m_maincpu->set_input_line(M68HC05EG_INT_CPI, CLEAR_LINE); } onesec = data; @@ -464,7 +464,7 @@ void cuda_device::device_timer(emu_timer &timer, device_timer_id id, int param, if (onesec & 0x10) { - device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, ASSERT_LINE); + m_maincpu->set_input_line(M68HC05EG_INT_CPI, ASSERT_LINE); } } else @@ -473,7 +473,7 @@ void cuda_device::device_timer(emu_timer &timer, device_timer_id id, int param, if (timer_ctrl & 0x20) { - device_set_input_line(m_maincpu, M68HC05EG_INT_TIMER, ASSERT_LINE); + m_maincpu->set_input_line(M68HC05EG_INT_TIMER, ASSERT_LINE); } ripple_counter--; @@ -485,7 +485,7 @@ void cuda_device::device_timer(emu_timer &timer, device_timer_id id, int param, if (timer_ctrl & 0x10) { - device_set_input_line(m_maincpu, M68HC05EG_INT_TIMER, ASSERT_LINE); + m_maincpu->set_input_line(M68HC05EG_INT_TIMER, ASSERT_LINE); } } } diff --git a/src/mess/machine/dec_lk201.c b/src/mess/machine/dec_lk201.c index f4197e2d108..e8200508dd3 100644 --- a/src/mess/machine/dec_lk201.c +++ b/src/mess/machine/dec_lk201.c @@ -107,7 +107,7 @@ READ8_MEMBER( lk201_device::ddr_r ) WRITE8_MEMBER( lk201_device::ddr_w ) { -// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->safe_pc()); +// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->pc()); send_port(space, offset, ports[offset] & data); @@ -135,7 +135,7 @@ READ8_MEMBER( lk201_device::ports_r ) // add in ddr-masked version of port writes incoming |= (ports[offset] & ddrs[offset]); -// printf("PORT %c read = %02x (DDR = %02x latch = %02x) (PC=%x)\n", 'A' + offset, ports[offset], ddrs[offset], ports[offset], m_maincpu->safe_pc()); +// printf("PORT %c read = %02x (DDR = %02x latch = %02x) (PC=%x)\n", 'A' + offset, ports[offset], ddrs[offset], ports[offset], m_maincpu->pc()); return incoming; } @@ -149,7 +149,7 @@ WRITE8_MEMBER( lk201_device::ports_w ) void lk201_device::send_port(address_space &space, UINT8 offset, UINT8 data) { -// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->safe_pc()); +// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->pc()); switch (offset) { @@ -187,7 +187,7 @@ READ8_MEMBER( lk201_device::sci_r ) break; } -// printf("SCI read @ %x = %02x (PC=%x)\n", offset, incoming, m_maincpu->safe_pc()); +// printf("SCI read @ %x = %02x (PC=%x)\n", offset, incoming, m_maincpu->pc()); return incoming; } @@ -212,7 +212,7 @@ WRITE8_MEMBER( lk201_device::sci_w ) break; } -// printf("SCI %02x to %x (PC=%x)\n", data, offset, m_maincpu->safe_pc()); +// printf("SCI %02x to %x (PC=%x)\n", data, offset, m_maincpu->pc()); } READ8_MEMBER( lk201_device::spi_r ) @@ -232,7 +232,7 @@ READ8_MEMBER( lk201_device::spi_r ) break; } -// printf("SPI read @ %x = %02x (PC=%x)\n", offset, incoming, m_maincpu->safe_pc()); +// printf("SPI read @ %x = %02x (PC=%x)\n", offset, incoming, m_maincpu->pc()); return incoming; } @@ -251,7 +251,7 @@ WRITE8_MEMBER( lk201_device::spi_w ) break; } -// printf("SPI %02x to %x (PC=%x)\n", data, offset, m_maincpu->safe_pc()); +// printf("SPI %02x to %x (PC=%x)\n", data, offset, m_maincpu->pc()); } /* diff --git a/src/mess/machine/dgn_beta.c b/src/mess/machine/dgn_beta.c index bc45ce2767d..ca1878fd108 100644 --- a/src/mess/machine/dgn_beta.c +++ b/src/mess/machine/dgn_beta.c @@ -702,7 +702,7 @@ static WRITE8_DEVICE_HANDLER(d_pia1_pa_w) /* CPU un-halted let it run ! */ if (HALT_DMA == CLEAR_LINE) - device_yield(device->machine().device(MAINCPU_TAG)); + device->machine().device(MAINCPU_TAG)->execute().yield(); state->m_d_pia1_pa_last = data & 0x80; } @@ -741,7 +741,7 @@ static WRITE8_DEVICE_HANDLER(d_pia1_pb_w) /* CPU un-halted let it run ! */ if (HALT_CPU == CLEAR_LINE) - device_yield(device->machine().device(DMACPU_TAG)); + device->machine().device(DMACPU_TAG)->execute().yield(); } } @@ -789,7 +789,7 @@ static WRITE8_DEVICE_HANDLER(d_pia2_pa_w) { device->machine().device(DMACPU_TAG)->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); logerror("device_yield()\n"); - device_yield(device->machine().device(DMACPU_TAG)); /* Let DMA CPU run */ + device->machine().device(DMACPU_TAG)->execute().yield(); /* Let DMA CPU run */ } else { diff --git a/src/mess/machine/ecbbus.c b/src/mess/machine/ecbbus.c index 8c147a32767..1b5781a41f0 100644 --- a/src/mess/machine/ecbbus.c +++ b/src/mess/machine/ecbbus.c @@ -144,7 +144,7 @@ ecbbus_device::ecbbus_device(const machine_config &mconfig, const char *tag, dev void ecbbus_device::device_start() { - m_maincpu = machine().device(m_cputag); + m_maincpu = machine().device(m_cputag); // resolve callbacks m_out_int_func.resolve(m_out_int_cb, *this); diff --git a/src/mess/machine/ecbbus.h b/src/mess/machine/ecbbus.h index 8b9d53b20f3..96bc575823d 100644 --- a/src/mess/machine/ecbbus.h +++ b/src/mess/machine/ecbbus.h @@ -123,7 +123,7 @@ protected: private: // internal state - device_t *m_maincpu; + cpu_device *m_maincpu; devcb_resolved_write_line m_out_int_func; devcb_resolved_write_line m_out_nmi_func; diff --git a/src/mess/machine/egret.c b/src/mess/machine/egret.c index b7f8a5c396e..8d8afe65ec8 100644 --- a/src/mess/machine/egret.c +++ b/src/mess/machine/egret.c @@ -137,21 +137,21 @@ void egret_device::send_port(address_space &space, UINT8 offset, UINT8 data) if (xcvr_session != ((data>>1)&1)) { #ifdef EGRET_SUPER_VERBOSE - printf("EG-> XCVR_SESSION: %d (PC=%x)\n", (data>>1)&1, m_maincpu->safe_pc()); + printf("EG-> XCVR_SESSION: %d (PC=%x)\n", (data>>1)&1, m_maincpu->pc()); #endif xcvr_session = (data>>1) & 1; } if (via_data != ((data>>5)&1)) { #ifdef EGRET_SUPER_VERBOSE - printf("EG-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, m_maincpu->safe_pc()); + printf("EG-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, m_maincpu->pc()); #endif via_data = (data>>5) & 1; } if (via_clock != ((data>>4)&1)) { #ifdef EGRET_SUPER_VERBOSE - printf("EG-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, m_maincpu->safe_pc()); + printf("EG-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, m_maincpu->pc()); #endif via_clock = (data>>4) & 1; via6522_device *via1 = machine().device("via6522_0"); @@ -312,7 +312,7 @@ WRITE8_MEMBER( egret_device::onesec_w ) if ((onesec & 0x40) && !(data & 0x40)) { - device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, CLEAR_LINE); + m_maincpu->set_input_line(M68HC05EG_INT_CPI, CLEAR_LINE); } onesec = data; @@ -419,7 +419,7 @@ void egret_device::device_timer(emu_timer &timer, device_timer_id id, int param, if (onesec & 0x10) { - device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, ASSERT_LINE); + m_maincpu->set_input_line(M68HC05EG_INT_CPI, ASSERT_LINE); } } diff --git a/src/mess/machine/galaxy.c b/src/mess/machine/galaxy.c index 4962afab2c2..8a3fedabf82 100644 --- a/src/mess/machine/galaxy.c +++ b/src/mess/machine/galaxy.c @@ -47,7 +47,7 @@ WRITE8_MEMBER(galaxy_state::galaxy_latch_w) INTERRUPT_GEN( galaxy_interrupt ) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static IRQ_CALLBACK ( galaxy_irq_callback ) @@ -123,8 +123,8 @@ static void galaxy_setup_snapshot (running_machine &machine, const UINT8 * data, break; } - device_set_input_line(cpu, INPUT_LINE_NMI, CLEAR_LINE); - device_set_input_line(cpu, INPUT_LINE_IRQ0, CLEAR_LINE); + cpu->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + cpu->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); } SNAPSHOT_LOAD( galaxy ) @@ -185,7 +185,7 @@ MACHINE_RESET( galaxy ) if (machine.root_device().ioport("ROM2")->read()) state->membank("bank10")->set_base(machine.root_device().memregion("maincpu")->base() + 0x1000); - device_set_irq_callback(machine.device("maincpu"), galaxy_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(galaxy_irq_callback); state->m_interrupts_enabled = TRUE; } @@ -200,7 +200,7 @@ MACHINE_RESET( galaxyp ) UINT8 *ROM = machine.root_device().memregion("maincpu")->base(); address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); - device_set_irq_callback(machine.device("maincpu"), galaxy_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(galaxy_irq_callback); ROM[0x0037] = 0x29; ROM[0x03f9] = 0xcd; diff --git a/src/mess/machine/genpc.c b/src/mess/machine/genpc.c index 9b77cbdb5b1..57b4f972244 100644 --- a/src/mess/machine/genpc.c +++ b/src/mess/machine/genpc.c @@ -60,7 +60,7 @@ WRITE8_DEVICE_HANDLER(pc_page_w) WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dma_hrq_changed ) { - device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); /* Assert HLDA */ m_dma8237->hack_w(state); @@ -665,7 +665,7 @@ IRQ_CALLBACK(ibm5160_mb_device::pc_irq_callback) void ibm5160_mb_device::device_reset() { - device_set_irq_callback(m_maincpu, pc_irq_callback); + m_maincpu->set_irq_acknowledge_callback(pc_irq_callback); m_u73_q2 = 0; m_out1 = 2; // initial state of pit output is undefined diff --git a/src/mess/machine/hd63450.c b/src/mess/machine/hd63450.c index 4a40204b11e..63f05419047 100644 --- a/src/mess/machine/hd63450.c +++ b/src/mess/machine/hd63450.c @@ -258,7 +258,7 @@ static void dma_transfer_start(device_t* device, int channel, int dir) if((dmac->reg[channel].dcr & 0xc0) == 0x00) // Burst transfer { device_t *cpu = device->machine().device(dmac->intf->cpu_tag); - device_set_input_line(cpu, INPUT_LINE_HALT, ASSERT_LINE); + cpu->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); dmac->timer[channel]->adjust(attotime::zero, channel, dmac->burst_clock[channel]); } else @@ -440,7 +440,7 @@ void hd63450_single_transfer(device_t* device, int x) if((dmac->reg[x].dcr & 0xc0) == 0x00) { device_t *cpu = device->machine().device(dmac->intf->cpu_tag); - device_set_input_line(cpu, INPUT_LINE_HALT, CLEAR_LINE); + cpu->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE); } if(dmac->intf->dma_end) diff --git a/src/mess/machine/i82371ab.c b/src/mess/machine/i82371ab.c index 81e51538a5a..ac25c5ddf08 100644 --- a/src/mess/machine/i82371ab.c +++ b/src/mess/machine/i82371ab.c @@ -224,7 +224,7 @@ void i82371ab_device::device_start() /* setup save states */ save_item(NAME(m_regs)); - device_set_irq_callback(machine().device(":maincpu"), at_irq_callback); + machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback); } //------------------------------------------------- diff --git a/src/mess/machine/i82371sb.c b/src/mess/machine/i82371sb.c index a020bb94896..ef5cee00877 100644 --- a/src/mess/machine/i82371sb.c +++ b/src/mess/machine/i82371sb.c @@ -154,7 +154,7 @@ void i82371sb_device::device_start() /* setup save states */ save_item(NAME(m_regs)); - device_set_irq_callback(machine().device(":maincpu"), at_irq_callback); + machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback); } //------------------------------------------------- diff --git a/src/mess/machine/intv.c b/src/mess/machine/intv.c index 7c8ffec2cb6..68762fbe76c 100644 --- a/src/mess/machine/intv.c +++ b/src/mess/machine/intv.c @@ -618,11 +618,11 @@ DRIVER_INIT_MEMBER(intv_state,intv) /* Set Reset and INTR/INTRM Vector */ MACHINE_RESET( intv ) { - device_set_input_line_vector(machine.device("maincpu"), CP1610_RESET, 0x1000); + machine.device("maincpu")->execute().set_input_line_vector(CP1610_RESET, 0x1000); /* These are actually the same vector, and INTR is unused */ - device_set_input_line_vector(machine.device("maincpu"), CP1610_INT_INTRM, 0x1004); - device_set_input_line_vector(machine.device("maincpu"), CP1610_INT_INTR, 0x1004); + machine.device("maincpu")->execute().set_input_line_vector(CP1610_INT_INTRM, 0x1004); + machine.device("maincpu")->execute().set_input_line_vector(CP1610_INT_INTR, 0x1004); /* Set initial PC */ machine.device("maincpu")->state().set_state_int(CP1610_R7, 0x1000); @@ -638,11 +638,11 @@ MACHINE_RESET( intvecs ) state->membank("bank3")->set_base(machine.root_device().memregion("maincpu")->base() + (0xE000 << 1)); state->membank("bank4")->set_base(machine.root_device().memregion("maincpu")->base() + (0xF000 << 1)); - device_set_input_line_vector(machine.device("maincpu"), CP1610_RESET, 0x1000); + machine.device("maincpu")->execute().set_input_line_vector(CP1610_RESET, 0x1000); /* These are actually the same vector, and INTR is unused */ - device_set_input_line_vector(machine.device("maincpu"), CP1610_INT_INTRM, 0x1004); - device_set_input_line_vector(machine.device("maincpu"), CP1610_INT_INTR, 0x1004); + machine.device("maincpu")->execute().set_input_line_vector(CP1610_INT_INTRM, 0x1004); + machine.device("maincpu")->execute().set_input_line_vector(CP1610_INT_INTR, 0x1004); /* Set initial PC */ machine.device("maincpu")->state().set_state_int(CP1610_R7, 0x1000); @@ -663,7 +663,7 @@ static TIMER_CALLBACK(intv_btb_fill) intv_state *state = machine.driver_data(); UINT8 column; UINT8 row = state->m_backtab_row; - //device_adjust_icount(machine.device("maincpu"), -STIC_ROW_FETCH); + //machine.device("maincpu")->execute().adjust_icount(-STIC_ROW_FETCH); for(column=0; column < STIC_BACKTAB_WIDTH; column++) { state->m_backtab_buffer[row][column] = state->m_ram16[column + row * STIC_BACKTAB_WIDTH]; @@ -680,7 +680,7 @@ INTERRUPT_GEN( intv_interrupt ) state->m_bus_copy_mode = 1; state->m_backtab_row = 0; UINT8 row; - device_adjust_icount(device->machine().device("maincpu"), -(12*STIC_ROW_BUSRQ+STIC_FRAME_BUSRQ)); // Account for stic cycle stealing + device->machine().device("maincpu")->execute().adjust_icount(-(12*STIC_ROW_BUSRQ+STIC_FRAME_BUSRQ)); // Account for stic cycle stealing device->machine().scheduler().timer_set(device->machine().device("maincpu") ->cycles_to_attotime(STIC_VBLANK_END), FUNC(intv_interrupt_complete)); for (row=0; row < STIC_BACKTAB_HEIGHT; row++) @@ -691,7 +691,7 @@ INTERRUPT_GEN( intv_interrupt ) if (state->m_row_delay == 0) { - device_adjust_icount(device->machine().device("maincpu"), -STIC_ROW_BUSRQ); // extra row fetch occurs if vertical delay == 0 + device->machine().device("maincpu")->execute().adjust_icount(-STIC_ROW_BUSRQ); // extra row fetch occurs if vertical delay == 0 } intv_stic_screenrefresh(device->machine()); diff --git a/src/mess/machine/isa.c b/src/mess/machine/isa.c index edc4290a44d..1fa0f0a6efd 100644 --- a/src/mess/machine/isa.c +++ b/src/mess/machine/isa.c @@ -133,7 +133,7 @@ void isa8_device::device_config_complete() memset(&m_out_drq2_cb, 0, sizeof(m_out_drq2_cb)); memset(&m_out_drq3_cb, 0, sizeof(m_out_drq3_cb)); } - m_maincpu = mconfig().device(m_cputag); + m_maincpu = mconfig().device(m_cputag); } //************************************************************************** @@ -201,25 +201,25 @@ void isa8_device::device_reset() void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_space_func rhandler, const char* rhandler_name, write8_space_func whandler, const char *whandler_name) { - int buswidth = m_maincpu->memory().space_config(spacenum)->m_databus_width; + int buswidth = m_maincpu->space_config(spacenum)->m_databus_width; switch(buswidth) { case 8: - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0); break; case 16: - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff); break; case 32: if ((start % 4) == 0) { if ((end-start)==1) { - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff); } else { - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff); } } else { // we handle just misalligned by 2 - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000); } break; default: @@ -231,25 +231,25 @@ void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler) { - int buswidth = m_maincpu->memory().space_config(spacenum)->m_databus_width; + int buswidth = m_maincpu->space_config(spacenum)->m_databus_width; switch(buswidth) { case 8: - m_maincpu->memory().space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); + m_maincpu->space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); break; case 16: - m_maincpu->memory().space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff); + m_maincpu->space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff); break; case 32: if ((start % 4) == 0) { if ((end-start)==1) { - m_maincpu->memory().space(spacenum)->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff); + m_maincpu->space(spacenum)->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff); } else { - m_maincpu->memory().space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + m_maincpu->space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); } } else { // we handle just misalligned by 2 - m_maincpu->memory().space(spacenum)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000); + m_maincpu->space(spacenum)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000); } break; default: @@ -261,25 +261,25 @@ void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t void isa8_device::install_space(address_spacenum spacenum, device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_device_func rhandler, const char* rhandler_name, write8_device_func whandler, const char *whandler_name) { - int buswidth = m_maincpu->memory().space_config(spacenum)->m_databus_width; + int buswidth = m_maincpu->space_config(spacenum)->m_databus_width; switch(buswidth) { case 8: - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0); break; case 16: - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff); break; case 32: if ((start % 4) == 0) { if ((end-start)==1) { - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff); } else { - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff); } } else { // we handle just misalligned by 2 - m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000); + m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000); } break; default: @@ -327,14 +327,14 @@ void isa8_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t m void isa8_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data) { - address_space *space = m_maincpu->memory().space(AS_PROGRAM); + address_space *space = m_maincpu->space(AS_PROGRAM); space->install_readwrite_bank(start, end, mask, mirror, tag ); machine().root_device().membank(tag)->set_base(data); } void isa8_device::unmap_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror) { - address_space *space = m_maincpu->memory().space(AS_PROGRAM); + address_space *space = m_maincpu->space(AS_PROGRAM); space->unmap_readwrite(start, end, mask, mirror); } @@ -346,7 +346,7 @@ void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t ma UINT8 *dest = machine().root_device().memregion("isa")->base() + start - 0xc0000; memcpy(dest,src, end - start + 1); } else { - address_space *space = m_maincpu->memory().space(AS_PROGRAM); + address_space *space = m_maincpu->space(AS_PROGRAM); space->install_read_bank(start, end, mask, mirror, tag); space->unmap_write(start, end, mask, mirror); machine().root_device().membank(tag)->set_base(machine().root_device().memregion(dev->subtag(tempstring, region))->base()); @@ -355,14 +355,14 @@ void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t ma void isa8_device::unmap_rom(offs_t start, offs_t end, offs_t mask, offs_t mirror) { - address_space *space = m_maincpu->memory().space(AS_PROGRAM); + address_space *space = m_maincpu->space(AS_PROGRAM); space->unmap_read(start, end, mask, mirror); } bool isa8_device::is_option_rom_space_available(offs_t start, int size) { - m_maincpu = machine().device(m_cputag); - address_space *space = m_maincpu->memory().space(AS_PROGRAM); + m_maincpu = machine().device(m_cputag); + address_space *space = m_maincpu->space(AS_PROGRAM); for(int i = 0; i < size; i += 4096) // 4KB granularity should be enough if(space->get_read_ptr(start + i)) return false; return true; @@ -404,7 +404,7 @@ void isa8_device::nmi() { if (m_nmi_enabled) { - device_set_input_line( m_maincpu, INPUT_LINE_NMI, PULSE_LINE ); + m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); } } //************************************************************************** @@ -518,7 +518,7 @@ void isa16_device::device_config_complete() memset(&m_out_drq6_cb, 0, sizeof(m_out_drq6_cb)); memset(&m_out_drq7_cb, 0, sizeof(m_out_drq7_cb)); } - m_maincpu = mconfig().device(m_cputag); + m_maincpu = mconfig().device(m_cputag); } //------------------------------------------------- @@ -544,22 +544,22 @@ void isa16_device::device_start() void isa16_device::install16_device(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_device_func rhandler, const char* rhandler_name, write16_device_func whandler, const char *whandler_name) { - int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; + int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; switch(buswidth) { case 16: - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0); break; case 32: if ((start % 4) == 0) { if ((end-start)==1) { - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff); } else { - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff); } } else { // we handle just misalligned by 2 - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000); } break; @@ -571,23 +571,23 @@ void isa16_device::install16_device(device_t *dev, offs_t start, offs_t end, off void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_delegate rhandler, write16_delegate whandler) { - int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; + int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; switch(buswidth) { case 16: - m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); + m_maincpu->space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); break; case 32: - m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + m_maincpu->space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); if ((start % 4) == 0) { if ((end-start)==1) { - m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff); + m_maincpu->space(AS_IO)->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff); } else { - m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + m_maincpu->space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); } } else { // we handle just misalligned by 2 - m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000); + m_maincpu->space(AS_IO)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000); } break; @@ -599,23 +599,23 @@ void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_ void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_space_func rhandler, const char* rhandler_name, write16_space_func whandler, const char *whandler_name) { - int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; + int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; switch(buswidth) { case 16: - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0); break; case 32: - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff); if ((start % 4) == 0) { if ((end-start)==1) { - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0x0000ffff); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0x0000ffff); } else { - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff); } } else { // we handle just misalligned by 2 - m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffff0000); + m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffff0000); } break; diff --git a/src/mess/machine/isa.h b/src/mess/machine/isa.h index 5989c6d0e5f..3e0a8b755b8 100644 --- a/src/mess/machine/isa.h +++ b/src/mess/machine/isa.h @@ -190,7 +190,7 @@ protected: virtual void device_config_complete(); // internal state - device_t *m_maincpu; + cpu_device *m_maincpu; devcb_resolved_write_line m_out_irq2_func; devcb_resolved_write_line m_out_irq3_func; diff --git a/src/mess/machine/kb_keytro.c b/src/mess/machine/kb_keytro.c index 52f18f6ac11..235552fdb78 100644 --- a/src/mess/machine/kb_keytro.c +++ b/src/mess/machine/kb_keytro.c @@ -468,13 +468,13 @@ const rom_entry *pc_kbd_keytronic_pc3270_device::device_rom_region() const WRITE_LINE_MEMBER( pc_kbd_keytronic_pc3270_device::clock_write ) { - device_set_input_line( m_cpu, MCS51_INT0_LINE, state ); + m_cpu->set_input_line(MCS51_INT0_LINE, state ); } WRITE_LINE_MEMBER( pc_kbd_keytronic_pc3270_device::data_write ) { - device_set_input_line( m_cpu, MCS51_T0_LINE, state); + m_cpu->set_input_line(MCS51_T0_LINE, state); } diff --git a/src/mess/machine/kc_d004.c b/src/mess/machine/kc_d004.c index b902867cd26..6842ae1d98a 100644 --- a/src/mess/machine/kc_d004.c +++ b/src/mess/machine/kc_d004.c @@ -245,7 +245,7 @@ void kc_d004_device::device_timer(emu_timer &timer, device_timer_id id, int para switch(id) { case TIMER_RESET: - device_set_input_line(m_cpu, INPUT_LINE_RESET, ASSERT_LINE); + m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); break; case TIMER_TC_CLEAR: upd765_tc_w(m_fdc, 0x00); @@ -331,21 +331,21 @@ void kc_d004_device::io_write(offs_t offset, UINT8 data) break; case 0xf4: if (data & 0x01) - device_set_input_line(m_cpu, INPUT_LINE_RESET, CLEAR_LINE); + m_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); if (data & 0x02) { for (int i=0; i<0xfc00; i++) m_cpu->space(AS_PROGRAM)->write_byte(i, 0); - device_set_input_line(m_cpu, INPUT_LINE_RESET, ASSERT_LINE); + m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } if (data & 0x04) - device_set_input_line(m_cpu, INPUT_LINE_RESET, HOLD_LINE); + m_cpu->set_input_line(INPUT_LINE_RESET, HOLD_LINE); if (data & 0x08) - device_set_input_line(m_cpu, INPUT_LINE_NMI, HOLD_LINE); + m_cpu->set_input_line(INPUT_LINE_NMI, HOLD_LINE); //printf("D004 CPU state: %x\n", data & 0x0f); break; diff --git a/src/mess/machine/lisa.c b/src/mess/machine/lisa.c index ab6b183ed3d..58bea46d73e 100644 --- a/src/mess/machine/lisa.c +++ b/src/mess/machine/lisa.c @@ -328,7 +328,7 @@ static void scan_keyboard(running_machine &machine) if (keycode == state->m_NMIcode) { /* generate NMI interrupt */ machine.device("maincpu")->execute().set_input_line(M68K_IRQ_7, PULSE_LINE); - device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_7, M68K_INT_ACK_AUTOVECTOR); + machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_7, M68K_INT_ACK_AUTOVECTOR); } #endif COPS_queue_data(machine, & keycode, 1); diff --git a/src/mess/machine/mac.c b/src/mess/machine/mac.c index 40d81f1a5a4..1e0a1154571 100644 --- a/src/mess/machine/mac.c +++ b/src/mess/machine/mac.c @@ -1568,7 +1568,7 @@ READ16_MEMBER ( mac_state::mac_via_r ) logerror("mac_via_r: offset=0x%02x\n", offset); data = m_via1->read(space, offset); - device_adjust_icount(m_maincpu, m_via_cycles); + m_maincpu->adjust_icount(m_via_cycles); return (data & 0xff) | (data << 8); } @@ -1586,7 +1586,7 @@ WRITE16_MEMBER ( mac_state::mac_via_w ) if (ACCESSING_BITS_8_15) m_via1->write(space, offset, (data >> 8) & 0xff); - device_adjust_icount(m_maincpu, m_via_cycles); + m_maincpu->adjust_icount(m_via_cycles); } /* ************************************************************************* diff --git a/src/mess/machine/macpci.c b/src/mess/machine/macpci.c index 625b1d7f9ad..aa360d09dca 100644 --- a/src/mess/machine/macpci.c +++ b/src/mess/machine/macpci.c @@ -101,7 +101,7 @@ READ16_MEMBER ( macpci_state::mac_via_r ) printf("mac_via_r: offset=0x%02x (PC=%x)\n", offset, m_maincpu->pc()); data = m_via1->read(space, offset); - device_adjust_icount(m_maincpu, m_via_cycles); + m_maincpu->adjust_icount(m_via_cycles); return data | (data<<8); } @@ -119,7 +119,7 @@ WRITE16_MEMBER ( macpci_state::mac_via_w ) if (ACCESSING_BITS_8_15) m_via1->write(space, offset, (data >> 8) & 0xff); - device_adjust_icount(m_maincpu, m_via_cycles); + m_maincpu->adjust_icount(m_via_cycles); } static READ8_DEVICE_HANDLER(mac_adb_via_in_cb2) diff --git a/src/mess/machine/mbc55x.c b/src/mess/machine/mbc55x.c index 465e86c063b..fe88d250094 100644 --- a/src/mess/machine/mbc55x.c +++ b/src/mess/machine/mbc55x.c @@ -388,7 +388,7 @@ MACHINE_RESET( mbc55x ) { set_ram_size(machine); keyboard_reset(machine); - device_set_irq_callback(machine.device(MAINCPU_TAG), mbc55x_irq_callback); + machine.device(MAINCPU_TAG)->execute().set_irq_acknowledge_callback(mbc55x_irq_callback); } MACHINE_START( mbc55x ) diff --git a/src/mess/machine/mboard.c b/src/mess/machine/mboard.c index 8200153b1d7..d17e36af32c 100644 --- a/src/mess/machine/mboard.c +++ b/src/mess/machine/mboard.c @@ -219,13 +219,13 @@ WRITE32_HANDLER( mboard_write_board_32 ) WRITE8_HANDLER( mboard_write_LED_8 ) { write_LED(data); - device_spin_until_time(&space->device(), attotime::from_usec(7)); + space->device().execute().spin_until_time(attotime::from_usec(7)); } WRITE16_HANDLER( mboard_write_LED_16 ) { write_LED(data >> 8); - device_spin_until_time(&space->device(), attotime::from_usec(9)); + space->device().execute().spin_until_time(attotime::from_usec(9)); } WRITE32_HANDLER( mboard_write_LED_32 ) @@ -235,7 +235,7 @@ WRITE32_HANDLER( mboard_write_LED_32 ) if (offset) write_LED(data); else write_LED(data >> 24); logerror("write LED 32 o: %08x d: %08x\n",offset,data); -// device_spin_until_time(&space->device(), ATTOTIME_IN_USEC(20)); +// space->device().execute().spin_until_time(ATTOTIME_IN_USEC(20)); } diff --git a/src/mess/machine/mc68328.c b/src/mess/machine/mc68328.c index 4143c8ff6fd..f4671589aa2 100644 --- a/src/mess/machine/mc68328.c +++ b/src/mess/machine/mc68328.c @@ -42,31 +42,31 @@ static void mc68328_set_interrupt_line(device_t *device, UINT32 line, UINT32 act if(mc68328->regs.isr & INT_M68K_LINE7) { - device_set_input_line_and_vector(cpu, M68K_IRQ_7, ASSERT_LINE, mc68328->regs.ivr | 0x07); + cpu->execute().set_input_line_and_vector(M68K_IRQ_7, ASSERT_LINE, mc68328->regs.ivr | 0x07); } else if(mc68328->regs.isr & INT_M68K_LINE6) { - device_set_input_line_and_vector(cpu, M68K_IRQ_6, ASSERT_LINE, mc68328->regs.ivr | 0x06); + cpu->execute().set_input_line_and_vector(M68K_IRQ_6, ASSERT_LINE, mc68328->regs.ivr | 0x06); } else if(mc68328->regs.isr & INT_M68K_LINE5) { - device_set_input_line_and_vector(cpu, M68K_IRQ_5, ASSERT_LINE, mc68328->regs.ivr | 0x05); + cpu->execute().set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, mc68328->regs.ivr | 0x05); } else if(mc68328->regs.isr & INT_M68K_LINE4) { - device_set_input_line_and_vector(cpu, M68K_IRQ_4, ASSERT_LINE, mc68328->regs.ivr | 0x04); + cpu->execute().set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, mc68328->regs.ivr | 0x04); } else if(mc68328->regs.isr & INT_M68K_LINE3) { - device_set_input_line_and_vector(cpu, M68K_IRQ_3, ASSERT_LINE, mc68328->regs.ivr | 0x03); + cpu->execute().set_input_line_and_vector(M68K_IRQ_3, ASSERT_LINE, mc68328->regs.ivr | 0x03); } else if(mc68328->regs.isr & INT_M68K_LINE2) { - device_set_input_line_and_vector(cpu, M68K_IRQ_2, ASSERT_LINE, mc68328->regs.ivr | 0x02); + cpu->execute().set_input_line_and_vector(M68K_IRQ_2, ASSERT_LINE, mc68328->regs.ivr | 0x02); } else if(mc68328->regs.isr & INT_M68K_LINE1) { - device_set_input_line_and_vector(cpu, M68K_IRQ_1, ASSERT_LINE, mc68328->regs.ivr | 0x01); + cpu->execute().set_input_line_and_vector(M68K_IRQ_1, ASSERT_LINE, mc68328->regs.ivr | 0x01); } } } @@ -76,31 +76,31 @@ static void mc68328_set_interrupt_line(device_t *device, UINT32 line, UINT32 act if((line & INT_M68K_LINE7) && !(mc68328->regs.isr & INT_M68K_LINE7)) { - device_set_input_line(cpu, M68K_IRQ_7, CLEAR_LINE); + cpu->execute().set_input_line(M68K_IRQ_7, CLEAR_LINE); } if((line & INT_M68K_LINE6) && !(mc68328->regs.isr & INT_M68K_LINE6)) { - device_set_input_line(cpu, M68K_IRQ_6, CLEAR_LINE); + cpu->execute().set_input_line(M68K_IRQ_6, CLEAR_LINE); } if((line & INT_M68K_LINE5) && !(mc68328->regs.isr & INT_M68K_LINE5)) { - device_set_input_line(cpu, M68K_IRQ_5, CLEAR_LINE); + cpu->execute().set_input_line(M68K_IRQ_5, CLEAR_LINE); } if((line & INT_M68K_LINE4) && !(mc68328->regs.isr & INT_M68K_LINE4)) { - device_set_input_line(cpu, M68K_IRQ_4, CLEAR_LINE); + cpu->execute().set_input_line(M68K_IRQ_4, CLEAR_LINE); } if((line & INT_M68K_LINE3) && !(mc68328->regs.isr & INT_M68K_LINE3)) { - device_set_input_line(cpu, M68K_IRQ_3, CLEAR_LINE); + cpu->execute().set_input_line(M68K_IRQ_3, CLEAR_LINE); } if((line & INT_M68K_LINE2) && !(mc68328->regs.isr & INT_M68K_LINE2)) { - device_set_input_line(cpu, M68K_IRQ_2, CLEAR_LINE); + cpu->execute().set_input_line(M68K_IRQ_2, CLEAR_LINE); } if((line & INT_M68K_LINE1) && !(mc68328->regs.isr & INT_M68K_LINE1)) { - device_set_input_line(cpu, M68K_IRQ_1, CLEAR_LINE); + cpu->execute().set_input_line(M68K_IRQ_1, CLEAR_LINE); } } } diff --git a/src/mess/machine/mc80.c b/src/mess/machine/mc80.c index 163f62de9de..1bdd2e99887 100644 --- a/src/mess/machine/mc80.c +++ b/src/mess/machine/mc80.c @@ -20,7 +20,7 @@ static IRQ_CALLBACK( mc8020_irq_callback ) MACHINE_RESET( mc8020 ) { - device_set_irq_callback(machine.device("maincpu"), mc8020_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(mc8020_irq_callback); } WRITE_LINE_MEMBER( mc80_state::ctc_z0_w ) @@ -114,7 +114,7 @@ static IRQ_CALLBACK( mc8030_irq_callback ) MACHINE_RESET( mc8030 ) { - device_set_irq_callback(machine.device("maincpu"), mc8030_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(mc8030_irq_callback); } READ8_MEMBER( mc80_state::zve_port_a_r ) diff --git a/src/mess/machine/mpc105.c b/src/mess/machine/mpc105.c index c71a73d2864..f0b46acf50b 100644 --- a/src/mess/machine/mpc105.c +++ b/src/mess/machine/mpc105.c @@ -40,7 +40,7 @@ mpc105_device::mpc105_device(const machine_config &mconfig, const char *tag, dev void mpc105_device::device_start() { - m_maincpu = machine().device(m_cputag); + m_maincpu = machine().device(m_cputag); } //------------------------------------------------- @@ -94,7 +94,7 @@ void mpc105_device::update_memory() if (m_bank_base > 0) { - address_space *space = m_maincpu->memory().space(AS_PROGRAM); + address_space *space = m_maincpu->space(AS_PROGRAM); /* first clear everything out */ space->nop_read(0x00000000, 0x3FFFFFFF); diff --git a/src/mess/machine/mpc105.h b/src/mess/machine/mpc105.h index 5a1370ba1f2..42e809f2289 100644 --- a/src/mess/machine/mpc105.h +++ b/src/mess/machine/mpc105.h @@ -47,7 +47,7 @@ private: UINT8 m_bank_enable; UINT32 m_bank_registers[8]; - device_t* m_maincpu; + cpu_device* m_maincpu; }; diff --git a/src/mess/machine/msx.c b/src/mess/machine/msx.c index ae0e60767d7..e0109c859f8 100644 --- a/src/mess/machine/msx.c +++ b/src/mess/machine/msx.c @@ -520,7 +520,7 @@ static const UINT8 cc_ex[0x100] = { DRIVER_INIT_MEMBER(msx_state,msx) { - device_set_input_line_vector (machine().device("maincpu"), 0, 0xff); + machine().device("maincpu")->execute().set_input_line_vector(0, 0xff); msx_memory_init (machine()); diff --git a/src/mess/machine/nes.c b/src/mess/machine/nes.c index b17cdacfd94..7633cc3f11d 100644 --- a/src/mess/machine/nes.c +++ b/src/mess/machine/nes.c @@ -222,7 +222,7 @@ MACHINE_RESET( nes ) static TIMER_CALLBACK( nes_irq_callback ) { nes_state *state = machine.driver_data(); - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_irq_timer->adjust(attotime::never); } @@ -296,7 +296,7 @@ MACHINE_START( nes ) init_nes_core(machine); machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(nes_machine_stop),&machine)); - state->m_maincpu = machine.device("maincpu"); + state->m_maincpu = machine.device("maincpu"); state->m_sound = machine.device("nessound"); state->m_cart = machine.device("cart"); @@ -1538,13 +1538,13 @@ static void fds_irq( device_t *device, int scanline, int vblank, int blanked ) nes_state *state = device->machine().driver_data(); if (state->m_IRQ_enable_latch) - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); if (state->m_IRQ_enable) { if (state->m_IRQ_count <= 114) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_enable = 0; state->m_fds_status0 |= 0x01; } diff --git a/src/mess/machine/nes_ines.c b/src/mess/machine/nes_ines.c index 3519b22882d..d7dfa7aa16d 100644 --- a/src/mess/machine/nes_ines.c +++ b/src/mess/machine/nes_ines.c @@ -38,7 +38,7 @@ static void ffe_irq( device_t *device, int scanline, int vblank, int blanked ) { if ((0xffff - state->m_IRQ_count) < 114) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_count = 0xffff; state->m_IRQ_enable = 0; } diff --git a/src/mess/machine/nes_pcb.c b/src/mess/machine/nes_pcb.c index 44398635c90..1369d4f70e6 100644 --- a/src/mess/machine/nes_pcb.c +++ b/src/mess/machine/nes_pcb.c @@ -1292,7 +1292,7 @@ static void mmc3_irq( device_t *device, int scanline, int vblank, int blanked ) { LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos())); - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } } state->m_IRQ_clear = 0; @@ -1822,7 +1822,7 @@ static void mmc5_irq( device_t *device, int scanline, int vblank, int blanked ) if (scanline == state->m_IRQ_count) { if (state->m_IRQ_enable) - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_status = 0xff; } @@ -2461,7 +2461,7 @@ static void jxrom_irq( device_t *device, int scanline, int vblank, int blanked ) if (state->m_IRQ_count <= 114) { state->m_IRQ_count = 0xffff; - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } else state->m_IRQ_count -= 114; @@ -2834,7 +2834,7 @@ static void bandai_lz_irq( device_t *device, int scanline, int vblank, int blank { if (state->m_IRQ_count <= 114) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_count = (0xffff - 114 + state->m_IRQ_count); // wrap around the 16 bits counter } state->m_IRQ_count -= 114; @@ -3092,7 +3092,7 @@ static void h3001_irq( device_t *device, int scanline, int vblank, int blanked ) if (state->m_IRQ_count <= 114) { state->m_IRQ_enable = 0; - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } } } @@ -3175,7 +3175,7 @@ static void ss88006_irq( device_t *device, int scanline, int vblank, int blanked { if ((state->m_IRQ_count & 0x000f) < 114) // always true, but we only update the IRQ once per scanlines so we cannot be more precise :( { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_count = (state->m_IRQ_count & ~0x000f) | (0x0f - (114 & 0x0f) + (state->m_IRQ_count & 0x000f)); // sort of wrap around the counter } // decrements should not affect upper bits, so we don't do anything here (114 > 0x0f) @@ -3184,7 +3184,7 @@ static void ss88006_irq( device_t *device, int scanline, int vblank, int blanked { if ((state->m_IRQ_count & 0x00ff) < 114) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_count = (state->m_IRQ_count & ~0x00ff) | (0xff - 114 + (state->m_IRQ_count & 0x00ff)); // wrap around the 8 bits counter } else @@ -3194,7 +3194,7 @@ static void ss88006_irq( device_t *device, int scanline, int vblank, int blanked { if ((state->m_IRQ_count & 0x0fff) < 114) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_count = (state->m_IRQ_count & ~0x0fff) | (0xfff - 114 + (state->m_IRQ_count & 0x0fff)); // wrap around the 12 bits counter } else @@ -3202,7 +3202,7 @@ static void ss88006_irq( device_t *device, int scanline, int vblank, int blanked } else if (state->m_IRQ_count < 114) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_count = (0xffff - 114 + state->m_IRQ_count); // wrap around the 16 bits counter } else @@ -3586,7 +3586,7 @@ static void konami_irq( device_t *device, int scanline, int vblank, int blanked { state->m_IRQ_count = state->m_IRQ_count_latch; state->m_IRQ_enable = state->m_IRQ_enable_latch; - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } } @@ -3855,7 +3855,7 @@ static void namcot_irq( device_t *device, int scanline, int vblank, int blanked { if (state->m_IRQ_count >= (0x7fff - 114)) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_count = 0; } else @@ -4028,7 +4028,7 @@ static void sunsoft3_irq( device_t *device, int scanline, int vblank, int blanke { state->m_IRQ_enable = 0; state->m_IRQ_count = 0xffff; - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } else state->m_IRQ_count -= 114; @@ -5100,7 +5100,7 @@ static void futuremedia_irq( device_t *device, int scanline, int vblank, int bla { state->m_IRQ_count--; if (!state->m_IRQ_count) - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } } } @@ -5481,7 +5481,7 @@ static void ks7032_irq( device_t *device, int scanline, int vblank, int blanked { state->m_IRQ_enable = 0; state->m_IRQ_count = state->m_IRQ_count_latch; - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } else state->m_IRQ_count += 114; @@ -5594,7 +5594,7 @@ static void mmc_fds_irq( device_t *device, int scanline, int vblank, int blanked { if (state->m_IRQ_count <= 114) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_enable = 0; state->m_IRQ_status |= 0x01; } @@ -7226,7 +7226,7 @@ static void tengen_800032_irq( device_t *device, int scanline, int vblank, int b { LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos())); - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } } } @@ -7253,7 +7253,7 @@ static void tengen_800032_irq( device_t *device, int scanline, int vblank, int b { LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos())); - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } } } @@ -8936,7 +8936,7 @@ static void sc127_irq( device_t *device, int scanline, int vblank, int blanked ) { LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos())); - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_enable = 0; } } @@ -9075,7 +9075,7 @@ static void smb2jb_irq( device_t *device, int scanline, int vblank, int blanked if (state->m_IRQ_count < 0x1000) { if ((0x1000 - state->m_IRQ_count) <= 114) - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); else state->m_IRQ_count += 114; } @@ -9361,7 +9361,7 @@ static void btl_smb2a_irq( device_t *device, int scanline, int vblank, int blank { state->m_IRQ_count = (state->m_IRQ_count + 1) & 0xfff; state->m_IRQ_enable = 0; - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } else state->m_IRQ_count += 114; @@ -9447,7 +9447,7 @@ static void btl_smb3_irq( device_t *device, int scanline, int vblank, int blanke { if ((0xffff - state->m_IRQ_count) < 114) { - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); state->m_IRQ_enable = 0; } @@ -9526,7 +9526,7 @@ static void btl_dn_irq( device_t *device, int scanline, int vblank, int blanked state->m_IRQ_count = 0; LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline, device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos())); - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } } @@ -11408,7 +11408,7 @@ static void shjy3_irq( device_t *device, int scanline, int vblank, int blanked ) { state->m_IRQ_count = state->m_IRQ_count_latch; state->m_IRQ_enable = state->m_IRQ_enable | ((state->m_IRQ_enable & 0x01) << 1); - device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE); + state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } else state->m_IRQ_count++; diff --git a/src/mess/machine/nubus.c b/src/mess/machine/nubus.c index f7fc7aa08f9..031559570c6 100644 --- a/src/mess/machine/nubus.c +++ b/src/mess/machine/nubus.c @@ -116,7 +116,7 @@ nubus_device::nubus_device(const machine_config &mconfig, device_type type, cons void nubus_device::device_start() { - m_maincpu = machine().device(m_cputag); + m_maincpu = machine().device(m_cputag); // resolve callbacks m_out_irq9_func.resolve(m_out_irq9_cb, *this); m_out_irqa_func.resolve(m_out_irqa_cb, *this); @@ -141,15 +141,15 @@ void nubus_device::add_nubus_card(device_nubus_card_interface *card) void nubus_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, UINT32 mask) { - m_maincpu = machine().device(m_cputag); - int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; + m_maincpu = machine().device(m_cputag); + int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; switch(buswidth) { case 32: - m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask); + m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask); break; case 64: - m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask); + m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask); break; default: fatalerror("NUBUS: Bus width %d not supported\n", buswidth); @@ -159,15 +159,15 @@ void nubus_device::install_device(offs_t start, offs_t end, read8_delegate rhand void nubus_device::install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, UINT32 mask) { - m_maincpu = machine().device(m_cputag); - int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; + m_maincpu = machine().device(m_cputag); + int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; switch(buswidth) { case 32: - m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask); + m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask); break; case 64: - m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask); + m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask); break; default: fatalerror("NUBUS: Bus width %d not supported\n", buswidth); @@ -177,15 +177,15 @@ void nubus_device::install_device(offs_t start, offs_t end, read16_delegate rhan void nubus_device::install_device(offs_t start, offs_t end, read32_delegate rhandler, write32_delegate whandler, UINT32 mask) { - m_maincpu = machine().device(m_cputag); - int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; + m_maincpu = machine().device(m_cputag); + int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; switch(buswidth) { case 32: - m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask); + m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask); break; case 64: - m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask); + m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask); break; default: fatalerror("NUBUS: Bus width %d not supported\n", buswidth); @@ -195,15 +195,15 @@ void nubus_device::install_device(offs_t start, offs_t end, read32_delegate rhan void nubus_device::install_readonly_device(offs_t start, offs_t end, read32_delegate rhandler, UINT32 mask) { - m_maincpu = machine().device(m_cputag); - int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; + m_maincpu = machine().device(m_cputag); + int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; switch(buswidth) { case 32: - m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(start, end, rhandler, mask); + m_maincpu->space(AS_PROGRAM)->install_read_handler(start, end, rhandler, mask); break; case 64: - m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(start, end, rhandler, ((UINT64)mask<<32)|mask); + m_maincpu->space(AS_PROGRAM)->install_read_handler(start, end, rhandler, ((UINT64)mask<<32)|mask); break; default: fatalerror("NUBUS: Bus width %d not supported\n", buswidth); @@ -213,15 +213,15 @@ void nubus_device::install_readonly_device(offs_t start, offs_t end, read32_dele void nubus_device::install_writeonly_device(offs_t start, offs_t end, write32_delegate whandler, UINT32 mask) { - m_maincpu = machine().device(m_cputag); - int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; + m_maincpu = machine().device(m_cputag); + int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; switch(buswidth) { case 32: - m_maincpu->memory().space(AS_PROGRAM)->install_write_handler(start, end, whandler, mask); + m_maincpu->space(AS_PROGRAM)->install_write_handler(start, end, whandler, mask); break; case 64: - m_maincpu->memory().space(AS_PROGRAM)->install_write_handler(start, end, whandler, ((UINT64)mask<<32)|mask); + m_maincpu->space(AS_PROGRAM)->install_write_handler(start, end, whandler, ((UINT64)mask<<32)|mask); break; default: fatalerror("NUBUS: Bus width %d not supported\n", buswidth); @@ -232,8 +232,8 @@ void nubus_device::install_writeonly_device(offs_t start, offs_t end, write32_de void nubus_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data) { // printf("install_bank: %s @ %x->%x mask %x mirror %x\n", tag, start, end, mask, mirror); - m_maincpu = machine().device(m_cputag); - address_space *space = m_maincpu->memory().space(AS_PROGRAM); + m_maincpu = machine().device(m_cputag); + address_space *space = m_maincpu->space(AS_PROGRAM); space->install_readwrite_bank(start, end, mask, mirror, tag ); machine().root_device().membank(tag)->set_base(data); } diff --git a/src/mess/machine/nubus.h b/src/mess/machine/nubus.h index 532532d35ad..b44ea828ae7 100644 --- a/src/mess/machine/nubus.h +++ b/src/mess/machine/nubus.h @@ -113,7 +113,7 @@ protected: virtual void device_config_complete(); // internal state - device_t *m_maincpu; + cpu_device *m_maincpu; devcb_resolved_write_line m_out_irq9_func; devcb_resolved_write_line m_out_irqa_func; diff --git a/src/mess/machine/orion.c b/src/mess/machine/orion.c index e860fc50f26..07640dfb44f 100644 --- a/src/mess/machine/orion.c +++ b/src/mess/machine/orion.c @@ -374,7 +374,7 @@ INTERRUPT_GEN( orionz80_interrupt ) orion_state *state = device->machine().driver_data(); if ((state->m_orionz80_dispatcher & 0x40)==0x40) { - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } } diff --git a/src/mess/machine/pc.c b/src/mess/machine/pc.c index 66645020ddb..21ca9de4694 100644 --- a/src/mess/machine/pc.c +++ b/src/mess/machine/pc.c @@ -171,7 +171,7 @@ WRITE8_MEMBER(pc_state::pc_page_w) static WRITE_LINE_DEVICE_HANDLER( pc_dma_hrq_changed ) { pc_state *st = device->machine().driver_data(); - device_set_input_line(st->m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + st->m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); /* Assert HLDA */ i8237_hlda_w( device, state ); @@ -291,7 +291,7 @@ static emu_timer *pc_int_delay_timer; static TIMER_CALLBACK( pcjr_delayed_pic8259_irq ) { - device_set_input_line(machine.firstcpu, 0, param ? ASSERT_LINE : CLEAR_LINE); + machine.firstcpu->set_input_line(0, param ? ASSERT_LINE : CLEAR_LINE); } static WRITE_LINE_DEVICE_HANDLER( pcjr_pic8259_set_int_line ) @@ -302,7 +302,7 @@ static WRITE_LINE_DEVICE_HANDLER( pcjr_pic8259_set_int_line ) } else { - device_set_input_line(device->machine().firstcpu, 0, state ? ASSERT_LINE : CLEAR_LINE); + device->machine().firstcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); } } @@ -645,7 +645,7 @@ static void pcjr_set_keyb_int(running_machine &machine, int state) pcjr_keyb.latch = 1; if ( nmi_enabled & 0x80 ) { - device_set_input_line( st->m_pit8253->machine().firstcpu, INPUT_LINE_NMI, PULSE_LINE ); + st->m_pit8253->machine().firstcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); } } } @@ -1447,8 +1447,8 @@ MACHINE_RESET( pc ) { device_t *speaker = machine.device(SPEAKER_TAG); pc_state *st = machine.driver_data(); - st->m_maincpu = machine.device("maincpu" ); - device_set_irq_callback(st->m_maincpu, pc_irq_callback); + st->m_maincpu = machine.device("maincpu" ); + st->m_maincpu->set_irq_acknowledge_callback(pc_irq_callback); st->m_u73_q2 = 0; st->m_out1 = 0; @@ -1473,8 +1473,8 @@ MACHINE_RESET( pc ) MACHINE_START( mc1502 ) { pc_state *st = machine.driver_data(); - st->m_maincpu = machine.device("maincpu" ); - device_set_irq_callback(st->m_maincpu, pc_irq_callback); + st->m_maincpu = machine.device("maincpu" ); + st->m_maincpu->set_irq_acknowledge_callback(pc_irq_callback); st->m_pic8259 = machine.device("pic8259"); st->m_dma8237 = NULL; @@ -1499,8 +1499,8 @@ MACHINE_START( pcjr ) pc_fdc_init( machine, &pcjr_fdc_interface_nc ); pcjr_keyb.keyb_signal_timer = machine.scheduler().timer_alloc(FUNC(pcjr_keyb_signal_callback)); pc_int_delay_timer = machine.scheduler().timer_alloc(FUNC(pcjr_delayed_pic8259_irq)); - st->m_maincpu = machine.device("maincpu" ); - device_set_irq_callback(st->m_maincpu, pc_irq_callback); + st->m_maincpu = machine.device("maincpu" ); + st->m_maincpu->set_irq_acknowledge_callback(pc_irq_callback); st->m_pic8259 = machine.device("pic8259"); st->m_dma8237 = NULL; diff --git a/src/mess/machine/pc1512kb.c b/src/mess/machine/pc1512kb.c index 14dc29497aa..34c13958026 100644 --- a/src/mess/machine/pc1512kb.c +++ b/src/mess/machine/pc1512kb.c @@ -299,7 +299,7 @@ void pc1512_keyboard_device::device_start() void pc1512_keyboard_device::device_reset() { - device_set_input_line(m_maincpu, MCS48_INPUT_EA, CLEAR_LINE); + m_maincpu->set_input_line(MCS48_INPUT_EA, CLEAR_LINE); } @@ -311,7 +311,7 @@ void pc1512_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, { if (!m_clock_in) { - device_set_input_line(m_maincpu, INPUT_LINE_RESET, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } } @@ -340,7 +340,7 @@ WRITE_LINE_MEMBER( pc1512_keyboard_device::clock_w ) } else { - device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); } } diff --git a/src/mess/machine/pet.c b/src/mess/machine/pet.c index fae44c4947b..0481d382a9f 100644 --- a/src/mess/machine/pet.c +++ b/src/mess/machine/pet.c @@ -198,7 +198,7 @@ static WRITE_LINE_DEVICE_HANDLER( pia0_irq_w ) driver_state->m_pia0_irq = state; int level = (driver_state->m_pia0_irq | driver_state->m_pia1_irq | driver_state->m_via_irq) ? ASSERT_LINE : CLEAR_LINE; - device_set_input_line(device->machine().firstcpu, INPUT_LINE_IRQ0, level); + device->machine().firstcpu->set_input_line(INPUT_LINE_IRQ0, level); } const pia6821_interface pet_pia0 = @@ -249,7 +249,7 @@ static WRITE_LINE_DEVICE_HANDLER( pia1_irq_w ) driver_state->m_pia1_irq = state; int level = (driver_state->m_pia0_irq | driver_state->m_pia1_irq | driver_state->m_via_irq) ? ASSERT_LINE : CLEAR_LINE; - device_set_input_line(device->machine().firstcpu, INPUT_LINE_IRQ0, level); + device->machine().firstcpu->set_input_line(INPUT_LINE_IRQ0, level); } const pia6821_interface pet_pia1 = @@ -382,7 +382,7 @@ static WRITE_LINE_DEVICE_HANDLER( via_irq_w ) driver_state->m_via_irq = state; int level = (driver_state->m_pia0_irq | driver_state->m_pia1_irq | driver_state->m_via_irq) ? ASSERT_LINE : CLEAR_LINE; - device_set_input_line(device->machine().firstcpu, INPUT_LINE_IRQ0, level); + device->machine().firstcpu->set_input_line(INPUT_LINE_IRQ0, level); } const via6522_interface pet_via = @@ -770,14 +770,14 @@ INTERRUPT_GEN( pet_frame_interrupt ) { if (state->ioport("CFG")->read() & 0x04) { - device_set_input_line(device, INPUT_LINE_HALT, 1); - device_set_input_line(device, INPUT_LINE_HALT, 0); + device->execute().set_input_line(INPUT_LINE_HALT, 1); + device->execute().set_input_line(INPUT_LINE_HALT, 0); state->m_font |= 2; } else { - device_set_input_line(device, INPUT_LINE_HALT, 0); - device_set_input_line(device, INPUT_LINE_HALT, 1); + device->execute().set_input_line(INPUT_LINE_HALT, 0); + device->execute().set_input_line(INPUT_LINE_HALT, 1); state->m_font &= ~2; } } diff --git a/src/mess/machine/pk8020.c b/src/mess/machine/pk8020.c index 729ca9dedc7..9895cde56e6 100644 --- a/src/mess/machine/pk8020.c +++ b/src/mess/machine/pk8020.c @@ -998,7 +998,7 @@ MACHINE_RESET( pk8020 ) { pk8020_state *state = machine.driver_data(); pk8020_set_bank(machine,0); - device_set_irq_callback(machine.device("maincpu"), pk8020_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(pk8020_irq_callback); state->m_sound_gate = 0; state->m_sound_level = 0; diff --git a/src/mess/machine/poly88.c b/src/mess/machine/poly88.c index 9c5f016facd..2ef0507fe88 100644 --- a/src/mess/machine/poly88.c +++ b/src/mess/machine/poly88.c @@ -16,7 +16,7 @@ static TIMER_CALLBACK(poly88_usart_timer_callback) { poly88_state *state = machine.driver_data(); state->m_int_vector = 0xe7; - device_set_input_line(machine.device("maincpu"), 0, HOLD_LINE); + machine.device("maincpu")->execute().set_input_line(0, HOLD_LINE); } WRITE8_MEMBER(poly88_state::poly88_baud_rate_w) @@ -210,7 +210,7 @@ DRIVER_INIT_MEMBER(poly88_state,poly88) MACHINE_RESET(poly88) { poly88_state *state = machine.driver_data(); - device_set_irq_callback(machine.device("maincpu"), poly88_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(poly88_irq_callback); state->m_intr = 0; state->m_last_code = 0; @@ -221,14 +221,14 @@ INTERRUPT_GEN( poly88_interrupt ) { poly88_state *state = device->machine().driver_data(); state->m_int_vector = 0xf7; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } static WRITE_LINE_DEVICE_HANDLER( poly88_usart_rxready ) { //poly88_state *drvstate = device->machine().driver_data(); //drvstate->m_int_vector = 0xe7; - //device_set_input_line(device, 0, HOLD_LINE); + //device->execute().set_input_line(0, HOLD_LINE); } const i8251_interface poly88_usart_interface= diff --git a/src/mess/machine/primo.c b/src/mess/machine/primo.c index b0ebe0b6eee..ac580f02bf8 100644 --- a/src/mess/machine/primo.c +++ b/src/mess/machine/primo.c @@ -35,7 +35,7 @@ INTERRUPT_GEN( primo_vblank_interrupt ) { primo_state *state = device->machine().driver_data(); if (state->m_nmi) - device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); + device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } /******************************************************************************* diff --git a/src/mess/machine/rmnimbus.c b/src/mess/machine/rmnimbus.c index f17945deaf8..6ac07b26fab 100644 --- a/src/mess/machine/rmnimbus.c +++ b/src/mess/machine/rmnimbus.c @@ -203,7 +203,7 @@ static IRQ_CALLBACK(int_callback) logerror("(%f) **** Acknowledged interrupt vector %02X\n", device->machine().time().as_double(), state->m_i186.intr.poll_status & 0x1f); /* clear the interrupt */ - device_set_input_line(device, 0, CLEAR_LINE); + device->execute().set_input_line(0, CLEAR_LINE); state->m_i186.intr.pending = 0; oldreq=state->m_i186.intr.request; @@ -1178,7 +1178,7 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w) /* we need to do this at a time when the I86 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(&space.device(), int_callback); + space.device().execute().set_irq_acknowledge_callback(int_callback); break; case 0x60: diff --git a/src/mess/machine/s100.c b/src/mess/machine/s100.c index 9c5f5cb8aa8..22286546e42 100644 --- a/src/mess/machine/s100.c +++ b/src/mess/machine/s100.c @@ -126,7 +126,7 @@ s100_device::s100_device(const machine_config &mconfig, const char *tag, device_ void s100_device::device_start() { - m_maincpu = machine().device(m_cputag); + m_maincpu = machine().device(m_cputag); // resolve callbacks m_out_int_func.resolve(m_out_int_cb, *this); diff --git a/src/mess/machine/s100.h b/src/mess/machine/s100.h index d16d2fe3d9a..72daae09b34 100644 --- a/src/mess/machine/s100.h +++ b/src/mess/machine/s100.h @@ -206,7 +206,7 @@ protected: private: // internal state - device_t *m_maincpu; + cpu_device *m_maincpu; devcb_resolved_write_line m_out_int_func; devcb_resolved_write_line m_out_nmi_func; diff --git a/src/mess/machine/sms.c b/src/mess/machine/sms.c index f6567b45984..3f12124f5cf 100644 --- a/src/mess/machine/sms.c +++ b/src/mess/machine/sms.c @@ -2104,7 +2104,7 @@ WRITE8_MEMBER(sms_state::sms_store_control_w) WRITE_LINE_DEVICE_HANDLER( sms_store_int_callback ) { sms_state *driver_state = device->machine().driver_data(); - device_set_input_line(driver_state->m_store_control & 0x01 ? driver_state->m_control_cpu : driver_state->m_main_cpu, 0, state); + (driver_state->m_store_control & 0x01 ? driver_state->m_control_cpu : driver_state->m_main_cpu)->execute().set_input_line(0, state); } diff --git a/src/mess/machine/southbridge.c b/src/mess/machine/southbridge.c index 9226e432087..0dc4950c43d 100644 --- a/src/mess/machine/southbridge.c +++ b/src/mess/machine/southbridge.c @@ -209,7 +209,7 @@ void southbridge_device::device_start() m_at_offset1 = 0xff; - //device_set_irq_callback(machine().device(":maincpu"), at_irq_callback); + //machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback); } //------------------------------------------------- @@ -330,7 +330,7 @@ WRITE8_MEMBER( southbridge_device::at_page8_w ) WRITE_LINE_MEMBER( southbridge_device::pc_dma_hrq_changed ) { - device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); /* Assert HLDA */ i8237_hlda_w( m_dma8237_2, state ); diff --git a/src/mess/machine/svi318.c b/src/mess/machine/svi318.c index f3a33f378b5..6fc8f16aa4b 100644 --- a/src/mess/machine/svi318.c +++ b/src/mess/machine/svi318.c @@ -540,7 +540,7 @@ DRIVER_INIT_MEMBER(svi318_state,svi318) m_svi.svi318 = 1; } - device_set_input_line_vector(machine().device("maincpu"), 0, 0xff); + machine().device("maincpu")->execute().set_input_line_vector(0, 0xff); /* memory */ m_svi.empty_bank = auto_alloc_array(machine(), UINT8, 0x8000); diff --git a/src/mess/machine/tf20.c b/src/mess/machine/tf20.c index d0633a3c3a3..b198e350fb8 100644 --- a/src/mess/machine/tf20.c +++ b/src/mess/machine/tf20.c @@ -330,7 +330,7 @@ static DEVICE_START( tf20 ) device_t *cpu = device->subdevice("tf20"); address_space *prg = cpu->memory().space(AS_PROGRAM); - device_set_irq_callback(cpu, tf20_irq_ack); + cpu->execute().set_irq_acknowledge_callback(tf20_irq_ack); /* ram device */ tf20->ram = device->subdevice("ram"); diff --git a/src/mess/machine/ti85.c b/src/mess/machine/ti85.c index e20dd77cef5..2c3200c43ca 100644 --- a/src/mess/machine/ti85.c +++ b/src/mess/machine/ti85.c @@ -22,7 +22,7 @@ static TIMER_CALLBACK(ti85_timer_callback) { if (state->m_ON_interrupt_mask && !state->m_ON_pressed) { - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); state->m_ON_interrupt_status = 1; if (!state->m_timer_interrupt_mask) state->m_timer_interrupt_mask = 1; } @@ -33,7 +33,7 @@ static TIMER_CALLBACK(ti85_timer_callback) state->m_ON_pressed = 0; if (state->m_timer_interrupt_mask) { - device_set_input_line(state->m_maincpu, 0, HOLD_LINE); + state->m_maincpu->set_input_line(0, HOLD_LINE); state->m_timer_interrupt_status = 1; } } @@ -604,9 +604,9 @@ static void ti8x_snapshot_setup_registers (running_machine &machine, UINT8 * dat state->m_maincpu->set_state_int(Z80_R, (reg[0x44]&0x7f) | (reg[0x48]&0x80)); - device_set_input_line(state->m_maincpu, 0, 0); - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, 0); - device_set_input_line(state->m_maincpu, INPUT_LINE_HALT, 0); + state->m_maincpu->set_input_line(0, 0); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, 0); + state->m_maincpu->set_input_line(INPUT_LINE_HALT, 0); } static void ti85_setup_snapshot (running_machine &machine, UINT8 * data) diff --git a/src/mess/machine/ti99/spchsyn.c b/src/mess/machine/ti99/spchsyn.c index 10e38352932..478d9cdbde5 100644 --- a/src/mess/machine/ti99/spchsyn.c +++ b/src/mess/machine/ti99/spchsyn.c @@ -108,7 +108,7 @@ READ8Z_MEMBER( ti_speech_synthesizer_device::readz ) { if ((offset & m_select_mask)==m_select_value) { - device_adjust_icount(machine().device("maincpu"),-(18+3)); /* this is just a minimum, it can be more */ + machine().device("maincpu")->execute().adjust_icount(-(18+3)); /* this is just a minimum, it can be more */ *value = m_vsp->read(space, offset, 0xff) & 0xff; if (VERBOSE>4) LOG("spchsyn: read value = %02x\n", *value); } @@ -121,7 +121,7 @@ WRITE8_MEMBER( ti_speech_synthesizer_device::write ) { if ((offset & m_select_mask)==(m_select_value | 0x0400)) { - device_adjust_icount(machine().device("maincpu"),-(54+3)); /* this is just an approx. minimum, it can be much more */ + machine().device("maincpu")->execute().adjust_icount(-(54+3)); /* this is just an approx. minimum, it can be much more */ /* RN: the stupid design of the tms5220 core means that ready is cleared */ /* when there are 15 bytes in FIFO. It should be 16. Of course, if */ @@ -133,7 +133,7 @@ WRITE8_MEMBER( ti_speech_synthesizer_device::write ) int cycles_to_ready = machine().device("maincpu")->attotime_to_cycles(time_to_ready); if (VERBOSE>8) LOG("spchsyn: time to ready: %f -> %d\n", time_to_ready.as_double(), (int) cycles_to_ready); - device_adjust_icount(machine().device("maincpu"),-cycles_to_ready); + machine().device("maincpu")->execute().adjust_icount(-cycles_to_ready); machine().scheduler().timer_set(attotime::zero, FUNC_NULL); } if (VERBOSE>4) LOG("spchsyn: write value = %02x\n", data); diff --git a/src/mess/machine/ti99/speech8.c b/src/mess/machine/ti99/speech8.c index 0e725931b2e..6f10b12e5a2 100644 --- a/src/mess/machine/ti99/speech8.c +++ b/src/mess/machine/ti99/speech8.c @@ -72,7 +72,7 @@ READ8Z_MEMBER( ti998_spsyn_device::readz ) { if ((offset & m_select_mask)==m_select_value) { - device_adjust_icount(machine().device("maincpu"),-(18+3)); /* this is just a minimum, it can be more */ + machine().device("maincpu")->execute().adjust_icount(-(18+3)); /* this is just a minimum, it can be more */ *value = m_vsp->read(space, offset, 0xff) & 0xff; if (VERBOSE>4) LOG("speech8: read value = %02x\n", *value); } @@ -85,7 +85,7 @@ WRITE8_MEMBER( ti998_spsyn_device::write ) { if ((offset & m_select_mask)==(m_select_value | 0x0400)) { - device_adjust_icount(machine().device("maincpu"),-(54+3)); /* this is just an approx. minimum, it can be much more */ + machine().device("maincpu")->execute().adjust_icount(-(54+3)); /* this is just an approx. minimum, it can be much more */ /* RN: the stupid design of the tms5220 core means that ready is cleared */ /* when there are 15 bytes in FIFO. It should be 16. Of course, if */ @@ -97,7 +97,7 @@ WRITE8_MEMBER( ti998_spsyn_device::write ) int cycles_to_ready = machine().device("maincpu")->attotime_to_cycles(time_to_ready); if (VERBOSE>8) LOG("speech8: time to ready: %f -> %d\n", time_to_ready.as_double(), (int) cycles_to_ready); - device_adjust_icount(machine().device("maincpu"),-cycles_to_ready); + machine().device("maincpu")->execute().adjust_icount(-cycles_to_ready); machine().scheduler().timer_set(attotime::zero, FUNC_NULL); } if (VERBOSE>4) LOG("speech8: write value = %02x\n", data); diff --git a/src/mess/machine/trs80.c b/src/mess/machine/trs80.c index fe65af2549b..ce1fb505a2f 100644 --- a/src/mess/machine/trs80.c +++ b/src/mess/machine/trs80.c @@ -636,13 +636,13 @@ INTERRUPT_GEN( trs80_rtc_interrupt ) if (state->m_mask & IRQ_M4_RTC) { state->m_irq |= IRQ_M4_RTC; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } } else // Model 1 { state->m_irq |= IRQ_M1_RTC; - device_set_input_line(device, 0, HOLD_LINE); + device->execute().set_input_line(0, HOLD_LINE); } } diff --git a/src/mess/machine/vector06.c b/src/mess/machine/vector06.c index 32c18d598b8..3c2a4251ba8 100644 --- a/src/mess/machine/vector06.c +++ b/src/mess/machine/vector06.c @@ -127,7 +127,7 @@ INTERRUPT_GEN( vector06_interrupt ) vector06_state *state = device->machine().driver_data(); state->m_vblank_state++; if (state->m_vblank_state>1) state->m_vblank_state=0; - device_set_input_line(device,0,state->m_vblank_state ? HOLD_LINE : CLEAR_LINE); + device->execute().set_input_line(0,state->m_vblank_state ? HOLD_LINE : CLEAR_LINE); } @@ -173,7 +173,7 @@ MACHINE_RESET( vector06 ) vector06_state *state = machine.driver_data(); address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); - device_set_irq_callback(machine.device("maincpu"), vector06_irq_callback); + machine.device("maincpu")->execute().set_irq_acknowledge_callback(vector06_irq_callback); space->install_read_bank (0x0000, 0x7fff, "bank1"); space->install_write_bank(0x0000, 0x7fff, "bank2"); space->install_read_bank (0x8000, 0xffff, "bank3"); diff --git a/src/mess/machine/x68k_neptunex.c b/src/mess/machine/x68k_neptunex.c index d616dbb7029..58fb3868162 100644 --- a/src/mess/machine/x68k_neptunex.c +++ b/src/mess/machine/x68k_neptunex.c @@ -146,7 +146,7 @@ WRITE8_MEMBER(x68k_neptune_device::x68k_neptune_mem_write) WRITE_LINE_MEMBER(x68k_neptune_device::x68k_neptune_irq_w) { - device_set_input_line_vector(machine().device("maincpu"),2, NEPTUNE_IRQ_VECTOR); + machine().device("maincpu")->execute().set_input_line_vector(2, NEPTUNE_IRQ_VECTOR); m_slot->irq2_w(state); logerror("Neptune: IRQ2 set to %i\n",state); } diff --git a/src/mess/machine/zx.c b/src/mess/machine/zx.c index 3ced7842752..fb51fafd391 100644 --- a/src/mess/machine/zx.c +++ b/src/mess/machine/zx.c @@ -388,7 +388,7 @@ WRITE8_MEMBER( zx_state::zx81_io_w ) zx_ula_bkgnd(1); if (m_ula_frame_vsync == 2) { - device_spin_until_time(&mem->device(),machine().primary_screen->time_until_pos(height - 1, 0)); + mem->device().execute().spin_until_time(machine().primary_screen->time_until_pos(height - 1, 0)); m_ula_scanline_count = height - 1; logerror ("S: %d B: %d\n", machine().primary_screen->vpos(), machine().primary_screen->hpos()); } diff --git a/src/mess/video/a7800.c b/src/mess/video/a7800.c index 2936f532eb1..6a780b79f9f 100644 --- a/src/mess/video/a7800.c +++ b/src/mess/video/a7800.c @@ -418,7 +418,7 @@ TIMER_DEVICE_CALLBACK( a7800_interrupt ) if( state->m_maria_dli ) { state->m_maria_dli = 0; - device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); + state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -481,7 +481,7 @@ WRITE8_MEMBER(a7800_state::a7800_MARIA_w) m_maria_palette[0][3] = data; break; case 0x04: - device_spin_until_trigger(machine().device("maincpu"), TRIGGER_HSYNC); + machine().device("maincpu")->execute().spin_until_trigger(TRIGGER_HSYNC); m_maria_wsync=1; break; diff --git a/src/mess/video/atarist.c b/src/mess/video/atarist.c index 5e6212ee924..b06e206b1da 100644 --- a/src/mess/video/atarist.c +++ b/src/mess/video/atarist.c @@ -235,13 +235,13 @@ void st_state::glue_tick() if ((y == m_shifter_vblank_start) && (x == 0)) { - device_set_input_line(m_maincpu, M68K_IRQ_4, HOLD_LINE); + m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE); m_shifter_ofs = m_shifter_base; } if (x == m_shifter_hblank_start) { - device_set_input_line(m_maincpu, M68K_IRQ_2, HOLD_LINE); + m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE); // m_shifter_ofs += (m_shifter_lineofs * 2); // STe } diff --git a/src/mess/video/mac.c b/src/mess/video/mac.c index 56c0ec16bcb..e8a524511d1 100644 --- a/src/mess/video/mac.c +++ b/src/mess/video/mac.c @@ -714,7 +714,7 @@ VIDEO_RESET(macdafb) READ32_MEMBER(mac_state::dafb_r) { -// if (offset != 0x108/4) printf("DAFB: Read @ %x (mask %x PC=%x)\n", offset*4, mem_mask, m_maincpu->safe_pc()); +// if (offset != 0x108/4) printf("DAFB: Read @ %x (mask %x PC=%x)\n", offset*4, mem_mask, m_maincpu->pc()); switch (offset<<2) { @@ -745,7 +745,7 @@ READ32_MEMBER(mac_state::dafb_r) WRITE32_MEMBER(mac_state::dafb_w) { -// if (offset != 0x10c/4) printf("DAFB: Write %08x @ %x (mask %x PC=%x)\n", data, offset*4, mem_mask, m_maincpu->safe_pc()); +// if (offset != 0x10c/4) printf("DAFB: Write %08x @ %x (mask %x PC=%x)\n", data, offset*4, mem_mask, m_maincpu->pc()); switch (offset<<2) { @@ -809,14 +809,14 @@ WRITE32_MEMBER(mac_state::dafb_w) READ32_MEMBER(mac_state::dafb_dac_r) { -// printf("DAFB: Read DAC @ %x (mask %x PC=%x)\n", offset*4, mem_mask, m_maincpu->safe_pc()); +// printf("DAFB: Read DAC @ %x (mask %x PC=%x)\n", offset*4, mem_mask, m_maincpu->pc()); return 0; } WRITE32_MEMBER(mac_state::dafb_dac_w) { -// if ((offset > 0) && (offset != 0x10/4)) printf("DAFB: Write %08x to DAC @ %x (mask %x PC=%x)\n", data, offset*4, mem_mask, m_maincpu->safe_pc()); +// if ((offset > 0) && (offset != 0x10/4)) printf("DAFB: Write %08x to DAC @ %x (mask %x PC=%x)\n", data, offset*4, mem_mask, m_maincpu->pc()); switch (offset<<2) { @@ -1018,7 +1018,7 @@ READ32_MEMBER(mac_state::macwd_r) break; default: -// printf("macwd_r: @ %x, mask %08x (PC=%x)\n", offset, mem_mask, m_maincpu->safe_pc()); +// printf("macwd_r: @ %x, mask %08x (PC=%x)\n", offset, mem_mask, m_maincpu->pc()); break; } return 0; @@ -1052,7 +1052,7 @@ WRITE32_MEMBER(mac_state::macwd_w) break; default: -// printf("macwd_w: %x @ %x, mask %08x (PC=%x)\n", data, offset, mem_mask, m_maincpu->safe_pc()); +// printf("macwd_w: %x @ %x, mask %08x (PC=%x)\n", data, offset, mem_mask, m_maincpu->pc()); break; } } diff --git a/src/mess/video/mos6566.c b/src/mess/video/mos6566.c index 5cff9dc3b4f..2eeadd3bcf1 100644 --- a/src/mess/video/mos6566.c +++ b/src/mess/video/mos6566.c @@ -330,7 +330,7 @@ inline void mos6566_device::vic2_suspend_cpu() m_first_ba_cycle = m_cycles_counter; if (m_in_rdy_workaround_func(0) != 7 ) { -// device_suspend(machine.firstcpu, SUSPEND_REASON_SPIN, 0); +// machine.firstcpu->suspend(SUSPEND_REASON_SPIN, 0); } m_device_suspended = 1; } @@ -341,7 +341,7 @@ inline void mos6566_device::vic2_resume_cpu() { if (m_device_suspended == 1) { - // device_resume(machine.firstcpu, SUSPEND_REASON_SPIN); + // machine.firstcpu->resume(SUSPEND_REASON_SPIN); m_device_suspended = 0; } } @@ -2025,7 +2025,7 @@ void mos6569_device::execute_run() if ((cpu_cycles == vic_cycles) && (m_rdy_cycles > 0)) { - device_spin_until_time (m_cpu, m_cpu->cycles_to_attotime(m_rdy_cycles)); + m_cpu->spin_until_time(m_cpu->cycles_to_attotime(m_rdy_cycles)); m_rdy_cycles = 0; } diff --git a/src/mess/video/v1050.c b/src/mess/video/v1050.c index 21be3cf250b..b1b8f9d1208 100644 --- a/src/mess/video/v1050.c +++ b/src/mess/video/v1050.c @@ -89,7 +89,7 @@ static MC6845_UPDATE_ROW( v1050_update_row ) WRITE_LINE_MEMBER( v1050_state::crtc_vs_w ) { - device_set_input_line(m_subcpu, INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE); + m_subcpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE); set_interrupt(INT_VSYNC, state); } diff --git a/src/mess/video/vic6567.c b/src/mess/video/vic6567.c index fde3a985888..3c4b5d7c82d 100644 --- a/src/mess/video/vic6567.c +++ b/src/mess/video/vic6567.c @@ -377,7 +377,7 @@ INLINE void vic2_suspend_cpu( running_machine &machine, vic2_state *vic2 ) vic2->first_ba_cycle = vic2->cycles_counter; if (vic2->in_rdy_workaround_func(0) != 7 ) { -// device_suspend(machine.firstcpu, SUSPEND_REASON_SPIN, 0); +// machine.firstcpu->suspend(SUSPEND_REASON_SPIN, 0); } vic2->device_suspended = 1; } @@ -388,7 +388,7 @@ INLINE void vic2_resume_cpu( running_machine &machine, vic2_state *vic2 ) { if (vic2->device_suspended == 1) { - // device_resume(machine.firstcpu, SUSPEND_REASON_SPIN); + // machine.firstcpu->resume(SUSPEND_REASON_SPIN); vic2->device_suspended = 0; } } @@ -1607,7 +1607,7 @@ if (machine.input().code_pressed_once(KEYCODE_Z)) printf("b:%02x 1:%02x 2:%02x 3 if ((cpu_cycles == vic_cycles) && (vic2->rdy_cycles > 0)) { - device_spin_until_time (machine.firstcpu, vic2->cpu->cycles_to_attotime(vic2->rdy_cycles)); + machine.firstcpu->spin_until_time(vic2->cpu->cycles_to_attotime(vic2->rdy_cycles)); vic2->rdy_cycles = 0; } diff --git a/src/mess/video/zx8301.c b/src/mess/video/zx8301.c index 0223080b802..c828c0cd12c 100644 --- a/src/mess/video/zx8301.c +++ b/src/mess/video/zx8301.c @@ -226,7 +226,7 @@ READ8_MEMBER( zx8301_device::data_r ) if (m_vda) { - device_spin_until_time(m_cpu, m_screen->time_until_pos(256, 0)); + m_cpu->spin_until_time(m_screen->time_until_pos(256, 0)); } return readbyte(offset); @@ -243,7 +243,7 @@ WRITE8_MEMBER( zx8301_device::data_w ) if (m_vda) { - device_spin_until_time(m_cpu, m_screen->time_until_pos(256, 0)); + m_cpu->spin_until_time(m_screen->time_until_pos(256, 0)); } writebyte(offset, data); -- cgit v1.2.3