From 3ac43e0187323c2b55dc00c79c31bdd2d50d9b20 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 18 Sep 2012 14:10:42 +0000 Subject: INTERRUPT_GEN -> INTERRUPT_GEN_MEMBER (no whatsnew) --- src/emu/devcpu.h | 2 + src/mame/audio/aztarac.c | 9 +- src/mame/audio/cyberbal.c | 9 +- src/mame/audio/dkong.c | 4 +- src/mame/audio/redalert.c | 4 +- src/mame/drivers/1942.c | 2 +- src/mame/drivers/1943.c | 4 +- src/mame/drivers/1945kiii.c | 2 +- src/mame/drivers/20pacgal.c | 9 +- src/mame/drivers/2mindril.c | 14 +-- src/mame/drivers/39in1.c | 5 +- src/mame/drivers/40love.c | 8 +- src/mame/drivers/4enraya.c | 2 +- src/mame/drivers/4roses.c | 2 +- src/mame/drivers/5clown.c | 2 +- src/mame/drivers/8080bw.c | 17 ++-- src/mame/drivers/88games.c | 7 +- src/mame/drivers/acefruit.c | 10 +-- src/mame/drivers/actfancr.c | 4 +- src/mame/drivers/adp.c | 9 +- src/mame/drivers/aeroboto.c | 13 ++- src/mame/drivers/aerofgt.c | 24 ++--- src/mame/drivers/airbustr.c | 8 +- src/mame/drivers/ajax.c | 2 +- src/mame/drivers/albazc.c | 2 +- src/mame/drivers/albazg.c | 2 +- src/mame/drivers/aliens.c | 9 +- src/mame/drivers/alpha68k.c | 55 ++++++------ src/mame/drivers/amaticmg.c | 12 +-- src/mame/drivers/ambush.c | 2 +- src/mame/drivers/ampoker2.c | 2 +- src/mame/drivers/amspdwy.c | 2 +- src/mame/drivers/angelkds.c | 2 +- src/mame/drivers/appoooh.c | 9 +- src/mame/drivers/aquarium.c | 2 +- src/mame/drivers/arabian.c | 2 +- src/mame/drivers/aristmk4.c | 4 +- src/mame/drivers/arkanoid.c | 6 +- src/mame/drivers/armedf.c | 32 +++---- src/mame/drivers/ashnojoe.c | 2 +- src/mame/drivers/asterix.c | 9 +- src/mame/drivers/asteroid.c | 6 +- src/mame/drivers/astinvad.c | 2 +- src/mame/drivers/astrocorp.c | 2 +- src/mame/drivers/asuka.c | 18 ++-- src/mame/drivers/atarifb.c | 2 +- src/mame/drivers/atarisy2.c | 9 +- src/mame/drivers/atarisy4.c | 7 +- src/mame/drivers/atronic.c | 2 +- src/mame/drivers/attckufo.c | 8 +- src/mame/drivers/avalnche.c | 2 +- src/mame/drivers/avt.c | 8 +- src/mame/drivers/aztarac.c | 4 +- src/mame/drivers/backfire.c | 7 +- src/mame/drivers/badlands.c | 15 ++-- src/mame/drivers/bagman.c | 13 ++- src/mame/drivers/balsente.c | 2 +- src/mame/drivers/bankp.c | 9 +- src/mame/drivers/baraduke.c | 4 +- src/mame/drivers/battlane.c | 11 ++- src/mame/drivers/battlex.c | 9 +- src/mame/drivers/battlnts.c | 9 +- src/mame/drivers/bbusters.c | 4 +- src/mame/drivers/bestleag.c | 2 +- src/mame/drivers/bfcobra.c | 17 ++-- src/mame/drivers/bfm_sc1.c | 14 +-- src/mame/drivers/bfm_sc2.c | 20 ++--- src/mame/drivers/bfm_sc5.c | 7 +- src/mame/drivers/bfmsys85.c | 12 +-- src/mame/drivers/bigevglf.c | 6 +- src/mame/drivers/bigstrkb.c | 2 +- src/mame/drivers/bingoc.c | 4 +- src/mame/drivers/bingor.c | 18 ++-- src/mame/drivers/bionicc.c | 2 +- src/mame/drivers/bking.c | 4 +- src/mame/drivers/blackt96.c | 2 +- src/mame/drivers/blitz.c | 2 +- src/mame/drivers/blitz68k.c | 14 +-- src/mame/drivers/blktiger.c | 4 +- src/mame/drivers/blmbycar.c | 4 +- src/mame/drivers/blockade.c | 13 ++- src/mame/drivers/blockhl.c | 9 +- src/mame/drivers/bloodbro.c | 6 +- src/mame/drivers/blueprnt.c | 4 +- src/mame/drivers/bmcbowl.c | 2 +- src/mame/drivers/bmcpokr.c | 2 +- src/mame/drivers/bogeyman.c | 2 +- src/mame/drivers/bombjack.c | 11 ++- src/mame/drivers/boogwing.c | 2 +- src/mame/drivers/bottom9.c | 18 ++-- src/mame/drivers/brkthru.c | 11 ++- src/mame/drivers/btoads.c | 2 +- src/mame/drivers/bublbobl.c | 12 +-- src/mame/drivers/buggychl.c | 4 +- src/mame/drivers/buster.c | 2 +- src/mame/drivers/bwidow.c | 2 +- src/mame/drivers/bwing.c | 9 +- src/mame/drivers/bzone.c | 10 +-- src/mame/drivers/cabal.c | 8 +- src/mame/drivers/cabaret.c | 10 +-- src/mame/drivers/calomega.c | 2 +- src/mame/drivers/calorie.c | 4 +- src/mame/drivers/canyon.c | 2 +- src/mame/drivers/capbowl.c | 8 +- src/mame/drivers/cardline.c | 2 +- src/mame/drivers/carjmbre.c | 11 ++- src/mame/drivers/carpolo.c | 2 +- src/mame/drivers/carrera.c | 2 +- src/mame/drivers/caswin.c | 2 +- src/mame/drivers/cave.c | 35 ++++---- src/mame/drivers/cb2001.c | 7 +- src/mame/drivers/cbasebal.c | 2 +- src/mame/drivers/cbuster.c | 2 +- src/mame/drivers/cchance.c | 2 +- src/mame/drivers/cclimber.c | 13 ++- src/mame/drivers/cesclass.c | 4 +- src/mame/drivers/chaknpop.c | 2 +- src/mame/drivers/champbas.c | 17 ++-- src/mame/drivers/champbwl.c | 4 +- src/mame/drivers/chance32.c | 2 +- src/mame/drivers/changela.c | 7 +- src/mame/drivers/cheekyms.c | 9 +- src/mame/drivers/chinsan.c | 2 +- src/mame/drivers/chsuper.c | 2 +- src/mame/drivers/circusc.c | 9 +- src/mame/drivers/cischeat.c | 6 +- src/mame/drivers/citycon.c | 4 +- src/mame/drivers/clayshoo.c | 2 +- src/mame/drivers/cloak.c | 4 +- src/mame/drivers/clshroad.c | 8 +- src/mame/drivers/cmmb.c | 11 +-- src/mame/drivers/cninja.c | 12 +-- src/mame/drivers/cntsteer.c | 20 ++--- src/mame/drivers/cobra.c | 12 +-- src/mame/drivers/coinmstr.c | 2 +- src/mame/drivers/coinmvga.c | 7 +- src/mame/drivers/combatsc.c | 6 +- src/mame/drivers/commando.c | 8 +- src/mame/drivers/compgolf.c | 2 +- src/mame/drivers/contra.c | 11 ++- src/mame/drivers/coolridr.c | 7 +- src/mame/drivers/cop01.c | 4 +- src/mame/drivers/corona.c | 16 ++-- src/mame/drivers/cps1.c | 20 ++--- src/mame/drivers/cps3.c | 12 +-- src/mame/drivers/crbaloon.c | 9 +- src/mame/drivers/crgolf.c | 4 +- src/mame/drivers/crimfght.c | 9 +- src/mame/drivers/crospang.c | 2 +- src/mame/drivers/crshrace.c | 2 +- src/mame/drivers/crystal.c | 7 +- src/mame/drivers/cubeqst.c | 12 +-- src/mame/drivers/cultures.c | 10 +-- src/mame/drivers/cvs.c | 10 +-- src/mame/drivers/cyberbal.c | 2 +- src/mame/drivers/cybertnk.c | 4 +- src/mame/drivers/cyclemb.c | 2 +- src/mame/drivers/d9final.c | 2 +- src/mame/drivers/dacholer.c | 12 +-- src/mame/drivers/dai3wksi.c | 2 +- src/mame/drivers/darius.c | 4 +- src/mame/drivers/darkseal.c | 2 +- src/mame/drivers/dassault.c | 4 +- src/mame/drivers/dblewing.c | 2 +- src/mame/drivers/dcheese.c | 8 +- src/mame/drivers/dcon.c | 4 +- src/mame/drivers/ddayjlc.c | 20 ++--- src/mame/drivers/ddealer.c | 9 +- src/mame/drivers/ddribble.c | 18 ++-- src/mame/drivers/ddz.c | 5 +- src/mame/drivers/dec0.c | 20 ++--- src/mame/drivers/dec8.c | 32 ++++--- src/mame/drivers/deco156.c | 9 +- src/mame/drivers/deco32.c | 16 ++-- src/mame/drivers/deco_ld.c | 10 +-- src/mame/drivers/deniam.c | 4 +- src/mame/drivers/deshoros.c | 2 +- src/mame/drivers/destroyr.c | 2 +- src/mame/drivers/dietgo.c | 2 +- src/mame/drivers/discoboy.c | 4 +- src/mame/drivers/diverboy.c | 2 +- src/mame/drivers/djboy.c | 4 +- src/mame/drivers/djmain.c | 13 ++- src/mame/drivers/dkong.c | 17 ++-- src/mame/drivers/dlair.c | 13 +-- src/mame/drivers/dmndrby.c | 14 +-- src/mame/drivers/docastle.c | 6 +- src/mame/drivers/dogfgt.c | 2 +- src/mame/drivers/dominob.c | 2 +- src/mame/drivers/dooyong.c | 12 +-- src/mame/drivers/dorachan.c | 2 +- src/mame/drivers/dotrikun.c | 2 +- src/mame/drivers/dragrace.c | 2 +- src/mame/drivers/dreamwld.c | 4 +- src/mame/drivers/drgnmst.c | 2 +- src/mame/drivers/dribling.c | 9 +- src/mame/drivers/drmicro.c | 9 +- src/mame/drivers/drtomy.c | 2 +- src/mame/drivers/drw80pkr.c | 2 +- src/mame/drivers/dunhuang.c | 2 +- src/mame/drivers/dynax.c | 65 +++++++------- src/mame/drivers/dynduke.c | 8 +- src/mame/drivers/egghunt.c | 2 +- src/mame/drivers/enigma2.c | 4 +- src/mame/drivers/epos.c | 4 +- src/mame/drivers/ertictac.c | 7 +- src/mame/drivers/esd16.c | 4 +- src/mame/drivers/esh.c | 9 +- src/mame/drivers/espial.c | 7 +- src/mame/drivers/esripsys.c | 2 +- src/mame/drivers/ettrivia.c | 11 +-- src/mame/drivers/exedexes.c | 2 +- src/mame/drivers/exidy.c | 4 +- src/mame/drivers/exidy440.c | 2 +- src/mame/drivers/exprraid.c | 17 ++-- src/mame/drivers/exzisus.c | 6 +- src/mame/drivers/f-32.c | 2 +- src/mame/drivers/f1gp.c | 8 +- src/mame/drivers/fantland.c | 21 +++-- src/mame/drivers/fastfred.c | 18 ++-- src/mame/drivers/fcrash.c | 6 +- src/mame/drivers/feversoc.c | 7 +- src/mame/drivers/firebeat.c | 9 +- src/mame/drivers/firetrap.c | 11 ++- src/mame/drivers/firetrk.c | 9 +- src/mame/drivers/fitfight.c | 10 +-- src/mame/drivers/flipjack.c | 4 +- src/mame/drivers/flkatck.c | 9 +- src/mame/drivers/flower.c | 6 +- src/mame/drivers/flstory.c | 16 ++-- src/mame/drivers/flyball.c | 2 +- src/mame/drivers/fortecar.c | 2 +- src/mame/drivers/freekick.c | 11 ++- src/mame/drivers/fromanc2.c | 10 +-- src/mame/drivers/fromance.c | 6 +- src/mame/drivers/funkybee.c | 2 +- src/mame/drivers/funkyjet.c | 2 +- src/mame/drivers/funworld.c | 18 ++-- src/mame/drivers/funybubl.c | 2 +- src/mame/drivers/gaelco.c | 8 +- src/mame/drivers/gaelco2.c | 10 +-- src/mame/drivers/gaelco3d.c | 10 +-- src/mame/drivers/gaiden.c | 6 +- src/mame/drivers/gal3.c | 6 +- src/mame/drivers/galaga.c | 32 ++++--- src/mame/drivers/galastrm.c | 9 +- src/mame/drivers/galaxi.c | 2 +- src/mame/drivers/galaxia.c | 10 +-- src/mame/drivers/galaxian.c | 26 +++--- src/mame/drivers/galaxold.c | 17 ++-- src/mame/drivers/galgame.c | 12 +-- src/mame/drivers/galivan.c | 8 +- src/mame/drivers/galspnbl.c | 2 +- src/mame/drivers/gamtor.c | 2 +- src/mame/drivers/gaplus.c | 35 ++++---- src/mame/drivers/gatron.c | 2 +- src/mame/drivers/gberet.c | 4 +- src/mame/drivers/gbusters.c | 9 +- src/mame/drivers/gcpinbal.c | 10 +-- src/mame/drivers/gei.c | 10 +-- src/mame/drivers/gijoe.c | 17 ++-- src/mame/drivers/ginganin.c | 2 +- src/mame/drivers/gladiatr.c | 6 +- src/mame/drivers/glass.c | 11 ++- src/mame/drivers/gng.c | 4 +- src/mame/drivers/go2000.c | 2 +- src/mame/drivers/goal92.c | 2 +- src/mame/drivers/goindol.c | 4 +- src/mame/drivers/goldngam.c | 2 +- src/mame/drivers/goldnpkr.c | 2 +- src/mame/drivers/goldstar.c | 53 ++++++------ src/mame/drivers/gomoku.c | 2 +- src/mame/drivers/good.c | 2 +- src/mame/drivers/goodejan.c | 7 +- src/mame/drivers/gotcha.c | 4 +- src/mame/drivers/gottlieb.c | 17 ++-- src/mame/drivers/gotya.c | 2 +- src/mame/drivers/gpworld.c | 18 ++-- src/mame/drivers/gradius3.c | 9 +- src/mame/drivers/grchamp.c | 20 ++--- src/mame/drivers/groundfx.c | 9 +- src/mame/drivers/gstream.c | 2 +- src/mame/drivers/gstriker.c | 4 +- src/mame/drivers/gsword.c | 15 ++-- src/mame/drivers/gticlub.c | 7 +- src/mame/drivers/gumbo.c | 2 +- src/mame/drivers/gunbustr.c | 8 +- src/mame/drivers/gunpey.c | 7 +- src/mame/drivers/gunsmoke.c | 4 +- src/mame/drivers/gyruss.c | 18 ++-- src/mame/drivers/halleys.c | 2 +- src/mame/drivers/hanaawas.c | 2 +- src/mame/drivers/harddriv.c | 2 +- src/mame/drivers/hcastle.c | 2 +- src/mame/drivers/highvdeo.c | 11 +-- src/mame/drivers/himesiki.c | 2 +- src/mame/drivers/hitpoker.c | 7 +- src/mame/drivers/hnayayoi.c | 4 +- src/mame/drivers/holeland.c | 4 +- src/mame/drivers/homedata.c | 21 +++-- src/mame/drivers/homerun.c | 4 +- src/mame/drivers/hornet.c | 2 +- src/mame/drivers/hotblock.c | 7 +- src/mame/drivers/hotstuff.c | 2 +- src/mame/drivers/hvyunit.c | 4 +- src/mame/drivers/hyperspt.c | 9 +- src/mame/drivers/igs009.c | 10 +-- src/mame/drivers/igs011.c | 22 ++--- src/mame/drivers/igs_m027.c | 7 +- src/mame/drivers/ikki.c | 2 +- src/mame/drivers/imolagp.c | 14 +-- src/mame/drivers/intrscti.c | 2 +- src/mame/drivers/inufuku.c | 2 +- src/mame/drivers/invqix.c | 4 +- src/mame/drivers/istellar.c | 9 +- src/mame/drivers/itech32.c | 12 +-- src/mame/drivers/itech8.c | 14 +-- src/mame/drivers/jack.c | 16 ++-- src/mame/drivers/jackal.c | 11 ++- src/mame/drivers/jackpool.c | 7 +- src/mame/drivers/jailbrek.c | 18 ++-- src/mame/drivers/jalmah.c | 2 +- src/mame/drivers/jangou.c | 2 +- src/mame/drivers/jantotsu.c | 2 +- src/mame/drivers/jclub2.c | 2 +- src/mame/drivers/jokrwild.c | 2 +- src/mame/drivers/jollyjgr.c | 10 +-- src/mame/drivers/jongkyo.c | 2 +- src/mame/drivers/jrpacman.c | 10 +-- src/mame/drivers/jubilee.c | 7 +- src/mame/drivers/junofrst.c | 12 +-- src/mame/drivers/kangaroo.c | 4 +- src/mame/drivers/karnov.c | 29 +++---- src/mame/drivers/kchamp.c | 20 ++--- src/mame/drivers/kickgoal.c | 197 +++++++++++++++++++++--------------------- src/mame/drivers/kingdrby.c | 6 +- src/mame/drivers/kingobox.c | 23 +++-- src/mame/drivers/kingpin.c | 2 +- src/mame/drivers/kinst.c | 9 +- src/mame/drivers/kncljoe.c | 8 +- src/mame/drivers/koikoi.c | 2 +- src/mame/drivers/konamigq.c | 2 +- src/mame/drivers/konamigx.c | 16 ++-- src/mame/drivers/konamim2.c | 16 ++-- src/mame/drivers/kontest.c | 11 +-- src/mame/drivers/kopunch.c | 8 +- src/mame/drivers/ksayakyu.c | 4 +- src/mame/drivers/kungfur.c | 10 +-- src/mame/drivers/kyugo.c | 11 ++- src/mame/drivers/labyrunr.c | 22 +++-- src/mame/drivers/ladybug.c | 4 +- src/mame/drivers/ladyfrog.c | 4 +- src/mame/drivers/laserbas.c | 2 +- src/mame/drivers/laserbat.c | 17 ++-- src/mame/drivers/lasso.c | 4 +- src/mame/drivers/lastbank.c | 2 +- src/mame/drivers/lastduel.c | 4 +- src/mame/drivers/lastfght.c | 10 +-- src/mame/drivers/legionna.c | 14 +-- src/mame/drivers/leland.c | 2 +- src/mame/drivers/lemmings.c | 2 +- src/mame/drivers/lethal.c | 9 +- src/mame/drivers/lgp.c | 12 +-- src/mame/drivers/liberate.c | 27 +++--- src/mame/drivers/limenko.c | 4 +- src/mame/drivers/lkage.c | 4 +- src/mame/drivers/looping.c | 7 +- src/mame/drivers/lordgun.c | 4 +- src/mame/drivers/lsasquad.c | 4 +- src/mame/drivers/ltcasino.c | 2 +- src/mame/drivers/luckgrln.c | 10 +-- src/mame/drivers/lucky74.c | 9 +- src/mame/drivers/lvcards.c | 2 +- src/mame/drivers/lwings.c | 22 +++-- src/mame/drivers/m10.c | 22 ++--- src/mame/drivers/m14.c | 9 +- src/mame/drivers/m52.c | 2 +- src/mame/drivers/m57.c | 2 +- src/mame/drivers/m58.c | 2 +- src/mame/drivers/m62.c | 2 +- src/mame/drivers/m63.c | 24 ++--- src/mame/drivers/m72.c | 44 +++++----- src/mame/drivers/m79amb.c | 7 +- src/mame/drivers/m90.c | 44 +++++----- src/mame/drivers/macrossp.c | 2 +- src/mame/drivers/macs.c | 2 +- src/mame/drivers/madalien.c | 2 +- src/mame/drivers/madmotor.c | 2 +- src/mame/drivers/magic10.c | 4 +- src/mame/drivers/magicard.c | 13 +-- src/mame/drivers/magicfly.c | 2 +- src/mame/drivers/magmax.c | 2 +- src/mame/drivers/mainevt.c | 32 +++---- src/mame/drivers/mainsnk.c | 4 +- src/mame/drivers/majorpkr.c | 2 +- src/mame/drivers/mappy.c | 98 ++++++++++----------- src/mame/drivers/marineb.c | 18 ++-- src/mame/drivers/marinedt.c | 2 +- src/mame/drivers/mario.c | 9 +- src/mame/drivers/markham.c | 4 +- src/mame/drivers/mastboy.c | 10 +-- src/mame/drivers/matmania.c | 6 +- src/mame/drivers/maygayv1.c | 10 +-- src/mame/drivers/mayumi.c | 10 +-- src/mame/drivers/mazerbla.c | 13 +-- src/mame/drivers/mcatadv.c | 2 +- src/mame/drivers/mcr68.c | 4 +- src/mame/drivers/meadows.c | 31 +++---- src/mame/drivers/megasys1.c | 6 +- src/mame/drivers/megazone.c | 11 ++- src/mame/drivers/meijinsn.c | 2 +- src/mame/drivers/mermaid.c | 9 +- src/mame/drivers/metro.c | 118 ++++++++++++------------- src/mame/drivers/mexico86.c | 8 +- src/mame/drivers/micro3d.c | 2 +- src/mame/drivers/midas.c | 4 +- src/mame/drivers/midzeus.c | 10 +-- src/mame/drivers/mikie.c | 9 +- src/mame/drivers/mil4000.c | 2 +- src/mame/drivers/miniboy7.c | 2 +- src/mame/drivers/minivadr.c | 2 +- src/mame/drivers/mirage.c | 2 +- src/mame/drivers/mirax.c | 12 +-- src/mame/drivers/missb2.c | 13 +-- src/mame/drivers/mitchell.c | 8 +- src/mame/drivers/mjkjidai.c | 9 +- src/mame/drivers/mjsister.c | 2 +- src/mame/drivers/mlanding.c | 6 +- src/mame/drivers/model2.c | 2 +- src/mame/drivers/mogura.c | 2 +- src/mame/drivers/mole.c | 2 +- src/mame/drivers/momoko.c | 2 +- src/mame/drivers/monzagp.c | 2 +- src/mame/drivers/moo.c | 26 +++--- src/mame/drivers/mosaic.c | 2 +- src/mame/drivers/mouser.c | 16 ++-- src/mame/drivers/mpoker.c | 2 +- src/mame/drivers/mpu4plasma.c | 2 +- src/mame/drivers/mrdo.c | 2 +- src/mame/drivers/mrflea.c | 2 +- src/mame/drivers/mrjong.c | 2 +- src/mame/drivers/msisaac.c | 4 +- src/mame/drivers/mugsmash.c | 2 +- src/mame/drivers/multfish.c | 2 +- src/mame/drivers/munchmo.c | 18 ++-- src/mame/drivers/murogem.c | 2 +- src/mame/drivers/mustache.c | 9 +- src/mame/drivers/mw18w.c | 2 +- src/mame/drivers/mwarr.c | 2 +- src/mame/drivers/mystwarr.c | 10 +-- src/mame/drivers/namconb1.c | 30 +++---- src/mame/drivers/namcond1.c | 11 ++- src/mame/drivers/namcos1.c | 8 +- src/mame/drivers/namcos2.c | 60 ++++++------- src/mame/drivers/namcos21.c | 32 +++---- src/mame/drivers/namcos22.c | 28 +++--- src/mame/drivers/namcos23.c | 24 ++--- src/mame/drivers/namcos86.c | 6 +- src/mame/drivers/nbmj9195.c | 6 +- src/mame/drivers/nemesis.c | 30 +++---- src/mame/drivers/neoprint.c | 8 +- src/mame/drivers/neptunp2.c | 2 +- src/mame/drivers/news.c | 2 +- src/mame/drivers/nightgal.c | 8 +- src/mame/drivers/ninjakd2.c | 6 +- src/mame/drivers/ninjaw.c | 8 +- src/mame/drivers/nitedrvr.c | 2 +- src/mame/drivers/niyanpai.c | 6 +- src/mame/drivers/nmg5.c | 2 +- src/mame/drivers/nmk16.c | 64 +++++++------- src/mame/drivers/norautp.c | 16 ++-- src/mame/drivers/nova2001.c | 12 +-- src/mame/drivers/nsmpoker.c | 7 +- src/mame/drivers/nss.c | 11 ++- src/mame/drivers/nycaptor.c | 18 ++-- src/mame/drivers/nyny.c | 12 +-- src/mame/drivers/ohmygod.c | 2 +- src/mame/drivers/ojankohs.c | 8 +- src/mame/drivers/olibochu.c | 2 +- src/mame/drivers/omegrace.c | 4 +- src/mame/drivers/oneshot.c | 2 +- src/mame/drivers/onetwo.c | 2 +- src/mame/drivers/opwolf.c | 6 +- src/mame/drivers/orbit.c | 8 +- src/mame/drivers/othello.c | 2 +- src/mame/drivers/othldrby.c | 2 +- src/mame/drivers/othunder.c | 9 +- src/mame/drivers/overdriv.c | 9 +- src/mame/drivers/pachifev.c | 22 ++--- src/mame/drivers/pacland.c | 18 ++-- src/mame/drivers/pacman.c | 32 ++++--- src/mame/drivers/pandoras.c | 18 ++-- src/mame/drivers/paradise.c | 11 ++- src/mame/drivers/parodius.c | 9 +- src/mame/drivers/pasha2.c | 2 +- src/mame/drivers/pass.c | 4 +- src/mame/drivers/pastelg.c | 4 +- src/mame/drivers/pbaction.c | 15 ++-- src/mame/drivers/pcktgal.c | 2 +- src/mame/drivers/pengo.c | 10 +-- src/mame/drivers/peyper.c | 2 +- src/mame/drivers/pgm.c | 2 +- src/mame/drivers/photon.c | 7 +- src/mame/drivers/pinkiri8.c | 2 +- src/mame/drivers/pipeline.c | 2 +- src/mame/drivers/pirates.c | 2 +- src/mame/drivers/pitnrun.c | 9 +- src/mame/drivers/pkscram.c | 2 +- src/mame/drivers/pktgaldx.c | 4 +- src/mame/drivers/playch10.c | 13 ++- src/mame/drivers/playmark.c | 12 +-- src/mame/drivers/plygonet.c | 12 +-- src/mame/drivers/pokechmp.c | 4 +- src/mame/drivers/poker72.c | 2 +- src/mame/drivers/policetr.c | 8 +- src/mame/drivers/polyplay.c | 21 +++-- src/mame/drivers/poo.c | 6 +- src/mame/drivers/poolshrk.c | 2 +- src/mame/drivers/pooyan.c | 9 +- src/mame/drivers/popeye.c | 8 +- src/mame/drivers/popobear.c | 4 +- src/mame/drivers/popper.c | 11 ++- src/mame/drivers/portrait.c | 2 +- src/mame/drivers/powerins.c | 4 +- src/mame/drivers/ppmast93.c | 4 +- src/mame/drivers/prehisle.c | 2 +- src/mame/drivers/progolf.c | 5 +- src/mame/drivers/psattack.c | 5 +- src/mame/drivers/psikyo.c | 8 +- src/mame/drivers/psikyo4.c | 6 +- src/mame/drivers/psikyosh.c | 6 +- src/mame/drivers/pturn.c | 20 ++--- src/mame/drivers/punchout.c | 11 ++- src/mame/drivers/pushman.c | 4 +- src/mame/drivers/pzletime.c | 2 +- src/mame/drivers/qdrmfgp.c | 9 +- src/mame/drivers/quantum.c | 2 +- src/mame/drivers/quasar.c | 6 +- src/mame/drivers/quizdna.c | 2 +- src/mame/drivers/quizo.c | 2 +- src/mame/drivers/quizpani.c | 4 +- src/mame/drivers/quizpun2.c | 4 +- src/mame/drivers/r2dx_v33.c | 9 +- src/mame/drivers/rabbit.c | 8 +- src/mame/drivers/raiden.c | 8 +- src/mame/drivers/raiden2.c | 8 +- src/mame/drivers/rainbow.c | 4 +- src/mame/drivers/rallyx.c | 18 ++-- src/mame/drivers/rastan.c | 2 +- src/mame/drivers/rbmk.c | 9 +- src/mame/drivers/rcorsair.c | 2 +- src/mame/drivers/realbrk.c | 6 +- src/mame/drivers/redalert.c | 16 ++-- src/mame/drivers/retofinv.c | 20 ++--- src/mame/drivers/rgum.c | 2 +- src/mame/drivers/rltennis.c | 11 ++- src/mame/drivers/rmhaihai.c | 2 +- src/mame/drivers/rockrage.c | 9 +- src/mame/drivers/rocnrope.c | 9 +- src/mame/drivers/rohga.c | 8 +- src/mame/drivers/rollerg.c | 2 +- src/mame/drivers/rollrace.c | 18 ++-- src/mame/drivers/roul.c | 2 +- src/mame/drivers/route16.c | 4 +- src/mame/drivers/royalmah.c | 32 +++---- src/mame/drivers/rungun.c | 18 ++-- src/mame/drivers/sandscrp.c | 10 +-- src/mame/drivers/sauro.c | 8 +- src/mame/drivers/sbasketb.c | 9 +- src/mame/drivers/scotrsht.c | 9 +- src/mame/drivers/scramble.c | 2 +- src/mame/drivers/sderby.c | 8 +- src/mame/drivers/segag80r.c | 6 +- src/mame/drivers/segag80v.c | 2 +- src/mame/drivers/segajw.c | 2 +- src/mame/drivers/segald.c | 2 +- src/mame/drivers/segas32.c | 17 ++-- src/mame/drivers/seibuspi.c | 10 +-- src/mame/drivers/seicross.c | 9 +- src/mame/drivers/sengokmj.c | 7 +- src/mame/drivers/senjyo.c | 9 +- src/mame/drivers/seta.c | 42 ++++----- src/mame/drivers/seta2.c | 41 +++++---- src/mame/drivers/sf.c | 6 +- src/mame/drivers/sfbonus.c | 4 +- src/mame/drivers/shangha3.c | 6 +- src/mame/drivers/shanghai.c | 11 +-- src/mame/drivers/shangkid.c | 6 +- src/mame/drivers/shisen.c | 4 +- src/mame/drivers/shougi.c | 12 +-- src/mame/drivers/sidearms.c | 8 +- src/mame/drivers/sidepckt.c | 2 +- src/mame/drivers/sigmab52.c | 9 +- src/mame/drivers/sigmab98.c | 7 +- src/mame/drivers/silkroad.c | 2 +- src/mame/drivers/silvmil.c | 2 +- src/mame/drivers/simpl156.c | 6 +- src/mame/drivers/simpsons.c | 15 ++-- src/mame/drivers/skimaxx.c | 2 +- src/mame/drivers/skyarmy.c | 10 +-- src/mame/drivers/skydiver.c | 21 +++-- src/mame/drivers/skyfox.c | 7 +- src/mame/drivers/skykid.c | 18 ++-- src/mame/drivers/skylncr.c | 8 +- src/mame/drivers/skyraid.c | 2 +- src/mame/drivers/slapfght.c | 23 +++-- src/mame/drivers/slapshot.c | 10 +-- src/mame/drivers/sliver.c | 2 +- src/mame/drivers/snk.c | 30 +++---- src/mame/drivers/snk6502.c | 15 ++-- src/mame/drivers/snk68.c | 2 +- src/mame/drivers/snookr10.c | 2 +- src/mame/drivers/snowbros.c | 2 +- src/mame/drivers/solomon.c | 11 ++- src/mame/drivers/sonson.c | 4 +- src/mame/drivers/spaceg.c | 2 +- src/mame/drivers/spbactn.c | 2 +- src/mame/drivers/spcforce.c | 9 +- src/mame/drivers/speedatk.c | 2 +- src/mame/drivers/speedbal.c | 4 +- src/mame/drivers/speedspn.c | 2 +- src/mame/drivers/speglsht.c | 4 +- src/mame/drivers/spiders.c | 12 +-- src/mame/drivers/splash.c | 17 ++-- src/mame/drivers/spoker.c | 12 +-- src/mame/drivers/spool99.c | 2 +- src/mame/drivers/sprcros2.c | 9 +- src/mame/drivers/sprint2.c | 40 ++++----- src/mame/drivers/spy.c | 9 +- src/mame/drivers/srmp2.c | 10 +-- src/mame/drivers/srmp5.c | 4 +- src/mame/drivers/srmp6.c | 2 +- src/mame/drivers/srumbler.c | 2 +- src/mame/drivers/ssfindo.c | 12 +-- src/mame/drivers/sshangha.c | 2 +- src/mame/drivers/ssingles.c | 7 +- src/mame/drivers/sslam.c | 4 +- src/mame/drivers/ssozumo.c | 11 ++- src/mame/drivers/sspeedr.c | 2 +- src/mame/drivers/ssrj.c | 2 +- src/mame/drivers/sstrangr.c | 2 +- src/mame/drivers/stactics.c | 9 +- src/mame/drivers/stadhero.c | 2 +- src/mame/drivers/starcrus.c | 2 +- src/mame/drivers/starfire.c | 2 +- src/mame/drivers/starshp1.c | 8 +- src/mame/drivers/starwars.c | 2 +- src/mame/drivers/statriv2.c | 16 ++-- src/mame/drivers/stfight.c | 4 +- src/mame/drivers/stlforce.c | 2 +- src/mame/drivers/strnskil.c | 2 +- src/mame/drivers/sub.c | 12 +-- src/mame/drivers/subs.c | 2 +- src/mame/drivers/subsino2.c | 14 +-- src/mame/drivers/summit.c | 2 +- src/mame/drivers/suna16.c | 4 +- src/mame/drivers/suna8.c | 14 +-- src/mame/drivers/supbtime.c | 4 +- src/mame/drivers/supdrapo.c | 2 +- src/mame/drivers/superchs.c | 4 +- src/mame/drivers/superdq.c | 12 +-- src/mame/drivers/superqix.c | 22 +++-- src/mame/drivers/supertnk.c | 7 +- src/mame/drivers/superwng.c | 18 ++-- src/mame/drivers/suprgolf.c | 2 +- src/mame/drivers/suprloco.c | 4 +- src/mame/drivers/suprridr.c | 9 +- src/mame/drivers/suprslam.c | 2 +- src/mame/drivers/surpratk.c | 9 +- src/mame/drivers/system1.c | 12 +-- src/mame/drivers/system16.c | 10 +-- src/mame/drivers/tagteam.c | 11 ++- src/mame/drivers/tail2nos.c | 2 +- src/mame/drivers/taito_b.c | 104 +++++++++++----------- src/mame/drivers/taito_f2.c | 12 +-- src/mame/drivers/taito_f3.c | 10 +-- src/mame/drivers/taito_h.c | 6 +- src/mame/drivers/taito_l.c | 8 +- src/mame/drivers/taito_x.c | 8 +- src/mame/drivers/taito_z.c | 51 ++++++----- src/mame/drivers/taitoair.c | 2 +- src/mame/drivers/taitojc.c | 6 +- src/mame/drivers/taitosj.c | 4 +- src/mame/drivers/taitotz.c | 7 +- src/mame/drivers/tankbatt.c | 7 +- src/mame/drivers/tankbust.c | 9 +- src/mame/drivers/taotaido.c | 2 +- src/mame/drivers/tapatune.c | 2 +- src/mame/drivers/tasman.c | 2 +- src/mame/drivers/tatsumi.c | 20 ++--- src/mame/drivers/tattack.c | 2 +- src/mame/drivers/taxidriv.c | 6 +- src/mame/drivers/tbowl.c | 4 +- src/mame/drivers/tceptor.c | 31 +++---- src/mame/drivers/techno.c | 15 ++-- src/mame/drivers/tecmo.c | 4 +- src/mame/drivers/tecmo16.c | 2 +- src/mame/drivers/tecmosys.c | 2 +- src/mame/drivers/tehkanwc.c | 6 +- src/mame/drivers/tempest.c | 2 +- src/mame/drivers/terracre.c | 12 +-- src/mame/drivers/tetrisp2.c | 16 ++-- src/mame/drivers/tgtpanic.c | 2 +- src/mame/drivers/thedeep.c | 7 +- src/mame/drivers/thepit.c | 11 ++- src/mame/drivers/thief.c | 14 +-- src/mame/drivers/thoop2.c | 2 +- src/mame/drivers/thunderx.c | 11 ++- src/mame/drivers/tiamc1.c | 2 +- src/mame/drivers/tigeroad.c | 4 +- src/mame/drivers/timelimt.c | 11 ++- src/mame/drivers/timeplt.c | 11 ++- src/mame/drivers/timetrv.c | 14 +-- src/mame/drivers/tmnt.c | 48 +++++----- src/mame/drivers/tmspoker.c | 7 +- src/mame/drivers/tnzs.c | 28 +++--- src/mame/drivers/toaplan1.c | 16 ++-- src/mame/drivers/toaplan2.c | 48 +++++----- src/mame/drivers/toki.c | 4 +- src/mame/drivers/tomcat.c | 4 +- src/mame/drivers/topspeed.c | 16 ++-- src/mame/drivers/toratora.c | 22 ++--- src/mame/drivers/toypop.c | 39 ++++----- src/mame/drivers/tp84.c | 11 ++- src/mame/drivers/trackfld.c | 31 +++---- src/mame/drivers/travrusa.c | 2 +- src/mame/drivers/triplhnt.c | 2 +- src/mame/drivers/truco.c | 15 ++-- src/mame/drivers/trucocl.c | 9 +- src/mame/drivers/trvmadns.c | 2 +- src/mame/drivers/trvquest.c | 9 +- src/mame/drivers/tryout.c | 2 +- src/mame/drivers/tsamurai.c | 20 ++--- src/mame/drivers/ttchamp.c | 7 +- src/mame/drivers/tubep.c | 2 +- src/mame/drivers/tugboat.c | 2 +- src/mame/drivers/tumbleb.c | 21 +++-- src/mame/drivers/tumblep.c | 2 +- src/mame/drivers/tunhunt.c | 2 +- src/mame/drivers/turbo.c | 6 +- src/mame/drivers/tutankhm.c | 11 ++- src/mame/drivers/twin16.c | 20 ++--- src/mame/drivers/twincobr.c | 2 +- src/mame/drivers/twins.c | 4 +- src/mame/drivers/tx1.c | 10 +-- src/mame/drivers/ultraman.c | 2 +- src/mame/drivers/ultrsprt.c | 9 +- src/mame/drivers/umipoker.c | 4 +- src/mame/drivers/undrfire.c | 13 ++- src/mame/drivers/unico.c | 6 +- src/mame/drivers/unkhorse.c | 9 +- src/mame/drivers/usgames.c | 2 +- src/mame/drivers/vamphalf.c | 14 +-- src/mame/drivers/vaportra.c | 2 +- src/mame/drivers/vastar.c | 11 ++- src/mame/drivers/vcombat.c | 6 +- src/mame/drivers/vega.c | 2 +- src/mame/drivers/vendetta.c | 9 +- src/mame/drivers/vertigo.c | 2 +- src/mame/drivers/victory.c | 2 +- src/mame/drivers/videopkr.c | 2 +- src/mame/drivers/vigilant.c | 12 +-- src/mame/drivers/viper.c | 9 +- src/mame/drivers/vmetal.c | 2 +- src/mame/drivers/volfied.c | 2 +- src/mame/drivers/vpoker.c | 2 +- src/mame/drivers/vroulet.c | 2 +- src/mame/drivers/vulgus.c | 8 +- src/mame/drivers/wallc.c | 2 +- src/mame/drivers/wardner.c | 2 +- src/mame/drivers/warpsped.c | 2 +- src/mame/drivers/warpwarp.c | 11 ++- src/mame/drivers/warriorb.c | 4 +- src/mame/drivers/wc90.c | 4 +- src/mame/drivers/wc90b.c | 4 +- src/mame/drivers/wecleman.c | 6 +- src/mame/drivers/welltris.c | 2 +- src/mame/drivers/wgp.c | 10 +-- src/mame/drivers/wheelfir.c | 2 +- src/mame/drivers/whitestar.c | 9 +- src/mame/drivers/wildpkr.c | 2 +- src/mame/drivers/wink.c | 10 +-- src/mame/drivers/wiping.c | 18 ++-- src/mame/drivers/witch.c | 14 +-- src/mame/drivers/wiz.c | 18 ++-- src/mame/drivers/wrally.c | 2 +- src/mame/drivers/xorworld.c | 4 +- src/mame/drivers/xtheball.c | 2 +- src/mame/drivers/xxmissio.c | 18 ++-- src/mame/drivers/xyonix.c | 4 +- src/mame/drivers/yiear.c | 18 ++-- src/mame/drivers/yunsun16.c | 4 +- src/mame/drivers/yunsung8.c | 4 +- src/mame/drivers/zaccaria.c | 20 ++--- src/mame/drivers/zaxxon.c | 11 ++- src/mame/drivers/zerozone.c | 2 +- src/mame/drivers/zn.c | 11 +-- src/mame/drivers/zodiack.c | 7 +- src/mame/drivers/zr107.c | 9 +- src/mame/includes/20pacgal.h | 1 + src/mame/includes/8080bw.h | 1 + src/mame/includes/88games.h | 1 + src/mame/includes/aeroboto.h | 1 + src/mame/includes/airbustr.h | 1 + src/mame/includes/ajax.h | 5 +- src/mame/includes/aliens.h | 1 + src/mame/includes/alpha68k.h | 1 + src/mame/includes/appoooh.h | 1 + src/mame/includes/asterix.h | 1 + src/mame/includes/asteroid.h | 11 +-- src/mame/includes/asuka.h | 1 + src/mame/includes/atarisy2.h | 1 + src/mame/includes/aztarac.h | 4 +- src/mame/includes/badlands.h | 1 + src/mame/includes/bagman.h | 1 + src/mame/includes/balsente.h | 3 +- src/mame/includes/bankp.h | 1 + src/mame/includes/battlane.h | 1 + src/mame/includes/battlex.h | 1 + src/mame/includes/battlnts.h | 1 + src/mame/includes/blockade.h | 1 + src/mame/includes/blockhl.h | 1 + src/mame/includes/bombjack.h | 1 + src/mame/includes/bottom9.h | 2 + src/mame/includes/brkthru.h | 1 + src/mame/includes/bublbobl.h | 5 +- src/mame/includes/bwing.h | 1 + src/mame/includes/bzone.h | 1 + src/mame/includes/capbowl.h | 1 + src/mame/includes/carjmbre.h | 1 + src/mame/includes/carpolo.h | 3 +- src/mame/includes/cave.h | 1 + src/mame/includes/cclimber.h | 1 + src/mame/includes/champbas.h | 1 + src/mame/includes/changela.h | 1 + src/mame/includes/cheekyms.h | 1 + src/mame/includes/circusc.h | 1 + src/mame/includes/commando.h | 1 + src/mame/includes/contra.h | 1 + src/mame/includes/cps1.h | 4 +- src/mame/includes/cps3.h | 2 + src/mame/includes/crbaloon.h | 1 + src/mame/includes/crimfght.h | 1 + src/mame/includes/cvs.h | 1 + src/mame/includes/cyberbal.h | 2 +- src/mame/includes/dcheese.h | 1 + src/mame/includes/ddribble.h | 2 + src/mame/includes/dec8.h | 2 + src/mame/includes/deco32.h | 1 + src/mame/includes/djmain.h | 1 + src/mame/includes/dkong.h | 2 + src/mame/includes/dribling.h | 1 + src/mame/includes/drmicro.h | 1 + src/mame/includes/dynax.h | 5 ++ src/mame/includes/dynduke.h | 1 + src/mame/includes/espial.h | 1 + src/mame/includes/esripsys.h | 2 +- src/mame/includes/exidy.h | 2 +- src/mame/includes/exidy440.h | 3 +- src/mame/includes/exprraid.h | 1 + src/mame/includes/fantland.h | 2 + src/mame/includes/fastfred.h | 2 + src/mame/includes/firetrap.h | 1 + src/mame/includes/firetrk.h | 1 + src/mame/includes/fitfight.h | 1 + src/mame/includes/flkatck.h | 1 + src/mame/includes/freekick.h | 1 + src/mame/includes/fromanc2.h | 1 + src/mame/includes/gaelco3d.h | 1 + src/mame/includes/galaga.h | 5 +- src/mame/includes/galastrm.h | 1 + src/mame/includes/galaxia.h | 1 + src/mame/includes/galaxian.h | 2 + src/mame/includes/galaxold.h | 4 +- src/mame/includes/gameplan.h | 1 + src/mame/includes/gaplus.h | 3 + src/mame/includes/gbusters.h | 1 + src/mame/includes/gcpinbal.h | 1 + src/mame/includes/gijoe.h | 1 + src/mame/includes/glass.h | 1 + src/mame/includes/goldstar.h | 1 + src/mame/includes/gottlieb.h | 1 + src/mame/includes/gradius3.h | 1 + src/mame/includes/grchamp.h | 2 + src/mame/includes/groundfx.h | 1 + src/mame/includes/gsword.h | 1 + src/mame/includes/gunbustr.h | 1 + src/mame/includes/gyruss.h | 2 + src/mame/includes/harddriv.h | 4 +- src/mame/includes/homedata.h | 2 + src/mame/includes/hyperspt.h | 1 + src/mame/includes/itech32.h | 1 + src/mame/includes/itech8.h | 1 + src/mame/includes/jack.h | 1 + src/mame/includes/jackal.h | 1 + src/mame/includes/jailbrek.h | 2 + src/mame/includes/karnov.h | 1 + src/mame/includes/kchamp.h | 2 + src/mame/includes/kickgoal.h | 1 + src/mame/includes/kingobox.h | 1 + src/mame/includes/kncljoe.h | 1 + src/mame/includes/konamigx.h | 2 + src/mame/includes/kopunch.h | 1 + src/mame/includes/kyugo.h | 1 + src/mame/includes/labyrunr.h | 2 + src/mame/includes/laserbat.h | 2 + src/mame/includes/leland.h | 15 +--- src/mame/includes/lethal.h | 1 + src/mame/includes/liberate.h | 2 + src/mame/includes/lucky74.h | 1 + src/mame/includes/lwings.h | 2 + src/mame/includes/m10.h | 3 + src/mame/includes/m72.h | 2 + src/mame/includes/m90.h | 5 ++ src/mame/includes/mainevt.h | 4 + src/mame/includes/mappy.h | 6 ++ src/mame/includes/marineb.h | 2 + src/mame/includes/mario.h | 1 + src/mame/includes/mcr68.h | 3 +- src/mame/includes/meadows.h | 3 + src/mame/includes/megasys1.h | 1 + src/mame/includes/megazone.h | 1 + src/mame/includes/mermaid.h | 1 + src/mame/includes/metro.h | 4 + src/mame/includes/mexico86.h | 6 +- src/mame/includes/micro3d.h | 3 +- src/mame/includes/midzeus.h | 1 + src/mame/includes/mikie.h | 1 + src/mame/includes/mjkjidai.h | 1 + src/mame/includes/moo.h | 2 + src/mame/includes/mouser.h | 2 + src/mame/includes/munchmo.h | 2 + src/mame/includes/mustache.h | 1 + src/mame/includes/mystwarr.h | 1 + src/mame/includes/namconb1.h | 2 + src/mame/includes/namcond1.h | 1 + src/mame/includes/namcos2.h | 6 +- src/mame/includes/namcos22.h | 2 + src/mame/includes/nbmj9195.h | 1 + src/mame/includes/nemesis.h | 2 + src/mame/includes/ninjakd2.h | 1 + src/mame/includes/niyanpai.h | 1 + src/mame/includes/orbit.h | 1 + src/mame/includes/othunder.h | 1 + src/mame/includes/overdriv.h | 1 + src/mame/includes/pacland.h | 2 + src/mame/includes/pacman.h | 3 + src/mame/includes/pandoras.h | 2 + src/mame/includes/paradise.h | 1 + src/mame/includes/parodius.h | 1 + src/mame/includes/pbaction.h | 2 + src/mame/includes/pitnrun.h | 1 + src/mame/includes/playch10.h | 1 + src/mame/includes/plygonet.h | 2 + src/mame/includes/policetr.h | 1 + src/mame/includes/polyplay.h | 2 + src/mame/includes/pooyan.h | 1 + src/mame/includes/popeye.h | 1 + src/mame/includes/popper.h | 1 + src/mame/includes/psikyo4.h | 1 + src/mame/includes/psikyosh.h | 1 + src/mame/includes/punchout.h | 1 + src/mame/includes/qdrmfgp.h | 1 + src/mame/includes/quasar.h | 1 + src/mame/includes/raiden.h | 1 + src/mame/includes/raiden2.h | 1 + src/mame/includes/rallyx.h | 2 + src/mame/includes/realbrk.h | 1 + src/mame/includes/redalert.h | 1 + src/mame/includes/retofinv.h | 2 + src/mame/includes/rltennis.h | 1 + src/mame/includes/rockrage.h | 1 + src/mame/includes/rocnrope.h | 1 + src/mame/includes/rollrace.h | 2 + src/mame/includes/rungun.h | 2 + src/mame/includes/sauro.h | 1 + src/mame/includes/sbasketb.h | 1 + src/mame/includes/scotrsht.h | 1 + src/mame/includes/segag80r.h | 5 +- src/mame/includes/segas32.h | 1 + src/mame/includes/seibuspi.h | 1 + src/mame/includes/seicross.h | 1 + src/mame/includes/senjyo.h | 1 + src/mame/includes/seta.h | 1 + src/mame/includes/seta2.h | 3 + src/mame/includes/simpl156.h | 1 + src/mame/includes/simpsons.h | 1 + src/mame/includes/skydiver.h | 1 + src/mame/includes/skyfox.h | 1 + src/mame/includes/skykid.h | 2 + src/mame/includes/slapfght.h | 5 +- src/mame/includes/slapshot.h | 1 + src/mame/includes/snk6502.h | 2 + src/mame/includes/solomon.h | 1 + src/mame/includes/spcforce.h | 1 + src/mame/includes/spiders.h | 1 + src/mame/includes/splash.h | 1 + src/mame/includes/sprcros2.h | 1 + src/mame/includes/sprint2.h | 1 + src/mame/includes/spy.h | 1 + src/mame/includes/ssozumo.h | 1 + src/mame/includes/stactics.h | 1 + src/mame/includes/starshp1.h | 1 + src/mame/includes/stfight.h | 2 +- src/mame/includes/subs.h | 5 +- src/mame/includes/superqix.h | 2 + src/mame/includes/suprridr.h | 1 + src/mame/includes/surpratk.h | 1 + src/mame/includes/system1.h | 1 + src/mame/includes/system16.h | 1 + src/mame/includes/tagteam.h | 1 + src/mame/includes/taito_b.h | 11 +++ src/mame/includes/taito_f2.h | 1 + src/mame/includes/taito_f3.h | 1 + src/mame/includes/taito_z.h | 1 + src/mame/includes/taitojc.h | 1 + src/mame/includes/tankbatt.h | 1 + src/mame/includes/tankbust.h | 1 + src/mame/includes/tatsumi.h | 1 + src/mame/includes/tceptor.h | 3 + src/mame/includes/thedeep.h | 1 + src/mame/includes/thepit.h | 1 + src/mame/includes/thief.h | 1 + src/mame/includes/thunderx.h | 1 + src/mame/includes/timelimt.h | 1 + src/mame/includes/timeplt.h | 1 + src/mame/includes/tmnt.h | 4 + src/mame/includes/tnzs.h | 5 +- src/mame/includes/toaplan1.h | 3 +- src/mame/includes/toaplan2.h | 4 + src/mame/includes/topspeed.h | 2 + src/mame/includes/toypop.h | 3 + src/mame/includes/tp84.h | 1 + src/mame/includes/trackfld.h | 3 + src/mame/includes/truco.h | 1 + src/mame/includes/trucocl.h | 1 + src/mame/includes/tsamurai.h | 2 + src/mame/includes/tumbleb.h | 1 + src/mame/includes/tutankhm.h | 1 + src/mame/includes/twin16.h | 2 + src/mame/includes/twincobr.h | 5 +- src/mame/includes/tx1.h | 1 + src/mame/includes/undrfire.h | 1 + src/mame/includes/vastar.h | 1 + src/mame/includes/vendetta.h | 1 + src/mame/includes/vertigo.h | 3 +- src/mame/includes/victory.h | 5 +- src/mame/includes/vulgus.h | 1 + src/mame/includes/warpwarp.h | 1 + src/mame/includes/wecleman.h | 1 + src/mame/includes/wgp.h | 1 + src/mame/includes/wiping.h | 2 + src/mame/includes/wiz.h | 2 + src/mame/includes/xxmissio.h | 2 + src/mame/includes/yiear.h | 2 + src/mame/includes/zaccaria.h | 2 + src/mame/includes/zaxxon.h | 1 + src/mame/includes/zodiack.h | 1 + src/mame/machine/ajax.c | 7 +- src/mame/machine/asteroid.c | 18 ++-- src/mame/machine/balsente.c | 5 +- src/mame/machine/bublbobl.c | 6 +- src/mame/machine/carpolo.c | 49 +++++------ src/mame/machine/galaxold.c | 4 +- src/mame/machine/harddriv.c | 7 +- src/mame/machine/leland.c | 6 +- src/mame/machine/mcr68.c | 9 +- src/mame/machine/mexico86.c | 15 ++-- src/mame/machine/namcos2.c | 22 +++-- src/mame/machine/slapfght.c | 7 +- src/mame/machine/stfight.c | 6 +- src/mame/machine/subs.c | 6 +- src/mame/machine/tnzs.c | 15 ++-- src/mame/machine/toaplan1.c | 7 +- src/mame/machine/twincobr.c | 18 ++-- src/mame/machine/vertigo.c | 6 +- src/mame/machine/xevious.c | 4 +- src/mame/video/esripsys.c | 7 +- src/mame/video/exidy.c | 9 +- src/mame/video/exidy440.c | 7 +- src/mame/video/micro3d.c | 7 +- src/mame/video/segag80r.c | 11 ++- src/mame/video/victory.c | 7 +- 1083 files changed, 3999 insertions(+), 3906 deletions(-) diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h index e0b18364ca9..35cff542e77 100644 --- a/src/emu/devcpu.h +++ b/src/emu/devcpu.h @@ -195,6 +195,8 @@ enum #define MCFG_CPU_VBLANK_INT MCFG_DEVICE_VBLANK_INT #define MCFG_CPU_PERIODIC_INT MCFG_DEVICE_PERIODIC_INT +#define MCFG_CPU_VBLANK_INT_DRIVER MCFG_DEVICE_VBLANK_INT_DRIVER +#define MCFG_CPU_PERIODIC_INT_DRIVER MCFG_DEVICE_PERIODIC_INT_DRIVER //************************************************************************** diff --git a/src/mame/audio/aztarac.c b/src/mame/audio/aztarac.c index 0c04489387b..be011372708 100644 --- a/src/mame/audio/aztarac.c +++ b/src/mame/audio/aztarac.c @@ -43,11 +43,10 @@ WRITE8_MEMBER(aztarac_state::aztarac_snd_status_w) m_sound_status &= ~0x10; } -INTERRUPT_GEN( aztarac_snd_timed_irq ) +INTERRUPT_GEN_MEMBER(aztarac_state::aztarac_snd_timed_irq) { - aztarac_state *state = device->machine().driver_data(); - state->m_sound_status ^= 0x10; + m_sound_status ^= 0x10; - if (state->m_sound_status & 0x10) - device->execute().set_input_line(0,HOLD_LINE); + if (m_sound_status & 0x10) + device.execute().set_input_line(0,HOLD_LINE); } diff --git a/src/mame/audio/cyberbal.c b/src/mame/audio/cyberbal.c index 1276a25fc03..f23f39e6184 100644 --- a/src/mame/audio/cyberbal.c +++ b/src/mame/audio/cyberbal.c @@ -100,13 +100,12 @@ static void update_sound_68k_interrupts(running_machine &machine) } -INTERRUPT_GEN( cyberbal_sound_68k_irq_gen ) +INTERRUPT_GEN_MEMBER(cyberbal_state::cyberbal_sound_68k_irq_gen) { - cyberbal_state *state = device->machine().driver_data(); - if (!state->m_fast_68k_int) + if (!m_fast_68k_int) { - state->m_fast_68k_int = 1; - update_sound_68k_interrupts(device->machine()); + m_fast_68k_int = 1; + update_sound_68k_interrupts(machine()); } } diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c index 6762d974238..a1a9050996e 100644 --- a/src/mame/audio/dkong.c +++ b/src/mame/audio/dkong.c @@ -1466,11 +1466,11 @@ MACHINE_CONFIG_FRAGMENT( dkong3_audio ) MCFG_CPU_ADD("n2a03a", N2A03,N2A03_DEFAULTCLOCK) MCFG_CPU_PROGRAM_MAP(dkong3_sound1_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dkong_state, nmi_line_pulse) MCFG_CPU_ADD("n2a03b", N2A03,N2A03_DEFAULTCLOCK) MCFG_CPU_PROGRAM_MAP(dkong3_sound2_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dkong_state, nmi_line_pulse) /* sound latches */ MCFG_LATCH8_ADD( "latch1") diff --git a/src/mame/audio/redalert.c b/src/mame/audio/redalert.c index 0498f11eabe..c819e3af37f 100644 --- a/src/mame/audio/redalert.c +++ b/src/mame/audio/redalert.c @@ -212,7 +212,7 @@ static MACHINE_CONFIG_FRAGMENT( redalert_audio_m37b ) MCFG_CPU_ADD("audiocpu", M6502, REDALERT_AUDIO_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(redalert_audio_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, REDALERT_AUDIO_CPU_IRQ_FREQ) + MCFG_CPU_PERIODIC_INT_DRIVER(redalert_state, irq0_line_hold, REDALERT_AUDIO_CPU_IRQ_FREQ) MCFG_SOUND_ADD("aysnd", AY8910, REDALERT_AY8910_CLOCK) MCFG_SOUND_CONFIG(redalert_ay8910_interface) @@ -404,7 +404,7 @@ MACHINE_CONFIG_FRAGMENT( demoneye_audio ) MCFG_CPU_ADD("audiocpu", M6802, DEMONEYE_AUDIO_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(demoneye_audio_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, REDALERT_AUDIO_CPU_IRQ_FREQ) /* guess */ + MCFG_CPU_PERIODIC_INT_DRIVER(redalert_state, irq0_line_hold, REDALERT_AUDIO_CPU_IRQ_FREQ) /* guess */ MCFG_PIA6821_ADD("sndpia", demoneye_pia_intf) diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c index 7b0d663716c..f7882ac0363 100644 --- a/src/mame/drivers/1942.c +++ b/src/mame/drivers/1942.c @@ -262,7 +262,7 @@ static MACHINE_CONFIG_START( 1942, _1942_state ) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) /* 3 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(_1942_state, irq0_line_hold, 4*60) /* video hardware */ diff --git a/src/mame/drivers/1943.c b/src/mame/drivers/1943.c index f4a1f0f70ec..3c03db0f443 100644 --- a/src/mame/drivers/1943.c +++ b/src/mame/drivers/1943.c @@ -257,11 +257,11 @@ static MACHINE_CONFIG_START( 1943, _1943_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(c1943_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _1943_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(_1943_state, irq0_line_hold, 4*60) // video hardware diff --git a/src/mame/drivers/1945kiii.c b/src/mame/drivers/1945kiii.c index d7db5410a69..d7bd3a11aea 100644 --- a/src/mame/drivers/1945kiii.c +++ b/src/mame/drivers/1945kiii.c @@ -257,7 +257,7 @@ static MACHINE_CONFIG_START( k3, k3_state ) MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(k3_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", k3_state, irq4_line_hold) MCFG_GFXDECODE(1945kiii) diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c index cbe14fb11fd..4c41a0ab4c2 100644 --- a/src/mame/drivers/20pacgal.c +++ b/src/mame/drivers/20pacgal.c @@ -360,12 +360,11 @@ void _20pacgal_state::machine_reset() m_game_selected = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(_20pacgal_state::vblank_irq) { - _20pacgal_state *state = device->machine().driver_data<_20pacgal_state>(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); // TODO: assert breaks the inputs in 25pacman test mode + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); // TODO: assert breaks the inputs in 25pacman test mode } static MACHINE_CONFIG_START( 20pacgal, _20pacgal_state ) @@ -374,7 +373,7 @@ static MACHINE_CONFIG_START( 20pacgal, _20pacgal_state ) MCFG_CPU_ADD("maincpu", Z180, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(20pacgal_map) MCFG_CPU_IO_MAP(20pacgal_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _20pacgal_state, vblank_irq) MCFG_EEPROM_ADD("eeprom", _20pacgal_eeprom_intf) diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c index f1a50371e72..9f46d0f8791 100644 --- a/src/mame/drivers/2mindril.c +++ b/src/mame/drivers/2mindril.c @@ -63,6 +63,8 @@ public: DECLARE_DRIVER_INIT(drill); DECLARE_MACHINE_START(drill); DECLARE_MACHINE_RESET(drill); + INTERRUPT_GEN_MEMBER(drill_vblank_irq); + //INTERRUPT_GEN_MEMBER(drill_device_irq); }; @@ -399,15 +401,15 @@ static GFXDECODE_START( 2mindril ) GFXDECODE_END -static INTERRUPT_GEN( drill_vblank_irq ) +INTERRUPT_GEN_MEMBER(_2mindril_state::drill_vblank_irq) { - device->execute().set_input_line(4, ASSERT_LINE); + device.execute().set_input_line(4, ASSERT_LINE); } #if 0 -static INTERRUPT_GEN( drill_device_irq ) +INTERRUPT_GEN_MEMBER(_2mindril_state::drill_device_irq) { - device->execute().set_input_line(5, ASSERT_LINE); + device.execute().set_input_line(5, ASSERT_LINE); } #endif @@ -445,8 +447,8 @@ static MACHINE_CONFIG_START( drill, _2mindril_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000 ) MCFG_CPU_PROGRAM_MAP(drill_map) - MCFG_CPU_VBLANK_INT("screen", drill_vblank_irq) - //MCFG_CPU_PERIODIC_INT(drill_device_irq,60) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _2mindril_state, drill_vblank_irq) + //MCFG_CPU_PERIODIC_INT_DRIVER(_2mindril_state, drill_device_irq, 60) MCFG_GFXDECODE(2mindril) MCFG_MACHINE_START_OVERRIDE(_2mindril_state,drill) diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c index 83badf7bae5..6b98d85e599 100644 --- a/src/mame/drivers/39in1.c +++ b/src/mame/drivers/39in1.c @@ -75,6 +75,7 @@ public: DECLARE_DRIVER_INIT(39in1); virtual void machine_start(); UINT32 screen_update_39in1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(pxa255_vblank_start); }; @@ -1353,7 +1354,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_lcd_w) } } -static INTERRUPT_GEN( pxa255_vblank_start ) +INTERRUPT_GEN_MEMBER(_39in1_state::pxa255_vblank_start) { } @@ -1591,7 +1592,7 @@ static MACHINE_CONFIG_START( 39in1, _39in1_state ) MCFG_CPU_ADD("maincpu", PXA255, 200000000) MCFG_CPU_PROGRAM_MAP(39in1_map) - MCFG_CPU_VBLANK_INT("screen", pxa255_vblank_start) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _39in1_state, pxa255_vblank_start) MCFG_PALETTE_LENGTH(32768) diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c index 6f7d5026d53..c1356bbe74a 100644 --- a/src/mame/drivers/40love.c +++ b/src/mame/drivers/40love.c @@ -1060,11 +1060,11 @@ static MACHINE_CONFIG_START( 40love, fortyl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",Z80,8000000/2) /* OK */ MCFG_CPU_PROGRAM_MAP(40love_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fortyl_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* OK */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* source/number of IRQs is unknown */ + MCFG_CPU_PERIODIC_INT_DRIVER(fortyl_state, irq0_line_hold, 2*60) /* source/number of IRQs is unknown */ MCFG_CPU_ADD("mcu",M68705,18432000/6) /* OK */ MCFG_CPU_PROGRAM_MAP(buggychl_mcu_map) @@ -1116,11 +1116,11 @@ static MACHINE_CONFIG_START( undoukai, fortyl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(undoukai_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fortyl_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu",Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* source/number of IRQs is unknown */ + MCFG_CPU_PERIODIC_INT_DRIVER(fortyl_state, irq0_line_hold, 2*60) /* source/number of IRQs is unknown */ // MCFG_CPU_ADD("mcu",M68705,18432000/6) // MCFG_CPU_PROGRAM_MAP(buggychl_mcu_map) diff --git a/src/mame/drivers/4enraya.c b/src/mame/drivers/4enraya.c index f37c19c75ed..3abedc5f7bd 100644 --- a/src/mame/drivers/4enraya.c +++ b/src/mame/drivers/4enraya.c @@ -321,7 +321,7 @@ static MACHINE_CONFIG_START( 4enraya, _4enraya_state ) MCFG_CPU_ADD("maincpu",Z80,MAIN_CLOCK/2) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) // unknown timing + MCFG_CPU_PERIODIC_INT_DRIVER(_4enraya_state, irq0_line_hold, 4*60) // unknown timing /* video hardware */ diff --git a/src/mame/drivers/4roses.c b/src/mame/drivers/4roses.c index 79b4205400e..94048bd85eb 100644 --- a/src/mame/drivers/4roses.c +++ b/src/mame/drivers/4roses.c @@ -385,7 +385,7 @@ static MACHINE_CONFIG_START( 4roses, _4roses_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz, guess */ MCFG_CPU_PROGRAM_MAP(4roses_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _4roses_state, nmi_line_pulse) // MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c index 17c4e32e0a9..bb0396e8288 100644 --- a/src/mame/drivers/5clown.c +++ b/src/mame/drivers/5clown.c @@ -1065,7 +1065,7 @@ static MACHINE_CONFIG_START( fclown, _5clown_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK/8) /* guess, seems ok */ MCFG_CPU_PROGRAM_MAP(fclown_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _5clown_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", M6502, MASTER_CLOCK/8) /* guess, seems ok */ MCFG_CPU_PROGRAM_MAP(fcaudio_map) diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index 41f805af587..db458285acf 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -1214,7 +1214,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( sflush, mw8080bw_root, _8080bw_state ) /* basic machine hardware */ MCFG_CPU_REPLACE("maincpu",M6800,1500000) // ? MCFG_CPU_PROGRAM_MAP(sflush_map) - MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _8080bw_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,mw8080bw) /* add shifter */ @@ -1363,15 +1363,14 @@ MACHINE_CONFIG_END /* */ /*******************************************************/ -static INTERRUPT_GEN( polaris_interrupt ) +INTERRUPT_GEN_MEMBER(_8080bw_state::polaris_interrupt) { - _8080bw_state *state = device->machine().driver_data<_8080bw_state>(); - state->m_polaris_cloud_speed++; + m_polaris_cloud_speed++; - if (state->m_polaris_cloud_speed >= 4) /* every 4 frames - this was verified against real machine */ + if (m_polaris_cloud_speed >= 4) /* every 4 frames - this was verified against real machine */ { - state->m_polaris_cloud_speed = 0; - state->m_polaris_cloud_pos++; + m_polaris_cloud_speed = 0; + m_polaris_cloud_pos++; } } @@ -1461,7 +1460,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( polaris, mw8080bw_root, _8080bw_state ) MCFG_CPU_PROGRAM_MAP(schaser_map) MCFG_CPU_IO_MAP(polaris_io_map) MCFG_WATCHDOG_VBLANK_INIT(255) - MCFG_CPU_VBLANK_INT("screen", polaris_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _8080bw_state, polaris_interrupt) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,polaris) /* add shifter */ @@ -2074,7 +2073,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( darthvdr, mw8080bw_root, _8080bw_state ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(darthvdr_map) MCFG_CPU_IO_MAP(darthvdr_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _8080bw_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,darthvdr) MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state,darthvdr) diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c index 4f6f87bcdbb..f052294f6b6 100644 --- a/src/mame/drivers/88games.c +++ b/src/mame/drivers/88games.c @@ -22,11 +22,10 @@ * *************************************/ -static INTERRUPT_GEN( k88games_interrupt ) +INTERRUPT_GEN_MEMBER(_88games_state::k88games_interrupt) { - _88games_state *state = device->machine().driver_data<_88games_state>(); - if (k052109_is_irq_enabled(state->m_k052109)) + if (k052109_is_irq_enabled(m_k052109)) irq0_line_hold(device); } @@ -370,7 +369,7 @@ static MACHINE_CONFIG_START( 88games, _88games_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", k88games_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", _88games_state, k88games_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c index 65d4c568396..09cb272f917 100644 --- a/src/mame/drivers/acefruit.c +++ b/src/mame/drivers/acefruit.c @@ -40,6 +40,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_acefruit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(acefruit_vblank); }; @@ -83,11 +84,10 @@ void acefruit_state::video_start() m_refresh_timer = machine().scheduler().timer_alloc(FUNC(acefruit_refresh)); } -static INTERRUPT_GEN( acefruit_vblank ) +INTERRUPT_GEN_MEMBER(acefruit_state::acefruit_vblank) { - acefruit_state *state = device->machine().driver_data(); - device->execute().set_input_line(0, HOLD_LINE ); - state->m_refresh_timer->adjust( attotime::zero ); + device.execute().set_input_line(0, HOLD_LINE ); + m_refresh_timer->adjust( attotime::zero ); } UINT32 acefruit_state::screen_update_acefruit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -584,7 +584,7 @@ static MACHINE_CONFIG_START( acefruit, acefruit_state ) MCFG_CPU_PROGRAM_MAP(acefruit_map) MCFG_CPU_IO_MAP(acefruit_io) MCFG_GFXDECODE(acefruit) - MCFG_CPU_VBLANK_INT("screen", acefruit_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", acefruit_state, acefruit_vblank) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c index ff35a1b2935..f053d2da77d 100644 --- a/src/mame/drivers/actfancr.c +++ b/src/mame/drivers/actfancr.c @@ -323,7 +323,7 @@ static MACHINE_CONFIG_START( actfancr, actfancr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",H6280,21477200/3) /* Should be accurate */ MCFG_CPU_PROGRAM_MAP(actfan_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", actfancr_state, irq0_line_hold) /* VBL */ MCFG_CPU_ADD("audiocpu",M6502, 1500000) /* Should be accurate */ MCFG_CPU_PROGRAM_MAP(dec0_s_map) @@ -373,7 +373,7 @@ static MACHINE_CONFIG_START( triothep, actfancr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",H6280,XTAL_21_4772MHz/3) /* XIN=21.4772Mhz, verified on pcb */ MCFG_CPU_PROGRAM_MAP(triothep_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", actfancr_state, irq0_line_hold) /* VBL */ MCFG_CPU_ADD("audiocpu",M6502, XTAL_12MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(dec0_s_map) diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c index 2af8f93c836..5770b1a3280 100644 --- a/src/mame/drivers/adp.c +++ b/src/mame/drivers/adp.c @@ -184,6 +184,7 @@ public: DECLARE_MACHINE_RESET(skattv); DECLARE_PALETTE_INIT(adp); UINT32 screen_update_adp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + //INTERRUPT_GEN_MEMBER(adp_int); }; @@ -621,9 +622,9 @@ static INPUT_PORTS_START( skattv ) INPUT_PORTS_END /* -static INTERRUPT_GEN( adp_int ) +INTERRUPT_GEN_MEMBER(adp_state::adp_int) { - device->execute().set_input_line(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 = @@ -663,7 +664,7 @@ static MACHINE_CONFIG_START( quickjac, adp_state ) MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(quickjac_mem) -// MCFG_CPU_VBLANK_INT("screen", adp_int) + //MCFG_CPU_VBLANK_INT_DRIVER("screen", adp_state, adp_int) MCFG_MACHINE_START_OVERRIDE(adp_state,skattv) MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv) @@ -695,7 +696,7 @@ static MACHINE_CONFIG_START( skattv, adp_state ) MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(skattv_mem) -// MCFG_CPU_VBLANK_INT("screen", adp_int) + //MCFG_CPU_VBLANK_INT_DRIVER("screen", adp_state, adp_int) MCFG_MACHINE_START_OVERRIDE(adp_state,skattv) MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv) diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c index c7922e411e8..f701c52f00f 100644 --- a/src/mame/drivers/aeroboto.c +++ b/src/mame/drivers/aeroboto.c @@ -39,14 +39,13 @@ READ8_MEMBER(aeroboto_state::aeroboto_201_r) } -static INTERRUPT_GEN( aeroboto_interrupt ) +INTERRUPT_GEN_MEMBER(aeroboto_state::aeroboto_interrupt) { - aeroboto_state *state = device->machine().driver_data(); - if (!state->m_disable_irq) - device->execute().set_input_line(0, ASSERT_LINE); + if (!m_disable_irq) + device.execute().set_input_line(0, ASSERT_LINE); else - state->m_disable_irq--; + m_disable_irq--; } READ8_MEMBER(aeroboto_state::aeroboto_irq_ack_r) @@ -252,11 +251,11 @@ static MACHINE_CONFIG_START( formatz, aeroboto_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, XTAL_10MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", aeroboto_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aeroboto_state, aeroboto_interrupt) MCFG_CPU_ADD("audiocpu", M6809, XTAL_10MHz/16) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aeroboto_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c index 23cf346dbba..89df34b0ec9 100644 --- a/src/mame/drivers/aerofgt.c +++ b/src/mame/drivers/aerofgt.c @@ -1327,7 +1327,7 @@ static MACHINE_CONFIG_START( pspikes, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(pspikes_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* all irq vectors are the same */ MCFG_CPU_ADD("audiocpu",Z80,XTAL_20MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1366,7 +1366,7 @@ static MACHINE_CONFIG_START( spikes91, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,20000000/2) /* 10 MHz (?) */ MCFG_CPU_PROGRAM_MAP(spikes91_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* all irq vectors are the same */ /* + Z80 for sound */ @@ -1400,7 +1400,7 @@ static MACHINE_CONFIG_START( pspikesb, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,20000000/2) /* 10 MHz (?) */ MCFG_CPU_PROGRAM_MAP(pspikesb_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* all irq vectors are the same */ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common) MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common) @@ -1430,7 +1430,7 @@ static MACHINE_CONFIG_START( pspikesc, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,20000000/2) /* 10 MHz (?) */ MCFG_CPU_PROGRAM_MAP(pspikesc_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* all irq vectors are the same */ MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common) MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common) @@ -1460,7 +1460,7 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,20000000/2) /* 10 MHz (?) */ MCFG_CPU_PROGRAM_MAP(karatblz_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1499,7 +1499,7 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(spinlbrk_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* there are vectors for 3 and 4 too */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* there are vectors for 3 and 4 too */ MCFG_CPU_ADD("audiocpu",Z80,XTAL_20MHz/4) /* 5mhz verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1538,7 +1538,7 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(turbofrc_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* all irq vectors are the same */ MCFG_CPU_ADD("audiocpu",Z80,XTAL_5MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1577,7 +1577,7 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,20000000/2) /* 10 MHz (?) */ MCFG_CPU_PROGRAM_MAP(aerofgtb_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* all irq vectors are the same */ MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1617,7 +1617,7 @@ static MACHINE_CONFIG_START( aerofgt, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(aerofgt_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* all irq vectors are the same */ MCFG_CPU_ADD("audiocpu",Z80,XTAL_20MHz/4) /* 5 MHz verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1657,7 +1657,7 @@ static MACHINE_CONFIG_START( aerfboot, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,20000000/2) /* 10 MHz (?) */ MCFG_CPU_PROGRAM_MAP(aerfboot_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(aerfboot_sound_map) @@ -1691,7 +1691,7 @@ static MACHINE_CONFIG_START( aerfboo2, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,20000000/2) /* 10 MHz (?) */ MCFG_CPU_PROGRAM_MAP(aerfboo2_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq2_line_hold) MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common) MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common) @@ -1722,7 +1722,7 @@ static MACHINE_CONFIG_START( wbbc97, aerofgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,20000000/2) /* 10 MHz (?) */ MCFG_CPU_PROGRAM_MAP(wbbc97_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* all irq vectors are the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", aerofgt_state, irq1_line_hold)/* all irq vectors are the same */ MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(wbbc97_sound_map) diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c index 0d14e3b4965..3b74e1aa5a8 100644 --- a/src/mame/drivers/airbustr.c +++ b/src/mame/drivers/airbustr.c @@ -561,9 +561,9 @@ 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 ) +INTERRUPT_GEN_MEMBER(airbustr_state::slave_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd); } /* Machine Initialization */ @@ -630,12 +630,12 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state ) MCFG_CPU_ADD("slave", Z80, 6000000) // ??? MCFG_CPU_PROGRAM_MAP(slave_map) MCFG_CPU_IO_MAP(slave_io_map) - MCFG_CPU_VBLANK_INT("screen", slave_interrupt) /* nmi signal from master cpu */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", airbustr_state, slave_interrupt) /* nmi signal from master cpu */ MCFG_CPU_ADD("audiocpu", Z80, 6000000) // ??? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) // nmi are caused by sub cpu writing a sound command + MCFG_CPU_VBLANK_INT_DRIVER("screen", airbustr_state, irq0_line_hold) // nmi are caused by sub cpu writing a sound command MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // Palette RAM is filled by sub cpu with data supplied by main cpu // Maybe a high value is safer in order to avoid glitches diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c index 2f7e61d8ebc..56201ccd4d5 100644 --- a/src/mame/drivers/ajax.c +++ b/src/mame/drivers/ajax.c @@ -210,7 +210,7 @@ static MACHINE_CONFIG_START( ajax, ajax_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* 12/4 MHz*/ MCFG_CPU_PROGRAM_MAP(ajax_main_map) - MCFG_CPU_VBLANK_INT("screen", ajax_interrupt) /* IRQs triggered by the 051960 */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", ajax_state, ajax_interrupt) /* IRQs triggered by the 051960 */ MCFG_CPU_ADD("sub", M6809, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(ajax_sub_map) diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c index c53b08cf9bf..ee19f57ae20 100644 --- a/src/mame/drivers/albazc.c +++ b/src/mame/drivers/albazc.c @@ -271,7 +271,7 @@ static MACHINE_CONFIG_START( hanaroku, albazc_state ) MCFG_CPU_ADD("maincpu", Z80,6000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(hanaroku_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", albazc_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/albazg.c b/src/mame/drivers/albazg.c index ac7c64a0631..e12fdeba24c 100644 --- a/src/mame/drivers/albazg.c +++ b/src/mame/drivers/albazg.c @@ -380,7 +380,7 @@ static MACHINE_CONFIG_START( yumefuda, albazg_state ) MCFG_CPU_ADD("maincpu", Z80 , MASTER_CLOCK/2) /* xtal is 12 Mhz, unknown divider*/ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(port_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", albazg_state, irq0_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c index 50a11a7f01d..2e0d41b8de4 100644 --- a/src/mame/drivers/aliens.c +++ b/src/mame/drivers/aliens.c @@ -19,12 +19,11 @@ Preliminary driver by: /* prototypes */ static KONAMI_SETLINES_CALLBACK( aliens_banking ); -static INTERRUPT_GEN( aliens_interrupt ) +INTERRUPT_GEN_MEMBER(aliens_state::aliens_interrupt) { - aliens_state *state = device->machine().driver_data(); - if (k051960_is_irq_enabled(state->m_k051960)) - device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); + if (k051960_is_irq_enabled(m_k051960)) + device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } READ8_MEMBER(aliens_state::bankedram_r) @@ -256,7 +255,7 @@ static MACHINE_CONFIG_START( aliens, aliens_state ) MCFG_CPU_ADD("maincpu", KONAMI, XTAL_24MHz/8) /* 052001 (verified on pcb) */ MCFG_CPU_PROGRAM_MAP(aliens_map) - MCFG_CPU_VBLANK_INT("screen", aliens_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aliens_state, aliens_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(aliens_sound_map) diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c index 5068f4b9e6d..b952fe37bbf 100644 --- a/src/mame/drivers/alpha68k.c +++ b/src/mame/drivers/alpha68k.c @@ -1955,14 +1955,14 @@ static MACHINE_CONFIG_START( sstingry, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 6000000) /* 24MHz/4? */ MCFG_CPU_PROGRAM_MAP(kyros_map) - MCFG_CPU_VBLANK_INT("screen",irq1_line_hold) - MCFG_CPU_PERIODIC_INT(irq2_line_hold,60) // MCU irq + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq1_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, irq2_line_hold, 60) // MCU irq MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(sstingry_sound_map) MCFG_CPU_IO_MAP(kyros_sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 4000) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, nmi_line_pulse, 4000) MCFG_CPU_ADD("mcu", I8748, 9263750) /* 9.263750 MHz oscillator, divided by 3*5 internally */ // MCFG_CPU_PROGRAM_MAP(i8748_map) @@ -2005,14 +2005,14 @@ static MACHINE_CONFIG_START( kyros, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/4) /* Verified on bootleg PCB */ MCFG_CPU_PROGRAM_MAP(kyros_map) - MCFG_CPU_VBLANK_INT("screen",irq1_line_hold) - MCFG_CPU_PERIODIC_INT(irq2_line_hold,60) // MCU irq + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq1_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, irq2_line_hold, 60) // MCU irq MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/6) /* Verified on bootleg PCB */ MCFG_CPU_PROGRAM_MAP(kyros_sound_map) MCFG_CPU_IO_MAP(kyros_sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 4000) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, nmi_line_pulse, 4000) MCFG_MACHINE_START_OVERRIDE(alpha68k_state,common) MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,common) @@ -2051,13 +2051,13 @@ static MACHINE_CONFIG_START( jongbou, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(kyros_map) - MCFG_CPU_VBLANK_INT("screen",irq1_line_hold) - MCFG_CPU_PERIODIC_INT(irq2_line_hold,60*16) // MCU irq + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq1_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, irq2_line_hold, 60*16) // MCU irq MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(jongbou_sound_map) MCFG_CPU_IO_MAP(jongbou_sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 160*60) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, irq0_line_hold, 160*60) MCFG_MACHINE_START_OVERRIDE(alpha68k_state,common) MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,common) @@ -2088,7 +2088,7 @@ static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 6000000) /* 24MHz/4? */ MCFG_CPU_PROGRAM_MAP(alpha68k_I_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq1_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", Z80, 4000000) // 4Mhz seems to yield the correct tone MCFG_CPU_PROGRAM_MAP(alpha68k_I_s_map) @@ -2117,12 +2117,11 @@ static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END -static INTERRUPT_GEN( alpha68k_sound_nmi ) +INTERRUPT_GEN_MEMBER(alpha68k_state::alpha68k_sound_nmi) { - alpha68k_state *state = device->machine().driver_data(); - if(state->m_sound_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_sound_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state ) @@ -2130,12 +2129,12 @@ static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* Correct */ MCFG_CPU_PROGRAM_MAP(alpha68k_II_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq3_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", Z80, 3579545*2) /* Unlikely but needed to stop nested NMI's */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(alpha68k_sound_nmi, 7500) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, alpha68k_sound_nmi, 7500) MCFG_MACHINE_START_OVERRIDE(alpha68k_state,alpha68k_II) MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,alpha68k_II) @@ -2169,8 +2168,8 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( btlfieldb, alpha68k_II ) MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen",irq1_line_hold) - MCFG_CPU_PERIODIC_INT(irq2_line_hold,60*4) // MCU irq + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq1_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, irq2_line_hold, 60*4) // MCU irq MACHINE_CONFIG_END static MACHINE_CONFIG_START( alpha68k_II_gm, alpha68k_state ) @@ -2178,13 +2177,13 @@ static MACHINE_CONFIG_START( alpha68k_II_gm, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(alpha68k_II_map) - MCFG_CPU_VBLANK_INT("screen",irq1_line_hold) - MCFG_CPU_PERIODIC_INT(irq2_line_hold,60*3) // MCU irq + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq1_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, irq2_line_hold, 60*3) // MCU irq MCFG_CPU_ADD("audiocpu", Z80, 4000000*2) // TODO: fix this MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(alpha68k_sound_nmi, 7500) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, alpha68k_sound_nmi, 7500) MCFG_MACHINE_START_OVERRIDE(alpha68k_state,alpha68k_II) MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,alpha68k_II) @@ -2222,12 +2221,12 @@ static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* ? */ MCFG_CPU_PROGRAM_MAP(alpha68k_V_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq3_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", Z80, /*3579545*/3579545*2) /* Unlikely but needed to stop nested NMI's */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(alpha68k_sound_nmi, 8500) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, alpha68k_sound_nmi, 8500) MCFG_MACHINE_START_OVERRIDE(alpha68k_state,alpha68k_V) MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,alpha68k_V) @@ -2264,12 +2263,12 @@ static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* ? */ MCFG_CPU_PROGRAM_MAP(alpha68k_V_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq3_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", Z80, /*3579545*/3579545*2) /* Unlikely but needed to stop nested NMI's */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(alpha68k_sound_nmi, 8500) + MCFG_CPU_PERIODIC_INT_DRIVER(alpha68k_state, alpha68k_sound_nmi, 8500) MCFG_MACHINE_START_OVERRIDE(alpha68k_state,alpha68k_V) MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,alpha68k_V) @@ -2306,7 +2305,7 @@ static MACHINE_CONFIG_START( tnextspc, alpha68k_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 9000000) /* Confirmed 18 MHz/2 */ MCFG_CPU_PROGRAM_MAP(tnextspc_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", alpha68k_state, irq1_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(tnextspc_sound_map) diff --git a/src/mame/drivers/amaticmg.c b/src/mame/drivers/amaticmg.c index 990f9f398dc..97d797a2fce 100644 --- a/src/mame/drivers/amaticmg.c +++ b/src/mame/drivers/amaticmg.c @@ -454,6 +454,7 @@ public: DECLARE_PALETTE_INIT(amaticmg2); UINT32 screen_update_amaticmg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_amaticmg2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(amaticmg2_irq); }; @@ -866,7 +867,7 @@ static MACHINE_CONFIG_START( amaticmg, amaticmg_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) /* WRONG! */ MCFG_CPU_PROGRAM_MAP(amaticmg_map) MCFG_CPU_IO_MAP(amaticmg_portmap) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) // no NMI mask? + MCFG_CPU_VBLANK_INT_DRIVER("screen", amaticmg_state, nmi_line_pulse) // no NMI mask? // MCFG_NVRAM_ADD_0FILL("nvram") @@ -903,12 +904,11 @@ static MACHINE_CONFIG_START( amaticmg, amaticmg_state ) MACHINE_CONFIG_END -static INTERRUPT_GEN( amaticmg2_irq ) +INTERRUPT_GEN_MEMBER(amaticmg_state::amaticmg2_irq) { - amaticmg_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -916,7 +916,7 @@ static MACHINE_CONFIG_DERIVED( amaticmg2, amaticmg ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(amaticmg2_portmap) - MCFG_CPU_VBLANK_INT("screen", amaticmg2_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", amaticmg_state, amaticmg2_irq) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(amaticmg_state, screen_update_amaticmg2) diff --git a/src/mame/drivers/ambush.c b/src/mame/drivers/ambush.c index c8f655547ac..c1322602dfc 100644 --- a/src/mame/drivers/ambush.c +++ b/src/mame/drivers/ambush.c @@ -232,7 +232,7 @@ static MACHINE_CONFIG_START( ambush, ambush_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) /* XTAL confirmed, divisor guessed */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ambush_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/ampoker2.c b/src/mame/drivers/ampoker2.c index a999d65a87a..72de4c13aa4 100644 --- a/src/mame/drivers/ampoker2.c +++ b/src/mame/drivers/ampoker2.c @@ -1169,7 +1169,7 @@ static MACHINE_CONFIG_START( ampoker2, ampoker2_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/2) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(ampoker2_map) MCFG_CPU_IO_MAP(ampoker2_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 1536) + MCFG_CPU_PERIODIC_INT_DRIVER(ampoker2_state, nmi_line_pulse, 1536) MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(200)) /* 200 ms, measured */ MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/amspdwy.c b/src/mame/drivers/amspdwy.c index 0301cd17ae5..7fed59e03ea 100644 --- a/src/mame/drivers/amspdwy.c +++ b/src/mame/drivers/amspdwy.c @@ -275,7 +275,7 @@ static MACHINE_CONFIG_START( amspdwy, amspdwy_state ) MCFG_CPU_ADD("maincpu", Z80,3000000) MCFG_CPU_PROGRAM_MAP(amspdwy_map) MCFG_CPU_IO_MAP(amspdwy_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* IRQ: 60Hz, NMI: retn */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", amspdwy_state, irq0_line_hold) /* IRQ: 60Hz, NMI: retn */ MCFG_CPU_ADD("audiocpu", Z80,3000000) /* Can't be disabled: the YM2151 timers must work */ MCFG_CPU_PROGRAM_MAP(amspdwy_sound_map) diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c index 736f2e78b2d..ea8cfb43d20 100644 --- a/src/mame/drivers/angelkds.c +++ b/src/mame/drivers/angelkds.c @@ -602,7 +602,7 @@ static MACHINE_CONFIG_START( angelkds, angelkds_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_6MHz) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", angelkds_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(sub_map) diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c index 77f3c3c05cc..4bc50c4204a 100644 --- a/src/mame/drivers/appoooh.c +++ b/src/mame/drivers/appoooh.c @@ -429,12 +429,11 @@ void appoooh_state::machine_reset() m_priority = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(appoooh_state::vblank_irq) { - appoooh_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( appoooh_common, appoooh_state ) @@ -443,7 +442,7 @@ static MACHINE_CONFIG_START( appoooh_common, appoooh_state ) MCFG_CPU_ADD("maincpu", Z80,18432000/6) /* ??? the main xtal is 18.432 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", appoooh_state, vblank_irq) /* sound hardware */ diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c index 0bec20ed5be..f2d5040de26 100644 --- a/src/mame/drivers/aquarium.c +++ b/src/mame/drivers/aquarium.c @@ -318,7 +318,7 @@ static MACHINE_CONFIG_START( aquarium, aquarium_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) // clock not verified on pcb MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aquarium_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/6) // clock not verified on pcb MCFG_CPU_PROGRAM_MAP(snd_map) diff --git a/src/mame/drivers/arabian.c b/src/mame/drivers/arabian.c index 9ad4875559a..cba5b39b361 100644 --- a/src/mame/drivers/arabian.c +++ b/src/mame/drivers/arabian.c @@ -360,7 +360,7 @@ static MACHINE_CONFIG_START( arabian, arabian_state ) MCFG_CPU_ADD("maincpu", Z80, MAIN_OSC/4) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", arabian_state, irq0_line_hold) MCFG_CPU_ADD("mcu", MB8841, MAIN_OSC/3/2) MCFG_CPU_IO_MAP(mcu_io_map) diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c index 2da557e44ca..07bdf58336e 100644 --- a/src/mame/drivers/aristmk4.c +++ b/src/mame/drivers/aristmk4.c @@ -1684,7 +1684,7 @@ static MACHINE_CONFIG_START( aristmk4, aristmk4_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MAIN_CLOCK/8) // 1.5mhz MCFG_CPU_PROGRAM_MAP(aristmk4_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aristmk4_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") MCFG_TIMER_ADD_PERIODIC("power_fail", aristmk4_pf,attotime::from_hz(1)) // not real but required to simulate power failure to access robot test. How else can we do this ? @@ -1727,7 +1727,7 @@ static MACHINE_CONFIG_DERIVED( aristmk4_poker, aristmk4 ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(aristmk4_poker_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aristmk4_state, irq0_line_hold) MACHINE_CONFIG_END /* same as Aristocrat Mark-IV HW color offset 7 */ diff --git a/src/mame/drivers/arkanoid.c b/src/mame/drivers/arkanoid.c index 488a277edf1..6016478c4e4 100644 --- a/src/mame/drivers/arkanoid.c +++ b/src/mame/drivers/arkanoid.c @@ -1020,7 +1020,7 @@ static MACHINE_CONFIG_START( arkanoid, arkanoid_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(arkanoid_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", arkanoid_state, irq0_line_hold) MCFG_CPU_ADD("mcu", M68705, XTAL_12MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(mcu_map) @@ -1058,7 +1058,7 @@ static MACHINE_CONFIG_START( hexa, arkanoid_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* Imported from arkanoid - correct? */ MCFG_CPU_PROGRAM_MAP(hexa_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", arkanoid_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(arkanoid_state,arkanoid) MCFG_MACHINE_RESET_OVERRIDE(arkanoid_state,arkanoid) @@ -1100,7 +1100,7 @@ static MACHINE_CONFIG_DERIVED( brixian, arkanoid ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(brixian_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", arkanoid_state, irq0_line_hold) MCFG_DEVICE_REMOVE("mcu") MACHINE_CONFIG_END diff --git a/src/mame/drivers/armedf.c b/src/mame/drivers/armedf.c index adc126d88e5..de4ea0773f9 100644 --- a/src/mame/drivers/armedf.c +++ b/src/mame/drivers/armedf.c @@ -1179,12 +1179,12 @@ static MACHINE_CONFIG_START( terraf, armedf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz? MCFG_CPU_PROGRAM_MAP(terraf_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", armedf_state, irq1_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(armedf_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) @@ -1224,12 +1224,12 @@ static MACHINE_CONFIG_START( terrafb, armedf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz? MCFG_CPU_PROGRAM_MAP(terraf_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", armedf_state, irq1_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(armedf_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_CPU_ADD("extra", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(terrafb_extraz80_map) @@ -1272,12 +1272,12 @@ static MACHINE_CONFIG_START( kozure, armedf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz? MCFG_CPU_PROGRAM_MAP(kozure_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", armedf_state, irq1_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(armedf_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) @@ -1316,12 +1316,12 @@ static MACHINE_CONFIG_START( armedf, armedf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz? MCFG_CPU_PROGRAM_MAP(armedf_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", armedf_state, irq1_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(armedf_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) @@ -1360,12 +1360,12 @@ static MACHINE_CONFIG_START( cclimbr2, armedf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz? MCFG_CPU_PROGRAM_MAP(cclimbr2_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", armedf_state, irq2_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(cclimbr2_soundmap) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(armedf_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) @@ -1404,12 +1404,12 @@ static MACHINE_CONFIG_START( legion, armedf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz? MCFG_CPU_PROGRAM_MAP(legion_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", armedf_state, irq2_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(cclimbr2_soundmap) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(armedf_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) @@ -1448,12 +1448,12 @@ static MACHINE_CONFIG_START( legiono, armedf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz? MCFG_CPU_PROGRAM_MAP(legiono_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", armedf_state, irq2_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(cclimbr2_soundmap) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(armedf_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) @@ -1505,12 +1505,12 @@ static MACHINE_CONFIG_START( bigfghtr, bigfghtr_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // verified MCFG_CPU_PROGRAM_MAP(bigfghtr_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", armedf_state, irq1_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) // 4mhz? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(armedf_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(bigfghtr_state,bigfghtr) MCFG_MACHINE_RESET_OVERRIDE(bigfghtr_state,bigfghtr) diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c index 15467971f7b..b6d6174a7a5 100644 --- a/src/mame/drivers/ashnojoe.c +++ b/src/mame/drivers/ashnojoe.c @@ -351,7 +351,7 @@ static MACHINE_CONFIG_START( ashnojoe, ashnojoe_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(ashnojoe_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ashnojoe_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c index c329451a059..b5e93469b6a 100644 --- a/src/mame/drivers/asterix.c +++ b/src/mame/drivers/asterix.c @@ -53,15 +53,14 @@ WRITE16_MEMBER(asterix_state::control2_w) } } -static INTERRUPT_GEN( asterix_interrupt ) +INTERRUPT_GEN_MEMBER(asterix_state::asterix_interrupt) { - asterix_state *state = device->machine().driver_data(); // global interrupt masking - if (!k056832_is_irq_enabled(state->m_k056832, 0)) + if (!k056832_is_irq_enabled(m_k056832, 0)) return; - device->execute().set_input_line(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) @@ -291,7 +290,7 @@ static MACHINE_CONFIG_START( asterix, asterix_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", asterix_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", asterix_state, asterix_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/asteroid.c b/src/mame/drivers/asteroid.c index 466dc1e137d..374dbf4ae94 100644 --- a/src/mame/drivers/asteroid.c +++ b/src/mame/drivers/asteroid.c @@ -615,7 +615,7 @@ static MACHINE_CONFIG_START( asteroid, asteroid_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK/8) MCFG_CPU_PROGRAM_MAP(asteroid_map) - MCFG_CPU_PERIODIC_INT(asteroid_interrupt, (double)MASTER_CLOCK/4096/12) + MCFG_CPU_PERIODIC_INT_DRIVER(asteroid_state, asteroid_interrupt, (double)MASTER_CLOCK/4096/12) /* video hardware */ @@ -639,7 +639,7 @@ static MACHINE_CONFIG_DERIVED( asterock, asteroid ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_PERIODIC_INT(asterock_interrupt, (double)MASTER_CLOCK/4096/12) + MCFG_CPU_PERIODIC_INT_DRIVER(asteroid_state, asterock_interrupt, (double)MASTER_CLOCK/4096/12) MACHINE_CONFIG_END @@ -668,7 +668,7 @@ static MACHINE_CONFIG_DERIVED( llander, asteroid ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(llander_map) - MCFG_CPU_PERIODIC_INT(llander_interrupt, (double)MASTER_CLOCK/4096/12) + MCFG_CPU_PERIODIC_INT_DRIVER(asteroid_state, llander_interrupt, (double)MASTER_CLOCK/4096/12) MCFG_MACHINE_RESET(avgdvg) diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c index 4e02c41746f..e1b0bba8547 100644 --- a/src/mame/drivers/astinvad.c +++ b/src/mame/drivers/astinvad.c @@ -625,7 +625,7 @@ static MACHINE_CONFIG_START( spaceint, astinvad_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK) /* a guess */ MCFG_CPU_PROGRAM_MAP(spaceint_map) MCFG_CPU_IO_MAP(spaceint_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", astinvad_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(astinvad_state,spaceint) MCFG_MACHINE_RESET_OVERRIDE(astinvad_state,spaceint) diff --git a/src/mame/drivers/astrocorp.c b/src/mame/drivers/astrocorp.c index 84376d98d29..aad63abf1a5 100644 --- a/src/mame/drivers/astrocorp.c +++ b/src/mame/drivers/astrocorp.c @@ -475,7 +475,7 @@ static MACHINE_CONFIG_START( showhand, astrocorp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) MCFG_CPU_PROGRAM_MAP(showhand_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", astrocorp_state, irq4_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c index ae6f37a6c38..9f1d2906039 100644 --- a/src/mame/drivers/asuka.c +++ b/src/mame/drivers/asuka.c @@ -236,10 +236,10 @@ static TIMER_CALLBACK( cadash_interrupt5 ) state->m_maincpu->set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( cadash_interrupt ) +INTERRUPT_GEN_MEMBER(asuka_state::cadash_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(500), FUNC(cadash_interrupt5)); - device->execute().set_input_line(4, HOLD_LINE); /* interrupt vector 4 */ + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(500), FUNC(cadash_interrupt5)); + device.execute().set_input_line(4, HOLD_LINE); /* interrupt vector 4 */ } @@ -896,7 +896,7 @@ static MACHINE_CONFIG_START( bonzeadv, asuka_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* checked on PCB */ MCFG_CPU_PROGRAM_MAP(bonzeadv_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", asuka_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,4000000) /* sound CPU, also required for test mode */ MCFG_CPU_PROGRAM_MAP(bonzeadv_z80_map) @@ -937,7 +937,7 @@ static MACHINE_CONFIG_START( asuka, asuka_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(asuka_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", asuka_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(z80_map) @@ -983,7 +983,7 @@ static MACHINE_CONFIG_START( cadash, asuka_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* 68000p12 running at 16Mhz, verified on pcb */ MCFG_CPU_PROGRAM_MAP(cadash_map) - MCFG_CPU_VBLANK_INT("screen", cadash_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", asuka_state, cadash_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cadash_z80_map) @@ -1029,7 +1029,7 @@ static MACHINE_CONFIG_START( mofflott, asuka_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz ??? */ MCFG_CPU_PROGRAM_MAP(asuka_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", asuka_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(z80_map) @@ -1075,7 +1075,7 @@ static MACHINE_CONFIG_START( galmedes, asuka_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz ??? */ MCFG_CPU_PROGRAM_MAP(asuka_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", asuka_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(cadash_z80_map) @@ -1117,7 +1117,7 @@ static MACHINE_CONFIG_START( eto, asuka_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz ??? */ MCFG_CPU_PROGRAM_MAP(eto_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", asuka_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(cadash_z80_map) diff --git a/src/mame/drivers/atarifb.c b/src/mame/drivers/atarifb.c index 335c2460b34..2a1ec3907ea 100644 --- a/src/mame/drivers/atarifb.c +++ b/src/mame/drivers/atarifb.c @@ -555,7 +555,7 @@ static MACHINE_CONFIG_START( atarifb, atarifb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 750000) MCFG_CPU_PROGRAM_MAP(atarifb_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(atarifb_state, irq0_line_hold, 4*60) /* video hardware */ diff --git a/src/mame/drivers/atarisy2.c b/src/mame/drivers/atarisy2.c index dd03234c812..7099a43ce98 100644 --- a/src/mame/drivers/atarisy2.c +++ b/src/mame/drivers/atarisy2.c @@ -259,13 +259,12 @@ MACHINE_RESET_MEMBER(atarisy2_state,atarisy2) * *************************************/ -static INTERRUPT_GEN( vblank_int ) +INTERRUPT_GEN_MEMBER(atarisy2_state::vblank_int) { - atarisy2_state *state = device->machine().driver_data(); /* clock the VBLANK through */ - if (state->m_interrupt_enable & 8) - atarigen_video_int_gen(device); + if (m_interrupt_enable & 8) + atarigen_video_int_gen(&device); } @@ -1262,7 +1261,7 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state ) MCFG_CPU_ADD("maincpu", T11, MASTER_CLOCK/2) MCFG_CPU_CONFIG(t11_data) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_int) + MCFG_CPU_VBLANK_INT_DRIVER("screen", atarisy2_state, vblank_int) MCFG_CPU_ADD("soundcpu", M6502, SOUND_CLOCK/8) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c index 392c1e45e98..b9b14ec227d 100644 --- a/src/mame/drivers/atarisy4.c +++ b/src/mame/drivers/atarisy4.c @@ -59,6 +59,7 @@ public: virtual void video_reset(); DECLARE_MACHINE_RESET(airrace); UINT32 screen_update_atarisy4(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_int); }; @@ -516,10 +517,10 @@ READ16_MEMBER(atarisy4_state::gpu_r) return res; } -static INTERRUPT_GEN( vblank_int ) +INTERRUPT_GEN_MEMBER(atarisy4_state::vblank_int) { if (gpu.mcr & 0x08) - device->machine().device("maincpu")->execute().set_input_line(6, ASSERT_LINE); + machine().device("maincpu")->execute().set_input_line(6, ASSERT_LINE); } @@ -730,7 +731,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( atarisy4, atarisy4_state ) MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_int) + MCFG_CPU_VBLANK_INT_DRIVER("screen", atarisy4_state, vblank_int) MCFG_CPU_ADD("dsp0", TMS32010, 16000000) MCFG_CPU_PROGRAM_MAP(dsp0_map) diff --git a/src/mame/drivers/atronic.c b/src/mame/drivers/atronic.c index 01160ad31f9..c29e473b38c 100644 --- a/src/mame/drivers/atronic.c +++ b/src/mame/drivers/atronic.c @@ -60,7 +60,7 @@ static MACHINE_CONFIG_START( atronic, atronic_state ) MCFG_CPU_ADD("maincpu", Z180, 6000000) MCFG_CPU_PROGRAM_MAP(atronic_map) MCFG_CPU_IO_MAP(atronic_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", atronic_state, irq0_line_hold) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/attckufo.c b/src/mame/drivers/attckufo.c index 6c592e4a8e0..2ca49518587 100644 --- a/src/mame/drivers/attckufo.c +++ b/src/mame/drivers/attckufo.c @@ -69,6 +69,7 @@ public: DECLARE_READ8_MEMBER( vic_videoram_r ); DECLARE_READ8_MEMBER( vic_colorram_r ); + INTERRUPT_GEN_MEMBER(attckufo_raster_interrupt); }; READ8_MEMBER(attckufo_state::attckufo_io_r) @@ -148,10 +149,9 @@ static INPUT_PORTS_START( attckufo ) INPUT_PORTS_END -static INTERRUPT_GEN( attckufo_raster_interrupt ) +INTERRUPT_GEN_MEMBER(attckufo_state::attckufo_raster_interrupt) { - attckufo_state *state = device->machine().driver_data(); - state->m_mos6560->raster_interrupt_gen(); + m_mos6560->raster_interrupt_gen(); } static MOS6560_INTERFACE( vic_intf ) @@ -166,7 +166,7 @@ static MACHINE_CONFIG_START( attckufo, attckufo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 14318181/14) MCFG_CPU_PROGRAM_MAP(cpu_map) - MCFG_CPU_PERIODIC_INT(attckufo_raster_interrupt, MOS656X_HRETRACERATE) + MCFG_CPU_PERIODIC_INT_DRIVER(attckufo_state, attckufo_raster_interrupt, MOS656X_HRETRACERATE) /* video hardware */ MCFG_MOS656X_ATTACK_UFO_ADD("mos6560", "screen", 14318181/14, vic_intf, vic_videoram_map, vic_colorram_map) diff --git a/src/mame/drivers/avalnche.c b/src/mame/drivers/avalnche.c index 8a0eecc22c4..8ad7b3a7ed4 100644 --- a/src/mame/drivers/avalnche.c +++ b/src/mame/drivers/avalnche.c @@ -248,7 +248,7 @@ static MACHINE_CONFIG_START( avalnche, avalnche_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502,MASTER_CLOCK/16) /* clock input is the "2H" signal divided by two */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,8*60) + MCFG_CPU_PERIODIC_INT_DRIVER(avalnche_state, nmi_line_pulse, 8*60) /* video hardware */ diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c index 393c2da6dae..2033d641144 100644 --- a/src/mame/drivers/avt.c +++ b/src/mame/drivers/avt.c @@ -445,6 +445,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_avt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(avt_vblank_irq); }; #define mc6845_h_char_total (state->m_crtc_vreg[0]) @@ -881,11 +882,10 @@ static const ay8910_interface ay8910_config = *********************************************/ /* IM 2 */ -static INTERRUPT_GEN( avt_vblank_irq ) +INTERRUPT_GEN_MEMBER(avt_state::avt_vblank_irq) { - avt_state *state = device->machine().driver_data(); - state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x06); + m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x06); } static MACHINE_CONFIG_START( avt, avt_state ) @@ -894,7 +894,7 @@ static MACHINE_CONFIG_START( avt, avt_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) /* guess */ MCFG_CPU_PROGRAM_MAP(avt_map) MCFG_CPU_IO_MAP(avt_portmap) - MCFG_CPU_VBLANK_INT("screen", avt_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", avt_state, avt_vblank_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/aztarac.c b/src/mame/drivers/aztarac.c index cc589560ab4..1e28e82b395 100644 --- a/src/mame/drivers/aztarac.c +++ b/src/mame/drivers/aztarac.c @@ -149,11 +149,11 @@ static MACHINE_CONFIG_START( aztarac, aztarac_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", aztarac_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 2000000) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(aztarac_snd_timed_irq, 100) + MCFG_CPU_PERIODIC_INT_DRIVER(aztarac_state, aztarac_snd_timed_irq, 100) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index 441cd3c9b94..75f7c5d9e58 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -81,6 +81,7 @@ public: virtual void video_start(); UINT32 screen_update_backfire_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_backfire_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(deco32_vbl_interrupt); }; //UINT32 *backfire_180010, *backfire_188010; @@ -432,9 +433,9 @@ static const ymz280b_interface ymz280b_intf = sound_irq_gen }; -static INTERRUPT_GEN( deco32_vbl_interrupt ) +INTERRUPT_GEN_MEMBER(backfire_state::deco32_vbl_interrupt) { - device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); + device.execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); } @@ -500,7 +501,7 @@ static MACHINE_CONFIG_START( backfire, backfire_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28000000/4) /* Unconfirmed */ MCFG_CPU_PROGRAM_MAP(backfire_map) - MCFG_CPU_VBLANK_INT("lscreen", deco32_vbl_interrupt) /* or is it "rscreen?" */ + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", backfire_state, deco32_vbl_interrupt) /* or is it "rscreen?" */ MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/badlands.c b/src/mame/drivers/badlands.c index 27391d806e3..75d094adbd6 100644 --- a/src/mame/drivers/badlands.c +++ b/src/mame/drivers/badlands.c @@ -227,21 +227,20 @@ MACHINE_RESET_MEMBER(badlands_state,badlands) * *************************************/ -static INTERRUPT_GEN( vblank_int ) +INTERRUPT_GEN_MEMBER(badlands_state::vblank_int) { - badlands_state *state = device->machine().driver_data(); - int pedal_state = state->ioport("PEDALS")->read(); + int pedal_state = ioport("PEDALS")->read(); int i; /* update the pedals once per frame */ for (i = 0; i < 2; i++) { - state->m_pedal_value[i]--; + m_pedal_value[i]--; if (pedal_state & (1 << i)) - state->m_pedal_value[i]++; + m_pedal_value[i]++; } - atarigen_video_int_gen(device); + atarigen_video_int_gen(&device); } @@ -502,7 +501,7 @@ static MACHINE_CONFIG_START( badlands, badlands_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_int) + MCFG_CPU_VBLANK_INT_DRIVER("screen", badlands_state, vblank_int) MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8) MCFG_CPU_PROGRAM_MAP(audio_map) @@ -708,7 +707,7 @@ static MACHINE_CONFIG_START( badlandsb, badlands_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz/4) /* Divisor estimated */ MCFG_CPU_PROGRAM_MAP(bootleg_map) - MCFG_CPU_VBLANK_INT("screen", vblank_int) + MCFG_CPU_VBLANK_INT_DRIVER("screen", badlands_state, vblank_int) // MCFG_CPU_ADD("audiocpu", Z80, XTAL_20MHz/12) /* Divisor estimated */ // MCFG_CPU_PROGRAM_MAP(bootleg_soundmap) diff --git a/src/mame/drivers/bagman.c b/src/mame/drivers/bagman.c index ebdba31fb80..906f795ece1 100644 --- a/src/mame/drivers/bagman.c +++ b/src/mame/drivers/bagman.c @@ -462,12 +462,11 @@ static const tms5110_interface bagman_tms5110_interface = DEVCB_NULL /* rom clock - Only used to drive the data lines */ }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(bagman_state::vblank_irq) { - bagman_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -477,7 +476,7 @@ static MACHINE_CONFIG_START( bagman, bagman_state ) MCFG_CPU_ADD("maincpu", Z80, BAGMAN_H0) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq) MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman) @@ -513,7 +512,7 @@ static MACHINE_CONFIG_START( pickin, bagman_state ) MCFG_CPU_ADD("maincpu", Z80, BAGMAN_H0) MCFG_CPU_PROGRAM_MAP(pickin_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq) MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman) @@ -565,7 +564,7 @@ static MACHINE_CONFIG_START( botanic, bagman_state ) MCFG_CPU_ADD("maincpu", Z80, BAGMAN_H0) MCFG_CPU_PROGRAM_MAP(pickin_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq) MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman) diff --git a/src/mame/drivers/balsente.c b/src/mame/drivers/balsente.c index 31387d9675d..9b809130ef4 100644 --- a/src/mame/drivers/balsente.c +++ b/src/mame/drivers/balsente.c @@ -1202,7 +1202,7 @@ static MACHINE_CONFIG_START( balsente, balsente_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, XTAL_20MHz/16) /* xtal verified but not speed */ MCFG_CPU_PROGRAM_MAP(cpu1_map) - MCFG_CPU_VBLANK_INT("screen", balsente_update_analog_inputs) + MCFG_CPU_VBLANK_INT_DRIVER("screen", balsente_state, balsente_update_analog_inputs) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* xtal verified but not speed */ MCFG_CPU_PROGRAM_MAP(cpu2_map) diff --git a/src/mame/drivers/bankp.c b/src/mame/drivers/bankp.c index d426a6cc7e5..0d4a76158ce 100644 --- a/src/mame/drivers/bankp.c +++ b/src/mame/drivers/bankp.c @@ -289,12 +289,11 @@ void bankp_state::machine_reset() m_priority = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(bankp_state::vblank_irq) { - bankp_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( bankp, bankp_state ) @@ -303,7 +302,7 @@ static MACHINE_CONFIG_START( bankp, bankp_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) MCFG_CPU_PROGRAM_MAP(bankp_map) MCFG_CPU_IO_MAP(bankp_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bankp_state, vblank_irq) /* video hardware */ diff --git a/src/mame/drivers/baraduke.c b/src/mame/drivers/baraduke.c index 1538d242146..a1c96275fa2 100644 --- a/src/mame/drivers/baraduke.c +++ b/src/mame/drivers/baraduke.c @@ -379,12 +379,12 @@ static MACHINE_CONFIG_START( baraduke, baraduke_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809,49152000/32) MCFG_CPU_PROGRAM_MAP(baraduke_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", baraduke_state, irq0_line_assert) MCFG_CPU_ADD("mcu", HD63701,49152000/8) MCFG_CPU_PROGRAM_MAP(mcu_map) MCFG_CPU_IO_MAP(mcu_port_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", baraduke_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */ diff --git a/src/mame/drivers/battlane.c b/src/mame/drivers/battlane.c index e06e0e30147..92febf22851 100644 --- a/src/mame/drivers/battlane.c +++ b/src/mame/drivers/battlane.c @@ -78,15 +78,14 @@ WRITE8_MEMBER(battlane_state::battlane_cpu_command_w) m_subcpu->set_input_line(M6809_IRQ_LINE, data & 0x02 ? CLEAR_LINE : HOLD_LINE); } -static INTERRUPT_GEN( battlane_cpu1_interrupt ) +INTERRUPT_GEN_MEMBER(battlane_state::battlane_cpu1_interrupt) { - battlane_state *state = device->machine().driver_data(); /* See note in battlane_cpu_command_w */ - if (~state->m_cpu_control & 0x08) + if (~m_cpu_control & 0x08) { - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); - state->m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -289,7 +288,7 @@ static MACHINE_CONFIG_START( battlane, battlane_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 1500000) /* 1.5 MHz ? */ MCFG_CPU_PROGRAM_MAP(battlane_map) - MCFG_CPU_VBLANK_INT("screen", battlane_cpu1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", battlane_state, battlane_cpu1_interrupt) MCFG_CPU_ADD("sub", M6809, 1500000) /* 1.5 MHz ? */ MCFG_CPU_PROGRAM_MAP(battlane_map) diff --git a/src/mame/drivers/battlex.c b/src/mame/drivers/battlex.c index fa884738b5c..aedc5678450 100644 --- a/src/mame/drivers/battlex.c +++ b/src/mame/drivers/battlex.c @@ -48,11 +48,10 @@ #include "includes/battlex.h" -static INTERRUPT_GEN( battlex_interrupt ) +INTERRUPT_GEN_MEMBER(battlex_state::battlex_interrupt) { - battlex_state *state = device->machine().driver_data(); - state->m_in0_b4 = 1; - device->execute().set_input_line(0, ASSERT_LINE); + m_in0_b4 = 1; + device.execute().set_input_line(0, ASSERT_LINE); } CUSTOM_INPUT_MEMBER(battlex_state::battlex_in0_b4_r) @@ -250,7 +249,7 @@ static MACHINE_CONFIG_START( battlex, battlex_state ) MCFG_CPU_ADD("maincpu", Z80,XTAL_10MHz/4 ) // ? MCFG_CPU_PROGRAM_MAP(battlex_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_PERIODIC_INT(battlex_interrupt,400) /* controls game speed? */ + MCFG_CPU_PERIODIC_INT_DRIVER(battlex_state, battlex_interrupt, 400) /* controls game speed? */ /* video hardware */ diff --git a/src/mame/drivers/battlnts.c b/src/mame/drivers/battlnts.c index febce81c0a1..f8906743244 100644 --- a/src/mame/drivers/battlnts.c +++ b/src/mame/drivers/battlnts.c @@ -25,11 +25,10 @@ * *************************************/ -static INTERRUPT_GEN( battlnts_interrupt ) +INTERRUPT_GEN_MEMBER(battlnts_state::battlnts_interrupt) { - battlnts_state *state = device->machine().driver_data(); - if (k007342_is_int_enabled(state->m_k007342)) - device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); + if (k007342_is_int_enabled(m_k007342)) + device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(battlnts_state::battlnts_sh_irqtrigger_w) @@ -248,7 +247,7 @@ static MACHINE_CONFIG_START( battlnts, battlnts_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, XTAL_24MHz / 2 /* 3000000*4? */) MCFG_CPU_PROGRAM_MAP(battlnts_map) - MCFG_CPU_VBLANK_INT("screen", battlnts_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", battlnts_state, battlnts_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz / 6 /* 3579545? */) MCFG_CPU_PROGRAM_MAP(battlnts_sound_map) diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c index 9e76a831418..5b1eea5d477 100644 --- a/src/mame/drivers/bbusters.c +++ b/src/mame/drivers/bbusters.c @@ -670,7 +670,7 @@ static MACHINE_CONFIG_START( bbusters, bbusters_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(bbusters_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bbusters_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80,4000000) /* Accurate */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -710,7 +710,7 @@ static MACHINE_CONFIG_START( mechatt, bbusters_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(mechatt_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bbusters_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,4000000) /* Accurate */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/bestleag.c b/src/mame/drivers/bestleag.c index a40698d8926..9201bd4c380 100644 --- a/src/mame/drivers/bestleag.c +++ b/src/mame/drivers/bestleag.c @@ -365,7 +365,7 @@ GFXDECODE_END static MACHINE_CONFIG_START( bestleag, bestleag_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(bestleag_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bestleag_state, irq6_line_hold) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c index f82c62af0a4..ac700c89c95 100644 --- a/src/mame/drivers/bfcobra.c +++ b/src/mame/drivers/bfcobra.c @@ -300,6 +300,8 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_bfcobra(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(timer_irq); + INTERRUPT_GEN_MEMBER(vblank_gen); }; @@ -1762,28 +1764,27 @@ DRIVER_INIT_MEMBER(bfcobra_state,bfcobra) } /* TODO */ -static INTERRUPT_GEN( timer_irq ) +INTERRUPT_GEN_MEMBER(bfcobra_state::timer_irq) { - generic_pulse_irq_line(device, M6809_IRQ_LINE, 1); + generic_pulse_irq_line(device.execute(), M6809_IRQ_LINE, 1); } /* TODO */ -static INTERRUPT_GEN( vblank_gen ) +INTERRUPT_GEN_MEMBER(bfcobra_state::vblank_gen) { - bfcobra_state *state = device->machine().driver_data(); - state->m_vblank_irq = 1; - update_irqs(device->machine()); + m_vblank_irq = 1; + update_irqs(machine()); } static MACHINE_CONFIG_START( bfcobra, bfcobra_state ) MCFG_CPU_ADD("maincpu", Z80, Z80_XTAL) MCFG_CPU_PROGRAM_MAP(z80_prog_map) MCFG_CPU_IO_MAP(z80_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_gen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bfcobra_state, vblank_gen) MCFG_CPU_ADD("audiocpu", M6809, M6809_XTAL) MCFG_CPU_PROGRAM_MAP(m6809_prog_map) - MCFG_CPU_PERIODIC_INT(timer_irq, 1000) + MCFG_CPU_PERIODIC_INT_DRIVER(bfcobra_state, timer_irq, 1000) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/bfm_sc1.c b/src/mame/drivers/bfm_sc1.c index 53cb816a970..a25126b830d 100644 --- a/src/mame/drivers/bfm_sc1.c +++ b/src/mame/drivers/bfm_sc1.c @@ -175,6 +175,7 @@ public: DECLARE_DRIVER_INIT(rou029); DECLARE_DRIVER_INIT(nocrypt); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(timer_irq); }; #define VFD_RESET 0x20 @@ -213,17 +214,16 @@ WRITE8_MEMBER(bfm_sc1_state::bankswitch_w) /////////////////////////////////////////////////////////////////////////// -static INTERRUPT_GEN( timer_irq ) +INTERRUPT_GEN_MEMBER(bfm_sc1_state::timer_irq) { - bfm_sc1_state *state = device->machine().driver_data(); - if ( state->m_is_timer_enabled ) + if ( m_is_timer_enabled ) { - state->m_irq_status = 0x01 |0x02; //0xff; + m_irq_status = 0x01 |0x02; //0xff; - state->m_sc1_Inputs[2] = state->ioport("STROBE0")->read(); + m_sc1_Inputs[2] = ioport("STROBE0")->read(); - generic_pulse_irq_line(device->machine().device("maincpu"), M6809_IRQ_LINE, 1); + generic_pulse_irq_line(device.execute(), M6809_IRQ_LINE, 1); } } @@ -1095,7 +1095,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( scorpion1, bfm_sc1_state ) MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4) // 6809 CPU at 1 Mhz MCFG_CPU_PROGRAM_MAP(sc1_base) // setup read and write memorymap - MCFG_CPU_PERIODIC_INT(timer_irq, 1000 ) // generate 1000 IRQ's per second + MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc1_state, timer_irq, 1000) // generate 1000 IRQ's per second MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) MCFG_BFMBD1_ADD("vfd0",0) diff --git a/src/mame/drivers/bfm_sc2.c b/src/mame/drivers/bfm_sc2.c index 0c4f3734f53..0a69e2ccd9b 100644 --- a/src/mame/drivers/bfm_sc2.c +++ b/src/mame/drivers/bfm_sc2.c @@ -302,6 +302,7 @@ public: DECLARE_MACHINE_RESET(awp_init); DECLARE_MACHINE_START(sc2dmd); DECLARE_MACHINE_RESET(dm01_init); + INTERRUPT_GEN_MEMBER(timer_irq); }; @@ -503,17 +504,16 @@ WRITE8_MEMBER(bfm_sc2_state::bankswitch_w) /////////////////////////////////////////////////////////////////////////// -static INTERRUPT_GEN( timer_irq ) +INTERRUPT_GEN_MEMBER(bfm_sc2_state::timer_irq) { - bfm_sc2_state *state = device->machine().driver_data(); - state->m_timercnt++; + m_timercnt++; - if ( state->m_is_timer_enabled ) + if ( m_is_timer_enabled ) { - state->m_irq_timer_stat = 0x01; - state->m_irq_status = 0x02; + m_irq_timer_stat = 0x01; + m_irq_status = 0x02; - generic_pulse_irq_line(device, M6809_IRQ_LINE, 1); + generic_pulse_irq_line(device.execute(), M6809_IRQ_LINE, 1); } } @@ -2157,7 +2157,7 @@ static MACHINE_CONFIG_START( scorpion2_vid, bfm_sc2_state ) MCFG_QUANTUM_TIME(attotime::from_hz(960)) // needed for serial communication !! MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 ) // 6809 CPU at 2 Mhz MCFG_CPU_PROGRAM_MAP(memmap_vid) // setup scorpion2 board memorymap - MCFG_CPU_PERIODIC_INT(timer_irq, 1000) // generate 1000 IRQ's per second + MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc2_state, timer_irq, 1000) // generate 1000 IRQ's per second MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) MCFG_BFMBD1_ADD("vfd0",0) @@ -3705,7 +3705,7 @@ static MACHINE_CONFIG_START( scorpion2, bfm_sc2_state ) MCFG_MACHINE_RESET_OVERRIDE(bfm_sc2_state,awp_init) MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 ) MCFG_CPU_PROGRAM_MAP(sc2_basemap) - MCFG_CPU_PERIODIC_INT(timer_irq, 1000 ) + MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc2_state, timer_irq, 1000) MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) MCFG_BFMBD1_ADD("vfd0",0) @@ -3739,7 +3739,7 @@ static MACHINE_CONFIG_START( scorpion2_dm01, bfm_sc2_state ) MCFG_QUANTUM_TIME(attotime::from_hz(960)) // needed for serial communication !! MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 ) MCFG_CPU_PROGRAM_MAP(sc2_basemap) - MCFG_CPU_PERIODIC_INT(timer_irq, 1000 ) + MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc2_state, timer_irq, 1000) MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/bfm_sc5.c b/src/mame/drivers/bfm_sc5.c index 135bee44c85..8d42a4491fa 100644 --- a/src/mame/drivers/bfm_sc5.c +++ b/src/mame/drivers/bfm_sc5.c @@ -33,6 +33,7 @@ protected: required_device m_maincpu; public: DECLARE_DRIVER_INIT(sc5); + INTERRUPT_GEN_MEMBER(sc5_fake_timer_int); }; @@ -45,16 +46,16 @@ ADDRESS_MAP_END static INPUT_PORTS_START( sc5 ) INPUT_PORTS_END -static INTERRUPT_GEN( sc5_fake_timer_int ) +INTERRUPT_GEN_MEMBER(sc5_state::sc5_fake_timer_int) { // this should be coming from the Timer / SIM modules of the Coldfire - device->machine().device("maincpu")->execute().set_input_line_and_vector(5, HOLD_LINE, 0x8c); + machine().device("maincpu")->execute().set_input_line_and_vector(5, HOLD_LINE, 0x8c); } static MACHINE_CONFIG_START( sc5, sc5_state ) MCFG_CPU_ADD("maincpu", MCF5206E, 40000000) /* MCF5206eFT */ MCFG_CPU_PROGRAM_MAP(sc5_map) - MCFG_CPU_PERIODIC_INT(sc5_fake_timer_int,1000) + MCFG_CPU_PERIODIC_INT_DRIVER(sc5_state, sc5_fake_timer_int, 1000) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") /* unknown sound */ diff --git a/src/mame/drivers/bfmsys85.c b/src/mame/drivers/bfmsys85.c index d117e747d35..43b54368b2f 100644 --- a/src/mame/drivers/bfmsys85.c +++ b/src/mame/drivers/bfmsys85.c @@ -112,6 +112,7 @@ public: DECLARE_DRIVER_INIT(decode); virtual void machine_start(); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(timer_irq); }; @@ -185,13 +186,12 @@ WRITE8_MEMBER(bfmsys85_state::watchdog_w) /////////////////////////////////////////////////////////////////////////// -static INTERRUPT_GEN( timer_irq ) +INTERRUPT_GEN_MEMBER(bfmsys85_state::timer_irq) { - bfmsys85_state *state = device->machine().driver_data(); - if ( state->m_is_timer_enabled ) + if ( m_is_timer_enabled ) { - state->m_irq_status = 0x01 |0x02; //0xff; - generic_pulse_irq_line(device, M6809_IRQ_LINE, 1); + m_irq_status = 0x01 |0x02; //0xff; + generic_pulse_irq_line(device.execute(), M6809_IRQ_LINE, 1); } } @@ -418,7 +418,7 @@ ADDRESS_MAP_END static MACHINE_CONFIG_START( bfmsys85, bfmsys85_state ) MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4) // 6809 CPU at 1 Mhz MCFG_CPU_PROGRAM_MAP(memmap) // setup read and write memorymap - MCFG_CPU_PERIODIC_INT(timer_irq, 1000 ) // generate 1000 IRQ's per second + MCFG_CPU_PERIODIC_INT_DRIVER(bfmsys85_state, timer_irq, 1000) // generate 1000 IRQ's per second MCFG_MSC1937_ADD("vfd",0,RIGHT_TO_LEFT) MCFG_ACIA6850_ADD("acia6850_0", m6809_acia_if) diff --git a/src/mame/drivers/bigevglf.c b/src/mame/drivers/bigevglf.c index 3c297d1cb82..4936d6f3581 100644 --- a/src/mame/drivers/bigevglf.c +++ b/src/mame/drivers/bigevglf.c @@ -494,16 +494,16 @@ static MACHINE_CONFIG_START( bigevglf, bigevglf_state ) MCFG_CPU_ADD("maincpu", Z80,10000000/2) /* 5 MHz ? */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(bigevglf_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* vblank */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", bigevglf_state, irq0_line_hold) /* vblank */ MCFG_CPU_ADD("sub", Z80,10000000/2) /* 5 MHz ? */ MCFG_CPU_PROGRAM_MAP(sub_map) MCFG_CPU_IO_MAP(bigevglf_sub_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* vblank */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", bigevglf_state, irq0_line_hold) /* vblank */ MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* IRQ generated by ???; + MCFG_CPU_PERIODIC_INT_DRIVER(bigevglf_state, irq0_line_hold, 2*60) /* IRQ generated by ???; 2 irqs/frame give good music tempo but also SOUND ERROR in test mode, 4 irqs/frame give SOUND OK in test mode but music seems to be running too fast */ diff --git a/src/mame/drivers/bigstrkb.c b/src/mame/drivers/bigstrkb.c index 6a222ca54e4..3f78f6885c4 100644 --- a/src/mame/drivers/bigstrkb.c +++ b/src/mame/drivers/bigstrkb.c @@ -198,7 +198,7 @@ static MACHINE_CONFIG_START( bigstrkb, bigstrkb_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(bigstrkb_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bigstrkb_state, irq6_line_hold) MCFG_GFXDECODE(bigstrkb) diff --git a/src/mame/drivers/bingoc.c b/src/mame/drivers/bingoc.c index 507af29d7a4..f9b93af719f 100644 --- a/src/mame/drivers/bingoc.c +++ b/src/mame/drivers/bingoc.c @@ -146,13 +146,13 @@ static MACHINE_CONFIG_START( bingoc, bingoc_state ) MCFG_CPU_ADD("maincpu", M68000,8000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bingoc_state, irq2_line_hold) MCFG_CPU_ADD("soundcpu", Z80,4000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io) #if SOUND_TEST - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bingoc_state, nmi_line_pulse) #endif /* video hardware */ diff --git a/src/mame/drivers/bingor.c b/src/mame/drivers/bingor.c index e7e3d3d873a..b85a019a923 100644 --- a/src/mame/drivers/bingor.c +++ b/src/mame/drivers/bingor.c @@ -455,6 +455,8 @@ public: DECLARE_READ8_MEMBER(test8_r); virtual void video_start(); UINT32 screen_update_bingor(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(unk_irq); }; @@ -587,15 +589,15 @@ static INPUT_PORTS_START( bingor ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(bingor_state::vblank_irq) { -// 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); // ? +// 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 ) +INTERRUPT_GEN_MEMBER(bingor_state::unk_irq) { - device->execute().set_input_line_and_vector(0,HOLD_LINE,0x48/4); // ? + device.execute().set_input_line_and_vector(0,HOLD_LINE,0x48/4); // ? } @@ -619,9 +621,9 @@ static MACHINE_CONFIG_START( bingor, bingor_state ) MCFG_CPU_ADD("maincpu", I80186, 14000000 ) //?? Mhz MCFG_CPU_PROGRAM_MAP(bingor_map) MCFG_CPU_IO_MAP(bingor_io) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 30) - MCFG_CPU_PERIODIC_INT(unk_irq, 30) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bingor_state, vblank_irq) + MCFG_CPU_PERIODIC_INT_DRIVER(bingor_state, nmi_line_pulse, 30) + MCFG_CPU_PERIODIC_INT_DRIVER(bingor_state, unk_irq, 30) MCFG_CPU_ADD("pic", PIC16C57, 12000000) //?? Mhz MCFG_CPU_IO_MAP(pic_io_map) diff --git a/src/mame/drivers/bionicc.c b/src/mame/drivers/bionicc.c index 8985f7bad24..1891a77c455 100644 --- a/src/mame/drivers/bionicc.c +++ b/src/mame/drivers/bionicc.c @@ -362,7 +362,7 @@ static MACHINE_CONFIG_START( bionicc, bionicc_state ) * schematics indicate that nmi_line is set on M680000 access with AB1=1 * and IOCS=0 (active low), see pages A-1/10, A-4/10 in schematics */ - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(bionicc_state, nmi_line_pulse, 4*60) /* video hardware */ diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c index 3a7fc0da52a..8451097c728 100644 --- a/src/mame/drivers/bking.c +++ b/src/mame/drivers/bking.c @@ -468,7 +468,7 @@ static MACHINE_CONFIG_START( bking, bking_state ) MCFG_CPU_ADD("main_cpu", Z80, XTAL_12MHz/4) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(bking_map) MCFG_CPU_IO_MAP(bking_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bking_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_6MHz/2) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(bking_audio_map) @@ -476,7 +476,7 @@ static MACHINE_CONFIG_START( bking, bking_state ) /* - no interrupts synced with vblank */ /* - NMI triggered by the main CPU */ /* - periodic IRQ, with frequency 6000000/(4*16*16*10*16) = 36.621 Hz, */ - MCFG_CPU_PERIODIC_INT(irq0_line_hold, (double)6000000/(4*16*16*10*16)) + MCFG_CPU_PERIODIC_INT_DRIVER(bking_state, irq0_line_hold, (double)6000000/(4*16*16*10*16)) /* video hardware */ diff --git a/src/mame/drivers/blackt96.c b/src/mame/drivers/blackt96.c index 41c50a5281a..a0780275892 100644 --- a/src/mame/drivers/blackt96.c +++ b/src/mame/drivers/blackt96.c @@ -608,7 +608,7 @@ ADDRESS_MAP_END static MACHINE_CONFIG_START( blackt96, blackt96_state ) MCFG_CPU_ADD("maincpu", M68000, 18000000 /2) MCFG_CPU_PROGRAM_MAP(blackt96_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", blackt96_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C57, 8000000) /* ? */ MCFG_CPU_IO_MAP(sound_io_map) diff --git a/src/mame/drivers/blitz.c b/src/mame/drivers/blitz.c index a192c1a304e..869b26c9d65 100644 --- a/src/mame/drivers/blitz.c +++ b/src/mame/drivers/blitz.c @@ -794,7 +794,7 @@ static MACHINE_CONFIG_START( megadpkr, blitz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(megadpkr_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", blitz_state, nmi_line_pulse) // MCFG_CPU_ADD("mcu", M68705, CPU_CLOCK) /* unknown */ // MCFG_CPU_PROGRAM_MAP(mcu_map) diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c index 9137906a00d..090227222cf 100644 --- a/src/mame/drivers/blitz68k.c +++ b/src/mame/drivers/blitz68k.c @@ -1715,7 +1715,7 @@ static RAMDAC_INTERFACE( ramdac_intf ) static MACHINE_CONFIG_START( ilpag, blitz68k_state ) MCFG_CPU_ADD("maincpu", M68000, 11059200 ) // ? MCFG_CPU_PROGRAM_MAP(ilpag_map) - MCFG_CPU_VBLANK_INT("screen",irq4_line_hold) //3 & 6 used, mcu comms? + MCFG_CPU_VBLANK_INT_DRIVER("screen", blitz68k_state, irq4_line_hold) //3 & 6 used, mcu comms? MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -1779,7 +1779,7 @@ static TIMER_DEVICE_CALLBACK( steaser_mcu_sim ) static MACHINE_CONFIG_DERIVED( steaser, ilpag ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(steaser_map) - MCFG_CPU_VBLANK_INT("screen",irq5_line_hold) //3, 4 & 6 used, mcu comms? + MCFG_CPU_VBLANK_INT_DRIVER("screen", blitz68k_state, irq5_line_hold) //3, 4 & 6 used, mcu comms? MCFG_TIMER_ADD_PERIODIC("coinsim", steaser_mcu_sim, attotime::from_hz(10000)) // not real, but for simulating the MCU MACHINE_CONFIG_END @@ -1815,7 +1815,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( bankrob, blitz68k_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_11_0592MHz) MCFG_CPU_PROGRAM_MAP(bankrob_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) // protection prevents correct irq frequency by crtc + MCFG_CPU_VBLANK_INT_DRIVER("screen", blitz68k_state, irq3_line_hold) // protection prevents correct irq frequency by crtc // irq 2 reads from MCUs // MC68HC705C8P (MCU1) @@ -1847,7 +1847,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( bankroba, blitz68k_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_11_0592MHz ) MCFG_CPU_PROGRAM_MAP(bankroba_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) // protection prevents correct irq frequency by crtc + MCFG_CPU_VBLANK_INT_DRIVER("screen", blitz68k_state, irq5_line_hold) // protection prevents correct irq frequency by crtc // irq 3,4 read from MCUs // MC68HC705C8P (MCU) @@ -1906,7 +1906,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( dualgame, blitz68k_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_11_0592MHz ) MCFG_CPU_PROGRAM_MAP(dualgame_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) // lev 2 = MCUs, lev 3 = vblank + MCFG_CPU_VBLANK_INT_DRIVER("screen", blitz68k_state, irq2_line_hold) // lev 2 = MCUs, lev 3 = vblank // MC68HC705C8P (MCU1) @@ -1937,7 +1937,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( hermit, blitz68k_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_22_1184MHz/2 ) MCFG_CPU_PROGRAM_MAP(hermit_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) // protection prevents correct irq frequency by crtc + MCFG_CPU_VBLANK_INT_DRIVER("screen", blitz68k_state, irq1_line_hold) // protection prevents correct irq frequency by crtc // MC68HC705C8P (MCU) @@ -1966,7 +1966,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( maxidbl, blitz68k_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_11_0592MHz) MCFG_CPU_PROGRAM_MAP(maxidbl_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) // protection prevents correct irq frequency by crtc + MCFG_CPU_VBLANK_INT_DRIVER("screen", blitz68k_state, irq3_line_hold) // protection prevents correct irq frequency by crtc // irq 2 reads from MCUs // MC68HC705C8P (MCU1) diff --git a/src/mame/drivers/blktiger.c b/src/mame/drivers/blktiger.c index 29b464b094e..1cfe5e3bc47 100644 --- a/src/mame/drivers/blktiger.c +++ b/src/mame/drivers/blktiger.c @@ -317,7 +317,7 @@ static MACHINE_CONFIG_START( blktiger, blktiger_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(blktiger_map) MCFG_CPU_IO_MAP(blktiger_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", blktiger_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(blktiger_sound_map) @@ -325,7 +325,7 @@ static MACHINE_CONFIG_START( blktiger, blktiger_state ) MCFG_CPU_ADD("mcu", I8751, XTAL_24MHz/4) /* ??? */ MCFG_CPU_PROGRAM_MAP(blktiger_mcu_map) MCFG_CPU_IO_MAP(blktiger_mcu_io_map) - //MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + //MCFG_CPU_VBLANK_INT_DRIVER("screen", blktiger_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/blmbycar.c b/src/mame/drivers/blmbycar.c index a023fa62425..83026fb4edc 100644 --- a/src/mame/drivers/blmbycar.c +++ b/src/mame/drivers/blmbycar.c @@ -355,7 +355,7 @@ static MACHINE_CONFIG_START( blmbycar, blmbycar_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* ? */ MCFG_CPU_PROGRAM_MAP(blmbycar_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", blmbycar_state, irq1_line_hold) MCFG_MACHINE_START_OVERRIDE(blmbycar_state,blmbycar) MCFG_MACHINE_RESET_OVERRIDE(blmbycar_state,blmbycar) @@ -398,7 +398,7 @@ static MACHINE_CONFIG_START( watrball, blmbycar_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* ? */ MCFG_CPU_PROGRAM_MAP(watrball_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", blmbycar_state, irq1_line_hold) MCFG_MACHINE_START_OVERRIDE(blmbycar_state,watrball) MCFG_MACHINE_RESET_OVERRIDE(blmbycar_state,watrball) diff --git a/src/mame/drivers/blockade.c b/src/mame/drivers/blockade.c index 3b57e2d82f7..eb999714e7c 100644 --- a/src/mame/drivers/blockade.c +++ b/src/mame/drivers/blockade.c @@ -58,15 +58,14 @@ /* Need to check for a coin on the interrupt, */ /* This will reset the cpu */ -static INTERRUPT_GEN( blockade_interrupt ) +INTERRUPT_GEN_MEMBER(blockade_state::blockade_interrupt) { - blockade_state *state = device->machine().driver_data(); - device->execute().resume(SUSPEND_ANY_REASON); + device.execute().resume(SUSPEND_ANY_REASON); - if ((state->ioport("IN0")->read() & 0x80) == 0) + if ((ioport("IN0")->read() & 0x80) == 0) { - state->m_just_been_reset = 1; - device->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); + m_just_been_reset = 1; + device.execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); } } @@ -472,7 +471,7 @@ static MACHINE_CONFIG_START( blockade, blockade_state ) MCFG_CPU_ADD("maincpu", I8080, MASTER_CLOCK/10) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", blockade_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", blockade_state, blockade_interrupt) /* video hardware */ diff --git a/src/mame/drivers/blockhl.c b/src/mame/drivers/blockhl.c index 0c4d22d38a9..9650937fc16 100644 --- a/src/mame/drivers/blockhl.c +++ b/src/mame/drivers/blockhl.c @@ -30,12 +30,11 @@ /* prototypes */ static KONAMI_SETLINES_CALLBACK( blockhl_banking ); -static INTERRUPT_GEN( blockhl_interrupt ) +INTERRUPT_GEN_MEMBER(blockhl_state::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->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); + if (k052109_is_irq_enabled(m_k052109) && m_rombank == 0) /* kludge to prevent crashes */ + device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } READ8_MEMBER(blockhl_state::bankedram_r) @@ -215,7 +214,7 @@ static MACHINE_CONFIG_START( blockhl, blockhl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI,3000000) /* Konami custom 052526 */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", blockhl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", blockhl_state, blockhl_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(audio_map) diff --git a/src/mame/drivers/bloodbro.c b/src/mame/drivers/bloodbro.c index 28c19c9eaaa..bce4b45d483 100644 --- a/src/mame/drivers/bloodbro.c +++ b/src/mame/drivers/bloodbro.c @@ -436,7 +436,7 @@ static MACHINE_CONFIG_START( bloodbro, bloodbro_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(bloodbro_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bloodbro_state, irq4_line_hold) SEIBU_SOUND_SYSTEM_CPU(XTAL_7_15909MHz/2) /* verified on pcb */ @@ -463,7 +463,7 @@ static MACHINE_CONFIG_DERIVED( weststry, bloodbro ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(weststry_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bloodbro_state, irq6_line_hold) MCFG_GFXDECODE(weststry) MCFG_PALETTE_LENGTH(1024) @@ -475,7 +475,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( skysmash, bloodbro ) MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bloodbro_state, irq2_line_hold) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(bloodbro_state, screen_update_skysmash) diff --git a/src/mame/drivers/blueprnt.c b/src/mame/drivers/blueprnt.c index a7c6f52d3ed..a2a0511ec30 100644 --- a/src/mame/drivers/blueprnt.c +++ b/src/mame/drivers/blueprnt.c @@ -296,11 +296,11 @@ static MACHINE_CONFIG_START( blueprnt, blueprnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 7000000/2) // 3.5 MHz MCFG_CPU_PROGRAM_MAP(blueprnt_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", blueprnt_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 10000000/2/2/2) // 1.25 MHz (2H) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) // IRQs connected to 32V + MCFG_CPU_PERIODIC_INT_DRIVER(blueprnt_state, irq0_line_hold, 4*60) // IRQs connected to 32V // NMIs are caused by the main CPU diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c index 758578226d0..b2946a53c1a 100644 --- a/src/mame/drivers/bmcbowl.c +++ b/src/mame/drivers/bmcbowl.c @@ -503,7 +503,7 @@ void bmcbowl_state::machine_reset() static MACHINE_CONFIG_START( bmcbowl, bmcbowl_state ) MCFG_CPU_ADD("maincpu", M68000, 21477270/2 ) MCFG_CPU_PROGRAM_MAP(bmcbowl_mem) - MCFG_CPU_VBLANK_INT("screen",irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bmcbowl_state, irq2_line_hold) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/bmcpokr.c b/src/mame/drivers/bmcpokr.c index e26c97f9592..937ea21c831 100644 --- a/src/mame/drivers/bmcpokr.c +++ b/src/mame/drivers/bmcpokr.c @@ -230,7 +230,7 @@ void bmcpokr_state::video_start() static MACHINE_CONFIG_START( bmcpokr, bmcpokr_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_42MHz/4) MCFG_CPU_PROGRAM_MAP(bmcpokr_mem) - MCFG_CPU_VBLANK_INT("screen",irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bmcpokr_state, irq3_line_hold) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/bogeyman.c b/src/mame/drivers/bogeyman.c index cf6845fee83..26fdbecd1dd 100644 --- a/src/mame/drivers/bogeyman.c +++ b/src/mame/drivers/bogeyman.c @@ -241,7 +241,7 @@ static MACHINE_CONFIG_START( bogeyman, bogeyman_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", M6502, 1500000) /* Verified */ MCFG_CPU_PROGRAM_MAP(bogeyman_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 16*60) // Controls sound + MCFG_CPU_PERIODIC_INT_DRIVER(bogeyman_state, irq0_line_hold, 16*60) // Controls sound // video hardware diff --git a/src/mame/drivers/bombjack.c b/src/mame/drivers/bombjack.c index 825326241a1..0641431bb11 100644 --- a/src/mame/drivers/bombjack.c +++ b/src/mame/drivers/bombjack.c @@ -347,12 +347,11 @@ void bombjack_state::machine_reset() } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(bombjack_state::vblank_irq) { - bombjack_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( bombjack, bombjack_state ) @@ -360,12 +359,12 @@ static MACHINE_CONFIG_START( bombjack, bombjack_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz) /* Confirmed from PCB */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bombjack_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/4) /* Confirmed from PCB */ MCFG_CPU_PROGRAM_MAP(audio_map) MCFG_CPU_IO_MAP(audio_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bombjack_state, nmi_line_pulse) /* video hardware */ diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c index 4252b88568e..e31cf8de4a9 100644 --- a/src/mame/drivers/boogwing.c +++ b/src/mame/drivers/boogwing.c @@ -343,7 +343,7 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) /* DE102 */ MCFG_CPU_PROGRAM_MAP(boogwing_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", boogwing_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", H6280,32220000/4) MCFG_CPU_PROGRAM_MAP(audio_map) diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c index 84940e06bcd..dca0a865aae 100644 --- a/src/mame/drivers/bottom9.c +++ b/src/mame/drivers/bottom9.c @@ -20,12 +20,11 @@ #include "includes/konamipt.h" #include "includes/bottom9.h" -static INTERRUPT_GEN( bottom9_interrupt ) +INTERRUPT_GEN_MEMBER(bottom9_state::bottom9_interrupt) { - bottom9_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) - device->execute().set_input_line(0, HOLD_LINE); + if (k052109_is_irq_enabled(m_k052109)) + device.execute().set_input_line(0, HOLD_LINE); } READ8_MEMBER(bottom9_state::k052109_051960_r) @@ -138,11 +137,10 @@ WRITE8_MEMBER(bottom9_state::bottom9_sh_irqtrigger_w) m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); } -static INTERRUPT_GEN( bottom9_sound_interrupt ) +INTERRUPT_GEN_MEMBER(bottom9_state::bottom9_sound_interrupt) { - bottom9_state *state = device->machine().driver_data(); - if (state->m_nmienable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmienable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(bottom9_state::nmi_enable_w) @@ -353,11 +351,11 @@ static MACHINE_CONFIG_START( bottom9, bottom9_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2000000) /* ? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", bottom9_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bottom9_state, bottom9_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(audio_map) - MCFG_CPU_PERIODIC_INT(bottom9_sound_interrupt,8*60) /* irq is triggered by the main CPU */ + MCFG_CPU_PERIODIC_INT_DRIVER(bottom9_state, bottom9_sound_interrupt, 8*60) /* irq is triggered by the main CPU */ /* video hardware */ diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c index ba04cf61e2f..986d05e3f3b 100644 --- a/src/mame/drivers/brkthru.c +++ b/src/mame/drivers/brkthru.c @@ -381,12 +381,11 @@ void brkthru_state::machine_reset() m_flipscreen = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(brkthru_state::vblank_irq) { - brkthru_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( brkthru, brkthru_state ) @@ -394,7 +393,7 @@ static MACHINE_CONFIG_START( brkthru, brkthru_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/8) /* 1.5 MHz ? */ MCFG_CPU_PROGRAM_MAP(brkthru_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", brkthru_state, vblank_irq) MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK/8) /* 1.5 MHz ? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -430,7 +429,7 @@ static MACHINE_CONFIG_START( darwin, brkthru_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/8) /* 1.5 MHz ? */ MCFG_CPU_PROGRAM_MAP(darwin_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", brkthru_state, vblank_irq) MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK/8) /* 1.5 MHz ? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/btoads.c b/src/mame/drivers/btoads.c index 4a8b8b5e3a9..9a7ded3f231 100644 --- a/src/mame/drivers/btoads.c +++ b/src/mame/drivers/btoads.c @@ -327,7 +327,7 @@ static MACHINE_CONFIG_START( btoads, btoads_state ) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK/4) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_assert, 183) + MCFG_CPU_PERIODIC_INT_DRIVER(btoads_state, irq0_line_assert, 183) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c index a8f057b0e57..dd5340ab224 100644 --- a/src/mame/drivers/bublbobl.c +++ b/src/mame/drivers/bublbobl.c @@ -764,11 +764,11 @@ static MACHINE_CONFIG_START( tokio, bublbobl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MAIN_XTAL/4) // 6 MHz MCFG_CPU_PROGRAM_MAP(tokio_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bublbobl_state, irq0_line_hold) MCFG_CPU_ADD("slave", Z80, MAIN_XTAL/4) // 6 MHz MCFG_CPU_PROGRAM_MAP(tokio_slave_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bublbobl_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, MAIN_XTAL/8) // 3 MHz MCFG_CPU_PROGRAM_MAP(tokio_sound_map) // NMIs are triggered by the main CPU, IRQs are triggered by the YM2203 @@ -845,14 +845,14 @@ static MACHINE_CONFIG_START( bublbobl, bublbobl_state ) MCFG_CPU_ADD("slave", Z80, MAIN_XTAL/4) // 6 MHz MCFG_CPU_PROGRAM_MAP(slave_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", bublbobl_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, MAIN_XTAL/8) // 3 MHz MCFG_CPU_PROGRAM_MAP(sound_map) // IRQs are triggered by the YM2203 MCFG_CPU_ADD("mcu", M6801, 4000000) // actually 6801U4 // xtal is 4MHz, divided by 4 internally MCFG_CPU_PROGRAM_MAP(mcu_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_pulse) // comes from the same clock that latches the INT pin on the second Z80 + MCFG_CPU_VBLANK_INT_DRIVER("screen", bublbobl_state, irq0_line_pulse) // comes from the same clock that latches the INT pin on the second Z80 MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs @@ -901,7 +901,7 @@ static MACHINE_CONFIG_DERIVED( boblbobl, bublbobl ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(bootleg_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) // interrupt mode 1, unlike Bubble Bobble + MCFG_CPU_VBLANK_INT_DRIVER("screen", bublbobl_state, irq0_line_hold) // interrupt mode 1, unlike Bubble Bobble MCFG_MACHINE_START_OVERRIDE(bublbobl_state,boblbobl) MCFG_MACHINE_RESET_OVERRIDE(bublbobl_state,boblbobl) @@ -945,7 +945,7 @@ static MACHINE_CONFIG_DERIVED( bub68705, bublbobl ) MCFG_CPU_ADD("mcu", M68705, 4000000) // xtal is 4MHz, divided by 4 internally MCFG_CPU_PROGRAM_MAP(bootlegmcu_map) - MCFG_CPU_VBLANK_INT("screen",bublbobl_m68705_interrupt) // ??? should come from the same clock which latches the INT pin on the second Z80 + MCFG_CPU_VBLANK_INT_DRIVER("screen", bublbobl_state, bublbobl_m68705_interrupt) // ??? should come from the same clock which latches the INT pin on the second Z80 MCFG_MACHINE_START_OVERRIDE(bublbobl_state,bub68705) MCFG_MACHINE_RESET_OVERRIDE(bublbobl_state,bub68705) diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c index 3c26841180a..55cf785705b 100644 --- a/src/mame/drivers/buggychl.c +++ b/src/mame/drivers/buggychl.c @@ -394,11 +394,11 @@ static MACHINE_CONFIG_START( buggychl, buggychl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz??? */ MCFG_CPU_PROGRAM_MAP(buggychl_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", buggychl_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz??? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,60*60) /* irq is timed, tied to the cpu clock and not to vblank */ + MCFG_CPU_PERIODIC_INT_DRIVER(buggychl_state, irq0_line_hold, 60*60) /* irq is timed, tied to the cpu clock and not to vblank */ /* nmi is caused by the main cpu */ MCFG_CPU_ADD("mcu", M68705,8000000/2) /* 4 MHz */ diff --git a/src/mame/drivers/buster.c b/src/mame/drivers/buster.c index 842a4198796..d5177f7f607 100644 --- a/src/mame/drivers/buster.c +++ b/src/mame/drivers/buster.c @@ -333,7 +333,7 @@ static MACHINE_CONFIG_START( buster, buster_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,XTAL_3_579545MHz) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(mainmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", buster_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/bwidow.c b/src/mame/drivers/bwidow.c index 8d4c12757f9..e6b552b34e7 100644 --- a/src/mame/drivers/bwidow.c +++ b/src/mame/drivers/bwidow.c @@ -696,7 +696,7 @@ static MACHINE_CONFIG_START( bwidow, bwidow_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(bwidow_map) - MCFG_CPU_PERIODIC_INT(irq0_line_assert, (double)MASTER_CLOCK / 4096 / 12) + MCFG_CPU_PERIODIC_INT_DRIVER(bwidow_state, irq0_line_assert, (double)MASTER_CLOCK / 4096 / 12) MCFG_ATARIVGEAROM_ADD("earom") diff --git a/src/mame/drivers/bwing.c b/src/mame/drivers/bwing.c index d83c61eca49..9efdc9a75ae 100644 --- a/src/mame/drivers/bwing.c +++ b/src/mame/drivers/bwing.c @@ -32,12 +32,11 @@ Known issues: //**************************************************************************** // Interrupt Handlers -static INTERRUPT_GEN ( bwp3_interrupt ) +INTERRUPT_GEN_MEMBER(bwing_state::bwp3_interrupt) { - bwing_state *state = device->machine().driver_data(); - if (!state->m_bwp3_nmimask) - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + if (!m_bwp3_nmimask) + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } //**************************************************************************** @@ -374,7 +373,7 @@ static MACHINE_CONFIG_START( bwing, bwing_state ) MCFG_CPU_ADD("audiocpu", DECO16, 2000000) MCFG_CPU_PROGRAM_MAP(bwp3_map) MCFG_CPU_IO_MAP(bwp3_io_map) - MCFG_CPU_PERIODIC_INT(bwp3_interrupt, 1000) + MCFG_CPU_PERIODIC_INT_DRIVER(bwing_state, bwp3_interrupt, 1000) MCFG_QUANTUM_TIME(attotime::from_hz(18000)) // high enough? diff --git a/src/mame/drivers/bzone.c b/src/mame/drivers/bzone.c index e3f01181a95..b16256cf7ac 100644 --- a/src/mame/drivers/bzone.c +++ b/src/mame/drivers/bzone.c @@ -244,10 +244,10 @@ MACHINE_START_MEMBER(bzone_state,redbaron) * *************************************/ -static INTERRUPT_GEN( bzone_interrupt ) +INTERRUPT_GEN_MEMBER(bzone_state::bzone_interrupt) { - if (device->machine().root_device().ioport("IN0")->read() & 0x10) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (machine().root_device().ioport("IN0")->read() & 0x10) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -553,7 +553,7 @@ static MACHINE_CONFIG_START( bzone_base, bzone_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, BZONE_MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(bzone_map) - MCFG_CPU_PERIODIC_INT(bzone_interrupt, (double)BZONE_MASTER_CLOCK / 4096 / 12) + MCFG_CPU_PERIODIC_INT_DRIVER(bzone_state, bzone_interrupt, (double)BZONE_MASTER_CLOCK / 4096 / 12) /* video hardware */ @@ -584,7 +584,7 @@ static MACHINE_CONFIG_DERIVED( redbaron, bzone_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(redbaron_map) - MCFG_CPU_PERIODIC_INT(bzone_interrupt, (double)BZONE_MASTER_CLOCK / 4096 / 12) + MCFG_CPU_PERIODIC_INT_DRIVER(bzone_state, bzone_interrupt, (double)BZONE_MASTER_CLOCK / 4096 / 12) MCFG_MACHINE_START_OVERRIDE(bzone_state,redbaron) diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c index e22b9b80c16..fc1fd29bf22 100644 --- a/src/mame/drivers/cabal.c +++ b/src/mame/drivers/cabal.c @@ -492,7 +492,7 @@ static MACHINE_CONFIG_START( cabal, cabal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cabal_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -534,7 +534,7 @@ static MACHINE_CONFIG_START( cabalbl, cabal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cabalbl_main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cabal_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cabalbl_sound_map) @@ -543,12 +543,12 @@ static MACHINE_CONFIG_START( cabalbl, cabal_state ) MCFG_CPU_ADD("adpcm1", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cabalbl_talk1_map) MCFG_CPU_IO_MAP(cabalbl_talk1_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,8000) + MCFG_CPU_PERIODIC_INT_DRIVER(cabal_state, irq0_line_hold, 8000) MCFG_CPU_ADD("adpcm2", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cabalbl_talk2_map) MCFG_CPU_IO_MAP(cabalbl_talk2_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,8000) + MCFG_CPU_PERIODIC_INT_DRIVER(cabal_state, irq0_line_hold, 8000) MCFG_QUANTUM_TIME(attotime::from_hz(600)) diff --git a/src/mame/drivers/cabaret.c b/src/mame/drivers/cabaret.c index 065027206a0..2455e8af8be 100644 --- a/src/mame/drivers/cabaret.c +++ b/src/mame/drivers/cabaret.c @@ -56,6 +56,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_cabaret(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cabaret_interrupt); }; @@ -324,11 +325,10 @@ void cabaret_state::machine_reset() m_nmi_enable = 0; } -static INTERRUPT_GEN( cabaret_interrupt ) +INTERRUPT_GEN_MEMBER(cabaret_state::cabaret_interrupt) { - cabaret_state *state = device->machine().driver_data(); - if (state->m_nmi_enable & 0x80) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable & 0x80) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( cabaret, cabaret_state ) @@ -336,7 +336,7 @@ static MACHINE_CONFIG_START( cabaret, cabaret_state ) MCFG_CPU_ADD("maincpu", Z180, XTAL_12MHz / 2) MCFG_CPU_PROGRAM_MAP(cabaret_map) MCFG_CPU_IO_MAP(cabaret_portmap) - MCFG_CPU_VBLANK_INT("screen",cabaret_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cabaret_state, cabaret_interrupt) /* video hardware */ diff --git a/src/mame/drivers/calomega.c b/src/mame/drivers/calomega.c index 9dbd4b57dec..68e056fbb27 100644 --- a/src/mame/drivers/calomega.c +++ b/src/mame/drivers/calomega.c @@ -2736,7 +2736,7 @@ static MACHINE_CONFIG_START( sys903, calomega_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, CPU_CLOCK) /* confirmed */ MCFG_CPU_PROGRAM_MAP(sys903_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", calomega_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/calorie.c b/src/mame/drivers/calorie.c index 30d760608c0..3250b726791 100644 --- a/src/mame/drivers/calorie.c +++ b/src/mame/drivers/calorie.c @@ -442,12 +442,12 @@ static MACHINE_CONFIG_START( calorie, calorie_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(calorie_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", calorie_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,3000000) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(calorie_sound_map) MCFG_CPU_IO_MAP(calorie_sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 64) + MCFG_CPU_PERIODIC_INT_DRIVER(calorie_state, irq0_line_hold, 64) /* video hardware */ diff --git a/src/mame/drivers/canyon.c b/src/mame/drivers/canyon.c index a026acac13f..9e5707a4b99 100644 --- a/src/mame/drivers/canyon.c +++ b/src/mame/drivers/canyon.c @@ -239,7 +239,7 @@ static MACHINE_CONFIG_START( canyon, canyon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, XTAL_12_096MHz / 16) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", canyon_state, nmi_line_pulse) MCFG_WATCHDOG_VBLANK_INIT(8) /* video hardware */ diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c index 5e800efb2fc..310fb6c78ab 100644 --- a/src/mame/drivers/capbowl.c +++ b/src/mame/drivers/capbowl.c @@ -105,10 +105,10 @@ * *************************************/ -static INTERRUPT_GEN( capbowl_interrupt ) +INTERRUPT_GEN_MEMBER(capbowl_state::capbowl_interrupt) { - if (device->machine().root_device().ioport("SERVICE")->read() & 1) /* get status of the F2 key */ - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* trigger self test */ + if (machine().root_device().ioport("SERVICE")->read() & 1) /* get status of the F2 key */ + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* trigger self test */ } @@ -361,7 +361,7 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809E, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(capbowl_map) - MCFG_CPU_VBLANK_INT("screen", capbowl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", capbowl_state, capbowl_interrupt) MCFG_CPU_ADD("audiocpu", M6809E, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c index 4c1da2ba71d..143d9075fe7 100644 --- a/src/mame/drivers/cardline.c +++ b/src/mame/drivers/cardline.c @@ -218,7 +218,7 @@ static MACHINE_CONFIG_START( cardline, cardline_state ) MCFG_CPU_ADD("maincpu", I80C32,12000000) MCFG_CPU_PROGRAM_MAP(mem_prg) MCFG_CPU_IO_MAP(mem_io) - //MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + //MCFG_CPU_VBLANK_INT_DRIVER("screen", cardline_state, irq1_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/carjmbre.c b/src/mame/drivers/carjmbre.c index 385127fa447..ef6a6c6cef7 100644 --- a/src/mame/drivers/carjmbre.c +++ b/src/mame/drivers/carjmbre.c @@ -190,12 +190,11 @@ void carjmbre_state::machine_reset() m_bgcolor = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(carjmbre_state::vblank_irq) { - carjmbre_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( carjmbre, carjmbre_state ) @@ -203,13 +202,13 @@ static MACHINE_CONFIG_START( carjmbre, carjmbre_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) MCFG_CPU_PROGRAM_MAP(carjmbre_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", carjmbre_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6/2) MCFG_CPU_PROGRAM_MAP(carjmbre_sound_map) MCFG_CPU_IO_MAP(carjmbre_sound_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", carjmbre_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/carpolo.c b/src/mame/drivers/carpolo.c index ffe1421eba7..92d6a0bd04c 100644 --- a/src/mame/drivers/carpolo.c +++ b/src/mame/drivers/carpolo.c @@ -244,7 +244,7 @@ static MACHINE_CONFIG_START( carpolo, carpolo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, XTAL_11_289MHz/12) /* 940.75 kHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", carpolo_timer_interrupt) /* this not strictly VBLANK, + MCFG_CPU_VBLANK_INT_DRIVER("screen", carpolo_state, carpolo_timer_interrupt) /* this not strictly VBLANK, but it's supposed to happen 60 times a sec, so it's a good place */ diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c index 7da2d28f529..0f0d6c435d1 100644 --- a/src/mame/drivers/carrera.c +++ b/src/mame/drivers/carrera.c @@ -330,7 +330,7 @@ static MACHINE_CONFIG_START( carrera, carrera_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK / 6) MCFG_CPU_PROGRAM_MAP(carrera_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", carrera_state, nmi_line_pulse) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/caswin.c b/src/mame/drivers/caswin.c index dd28e3ff9ca..7848a7e970e 100644 --- a/src/mame/drivers/caswin.c +++ b/src/mame/drivers/caswin.c @@ -305,7 +305,7 @@ static MACHINE_CONFIG_START( vvillage, caswin_state ) MCFG_CPU_ADD("maincpu", Z80,4000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(vvillage_mem) MCFG_CPU_IO_MAP(vvillage_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold ) + MCFG_CPU_VBLANK_INT_DRIVER("screen", caswin_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c index d6594783e29..d10bf873255 100644 --- a/src/mame/drivers/cave.c +++ b/src/mame/drivers/cave.c @@ -135,10 +135,9 @@ static TIMER_DEVICE_CALLBACK( cave_vblank_start ) } /* Called once/frame to generate the VBLANK interrupt */ -static INTERRUPT_GEN( cave_interrupt ) +INTERRUPT_GEN_MEMBER(cave_state::cave_interrupt) { - cave_state *state = device->machine().driver_data(); - state->m_int_timer->adjust(attotime::from_usec(17376 - state->m_time_vblank_irq)); + m_int_timer->adjust(attotime::from_usec(17376 - m_time_vblank_irq)); } /* Called by the YMZ280B to set the IRQ state */ @@ -1854,7 +1853,7 @@ static MACHINE_CONFIG_START( dfeveron, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(dfeveron_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -1896,7 +1895,7 @@ static MACHINE_CONFIG_START( ddonpach, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(ddonpach_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -1942,7 +1941,7 @@ static MACHINE_CONFIG_START( donpachi, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(donpachi_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -1988,7 +1987,7 @@ static MACHINE_CONFIG_START( esprade, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(esprade_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -2029,7 +2028,7 @@ static MACHINE_CONFIG_START( gaia, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(gaia_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -2069,7 +2068,7 @@ static MACHINE_CONFIG_START( guwange, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(guwange_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -2109,7 +2108,7 @@ static MACHINE_CONFIG_START( hotdogst, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(hotdogst_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(hotdogst_sound_map) @@ -2165,7 +2164,7 @@ static MACHINE_CONFIG_START( korokoro, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(korokoro_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -2213,7 +2212,7 @@ static MACHINE_CONFIG_START( mazinger, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(mazinger_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) // Bidirectional communication MCFG_CPU_PROGRAM_MAP(mazinger_sound_map) @@ -2271,7 +2270,7 @@ static MACHINE_CONFIG_START( metmqstr, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz / 2) MCFG_CPU_PROGRAM_MAP(metmqstr_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz / 4) MCFG_CPU_PROGRAM_MAP(metmqstr_sound_map) @@ -2330,7 +2329,7 @@ static MACHINE_CONFIG_START( pacslot, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz / 2) MCFG_CPU_PROGRAM_MAP(pacslot_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ @@ -2384,7 +2383,7 @@ static MACHINE_CONFIG_START( pwrinst2, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(pwrinst2_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_CPU_ADD("audiocpu", Z80,XTAL_16MHz / 2) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(pwrinst2_sound_map) @@ -2445,7 +2444,7 @@ static MACHINE_CONFIG_START( sailormn, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(sailormn_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz) // Bidirectional Communication MCFG_CPU_PROGRAM_MAP(sailormn_sound_map) @@ -2503,7 +2502,7 @@ static MACHINE_CONFIG_START( tjumpman, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz / 2) MCFG_CPU_PROGRAM_MAP(tjumpman_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ @@ -2547,7 +2546,7 @@ static MACHINE_CONFIG_START( uopoko, cave_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(uopoko_map) - MCFG_CPU_VBLANK_INT("screen", cave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c index f8857b1f75f..0d3ebd532ae 100644 --- a/src/mame/drivers/cb2001.c +++ b/src/mame/drivers/cb2001.c @@ -72,6 +72,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_cb2001(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; @@ -737,9 +738,9 @@ static INPUT_PORTS_START( cb2001 ) INPUT_PORTS_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(cb2001_state::vblank_irq) { - generic_pulse_irq_line(device, NEC_INPUT_LINE_INTP0, 1); + generic_pulse_irq_line(device.execute(), NEC_INPUT_LINE_INTP0, 1); } static const gfx_layout cb2001_layout = @@ -836,7 +837,7 @@ static MACHINE_CONFIG_START( cb2001, cb2001_state ) MCFG_CPU_CONFIG(cb2001_config) MCFG_CPU_PROGRAM_MAP(cb2001_map) MCFG_CPU_IO_MAP(cb2001_io) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cb2001_state, vblank_irq) MCFG_I8255A_ADD( "ppi8255_0", ppi8255_0_intf ) MCFG_I8255A_ADD( "ppi8255_1", ppi8255_1_intf ) diff --git a/src/mame/drivers/cbasebal.c b/src/mame/drivers/cbasebal.c index bd05b4a4f2d..b31fe854717 100644 --- a/src/mame/drivers/cbasebal.c +++ b/src/mame/drivers/cbasebal.c @@ -277,7 +277,7 @@ static MACHINE_CONFIG_START( cbasebal, cbasebal_state ) MCFG_CPU_ADD("maincpu", Z80, 6000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(cbasebal_map) MCFG_CPU_IO_MAP(cbasebal_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* ??? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", cbasebal_state, irq0_line_hold) /* ??? */ MCFG_EEPROM_ADD("eeprom", cbasebal_eeprom_intf) diff --git a/src/mame/drivers/cbuster.c b/src/mame/drivers/cbuster.c index 668a2c47985..18c3dc71ec0 100644 --- a/src/mame/drivers/cbuster.c +++ b/src/mame/drivers/cbuster.c @@ -326,7 +326,7 @@ static MACHINE_CONFIG_START( twocrude, cbuster_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* Custom chip 59 */ MCFG_CPU_PROGRAM_MAP(twocrude_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", cbuster_state, irq4_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", H6280,32220000/4) /* Custom chip 45, Audio section crystal is 32.220 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/cchance.c b/src/mame/drivers/cchance.c index 76fecf8774e..dce58768901 100644 --- a/src/mame/drivers/cchance.c +++ b/src/mame/drivers/cchance.c @@ -221,7 +221,7 @@ static MACHINE_CONFIG_START( cchance, cchance_state ) MCFG_CPU_ADD("maincpu", Z80,4000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cchance_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(cchance_state,cchance) MCFG_MACHINE_RESET_OVERRIDE(cchance_state,cchance) diff --git a/src/mame/drivers/cclimber.c b/src/mame/drivers/cclimber.c index 9e089fc2c6e..75ce44ece48 100644 --- a/src/mame/drivers/cclimber.c +++ b/src/mame/drivers/cclimber.c @@ -973,12 +973,11 @@ static GFXDECODE_START( toprollr ) GFXDECODE_ENTRY( "gfx3", 0x0000, cclimber_charlayout, 24*4, 16 ) GFXDECODE_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(cclimber_state::vblank_irq) { - cclimber_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( root, cclimber_state ) @@ -987,7 +986,7 @@ static MACHINE_CONFIG_START( root, cclimber_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3/2) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(cclimber_map) MCFG_CPU_IO_MAP(cclimber_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cclimber_state, vblank_irq) MCFG_MACHINE_RESET_OVERRIDE(cclimber_state,cclimber) @@ -1082,12 +1081,12 @@ static MACHINE_CONFIG_START( swimmer, cclimber_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(swimmer_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cclimber_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,XTAL_4MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(swimmer_audio_map) MCFG_CPU_IO_MAP(swimmer_audio_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, (double)4000000/16384) /* IRQs are triggered by the main CPU */ + MCFG_CPU_PERIODIC_INT_DRIVER(cclimber_state, nmi_line_pulse, (double)4000000/16384) /* IRQs are triggered by the main CPU */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/cesclass.c b/src/mame/drivers/cesclass.c index d0b94be5d0e..f4f6f79310e 100644 --- a/src/mame/drivers/cesclass.c +++ b/src/mame/drivers/cesclass.c @@ -245,8 +245,8 @@ static MACHINE_CONFIG_START( cesclassic, cesclassic_state ) MCFG_CPU_ADD("maincpu", M68000, 24000000/2 ) MCFG_CPU_PROGRAM_MAP(cesclassic_map) - MCFG_CPU_VBLANK_INT("l_lcd", irq2_line_assert) // TODO: unknown sources - MCFG_CPU_PERIODIC_INT(irq3_line_assert,60*8) + MCFG_CPU_VBLANK_INT_DRIVER("l_lcd", cesclassic_state, irq2_line_assert) // TODO: unknown sources + MCFG_CPU_PERIODIC_INT_DRIVER(cesclassic_state, irq3_line_assert, 60*8) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/chaknpop.c b/src/mame/drivers/chaknpop.c index e789d71184b..7e99be833b9 100644 --- a/src/mame/drivers/chaknpop.c +++ b/src/mame/drivers/chaknpop.c @@ -375,7 +375,7 @@ static MACHINE_CONFIG_START( chaknpop, chaknpop_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18MHz / 6) /* Verified on PCB */ MCFG_CPU_PROGRAM_MAP(chaknpop_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", chaknpop_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/champbas.c b/src/mame/drivers/champbas.c index 8d02c617333..977198d22e6 100644 --- a/src/mame/drivers/champbas.c +++ b/src/mame/drivers/champbas.c @@ -604,12 +604,11 @@ MACHINE_RESET_MEMBER(champbas_state,champbas) m_gfx_bank = 0; // talbot has only 1 bank } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(champbas_state::vblank_irq) { - champbas_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, ASSERT_LINE); } @@ -618,7 +617,7 @@ static MACHINE_CONFIG_START( talbot, champbas_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) MCFG_CPU_PROGRAM_MAP(talbot_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) /* MCU */ MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8201, XTAL_18_432MHz/6/8) @@ -654,7 +653,7 @@ static MACHINE_CONFIG_START( champbas, champbas_state ) /* main cpu */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) MCFG_CPU_PROGRAM_MAP(champbas_main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) MCFG_CPU_ADD("sub", Z80, XTAL_18_432MHz/6) MCFG_CPU_PROGRAM_MAP(champbas_sub_map) @@ -705,12 +704,12 @@ static MACHINE_CONFIG_START( exctsccr, champbas_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6 ) MCFG_CPU_PROGRAM_MAP(exctsccr_main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_14_31818MHz/4 ) MCFG_CPU_PROGRAM_MAP(exctsccr_sub_map) MCFG_CPU_IO_MAP(exctsccr_sound_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 4000) /* 4 kHz, updates the dac */ + MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse, 4000) /* 4 kHz, updates the dac */ /* MCU */ MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8301, XTAL_18_432MHz/6/8) /* Actually 8302 */ @@ -762,7 +761,7 @@ static MACHINE_CONFIG_START( exctsccrb, champbas_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) MCFG_CPU_PROGRAM_MAP(exctsccrb_main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) MCFG_CPU_ADD("sub", Z80, XTAL_18_432MHz/6) MCFG_CPU_PROGRAM_MAP(champbas_sub_map) diff --git a/src/mame/drivers/champbwl.c b/src/mame/drivers/champbwl.c index 9e9486069ec..9e67909f442 100644 --- a/src/mame/drivers/champbwl.c +++ b/src/mame/drivers/champbwl.c @@ -480,7 +480,7 @@ static MACHINE_CONFIG_START( champbwl, champbwl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 16000000/4) /* 4MHz */ MCFG_CPU_PROGRAM_MAP(champbwl_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbwl_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -544,7 +544,7 @@ static MACHINE_CONFIG_START( doraemon, champbwl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_14_31818MHz/4) MCFG_CPU_PROGRAM_MAP(doraemon) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbwl_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) diff --git a/src/mame/drivers/chance32.c b/src/mame/drivers/chance32.c index 3d3ff5f86ff..0a2f6127adc 100644 --- a/src/mame/drivers/chance32.c +++ b/src/mame/drivers/chance32.c @@ -471,7 +471,7 @@ static MACHINE_CONFIG_START( chance32, chance32_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) MCFG_CPU_PROGRAM_MAP(chance32_map) MCFG_CPU_IO_MAP(chance32_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", chance32_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/changela.c b/src/mame/drivers/changela.c index 8b1272a14e9..07256919471 100644 --- a/src/mame/drivers/changela.c +++ b/src/mame/drivers/changela.c @@ -412,11 +412,10 @@ TIMER_DEVICE_CALLBACK( changela_scanline ) timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); } -static INTERRUPT_GEN( chl_mcu_irq ) +INTERRUPT_GEN_MEMBER(changela_state::chl_mcu_irq) { - changela_state *state = device->machine().driver_data(); - generic_pulse_irq_line(state->m_mcu, 0, 1); + generic_pulse_irq_line(m_mcu->execute(), 0, 1); } void changela_state::machine_start() @@ -508,7 +507,7 @@ static MACHINE_CONFIG_START( changela, changela_state ) MCFG_CPU_ADD("mcu", M68705,2500000) MCFG_CPU_PROGRAM_MAP(mcu_map) - MCFG_CPU_VBLANK_INT("screen",chl_mcu_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", changela_state, chl_mcu_irq) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/cheekyms.c b/src/mame/drivers/cheekyms.c index 978869a62a0..388adbdd3d6 100644 --- a/src/mame/drivers/cheekyms.c +++ b/src/mame/drivers/cheekyms.c @@ -115,12 +115,11 @@ void cheekyms_state::machine_start() m_dac = machine().device("dac"); } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(cheekyms_state::vblank_irq) { - cheekyms_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -130,7 +129,7 @@ static MACHINE_CONFIG_START( cheekyms, cheekyms_state ) MCFG_CPU_ADD("maincpu", Z80,5000000/2) /* 2.5 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cheekyms_state, vblank_irq) /* video hardware */ diff --git a/src/mame/drivers/chinsan.c b/src/mame/drivers/chinsan.c index 10890cd0ddf..14b851667cf 100644 --- a/src/mame/drivers/chinsan.c +++ b/src/mame/drivers/chinsan.c @@ -605,7 +605,7 @@ static MACHINE_CONFIG_START( chinsan, chinsan_state ) MCFG_CPU_ADD("maincpu", Z80,10000000/2) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(chinsan_map) MCFG_CPU_IO_MAP(chinsan_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", chinsan_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/chsuper.c b/src/mame/drivers/chsuper.c index 6f97c8c6eec..6e75ea0e22e 100644 --- a/src/mame/drivers/chsuper.c +++ b/src/mame/drivers/chsuper.c @@ -203,7 +203,7 @@ static MACHINE_CONFIG_START( chsuper, chsuper_state ) MCFG_CPU_ADD("maincpu", Z180, XTAL_12MHz / 2) /* HD64180RP8, 8 MHz? */ MCFG_CPU_PROGRAM_MAP(chsuper_prg_map) MCFG_CPU_IO_MAP(chsuper_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", chsuper_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/circusc.c b/src/mame/drivers/circusc.c index fb3bcc6b2a6..f90d0bc4a46 100644 --- a/src/mame/drivers/circusc.c +++ b/src/mame/drivers/circusc.c @@ -345,12 +345,11 @@ static DISCRETE_SOUND_START( circusc ) DISCRETE_SOUND_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(circusc_state::vblank_irq) { - circusc_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( circusc, circusc_state ) @@ -358,7 +357,7 @@ static MACHINE_CONFIG_START( circusc, circusc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2048000) /* 2 MHz? */ MCFG_CPU_PROGRAM_MAP(circusc_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", circusc_state, vblank_irq) MCFG_WATCHDOG_VBLANK_INIT(8) MCFG_CPU_ADD("audiocpu", Z80, XTAL_14_31818MHz/4) diff --git a/src/mame/drivers/cischeat.c b/src/mame/drivers/cischeat.c index a292d13667c..5f9239f40eb 100644 --- a/src/mame/drivers/cischeat.c +++ b/src/mame/drivers/cischeat.c @@ -1564,15 +1564,15 @@ static MACHINE_CONFIG_START( bigrun, cischeat_state ) MCFG_CPU_ADD("cpu2", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(bigrun_map2) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cischeat_state, irq4_line_hold) MCFG_CPU_ADD("cpu3", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(bigrun_map3) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cischeat_state, irq4_line_hold) MCFG_CPU_ADD("soundcpu", M68000, 6000000) MCFG_CPU_PROGRAM_MAP(bigrun_sound_map) - MCFG_CPU_PERIODIC_INT(irq4_line_hold,16*30) + MCFG_CPU_PERIODIC_INT_DRIVER(cischeat_state, irq4_line_hold, 16*30) MCFG_QUANTUM_TIME(attotime::from_hz(1200)) diff --git a/src/mame/drivers/citycon.c b/src/mame/drivers/citycon.c index 3a60804238d..3f9b39a85d6 100644 --- a/src/mame/drivers/citycon.c +++ b/src/mame/drivers/citycon.c @@ -206,11 +206,11 @@ static MACHINE_CONFIG_START( citycon, citycon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2048000) /* 2.048 MHz ??? */ MCFG_CPU_PROGRAM_MAP(citycon_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", citycon_state, irq0_line_assert) MCFG_CPU_ADD("audiocpu", M6809, 640000) /* 0.640 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) -// MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) //actually unused, probably it was during development + MCFG_CPU_VBLANK_INT_DRIVER("screen", citycon_state, irq0_line_hold) //actually unused, probably it was during development /* video hardware */ diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c index f8b4145b2a3..3cfadf46646 100644 --- a/src/mame/drivers/clayshoo.c +++ b/src/mame/drivers/clayshoo.c @@ -331,7 +331,7 @@ static MACHINE_CONFIG_START( clayshoo, clayshoo_state ) MCFG_CPU_ADD("maincpu", Z80,5068000/4) /* 5.068/4 Mhz (divider is a guess) */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", clayshoo_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/cloak.c b/src/mame/drivers/cloak.c index e10fde1444f..c4ad239b5fe 100644 --- a/src/mame/drivers/cloak.c +++ b/src/mame/drivers/cloak.c @@ -333,11 +333,11 @@ static MACHINE_CONFIG_START( cloak, cloak_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 1000000) /* 1 MHz ???? */ MCFG_CPU_PROGRAM_MAP(master_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(cloak_state, irq0_line_hold, 4*60) MCFG_CPU_ADD("slave", M6502, 1250000) /* 1.25 MHz ???? */ MCFG_CPU_PROGRAM_MAP(slave_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(cloak_state, irq0_line_hold, 2*60) MCFG_QUANTUM_TIME(attotime::from_hz(1000)) diff --git a/src/mame/drivers/clshroad.c b/src/mame/drivers/clshroad.c index 27c05b6ed1d..00298804197 100644 --- a/src/mame/drivers/clshroad.c +++ b/src/mame/drivers/clshroad.c @@ -231,11 +231,11 @@ static MACHINE_CONFIG_START( firebatl, clshroad_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(clshroad_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* IRQ, no NMI */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", clshroad_state, irq0_line_hold) /* IRQ, no NMI */ MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(clshroad_sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* IRQ, no NMI */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", clshroad_state, irq0_line_hold) /* IRQ, no NMI */ /* video hardware */ @@ -264,11 +264,11 @@ static MACHINE_CONFIG_START( clshroad, clshroad_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/4) /* ? real speed unknown. 3MHz is too low and causes problems */ MCFG_CPU_PROGRAM_MAP(clshroad_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* IRQ, no NMI */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", clshroad_state, irq0_line_hold) /* IRQ, no NMI */ MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6) /* ? */ MCFG_CPU_PROGRAM_MAP(clshroad_sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* IRQ, no NMI */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", clshroad_state, irq0_line_hold) /* IRQ, no NMI */ /* video hardware */ diff --git a/src/mame/drivers/cmmb.c b/src/mame/drivers/cmmb.c index 43a014242b9..fdd13760d8a 100644 --- a/src/mame/drivers/cmmb.c +++ b/src/mame/drivers/cmmb.c @@ -67,6 +67,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_cmmb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cmmb_irq); }; @@ -301,11 +302,11 @@ static GFXDECODE_START( cmmb ) GFXDECODE_ENTRY( "gfx", 0, spritelayout, 0x10, 4 ) GFXDECODE_END -static INTERRUPT_GEN( cmmb_irq ) +INTERRUPT_GEN_MEMBER(cmmb_state::cmmb_irq) { - //if(device->machine().input().code_pressed_once(KEYCODE_Z)) - //if(device->machine().input().code_pressed(KEYCODE_Z)) -// device->execute().set_input_line(0, HOLD_LINE); + //if(machine().input().code_pressed_once(KEYCODE_Z)) + //if(machine().input().code_pressed(KEYCODE_Z)) +// device.execute().set_input_line(0, HOLD_LINE); } void cmmb_state::machine_reset() @@ -317,7 +318,7 @@ static MACHINE_CONFIG_START( cmmb, cmmb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M65SC02, XTAL_72_576MHz/5) // Unknown clock, but chip rated for 14MHz MCFG_CPU_PROGRAM_MAP(cmmb_map) - MCFG_CPU_VBLANK_INT("screen",cmmb_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cmmb_state, cmmb_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c index 0190aa2a8a8..d96313a04dc 100644 --- a/src/mame/drivers/cninja.c +++ b/src/mame/drivers/cninja.c @@ -906,7 +906,7 @@ static MACHINE_CONFIG_START( cninja, cninja_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(cninja_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cninja_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", H6280,32220000/8) /* Accurate */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -958,7 +958,7 @@ static MACHINE_CONFIG_START( stoneage, cninja_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(cninja_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cninja_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(stoneage_s_map) @@ -1010,7 +1010,7 @@ static MACHINE_CONFIG_START( cninjabl, cninja_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(cninjabl_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cninja_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(stoneage_s_map) @@ -1053,7 +1053,7 @@ static MACHINE_CONFIG_START( edrandy, cninja_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(edrandy_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cninja_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", H6280,32220000/8) /* Accurate */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1105,7 +1105,7 @@ static MACHINE_CONFIG_START( robocop2, cninja_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(robocop2_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cninja_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", H6280,32220000/8) /* Accurate */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1160,7 +1160,7 @@ static MACHINE_CONFIG_START( mutantf, cninja_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(mutantf_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cninja_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", H6280,32220000/8) MCFG_CPU_PROGRAM_MAP(sound_map_mutantf) diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c index a11a9cf536c..c3d5cf71728 100644 --- a/src/mame/drivers/cntsteer.c +++ b/src/mame/drivers/cntsteer.c @@ -92,6 +92,7 @@ public: DECLARE_PALETTE_INIT(zerotrgt); UINT32 screen_update_cntsteer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_zerotrgt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sound_interrupt); }; @@ -595,11 +596,10 @@ WRITE8_MEMBER(cntsteer_state::nmimask_w) m_nmimask = data & 0x80; } -static INTERRUPT_GEN ( sound_interrupt ) +INTERRUPT_GEN_MEMBER(cntsteer_state::sound_interrupt) { - cntsteer_state *state = device->machine().driver_data(); - if (!state->m_nmimask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (!m_nmimask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cntsteer_state ) @@ -883,15 +883,15 @@ static MACHINE_CONFIG_START( cntsteer, cntsteer_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2000000) /* ? */ MCFG_CPU_PROGRAM_MAP(cntsteer_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) /* ? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", cntsteer_state, nmi_line_pulse) /* ? */ MCFG_CPU_ADD("subcpu", M6809, 2000000) /* ? */ MCFG_CPU_PROGRAM_MAP(cntsteer_cpu2_map) -// MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) /* ? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", cntsteer_state, nmi_line_pulse) /* ? */ MCFG_CPU_ADD("audiocpu", M6502, 1500000) /* ? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(sound_interrupt, 480) + MCFG_CPU_PERIODIC_INT_DRIVER(cntsteer_state, sound_interrupt, 480) MCFG_MACHINE_START_OVERRIDE(cntsteer_state,cntsteer) MCFG_MACHINE_RESET_OVERRIDE(cntsteer_state,cntsteer) @@ -930,15 +930,15 @@ static MACHINE_CONFIG_START( zerotrgt, cntsteer_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2000000) /* ? */ MCFG_CPU_PROGRAM_MAP(gekitsui_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) /* ? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", cntsteer_state, nmi_line_pulse) /* ? */ MCFG_CPU_ADD("subcpu", M6809, 2000000) /* ? */ MCFG_CPU_PROGRAM_MAP(gekitsui_cpu2_map) -// MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) /* ? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", cntsteer_state, nmi_line_pulse) /* ? */ MCFG_CPU_ADD("audiocpu", M6502, 1500000) /* ? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(sound_interrupt, 480) + MCFG_CPU_PERIODIC_INT_DRIVER(cntsteer_state, sound_interrupt, 480) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/cobra.c b/src/mame/drivers/cobra.c index 8a1c74a7673..d9502c02a6f 100644 --- a/src/mame/drivers/cobra.c +++ b/src/mame/drivers/cobra.c @@ -721,6 +721,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_cobra(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cobra_vblank); }; void cobra_renderer::render_color_scan(INT32 scanline, const extent_t &extent, const cobra_polydata &extradata, int threadid) @@ -3187,14 +3188,13 @@ static void ide_interrupt(device_t *device, int state) } -static INTERRUPT_GEN( cobra_vblank ) +INTERRUPT_GEN_MEMBER(cobra_state::cobra_vblank) { - cobra_state *cobra = device->machine().driver_data(); - if (cobra->m_vblank_enable & 0x80) + if (m_vblank_enable & 0x80) { - device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); - cobra->m_gfx_unk_flag = 0x80; + device.execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); + m_gfx_unk_flag = 0x80; } } @@ -3236,7 +3236,7 @@ static MACHINE_CONFIG_START( cobra, cobra_state ) MCFG_CPU_ADD("maincpu", PPC603, 100000000) /* 603EV, 100? MHz */ MCFG_CPU_CONFIG(main_ppc_cfg) MCFG_CPU_PROGRAM_MAP(cobra_main_map) - MCFG_CPU_VBLANK_INT("screen", cobra_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cobra_state, cobra_vblank) MCFG_CPU_ADD("subcpu", PPC403GA, 32000000) /* 403GA, 33? MHz */ MCFG_CPU_PROGRAM_MAP(cobra_sub_map) diff --git a/src/mame/drivers/coinmstr.c b/src/mame/drivers/coinmstr.c index 037676af032..b25b9f66bb2 100644 --- a/src/mame/drivers/coinmstr.c +++ b/src/mame/drivers/coinmstr.c @@ -1010,7 +1010,7 @@ static const mc6845_interface h46505_intf = static MACHINE_CONFIG_START( coinmstr, coinmstr_state ) MCFG_CPU_ADD("maincpu",Z80,8000000) // ? MCFG_CPU_PROGRAM_MAP(coinmstr_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", coinmstr_state, irq0_line_hold) MCFG_PIA6821_ADD("pia0", pia_0_intf) MCFG_PIA6821_ADD("pia1", pia_1_intf) diff --git a/src/mame/drivers/coinmvga.c b/src/mame/drivers/coinmvga.c index e7759b82139..730604cdf4b 100644 --- a/src/mame/drivers/coinmvga.c +++ b/src/mame/drivers/coinmvga.c @@ -237,6 +237,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_coinmvga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; @@ -656,10 +657,10 @@ static const ymz280b_interface ymz280b_intf = 0 // irq ? }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(coinmvga_state::vblank_irq) { //printf("1\n"); - device->execute().set_input_line(2, HOLD_LINE); + device.execute().set_input_line(2, HOLD_LINE); } @@ -673,7 +674,7 @@ static MACHINE_CONFIG_START( coinmvga, coinmvga_state ) MCFG_CPU_ADD("maincpu", H83007, CPU_CLOCK) /* xtal */ MCFG_CPU_PROGRAM_MAP(coinmvga_map) MCFG_CPU_IO_MAP(coinmvga_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) /* wrong, fix me */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", coinmvga_state, vblank_irq) /* wrong, fix me */ // MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c index f29aff33055..e6a41994ff1 100644 --- a/src/mame/drivers/combatsc.c +++ b/src/mame/drivers/combatsc.c @@ -735,7 +735,7 @@ static MACHINE_CONFIG_START( combatsc, combatsc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* 3 MHz? */ MCFG_CPU_PROGRAM_MAP(combatsc_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", combatsc_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,3579545) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(combatsc_sound_map) @@ -785,11 +785,11 @@ static MACHINE_CONFIG_START( combatscb, combatsc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* 3 MHz? */ MCFG_CPU_PROGRAM_MAP(combatscb_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", combatsc_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,3579545) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(combatscb_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,3800) // controls BGM tempo + MCFG_CPU_PERIODIC_INT_DRIVER(combatsc_state, irq0_line_hold, 3800) // controls BGM tempo MCFG_QUANTUM_TIME(attotime::from_hz(1200)) diff --git a/src/mame/drivers/commando.c b/src/mame/drivers/commando.c index d8af16cd562..53dd2b50f7e 100644 --- a/src/mame/drivers/commando.c +++ b/src/mame/drivers/commando.c @@ -216,9 +216,9 @@ GFXDECODE_END /* Interrupt Generator */ -static INTERRUPT_GEN( commando_interrupt ) +INTERRUPT_GEN_MEMBER(commando_state::commando_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); // RST 10h - VBLANK + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); // RST 10h - VBLANK } /* Machine Driver */ @@ -247,11 +247,11 @@ static MACHINE_CONFIG_START( commando, commando_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, PHI_MAIN) // ??? MCFG_CPU_PROGRAM_MAP(commando_map) - MCFG_CPU_VBLANK_INT("screen", commando_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", commando_state, commando_interrupt) MCFG_CPU_ADD("audiocpu", Z80, PHI_B) // 3 MHz MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(commando_state, irq0_line_hold, 4*60) /* video hardware */ diff --git a/src/mame/drivers/compgolf.c b/src/mame/drivers/compgolf.c index 2ce772f68b1..0e4ac3b72d1 100644 --- a/src/mame/drivers/compgolf.c +++ b/src/mame/drivers/compgolf.c @@ -248,7 +248,7 @@ static MACHINE_CONFIG_START( compgolf, compgolf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2000000) MCFG_CPU_PROGRAM_MAP(compgolf_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", compgolf_state, nmi_line_pulse) /* video hardware */ diff --git a/src/mame/drivers/contra.c b/src/mame/drivers/contra.c index 8d98e8ac490..089d20f86ab 100644 --- a/src/mame/drivers/contra.c +++ b/src/mame/drivers/contra.c @@ -25,12 +25,11 @@ Dip locations and factory settings verified with manual #include "includes/contra.h" -static INTERRUPT_GEN( contra_interrupt ) +INTERRUPT_GEN_MEMBER(contra_state::contra_interrupt) { - contra_state *state = device->machine().driver_data(); - address_space &space = state->generic_space(); - if (k007121_ctrlram_r(state->m_k007121_1, space, 7) & 0x02) - device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); + address_space &space = generic_space(); + if (k007121_ctrlram_r(m_k007121_1, space, 7) & 0x02) + device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(contra_state::contra_bankswitch_w) @@ -192,7 +191,7 @@ static MACHINE_CONFIG_START( contra, contra_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, XTAL_24MHz / 2 /* 3000000*4? */) MCFG_CPU_PROGRAM_MAP(contra_map) - MCFG_CPU_VBLANK_INT("screen", contra_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", contra_state, contra_interrupt) MCFG_CPU_ADD("audiocpu", M6809, XTAL_24MHz/8) /* 3000000? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c index 7c85854ca9b..d6fd3bad0c9 100644 --- a/src/mame/drivers/coolridr.c +++ b/src/mame/drivers/coolridr.c @@ -320,6 +320,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_coolridr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(system_h1); }; @@ -1137,9 +1138,9 @@ INPUT_PORTS_END // IRQs 4, 6 (& 8?) are valid on SH-2 -static INTERRUPT_GEN( system_h1 ) +INTERRUPT_GEN_MEMBER(coolridr_state::system_h1) { - device->execute().set_input_line(4, HOLD_LINE); + device.execute().set_input_line(4, HOLD_LINE); } //IRQs 10,12 and 14 are valid on SH-1 instead @@ -1165,7 +1166,7 @@ void coolridr_state::machine_reset() static MACHINE_CONFIG_START( coolridr, coolridr_state ) MCFG_CPU_ADD("maincpu", SH2, 28000000) // 28 mhz MCFG_CPU_PROGRAM_MAP(system_h1_map) - MCFG_CPU_VBLANK_INT("screen",system_h1) + MCFG_CPU_VBLANK_INT_DRIVER("screen", coolridr_state, system_h1) MCFG_CPU_ADD("soundcpu", M68000, 11289600) //256 x 44100 Hz = 11.2896 MHz MCFG_CPU_PROGRAM_MAP(system_h1_sound_map) diff --git a/src/mame/drivers/cop01.c b/src/mame/drivers/cop01.c index c2866446810..31ec1141ac0 100644 --- a/src/mame/drivers/cop01.c +++ b/src/mame/drivers/cop01.c @@ -454,7 +454,7 @@ static MACHINE_CONFIG_START( cop01, cop01_state ) MCFG_CPU_ADD("maincpu", Z80, MAINCPU_CLOCK/2) /* unknown clock / divider */ MCFG_CPU_PROGRAM_MAP(cop01_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cop01_state, irq0_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3MHz) /* unknown clock / divider, hand-tuned to match audio reference */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -492,7 +492,7 @@ static MACHINE_CONFIG_START( mightguy, cop01_state ) MCFG_CPU_ADD("maincpu", Z80, MAINCPU_CLOCK/2) /* unknown divider */ MCFG_CPU_PROGRAM_MAP(cop01_map) MCFG_CPU_IO_MAP(mightguy_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cop01_state, irq0_line_assert) MCFG_CPU_ADD("audiocpu", Z80, AUDIOCPU_CLOCK/2) /* unknown divider */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/corona.c b/src/mame/drivers/corona.c index 4ba6d045b85..986b91ada6e 100644 --- a/src/mame/drivers/corona.c +++ b/src/mame/drivers/corona.c @@ -1358,12 +1358,12 @@ static MACHINE_CONFIG_START( winner81, corona_state ) MCFG_CPU_ADD("maincpu", Z80, WC81_MAIN_XTAL/8) /* measured */ MCFG_CPU_PROGRAM_MAP(winner81_map) MCFG_CPU_IO_MAP(winner81_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", corona_state, nmi_line_pulse) MCFG_CPU_ADD("soundcpu", Z80, WC81_MAIN_XTAL/10) /* measured */ MCFG_CPU_PROGRAM_MAP(winner81_sound_map) MCFG_CPU_IO_MAP(winner81_sound_cpu_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */ + MCFG_CPU_PERIODIC_INT_DRIVER(corona_state, nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */ MCFG_NVRAM_ADD_0FILL("nvram") @@ -1390,7 +1390,7 @@ static MACHINE_CONFIG_START( winner82, corona_state ) MCFG_CPU_ADD("maincpu", Z80, WC82_MAIN_XTAL/8) /* measured */ MCFG_CPU_PROGRAM_MAP(winner82_map) MCFG_CPU_IO_MAP(winner82_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", corona_state, nmi_line_pulse) MCFG_CPU_ADD("soundcpu", Z80, WC82_MAIN_XTAL/8) /* measured */ MCFG_CPU_PROGRAM_MAP(winner82_sound_map) /* IM1 instead of NMI */ @@ -1420,12 +1420,12 @@ static MACHINE_CONFIG_START( re800, corona_state ) MCFG_CPU_ADD("maincpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */ MCFG_CPU_PROGRAM_MAP(re800_map) MCFG_CPU_IO_MAP(re800_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", corona_state, nmi_line_pulse) MCFG_CPU_ADD("soundcpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */ MCFG_CPU_PROGRAM_MAP(re800_sound_map) MCFG_CPU_IO_MAP(re800_sound_cpu_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */ + MCFG_CPU_PERIODIC_INT_DRIVER(corona_state, nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */ MCFG_NVRAM_ADD_0FILL("nvram") @@ -1451,7 +1451,7 @@ static MACHINE_CONFIG_START( rcirulet, corona_state ) MCFG_CPU_ADD("maincpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */ MCFG_CPU_PROGRAM_MAP(re800_map) MCFG_CPU_IO_MAP(re800_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", corona_state, nmi_line_pulse) MCFG_CPU_ADD("soundcpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */ MCFG_CPU_PROGRAM_MAP(winner82_sound_map) /* IM1 instead of NMI */ @@ -1481,12 +1481,12 @@ static MACHINE_CONFIG_START( luckyrlt, corona_state ) MCFG_CPU_ADD("maincpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */ MCFG_CPU_PROGRAM_MAP(luckyrlt_map) MCFG_CPU_IO_MAP(luckyrlt_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", corona_state, nmi_line_pulse) MCFG_CPU_ADD("soundcpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */ MCFG_CPU_PROGRAM_MAP(luckyrlt_sound_map) MCFG_CPU_IO_MAP(luckyrlt_sound_cpu_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */ + MCFG_CPU_PERIODIC_INT_DRIVER(corona_state, nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */ MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index cf612f93c48..16ab40ea26a 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -326,11 +326,11 @@ WRITE16_MEMBER(cps_state::cpsq_coinctrl2_w) } } -INTERRUPT_GEN( cps1_interrupt ) +INTERRUPT_GEN_MEMBER(cps_state::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->execute().set_input_line(2, HOLD_LINE); + device.execute().set_input_line(2, HOLD_LINE); } /******************************************************************** @@ -341,9 +341,9 @@ INTERRUPT_GEN( cps1_interrupt ) ********************************************************************/ -static INTERRUPT_GEN( cps1_qsound_interrupt ) +INTERRUPT_GEN_MEMBER(cps_state::cps1_qsound_interrupt) { - device->execute().set_input_line(2, HOLD_LINE); + device.execute().set_input_line(2, HOLD_LINE); } @@ -3054,7 +3054,7 @@ static MACHINE_CONFIG_START( cps1_10MHz, cps_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz ) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", cps1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state, cps1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sub_map) @@ -3109,11 +3109,11 @@ static MACHINE_CONFIG_DERIVED( qsound, cps1_12MHz ) MCFG_CPU_REPLACE("maincpu", M68000, XTAL_12MHz ) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(qsound_main_map) - MCFG_CPU_VBLANK_INT("screen", cps1_qsound_interrupt) /* ??? interrupts per frame */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state, cps1_qsound_interrupt) /* ??? interrupts per frame */ MCFG_CPU_REPLACE("audiocpu", Z80, XTAL_8MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(qsound_sub_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 250) /* ?? */ + MCFG_CPU_PERIODIC_INT_DRIVER(cps_state, irq0_line_hold, 250) /* ?? */ MCFG_MACHINE_START_OVERRIDE(cps_state,qsound) @@ -3138,7 +3138,7 @@ static MACHINE_CONFIG_START( cpspicb, cps_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", cps1_qsound_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state, cps1_qsound_interrupt) MCFG_CPU_ADD("audiocpu", PIC16C57, 12000000) MCFG_DEVICE_DISABLE() /* no valid dumps .. */ @@ -3212,7 +3212,7 @@ static MACHINE_CONFIG_START( sf2mdt, cps_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", cps1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state, cps1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(sf2mdt_z80map) @@ -3296,7 +3296,7 @@ static MACHINE_CONFIG_START( knightsb, cps_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 24000000 / 2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", cps1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state, cps1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 29821000 / 8) MCFG_CPU_PROGRAM_MAP(sf2mdt_z80map) diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c index 59cfea2d4f1..9236e1638d1 100644 --- a/src/mame/drivers/cps3.c +++ b/src/mame/drivers/cps3.c @@ -2243,17 +2243,17 @@ static INPUT_PORTS_START( cps3_jojo) PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(2) INPUT_PORTS_END -static INTERRUPT_GEN(cps3_vbl_interrupt) +INTERRUPT_GEN_MEMBER(cps3_state::cps3_vbl_interrupt) { - device->execute().set_input_line(12, ASSERT_LINE); + device.execute().set_input_line(12, ASSERT_LINE); } -static INTERRUPT_GEN(cps3_other_interrupt) +INTERRUPT_GEN_MEMBER(cps3_state::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->execute().set_input_line(10, ASSERT_LINE); + device.execute().set_input_line(10, ASSERT_LINE); } @@ -2494,8 +2494,8 @@ static MACHINE_CONFIG_START( cps3, cps3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", SH2, 6250000*4) // external clock is 6.25 Mhz, it sets the intenral multiplier to 4x (this should probably be handled in the core..) MCFG_CPU_PROGRAM_MAP(cps3_map) - MCFG_CPU_VBLANK_INT("screen", cps3_vbl_interrupt) - MCFG_CPU_PERIODIC_INT(cps3_other_interrupt,80) /* ?source? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps3_state, cps3_vbl_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(cps3_state, cps3_other_interrupt, 80) /* ?source? */ MCFG_CPU_CONFIG(sh2_conf_cps3) MCFG_SCSIBUS_ADD("scsi") diff --git a/src/mame/drivers/crbaloon.c b/src/mame/drivers/crbaloon.c index a9d51f3416d..e3d22444064 100644 --- a/src/mame/drivers/crbaloon.c +++ b/src/mame/drivers/crbaloon.c @@ -355,12 +355,11 @@ void crbaloon_state::machine_reset() * *************************************/ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(crbaloon_state::vblank_irq) { - crbaloon_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -370,7 +369,7 @@ static MACHINE_CONFIG_START( crbaloon, crbaloon_state ) MCFG_CPU_ADD("maincpu", Z80, CRBALOON_MASTER_XTAL / 3) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", crbaloon_state, vblank_irq) /* video hardware */ diff --git a/src/mame/drivers/crgolf.c b/src/mame/drivers/crgolf.c index d325e738c31..23714e40ffd 100644 --- a/src/mame/drivers/crgolf.c +++ b/src/mame/drivers/crgolf.c @@ -404,11 +404,11 @@ static MACHINE_CONFIG_START( crgolf, crgolf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,MASTER_CLOCK/3/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", crgolf_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,MASTER_CLOCK/3/2) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", crgolf_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/crimfght.c b/src/mame/drivers/crimfght.c index 34bd6a5e069..6e844038eda 100644 --- a/src/mame/drivers/crimfght.c +++ b/src/mame/drivers/crimfght.c @@ -23,12 +23,11 @@ /* prototypes */ static KONAMI_SETLINES_CALLBACK( crimfght_banking ); -static INTERRUPT_GEN( crimfght_interrupt ) +INTERRUPT_GEN_MEMBER(crimfght_state::crimfght_interrupt) { - crimfght_state *state = device->machine().driver_data(); - if (k051960_is_irq_enabled(state->m_k051960)) - device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); + if (k051960_is_irq_enabled(m_k051960)) + device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(crimfght_state::crimfght_coin_w) @@ -282,7 +281,7 @@ static MACHINE_CONFIG_START( crimfght, crimfght_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, XTAL_24MHz/8) /* 052001 (verified on pcb) */ MCFG_CPU_PROGRAM_MAP(crimfght_map) - MCFG_CPU_VBLANK_INT("screen", crimfght_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", crimfght_state, crimfght_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(crimfght_sound_map) diff --git a/src/mame/drivers/crospang.c b/src/mame/drivers/crospang.c index 2bc030be116..4b9437dd3d9 100644 --- a/src/mame/drivers/crospang.c +++ b/src/mame/drivers/crospang.c @@ -349,7 +349,7 @@ static MACHINE_CONFIG_START( crospang, crospang_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14318180) MCFG_CPU_PROGRAM_MAP(crospang_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", crospang_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 14318180/4) MCFG_CPU_PROGRAM_MAP(crospang_sound_map) diff --git a/src/mame/drivers/crshrace.c b/src/mame/drivers/crshrace.c index fb7c55d2ff2..0686ef1f2b2 100644 --- a/src/mame/drivers/crshrace.c +++ b/src/mame/drivers/crshrace.c @@ -463,7 +463,7 @@ static MACHINE_CONFIG_START( crshrace, crshrace_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,16000000) /* 16 MHz ??? */ MCFG_CPU_PROGRAM_MAP(crshrace_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", crshrace_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80,4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c index 9421a359b88..984a4ee3a27 100644 --- a/src/mame/drivers/crystal.c +++ b/src/mame/drivers/crystal.c @@ -192,6 +192,7 @@ public: virtual void machine_reset(); UINT32 screen_update_crystal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_crystal(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(crystal_interrupt); }; static void IntReq( running_machine &machine, int num ) @@ -742,9 +743,9 @@ void crystal_state::screen_eof_crystal(screen_device &screen, bool state) } } -static INTERRUPT_GEN(crystal_interrupt) +INTERRUPT_GEN_MEMBER(crystal_state::crystal_interrupt) { - IntReq(device->machine(), 24); //VRender0 VBlank + IntReq(machine(), 24); //VRender0 VBlank } static INPUT_PORTS_START(crystal) @@ -841,7 +842,7 @@ static MACHINE_CONFIG_START( crystal, crystal_state ) MCFG_CPU_ADD("maincpu", SE3208, 43000000) MCFG_CPU_PROGRAM_MAP(crystal_mem) - MCFG_CPU_VBLANK_INT("screen", crystal_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", crystal_state, crystal_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c index 2c305b729c8..d237bd8ad77 100644 --- a/src/mame/drivers/cubeqst.c +++ b/src/mame/drivers/cubeqst.c @@ -57,6 +57,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_cubeqst(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank); }; @@ -192,15 +193,14 @@ READ16_MEMBER(cubeqst_state::line_r) return machine().primary_screen->vpos(); } -static INTERRUPT_GEN( vblank ) +INTERRUPT_GEN_MEMBER(cubeqst_state::vblank) { - cubeqst_state *state = device->machine().driver_data(); - int int_level = state->m_video_field == 0 ? 5 : 6; + int int_level = m_video_field == 0 ? 5 : 6; - device->execute().set_input_line(int_level, HOLD_LINE); + device.execute().set_input_line(int_level, HOLD_LINE); /* Update the laserdisc */ - state->m_video_field ^= 1; + m_video_field ^= 1; } @@ -513,7 +513,7 @@ static const cubeqst_lin_config lin_config = static MACHINE_CONFIG_START( cubeqst, cubeqst_state ) MCFG_CPU_ADD("main_cpu", M68000, XTAL_16MHz / 2) MCFG_CPU_PROGRAM_MAP(m68k_program_map) - MCFG_CPU_VBLANK_INT("screen", vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cubeqst_state, vblank) MCFG_CPU_ADD("rotate_cpu", CQUESTROT, XTAL_10MHz / 2) MCFG_CPU_PROGRAM_MAP(rotate_map) diff --git a/src/mame/drivers/cultures.c b/src/mame/drivers/cultures.c index 9c915e73ec7..52389170423 100644 --- a/src/mame/drivers/cultures.c +++ b/src/mame/drivers/cultures.c @@ -57,6 +57,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_cultures(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cultures_interrupt); }; @@ -362,11 +363,10 @@ static GFXDECODE_START( culture ) GFXDECODE_ENTRY("gfx3", 0, gfxlayout, 0x1000, 0x10 ) GFXDECODE_END -static INTERRUPT_GEN( cultures_interrupt ) +INTERRUPT_GEN_MEMBER(cultures_state::cultures_interrupt) { - cultures_state *state = device->machine().driver_data(); - if (state->m_irq_enable) - device->execute().set_input_line(0, HOLD_LINE); + if (m_irq_enable) + device.execute().set_input_line(0, HOLD_LINE); } void cultures_state::machine_start() @@ -398,7 +398,7 @@ static MACHINE_CONFIG_START( cultures, cultures_state ) MCFG_CPU_ADD("maincpu", Z80, MCLK/2) /* 8.000 MHz */ MCFG_CPU_PROGRAM_MAP(cultures_map) MCFG_CPU_IO_MAP(cultures_io_map) - MCFG_CPU_VBLANK_INT("screen", cultures_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cultures_state, cultures_interrupt) /* video hardware */ diff --git a/src/mame/drivers/cvs.c b/src/mame/drivers/cvs.c index 508d188e9bf..1708ef6eb23 100644 --- a/src/mame/drivers/cvs.c +++ b/src/mame/drivers/cvs.c @@ -226,12 +226,12 @@ WRITE8_MEMBER(cvs_state::cvs_s2636_2_or_character_ram_w) * *************************************/ -static INTERRUPT_GEN( cvs_main_cpu_interrupt ) +INTERRUPT_GEN_MEMBER(cvs_state::cvs_main_cpu_interrupt) { - device->execute().set_input_line_vector(0, 0x03); - generic_pulse_irq_line(device, 0, 1); + device.execute().set_input_line_vector(0, 0x03); + generic_pulse_irq_line(device.execute(), 0, 1); - cvs_scroll_stars(device->machine()); + cvs_scroll_stars(machine()); } @@ -1042,7 +1042,7 @@ static MACHINE_CONFIG_START( cvs, cvs_state ) MCFG_CPU_ADD("maincpu", S2650, 894886.25) MCFG_CPU_PROGRAM_MAP(cvs_main_cpu_map) MCFG_CPU_IO_MAP(cvs_main_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", cvs_main_cpu_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cvs_state, cvs_main_cpu_interrupt) MCFG_CPU_ADD("audiocpu", S2650, 894886.25) MCFG_CPU_PROGRAM_MAP(cvs_dac_cpu_map) diff --git a/src/mame/drivers/cyberbal.c b/src/mame/drivers/cyberbal.c index e547255de08..544426130ca 100644 --- a/src/mame/drivers/cyberbal.c +++ b/src/mame/drivers/cyberbal.c @@ -440,7 +440,7 @@ static MACHINE_CONFIG_START( cyberbal, cyberbal_state ) MCFG_CPU_ADD("dac", M68000, ATARI_CLOCK_14MHz/2) MCFG_CPU_PROGRAM_MAP(sound_68k_map) - MCFG_CPU_PERIODIC_INT(cyberbal_sound_68k_irq_gen, 10000) + MCFG_CPU_PERIODIC_INT_DRIVER(cyberbal_state, cyberbal_sound_68k_irq_gen, 10000) MCFG_QUANTUM_TIME(attotime::from_hz(600)) diff --git a/src/mame/drivers/cybertnk.c b/src/mame/drivers/cybertnk.c index 4e3e801c4d7..7d84b2bb316 100644 --- a/src/mame/drivers/cybertnk.c +++ b/src/mame/drivers/cybertnk.c @@ -834,11 +834,11 @@ static const y8950_interface y8950_config = { static MACHINE_CONFIG_START( cybertnk, cybertnk_state ) MCFG_CPU_ADD("maincpu", M68000,XTAL_20MHz/2) MCFG_CPU_PROGRAM_MAP(master_mem) - MCFG_CPU_VBLANK_INT("lscreen", irq1_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", cybertnk_state, irq1_line_assert) MCFG_CPU_ADD("slave", M68000,XTAL_20MHz/2) MCFG_CPU_PROGRAM_MAP(slave_mem) - MCFG_CPU_VBLANK_INT("lscreen", irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", cybertnk_state, irq3_line_hold) MCFG_CPU_ADD("audiocpu", Z80,XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(sound_mem) diff --git a/src/mame/drivers/cyclemb.c b/src/mame/drivers/cyclemb.c index 3f3ae5fd36b..0e8af71729f 100644 --- a/src/mame/drivers/cyclemb.c +++ b/src/mame/drivers/cyclemb.c @@ -907,7 +907,7 @@ static MACHINE_CONFIG_START( cyclemb, cyclemb_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_18MHz/3) // Z8400BPS MCFG_CPU_PROGRAM_MAP(cyclemb_map) MCFG_CPU_IO_MAP(cyclemb_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cyclemb_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_18MHz/6) MCFG_CPU_PROGRAM_MAP(cyclemb_sound_map) diff --git a/src/mame/drivers/d9final.c b/src/mame/drivers/d9final.c index 55ed1a0d1bc..0f612032f20 100644 --- a/src/mame/drivers/d9final.c +++ b/src/mame/drivers/d9final.c @@ -284,7 +284,7 @@ static MACHINE_CONFIG_START( d9final, d9final_state ) MCFG_CPU_ADD("maincpu", Z80, 24000000/4)/* ? MHz */ MCFG_CPU_PROGRAM_MAP(d9final_map) MCFG_CPU_IO_MAP(d9final_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", d9final_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c index bceae49218e..9afe5c4ec66 100644 --- a/src/mame/drivers/dacholer.c +++ b/src/mame/drivers/dacholer.c @@ -90,6 +90,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_dacholer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sound_irq); }; TILE_GET_INFO_MEMBER(dacholer_state::get_bg_tile_info) @@ -549,12 +550,11 @@ static GFXDECODE_START( itaten ) GFXDECODE_END -static INTERRUPT_GEN( sound_irq ) +INTERRUPT_GEN_MEMBER(dacholer_state::sound_irq) { - dacholer_state *state = device->machine().driver_data(); - if (state->m_music_interrupt_enable == 1) + if (m_music_interrupt_enable == 1) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x30); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x30); } } @@ -652,12 +652,12 @@ static MACHINE_CONFIG_START( dacholer, dacholer_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/4) /* ? */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dacholer_state, irq0_line_assert) MCFG_CPU_ADD("audiocpu", Z80, XTAL_19_968MHz/8) /* ? */ MCFG_CPU_PROGRAM_MAP(snd_map) MCFG_CPU_IO_MAP(snd_io_map) - MCFG_CPU_VBLANK_INT("screen",sound_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dacholer_state, sound_irq) /* video hardware */ diff --git a/src/mame/drivers/dai3wksi.c b/src/mame/drivers/dai3wksi.c index 50b0fe4dd11..15a84c4035b 100644 --- a/src/mame/drivers/dai3wksi.c +++ b/src/mame/drivers/dai3wksi.c @@ -591,7 +591,7 @@ static MACHINE_CONFIG_START( dai3wksi, dai3wksi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_10MHz/4) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dai3wksi_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c index cdf09e14c53..20cef1e0392 100644 --- a/src/mame/drivers/darius.c +++ b/src/mame/drivers/darius.c @@ -918,14 +918,14 @@ static MACHINE_CONFIG_START( darius, darius_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,16000000/2) /* 8 MHz ? */ MCFG_CPU_PROGRAM_MAP(darius_map) - MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", darius_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(darius_sound_map) MCFG_CPU_ADD("cpub", M68000,16000000/2) /* 8 MHz ? */ MCFG_CPU_PROGRAM_MAP(darius_cpub_map) - MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", darius_state, irq4_line_hold) MCFG_CPU_ADD("adpcm", Z80,8000000/2) /* 4 MHz ? */ /* ADPCM player using MSM5205 */ MCFG_CPU_PROGRAM_MAP(darius_sound2_map) diff --git a/src/mame/drivers/darkseal.c b/src/mame/drivers/darkseal.c index 1585ae34e6f..d253097c82e 100644 --- a/src/mame/drivers/darkseal.c +++ b/src/mame/drivers/darkseal.c @@ -263,7 +263,7 @@ static MACHINE_CONFIG_START( darkseal, darkseal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,12000000) /* Custom chip 59 */ MCFG_CPU_PROGRAM_MAP(darkseal_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", darkseal_state, irq6_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", H6280, 32220000/4) /* Custom chip 45, Audio section crystal is 32.220 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/dassault.c b/src/mame/drivers/dassault.c index 1cf0477cc63..094d506f2ef 100644 --- a/src/mame/drivers/dassault.c +++ b/src/mame/drivers/dassault.c @@ -506,11 +506,11 @@ static MACHINE_CONFIG_START( dassault, dassault_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz/2) /* 14MHz - Accurate */ MCFG_CPU_PROGRAM_MAP(dassault_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dassault_state, irq4_line_hold) MCFG_CPU_ADD("sub", M68000, XTAL_28MHz/2) /* 14MHz - Accurate */ MCFG_CPU_PROGRAM_MAP(dassault_sub_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dassault_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", H6280, XTAL_32_22MHz/8) /* Accurate */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index d8e0fc4d93a..21a6a26042a 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -641,7 +641,7 @@ static MACHINE_CONFIG_START( dblewing, dblewing_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) /* DE102 */ MCFG_CPU_PROGRAM_MAP(dblewing_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dblewing_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/dcheese.c b/src/mame/drivers/dcheese.c index 108bf01894d..4fd8898fd79 100644 --- a/src/mame/drivers/dcheese.c +++ b/src/mame/drivers/dcheese.c @@ -79,10 +79,10 @@ void dcheese_signal_irq( running_machine &machine, int which ) } -static INTERRUPT_GEN( dcheese_vblank ) +INTERRUPT_GEN_MEMBER(dcheese_state::dcheese_vblank) { logerror("---- VBLANK ----\n"); - dcheese_signal_irq(device->machine(), 4); + dcheese_signal_irq(machine(), 4); } @@ -409,11 +409,11 @@ static MACHINE_CONFIG_START( dcheese, dcheese_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, MAIN_OSC) MCFG_CPU_PROGRAM_MAP(main_cpu_map) - MCFG_CPU_VBLANK_INT("screen", dcheese_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dcheese_state, dcheese_vblank) MCFG_CPU_ADD("audiocpu", M6809, SOUND_OSC/16) MCFG_CPU_PROGRAM_MAP(sound_cpu_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, 480) /* accurate for fredmem */ + MCFG_CPU_PERIODIC_INT_DRIVER(dcheese_state, irq1_line_hold, 480) /* accurate for fredmem */ MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/dcon.c b/src/mame/drivers/dcon.c index e884a3ea95f..6aa435fbf42 100644 --- a/src/mame/drivers/dcon.c +++ b/src/mame/drivers/dcon.c @@ -251,7 +251,7 @@ static MACHINE_CONFIG_START( dcon, dcon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(dcon_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dcon_state, irq4_line_hold) SEIBU_SOUND_SYSTEM_CPU(4000000) /* Perhaps 14318180/4? */ @@ -278,7 +278,7 @@ static MACHINE_CONFIG_START( sdgndmps, dcon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(dcon_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dcon_state, irq4_line_hold) SEIBU2_SOUND_SYSTEM_CPU(14318180/4) diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c index 6c95e0ca4e0..12b51b81f6e 100644 --- a/src/mame/drivers/ddayjlc.c +++ b/src/mame/drivers/ddayjlc.c @@ -106,6 +106,8 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_ddayjlc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ddayjlc_interrupt); + INTERRUPT_GEN_MEMBER(ddayjlc_snd_interrupt); }; @@ -435,18 +437,16 @@ static const ay8910_interface ay8910_config = DEVCB_NULL }; -static INTERRUPT_GEN( ddayjlc_interrupt ) +INTERRUPT_GEN_MEMBER(ddayjlc_state::ddayjlc_interrupt) { - ddayjlc_state *state = device->machine().driver_data(); - if(state->m_main_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_main_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( ddayjlc_snd_interrupt ) +INTERRUPT_GEN_MEMBER(ddayjlc_state::ddayjlc_snd_interrupt) { - ddayjlc_state *state = device->machine().driver_data(); - if(state->m_sound_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_sound_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -518,11 +518,11 @@ static MACHINE_CONFIG_START( ddayjlc, ddayjlc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,12000000/3) MCFG_CPU_PROGRAM_MAP(main_cpu) - MCFG_CPU_VBLANK_INT("screen", ddayjlc_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ddayjlc_state, ddayjlc_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 12000000/4) MCFG_CPU_PROGRAM_MAP(sound_cpu) - MCFG_CPU_VBLANK_INT("screen", ddayjlc_snd_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ddayjlc_state, ddayjlc_snd_interrupt) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/ddealer.c b/src/mame/drivers/ddealer.c index 5a32e8ea2fd..02214341454 100644 --- a/src/mame/drivers/ddealer.c +++ b/src/mame/drivers/ddealer.c @@ -157,6 +157,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_ddealer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ddealer_interrupt); }; @@ -618,17 +619,17 @@ void ddealer_state::machine_reset() m_coin_input = 0; } -static INTERRUPT_GEN( ddealer_interrupt ) +INTERRUPT_GEN_MEMBER(ddealer_state::ddealer_interrupt) { - device->execute().set_input_line(4, HOLD_LINE); + device.execute().set_input_line(4, HOLD_LINE); } static MACHINE_CONFIG_START( ddealer, ddealer_state ) MCFG_CPU_ADD("maincpu" , M68000, 10000000) MCFG_CPU_PROGRAM_MAP(ddealer) - MCFG_CPU_VBLANK_INT("screen", ddealer_interrupt) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, 90)//guess,controls music tempo,112 is way too fast + MCFG_CPU_VBLANK_INT_DRIVER("screen", ddealer_state, ddealer_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(ddealer_state, irq1_line_hold, 90)//guess,controls music tempo,112 is way too fast // M50747 or NMK-110 8131 MCU diff --git a/src/mame/drivers/ddribble.c b/src/mame/drivers/ddribble.c index ba59864cf75..114c11d4f36 100644 --- a/src/mame/drivers/ddribble.c +++ b/src/mame/drivers/ddribble.c @@ -18,18 +18,16 @@ #include "includes/ddribble.h" -static INTERRUPT_GEN( ddribble_interrupt_0 ) +INTERRUPT_GEN_MEMBER(ddribble_state::ddribble_interrupt_0) { - ddribble_state *state = device->machine().driver_data(); - if (state->m_int_enable_0) - device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); + if (m_int_enable_0) + device.execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } -static INTERRUPT_GEN( ddribble_interrupt_1 ) +INTERRUPT_GEN_MEMBER(ddribble_state::ddribble_interrupt_1) { - ddribble_state *state = device->machine().driver_data(); - if (state->m_int_enable_1) - device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); + if (m_int_enable_1) + device.execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } @@ -282,11 +280,11 @@ static MACHINE_CONFIG_START( ddribble, ddribble_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu0_map) - MCFG_CPU_VBLANK_INT("screen", ddribble_interrupt_0) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ddribble_state, ddribble_interrupt_0) MCFG_CPU_ADD("cpu1", M6809, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu1_map) - MCFG_CPU_VBLANK_INT("screen", ddribble_interrupt_1) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ddribble_state, ddribble_interrupt_1) MCFG_CPU_ADD("cpu2", M6809, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu2_map) diff --git a/src/mame/drivers/ddz.c b/src/mame/drivers/ddz.c index 49cff3f5cb8..dc51f249490 100644 --- a/src/mame/drivers/ddz.c +++ b/src/mame/drivers/ddz.c @@ -25,6 +25,7 @@ public: virtual void video_start(); UINT32 screen_update_ddz(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void screen_eof_ddz(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(ddz_interrupt); }; @@ -47,7 +48,7 @@ void ddz_state::screen_eof_ddz(screen_device &screen, bool state) } -static INTERRUPT_GEN(ddz_interrupt) +INTERRUPT_GEN_MEMBER(ddz_state::ddz_interrupt) { // IntReq(24); //VRender0 VBlank } @@ -66,7 +67,7 @@ static const vr0_interface vr0_config = static MACHINE_CONFIG_START( ddz, ddz_state ) MCFG_CPU_ADD("maincpu", SE3208, 43000000) MCFG_CPU_PROGRAM_MAP(ddz_mem) - MCFG_CPU_VBLANK_INT("screen", ddz_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ddz_state, ddz_interrupt) //MCFG_MACHINE_RESET_OVERRIDE(ddz_state,ddz) diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c index 5a1ab49d6d3..60c84931edf 100644 --- a/src/mame/drivers/dec0.c +++ b/src/mame/drivers/dec0.c @@ -1403,7 +1403,7 @@ static MACHINE_CONFIG_START( automat, dec0_automat_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(automat_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", Z80, 3000000)// ? MCFG_CPU_PROGRAM_MAP(automat_s_map) @@ -1456,7 +1456,7 @@ static MACHINE_CONFIG_START( secretab, dec0_automat_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) /* verified on pcb (20MHZ OSC) 68000P12 running at 10Mhz */ MCFG_CPU_PROGRAM_MAP(secretab_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", Z80, 3000000)// ? MCFG_CPU_PROGRAM_MAP(automat_s_map) @@ -1510,7 +1510,7 @@ static MACHINE_CONFIG_DERIVED( hbarrel, dec0_base_sound ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) MCFG_CPU_PROGRAM_MAP(dec0_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert)/* VBL, level 5 interrupts from i8751 */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_assert)/* VBL, level 5 interrupts from i8751 */ MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz / 8) MCFG_CPU_PROGRAM_MAP(dec0_s_map) @@ -1533,7 +1533,7 @@ static MACHINE_CONFIG_DERIVED( baddudes, dec0_base_sound ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) MCFG_CPU_PROGRAM_MAP(dec0_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert)/* VBL, level 5 interrupts from i8751 */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_assert)/* VBL, level 5 interrupts from i8751 */ MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz / 8) MCFG_CPU_PROGRAM_MAP(dec0_s_map) @@ -1553,7 +1553,7 @@ static MACHINE_CONFIG_DERIVED( birdtry, dec0_base_sound ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) MCFG_CPU_PROGRAM_MAP(dec0_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert)/* VBL, level 5 interrupts from i8751 */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_assert)/* VBL, level 5 interrupts from i8751 */ MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz / 8) MCFG_CPU_PROGRAM_MAP(dec0_s_map) @@ -1573,7 +1573,7 @@ static MACHINE_CONFIG_DERIVED( robocop, dec0_base_sound ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) MCFG_CPU_PROGRAM_MAP(dec0_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_assert)/* VBL */ MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz / 8) MCFG_CPU_PROGRAM_MAP(dec0_s_map) @@ -1598,7 +1598,7 @@ static MACHINE_CONFIG_DERIVED( robocopb, dec0_base_sound ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(dec0_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_assert)/* VBL */ MCFG_CPU_ADD("audiocpu", M6502, 1500000) MCFG_CPU_PROGRAM_MAP(dec0_s_map) @@ -1618,7 +1618,7 @@ static MACHINE_CONFIG_DERIVED( hippodrm, dec0_base_sound ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) MCFG_CPU_PROGRAM_MAP(dec0_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_assert)/* VBL */ MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz / 8) MCFG_CPU_PROGRAM_MAP(dec0_s_map) @@ -1649,7 +1649,7 @@ static MACHINE_CONFIG_DERIVED( slyspy, dec0_base_sound_alt ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) /* verified on pcb (20MHZ OSC) 68000P12 running at 10Mhz */ MCFG_CPU_PROGRAM_MAP(slyspy_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) /* VBL, apparently it auto-acks */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_hold) /* VBL, apparently it auto-acks */ MCFG_CPU_ADD("audiocpu", H6280, XTAL_12MHz/2/3) /* verified on pcb (6Mhz is XIN on pin 10 of H6280, verified on pcb */ MCFG_CPU_PROGRAM_MAP(slyspy_s_map) @@ -1676,7 +1676,7 @@ static MACHINE_CONFIG_DERIVED( midres, dec0_base_sound_alt ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) /* verified on pcb (20MHZ OSC) 68000P12 running at 10Mhz */ MCFG_CPU_PROGRAM_MAP(midres_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", H6280, XTAL_24MHz/4/3) /* verified on pcb (6Mhz is XIN on pin 10 of H6280, verified on pcb */ MCFG_CPU_PROGRAM_MAP(midres_s_map) diff --git a/src/mame/drivers/dec8.c b/src/mame/drivers/dec8.c index 8a6863ae365..a2f3560821f 100644 --- a/src/mame/drivers/dec8.c +++ b/src/mame/drivers/dec8.c @@ -1955,22 +1955,20 @@ static const msm5205_interface msm5205_config = /******************************************************************************/ -static INTERRUPT_GEN( gondo_interrupt ) +INTERRUPT_GEN_MEMBER(dec8_state::gondo_interrupt) { - dec8_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* VBL */ + if (m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* VBL */ } /* Coins generate NMI's */ -static INTERRUPT_GEN( oscar_interrupt ) +INTERRUPT_GEN_MEMBER(dec8_state::oscar_interrupt) { - dec8_state *state = device->machine().driver_data(); - if ((state->ioport("IN2")->read() & 0x7) == 0x7) state->m_latch = 1; - if (state->m_latch && (state->ioport("IN2")->read() & 0x7) != 0x7) + if ((ioport("IN2")->read() & 0x7) == 0x7) m_latch = 1; + if (m_latch && (ioport("IN2")->read() & 0x7) != 0x7) { - state->m_latch = 0; - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + m_latch = 0; + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -2128,7 +2126,7 @@ static MACHINE_CONFIG_START( gondo, dec8_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309,3000000*4) /* HD63C09EP */ MCFG_CPU_PROGRAM_MAP(gondo_map) - MCFG_CPU_VBLANK_INT("screen", gondo_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state, gondo_interrupt) MCFG_CPU_ADD("audiocpu", M6502, 1500000) MCFG_CPU_PROGRAM_MAP(oscar_s_map) @@ -2176,7 +2174,7 @@ static MACHINE_CONFIG_START( garyoret, dec8_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309,3000000*4) /* HD63C09EP */ MCFG_CPU_PROGRAM_MAP(garyoret_map) - MCFG_CPU_VBLANK_INT("screen", gondo_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state, gondo_interrupt) MCFG_CPU_ADD("audiocpu", M6502, 1500000) MCFG_CPU_PROGRAM_MAP(oscar_s_map) @@ -2224,7 +2222,7 @@ static MACHINE_CONFIG_START( ghostb, dec8_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) MCFG_CPU_PROGRAM_MAP(meikyuh_map) - MCFG_CPU_VBLANK_INT("screen", gondo_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state, gondo_interrupt) MCFG_CPU_ADD("audiocpu", M6502, 1500000) MCFG_CPU_PROGRAM_MAP(dec8_s_map) @@ -2279,7 +2277,7 @@ static MACHINE_CONFIG_START( csilver, dec8_state ) MCFG_CPU_ADD("sub", M6809, XTAL_12MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(csilver_sub_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(csilver_s_map) @@ -2328,7 +2326,7 @@ static MACHINE_CONFIG_START( oscar, dec8_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(oscar_map) - MCFG_CPU_VBLANK_INT("screen", oscar_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state, oscar_interrupt) MCFG_CPU_ADD("sub", HD6309, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(oscar_sub_map) @@ -2379,7 +2377,7 @@ static MACHINE_CONFIG_START( srdarwin, dec8_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809,2000000) /* MC68A09EP */ MCFG_CPU_PROGRAM_MAP(srdarwin_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", M6502, 1500000) MCFG_CPU_PROGRAM_MAP(dec8_s_map) @@ -2420,7 +2418,7 @@ static MACHINE_CONFIG_START( cobracom, dec8_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2000000) MCFG_CPU_PROGRAM_MAP(cobra_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", M6502, 1500000) MCFG_CPU_PROGRAM_MAP(dec8_s_map) diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c index 262f6613a6b..a87c9f4be05 100644 --- a/src/mame/drivers/deco156.c +++ b/src/mame/drivers/deco156.c @@ -55,6 +55,7 @@ public: DECLARE_DRIVER_INIT(wcvol95); virtual void video_start(); UINT32 screen_update_wcvol95(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(deco32_vbl_interrupt); }; @@ -313,9 +314,9 @@ static const ymz280b_interface ymz280b_intf = sound_irq_gen }; -static INTERRUPT_GEN( deco32_vbl_interrupt ) +INTERRUPT_GEN_MEMBER(deco156_state::deco32_vbl_interrupt) { - device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); + device.execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); } static int deco156_bank_callback(const int bank) @@ -354,7 +355,7 @@ static MACHINE_CONFIG_START( hvysmsh, deco156_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28000000) /* Unconfirmed */ MCFG_CPU_PROGRAM_MAP(hvysmsh_map) - MCFG_CPU_VBLANK_INT("screen", deco32_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco156_state, deco32_vbl_interrupt) MCFG_EEPROM_93C46_ADD("eeprom") @@ -391,7 +392,7 @@ static MACHINE_CONFIG_START( wcvol95, deco156_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28000000) /* Unconfirmed */ MCFG_CPU_PROGRAM_MAP(wcvol95_map) - MCFG_CPU_VBLANK_INT("screen", deco32_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco156_state, deco32_vbl_interrupt) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c index 6c6c2377686..410dc01da5c 100644 --- a/src/mame/drivers/deco32.c +++ b/src/mame/drivers/deco32.c @@ -1671,9 +1671,9 @@ MACHINE_RESET_MEMBER(deco32_state,deco32) decoprot_reset(machine()); } -static INTERRUPT_GEN( deco32_vbl_interrupt ) +INTERRUPT_GEN_MEMBER(deco32_state::deco32_vbl_interrupt) { - device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); + device.execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); } UINT16 captaven_pri_callback(UINT16 x) @@ -1735,7 +1735,7 @@ static MACHINE_CONFIG_START( captaven, deco32_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, XTAL_28MHz/4) /* verified on pcb (Data East 101 custom)*/ MCFG_CPU_PROGRAM_MAP(captaven_map) - MCFG_CPU_VBLANK_INT("screen", deco32_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco32_state, deco32_vbl_interrupt) MCFG_CPU_ADD("audiocpu", H6280, XTAL_32_22MHz/4/3) /* pin 10 is 32mhz/4, pin 14 is High so internal divisor is 3 (verified on pcb) */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1787,7 +1787,7 @@ static MACHINE_CONFIG_START( fghthist, deco32_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28000000/4) MCFG_CPU_PROGRAM_MAP(fghthist_map) - MCFG_CPU_VBLANK_INT("screen", deco32_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco32_state, deco32_vbl_interrupt) MCFG_CPU_ADD("audiocpu", H6280, 32220000/8) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1834,7 +1834,7 @@ static MACHINE_CONFIG_START( fghthsta, deco32_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28000000/4) MCFG_CPU_PROGRAM_MAP(fghthsta_memmap) - MCFG_CPU_VBLANK_INT("screen", deco32_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco32_state, deco32_vbl_interrupt) MCFG_CPU_ADD("audiocpu", H6280, 32220000/8) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1943,7 +1943,7 @@ static MACHINE_CONFIG_START( dragngun, dragngun_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28000000/4) MCFG_CPU_PROGRAM_MAP(dragngun_map) - MCFG_CPU_VBLANK_INT("screen", deco32_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco32_state, deco32_vbl_interrupt) MCFG_CPU_ADD("audiocpu", H6280, 32220000/8) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2110,7 +2110,7 @@ static MACHINE_CONFIG_START( tattass, deco32_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28000000/*/4*/) /* Unconfirmed - the divider makes it far too slow, due to inaccurate core timings? */ MCFG_CPU_PROGRAM_MAP(tattass_map) - MCFG_CPU_VBLANK_INT("screen", deco32_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco32_state, deco32_vbl_interrupt) MCFG_EEPROM_ADD("eeprom", eeprom_interface_tattass) @@ -2144,7 +2144,7 @@ static MACHINE_CONFIG_START( nslasher, deco32_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28322000/4) MCFG_CPU_PROGRAM_MAP(nslasher_map) - MCFG_CPU_VBLANK_INT("screen", deco32_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco32_state, deco32_vbl_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 32220000/9) MCFG_CPU_PROGRAM_MAP(nslasher_sound) diff --git a/src/mame/drivers/deco_ld.c b/src/mame/drivers/deco_ld.c index bc09dde4da6..235219b9ead 100644 --- a/src/mame/drivers/deco_ld.c +++ b/src/mame/drivers/deco_ld.c @@ -147,6 +147,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); virtual void machine_start(); UINT32 screen_update_rblaster(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sound_interrupt); }; static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *spriteram, UINT16 tile_bank ) @@ -295,10 +296,9 @@ WRITE8_MEMBER(deco_ld_state::nmimask_w) } #endif -static INTERRUPT_GEN ( sound_interrupt ) +INTERRUPT_GEN_MEMBER(deco_ld_state::sound_interrupt) { - deco_ld_state *state = device->machine().driver_data(); - if (!state->m_nmimask) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (!m_nmimask) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -459,11 +459,11 @@ static MACHINE_CONFIG_START( rblaster, deco_ld_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M6502,8000000/2) MCFG_CPU_PROGRAM_MAP(rblaster_map) - MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deco_ld_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu",M6502,8000000/2) MCFG_CPU_PROGRAM_MAP(rblaster_sound_map) - MCFG_CPU_PERIODIC_INT(sound_interrupt, 640) + MCFG_CPU_PERIODIC_INT_DRIVER(deco_ld_state, sound_interrupt, 640) // MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/deniam.c b/src/mame/drivers/deniam.c index 0f7b4839481..58209aa9086 100644 --- a/src/mame/drivers/deniam.c +++ b/src/mame/drivers/deniam.c @@ -272,7 +272,7 @@ static MACHINE_CONFIG_START( deniam16b, deniam_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,XTAL_25MHz/2) /* 12.5Mhz verified */ MCFG_CPU_PROGRAM_MAP(deniam16b_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deniam_state, irq4_line_assert) MCFG_CPU_ADD("audiocpu", Z80,XTAL_25MHz/4) /* 6.25Mhz verified */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -308,7 +308,7 @@ static MACHINE_CONFIG_START( deniam16c, deniam_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,XTAL_25MHz/2) /* 12.5Mhz verified */ MCFG_CPU_PROGRAM_MAP(deniam16c_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", deniam_state, irq4_line_assert) /* video hardware */ diff --git a/src/mame/drivers/deshoros.c b/src/mame/drivers/deshoros.c index a59a28765ec..e50116107be 100644 --- a/src/mame/drivers/deshoros.c +++ b/src/mame/drivers/deshoros.c @@ -261,7 +261,7 @@ static MACHINE_CONFIG_START( destiny, destiny_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, XTAL_4MHz/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 60) // timer irq controls update speed, frequency needs to be determined yet (2MHz through three 74LS390) + MCFG_CPU_PERIODIC_INT_DRIVER(destiny_state, irq0_line_hold, 60) // timer irq controls update speed, frequency needs to be determined yet (2MHz through three 74LS390) /* video hardware (dummy) */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c index 202f3ea43ad..6f0d27ea2ee 100644 --- a/src/mame/drivers/destroyr.c +++ b/src/mame/drivers/destroyr.c @@ -452,7 +452,7 @@ static MACHINE_CONFIG_START( destroyr, destroyr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800, XTAL_12_096MHz / 16) MCFG_CPU_PROGRAM_MAP(destroyr_map) - MCFG_CPU_PERIODIC_INT(irq0_line_assert, 4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(destroyr_state, irq0_line_assert, 4*60) /* video hardware */ diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c index ce0a4c83f2b..b6b5fcaa73c 100644 --- a/src/mame/drivers/dietgo.c +++ b/src/mame/drivers/dietgo.c @@ -208,7 +208,7 @@ static MACHINE_CONFIG_START( dietgo, dietgo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz/2) /* DE102 (verified on pcb) */ MCFG_CPU_PROGRAM_MAP(dietgo_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dietgo_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", H6280, XTAL_32_22MHz/4/3) /* Custom chip 45; XIN is 32.220MHZ/4, verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c index 53019051e0f..30c9c1b5134 100644 --- a/src/mame/drivers/discoboy.c +++ b/src/mame/drivers/discoboy.c @@ -498,11 +498,11 @@ static MACHINE_CONFIG_START( discoboy, discoboy_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz? */ MCFG_CPU_PROGRAM_MAP(discoboy_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", discoboy_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,10000000/2) /* 5 MHz? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,32*60) + MCFG_CPU_PERIODIC_INT_DRIVER(discoboy_state, nmi_line_pulse, 32*60) /* video hardware */ diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c index 372380f5e1f..771f7c5d129 100644 --- a/src/mame/drivers/diverboy.c +++ b/src/mame/drivers/diverboy.c @@ -257,7 +257,7 @@ static MACHINE_CONFIG_START( diverboy, diverboy_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) /* guess */ MCFG_CPU_PROGRAM_MAP(diverboy_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", diverboy_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(snd_map) diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c index 80bb595b6fd..ede34e453b7 100644 --- a/src/mame/drivers/djboy.c +++ b/src/mame/drivers/djboy.c @@ -577,12 +577,12 @@ static MACHINE_CONFIG_START( djboy, djboy_state ) MCFG_CPU_ADD("cpu1", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(cpu1_am) MCFG_CPU_IO_MAP(cpu1_port_am) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", djboy_state, irq0_line_hold) MCFG_CPU_ADD("cpu2", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(cpu2_am) MCFG_CPU_IO_MAP(cpu2_port_am) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", djboy_state, irq0_line_hold) MCFG_CPU_ADD("beast", I80C51, 6000000) MCFG_CPU_IO_MAP(djboy_mcu_io_map) diff --git a/src/mame/drivers/djmain.c b/src/mame/drivers/djmain.c index 78f646b546a..c802605a090 100644 --- a/src/mame/drivers/djmain.c +++ b/src/mame/drivers/djmain.c @@ -74,7 +74,7 @@ hard drive 3.5 adapter long 3.5 IDE cable 3.5 adapter PCB -#define DISABLE_VB_INT (!(state->m_v_ctrl & 0x8000)) +#define DISABLE_VB_INT (!(m_v_ctrl & 0x8000)) @@ -396,19 +396,18 @@ WRITE32_MEMBER(djmain_state::unknownc02000_w) * *************************************/ -static INTERRUPT_GEN( vb_interrupt ) +INTERRUPT_GEN_MEMBER(djmain_state::vb_interrupt) { - djmain_state *state = device->machine().driver_data(); - state->m_pending_vb_int = 0; + m_pending_vb_int = 0; if (DISABLE_VB_INT) { - state->m_pending_vb_int = 1; + m_pending_vb_int = 1; return; } //logerror("V-Blank interrupt\n"); - device->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); + device.execute().set_input_line(M68K_IRQ_4, HOLD_LINE); } @@ -1460,7 +1459,7 @@ static MACHINE_CONFIG_START( djmain, djmain_state ) //MCFG_CPU_ADD("maincpu", M68EC020, 18432000/2) /* 9.216 MHz!? */ MCFG_CPU_ADD("maincpu", M68EC020, 32000000/4) /* 8.000 MHz!? */ MCFG_CPU_PROGRAM_MAP(memory_map) - MCFG_CPU_VBLANK_INT("screen", vb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", djmain_state, vb_interrupt) MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true) diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index b6042d6f12b..01023ed37b7 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -389,9 +389,9 @@ static I8257_INTERFACE( hb_dma ) * *************************************/ -static INTERRUPT_GEN( s2650_interrupt ) +INTERRUPT_GEN_MEMBER(dkong_state::s2650_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); } /************************************* @@ -1638,12 +1638,11 @@ static void braze_decrypt_rom(running_machine &machine, UINT8 *dest) * *************************************/ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(dkong_state::vblank_irq) { - dkong_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( dkong_base, dkong_state ) @@ -1651,7 +1650,7 @@ static MACHINE_CONFIG_START( dkong_base, dkong_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, CLOCK_1H) MCFG_CPU_PROGRAM_MAP(dkong_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dkong_state, vblank_irq) MCFG_MACHINE_START_OVERRIDE(dkong_state,dkong2b) MCFG_MACHINE_RESET_OVERRIDE(dkong_state,dkong) @@ -1715,7 +1714,7 @@ static MACHINE_CONFIG_START( dkong3, dkong_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz / 2) /* verified in schematics */ MCFG_CPU_PROGRAM_MAP(dkong3_map) MCFG_CPU_IO_MAP(dkong3_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dkong_state, vblank_irq) MCFG_MACHINE_START_OVERRIDE(dkong_state,dkong3) @@ -1774,7 +1773,7 @@ static MACHINE_CONFIG_DERIVED( s2650, dkong2b ) MCFG_CPU_REPLACE("maincpu", S2650, CLOCK_1H / 2) /* ??? */ MCFG_CPU_PROGRAM_MAP(s2650_map) MCFG_CPU_IO_MAP(s2650_io_map) - MCFG_CPU_VBLANK_INT("screen", s2650_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dkong_state, s2650_interrupt) MCFG_DEVICE_MODIFY("dma8257") MCFG_DEVICE_CONFIG(hb_dma) diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index c99f3ffa7cb..2499adb6927 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -114,6 +114,7 @@ public: DECLARE_MACHINE_RESET(dlair); DECLARE_PALETTE_INIT(dleuro); UINT32 screen_update_dleuro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_callback); }; @@ -277,13 +278,13 @@ MACHINE_RESET_MEMBER(dlair_state,dlair) * *************************************/ -static INTERRUPT_GEN( vblank_callback ) +INTERRUPT_GEN_MEMBER(dlair_state::vblank_callback) { /* also update the speaker on the European version */ - beep_device *beep = device->machine().device("beep"); + beep_device *beep = machine().device("beep"); if (beep != NULL) { - z80ctc_device *ctc = device->machine().device("ctc"); + z80ctc_device *ctc = machine().device("ctc"); beep_set_state(beep, 1); beep_set_frequency(beep, ATTOSECONDS_TO_HZ(ctc->period(0).attoseconds)); } @@ -723,8 +724,8 @@ static MACHINE_CONFIG_START( dlair_base, dlair_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK_US/4) MCFG_CPU_PROGRAM_MAP(dlus_map) - MCFG_CPU_VBLANK_INT("screen", vblank_callback) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, (double)MASTER_CLOCK_US/8/16/16/16/16) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dlair_state, vblank_callback) + MCFG_CPU_PERIODIC_INT_DRIVER(dlair_state, irq0_line_hold, (double)MASTER_CLOCK_US/8/16/16/16/16) MCFG_MACHINE_START_OVERRIDE(dlair_state,dlair) MCFG_MACHINE_RESET_OVERRIDE(dlair_state,dlair) @@ -761,7 +762,7 @@ static MACHINE_CONFIG_START( dleuro, dlair_state ) MCFG_CPU_CONFIG(dleuro_daisy_chain) MCFG_CPU_PROGRAM_MAP(dleuro_map) MCFG_CPU_IO_MAP(dleuro_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_callback) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dlair_state, vblank_callback) MCFG_Z80CTC_ADD("ctc", MASTER_CLOCK_EURO/4 /* same as "maincpu" */, ctc_intf) MCFG_Z80SIO_ADD("sio", MASTER_CLOCK_EURO/4 /* same as "maincpu" */, sio_intf) diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c index e9da0f5852b..76a1cd8273a 100644 --- a/src/mame/drivers/dmndrby.c +++ b/src/mame/drivers/dmndrby.c @@ -81,6 +81,8 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_dderby(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(dderby_irq); + INTERRUPT_GEN_MEMBER(dderby_timer_irq); }; @@ -498,22 +500,22 @@ void dmndrby_state::palette_init() } /*Main Z80 is IM 0,HW-latched irqs. */ -static INTERRUPT_GEN( dderby_irq ) +INTERRUPT_GEN_MEMBER(dmndrby_state::dderby_irq) { - device->machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ + machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ } -static INTERRUPT_GEN( dderby_timer_irq ) +INTERRUPT_GEN_MEMBER(dmndrby_state::dderby_timer_irq) { - device->machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */ + machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */ } static MACHINE_CONFIG_START( dderby, dmndrby_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,4000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(memmap) - MCFG_CPU_VBLANK_INT("screen", dderby_irq) - MCFG_CPU_PERIODIC_INT(dderby_timer_irq, 244/2) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dmndrby_state, dderby_irq) + MCFG_CPU_PERIODIC_INT_DRIVER(dmndrby_state, dderby_timer_irq, 244/2) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* verified on schematics */ MCFG_CPU_PROGRAM_MAP(dderby_sound_map) diff --git a/src/mame/drivers/docastle.c b/src/mame/drivers/docastle.c index ff69b5d7460..96d72bfbc58 100644 --- a/src/mame/drivers/docastle.c +++ b/src/mame/drivers/docastle.c @@ -604,15 +604,15 @@ static MACHINE_CONFIG_START( docastle, docastle_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(docastle_map) MCFG_CPU_IO_MAP(docastle_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", docastle_state, irq0_line_hold) MCFG_CPU_ADD("slave", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(docastle_map2) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 8*60) + MCFG_CPU_PERIODIC_INT_DRIVER(docastle_state, irq0_line_hold, 8*60) MCFG_CPU_ADD("cpu3", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(docastle_map3) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", docastle_state, nmi_line_pulse) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/dogfgt.c b/src/mame/drivers/dogfgt.c index 729168fd2f4..c616af2a460 100644 --- a/src/mame/drivers/dogfgt.c +++ b/src/mame/drivers/dogfgt.c @@ -242,7 +242,7 @@ static MACHINE_CONFIG_START( dogfgt, dogfgt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 1500000) /* 1.5 MHz ???? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,16*60) /* ? controls music tempo */ + MCFG_CPU_PERIODIC_INT_DRIVER(dogfgt_state, irq0_line_hold, 16*60) /* ? controls music tempo */ MCFG_CPU_ADD("sub", M6502, 1500000) /* 1.5 MHz ???? */ MCFG_CPU_PROGRAM_MAP(sub_map) diff --git a/src/mame/drivers/dominob.c b/src/mame/drivers/dominob.c index d840eaa2545..34186cad893 100644 --- a/src/mame/drivers/dominob.c +++ b/src/mame/drivers/dominob.c @@ -299,7 +299,7 @@ static MACHINE_CONFIG_START( dominob, dominob_state ) MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) MCFG_CPU_PROGRAM_MAP(memmap) MCFG_CPU_IO_MAP(portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dominob_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/dooyong.c b/src/mame/drivers/dooyong.c index 3a1700401f1..2a522ad2345 100644 --- a/src/mame/drivers/dooyong.c +++ b/src/mame/drivers/dooyong.c @@ -865,7 +865,7 @@ static MACHINE_CONFIG_START( lastday, dooyong_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(lastday_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dooyong_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(lastday_sound_map) @@ -908,7 +908,7 @@ static MACHINE_CONFIG_START( gulfstrm, dooyong_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(gulfstrm_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dooyong_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(lastday_sound_map) @@ -941,7 +941,7 @@ static MACHINE_CONFIG_START( pollux, dooyong_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(pollux_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dooyong_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(pollux_sound_map) @@ -974,7 +974,7 @@ static MACHINE_CONFIG_START( bluehawk, dooyong_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(bluehawk_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dooyong_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map) @@ -1006,7 +1006,7 @@ static MACHINE_CONFIG_START( flytiger, dooyong_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(flytiger_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dooyong_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map) @@ -1038,7 +1038,7 @@ static MACHINE_CONFIG_START( primella, dooyong_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 8000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(primella_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dooyong_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map) diff --git a/src/mame/drivers/dorachan.c b/src/mame/drivers/dorachan.c index cee73b77946..774bb48b9ec 100644 --- a/src/mame/drivers/dorachan.c +++ b/src/mame/drivers/dorachan.c @@ -243,7 +243,7 @@ static MACHINE_CONFIG_START( dorachan, dorachan_state ) MCFG_CPU_ADD("maincpu", Z80, 2000000) MCFG_CPU_PROGRAM_MAP(dorachan_map) MCFG_CPU_IO_MAP(dorachan_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(dorachan_state, irq0_line_hold, 2*60) /* video hardware */ diff --git a/src/mame/drivers/dotrikun.c b/src/mame/drivers/dotrikun.c index 7e4bd3ffdcf..4bd41e3efac 100644 --- a/src/mame/drivers/dotrikun.c +++ b/src/mame/drivers/dotrikun.c @@ -155,7 +155,7 @@ static MACHINE_CONFIG_START( dotrikun, dotrikun_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(dotrikun_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dotrikun_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/dragrace.c b/src/mame/drivers/dragrace.c index 1fe7413dc36..a6c06e21aa9 100644 --- a/src/mame/drivers/dragrace.c +++ b/src/mame/drivers/dragrace.c @@ -332,7 +332,7 @@ static MACHINE_CONFIG_START( dragrace, dragrace_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800, XTAL_12_096MHz / 12) MCFG_CPU_PROGRAM_MAP(dragrace_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(dragrace_state, irq0_line_hold, 4*60) MCFG_WATCHDOG_VBLANK_INIT(8) diff --git a/src/mame/drivers/dreamwld.c b/src/mame/drivers/dreamwld.c index 2aa5016002c..fc0f33098c9 100644 --- a/src/mame/drivers/dreamwld.c +++ b/src/mame/drivers/dreamwld.c @@ -589,7 +589,7 @@ static MACHINE_CONFIG_START( baryon, dreamwld_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, MASTER_CLOCK/2) MCFG_CPU_PROGRAM_MAP(baryon_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold ) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dreamwld_state, irq4_line_hold) /* video hardware */ @@ -617,7 +617,7 @@ static MACHINE_CONFIG_DERIVED( dreamwld, baryon ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(dreamwld_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dreamwld_state, irq4_line_hold) MCFG_OKIM6295_ADD("oki2", MASTER_CLOCK/32, OKIM6295_PIN7_LOW) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) diff --git a/src/mame/drivers/drgnmst.c b/src/mame/drivers/drgnmst.c index a866ba0021c..8244106901b 100644 --- a/src/mame/drivers/drgnmst.c +++ b/src/mame/drivers/drgnmst.c @@ -397,7 +397,7 @@ static MACHINE_CONFIG_START( drgnmst, drgnmst_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) /* Confirmed */ MCFG_CPU_PROGRAM_MAP(drgnmst_main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", drgnmst_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C55, 32000000/8) /* Confirmed */ /* Program and Data Maps are internal to the MCU */ diff --git a/src/mame/drivers/dribling.c b/src/mame/drivers/dribling.c index 85963f36b8c..544a5dbd705 100644 --- a/src/mame/drivers/dribling.c +++ b/src/mame/drivers/dribling.c @@ -38,11 +38,10 @@ * *************************************/ -static INTERRUPT_GEN( dribling_irq_gen ) +INTERRUPT_GEN_MEMBER(dribling_state::dribling_irq_gen) { - dribling_state *state = device->machine().driver_data(); - if (state->m_di) - device->execute().set_input_line(0, ASSERT_LINE); + if (m_di) + device.execute().set_input_line(0, ASSERT_LINE); } @@ -305,7 +304,7 @@ static MACHINE_CONFIG_START( dribling, dribling_state ) MCFG_CPU_ADD("maincpu", Z80, 5000000) MCFG_CPU_PROGRAM_MAP(dribling_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", dribling_irq_gen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dribling_state, dribling_irq_gen) MCFG_I8255A_ADD( "ppi8255_0", ppi8255_0_intf ) MCFG_I8255A_ADD( "ppi8255_1", ppi8255_1_intf ) diff --git a/src/mame/drivers/drmicro.c b/src/mame/drivers/drmicro.c index fe53f04931b..e04447e2cdb 100644 --- a/src/mame/drivers/drmicro.c +++ b/src/mame/drivers/drmicro.c @@ -23,12 +23,11 @@ Quite similar to Appoooh * *************************************/ -static INTERRUPT_GEN( drmicro_interrupt ) +INTERRUPT_GEN_MEMBER(drmicro_state::drmicro_interrupt) { - drmicro_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(drmicro_state::nmi_enable_w) @@ -263,7 +262,7 @@ static MACHINE_CONFIG_START( drmicro, drmicro_state ) MCFG_CPU_ADD("maincpu", Z80,MCLK/6) /* 3.072MHz? */ MCFG_CPU_PROGRAM_MAP(drmicro_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", drmicro_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", drmicro_state, drmicro_interrupt) MCFG_QUANTUM_TIME(attotime::from_hz(60)) diff --git a/src/mame/drivers/drtomy.c b/src/mame/drivers/drtomy.c index 4e6e54000a7..bb30862ba75 100644 --- a/src/mame/drivers/drtomy.c +++ b/src/mame/drivers/drtomy.c @@ -300,7 +300,7 @@ static MACHINE_CONFIG_START( drtomy, drtomy_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(drtomy_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", drtomy_state, irq6_line_hold) /* video hardware */ diff --git a/src/mame/drivers/drw80pkr.c b/src/mame/drivers/drw80pkr.c index 20e0a85a665..bc229a3bb13 100644 --- a/src/mame/drivers/drw80pkr.c +++ b/src/mame/drivers/drw80pkr.c @@ -467,7 +467,7 @@ static MACHINE_CONFIG_START( drw80pkr, drw80pkr_state ) MCFG_CPU_ADD("maincpu", I8039, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(drw80pkr_map) MCFG_CPU_IO_MAP(drw80pkr_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", drw80pkr_state, irq0_line_hold) // video hardware diff --git a/src/mame/drivers/dunhuang.c b/src/mame/drivers/dunhuang.c index c1a4cfa6c95..5c385f99ec0 100644 --- a/src/mame/drivers/dunhuang.c +++ b/src/mame/drivers/dunhuang.c @@ -819,7 +819,7 @@ static MACHINE_CONFIG_START( dunhuang, dunhuang_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) MCFG_CPU_PROGRAM_MAP(dunhuang_map) MCFG_CPU_IO_MAP(dunhuang_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dunhuang_state, irq0_line_hold) MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(5)) diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c index dda1ca86c4a..4c664b96d81 100644 --- a/src/mame/drivers/dynax.c +++ b/src/mame/drivers/dynax.c @@ -117,11 +117,10 @@ WRITE8_MEMBER(dynax_state::dynax_blitter_ack_w) sprtmtch_update_irq(machine()); } -static INTERRUPT_GEN( sprtmtch_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(dynax_state::sprtmtch_vblank_interrupt) { - dynax_state *state = device->machine().driver_data(); - state->m_vblank_irq = 1; - sprtmtch_update_irq(device->machine()); + m_vblank_irq = 1; + sprtmtch_update_irq(machine()); } static void sprtmtch_sound_callback( device_t *device, int state ) @@ -162,11 +161,10 @@ WRITE8_MEMBER(dynax_state::jantouki_blitter2_ack_w) jantouki_update_irq(machine()); } -static INTERRUPT_GEN( jantouki_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(dynax_state::jantouki_vblank_interrupt) { - dynax_state *state = device->machine().driver_data(); - state->m_vblank_irq = 1; - jantouki_update_irq(device->machine()); + m_vblank_irq = 1; + jantouki_update_irq(machine()); } @@ -181,11 +179,10 @@ static void jantouki_sound_update_irq(running_machine &machine) 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 ) +INTERRUPT_GEN_MEMBER(dynax_state::jantouki_sound_vblank_interrupt) { - dynax_state *state = device->machine().driver_data(); - state->m_sound_vblank_irq = 1; - jantouki_sound_update_irq(device->machine()); + m_sound_vblank_irq = 1; + jantouki_sound_update_irq(machine()); } WRITE8_MEMBER(dynax_state::jantouki_sound_vblank_ack_w) @@ -4288,7 +4285,7 @@ static MACHINE_CONFIG_START( hanamai, dynax_state ) MCFG_CPU_ADD("maincpu",Z80,22000000 / 4) /* 5.5MHz */ MCFG_CPU_PROGRAM_MAP(sprtmtch_mem_map) MCFG_CPU_IO_MAP(hanamai_io_map) - MCFG_CPU_VBLANK_INT("screen", sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state, sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ MCFG_MACHINE_START_OVERRIDE(dynax_state,hanamai) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) @@ -4345,7 +4342,7 @@ static MACHINE_CONFIG_START( hnoridur, dynax_state ) MCFG_CPU_ADD("maincpu",Z80,22000000 / 4) /* 5.5MHz */ MCFG_CPU_PROGRAM_MAP(hnoridur_mem_map) MCFG_CPU_IO_MAP(hnoridur_io_map) - MCFG_CPU_VBLANK_INT("screen", sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state, sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ MCFG_MACHINE_START_OVERRIDE(dynax_state,hnoridur) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) @@ -4390,7 +4387,7 @@ static MACHINE_CONFIG_START( hjingi, dynax_state ) MCFG_CPU_ADD("maincpu",Z80, XTAL_22MHz / 4) MCFG_CPU_PROGRAM_MAP(hjingi_mem_map) MCFG_CPU_IO_MAP(hjingi_io_map) - MCFG_CPU_VBLANK_INT("screen", sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state, sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ MCFG_MACHINE_START_OVERRIDE(dynax_state,hnoridur) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) @@ -4448,7 +4445,7 @@ static MACHINE_CONFIG_START( sprtmtch, dynax_state ) MCFG_CPU_ADD("maincpu", Z80,22000000 / 4) /* 5.5MHz */ MCFG_CPU_PROGRAM_MAP(sprtmtch_mem_map) MCFG_CPU_IO_MAP(sprtmtch_io_map) - MCFG_CPU_VBLANK_INT("screen", sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state, sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ MCFG_MACHINE_START_OVERRIDE(dynax_state,hanamai) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) @@ -4490,7 +4487,7 @@ static MACHINE_CONFIG_START( mjfriday, dynax_state ) MCFG_CPU_ADD("maincpu",Z80,24000000/4) /* 6 MHz? */ MCFG_CPU_PROGRAM_MAP(sprtmtch_mem_map) MCFG_CPU_IO_MAP(mjfriday_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(dynax_state,hanamai) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) @@ -4538,17 +4535,16 @@ MACHINE_CONFIG_END what was it trying to do? set an irq and clear it before its even taken? */ -static INTERRUPT_GEN( yarunara_clock_interrupt ) +INTERRUPT_GEN_MEMBER(dynax_state::yarunara_clock_interrupt) { - dynax_state *state = device->machine().driver_data(); - state->m_yarunara_clk_toggle ^= 1; + m_yarunara_clk_toggle ^= 1; - if (state->m_yarunara_clk_toggle == 1) - state->m_sound_irq = 0; + if (m_yarunara_clk_toggle == 1) + m_sound_irq = 0; else - state->m_sound_irq = 1; + m_sound_irq = 1; - sprtmtch_update_irq(device->machine()); + sprtmtch_update_irq(machine()); } static MSM6242_INTERFACE( yarunara_rtc_intf ) @@ -4562,7 +4558,7 @@ static MACHINE_CONFIG_DERIVED( yarunara, hnoridur ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(yarunara_mem_map) MCFG_CPU_IO_MAP(yarunara_io_map) - MCFG_CPU_PERIODIC_INT(yarunara_clock_interrupt, 60) // RTC + MCFG_CPU_PERIODIC_INT_DRIVER(dynax_state, yarunara_clock_interrupt, 60) // RTC MCFG_NVRAM_REPLACE_0FILL("nvram") @@ -4646,12 +4642,12 @@ static MACHINE_CONFIG_START( jantouki, dynax_state ) MCFG_CPU_ADD("maincpu",Z80,22000000 / 4) /* 5.5MHz */ MCFG_CPU_PROGRAM_MAP(jantouki_mem_map) MCFG_CPU_IO_MAP(jantouki_io_map) - MCFG_CPU_VBLANK_INT("top", jantouki_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ + MCFG_CPU_VBLANK_INT_DRIVER("top", dynax_state, jantouki_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ MCFG_CPU_ADD("soundcpu",Z80,22000000 / 4) /* 5.5MHz */ MCFG_CPU_PROGRAM_MAP(jantouki_sound_mem_map) MCFG_CPU_IO_MAP(jantouki_sound_io_map) - MCFG_CPU_VBLANK_INT("top", jantouki_sound_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ + MCFG_CPU_VBLANK_INT_DRIVER("top", dynax_state, jantouki_sound_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ MCFG_MACHINE_START_OVERRIDE(dynax_state,jantouki) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) @@ -4715,21 +4711,20 @@ void mjelctrn_update_irq( running_machine &machine ) state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfa); } -static INTERRUPT_GEN( mjelctrn_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(dynax_state::mjelctrn_vblank_interrupt) { - dynax_state *state = device->machine().driver_data(); // This is a kludge to avoid losing blitter interrupts // there should be a vblank ack mechanism - if (!state->m_blitter_irq) - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xf8); + if (!m_blitter_irq) + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xf8); } static MACHINE_CONFIG_DERIVED( mjelctrn, hnoridur ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(nanajign_mem_map) MCFG_CPU_IO_MAP(mjelctrn_io_map) - MCFG_CPU_VBLANK_INT("screen", mjelctrn_vblank_interrupt) /* IM 2 needs a vector on the data bus */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state, mjelctrn_vblank_interrupt) /* IM 2 needs a vector on the data bus */ MCFG_VIDEO_START_OVERRIDE(dynax_state,mjelctrn) MACHINE_CONFIG_END @@ -4826,8 +4821,8 @@ static MACHINE_CONFIG_START( htengoku, dynax_state ) MCFG_CPU_ADD("maincpu",Z80,20000000 / 4) MCFG_CPU_PROGRAM_MAP(yarunara_mem_map) MCFG_CPU_IO_MAP(htengoku_io_map) - MCFG_CPU_VBLANK_INT("screen", sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ - MCFG_CPU_PERIODIC_INT(yarunara_clock_interrupt, 60) // RTC + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state, sprtmtch_vblank_interrupt) /* IM 0 needs an opcode on the data bus */ + MCFG_CPU_PERIODIC_INT_DRIVER(dynax_state, yarunara_clock_interrupt, 60) // RTC MCFG_MACHINE_START_OVERRIDE(dynax_state,htengoku) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) @@ -4979,7 +4974,7 @@ static MACHINE_CONFIG_START( gekisha, dynax_state ) MCFG_CPU_ADD("maincpu",TMP90841, XTAL_10MHz ) // ? MCFG_CPU_PROGRAM_MAP(gekisha_map) MCFG_CPU_IO_MAP(gekisha_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(dynax_state,gekisha) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,gekisha) diff --git a/src/mame/drivers/dynduke.c b/src/mame/drivers/dynduke.c index f9e7f9c27a2..1d4b0b85173 100644 --- a/src/mame/drivers/dynduke.c +++ b/src/mame/drivers/dynduke.c @@ -263,9 +263,9 @@ GFXDECODE_END /* Interrupt Generator */ -static INTERRUPT_GEN( dynduke_interrupt ) +INTERRUPT_GEN_MEMBER(dynduke_state::dynduke_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // VBL + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // VBL } /* Machine Driver */ @@ -274,11 +274,11 @@ static MACHINE_CONFIG_START( dynduke, dynduke_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", V30, 16000000/2) // NEC V30-8 CPU MCFG_CPU_PROGRAM_MAP(master_map) - MCFG_CPU_VBLANK_INT("screen", dynduke_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynduke_state, dynduke_interrupt) MCFG_CPU_ADD("slave", V30, 16000000/2) // NEC V30-8 CPU MCFG_CPU_PROGRAM_MAP(slave_map) - MCFG_CPU_VBLANK_INT("screen", dynduke_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynduke_state, dynduke_interrupt) SEIBU_SOUND_SYSTEM_CPU(14318180/4) diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c index 6d7801658e4..c83c005f315 100644 --- a/src/mame/drivers/egghunt.c +++ b/src/mame/drivers/egghunt.c @@ -412,7 +412,7 @@ static MACHINE_CONFIG_START( egghunt, egghunt_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz ?*/ MCFG_CPU_PROGRAM_MAP(egghunt_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) // or 2 like mitchell.c? + MCFG_CPU_VBLANK_INT_DRIVER("screen", egghunt_state, irq0_line_hold) // or 2 like mitchell.c? MCFG_CPU_ADD("audiocpu", Z80,12000000/2) /* 6 MHz ?*/ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c index 13572a19bbc..07b07cb2db1 100644 --- a/src/mame/drivers/enigma2.c +++ b/src/mame/drivers/enigma2.c @@ -611,7 +611,7 @@ static MACHINE_CONFIG_START( enigma2, enigma2_state ) MCFG_CPU_ADD("audiocpu", Z80, 2500000) MCFG_CPU_PROGRAM_MAP(engima2_audio_cpu_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,8*52) + MCFG_CPU_PERIODIC_INT_DRIVER(enigma2_state, irq0_line_hold, 8*52) /* video hardware */ @@ -637,7 +637,7 @@ static MACHINE_CONFIG_START( enigma2a, enigma2_state ) MCFG_CPU_ADD("audiocpu", Z80, 2500000) MCFG_CPU_PROGRAM_MAP(engima2_audio_cpu_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,8*52) + MCFG_CPU_PERIODIC_INT_DRIVER(enigma2_state, irq0_line_hold, 8*52) /* video hardware */ diff --git a/src/mame/drivers/epos.c b/src/mame/drivers/epos.c index 428556737f8..5a7cdfdba4f 100644 --- a/src/mame/drivers/epos.c +++ b/src/mame/drivers/epos.c @@ -398,7 +398,7 @@ static MACHINE_CONFIG_START( epos, epos_state ) MCFG_CPU_ADD("maincpu", Z80, 11000000/4) /* 2.75 MHz (see notes) */ MCFG_CPU_PROGRAM_MAP(epos_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", epos_state, irq0_line_hold) /* video hardware */ @@ -422,7 +422,7 @@ static MACHINE_CONFIG_START( dealer, epos_state ) MCFG_CPU_ADD("maincpu", Z80, 11000000/4) /* 2.75 MHz (see notes) */ MCFG_CPU_PROGRAM_MAP(dealer_map) MCFG_CPU_IO_MAP(dealer_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", epos_state, irq0_line_hold) MCFG_I8255A_ADD( "ppi8255", ppi8255_intf ) diff --git a/src/mame/drivers/ertictac.c b/src/mame/drivers/ertictac.c index 3dae19301ee..09cec2c2af6 100644 --- a/src/mame/drivers/ertictac.c +++ b/src/mame/drivers/ertictac.c @@ -38,6 +38,7 @@ public: DECLARE_DRIVER_INIT(ertictac); virtual void machine_start(); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(ertictac_podule_irq); }; @@ -208,9 +209,9 @@ void ertictac_state::machine_reset() archimedes_reset(machine()); } -static INTERRUPT_GEN( ertictac_podule_irq ) +INTERRUPT_GEN_MEMBER(ertictac_state::ertictac_podule_irq) { - archimedes_request_irq_b(device->machine(), ARCHIMEDES_IRQB_PODULE_IRQ); + archimedes_request_irq_b(machine(), ARCHIMEDES_IRQB_PODULE_IRQ); } /* TODO: Are we sure that this HW have I2C device? */ @@ -226,7 +227,7 @@ static MACHINE_CONFIG_START( ertictac, ertictac_state ) MCFG_CPU_ADD("maincpu", ARM, XTAL_24MHz/3) /* guess, 12MHz 8MHz or 6MHz, what's the correct divider 2, 3 or 4? */ MCFG_CPU_PROGRAM_MAP(ertictac_map) - MCFG_CPU_PERIODIC_INT(ertictac_podule_irq,60) // FIXME: timing of this + MCFG_CPU_PERIODIC_INT_DRIVER(ertictac_state, ertictac_podule_irq, 60) // FIXME: timing of this MCFG_I2CMEM_ADD("i2cmem",i2cmem_interface) diff --git a/src/mame/drivers/esd16.c b/src/mame/drivers/esd16.c index 76075fc2221..fd2ef836dc7 100644 --- a/src/mame/drivers/esd16.c +++ b/src/mame/drivers/esd16.c @@ -616,12 +616,12 @@ static MACHINE_CONFIG_START( esd16, esd16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000, XTAL_16MHz) /* 16MHz */ MCFG_CPU_PROGRAM_MAP(multchmp_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", esd16_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* 4MHz */ MCFG_CPU_PROGRAM_MAP(multchmp_sound_map) MCFG_CPU_IO_MAP(multchmp_sound_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,32*60) /* IRQ By Main CPU */ + MCFG_CPU_PERIODIC_INT_DRIVER(esd16_state, nmi_line_pulse, 32*60) /* IRQ By Main CPU */ /* video hardware */ diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c index fe9d1b782bf..e1b7cc45338 100644 --- a/src/mame/drivers/esh.c +++ b/src/mame/drivers/esh.c @@ -50,6 +50,7 @@ public: virtual void machine_start(); virtual void palette_init(); UINT32 screen_update_esh(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_callback_esh); }; @@ -283,11 +284,11 @@ static TIMER_CALLBACK( irq_stop ) machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE); } -static INTERRUPT_GEN( vblank_callback_esh ) +INTERRUPT_GEN_MEMBER(esh_state::vblank_callback_esh) { // IRQ - device->execute().set_input_line(0, ASSERT_LINE); - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(irq_stop)); + device.execute().set_input_line(0, ASSERT_LINE); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(irq_stop)); } void esh_state::machine_start() @@ -302,7 +303,7 @@ static MACHINE_CONFIG_START( esh, esh_state ) MCFG_CPU_ADD("maincpu", Z80, PCB_CLOCK/6) /* The denominator is a Daphne guess based on PacMan's hardware */ MCFG_CPU_PROGRAM_MAP(z80_0_mem) MCFG_CPU_IO_MAP(z80_0_io) - MCFG_CPU_VBLANK_INT("screen", vblank_callback_esh) + MCFG_CPU_VBLANK_INT_DRIVER("screen", esh_state, vblank_callback_esh) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/espial.c b/src/mame/drivers/espial.c index 4b4d514b284..c94922951ce 100644 --- a/src/mame/drivers/espial.c +++ b/src/mame/drivers/espial.c @@ -88,11 +88,10 @@ static TIMER_DEVICE_CALLBACK( espial_scanline ) } -INTERRUPT_GEN( espial_sound_nmi_gen ) +INTERRUPT_GEN_MEMBER(espial_state::espial_sound_nmi_gen) { - espial_state *state = device->machine().driver_data(); - if (state->m_sound_nmi_enabled) + if (m_sound_nmi_enabled) nmi_line_pulse(device); } @@ -328,7 +327,7 @@ static MACHINE_CONFIG_START( espial, espial_state ) MCFG_CPU_ADD("audiocpu", Z80, 3072000) /* 2 MHz?????? */ MCFG_CPU_PROGRAM_MAP(espial_sound_map) MCFG_CPU_IO_MAP(espial_sound_io_map) - MCFG_CPU_PERIODIC_INT(espial_sound_nmi_gen,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(espial_state, espial_sound_nmi_gen, 4*60) /* video hardware */ diff --git a/src/mame/drivers/esripsys.c b/src/mame/drivers/esripsys.c index cbc19d2c6a9..cbb911da7e0 100644 --- a/src/mame/drivers/esripsys.c +++ b/src/mame/drivers/esripsys.c @@ -699,7 +699,7 @@ static const esrip_config rip_config = static MACHINE_CONFIG_START( esripsys, esripsys_state ) MCFG_CPU_ADD("game_cpu", M6809E, XTAL_8MHz) MCFG_CPU_PROGRAM_MAP(game_cpu_map) - MCFG_CPU_VBLANK_INT("screen", esripsys_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", esripsys_state, esripsys_vblank_irq) MCFG_CPU_ADD("frame_cpu", M6809E, XTAL_8MHz) MCFG_CPU_PROGRAM_MAP(frame_cpu_map) diff --git a/src/mame/drivers/ettrivia.c b/src/mame/drivers/ettrivia.c index 8143a1b7f3c..835f02dc3d9 100644 --- a/src/mame/drivers/ettrivia.c +++ b/src/mame/drivers/ettrivia.c @@ -61,6 +61,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_ettrivia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ettrivia_interrupt); }; @@ -289,19 +290,19 @@ static const ay8910_interface ay8912_interface_3 = }; -static INTERRUPT_GEN( ettrivia_interrupt ) +INTERRUPT_GEN_MEMBER(ettrivia_state::ettrivia_interrupt) { - if( device->machine().root_device().ioport("COIN")->read() & 0x01 ) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if( machine().root_device().ioport("COIN")->read() & 0x01 ) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); else - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( ettrivia, ettrivia_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/4-48000) //should be ok, it gives the 300 interrupts expected MCFG_CPU_PROGRAM_MAP(cpu_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", ettrivia_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ettrivia_state, ettrivia_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/exedexes.c b/src/mame/drivers/exedexes.c index bd12cd744cc..57f552c78cf 100644 --- a/src/mame/drivers/exedexes.c +++ b/src/mame/drivers/exedexes.c @@ -232,7 +232,7 @@ static MACHINE_CONFIG_START( exedexes, exedexes_state ) MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* 3 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(exedexes_state, irq0_line_hold, 4*60) /* video hardware */ diff --git a/src/mame/drivers/exidy.c b/src/mame/drivers/exidy.c index b0b9c514ce3..ef58bcfb3f4 100644 --- a/src/mame/drivers/exidy.c +++ b/src/mame/drivers/exidy.c @@ -806,7 +806,7 @@ static MACHINE_CONFIG_START( base, exidy_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, EXIDY_CPU_CLOCK) - MCFG_CPU_VBLANK_INT("screen", exidy_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", exidy_state, exidy_vblank_interrupt) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) @@ -878,7 +878,7 @@ static MACHINE_CONFIG_DERIVED( teetert, venture ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,10*60) + MCFG_CPU_PERIODIC_INT_DRIVER(exidy_state, nmi_line_pulse, 10*60) MCFG_MACHINE_START_OVERRIDE(exidy_state, teetert ) diff --git a/src/mame/drivers/exidy440.c b/src/mame/drivers/exidy440.c index 2a763ba0a16..7b5acefed25 100644 --- a/src/mame/drivers/exidy440.c +++ b/src/mame/drivers/exidy440.c @@ -999,7 +999,7 @@ static MACHINE_CONFIG_START( exidy440, exidy440_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(exidy440_map) - MCFG_CPU_VBLANK_INT("screen", exidy440_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", exidy440_state, exidy440_vblank_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/exprraid.c b/src/mame/drivers/exprraid.c index 242a87544ea..4b037f23d10 100644 --- a/src/mame/drivers/exprraid.c +++ b/src/mame/drivers/exprraid.c @@ -446,23 +446,22 @@ static const ym3526_interface ym3526_config = }; #if 0 -static INTERRUPT_GEN( exprraid_interrupt ) +INTERRUPT_GEN_MEMBER(exprraid_state::exprraid_interrupt) { - exprraid_state *state = device->machine().driver_data(); - if ((~state->ioport("IN2")->read()) & 0xc0) + if ((~ioport("IN2")->read()) & 0xc0) { - if (state->m_coin == 0) + if (m_coin == 0) { - state->m_coin = 1; - //device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); - device->execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); + m_coin = 1; + //device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + device.execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); } } else { - device->execute().set_input_line(DECO16_IRQ_LINE, CLEAR_LINE); - state->m_coin = 0; + device.execute().set_input_line(DECO16_IRQ_LINE, CLEAR_LINE); + m_coin = 0; } } #endif diff --git a/src/mame/drivers/exzisus.c b/src/mame/drivers/exzisus.c index 161624f96fe..271bc0c9843 100644 --- a/src/mame/drivers/exzisus.c +++ b/src/mame/drivers/exzisus.c @@ -274,15 +274,15 @@ static MACHINE_CONFIG_START( exzisus, exzisus_state ) /* basic machine hardware */ MCFG_CPU_ADD("cpua", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(cpua_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", exzisus_state, irq0_line_hold) MCFG_CPU_ADD("cpub", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", exzisus_state, irq0_line_hold) MCFG_CPU_ADD("cpuc", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(cpuc_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", exzisus_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/f-32.c b/src/mame/drivers/f-32.c index f865958d397..7b5bd37c849 100644 --- a/src/mame/drivers/f-32.c +++ b/src/mame/drivers/f-32.c @@ -137,7 +137,7 @@ static MACHINE_CONFIG_START( mosaicf2, mosaicf2_state ) MCFG_CPU_ADD("maincpu", E132XN, 20000000*4) /* 4x internal multiplier */ MCFG_CPU_PROGRAM_MAP(common_map) MCFG_CPU_IO_MAP(mosaicf2_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mosaicf2_state, irq0_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c index 6a5e0a69bc8..94d4428ef39 100644 --- a/src/mame/drivers/f1gp.c +++ b/src/mame/drivers/f1gp.c @@ -451,11 +451,11 @@ static MACHINE_CONFIG_START( f1gp, f1gp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(f1gp_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", f1gp_state, irq1_line_hold) MCFG_CPU_ADD("sub", M68000,XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(f1gp_cpu2_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", f1gp_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80,XTAL_20MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -497,11 +497,11 @@ static MACHINE_CONFIG_START( f1gpb, f1gp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,10000000) /* 10 MHz ??? */ MCFG_CPU_PROGRAM_MAP(f1gpb_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", f1gp_state, irq1_line_hold) MCFG_CPU_ADD("sub", M68000,10000000) /* 10 MHz ??? */ MCFG_CPU_PROGRAM_MAP(f1gpb_cpu2_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", f1gp_state, irq1_line_hold) /* NO sound CPU */ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */ diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c index 471a1edde6d..8083f4a840f 100644 --- a/src/mame/drivers/fantland.c +++ b/src/mame/drivers/fantland.c @@ -829,16 +829,15 @@ MACHINE_RESET_MEMBER(fantland_state,fantland) m_nmi_enable = 0; } -static INTERRUPT_GEN( fantland_irq ) +INTERRUPT_GEN_MEMBER(fantland_state::fantland_irq) { - fantland_state *state = device->machine().driver_data(); - if (state->m_nmi_enable & 8) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable & 8) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( fantland_sound_irq ) +INTERRUPT_GEN_MEMBER(fantland_state::fantland_sound_irq) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x80 / 4); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x80 / 4); } static MACHINE_CONFIG_START( fantland, fantland_state ) @@ -846,12 +845,12 @@ static MACHINE_CONFIG_START( fantland, fantland_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8086, 8000000) // ? MCFG_CPU_PROGRAM_MAP(fantland_map) - MCFG_CPU_VBLANK_INT("screen", fantland_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fantland_state, fantland_irq) MCFG_CPU_ADD("audiocpu", I8088, 8000000) // ? MCFG_CPU_PROGRAM_MAP(fantland_sound_map) MCFG_CPU_IO_MAP(fantland_sound_iomap) - MCFG_CPU_PERIODIC_INT(fantland_sound_irq, 8000) + MCFG_CPU_PERIODIC_INT_DRIVER(fantland_state, fantland_sound_irq, 8000) // NMI when soundlatch is written MCFG_MACHINE_START_OVERRIDE(fantland_state,fantland) @@ -899,7 +898,7 @@ static MACHINE_CONFIG_START( galaxygn, fantland_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8088, 8000000) // ? MCFG_CPU_PROGRAM_MAP(galaxygn_map) - MCFG_CPU_VBLANK_INT("screen", fantland_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fantland_state, fantland_irq) MCFG_CPU_ADD("audiocpu", I8088, 8000000) // ? MCFG_CPU_PROGRAM_MAP(fantland_sound_map) @@ -1005,7 +1004,7 @@ static MACHINE_CONFIG_START( borntofi, fantland_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V20, 16000000/2) // D701080C-8 - NEC D70108C-8 V20 CPU, running at 8.000MHz [16/2] MCFG_CPU_PROGRAM_MAP(borntofi_map) - MCFG_CPU_VBLANK_INT("screen", fantland_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fantland_state, fantland_irq) MCFG_CPU_ADD("audiocpu", I8088, 18432000/3) // 8088 - AMD P8088-2 CPU, running at 6.144MHz [18.432/3] MCFG_CPU_PROGRAM_MAP(borntofi_sound_map) @@ -1044,7 +1043,7 @@ static MACHINE_CONFIG_START( wheelrun, fantland_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V20, XTAL_18MHz/2) // D701080C-8 (V20) MCFG_CPU_PROGRAM_MAP(wheelrun_map) - MCFG_CPU_VBLANK_INT("screen", fantland_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fantland_state, fantland_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_18MHz/2) // Z8400BB1 (Z80B) MCFG_CPU_PROGRAM_MAP(wheelrun_sound_map) diff --git a/src/mame/drivers/fastfred.c b/src/mame/drivers/fastfred.c index 08d14725f9e..0fd04efdee4 100644 --- a/src/mame/drivers/fastfred.c +++ b/src/mame/drivers/fastfred.c @@ -626,20 +626,18 @@ GFXDECODE_END #define CLOCK 18432000 /* The crystal is 18.432MHz */ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(fastfred_state::vblank_irq) { - fastfred_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( sound_timer_irq ) +INTERRUPT_GEN_MEMBER(fastfred_state::sound_timer_irq) { - fastfred_state *state = device->machine().driver_data(); - if(state->m_sound_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_sound_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( fastfred, fastfred_state ) @@ -647,11 +645,11 @@ static MACHINE_CONFIG_START( fastfred, fastfred_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(fastfred_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fastfred_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, CLOCK/12) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(sound_timer_irq,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(fastfred_state, sound_timer_irq, 4*60) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 6d877fd4255..2283e9f85bf 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -726,7 +726,7 @@ static MACHINE_CONFIG_START( fcrash, cps_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(fcrash_map) - MCFG_CPU_VBLANK_INT("screen", cps1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state, cps1_interrupt) MCFG_CPU_ADD("soundcpu", Z80, 24000000/6) /* ? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -777,7 +777,7 @@ static MACHINE_CONFIG_START( kodb, cps_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(kodb_map) - MCFG_CPU_VBLANK_INT("screen", cps1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state, cps1_interrupt) // MCFG_CPU_ADD("soundcpu", Z80, 3579545) // MCFG_CPU_PROGRAM_MAP(sub_map) @@ -933,7 +933,7 @@ static MACHINE_CONFIG_START( sgyxz, cps_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(kodb_map) - MCFG_CPU_VBLANK_INT("screen", cps1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", cps_state, cps1_interrupt) // MCFG_CPU_ADD("soundcpu", Z80, 3579545) // MCFG_CPU_PROGRAM_MAP(sub_map) diff --git a/src/mame/drivers/feversoc.c b/src/mame/drivers/feversoc.c index 2cff200e19b..b51ee10b4a3 100644 --- a/src/mame/drivers/feversoc.c +++ b/src/mame/drivers/feversoc.c @@ -79,6 +79,7 @@ public: DECLARE_DRIVER_INIT(feversoc); virtual void video_start(); UINT32 screen_update_feversoc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(feversoc_irq); }; @@ -246,9 +247,9 @@ static INPUT_PORTS_START( feversoc ) PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END -static INTERRUPT_GEN( feversoc_irq ) +INTERRUPT_GEN_MEMBER(feversoc_state::feversoc_irq) { - device->machine().device("maincpu")->execute().set_input_line(8, HOLD_LINE ); + machine().device("maincpu")->execute().set_input_line(8, HOLD_LINE ); } static MACHINE_CONFIG_START( feversoc, feversoc_state ) @@ -256,7 +257,7 @@ static MACHINE_CONFIG_START( feversoc, feversoc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",SH2,MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(feversoc_map) - MCFG_CPU_VBLANK_INT("screen",feversoc_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", feversoc_state, feversoc_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c index 709c9dd77a6..8c3709c40c4 100644 --- a/src/mame/drivers/firebeat.c +++ b/src/mame/drivers/firebeat.c @@ -185,6 +185,7 @@ public: DECLARE_VIDEO_START(firebeat); UINT32 screen_update_firebeat_0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_firebeat_1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(firebeat_interrupt); }; @@ -1936,7 +1937,7 @@ static INPUT_PORTS_START(popn) INPUT_PORTS_END -static INTERRUPT_GEN(firebeat_interrupt) +INTERRUPT_GEN_MEMBER(firebeat_state::firebeat_interrupt) { // IRQs // IRQ 0: VBlank @@ -1944,7 +1945,7 @@ static INTERRUPT_GEN(firebeat_interrupt) // IRQ 2: Main board UART // IRQ 4: ATAPI - device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); + device.execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } MACHINE_RESET_MEMBER(firebeat_state,firebeat) @@ -1973,7 +1974,7 @@ static MACHINE_CONFIG_START( firebeat, firebeat_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", PPC403GCX, 66000000) MCFG_CPU_PROGRAM_MAP(firebeat_map) - MCFG_CPU_VBLANK_INT("screen", firebeat_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", firebeat_state, firebeat_interrupt) MCFG_MACHINE_START_OVERRIDE(firebeat_state,firebeat) MCFG_MACHINE_RESET_OVERRIDE(firebeat_state,firebeat) @@ -2019,7 +2020,7 @@ static MACHINE_CONFIG_START( firebeat2, firebeat_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", PPC403GCX, 66000000) MCFG_CPU_PROGRAM_MAP(firebeat_map) - MCFG_CPU_VBLANK_INT("lscreen", firebeat_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", firebeat_state, firebeat_interrupt) MCFG_MACHINE_START_OVERRIDE(firebeat_state,firebeat) MCFG_MACHINE_RESET_OVERRIDE(firebeat_state,firebeat) diff --git a/src/mame/drivers/firetrap.c b/src/mame/drivers/firetrap.c index 30b54082786..edf900f1210 100644 --- a/src/mame/drivers/firetrap.c +++ b/src/mame/drivers/firetrap.c @@ -581,12 +581,11 @@ static const msm5205_interface msm5205_config = MSM5205_S48_4B /* 7.8125kHz */ }; -static INTERRUPT_GEN( firetrap_irq ) +INTERRUPT_GEN_MEMBER(firetrap_state::firetrap_irq) { - firetrap_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -643,7 +642,7 @@ static MACHINE_CONFIG_START( firetrap, firetrap_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, FIRETRAP_XTAL/2) // 6 MHz MCFG_CPU_PROGRAM_MAP(firetrap_map) - MCFG_CPU_VBLANK_INT("screen",firetrap_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", firetrap_state, firetrap_irq) MCFG_CPU_ADD("audiocpu", M6502, FIRETRAP_XTAL/8) // 1.5 MHz MCFG_CPU_PROGRAM_MAP(sound_map) @@ -679,7 +678,7 @@ static MACHINE_CONFIG_START( firetrapbl, firetrap_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, FIRETRAP_XTAL/2) // 6 MHz MCFG_CPU_PROGRAM_MAP(firetrap_bootleg_map) - MCFG_CPU_VBLANK_INT("screen", firetrap_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", firetrap_state, firetrap_irq) MCFG_CPU_ADD("audiocpu", M6502, FIRETRAP_XTAL/8) // 1.5 MHz MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/firetrk.c b/src/mame/drivers/firetrk.c index baa91dd8e4c..b2624e21926 100644 --- a/src/mame/drivers/firetrk.c +++ b/src/mame/drivers/firetrk.c @@ -47,13 +47,12 @@ INPUT_CHANGED_MEMBER(firetrk_state::gear_changed) } -static INTERRUPT_GEN( firetrk_interrupt ) +INTERRUPT_GEN_MEMBER(firetrk_state::firetrk_interrupt) { - firetrk_state *state = device->machine().driver_data(); /* NMI interrupts are disabled during service mode in firetrk and montecar */ - if (!state->m_in_service_mode) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (!m_in_service_mode) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -876,7 +875,7 @@ static MACHINE_CONFIG_START( firetrk, firetrk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800, MASTER_CLOCK/12) /* 750Khz during service mode */ MCFG_CPU_PROGRAM_MAP(firetrk_map) - MCFG_CPU_VBLANK_INT("screen", firetrk_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", firetrk_state, firetrk_interrupt) MCFG_WATCHDOG_VBLANK_INIT(5) diff --git a/src/mame/drivers/fitfight.c b/src/mame/drivers/fitfight.c index 233eaa4521b..b3cb8b89385 100644 --- a/src/mame/drivers/fitfight.c +++ b/src/mame/drivers/fitfight.c @@ -257,9 +257,9 @@ static ADDRESS_MAP_START( snd_io, AS_IO, 8, fitfight_state ) AM_RANGE(UPD7810_PORTC, UPD7810_PORTC) AM_READ(snd_portc_r) AM_WRITE(snd_portc_w) ADDRESS_MAP_END -static INTERRUPT_GEN( snd_irq ) +INTERRUPT_GEN_MEMBER(fitfight_state::snd_irq) { - device->execute().set_input_line(UPD7810_INTF2, HOLD_LINE); + device.execute().set_input_line(UPD7810_INTF2, HOLD_LINE); } static const UPD7810_CONFIG sound_cpu_config = @@ -735,13 +735,13 @@ static MACHINE_CONFIG_START( fitfight, fitfight_state ) MCFG_CPU_ADD("maincpu",M68000, 12000000) MCFG_CPU_PROGRAM_MAP(fitfight_main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fitfight_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", UPD7810, 12000000) MCFG_CPU_CONFIG(sound_cpu_config) MCFG_CPU_PROGRAM_MAP(snd_mem) MCFG_CPU_IO_MAP(snd_io) - MCFG_CPU_VBLANK_INT("screen", snd_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fitfight_state, snd_irq) MCFG_GFXDECODE(fitfight) @@ -766,7 +766,7 @@ static MACHINE_CONFIG_START( bbprot, fitfight_state ) MCFG_CPU_ADD("maincpu",M68000, 12000000) MCFG_CPU_PROGRAM_MAP(bbprot_main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fitfight_state, irq2_line_hold) MCFG_GFXDECODE(prot) diff --git a/src/mame/drivers/flipjack.c b/src/mame/drivers/flipjack.c index 815cd91e60d..d44c9f4c3d1 100644 --- a/src/mame/drivers/flipjack.c +++ b/src/mame/drivers/flipjack.c @@ -478,12 +478,12 @@ static MACHINE_CONFIG_START( flipjack, flipjack_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(flipjack_main_map) MCFG_CPU_IO_MAP(flipjack_main_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flipjack_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(flipjack_sound_map) MCFG_CPU_IO_MAP(flipjack_sound_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flipjack_state, nmi_line_assert) MCFG_I8255A_ADD( "ppi8255", ppi8255_intf ) diff --git a/src/mame/drivers/flkatck.c b/src/mame/drivers/flkatck.c index 7b4f052cd88..bd06804e0f4 100644 --- a/src/mame/drivers/flkatck.c +++ b/src/mame/drivers/flkatck.c @@ -20,12 +20,11 @@ #include "includes/flkatck.h" -static INTERRUPT_GEN( flkatck_interrupt ) +INTERRUPT_GEN_MEMBER(flkatck_state::flkatck_interrupt) { - flkatck_state *state = device->machine().driver_data(); - if (state->m_irq_enabled) - device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); + if (m_irq_enabled) + device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(flkatck_state::flkatck_bankswitch_w) @@ -222,7 +221,7 @@ static MACHINE_CONFIG_START( flkatck, flkatck_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309,3000000*4) /* HD63C09EP, 24/8 MHz */ MCFG_CPU_PROGRAM_MAP(flkatck_map) - MCFG_CPU_VBLANK_INT("screen", flkatck_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flkatck_state, flkatck_interrupt) MCFG_CPU_ADD("audiocpu", Z80,3579545) /* NEC D780C-1, 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(flkatck_sound_map) diff --git a/src/mame/drivers/flower.c b/src/mame/drivers/flower.c index bc54b918a6f..b8315aee509 100644 --- a/src/mame/drivers/flower.c +++ b/src/mame/drivers/flower.c @@ -250,15 +250,15 @@ static MACHINE_CONFIG_START( flower, flower_state ) // cpus are Z80 "A" type, official maximum speed of 4 MHz, but 4.6 MHz has been proven to work in practice MCFG_CPU_ADD("maincpu", Z80,XTAL_18_432MHz/4) MCFG_CPU_PROGRAM_MAP(flower_cpu1_2) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flower_state, irq0_line_hold) MCFG_CPU_ADD("subcpu", Z80,XTAL_18_432MHz/4) MCFG_CPU_PROGRAM_MAP(flower_cpu1_2) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 120) // controls game speed? irqsource and frequency unknown + MCFG_CPU_PERIODIC_INT_DRIVER(flower_state, irq0_line_hold, 120) // controls game speed? irqsource and frequency unknown MCFG_CPU_ADD("audiocpu", Z80,XTAL_18_432MHz/4) MCFG_CPU_PROGRAM_MAP(flower_sound_cpu) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 90) // controls music speed. irqsource and frequency unknown, same as subcpu perhaps? + MCFG_CPU_PERIODIC_INT_DRIVER(flower_state, irq0_line_hold, 90) // controls music speed. irqsource and frequency unknown, same as subcpu perhaps? // tight sync, slowdowns otherwise // MCFG_QUANTUM_PERFECT_CPU("maincpu") diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c index 0e166f2a1f0..e0b65d1e1fc 100644 --- a/src/mame/drivers/flstory.c +++ b/src/mame/drivers/flstory.c @@ -1082,11 +1082,11 @@ static MACHINE_CONFIG_START( flstory, flstory_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,XTAL_10_733MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(flstory_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flstory_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* IRQ generated by ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(flstory_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */ /* NMI generated by the main CPU */ MCFG_CPU_ADD("mcu", M68705,XTAL_18_432MHz/6) /* verified on pcb */ @@ -1139,11 +1139,11 @@ static MACHINE_CONFIG_START( onna34ro, flstory_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,10733000/2) /* ??? */ MCFG_CPU_PROGRAM_MAP(onna34ro_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flstory_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* IRQ generated by ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(flstory_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */ /* NMI generated by the main CPU */ // MCFG_CPU_ADD("mcu", M68705,4000000) /* ??? */ @@ -1196,11 +1196,11 @@ static MACHINE_CONFIG_START( victnine, flstory_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000/2) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(victnine_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flstory_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* IRQ generated by ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(flstory_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */ /* NMI generated by the main CPU */ // MCFG_CPU_ADD("mcu", M68705,4000000) /* ??? */ @@ -1259,11 +1259,11 @@ static MACHINE_CONFIG_START( rumba, flstory_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000/2) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(rumba_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flstory_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* IRQ generated by ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(flstory_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */ /* NMI generated by the main CPU */ // MCFG_CPU_ADD("mcu", M68705,18432000/6) /* ??? */ diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c index b52d627e861..9540a9b4a1a 100644 --- a/src/mame/drivers/flyball.c +++ b/src/mame/drivers/flyball.c @@ -415,7 +415,7 @@ static MACHINE_CONFIG_START( flyball, flyball_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK/16) MCFG_CPU_PROGRAM_MAP(flyball_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", flyball_state, nmi_line_pulse) /* video hardware */ diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c index d2b73f0e97a..e216cae170c 100644 --- a/src/mame/drivers/fortecar.c +++ b/src/mame/drivers/fortecar.c @@ -690,7 +690,7 @@ static MACHINE_CONFIG_START( fortecar, fortecar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) /* 3 MHz, measured */ MCFG_CPU_PROGRAM_MAP(fortecar_map) MCFG_CPU_IO_MAP(fortecar_ports) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fortecar_state, nmi_line_pulse) MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(200)) /* guess */ MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/freekick.c b/src/mame/drivers/freekick.c index d69780e18d9..648eb9799ee 100644 --- a/src/mame/drivers/freekick.c +++ b/src/mame/drivers/freekick.c @@ -76,11 +76,10 @@ WRITE8_MEMBER(freekick_state::nmi_enable_w) m_nmi_en = data & 1; } -static INTERRUPT_GEN( freekick_irqgen ) +INTERRUPT_GEN_MEMBER(freekick_state::freekick_irqgen) { - freekick_state *state = device->machine().driver_data(); - if (state->m_nmi_en) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_en) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(freekick_state::oigas_5_w) @@ -632,8 +631,8 @@ static MACHINE_CONFIG_START( base, freekick_state ) MCFG_CPU_ADD("maincpu",Z80, 18432000/6) //confirmed MCFG_CPU_PROGRAM_MAP(pbillrd_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 50*3) //?? - MCFG_CPU_VBLANK_INT("screen", freekick_irqgen) + MCFG_CPU_PERIODIC_INT_DRIVER(freekick_state, irq0_line_hold, 50*3) //?? + MCFG_CPU_VBLANK_INT_DRIVER("screen", freekick_state, freekick_irqgen) MCFG_GFXDECODE(freekick) diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c index 40c9b0d98ba..520856c4f49 100644 --- a/src/mame/drivers/fromanc2.c +++ b/src/mame/drivers/fromanc2.c @@ -31,9 +31,9 @@ * *************************************/ -static INTERRUPT_GEN( fromanc2_interrupt ) +INTERRUPT_GEN_MEMBER(fromanc2_state::fromanc2_interrupt) { - device->execute().set_input_line(1, HOLD_LINE); + device.execute().set_input_line(1, HOLD_LINE); } @@ -546,7 +546,7 @@ static MACHINE_CONFIG_START( fromanc2, fromanc2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,32000000/2) /* 16.00 MHz */ MCFG_CPU_PROGRAM_MAP(fromanc2_main_map) - MCFG_CPU_VBLANK_INT("lscreen", fromanc2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", fromanc2_state, fromanc2_interrupt) MCFG_CPU_ADD("audiocpu", Z80,32000000/4) /* 8.00 MHz */ MCFG_CPU_PROGRAM_MAP(fromanc2_sound_map) @@ -596,7 +596,7 @@ static MACHINE_CONFIG_START( fromancr, fromanc2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,32000000/2) /* 16.00 MHz */ MCFG_CPU_PROGRAM_MAP(fromancr_main_map) - MCFG_CPU_VBLANK_INT("lscreen", fromanc2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", fromanc2_state, fromanc2_interrupt) MCFG_CPU_ADD("audiocpu", Z80,32000000/4) /* 8.00 MHz */ MCFG_CPU_PROGRAM_MAP(fromanc2_sound_map) @@ -646,7 +646,7 @@ static MACHINE_CONFIG_START( fromanc4, fromanc2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,32000000/2) /* 16.00 MHz */ MCFG_CPU_PROGRAM_MAP(fromanc4_main_map) - MCFG_CPU_VBLANK_INT("lscreen", fromanc2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", fromanc2_state, fromanc2_interrupt) MCFG_CPU_ADD("audiocpu", Z80,32000000/4) /* 8.00 MHz */ MCFG_CPU_PROGRAM_MAP(fromanc2_sound_map) diff --git a/src/mame/drivers/fromance.c b/src/mame/drivers/fromance.c index 41256814adf..5a26462a049 100644 --- a/src/mame/drivers/fromance.c +++ b/src/mame/drivers/fromance.c @@ -1004,7 +1004,7 @@ static MACHINE_CONFIG_START( nekkyoku, fromance_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6.00 Mhz ? */ MCFG_CPU_PROGRAM_MAP(nekkyoku_main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fromance_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,12000000/2) /* 6.00 Mhz ? */ MCFG_CPU_PROGRAM_MAP(nekkyoku_sub_map) @@ -1042,7 +1042,7 @@ static MACHINE_CONFIG_START( idolmj, fromance_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6.00 Mhz ? */ MCFG_CPU_PROGRAM_MAP(fromance_main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fromance_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,12000000/2) /* 6.00 Mhz ? */ MCFG_CPU_PROGRAM_MAP(fromance_sub_map) @@ -1080,7 +1080,7 @@ static MACHINE_CONFIG_START( fromance, fromance_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6.00 Mhz ? */ MCFG_CPU_PROGRAM_MAP(fromance_main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", fromance_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,12000000/2) /* 6.00 Mhz ? */ MCFG_CPU_PROGRAM_MAP(fromance_sub_map) diff --git a/src/mame/drivers/funkybee.c b/src/mame/drivers/funkybee.c index cef93cbe6a2..f3704c7af04 100644 --- a/src/mame/drivers/funkybee.c +++ b/src/mame/drivers/funkybee.c @@ -296,7 +296,7 @@ static MACHINE_CONFIG_START( funkybee, funkybee_state ) MCFG_CPU_ADD("maincpu", Z80, 3072000) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(funkybee_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funkybee_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/funkyjet.c b/src/mame/drivers/funkyjet.c index b48686451d1..864f2a8556a 100644 --- a/src/mame/drivers/funkyjet.c +++ b/src/mame/drivers/funkyjet.c @@ -312,7 +312,7 @@ static MACHINE_CONFIG_START( funkyjet, funkyjet_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz/2) /* 28 MHz crystal */ MCFG_CPU_PROGRAM_MAP(funkyjet_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funkyjet_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", H6280, XTAL_32_22MHz/4) /* Custom chip 45, Audio section crystal is 32.220 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/funworld.c b/src/mame/drivers/funworld.c index 3208b7740db..5b80993c163 100644 --- a/src/mame/drivers/funworld.c +++ b/src/mame/drivers/funworld.c @@ -2352,7 +2352,7 @@ static MACHINE_CONFIG_START( fw1stpal, funworld_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M65SC02, MASTER_CLOCK/8) /* 2MHz */ MCFG_CPU_PROGRAM_MAP(funworld_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MCFG_NVRAM_ADD_0FILL("nvram") @@ -2388,7 +2388,7 @@ static MACHINE_CONFIG_DERIVED( fw2ndpal, fw1stpal ) MCFG_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MCFG_CPU_PROGRAM_MAP(funworld_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MCFG_GFXDECODE(fw2ndpal) MACHINE_CONFIG_END @@ -2400,7 +2400,7 @@ static MACHINE_CONFIG_DERIVED( funquiz, fw1stpal ) MCFG_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MCFG_CPU_PROGRAM_MAP(funquiz_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MCFG_SOUND_REPLACE("ay8910", AY8910, MASTER_CLOCK/8) /* 2MHz */ MCFG_SOUND_CONFIG(funquiz_ay8910_intf) @@ -2412,7 +2412,7 @@ static MACHINE_CONFIG_DERIVED( magicrd2, fw1stpal ) MCFG_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MCFG_CPU_PROGRAM_MAP(magicrd2_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MCFG_VIDEO_START_OVERRIDE(funworld_state,magicrd2) @@ -2425,35 +2425,35 @@ static MACHINE_CONFIG_DERIVED( royalcd1, fw1stpal ) MCFG_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* (G65SC02P in pro version) 2MHz */ MCFG_CPU_PROGRAM_MAP(magicrd2_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( royalcd2, fw2ndpal ) MCFG_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MCFG_CPU_PROGRAM_MAP(magicrd2_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cuoreuno, fw1stpal ) MCFG_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MCFG_CPU_PROGRAM_MAP(cuoreuno_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( saloon, fw1stpal ) MCFG_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MCFG_CPU_PROGRAM_MAP(saloon_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( witchryl, fw1stpal ) MCFG_CPU_REPLACE("maincpu", M65C02, MASTER_CLOCK/8) /* 2MHz */ MCFG_CPU_PROGRAM_MAP(witchryl_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse) MACHINE_CONFIG_END diff --git a/src/mame/drivers/funybubl.c b/src/mame/drivers/funybubl.c index 58acb3889cf..6c295d7e53e 100644 --- a/src/mame/drivers/funybubl.c +++ b/src/mame/drivers/funybubl.c @@ -221,7 +221,7 @@ static MACHINE_CONFIG_START( funybubl, funybubl_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz?? */ MCFG_CPU_PROGRAM_MAP(funybubl_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", funybubl_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz?? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/gaelco.c b/src/mame/drivers/gaelco.c index ea4aafeb7bf..65f842019be 100644 --- a/src/mame/drivers/gaelco.c +++ b/src/mame/drivers/gaelco.c @@ -506,7 +506,7 @@ static MACHINE_CONFIG_START( bigkarnk, gaelco_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* MC68000P10, 10 MHz */ MCFG_CPU_PROGRAM_MAP(bigkarnk_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", M6809, 8867000/4) /* 68B09, 2.21675 MHz? */ MCFG_CPU_PROGRAM_MAP(bigkarnk_snd_map) @@ -542,7 +542,7 @@ static MACHINE_CONFIG_START( maniacsq, gaelco_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(maniacsq_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco_state, irq6_line_hold) /* video hardware */ @@ -570,7 +570,7 @@ static MACHINE_CONFIG_START( squash, gaelco_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* MC68000P12, 12 MHz */ MCFG_CPU_PROGRAM_MAP(squash_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco_state, irq6_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(600)) @@ -600,7 +600,7 @@ static MACHINE_CONFIG_START( thoop, gaelco_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* MC68000P12, 12 MHz */ MCFG_CPU_PROGRAM_MAP(thoop_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco_state, irq6_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(600)) diff --git a/src/mame/drivers/gaelco2.c b/src/mame/drivers/gaelco2.c index 7d2e5c4be17..b5f86013da6 100644 --- a/src/mame/drivers/gaelco2.c +++ b/src/mame/drivers/gaelco2.c @@ -157,7 +157,7 @@ static MACHINE_CONFIG_START( maniacsq, gaelco2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 26000000/2) /* 13 MHz? */ MCFG_CPU_PROGRAM_MAP(maniacsq_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold) /* video hardware */ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") @@ -531,7 +531,7 @@ static MACHINE_CONFIG_START( alighunt, gaelco2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 24000000/2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(alighunt_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold) /* video hardware */ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") @@ -773,7 +773,7 @@ static MACHINE_CONFIG_START( touchgo, gaelco2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 32000000/2) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(touchgo_map) - MCFG_CPU_VBLANK_INT("lscreen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", gaelco2_state, irq6_line_hold) /* video hardware */ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") @@ -965,7 +965,7 @@ static MACHINE_CONFIG_START( snowboar, gaelco2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 30000000/2) /* 15 MHz */ MCFG_CPU_PROGRAM_MAP(snowboar_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold) MCFG_EEPROM_ADD("eeprom", gaelco2_eeprom_interface) @@ -1206,7 +1206,7 @@ static MACHINE_CONFIG_START( wrally2, gaelco2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 26000000/2) /* 13 MHz */ MCFG_CPU_PROGRAM_MAP(wrally2_map) - MCFG_CPU_VBLANK_INT("lscreen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", gaelco2_state, irq6_line_hold) MCFG_EEPROM_ADD("eeprom", gaelco2_eeprom_interface) diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c index c05073ff279..3c5ad6694e4 100644 --- a/src/mame/drivers/gaelco3d.c +++ b/src/mame/drivers/gaelco3d.c @@ -250,10 +250,10 @@ MACHINE_RESET_MEMBER(gaelco3d_state,gaelco3d2) * *************************************/ -static INTERRUPT_GEN( vblank_gen ) +INTERRUPT_GEN_MEMBER(gaelco3d_state::vblank_gen) { - gaelco3d_render(*device->machine().primary_screen); - device->execute().set_input_line(2, ASSERT_LINE); + gaelco3d_render(*machine().primary_screen); + device.execute().set_input_line(2, ASSERT_LINE); } @@ -994,7 +994,7 @@ static MACHINE_CONFIG_START( gaelco3d, gaelco3d_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 15000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_gen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco3d_state, vblank_gen) MCFG_CPU_ADD("tms", TMS32031, 60000000) MCFG_TMS3203X_CONFIG(tms_config) @@ -1047,7 +1047,7 @@ static MACHINE_CONFIG_DERIVED( gaelco3d2, gaelco3d ) /* basic machine hardware */ MCFG_CPU_REPLACE("maincpu", M68EC020, 25000000) MCFG_CPU_PROGRAM_MAP(main020_map) - MCFG_CPU_VBLANK_INT("screen", vblank_gen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco3d_state, vblank_gen) MCFG_CPU_MODIFY("tms") MCFG_CPU_CLOCK(50000000) diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c index dc43a5d3f1d..76fc0ba31cf 100644 --- a/src/mame/drivers/gaiden.c +++ b/src/mame/drivers/gaiden.c @@ -764,7 +764,7 @@ static MACHINE_CONFIG_START( shadoww, gaiden_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 18432000/2) /* 9.216 MHz */ MCFG_CPU_PROGRAM_MAP(gaiden_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaiden_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -820,7 +820,7 @@ static MACHINE_CONFIG_START( drgnbowl, gaiden_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 20000000/2) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(drgnbowl_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaiden_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 12000000/2) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(drgnbowl_sound_map) @@ -936,7 +936,7 @@ static MACHINE_CONFIG_START( mastninj, gaiden_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz? */ MCFG_CPU_PROGRAM_MAP(mastninj_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaiden_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ?? MHz */ MCFG_CPU_PROGRAM_MAP(mastninj_sound_map) diff --git a/src/mame/drivers/gal3.c b/src/mame/drivers/gal3.c index d5fabde73dc..7483fcb8591 100644 --- a/src/mame/drivers/gal3.c +++ b/src/mame/drivers/gal3.c @@ -627,15 +627,15 @@ static const c140_interface C140_interface = static MACHINE_CONFIG_START( gal3, gal3_state ) MCFG_CPU_ADD("cpumst", M68020, 49152000/2) MCFG_CPU_PROGRAM_MAP(cpu_mst_map) - MCFG_CPU_VBLANK_INT("lscreen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", gal3_state, irq1_line_hold) MCFG_CPU_ADD("cpuslv", M68020, 49152000/2) MCFG_CPU_PROGRAM_MAP(cpu_slv_map) - MCFG_CPU_VBLANK_INT("lscreen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", gal3_state, irq1_line_hold) MCFG_CPU_ADD("rs_cpu", M68000, 49152000/4) MCFG_CPU_PROGRAM_MAP(rs_cpu_map) - MCFG_CPU_VBLANK_INT("lscreen", irq5_line_hold) /// programmable via 148 IC + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", gal3_state, irq5_line_hold) /// programmable via 148 IC MCFG_CPU_ADD("sound_cpu", M68000, 12000000) // ?? MCFG_CPU_PROGRAM_MAP(sound_cpu_map) diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c index 13c4d545aa3..5d7aca6a5a1 100644 --- a/src/mame/drivers/galaga.c +++ b/src/mame/drivers/galaga.c @@ -1637,20 +1637,18 @@ static const samples_interface battles_samples_interface = }; -static INTERRUPT_GEN( main_vblank_irq ) +INTERRUPT_GEN_MEMBER(galaga_state::main_vblank_irq) { - galaga_state *state = device->machine().driver_data(); - if(state->m_main_irq_mask) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_main_irq_mask) + device.execute().set_input_line(0, ASSERT_LINE); } -static INTERRUPT_GEN( sub_vblank_irq ) +INTERRUPT_GEN_MEMBER(galaga_state::sub_vblank_irq) { - galaga_state *state = device->machine().driver_data(); - if(state->m_sub_irq_mask) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_sub_irq_mask) + device.execute().set_input_line(0, ASSERT_LINE); } const namco_06xx_config bosco_namco_06xx_0_intf = @@ -1673,11 +1671,11 @@ static MACHINE_CONFIG_START( bosco, bosco_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(bosco_map) - MCFG_CPU_VBLANK_INT("screen", main_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaga_state, main_vblank_irq) MCFG_CPU_ADD("sub", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(bosco_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaga_state, sub_vblank_irq) MCFG_CPU_ADD("sub2", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(bosco_map) @@ -1733,11 +1731,11 @@ static MACHINE_CONFIG_START( galaga, galaga_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(galaga_map) - MCFG_CPU_VBLANK_INT("screen", main_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaga_state, main_vblank_irq) MCFG_CPU_ADD("sub", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(galaga_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaga_state, sub_vblank_irq) MCFG_CPU_ADD("sub2", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(galaga_map) @@ -1810,11 +1808,11 @@ static MACHINE_CONFIG_START( xevious, xevious_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(xevious_map) - MCFG_CPU_VBLANK_INT("screen", main_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaga_state, main_vblank_irq) MCFG_CPU_ADD("sub", Z80,MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(xevious_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaga_state, sub_vblank_irq) MCFG_CPU_ADD("sub2", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(xevious_map) @@ -1873,7 +1871,7 @@ static MACHINE_CONFIG_DERIVED( battles, xevious ) MCFG_CPU_ADD("sub3", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(battles_mem4) - MCFG_CPU_VBLANK_INT("screen", battles_interrupt_4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", xevious_state, battles_interrupt_4) MCFG_TIMER_ADD("battles_nmi", battles_nmi_generate) @@ -1899,11 +1897,11 @@ static MACHINE_CONFIG_START( digdug, digdug_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(digdug_map) - MCFG_CPU_VBLANK_INT("screen", main_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaga_state, main_vblank_irq) MCFG_CPU_ADD("sub", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(digdug_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaga_state, sub_vblank_irq) MCFG_CPU_ADD("sub2", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(digdug_map) diff --git a/src/mame/drivers/galastrm.c b/src/mame/drivers/galastrm.c index 1a73a00ba52..ed90ad1cc5c 100644 --- a/src/mame/drivers/galastrm.c +++ b/src/mame/drivers/galastrm.c @@ -48,11 +48,10 @@ $305.b invincibility /*********************************************************************/ -static INTERRUPT_GEN( galastrm_interrupt ) +INTERRUPT_GEN_MEMBER(galastrm_state::galastrm_interrupt) { - galastrm_state *state = device->machine().driver_data(); - state->m_frame_counter ^= 1; - device->execute().set_input_line(5, HOLD_LINE); + m_frame_counter ^= 1; + device.execute().set_input_line(5, HOLD_LINE); } static TIMER_CALLBACK( galastrm_interrupt6 ) @@ -310,7 +309,7 @@ static MACHINE_CONFIG_START( galastrm, galastrm_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(galastrm_map) - MCFG_CPU_VBLANK_INT("screen", galastrm_interrupt) /* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", galastrm_state, galastrm_interrupt) /* VBL */ MCFG_EEPROM_ADD("eeprom", galastrm_eeprom_interface) diff --git a/src/mame/drivers/galaxi.c b/src/mame/drivers/galaxi.c index fbcc208ed83..cbb04a50433 100644 --- a/src/mame/drivers/galaxi.c +++ b/src/mame/drivers/galaxi.c @@ -406,7 +406,7 @@ static MACHINE_CONFIG_START( galaxi, galaxi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) // ? MCFG_CPU_PROGRAM_MAP(galaxi_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxi_state, irq4_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/galaxia.c b/src/mame/drivers/galaxia.c index c7ac0ad5d20..1da3dec7509 100644 --- a/src/mame/drivers/galaxia.c +++ b/src/mame/drivers/galaxia.c @@ -67,10 +67,10 @@ TODO: #include "includes/galaxia.h" -static INTERRUPT_GEN( galaxia_interrupt ) +INTERRUPT_GEN_MEMBER(galaxia_state::galaxia_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); - cvs_scroll_stars(device->machine()); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); + cvs_scroll_stars(machine()); } @@ -296,7 +296,7 @@ static MACHINE_CONFIG_START( galaxia, galaxia_state ) MCFG_CPU_ADD("maincpu", S2650, 2000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(galaxia_mem_map) MCFG_CPU_IO_MAP(galaxia_io_map) - MCFG_CPU_VBLANK_INT("screen", galaxia_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxia_state, galaxia_interrupt) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) @@ -336,7 +336,7 @@ static MACHINE_CONFIG_START( astrowar, galaxia_state ) MCFG_CPU_ADD("maincpu", S2650, 2000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(astrowar_mem_map) MCFG_CPU_IO_MAP(galaxia_io_map) - MCFG_CPU_VBLANK_INT("screen", galaxia_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxia_state, galaxia_interrupt) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c index 6ff3b7e1dea..abb7fb77637 100644 --- a/src/mame/drivers/galaxian.c +++ b/src/mame/drivers/galaxian.c @@ -438,26 +438,24 @@ TO DO : * *************************************/ -static INTERRUPT_GEN( interrupt_gen ) +INTERRUPT_GEN_MEMBER(galaxian_state::interrupt_gen) { - galaxian_state *state = device->machine().driver_data(); /* 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->execute().set_input_line(state->m_irq_line, ASSERT_LINE); + if (m_irq_enabled) + device.execute().set_input_line(m_irq_line, ASSERT_LINE); } -static INTERRUPT_GEN( fakechange_interrupt_gen ) +INTERRUPT_GEN_MEMBER(galaxian_state::fakechange_interrupt_gen) { - galaxian_state *state = device->machine().driver_data(); interrupt_gen(device); - if (state->ioport("FAKE_SELECT")->read_safe(0x00)) + if (ioport("FAKE_SELECT")->read_safe(0x00)) { - state->m_tenspot_current_game++; - state->m_tenspot_current_game%=10; - state->tenspot_set_game_bank(device->machine(), state->m_tenspot_current_game, 1); - device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); + m_tenspot_current_game++; + m_tenspot_current_game%=10; + tenspot_set_game_bank(machine(), m_tenspot_current_game, 1); + machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); } } @@ -2084,7 +2082,7 @@ static MACHINE_CONFIG_START( galaxian_base, galaxian_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, GALAXIAN_PIXEL_CLOCK/3/2) MCFG_CPU_PROGRAM_MAP(galaxian_map) - MCFG_CPU_VBLANK_INT("screen", interrupt_gen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxian_state, interrupt_gen) MCFG_WATCHDOG_VBLANK_INIT(8) @@ -2180,7 +2178,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( tenspot, galaxian ) MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", fakechange_interrupt_gen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxian_state, fakechange_interrupt_gen) /* basic machine hardware */ MCFG_CPU_ADD("selectcpu", Z80, GALAXIAN_PIXEL_CLOCK/3/2) // ?? mhz @@ -2260,7 +2258,7 @@ static MACHINE_CONFIG_DERIVED( checkman, mooncrst ) MCFG_CPU_ADD("audiocpu", Z80, 1620000) /* 1.62 MHz */ MCFG_CPU_PROGRAM_MAP(checkman_sound_map) MCFG_CPU_IO_MAP(checkman_sound_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* NMIs are triggered by the main CPU */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxian_state, irq0_line_hold) /* NMIs are triggered by the main CPU */ /* sound hardware */ MCFG_SOUND_ADD("aysnd", AY8910, 1789750) diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c index 3e09b97c883..7de29557917 100644 --- a/src/mame/drivers/galaxold.c +++ b/src/mame/drivers/galaxold.c @@ -2314,7 +2314,7 @@ static MACHINE_CONFIG_DERIVED( ozon1, galaxold_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(ozon1_map) MCFG_CPU_IO_MAP(ozon1_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxold_state, nmi_line_pulse) MCFG_MACHINE_RESET(0) @@ -2332,7 +2332,7 @@ static MACHINE_CONFIG_START( drivfrcg, galaxold_state ) MCFG_CPU_ADD("maincpu", S2650, MASTER_CLOCK/6) MCFG_CPU_PROGRAM_MAP(drivfrcg) MCFG_CPU_IO_MAP(drivfrcg_io) - MCFG_CPU_VBLANK_INT("screen", hunchbks_vh_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxold_state, hunchbks_vh_interrupt) MCFG_SCREEN_ADD("screen", RASTER) @@ -2384,12 +2384,11 @@ static MACHINE_CONFIG_DERIVED( hunchbkg, galaxold_base ) MCFG_FRAGMENT_ADD(galaxian_audio) MACHINE_CONFIG_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(galaxold_state::vblank_irq) { - galaxold_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_DERIVED( harem, galaxold_base ) @@ -2397,7 +2396,7 @@ static MACHINE_CONFIG_DERIVED( harem, galaxold_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(harem_cpu1) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxold_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, 1620000) //? MCFG_CPU_PROGRAM_MAP(harem_cpu2) @@ -2433,7 +2432,7 @@ static MACHINE_CONFIG_START( racknrol, galaxold_state ) MCFG_CPU_ADD("maincpu", S2650, PIXEL_CLOCK/2) MCFG_CPU_PROGRAM_MAP(racknrol) MCFG_CPU_IO_MAP(racknrol_io) - MCFG_CPU_VBLANK_INT("screen", hunchbks_vh_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxold_state, hunchbks_vh_interrupt) MCFG_GFXDECODE(galaxian) MCFG_PALETTE_LENGTH(32) @@ -2491,7 +2490,7 @@ static MACHINE_CONFIG_START( hexpoola, galaxold_state ) MCFG_CPU_ADD("maincpu", S2650, PIXEL_CLOCK/2) MCFG_CPU_PROGRAM_MAP(racknrol) MCFG_CPU_IO_MAP(hexpoola_io) - MCFG_CPU_VBLANK_INT("screen", hunchbks_vh_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxold_state, hunchbks_vh_interrupt) MCFG_GFXDECODE(galaxian) MCFG_PALETTE_LENGTH(32) diff --git a/src/mame/drivers/galgame.c b/src/mame/drivers/galgame.c index c0eec734f56..fb4a8c7bd52 100644 --- a/src/mame/drivers/galgame.c +++ b/src/mame/drivers/galgame.c @@ -48,6 +48,7 @@ public: virtual void machine_reset(); virtual void palette_init(); UINT32 screen_update_galaxygame(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(galaxygame_irq); }; /************************************* @@ -301,13 +302,12 @@ static IRQ_CALLBACK(galaxygame_irq_callback) return 0x40; } -static INTERRUPT_GEN(galaxygame_irq) +INTERRUPT_GEN_MEMBER(galaxygame_state::galaxygame_irq) { - galaxygame_state *state = device->machine().driver_data(); - if ( state->m_clk & 0x40 ) + if ( m_clk & 0x40 ) { - device->execute().set_input_line(0, ASSERT_LINE); - state->m_interrupt = 1; + device.execute().set_input_line(0, ASSERT_LINE); + m_interrupt = 1; } } @@ -331,7 +331,7 @@ static MACHINE_CONFIG_START( galaxygame, galaxygame_state ) MCFG_CPU_ADD("maincpu", T11, 3000000 ) MCFG_CPU_PROGRAM_MAP(galaxygame_map) MCFG_CPU_CONFIG(t11_data) - MCFG_CPU_PERIODIC_INT(galaxygame_irq,60) + MCFG_CPU_PERIODIC_INT_DRIVER(galaxygame_state, galaxygame_irq, 60) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/galivan.c b/src/mame/drivers/galivan.c index 67905f3d460..a8eba034d8e 100644 --- a/src/mame/drivers/galivan.c +++ b/src/mame/drivers/galivan.c @@ -436,12 +436,12 @@ static MACHINE_CONFIG_START( galivan, galivan_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* 6 MHz? */ MCFG_CPU_PROGRAM_MAP(galivan_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galivan_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(galivan_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(galivan_state,galivan) MCFG_MACHINE_RESET_OVERRIDE(galivan_state,galivan) @@ -478,12 +478,12 @@ static MACHINE_CONFIG_START( ninjemak, galivan_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* 6 MHz? */ MCFG_CPU_PROGRAM_MAP(ninjemak_map) MCFG_CPU_IO_MAP(ninjemak_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", galivan_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(galivan_state, irq0_line_hold, XTAL_8MHz/2/512) // ? MCFG_MACHINE_START_OVERRIDE(galivan_state,ninjemak) MCFG_MACHINE_RESET_OVERRIDE(galivan_state,ninjemak) diff --git a/src/mame/drivers/galspnbl.c b/src/mame/drivers/galspnbl.c index 7289a278b23..dab38637648 100644 --- a/src/mame/drivers/galspnbl.c +++ b/src/mame/drivers/galspnbl.c @@ -229,7 +229,7 @@ static MACHINE_CONFIG_START( galspnbl, galspnbl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* 12 MHz ??? - Use value from Temco's Super Pinball Action - NEEDS VERIFICATION!! */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold)/* also has vector for 6, but it does nothing */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", galspnbl_state, irq3_line_hold)/* also has vector for 6, but it does nothing */ MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) /* 4 MHz ??? - Use value from Temco's Super Pinball Action - NEEDS VERIFICATION!! */ MCFG_CPU_PROGRAM_MAP(audio_map) diff --git a/src/mame/drivers/gamtor.c b/src/mame/drivers/gamtor.c index 339c221f89f..3773064727b 100644 --- a/src/mame/drivers/gamtor.c +++ b/src/mame/drivers/gamtor.c @@ -70,7 +70,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( gaminator, gaminator_state ) MCFG_CPU_ADD("maincpu", MCF5206E, 40000000) /* definitely Coldfire, model / clock uncertain */ MCFG_CPU_PROGRAM_MAP(gaminator_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) // irq6 seems to be needed to get past the ROM checking + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaminator_state, irq6_line_hold) // irq6 seems to be needed to get past the ROM checking MCFG_FRAGMENT_ADD( pcvideo_vga ) diff --git a/src/mame/drivers/gaplus.c b/src/mame/drivers/gaplus.c index ee659ca7e8a..0708ccd8e59 100644 --- a/src/mame/drivers/gaplus.c +++ b/src/mame/drivers/gaplus.c @@ -250,37 +250,34 @@ static TIMER_CALLBACK( namcoio_run ) } } -static INTERRUPT_GEN( gaplus_vblank_main_irq ) +INTERRUPT_GEN_MEMBER(gaplus_state::gaplus_vblank_main_irq) { - gaplus_state *state = device->machine().driver_data(); - device_t *io58xx = device->machine().device("58xx"); - device_t *io56xx = device->machine().device("56xx"); + device_t *io58xx = machine().device("58xx"); + device_t *io56xx = machine().device("56xx"); - if(state->m_main_irq_mask) - device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); + if(m_main_irq_mask) + machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); if (!namcoio_read_reset_line(io58xx)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run)); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run)); if (!namcoio_read_reset_line(io56xx)) /* 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), 1); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run), 1); } -static INTERRUPT_GEN( gaplus_vblank_sub_irq ) +INTERRUPT_GEN_MEMBER(gaplus_state::gaplus_vblank_sub_irq) { - gaplus_state *state = device->machine().driver_data(); - if(state->m_sub_irq_mask) - device->machine().device("sub")->execute().set_input_line(0, ASSERT_LINE); + if(m_sub_irq_mask) + machine().device("sub")->execute().set_input_line(0, ASSERT_LINE); } -static INTERRUPT_GEN( gaplus_vblank_sub2_irq ) +INTERRUPT_GEN_MEMBER(gaplus_state::gaplus_vblank_sub2_irq) { - gaplus_state *state = device->machine().driver_data(); - if(state->m_sub2_irq_mask) - device->machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE); + if(m_sub2_irq_mask) + machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE); } @@ -560,15 +557,15 @@ static MACHINE_CONFIG_START( gaplus, gaplus_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 24576000/16) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(cpu1_map) - MCFG_CPU_VBLANK_INT("screen", gaplus_vblank_main_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaplus_state, gaplus_vblank_main_irq) MCFG_CPU_ADD("sub", M6809, 24576000/16) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(cpu2_map) - MCFG_CPU_VBLANK_INT("screen", gaplus_vblank_sub_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaplus_state, gaplus_vblank_sub_irq) MCFG_CPU_ADD("sub2", M6809, 24576000/16) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(cpu3_map) - MCFG_CPU_VBLANK_INT("screen", gaplus_vblank_sub2_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gaplus_state, gaplus_vblank_sub2_irq) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* a high value to ensure proper synchronization of the CPUs */ diff --git a/src/mame/drivers/gatron.c b/src/mame/drivers/gatron.c index 721da7c69b7..49444be96c1 100644 --- a/src/mame/drivers/gatron.c +++ b/src/mame/drivers/gatron.c @@ -448,7 +448,7 @@ static MACHINE_CONFIG_START( gat, gatron_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/24) /* 666.66 kHz, guess */ MCFG_CPU_PROGRAM_MAP(gat_map) MCFG_CPU_IO_MAP(gat_portmap) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gatron_state, nmi_line_pulse) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/gberet.c b/src/mame/drivers/gberet.c index 32fb2b515fd..4639539a344 100644 --- a/src/mame/drivers/gberet.c +++ b/src/mame/drivers/gberet.c @@ -462,8 +462,8 @@ static MACHINE_CONFIG_START( gberetb, gberet_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_20MHz/4) // divider guessed MCFG_CPU_PROGRAM_MAP(gberetb_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) - MCFG_CPU_PERIODIC_INT(nmi_line_assert, XTAL_20MHz/0x8000) // divider guessed + MCFG_CPU_VBLANK_INT_DRIVER("screen", gberet_state, irq0_line_assert) + MCFG_CPU_PERIODIC_INT_DRIVER(gberet_state, nmi_line_assert, XTAL_20MHz/0x8000) // divider guessed MCFG_MACHINE_START_OVERRIDE(gberet_state,gberet) MCFG_MACHINE_RESET_OVERRIDE(gberet_state,gberet) diff --git a/src/mame/drivers/gbusters.c b/src/mame/drivers/gbusters.c index 2e3f039a41c..a7b057edd18 100644 --- a/src/mame/drivers/gbusters.c +++ b/src/mame/drivers/gbusters.c @@ -19,12 +19,11 @@ /* prototypes */ static KONAMI_SETLINES_CALLBACK( gbusters_banking ); -static INTERRUPT_GEN( gbusters_interrupt ) +INTERRUPT_GEN_MEMBER(gbusters_state::gbusters_interrupt) { - gbusters_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) - device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); + if (k052109_is_irq_enabled(m_k052109)) + device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } READ8_MEMBER(gbusters_state::bankedram_r) @@ -303,7 +302,7 @@ static MACHINE_CONFIG_START( gbusters, gbusters_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* Konami custom 052526 */ MCFG_CPU_PROGRAM_MAP(gbusters_map) - MCFG_CPU_VBLANK_INT("screen", gbusters_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gbusters_state, gbusters_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* ? */ MCFG_CPU_PROGRAM_MAP(gbusters_sound_map) diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c index 4a569b4cdf5..1daf1e46132 100644 --- a/src/mame/drivers/gcpinbal.c +++ b/src/mame/drivers/gcpinbal.c @@ -65,13 +65,13 @@ static TIMER_CALLBACK( gcpinbal_interrupt3 ) } #endif -static INTERRUPT_GEN( gcpinbal_interrupt ) +INTERRUPT_GEN_MEMBER(gcpinbal_state::gcpinbal_interrupt) { /* Unsure of actual sequence */ - 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->execute().set_input_line(4, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(500), FUNC(gcpinbal_interrupt1)); +// machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(1000), FUNC(gcpinbal_interrupt3)); + device.execute().set_input_line(4, HOLD_LINE); } @@ -439,7 +439,7 @@ static MACHINE_CONFIG_START( gcpinbal, gcpinbal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 32000000/2) /* 16 MHz ? */ MCFG_CPU_PROGRAM_MAP(gcpinbal_map) - MCFG_CPU_VBLANK_INT("screen", gcpinbal_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gcpinbal_state, gcpinbal_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/gei.c b/src/mame/drivers/gei.c index 10fb7779384..237d394f8f5 100644 --- a/src/mame/drivers/gei.c +++ b/src/mame/drivers/gei.c @@ -134,6 +134,7 @@ public: DECLARE_DRIVER_INIT(setbank); virtual void palette_init(); DECLARE_PALETTE_INIT(quizvid); + INTERRUPT_GEN_MEMBER(vblank_irq); }; @@ -1105,19 +1106,18 @@ static I8255A_INTERFACE( findout_ppi8255_1_intf ) }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(gei_state::vblank_irq) { - gei_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( getrivia, gei_state ) MCFG_CPU_ADD("maincpu",Z80,4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(getrivia_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gei_state, vblank_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c index f142369a499..2e29503340b 100644 --- a/src/mame/drivers/gijoe.c +++ b/src/mame/drivers/gijoe.c @@ -116,25 +116,24 @@ static TIMER_CALLBACK( dmaend_callback ) state->m_maincpu->set_input_line(6, HOLD_LINE); } -static INTERRUPT_GEN( gijoe_interrupt ) +INTERRUPT_GEN_MEMBER(gijoe_state::gijoe_interrupt) { - gijoe_state *state = device->machine().driver_data(); // global interrupt masking (*this game only) - if (!k056832_is_irq_enabled(state->m_k056832, 0)) + if (!k056832_is_irq_enabled(m_k056832, 0)) return; - if (k053246_is_irq_enabled(state->m_k053246)) + if (k053246_is_irq_enabled(m_k053246)) { - gijoe_objdma(device->machine()); + gijoe_objdma(machine()); // 42.7us(clr) + 341.3us(xfer) delay at 6Mhz dotclock - state->m_dmadelay_timer->adjust(JOE_DMADELAY); + m_dmadelay_timer->adjust(JOE_DMADELAY); } // trigger V-blank interrupt - if (state->m_cur_control2 & 0x0080) - device->execute().set_input_line(5, HOLD_LINE); + if (m_cur_control2 & 0x0080) + device.execute().set_input_line(5, HOLD_LINE); } WRITE16_MEMBER(gijoe_state::sound_cmd_w) @@ -296,7 +295,7 @@ static MACHINE_CONFIG_START( gijoe, gijoe_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* Confirmed */ MCFG_CPU_PROGRAM_MAP(gijoe_map) - MCFG_CPU_VBLANK_INT("screen", gijoe_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gijoe_state, gijoe_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 8000000) /* Amuse & confirmed. z80e */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/ginganin.c b/src/mame/drivers/ginganin.c index c83dd57e444..b494b16d7f7 100644 --- a/src/mame/drivers/ginganin.c +++ b/src/mame/drivers/ginganin.c @@ -261,7 +261,7 @@ static MACHINE_CONFIG_START( ginganin, ginganin_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, MAIN_CLOCK) MCFG_CPU_PROGRAM_MAP(ginganin_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) /* ? (vectors 1-7 cointain the same address) */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", ginganin_state, irq1_line_hold) /* ? (vectors 1-7 cointain the same address) */ MCFG_CPU_ADD("audiocpu", M6809, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c index abf1671bd78..54cfe730581 100644 --- a/src/mame/drivers/gladiatr.c +++ b/src/mame/drivers/gladiatr.c @@ -666,12 +666,12 @@ static MACHINE_CONFIG_START( ppking, gladiatr_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(ppking_cpu1_map) MCFG_CPU_IO_MAP(ppking_cpu1_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gladiatr_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_12MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu2_map) MCFG_CPU_IO_MAP(ppking_cpu2_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gladiatr_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", M6809, XTAL_12MHz/16) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(ppking_cpu3_map) @@ -715,7 +715,7 @@ static MACHINE_CONFIG_START( gladiatr, gladiatr_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(gladiatr_cpu1_map) MCFG_CPU_IO_MAP(gladiatr_cpu1_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gladiatr_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_12MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu2_map) diff --git a/src/mame/drivers/glass.c b/src/mame/drivers/glass.c index 54a4168d9dd..8a4e6053d65 100644 --- a/src/mame/drivers/glass.c +++ b/src/mame/drivers/glass.c @@ -18,14 +18,13 @@ WRITE16_MEMBER(glass_state::clr_int_w) m_cause_interrupt = 1; } -static INTERRUPT_GEN( glass_interrupt ) +INTERRUPT_GEN_MEMBER(glass_state::glass_interrupt) { - glass_state *state = device->machine().driver_data(); - if (state->m_cause_interrupt) + if (m_cause_interrupt) { - device->execute().set_input_line(6, HOLD_LINE); - state->m_cause_interrupt = 0; + device.execute().set_input_line(6, HOLD_LINE); + m_cause_interrupt = 0; } } @@ -196,7 +195,7 @@ static MACHINE_CONFIG_START( glass, glass_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz (M680000 P12) */ MCFG_CPU_PROGRAM_MAP(glass_map) - MCFG_CPU_VBLANK_INT("screen", glass_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", glass_state, glass_interrupt) /* video hardware */ diff --git a/src/mame/drivers/gng.c b/src/mame/drivers/gng.c index 4e06e40b883..931889b63a7 100644 --- a/src/mame/drivers/gng.c +++ b/src/mame/drivers/gng.c @@ -343,11 +343,11 @@ static MACHINE_CONFIG_START( gng, gng_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, XTAL_12MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(gng_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gng_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(gng_state, irq0_line_hold, 4*60) /* video hardware */ diff --git a/src/mame/drivers/go2000.c b/src/mame/drivers/go2000.c index 91524a70d04..2f84e2d2e8c 100644 --- a/src/mame/drivers/go2000.c +++ b/src/mame/drivers/go2000.c @@ -326,7 +326,7 @@ static MACHINE_CONFIG_START( go2000, go2000_state ) MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(go2000_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", go2000_state, irq1_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(go2000_sound_map) diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c index d3b7afeaab6..c4e5ad72fbd 100644 --- a/src/mame/drivers/goal92.c +++ b/src/mame/drivers/goal92.c @@ -315,7 +315,7 @@ static MACHINE_CONFIG_START( goal92, goal92_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,12000000) MCFG_CPU_PROGRAM_MAP(goal92_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) /* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", goal92_state, irq6_line_hold) /* VBL */ MCFG_CPU_ADD("audiocpu", Z80, 2500000) MCFG_CPU_PROGRAM_MAP(sound_cpu) diff --git a/src/mame/drivers/goindol.c b/src/mame/drivers/goindol.c index 5adb6525ff3..e1526623587 100644 --- a/src/mame/drivers/goindol.c +++ b/src/mame/drivers/goindol.c @@ -239,11 +239,11 @@ static MACHINE_CONFIG_START( goindol, goindol_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* XTAL confirmed, divisor is not */ MCFG_CPU_PROGRAM_MAP(goindol_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goindol_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/2) /* XTAL confirmed, divisor is not */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(goindol_state, irq0_line_hold, 4*60) /* video hardware */ diff --git a/src/mame/drivers/goldngam.c b/src/mame/drivers/goldngam.c index d8edff9974e..1cd8c14b8bc 100644 --- a/src/mame/drivers/goldngam.c +++ b/src/mame/drivers/goldngam.c @@ -560,7 +560,7 @@ static MACHINE_CONFIG_START( swisspkr, goldngam_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(swisspkr_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldngam_state, irq2_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/goldnpkr.c b/src/mame/drivers/goldnpkr.c index 3273f937740..3fc4dc31e6a 100644 --- a/src/mame/drivers/goldnpkr.c +++ b/src/mame/drivers/goldnpkr.c @@ -3574,7 +3574,7 @@ static MACHINE_CONFIG_START( goldnpkr_base, goldnpkr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(goldnpkr_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldnpkr_state, nmi_line_pulse) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c index 4fbdb1b23c5..609ba2ca0e8 100644 --- a/src/mame/drivers/goldstar.c +++ b/src/mame/drivers/goldstar.c @@ -5857,7 +5857,7 @@ static MACHINE_CONFIG_START( goldstar, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(goldstar_map) MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -5891,7 +5891,7 @@ static MACHINE_CONFIG_START( goldstbl, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(goldstar_map) MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -5924,7 +5924,7 @@ static MACHINE_CONFIG_START( moonlght, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(goldstar_map) MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -6018,7 +6018,7 @@ static MACHINE_CONFIG_START( chrygld, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(ncb3_map) MCFG_CPU_IO_MAP(ncb3_readwriteport) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 3x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", ncb3_ppi8255_0_intf ) @@ -6060,7 +6060,7 @@ static MACHINE_CONFIG_START( cb3c, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(ncb3_map) MCFG_CPU_IO_MAP(ncb3_readwriteport) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 3x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", ncb3_ppi8255_0_intf ) @@ -6101,7 +6101,7 @@ static MACHINE_CONFIG_START( ncb3, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(ncb3_map) MCFG_CPU_IO_MAP(ncb3_readwriteport) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 3x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", ncb3_ppi8255_0_intf ) @@ -6143,7 +6143,7 @@ static MACHINE_CONFIG_START( cm, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(cm_map) MCFG_CPU_IO_MAP(cm_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", cm_ppi8255_0_intf ) @@ -6183,7 +6183,7 @@ static MACHINE_CONFIG_START( cmnobmp, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(cm_map) MCFG_CPU_IO_MAP(cm_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", cm_ppi8255_0_intf ) @@ -6218,7 +6218,7 @@ static MACHINE_CONFIG_START( cmast91, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(cm_map) MCFG_CPU_IO_MAP(cmast91_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", cm_ppi8255_0_intf ) @@ -6246,12 +6246,11 @@ static MACHINE_CONFIG_START( cmast91, goldstar_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END -static INTERRUPT_GEN( lucky8_irq ) +INTERRUPT_GEN_MEMBER(goldstar_state::lucky8_irq) { - goldstar_state *state = device->machine().driver_data(); - if(state->m_lucky8_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_lucky8_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( lucky8, goldstar_state ) @@ -6260,7 +6259,7 @@ static MACHINE_CONFIG_START( lucky8, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(lucky8_map) //MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", lucky8_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, lucky8_irq) /* 3x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", lucky8_ppi8255_0_intf ) @@ -6300,7 +6299,7 @@ static MACHINE_CONFIG_START( bingowng, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(lucky8_map) //MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", lucky8_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, lucky8_irq) /* 3x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", lucky8_ppi8255_0_intf ) @@ -6340,7 +6339,7 @@ static MACHINE_CONFIG_START( bingownga, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(lucky8_map) //MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", lucky8_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, lucky8_irq) /* 3x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", lucky8_ppi8255_0_intf ) @@ -6397,7 +6396,7 @@ static MACHINE_CONFIG_START( magodds, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(magodds_map) //MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", lucky8_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, lucky8_irq) /* 3x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", lucky8_ppi8255_0_intf ) @@ -6438,7 +6437,7 @@ static MACHINE_CONFIG_START( kkotnoli, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(kkotnoli_map) //MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, nmi_line_pulse) /* 3x 8255 */ @@ -6476,7 +6475,7 @@ static MACHINE_CONFIG_START( ladylinr, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(ladylinr_map) //MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, nmi_line_pulse) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", ladylinr_ppi8255_0_intf ) @@ -6516,7 +6515,7 @@ static MACHINE_CONFIG_START( wcat3, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(wcat3_map) //MCFG_CPU_IO_MAP(goldstar_readport) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, nmi_line_pulse) /* 3x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", lucky8_ppi8255_0_intf ) @@ -6559,7 +6558,7 @@ static MACHINE_CONFIG_START( amcoe1, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(cm_map) MCFG_CPU_IO_MAP(amcoe1_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", cm_ppi8255_0_intf ) @@ -6598,7 +6597,7 @@ static MACHINE_CONFIG_START( amcoe1a, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(cm_map) MCFG_CPU_IO_MAP(amcoe1_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", cm_ppi8255_0_intf ) @@ -6637,7 +6636,7 @@ static MACHINE_CONFIG_START( amcoe2, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(cm_map) MCFG_CPU_IO_MAP(amcoe2_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", cm_ppi8255_0_intf ) @@ -6671,7 +6670,7 @@ static MACHINE_CONFIG_START( nfm, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(nfm_map) MCFG_CPU_IO_MAP(amcoe2_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", cm_ppi8255_0_intf ) @@ -6705,8 +6704,8 @@ static MACHINE_CONFIG_START( unkch, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(unkch_map) MCFG_CPU_IO_MAP(unkch_portmap) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) - //MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, nmi_line_pulse) + //MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -6750,7 +6749,7 @@ static MACHINE_CONFIG_START( pkrmast, goldstar_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(cm_map) MCFG_CPU_IO_MAP(cm_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, irq0_line_hold) /* 2x 8255 */ MCFG_I8255A_ADD( "ppi8255_0", cm_ppi8255_0_intf ) diff --git a/src/mame/drivers/gomoku.c b/src/mame/drivers/gomoku.c index 3e71131b95a..53de11e3a70 100644 --- a/src/mame/drivers/gomoku.c +++ b/src/mame/drivers/gomoku.c @@ -121,7 +121,7 @@ static MACHINE_CONFIG_START( gomoku, gomoku_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/12) /* 1.536 MHz ? */ MCFG_CPU_PROGRAM_MAP(gomoku_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gomoku_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/good.c b/src/mame/drivers/good.c index 3f2280b1de2..a093a1cd3de 100644 --- a/src/mame/drivers/good.c +++ b/src/mame/drivers/good.c @@ -279,7 +279,7 @@ static MACHINE_CONFIG_START( good, good_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000 /2) MCFG_CPU_PROGRAM_MAP(good_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", good_state, irq2_line_hold) MCFG_GFXDECODE(good) diff --git a/src/mame/drivers/goodejan.c b/src/mame/drivers/goodejan.c index 7da260070ea..12ffa8d90bf 100644 --- a/src/mame/drivers/goodejan.c +++ b/src/mame/drivers/goodejan.c @@ -67,6 +67,7 @@ public: DECLARE_WRITE16_MEMBER(goodejan_gfxbank_w); DECLARE_READ16_MEMBER(mahjong_panel_r); DECLARE_WRITE16_MEMBER(mahjong_panel_w); + INTERRUPT_GEN_MEMBER(goodejan_irq); }; @@ -329,9 +330,9 @@ static GFXDECODE_START( goodejan ) GFXDECODE_ENTRY( "tx_gfx", 0, charlayout, 0x100, 0x10 ) /* Text */ GFXDECODE_END -static INTERRUPT_GEN( goodejan_irq ) +INTERRUPT_GEN_MEMBER(goodejan_state::goodejan_irq) { - device->execute().set_input_line_and_vector(0,HOLD_LINE,0x208/4); + device.execute().set_input_line_and_vector(0,HOLD_LINE,0x208/4); /* vector 0x00c is just a reti */ } @@ -341,7 +342,7 @@ static MACHINE_CONFIG_START( goodejan, goodejan_state ) MCFG_CPU_ADD("maincpu", V30, GOODEJAN_MHZ2/2) MCFG_CPU_PROGRAM_MAP(goodejan_map) MCFG_CPU_IO_MAP(goodejan_io_map) - MCFG_CPU_VBLANK_INT("screen",goodejan_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", goodejan_state, goodejan_irq) SEIBU_SOUND_SYSTEM_CPU(GOODEJAN_MHZ1/2) diff --git a/src/mame/drivers/gotcha.c b/src/mame/drivers/gotcha.c index 054893a57e2..b5250be802e 100644 --- a/src/mame/drivers/gotcha.c +++ b/src/mame/drivers/gotcha.c @@ -278,11 +278,11 @@ static MACHINE_CONFIG_START( gotcha, gotcha_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,14318180) /* 14.31818 MHz */ MCFG_CPU_PROGRAM_MAP(gotcha_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gotcha_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80,6000000) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) -// MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gotcha_state, nmi_line_pulse) /* video hardware */ diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c index 942f5d81831..9ec580957d0 100644 --- a/src/mame/drivers/gottlieb.c +++ b/src/mame/drivers/gottlieb.c @@ -657,21 +657,20 @@ static TIMER_CALLBACK( nmi_clear ) } -static INTERRUPT_GEN( gottlieb_interrupt ) +INTERRUPT_GEN_MEMBER(gottlieb_state::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->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)); + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), FUNC(nmi_clear)); /* if we have a laserdisc, update it */ - if (state->m_laserdisc != NULL) + if (m_laserdisc != NULL) { /* set the "disc ready" bit, which basically indicates whether or not we have a proper video frame */ - if (!state->m_laserdisc->video_active()) - state->m_laserdisc_status &= ~0x20; + if (!m_laserdisc->video_active()) + m_laserdisc_status &= ~0x20; else - state->m_laserdisc_status |= 0x20; + m_laserdisc_status |= 0x20; } } @@ -1711,7 +1710,7 @@ static MACHINE_CONFIG_START( gottlieb_core, gottlieb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8088, CPU_CLOCK/3) MCFG_CPU_PROGRAM_MAP(gottlieb_map) - MCFG_CPU_VBLANK_INT("screen", gottlieb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gottlieb_state, gottlieb_interrupt) MCFG_NVRAM_ADD_1FILL("nvram") MCFG_WATCHDOG_VBLANK_INIT(16) diff --git a/src/mame/drivers/gotya.c b/src/mame/drivers/gotya.c index 1472cccfbc2..00c740bc8cc 100644 --- a/src/mame/drivers/gotya.c +++ b/src/mame/drivers/gotya.c @@ -195,7 +195,7 @@ static MACHINE_CONFIG_START( gotya, gotya_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,18432000/6) /* 3.072 MHz ??? */ MCFG_CPU_PROGRAM_MAP(gotya_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gotya_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c index dc26dab3482..61f79def776 100644 --- a/src/mame/drivers/gpworld.c +++ b/src/mame/drivers/gpworld.c @@ -72,6 +72,7 @@ public: DECLARE_DRIVER_INIT(gpworld); virtual void machine_start(); UINT32 screen_update_gpworld(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_callback_gpworld); }; @@ -429,20 +430,19 @@ static TIMER_CALLBACK( irq_stop ) machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE); } -static INTERRUPT_GEN( vblank_callback_gpworld ) +INTERRUPT_GEN_MEMBER(gpworld_state::vblank_callback_gpworld) { - gpworld_state *state = device->machine().driver_data(); /* Do an NMI if the enabled bit is set */ - if (state->m_nmi_enable) + if (m_nmi_enable) { - state->m_laserdisc->data_w(state->m_ldp_write_latch); - state->m_ldp_read_latch = state->m_laserdisc->status_r(); - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + m_laserdisc->data_w(m_ldp_write_latch); + m_ldp_read_latch = m_laserdisc->status_r(); + 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->execute().set_input_line(0, ASSERT_LINE); - device->machine().scheduler().timer_set(attotime::from_usec(100), FUNC(irq_stop)); + device.execute().set_input_line(0, ASSERT_LINE); + machine().scheduler().timer_set(attotime::from_usec(100), FUNC(irq_stop)); } static const gfx_layout gpworld_tile_layout = @@ -467,7 +467,7 @@ static MACHINE_CONFIG_START( gpworld, gpworld_state ) MCFG_CPU_ADD("maincpu", Z80, GUESSED_CLOCK) MCFG_CPU_PROGRAM_MAP(mainmem) MCFG_CPU_IO_MAP(mainport) - MCFG_CPU_VBLANK_INT("screen", vblank_callback_gpworld) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gpworld_state, vblank_callback_gpworld) MCFG_LASERDISC_LDV1000_ADD("laserdisc") diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c index 61d8e5a641d..32e62d7e34d 100644 --- a/src/mame/drivers/gradius3.c +++ b/src/mame/drivers/gradius3.c @@ -99,11 +99,10 @@ WRITE16_MEMBER(gradius3_state::cpuB_irqenable_w) m_irqBmask = (data >> 8) & 0x07; } -static INTERRUPT_GEN( cpuA_interrupt ) +INTERRUPT_GEN_MEMBER(gradius3_state::cpuA_interrupt) { - gradius3_state *state = device->machine().driver_data(); - if (state->m_irqAen) - device->execute().set_input_line(2, HOLD_LINE); + if (m_irqAen) + device.execute().set_input_line(2, HOLD_LINE); } @@ -317,7 +316,7 @@ static MACHINE_CONFIG_START( gradius3, gradius3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(gradius3_map) - MCFG_CPU_VBLANK_INT("screen", cpuA_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gradius3_state, cpuA_interrupt) MCFG_CPU_ADD("sub", M68000, 10000000) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(gradius3_map2) diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c index f4b672db7ab..fb0b2fe1123 100644 --- a/src/mame/drivers/grchamp.c +++ b/src/mame/drivers/grchamp.c @@ -90,21 +90,19 @@ void grchamp_state::machine_reset() * *************************************/ -static INTERRUPT_GEN( grchamp_cpu0_interrupt ) +INTERRUPT_GEN_MEMBER(grchamp_state::grchamp_cpu0_interrupt) { - grchamp_state *state = device->machine().driver_data(); - if (state->m_cpu0_out[0] & 0x01) - device->execute().set_input_line(0, ASSERT_LINE); + if (m_cpu0_out[0] & 0x01) + device.execute().set_input_line(0, ASSERT_LINE); } -static INTERRUPT_GEN( grchamp_cpu1_interrupt ) +INTERRUPT_GEN_MEMBER(grchamp_state::grchamp_cpu1_interrupt) { - grchamp_state *state = device->machine().driver_data(); - if (state->m_cpu1_out[4] & 0x01) - device->execute().set_input_line(0, ASSERT_LINE); + if (m_cpu1_out[4] & 0x01) + device.execute().set_input_line(0, ASSERT_LINE); } @@ -671,18 +669,18 @@ static MACHINE_CONFIG_START( grchamp, grchamp_state ) MCFG_CPU_ADD("maincpu", Z80, PIXEL_CLOCK/2) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", grchamp_cpu0_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", grchamp_state, grchamp_cpu0_interrupt) /* GAME BOARD */ MCFG_CPU_ADD("sub", Z80, PIXEL_CLOCK/2) MCFG_CPU_PROGRAM_MAP(sub_map) MCFG_CPU_IO_MAP(sub_portmap) - MCFG_CPU_VBLANK_INT("screen", grchamp_cpu1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", grchamp_state, grchamp_cpu1_interrupt) /* SOUND BOARD */ MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK/2) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, (double)SOUND_CLOCK/4/16/16/10/16) + MCFG_CPU_PERIODIC_INT_DRIVER(grchamp_state, irq0_line_hold, (double)SOUND_CLOCK/4/16/16/10/16) MCFG_WATCHDOG_VBLANK_INIT(8) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c index 45046dd2bdf..510b10b4a0e 100644 --- a/src/mame/drivers/groundfx.c +++ b/src/mame/drivers/groundfx.c @@ -354,11 +354,10 @@ static const tc0480scp_interface groundfx_tc0480scp_intf = 0 /* col_base */ }; -static INTERRUPT_GEN( groundfx_interrupt ) +INTERRUPT_GEN_MEMBER(groundfx_state::groundfx_interrupt) { - groundfx_state *state = device->machine().driver_data(); - state->m_frame_counter^=1; - device->execute().set_input_line(4, HOLD_LINE); + m_frame_counter^=1; + device.execute().set_input_line(4, HOLD_LINE); } static MACHINE_CONFIG_START( groundfx, groundfx_state ) @@ -366,7 +365,7 @@ static MACHINE_CONFIG_START( groundfx, groundfx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(groundfx_map) - MCFG_CPU_VBLANK_INT("screen", groundfx_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", groundfx_state, groundfx_interrupt) MCFG_EEPROM_ADD("eeprom", groundfx_eeprom_interface) diff --git a/src/mame/drivers/gstream.c b/src/mame/drivers/gstream.c index 8000adf7aa4..2b65f3ecbd5 100644 --- a/src/mame/drivers/gstream.c +++ b/src/mame/drivers/gstream.c @@ -565,7 +565,7 @@ static MACHINE_CONFIG_START( gstream, gstream_state ) MCFG_CPU_ADD("maincpu", E132XT, 16000000*4) /* 4x internal multiplier */ MCFG_CPU_PROGRAM_MAP(gstream_32bit_map) MCFG_CPU_IO_MAP(gstream_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gstream_state, irq0_line_hold) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c index 745111bd3ac..d9ed0a29b42 100644 --- a/src/mame/drivers/gstriker.c +++ b/src/mame/drivers/gstriker.c @@ -542,7 +542,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( gstriker, gstriker_state ) MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(gstriker_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gstriker_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -580,7 +580,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( vgoal, gstriker_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(vgoal_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gstriker_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c index 4552dcaa7bf..ec0c06865ac 100644 --- a/src/mame/drivers/gsword.c +++ b/src/mame/drivers/gsword.c @@ -247,12 +247,11 @@ MACHINE_RESET_MEMBER(gsword_state,josvolly) josvolly_8741_reset(); } -static INTERRUPT_GEN( gsword_snd_interrupt ) +INTERRUPT_GEN_MEMBER(gsword_state::gsword_snd_interrupt) { - gsword_state *state = device->machine().driver_data(); - if(state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(gsword_state::gsword_nmi_set_w) @@ -661,12 +660,12 @@ static MACHINE_CONFIG_START( gsword, gsword_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_18MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu1_map) MCFG_CPU_IO_MAP(cpu1_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gsword_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_18MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu2_map) MCFG_CPU_IO_MAP(cpu2_io_map) - MCFG_CPU_PERIODIC_INT(gsword_snd_interrupt,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(gsword_state, gsword_snd_interrupt, 4*60) MCFG_CPU_ADD("audiocpu", Z80, XTAL_18MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu3_map) @@ -714,12 +713,12 @@ static MACHINE_CONFIG_START( josvolly, gsword_state ) MCFG_CPU_ADD("maincpu", Z80, 18000000/6) /* ? */ MCFG_CPU_PROGRAM_MAP(cpu1_map) MCFG_CPU_IO_MAP(josvolly_cpu1_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(gsword_state, irq0_line_hold, 2*60) MCFG_CPU_ADD("audiocpu", Z80, 12000000/4) /* ? */ MCFG_CPU_PROGRAM_MAP(josvolly_cpu2_map) MCFG_CPU_IO_MAP(josvolly_cpu2_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gsword_state, irq0_line_hold) MCFG_MACHINE_RESET_OVERRIDE(gsword_state,josvolly) diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c index 11d30c08207..171f213dfe0 100644 --- a/src/mame/drivers/gticlub.c +++ b/src/mame/drivers/gticlub.c @@ -263,6 +263,7 @@ public: DECLARE_MACHINE_START(gticlub); DECLARE_MACHINE_RESET(gticlub); DECLARE_MACHINE_RESET(hangplt); + INTERRUPT_GEN_MEMBER(gticlub_vblank); }; @@ -694,9 +695,9 @@ INPUT_PORTS_END DMA0 */ -static INTERRUPT_GEN( gticlub_vblank ) +INTERRUPT_GEN_MEMBER(gticlub_state::gticlub_vblank) { - device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); + device.execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } @@ -806,7 +807,7 @@ static MACHINE_CONFIG_START( gticlub, gticlub_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", PPC403GA, 64000000/2) /* PowerPC 403GA 32MHz */ MCFG_CPU_PROGRAM_MAP(gticlub_map) - MCFG_CPU_VBLANK_INT("screen", gticlub_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gticlub_state, gticlub_vblank) MCFG_CPU_ADD("audiocpu", M68000, 64000000/4) /* 16MHz */ MCFG_CPU_PROGRAM_MAP(sound_memmap) diff --git a/src/mame/drivers/gumbo.c b/src/mame/drivers/gumbo.c index 8029f277444..f069dadde8e 100644 --- a/src/mame/drivers/gumbo.c +++ b/src/mame/drivers/gumbo.c @@ -231,7 +231,7 @@ static MACHINE_CONFIG_START( gumbo, gumbo_state ) MCFG_CPU_ADD("maincpu", M68000, 14318180 /2) // or 10mhz? ? MCFG_CPU_PROGRAM_MAP(gumbo_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) // all the same + MCFG_CPU_VBLANK_INT_DRIVER("screen", gumbo_state, irq1_line_hold) // all the same MCFG_GFXDECODE(gumbo) diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c index d87e9ee07d5..c79e8cf1dbd 100644 --- a/src/mame/drivers/gunbustr.c +++ b/src/mame/drivers/gunbustr.c @@ -57,10 +57,10 @@ static TIMER_CALLBACK( gunbustr_interrupt5 ) machine.device("maincpu")->execute().set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( gunbustr_interrupt ) +INTERRUPT_GEN_MEMBER(gunbustr_state::gunbustr_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000-500), FUNC(gunbustr_interrupt5)); - device->execute().set_input_line(4, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(200000-500), FUNC(gunbustr_interrupt5)); + device.execute().set_input_line(4, HOLD_LINE); } WRITE32_MEMBER(gunbustr_state::gunbustr_palette_w) @@ -305,7 +305,7 @@ static MACHINE_CONFIG_START( gunbustr, gunbustr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(gunbustr_map) - MCFG_CPU_VBLANK_INT("screen", gunbustr_interrupt) /* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", gunbustr_state, gunbustr_interrupt) /* VBL */ MCFG_EEPROM_ADD("eeprom", gunbustr_eeprom_interface) diff --git a/src/mame/drivers/gunpey.c b/src/mame/drivers/gunpey.c index 1c1eb7928aa..d62911c04aa 100644 --- a/src/mame/drivers/gunpey.c +++ b/src/mame/drivers/gunpey.c @@ -95,6 +95,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_gunpey(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(gunpey_interrupt); }; @@ -355,9 +356,9 @@ void gunpey_state::palette_init() } -static INTERRUPT_GEN( gunpey_interrupt ) +INTERRUPT_GEN_MEMBER(gunpey_state::gunpey_interrupt) { - device->execute().set_input_line_and_vector(0,HOLD_LINE,0x200/4); + device.execute().set_input_line_and_vector(0,HOLD_LINE,0x200/4); } /***************************************************************************************/ @@ -367,7 +368,7 @@ static MACHINE_CONFIG_START( gunpey, gunpey_state ) MCFG_CPU_ADD("maincpu", V30, 57242400 / 4) MCFG_CPU_PROGRAM_MAP(mem_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", gunpey_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gunpey_state, gunpey_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/gunsmoke.c b/src/mame/drivers/gunsmoke.c index 9f5ebe4b74c..c3dc6b7f57c 100644 --- a/src/mame/drivers/gunsmoke.c +++ b/src/mame/drivers/gunsmoke.c @@ -297,11 +297,11 @@ static MACHINE_CONFIG_START( gunsmoke, gunsmoke_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) // 4 MHz MCFG_CPU_PROGRAM_MAP(gunsmoke_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gunsmoke_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 3000000) // 3 MHz MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(gunsmoke_state, irq0_line_hold, 4*60) /* video hardware */ diff --git a/src/mame/drivers/gyruss.c b/src/mame/drivers/gyruss.c index 4ba46a28843..b4251295a7c 100644 --- a/src/mame/drivers/gyruss.c +++ b/src/mame/drivers/gyruss.c @@ -496,20 +496,18 @@ void gyruss_state::machine_start() save_item(NAME(m_slave_irq_mask)); } -static INTERRUPT_GEN( master_vblank_irq ) +INTERRUPT_GEN_MEMBER(gyruss_state::master_vblank_irq) { - gyruss_state *state = device->machine().driver_data(); - if (state->m_master_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_master_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( slave_vblank_irq ) +INTERRUPT_GEN_MEMBER(gyruss_state::slave_vblank_irq) { - gyruss_state *state = device->machine().driver_data(); - if (state->m_slave_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if (m_slave_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( gyruss, gyruss_state ) @@ -517,11 +515,11 @@ static MACHINE_CONFIG_START( gyruss, gyruss_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(main_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", master_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gyruss_state, master_vblank_irq) MCFG_CPU_ADD("sub", M6809, MASTER_CLOCK/12) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(main_cpu2_map) - MCFG_CPU_VBLANK_INT("screen", slave_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gyruss_state, slave_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK/4) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(audio_cpu1_map) diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c index 7858fc3a722..637611ad49d 100644 --- a/src/mame/drivers/halleys.c +++ b/src/mame/drivers/halleys.c @@ -1963,7 +1963,7 @@ static MACHINE_CONFIG_START( halleys, halleys_state ) MCFG_CPU_ADD("audiocpu", Z80, XTAL_6MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, (double)6000000/(4*16*16*10*16)) + MCFG_CPU_PERIODIC_INT_DRIVER(halleys_state, irq0_line_hold, (double)6000000/(4*16*16*10*16)) // video hardware diff --git a/src/mame/drivers/hanaawas.c b/src/mame/drivers/hanaawas.c index 3fd20b34a8a..e9b359d38b4 100644 --- a/src/mame/drivers/hanaawas.c +++ b/src/mame/drivers/hanaawas.c @@ -200,7 +200,7 @@ static MACHINE_CONFIG_START( hanaawas, hanaawas_state ) MCFG_CPU_ADD("maincpu", Z80,18432000/6) /* 3.072 MHz ??? */ MCFG_CPU_PROGRAM_MAP(hanaawas_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hanaawas_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/harddriv.c b/src/mame/drivers/harddriv.c index ff05f994b16..68af270573d 100644 --- a/src/mame/drivers/harddriv.c +++ b/src/mame/drivers/harddriv.c @@ -1326,7 +1326,7 @@ static MACHINE_CONFIG_START( driver_nomsp, harddriv_state ) MCFG_CPU_ADD("maincpu", M68010, HARDDRIV_MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(driver_68k_map) MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen) - MCFG_CPU_PERIODIC_INT(hd68k_irq_gen, (double)HARDDRIV_MASTER_CLOCK/16/16/16/16/2) + MCFG_CPU_PERIODIC_INT_DRIVER(harddriv_state, hd68k_irq_gen, (double)HARDDRIV_MASTER_CLOCK/16/16/16/16/2) MCFG_CPU_ADD("gsp", TMS34010, HARDDRIV_GSP_CLOCK) MCFG_CPU_PROGRAM_MAP(driver_gsp_map) diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c index 4bff70ca392..95eee171a59 100644 --- a/src/mame/drivers/hcastle.c +++ b/src/mame/drivers/hcastle.c @@ -209,7 +209,7 @@ static MACHINE_CONFIG_START( hcastle, hcastle_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* Derived from 24 MHz clock */ MCFG_CPU_PROGRAM_MAP(hcastle_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hcastle_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/highvdeo.c b/src/mame/drivers/highvdeo.c index 0970e48a467..11ecd74b03c 100644 --- a/src/mame/drivers/highvdeo.c +++ b/src/mame/drivers/highvdeo.c @@ -127,6 +127,7 @@ public: DECLARE_VIDEO_START(tourvisn); UINT32 screen_update_tourvisn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_brasil(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; @@ -920,16 +921,16 @@ static INPUT_PORTS_START( fashion ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(highvdeo_state::vblank_irq) { - device->execute().set_input_line_and_vector(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 ) MCFG_CPU_ADD("maincpu", V30, XTAL_12MHz/2 ) // ? MCFG_CPU_PROGRAM_MAP(tv_vcf_map) MCFG_CPU_IO_MAP(tv_vcf_io) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", highvdeo_state, vblank_irq) MCFG_NVRAM_ADD_0FILL("nvram") @@ -988,14 +989,14 @@ static MACHINE_CONFIG_DERIVED( ciclone, tv_tcf ) MCFG_CPU_ADD("maincpu", I80186, 20000000/2 ) // ? MCFG_CPU_PROGRAM_MAP(tv_tcf_map) MCFG_CPU_IO_MAP(tv_tcf_io) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", highvdeo_state, vblank_irq) MACHINE_CONFIG_END static MACHINE_CONFIG_START( brasil, highvdeo_state ) MCFG_CPU_ADD("maincpu", I80186, 20000000 ) // fashion doesn't like 20/2 Mhz MCFG_CPU_PROGRAM_MAP(brasil_map) MCFG_CPU_IO_MAP(brasil_io) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", highvdeo_state, vblank_irq) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/himesiki.c b/src/mame/drivers/himesiki.c index d162b50d451..3708ed703dd 100644 --- a/src/mame/drivers/himesiki.c +++ b/src/mame/drivers/himesiki.c @@ -292,7 +292,7 @@ static MACHINE_CONFIG_START( himesiki, himesiki_state ) MCFG_CPU_ADD("maincpu", Z80, MCLK/2) /* 6.000 MHz */ MCFG_CPU_PROGRAM_MAP(himesiki_prm0) MCFG_CPU_IO_MAP(himesiki_iom0) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", himesiki_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, MCLK/3) /* 4.000 MHz */ MCFG_CPU_PROGRAM_MAP(himesiki_prm1) diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c index 9aedc2bbae1..a045335f43f 100644 --- a/src/mame/drivers/hitpoker.c +++ b/src/mame/drivers/hitpoker.c @@ -82,6 +82,7 @@ public: DECLARE_DRIVER_INIT(hitpoker); virtual void video_start(); UINT32 screen_update_hitpoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(hitpoker_irq); }; @@ -485,9 +486,9 @@ static const hc11_config hitpoker_config = 0x01 //INIT defaults to 0x01 }; -static INTERRUPT_GEN( hitpoker_irq ) +INTERRUPT_GEN_MEMBER(hitpoker_state::hitpoker_irq) { - device->execute().set_input_line(MC68HC11_IRQ_LINE, HOLD_LINE); + device.execute().set_input_line(MC68HC11_IRQ_LINE, HOLD_LINE); } static MACHINE_CONFIG_START( hitpoker, hitpoker_state ) @@ -495,7 +496,7 @@ static MACHINE_CONFIG_START( hitpoker, hitpoker_state ) MCFG_CPU_PROGRAM_MAP(hitpoker_map) MCFG_CPU_IO_MAP(hitpoker_io) MCFG_CPU_CONFIG(hitpoker_config) - MCFG_CPU_VBLANK_INT("screen", hitpoker_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hitpoker_state, hitpoker_irq) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/hnayayoi.c b/src/mame/drivers/hnayayoi.c index 0ec82a3e174..4550309a647 100644 --- a/src/mame/drivers/hnayayoi.c +++ b/src/mame/drivers/hnayayoi.c @@ -560,8 +560,8 @@ static MACHINE_CONFIG_START( hnayayoi, hnayayoi_state ) MCFG_CPU_ADD("maincpu", Z80, 20000000/4 ) /* 5 MHz ???? */ MCFG_CPU_PROGRAM_MAP(hnayayoi_map) MCFG_CPU_IO_MAP(hnayayoi_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 8000) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hnayayoi_state, irq0_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(hnayayoi_state, nmi_line_pulse, 8000) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/holeland.c b/src/mame/drivers/holeland.c index e78d3d98dad..9b0d4944fce 100644 --- a/src/mame/drivers/holeland.c +++ b/src/mame/drivers/holeland.c @@ -280,7 +280,7 @@ static MACHINE_CONFIG_START( holeland, holeland_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(holeland_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", holeland_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -348,7 +348,7 @@ static MACHINE_CONFIG_START( crzrally, holeland_state ) MCFG_CPU_ADD("maincpu", Z80, 20000000/4) /* 5 MHz */ MCFG_CPU_PROGRAM_MAP(crzrally_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", holeland_state, irq0_line_hold) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c index 5e937c69dd3..fbe6c7b5139 100644 --- a/src/mame/drivers/homedata.c +++ b/src/mame/drivers/homedata.c @@ -223,16 +223,15 @@ Custom: GX61A01 #include "sound/dac.h" #include "sound/2203intf.h" -static INTERRUPT_GEN( homedata_irq ) +INTERRUPT_GEN_MEMBER(homedata_state::homedata_irq) { - homedata_state *state = device->machine().driver_data(); - state->m_vblank = 1; - device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); + m_vblank = 1; + device.execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } -static INTERRUPT_GEN( upd7807_irq ) +INTERRUPT_GEN_MEMBER(homedata_state::upd7807_irq) { - device->execute().set_input_line(UPD7810_INTF1, HOLD_LINE); + device.execute().set_input_line(UPD7810_INTF1, HOLD_LINE); } @@ -1246,7 +1245,7 @@ static MACHINE_CONFIG_START( mrokumei, homedata_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 16000000/4) /* 4MHz ? */ MCFG_CPU_PROGRAM_MAP(mrokumei_map) - MCFG_CPU_VBLANK_INT("screen", homedata_irq) /* also triggered by the blitter */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", homedata_state, homedata_irq) /* also triggered by the blitter */ MCFG_CPU_ADD("audiocpu", Z80, 16000000/4) /* 4MHz ? */ MCFG_CPU_PROGRAM_MAP(mrokumei_sound_map) @@ -1312,13 +1311,13 @@ static MACHINE_CONFIG_START( reikaids, homedata_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 16000000/4) /* 4MHz ? */ MCFG_CPU_PROGRAM_MAP(reikaids_map) - MCFG_CPU_VBLANK_INT("screen", homedata_irq) /* also triggered by the blitter */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", homedata_state, homedata_irq) /* also triggered by the blitter */ MCFG_CPU_ADD("audiocpu", UPD7807, 8000000) /* ??? MHz (max speed for the 7807 is 12MHz) */ MCFG_CPU_CONFIG(upd_config) MCFG_CPU_PROGRAM_MAP(reikaids_upd7807_map) MCFG_CPU_IO_MAP(reikaids_upd7807_io_map) - MCFG_CPU_VBLANK_INT("screen", upd7807_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", homedata_state, upd7807_irq) MCFG_QUANTUM_TIME(attotime::from_hz(30000)) // very high interleave required to sync for startup tests @@ -1362,13 +1361,13 @@ static MACHINE_CONFIG_START( pteacher, homedata_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 16000000/4) /* 4MHz ? */ MCFG_CPU_PROGRAM_MAP(pteacher_map) - MCFG_CPU_VBLANK_INT("screen", homedata_irq) /* also triggered by the blitter */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", homedata_state, homedata_irq) /* also triggered by the blitter */ MCFG_CPU_ADD("audiocpu", UPD7807, 9000000) /* 9MHz ? */ MCFG_CPU_CONFIG(upd_config) MCFG_CPU_PROGRAM_MAP(pteacher_upd7807_map) MCFG_CPU_IO_MAP(pteacher_upd7807_io_map) - MCFG_CPU_VBLANK_INT("screen", upd7807_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", homedata_state, upd7807_irq) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // should be enough diff --git a/src/mame/drivers/homerun.c b/src/mame/drivers/homerun.c index 2e8ea37c2e4..376c7050eef 100644 --- a/src/mame/drivers/homerun.c +++ b/src/mame/drivers/homerun.c @@ -387,7 +387,7 @@ static MACHINE_CONFIG_START( dynashot, homerun_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_20MHz/4) MCFG_CPU_PROGRAM_MAP(homerun_memmap) MCFG_CPU_IO_MAP(homerun_iomap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", homerun_state, irq0_line_hold) MCFG_I8255A_ADD( "ppi8255", ppi8255_intf ) @@ -424,7 +424,7 @@ static MACHINE_CONFIG_DERIVED( ganjaja, dynashot ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(homerun_state, irq0_line_hold, 4*60) // ? /* sound hardware */ MCFG_SOUND_ADD("d7756", UPD7756, UPD7759_STANDARD_CLOCK) diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c index 7b24a9ed4db..c3e53be1926 100644 --- a/src/mame/drivers/hornet.c +++ b/src/mame/drivers/hornet.c @@ -993,7 +993,7 @@ static MACHINE_CONFIG_START( hornet, hornet_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", PPC403GA, 64000000/2) /* PowerPC 403GA 32MHz */ MCFG_CPU_PROGRAM_MAP(hornet_map) - MCFG_CPU_PERIODIC_INT(irq1_line_assert, 1000) + MCFG_CPU_PERIODIC_INT_DRIVER(hornet_state, irq1_line_assert, 1000) MCFG_CPU_ADD("audiocpu", M68000, 64000000/4) /* 16MHz */ MCFG_CPU_PROGRAM_MAP(sound_memmap) diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c index 6a4d940336e..e9aaeb1e4e6 100644 --- a/src/mame/drivers/hotblock.c +++ b/src/mame/drivers/hotblock.c @@ -68,6 +68,7 @@ public: DECLARE_WRITE8_MEMBER(hotblock_video_write); virtual void video_start(); UINT32 screen_update_hotblock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(hotblocks_irq); }; @@ -195,9 +196,9 @@ static INPUT_PORTS_START( hotblock ) INPUT_PORTS_END -static INTERRUPT_GEN( hotblocks_irq ) /* right? */ +INTERRUPT_GEN_MEMBER(hotblock_state::hotblocks_irq)/* right? */ { - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static const ay8910_interface ay8910_config = @@ -217,7 +218,7 @@ static MACHINE_CONFIG_START( hotblock, hotblock_state ) MCFG_CPU_ADD("maincpu", I8088, 10000000) MCFG_CPU_PROGRAM_MAP(hotblock_map) MCFG_CPU_IO_MAP(hotblock_io) - MCFG_CPU_VBLANK_INT("screen", hotblocks_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hotblock_state, hotblocks_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/hotstuff.c b/src/mame/drivers/hotstuff.c index 6870de270d4..4160ff03a55 100644 --- a/src/mame/drivers/hotstuff.c +++ b/src/mame/drivers/hotstuff.c @@ -126,7 +126,7 @@ static MACHINE_CONFIG_START( hotstuff, hotstuff_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(hotstuff_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hotstuff_state, irq1_line_hold) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c index e2d3e01abc9..20fcc68ec71 100644 --- a/src/mame/drivers/hvyunit.c +++ b/src/mame/drivers/hvyunit.c @@ -661,12 +661,12 @@ static MACHINE_CONFIG_START( hvyunit, hvyunit_state ) MCFG_CPU_ADD("slave", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(slave_memory) MCFG_CPU_IO_MAP(slave_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hvyunit_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(sound_memory) MCFG_CPU_IO_MAP(sound_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hvyunit_state, irq0_line_hold) MCFG_CPU_ADD("mermaid", I80C51, 6000000) MCFG_CPU_IO_MAP(mcu_io) diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c index 4f9bf15602e..fbdb3f124eb 100644 --- a/src/mame/drivers/hyperspt.c +++ b/src/mame/drivers/hyperspt.c @@ -272,12 +272,11 @@ static GFXDECODE_START( roadf ) GFXDECODE_ENTRY( "gfx2", 0, roadf_charlayout, 16*16, 16 ) GFXDECODE_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(hyperspt_state::vblank_irq) { - hyperspt_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } //------------------------------------------------- @@ -294,7 +293,7 @@ static MACHINE_CONFIG_START( hyperspt, hyperspt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(hyperspt_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", hyperspt_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,XTAL_14_31818MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/igs009.c b/src/mame/drivers/igs009.c index ce55431e707..35cddc78fc1 100644 --- a/src/mame/drivers/igs009.c +++ b/src/mame/drivers/igs009.c @@ -90,6 +90,7 @@ public: virtual void video_start(); DECLARE_VIDEO_START(gp98); UINT32 screen_update_jingbell(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(jingbell_interrupt); }; @@ -733,11 +734,10 @@ void igs009_state::machine_reset() m_video_enable = 1; } -static INTERRUPT_GEN( jingbell_interrupt ) +INTERRUPT_GEN_MEMBER(igs009_state::jingbell_interrupt) { - igs009_state *state = device->machine().driver_data(); - if (state->m_nmi_enable & 0x80) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable & 0x80) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( jingbell, igs009_state ) @@ -745,7 +745,7 @@ static MACHINE_CONFIG_START( jingbell, igs009_state ) MCFG_CPU_ADD("maincpu", Z180, XTAL_12MHz / 2) /* HD64180RP8, 8 MHz? */ MCFG_CPU_PROGRAM_MAP(jingbell_map) MCFG_CPU_IO_MAP(jingbell_portmap) - MCFG_CPU_VBLANK_INT("screen",jingbell_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs009_state, jingbell_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/igs011.c b/src/mame/drivers/igs011.c index 85b4fac09a9..ebb695f1777 100644 --- a/src/mame/drivers/igs011.c +++ b/src/mame/drivers/igs011.c @@ -198,6 +198,7 @@ public: virtual void video_start(); UINT32 screen_update_igs011(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_vbowl(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(lhb_vblank_irq); }; @@ -3832,7 +3833,7 @@ static TIMER_DEVICE_CALLBACK ( lev5_timer_irq_cb ) static MACHINE_CONFIG_DERIVED( drgnwrld, igs011_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(drgnwrld) - MCFG_CPU_VBLANK_INT("screen",irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold) MCFG_TIMER_ADD_PERIODIC("timer_irq", lev5_timer_irq_cb, attotime::from_hz(240)) // lev5 frequency drives the music tempo MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_3_579545MHz) @@ -3846,13 +3847,12 @@ MACHINE_CONFIG_END -static INTERRUPT_GEN( lhb_vblank_irq ) +INTERRUPT_GEN_MEMBER(igs011_state::lhb_vblank_irq) { - igs011_state *state = device->machine().driver_data(); - if (!state->m_lhb_irq_enable) + if (!m_lhb_irq_enable) return; - state->m_maincpu->set_input_line(6, HOLD_LINE); + m_maincpu->set_input_line(6, HOLD_LINE); } static TIMER_DEVICE_CALLBACK ( lhb_timer_irq_cb ) @@ -3867,7 +3867,7 @@ static TIMER_DEVICE_CALLBACK ( lhb_timer_irq_cb ) static MACHINE_CONFIG_DERIVED( lhb, igs011_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(lhb) - MCFG_CPU_VBLANK_INT("screen",lhb_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs011_state, lhb_vblank_irq) MCFG_TIMER_ADD_PERIODIC("timer_irq", lhb_timer_irq_cb, attotime::from_hz(240)) // lev5 frequency drives the music tempo // irq 3 points to an apparently unneeded routine MACHINE_CONFIG_END @@ -3885,7 +3885,7 @@ static TIMER_DEVICE_CALLBACK ( lev3_timer_irq_cb ) static MACHINE_CONFIG_DERIVED( wlcc, igs011_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(wlcc) - MCFG_CPU_VBLANK_INT("screen",irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold) MCFG_TIMER_ADD_PERIODIC("timer_irq", lev3_timer_irq_cb, attotime::from_hz(240)) // lev3 frequency drives the music tempo MACHINE_CONFIG_END @@ -3894,7 +3894,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( xymg, igs011_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(xymg) - MCFG_CPU_VBLANK_INT("screen",irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold) MCFG_TIMER_ADD_PERIODIC("timer_irq", lev3_timer_irq_cb, attotime::from_hz(240)) // lev3 frequency drives the music tempo MACHINE_CONFIG_END @@ -3903,7 +3903,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( lhb2, igs011_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(lhb2) - MCFG_CPU_VBLANK_INT("screen",irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold) MCFG_TIMER_ADD_PERIODIC("timer_irq", lev5_timer_irq_cb, attotime::from_hz(240)) // lev5 frequency drives the music tempo // MCFG_GFXDECODE(igs011_hi) @@ -3917,7 +3917,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( nkishusp, igs011_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(nkishusp) - MCFG_CPU_VBLANK_INT("screen",irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold) MCFG_TIMER_ADD_PERIODIC("timer_irq", lev3_timer_irq_cb, attotime::from_hz(240)) // lev3 frequency drives the music tempo // VSync 60.0052Hz, HSync 15.620kHz @@ -3938,7 +3938,7 @@ static void sound_irq(device_t *device, int state) static MACHINE_CONFIG_DERIVED( vbowl, igs011_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(vbowl) - MCFG_CPU_VBLANK_INT("screen",irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold) MCFG_TIMER_ADD_PERIODIC("timer_irq", lev3_timer_irq_cb, attotime::from_hz(240)) // lev3 frequency drives the music tempo // irq 5 points to a debug function (all routines are clearly patched out) // irq 4 points to an apparently unneeded routine diff --git a/src/mame/drivers/igs_m027.c b/src/mame/drivers/igs_m027.c index bb19589a314..e8e7758b6e6 100644 --- a/src/mame/drivers/igs_m027.c +++ b/src/mame/drivers/igs_m027.c @@ -59,6 +59,7 @@ public: TILE_GET_INFO_MEMBER(get_bg_tilemap_tile_info); virtual void video_start(); UINT32 screen_update_igs_majhong(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(igs_majhong_interrupt); }; @@ -357,9 +358,9 @@ static GFXDECODE_START( igs_m027 ) GFXDECODE_END -static INTERRUPT_GEN( igs_majhong_interrupt ) +INTERRUPT_GEN_MEMBER(igs_m027_state::igs_majhong_interrupt) { - generic_pulse_irq_line(device, ARM7_FIRQ_LINE, 1); + generic_pulse_irq_line(device.execute(), ARM7_FIRQ_LINE, 1); } @@ -368,7 +369,7 @@ static MACHINE_CONFIG_START( igs_majhong, igs_m027_state ) MCFG_CPU_PROGRAM_MAP(igs_majhong_map) - MCFG_CPU_VBLANK_INT("screen", igs_majhong_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs_m027_state, igs_majhong_interrupt) //MCFG_NVRAM_ADD_0FILL("nvram") MCFG_GFXDECODE(igs_m027) diff --git a/src/mame/drivers/ikki.c b/src/mame/drivers/ikki.c index f3628959fca..1673f493b9b 100644 --- a/src/mame/drivers/ikki.c +++ b/src/mame/drivers/ikki.c @@ -264,7 +264,7 @@ static MACHINE_CONFIG_START( ikki, ikki_state ) MCFG_CPU_ADD("sub", Z80,8000000/2) /* 4.000MHz */ MCFG_CPU_PROGRAM_MAP(ikki_cpu2) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(ikki_state, irq0_line_hold, 2*60) MCFG_QUANTUM_PERFECT_CPU("maincpu") diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c index 1053a3aba7b..12c3110218c 100644 --- a/src/mame/drivers/imolagp.c +++ b/src/mame/drivers/imolagp.c @@ -129,6 +129,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_imolagp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; @@ -493,15 +494,14 @@ static TIMER_DEVICE_CALLBACK ( imolagp_nmi_cb ) } } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(imolagp_state::vblank_irq) { - imolagp_state *state = device->machine().driver_data(); #ifdef HLE_COM - memcpy(&state->m_slave_workram[0x80], state->m_mComData, state->m_mComCount); - state->m_mComCount = 0; + memcpy(&m_slave_workram[0x80], m_mComData, m_mComCount); + m_mComCount = 0; #endif - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } /* master_interrupt */ @@ -556,13 +556,13 @@ static MACHINE_CONFIG_START( imolagp, imolagp_state ) MCFG_CPU_ADD("maincpu", Z80,8000000) /* ? */ MCFG_CPU_PROGRAM_MAP(imolagp_master) MCFG_CPU_IO_MAP(readport_master) - MCFG_CPU_VBLANK_INT("screen",vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", imolagp_state, vblank_irq) MCFG_TIMER_ADD_PERIODIC("pot_irq", imolagp_nmi_cb, attotime::from_hz(60*3)) MCFG_CPU_ADD("slave", Z80,8000000) /* ? */ MCFG_CPU_PROGRAM_MAP(imolagp_slave) MCFG_CPU_IO_MAP(readport_slave) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", imolagp_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/intrscti.c b/src/mame/drivers/intrscti.c index e7add981cd6..e217d399d02 100644 --- a/src/mame/drivers/intrscti.c +++ b/src/mame/drivers/intrscti.c @@ -163,7 +163,7 @@ static MACHINE_CONFIG_START( intrscti, intrscti_state ) MCFG_CPU_ADD("maincpu", Z80,4000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(intrscti_map) MCFG_CPU_IO_MAP(readport) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", intrscti_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c index dfac3b8a3ac..3948099f0a1 100644 --- a/src/mame/drivers/inufuku.c +++ b/src/mame/drivers/inufuku.c @@ -348,7 +348,7 @@ static MACHINE_CONFIG_START( inufuku, inufuku_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 32000000/2) /* 16.00 MHz */ MCFG_CPU_PROGRAM_MAP(inufuku_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", inufuku_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 32000000/4) /* 8.00 MHz */ MCFG_CPU_PROGRAM_MAP(inufuku_sound_map) diff --git a/src/mame/drivers/invqix.c b/src/mame/drivers/invqix.c index 7f22fad1918..82ce6bb4124 100644 --- a/src/mame/drivers/invqix.c +++ b/src/mame/drivers/invqix.c @@ -315,8 +315,8 @@ static MACHINE_CONFIG_START( invqix, invqix_state ) MCFG_CPU_ADD("maincpu", H8S2394, XTAL_20MHz) MCFG_CPU_PROGRAM_MAP(invqix_prg_map) MCFG_CPU_IO_MAP(invqix_io_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 60) + MCFG_CPU_VBLANK_INT_DRIVER("screen", invqix_state, irq1_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(invqix_state, irq0_line_hold, 60) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c index 1fb73e1d8b9..bc9a64d827d 100644 --- a/src/mame/drivers/istellar.c +++ b/src/mame/drivers/istellar.c @@ -54,6 +54,7 @@ public: virtual void machine_start(); virtual void palette_init(); UINT32 screen_update_istellar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_callback_istellar); }; @@ -316,13 +317,13 @@ static GFXDECODE_START( istellar ) GFXDECODE_ENTRY( "gfx1", 0, istellar_gfx_layout, 0x0, 0x20 ) GFXDECODE_END -static INTERRUPT_GEN( vblank_callback_istellar ) +INTERRUPT_GEN_MEMBER(istellar_state::vblank_callback_istellar) { /* Interrupt presumably comes from VBlank */ - device->execute().set_input_line(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); + machine().device("sub")->execute().set_input_line(0, ASSERT_LINE); } @@ -332,7 +333,7 @@ static MACHINE_CONFIG_START( istellar, istellar_state ) MCFG_CPU_ADD("maincpu", Z80, GUESSED_CLOCK) MCFG_CPU_PROGRAM_MAP(z80_0_mem) MCFG_CPU_IO_MAP(z80_0_io) - MCFG_CPU_VBLANK_INT("screen", vblank_callback_istellar) + MCFG_CPU_VBLANK_INT_DRIVER("screen", istellar_state, vblank_callback_istellar) /* sound cpu */ MCFG_CPU_ADD("audiocpu", Z80, GUESSED_CLOCK) diff --git a/src/mame/drivers/itech32.c b/src/mame/drivers/itech32.c index ee35142bb6b..118e66f736e 100644 --- a/src/mame/drivers/itech32.c +++ b/src/mame/drivers/itech32.c @@ -414,11 +414,11 @@ void itech32_update_interrupts(running_machine &machine, int vint, int xint, int } -static INTERRUPT_GEN( generate_int1 ) +INTERRUPT_GEN_MEMBER(itech32_state::generate_int1) { /* signal the NMI */ - itech32_update_interrupts(device->machine(), 1, -1, -1); - if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", device->machine().primary_screen->vpos()); + itech32_update_interrupts(machine(), 1, -1, -1); + if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", machine().primary_screen->vpos()); } @@ -1671,7 +1671,7 @@ static MACHINE_CONFIG_START( timekill, itech32_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(timekill_map) - MCFG_CPU_VBLANK_INT("screen", generate_int1) + MCFG_CPU_VBLANK_INT_DRIVER("screen", itech32_state, generate_int1) MCFG_CPU_ADD("soundcpu", M6809, SOUND_CLOCK/8) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -1739,11 +1739,11 @@ static MACHINE_CONFIG_DERIVED( sftm, bloodstm ) MCFG_CPU_REPLACE("maincpu", M68EC020, CPU020_CLOCK) MCFG_CPU_PROGRAM_MAP(itech020_map) - MCFG_CPU_VBLANK_INT("screen", generate_int1) + MCFG_CPU_VBLANK_INT_DRIVER("screen", itech32_state, generate_int1) MCFG_CPU_MODIFY("soundcpu") MCFG_CPU_PROGRAM_MAP(sound_020_map) - MCFG_CPU_PERIODIC_INT(irq1_line_assert,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(itech32_state, irq1_line_assert, 4*60) /* via */ MCFG_DEVICE_REMOVE("via6522_0") diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c index 793f5578830..9b2301366fb 100644 --- a/src/mame/drivers/itech8.c +++ b/src/mame/drivers/itech8.c @@ -610,13 +610,13 @@ static TIMER_CALLBACK( irq_off ) } -static INTERRUPT_GEN( generate_nmi ) +INTERRUPT_GEN_MEMBER(itech8_state::generate_nmi) { /* signal the NMI */ - itech8_update_interrupts(device->machine(), 1, -1, -1); - device->machine().scheduler().timer_set(attotime::from_usec(1), FUNC(irq_off)); + itech8_update_interrupts(machine(), 1, -1, -1); + machine().scheduler().timer_set(attotime::from_usec(1), FUNC(irq_off)); - if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", device->machine().primary_screen->vpos()); + if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", machine().primary_screen->vpos()); } @@ -1685,7 +1685,7 @@ static MACHINE_CONFIG_START( itech8_core_lo, itech8_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, CLOCK_8MHz/4) MCFG_CPU_PROGRAM_MAP(tmslo_map) - MCFG_CPU_VBLANK_INT("screen", generate_nmi) + MCFG_CPU_VBLANK_INT_DRIVER("screen", itech8_state, generate_nmi) MCFG_NVRAM_ADD_RANDOM_FILL("nvram") @@ -1920,7 +1920,7 @@ static MACHINE_CONFIG_DERIVED( rimrockn, itech8_core_hi ) MCFG_CPU_REPLACE("maincpu", HD6309, CLOCK_12MHz) MCFG_CPU_PROGRAM_MAP(tmshi_map) - MCFG_CPU_VBLANK_INT("screen", generate_nmi) + MCFG_CPU_VBLANK_INT_DRIVER("screen", itech8_state, generate_nmi) /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -1936,7 +1936,7 @@ static MACHINE_CONFIG_DERIVED( ninclown, itech8_core_hi ) MCFG_CPU_REPLACE("maincpu", M68000, CLOCK_12MHz) MCFG_CPU_PROGRAM_MAP(ninclown_map) - MCFG_CPU_VBLANK_INT("screen", generate_nmi) + MCFG_CPU_VBLANK_INT_DRIVER("screen", itech8_state, generate_nmi) /* video hardware */ MCFG_SCREEN_MODIFY("screen") diff --git a/src/mame/drivers/jack.c b/src/mame/drivers/jack.c index 457bf186d18..0529e4c3979 100644 --- a/src/mame/drivers/jack.c +++ b/src/mame/drivers/jack.c @@ -813,7 +813,7 @@ static MACHINE_CONFIG_START( jack, jack_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 18000000/6) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(jack_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* jack needs 1 or its too fast */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", jack_state, irq0_line_hold) /* jack needs 1 or its too fast */ MCFG_CPU_ADD("audiocpu", Z80,18000000/12) /* 1.5 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -844,14 +844,14 @@ static MACHINE_CONFIG_DERIVED( tripool, jack ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* tripool needs 2 or the palette is broken */ + MCFG_CPU_PERIODIC_INT_DRIVER(jack_state, irq0_line_hold, 2*60) /* tripool needs 2 or the palette is broken */ MACHINE_CONFIG_END -static INTERRUPT_GEN( joinem_vblank_irq ) +INTERRUPT_GEN_MEMBER(jack_state::joinem_vblank_irq) { /* TODO: looks hackish to me ... */ - if (!(device->machine().root_device().ioport("IN2")->read() & 0x80)) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (!(machine().root_device().ioport("IN2")->read() & 0x80)) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_DERIVED( joinem, jack ) @@ -859,8 +859,8 @@ static MACHINE_CONFIG_DERIVED( joinem, jack ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(joinem_map) - MCFG_CPU_VBLANK_INT("screen",joinem_vblank_irq) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jack_state, joinem_vblank_irq) + MCFG_CPU_PERIODIC_INT_DRIVER(jack_state, irq0_line_hold, 2*60) MCFG_GFXDECODE(joinem) MCFG_PALETTE_LENGTH(0x100) @@ -879,7 +879,7 @@ static MACHINE_CONFIG_DERIVED( loverboy, jack ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(joinem_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jack_state, nmi_line_pulse) MCFG_GFXDECODE(joinem) MCFG_PALETTE_LENGTH(0x100) diff --git a/src/mame/drivers/jackal.c b/src/mame/drivers/jackal.c index 8c7d94b3eff..194b85990d1 100644 --- a/src/mame/drivers/jackal.c +++ b/src/mame/drivers/jackal.c @@ -307,14 +307,13 @@ GFXDECODE_END * *************************************/ -static INTERRUPT_GEN( jackal_interrupt ) +INTERRUPT_GEN_MEMBER(jackal_state::jackal_interrupt) { - jackal_state *state = device->machine().driver_data(); - if (state->m_irq_enable) + if (m_irq_enable) { - device->execute().set_input_line(0, HOLD_LINE); - state->m_slavecpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + device.execute().set_input_line(0, HOLD_LINE); + m_slavecpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -358,7 +357,7 @@ static MACHINE_CONFIG_START( jackal, jackal_state ) /* basic machine hardware */ MCFG_CPU_ADD("master", M6809, MASTER_CLOCK/12) // verified on pcb MCFG_CPU_PROGRAM_MAP(master_map) - MCFG_CPU_VBLANK_INT("screen", jackal_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jackal_state, jackal_interrupt) MCFG_CPU_ADD("slave", M6809, MASTER_CLOCK/12) // verified on pcb MCFG_CPU_PROGRAM_MAP(slave_map) diff --git a/src/mame/drivers/jackpool.c b/src/mame/drivers/jackpool.c index 1eaef3666be..7ea68dbde30 100644 --- a/src/mame/drivers/jackpool.c +++ b/src/mame/drivers/jackpool.c @@ -38,6 +38,7 @@ public: DECLARE_DRIVER_INIT(jackpool); virtual void video_start(); UINT32 screen_update_jackpool(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(jackpool_interrupt); }; @@ -248,16 +249,16 @@ GFXDECODE_END /*irq 2 used for communication stuff.3 is just a rte*/ -static INTERRUPT_GEN( jackpool_interrupt ) +INTERRUPT_GEN_MEMBER(jackpool_state::jackpool_interrupt) { - device->execute().set_input_line(1, HOLD_LINE); + device.execute().set_input_line(1, HOLD_LINE); } static MACHINE_CONFIG_START( jackpool, jackpool_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) // ? MCFG_CPU_PROGRAM_MAP(jackpool_mem) - MCFG_CPU_VBLANK_INT("screen",jackpool_interrupt) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", jackpool_state, jackpool_interrupt) // ? MCFG_GFXDECODE(jackpool) diff --git a/src/mame/drivers/jailbrek.c b/src/mame/drivers/jailbrek.c index d83ee8626e4..f703dd399fc 100644 --- a/src/mame/drivers/jailbrek.c +++ b/src/mame/drivers/jailbrek.c @@ -100,20 +100,18 @@ WRITE8_MEMBER(jailbrek_state::ctrl_w) flip_screen_set(data & 0x08); } -static INTERRUPT_GEN( jb_interrupt ) +INTERRUPT_GEN_MEMBER(jailbrek_state::jb_interrupt) { - jailbrek_state *state = device->machine().driver_data(); - if (state->m_irq_enable) - device->execute().set_input_line(0, HOLD_LINE); + if (m_irq_enable) + device.execute().set_input_line(0, HOLD_LINE); } -static INTERRUPT_GEN( jb_interrupt_nmi ) +INTERRUPT_GEN_MEMBER(jailbrek_state::jb_interrupt_nmi) { - jailbrek_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -271,8 +269,8 @@ static MACHINE_CONFIG_START( jailbrek, jailbrek_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/12) MCFG_CPU_PROGRAM_MAP(jailbrek_map) - MCFG_CPU_VBLANK_INT("screen", jb_interrupt) - MCFG_CPU_PERIODIC_INT(jb_interrupt_nmi, 500) /* ? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", jailbrek_state, jb_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(jailbrek_state, jb_interrupt_nmi, 500) /* ? */ /* video hardware */ diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c index 96fe997b067..b81fa3bd697 100644 --- a/src/mame/drivers/jalmah.c +++ b/src/mame/drivers/jalmah.c @@ -1406,7 +1406,7 @@ void jalmah_state::machine_reset() static MACHINE_CONFIG_START( jalmah, jalmah_state ) MCFG_CPU_ADD("maincpu" , M68000, 12000000) /* 68000-8 */ MCFG_CPU_PROGRAM_MAP(jalmah) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jalmah_state, irq2_line_hold) //M50747 MCU diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c index 1ccf1f914c1..140472b23f0 100644 --- a/src/mame/drivers/jangou.c +++ b/src/mame/drivers/jangou.c @@ -991,7 +991,7 @@ static MACHINE_CONFIG_START( jangou, jangou_state ) MCFG_CPU_ADD("cpu0", Z80, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(cpu0_map) MCFG_CPU_IO_MAP(cpu0_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jangou_state, irq0_line_hold) MCFG_CPU_ADD("cpu1", Z80, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(cpu1_map) diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c index cd6e3457b28..fc4356f4d8b 100644 --- a/src/mame/drivers/jantotsu.c +++ b/src/mame/drivers/jantotsu.c @@ -519,7 +519,7 @@ static MACHINE_CONFIG_START( jantotsu, jantotsu_state ) MCFG_CPU_ADD("maincpu", Z80,MAIN_CLOCK/4) MCFG_CPU_PROGRAM_MAP(jantotsu_map) MCFG_CPU_IO_MAP(jantotsu_io) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jantotsu_state, nmi_line_pulse) /* video hardware */ diff --git a/src/mame/drivers/jclub2.c b/src/mame/drivers/jclub2.c index 8f10201a6c2..dfc5dae7fd9 100644 --- a/src/mame/drivers/jclub2.c +++ b/src/mame/drivers/jclub2.c @@ -800,7 +800,7 @@ static MACHINE_CONFIG_START( jclub2o, darkhors_state ) MCFG_CPU_ADD("st0016",Z80,8000000) MCFG_CPU_PROGRAM_MAP(st0016_mem) MCFG_CPU_IO_MAP(st0016_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", darkhors_state, irq0_line_hold) MCFG_EEPROM_ADD("eeprom", eeprom_interface_93C46_8bit) diff --git a/src/mame/drivers/jokrwild.c b/src/mame/drivers/jokrwild.c index 75d80b157c1..c2127929d24 100644 --- a/src/mame/drivers/jokrwild.c +++ b/src/mame/drivers/jokrwild.c @@ -480,7 +480,7 @@ static MACHINE_CONFIG_START( jokrwild, jokrwild_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/2) /* guess */ MCFG_CPU_PROGRAM_MAP(jokrwild_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jokrwild_state, nmi_line_pulse) // MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c index ce3c79ab415..af364d81555 100644 --- a/src/mame/drivers/jollyjgr.c +++ b/src/mame/drivers/jollyjgr.c @@ -141,6 +141,7 @@ public: virtual void palette_init(); UINT32 screen_update_jollyjgr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_fspider(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(jollyjgr_interrupt); }; @@ -621,11 +622,10 @@ GFXDECODE_END * *************************************/ -static INTERRUPT_GEN( jollyjgr_interrupt ) +INTERRUPT_GEN_MEMBER(jollyjgr_state::jollyjgr_interrupt) { - jollyjgr_state *state = device->machine().driver_data(); - if(state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -654,7 +654,7 @@ static MACHINE_CONFIG_START( jollyjgr, jollyjgr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 3579545) /* 3,579545 MHz */ MCFG_CPU_PROGRAM_MAP(jollyjgr_map) - MCFG_CPU_VBLANK_INT("screen", jollyjgr_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jollyjgr_state, jollyjgr_interrupt) /* video hardware */ diff --git a/src/mame/drivers/jongkyo.c b/src/mame/drivers/jongkyo.c index 4e4678b44ce..737642088ef 100644 --- a/src/mame/drivers/jongkyo.c +++ b/src/mame/drivers/jongkyo.c @@ -494,7 +494,7 @@ static MACHINE_CONFIG_START( jongkyo, jongkyo_state ) MCFG_CPU_ADD("maincpu", Z80,JONGKYO_CLOCK/4) MCFG_CPU_PROGRAM_MAP(jongkyo_memmap) MCFG_CPU_IO_MAP(jongkyo_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jongkyo_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/jrpacman.c b/src/mame/drivers/jrpacman.c index 9392bca9f3d..8de7014dcaa 100644 --- a/src/mame/drivers/jrpacman.c +++ b/src/mame/drivers/jrpacman.c @@ -112,6 +112,7 @@ public: DECLARE_WRITE8_MEMBER(jrpacman_interrupt_vector_w); DECLARE_WRITE8_MEMBER(irq_mask_w); DECLARE_DRIVER_INIT(jrpacman); + INTERRUPT_GEN_MEMBER(vblank_irq); }; @@ -280,12 +281,11 @@ static const namco_interface namco_config = * *************************************/ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(jrpacman_state::vblank_irq) { - jrpacman_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( jrpacman, jrpacman_state ) @@ -294,7 +294,7 @@ static MACHINE_CONFIG_START( jrpacman, jrpacman_state ) MCFG_CPU_ADD("maincpu", Z80, 18432000/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(port_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jrpacman_state, vblank_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/jubilee.c b/src/mame/drivers/jubilee.c index bba2fd6cc89..04340ae7b22 100644 --- a/src/mame/drivers/jubilee.c +++ b/src/mame/drivers/jubilee.c @@ -105,6 +105,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_jubileep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(jubileep_interrupt); }; @@ -152,10 +153,10 @@ void jubilee_state::palette_init() * Read / Write Handlers * **************************/ -static INTERRUPT_GEN( jubileep_interrupt ) +INTERRUPT_GEN_MEMBER(jubilee_state::jubileep_interrupt) { /* doesn't seems to work properly. need to set level1 interrupts */ - device->execute().set_input_line_and_vector(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 } @@ -417,7 +418,7 @@ static MACHINE_CONFIG_START( jubileep, jubilee_state ) MCFG_CPU_ADD("maincpu", TMS9980L, MASTER_CLOCK/2) /* guess */ MCFG_CPU_PROGRAM_MAP(jubileep_map) MCFG_CPU_IO_MAP(jubileep_cru_map) - MCFG_CPU_VBLANK_INT("screen", jubileep_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", jubilee_state, jubileep_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c index e7f5911355d..2ab6b21f854 100644 --- a/src/mame/drivers/junofrst.c +++ b/src/mame/drivers/junofrst.c @@ -118,6 +118,7 @@ public: DECLARE_DRIVER_INIT(junofrst); DECLARE_MACHINE_START(junofrst); DECLARE_MACHINE_RESET(junofrst); + INTERRUPT_GEN_MEMBER(junofrst_30hz_irq); }; @@ -418,14 +419,13 @@ MACHINE_RESET_MEMBER(junofrst_state,junofrst) m_blitterdata[3] = 0; } -static INTERRUPT_GEN( junofrst_30hz_irq ) +INTERRUPT_GEN_MEMBER(junofrst_state::junofrst_30hz_irq) { - junofrst_state *state = device->machine().driver_data(); /* 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->execute().set_input_line(0, ASSERT_LINE); + m_irq_toggle ^= 1; + if (m_irq_toggle && m_irq_enable) + device.execute().set_input_line(0, ASSERT_LINE); } static MACHINE_CONFIG_START( junofrst, junofrst_state ) @@ -433,7 +433,7 @@ static MACHINE_CONFIG_START( junofrst, junofrst_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 1500000) /* 1.5 MHz ??? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", junofrst_30hz_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", junofrst_state, junofrst_30hz_irq) MCFG_CPU_ADD("audiocpu", Z80,14318000/8) /* 1.78975 MHz */ MCFG_CPU_PROGRAM_MAP(audio_map) diff --git a/src/mame/drivers/kangaroo.c b/src/mame/drivers/kangaroo.c index 3521ed42d1f..3f3d1ca3eaa 100644 --- a/src/mame/drivers/kangaroo.c +++ b/src/mame/drivers/kangaroo.c @@ -428,12 +428,12 @@ static MACHINE_CONFIG_START( nomcu, kangaroo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kangaroo_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, MASTER_CLOCK/8) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kangaroo_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/karnov.c b/src/mame/drivers/karnov.c index d30a73c4476..6eac0524c10 100644 --- a/src/mame/drivers/karnov.c +++ b/src/mame/drivers/karnov.c @@ -725,33 +725,32 @@ GFXDECODE_END * *************************************/ -static INTERRUPT_GEN( karnov_interrupt ) +INTERRUPT_GEN_MEMBER(karnov_state::karnov_interrupt) { - karnov_state *state = device->machine().driver_data(); - UINT8 port = state->ioport("FAKE")->read(); + UINT8 port = ioport("FAKE")->read(); /* Coin input to the i8751 generates an interrupt to the main cpu */ - if (port == state->m_coin_mask) - state->m_latch = 1; + if (port == m_coin_mask) + m_latch = 1; - if (port != state->m_coin_mask && state->m_latch) + if (port != m_coin_mask && m_latch) { - if (state->m_i8751_needs_ack) + if (m_i8751_needs_ack) { /* i8751 is busy - queue the command */ - state->m_i8751_coin_pending = port | 0x8000; + m_i8751_coin_pending = port | 0x8000; } else { - state->m_i8751_return = port | 0x8000; - device->execute().set_input_line(6, HOLD_LINE); - state->m_i8751_needs_ack = 1; + m_i8751_return = port | 0x8000; + device.execute().set_input_line(6, HOLD_LINE); + m_i8751_needs_ack = 1; } - state->m_latch = 0; + m_latch = 0; } - device->execute().set_input_line(7, HOLD_LINE); /* VBL */ + device.execute().set_input_line(7, HOLD_LINE); /* VBL */ } static const ym3526_interface ym3526_config = @@ -806,7 +805,7 @@ static MACHINE_CONFIG_START( karnov, karnov_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(karnov_map) - MCFG_CPU_VBLANK_INT("screen", karnov_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", karnov_state, karnov_interrupt) MCFG_CPU_ADD("audiocpu", M6502, 1500000) /* Accurate */ MCFG_CPU_PROGRAM_MAP(karnov_sound_map) @@ -847,7 +846,7 @@ static MACHINE_CONFIG_START( wndrplnt, karnov_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(karnov_map) - MCFG_CPU_VBLANK_INT("screen", karnov_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", karnov_state, karnov_interrupt) MCFG_CPU_ADD("audiocpu", M6502, 1500000) /* Accurate */ MCFG_CPU_PROGRAM_MAP(karnov_sound_map) diff --git a/src/mame/drivers/kchamp.c b/src/mame/drivers/kchamp.c index 61392ce8b66..3d85a4e7d9e 100644 --- a/src/mame/drivers/kchamp.c +++ b/src/mame/drivers/kchamp.c @@ -340,11 +340,10 @@ GFXDECODE_END -static INTERRUPT_GEN( kc_interrupt ) +INTERRUPT_GEN_MEMBER(kchamp_state::kc_interrupt) { - kchamp_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static void msmint( device_t *device ) @@ -375,11 +374,10 @@ static const msm5205_interface msm_interface = * 1 Player Version * ********************/ -static INTERRUPT_GEN( sound_int ) +INTERRUPT_GEN_MEMBER(kchamp_state::sound_int) { - kchamp_state *state = device->machine().driver_data(); - if (state->m_sound_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_sound_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -415,7 +413,7 @@ static MACHINE_CONFIG_START( kchampvs, kchamp_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(kchampvs_map) MCFG_CPU_IO_MAP(kchampvs_io_map) - MCFG_CPU_VBLANK_INT("screen", kc_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kchamp_state, kc_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(kchampvs_sound_map) @@ -460,12 +458,12 @@ static MACHINE_CONFIG_START( kchamp, kchamp_state ) MCFG_CPU_ADD("maincpu", Z80, 3000000) /* 12MHz / 4 = 3.0 MHz */ MCFG_CPU_PROGRAM_MAP(kchamp_map) MCFG_CPU_IO_MAP(kchamp_io_map) - MCFG_CPU_VBLANK_INT("screen", kc_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kchamp_state, kc_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* 12MHz / 4 = 3.0 MHz */ MCFG_CPU_PROGRAM_MAP(kchamp_sound_map) MCFG_CPU_IO_MAP(kchamp_sound_io_map) - MCFG_CPU_PERIODIC_INT(sound_int, 125) /* Hz */ + MCFG_CPU_PERIODIC_INT_DRIVER(kchamp_state, sound_int, 125) /* Hz */ /* irq's triggered from main cpu */ /* nmi's from 125 Hz clock */ diff --git a/src/mame/drivers/kickgoal.c b/src/mame/drivers/kickgoal.c index 5fa5bd621b6..223615fc469 100644 --- a/src/mame/drivers/kickgoal.c +++ b/src/mame/drivers/kickgoal.c @@ -293,144 +293,143 @@ WRITE16_MEMBER(kickgoal_state::actionhw_snd_w) } -static INTERRUPT_GEN( kickgoal_interrupt ) +INTERRUPT_GEN_MEMBER(kickgoal_state::kickgoal_interrupt) { - kickgoal_state *state = device->machine().driver_data(); - if ((state->m_adpcm->read_status() & 0x08) == 0) + if ((m_adpcm->read_status() & 0x08) == 0) { - switch(state->m_melody_loop) + switch(m_melody_loop) { - case 0x060: state->m_melody_loop = 0x061; break; - case 0x061: state->m_melody_loop = 0x062; break; - case 0x062: state->m_melody_loop = 0x060; break; - - case 0x065: state->m_melody_loop = 0x165; break; - case 0x165: state->m_melody_loop = 0x265; break; - case 0x265: state->m_melody_loop = 0x365; break; - case 0x365: state->m_melody_loop = 0x066; break; - case 0x066: state->m_melody_loop = 0x067; break; - case 0x067: state->m_melody_loop = 0x068; break; - case 0x068: state->m_melody_loop = 0x065; break; - - case 0x063: state->m_melody_loop = 0x063; break; - case 0x064: state->m_melody_loop = 0x064; break; - case 0x069: state->m_melody_loop = 0x069; break; - case 0x06a: state->m_melody_loop = 0x06a; break; - case 0x06b: state->m_melody_loop = 0x06b; break; - case 0x06c: state->m_melody_loop = 0x06c; break; - - default: state->m_melody_loop = 0x00; break; + case 0x060: m_melody_loop = 0x061; break; + case 0x061: m_melody_loop = 0x062; break; + case 0x062: m_melody_loop = 0x060; break; + + case 0x065: m_melody_loop = 0x165; break; + case 0x165: m_melody_loop = 0x265; break; + case 0x265: m_melody_loop = 0x365; break; + case 0x365: m_melody_loop = 0x066; break; + case 0x066: m_melody_loop = 0x067; break; + case 0x067: m_melody_loop = 0x068; break; + case 0x068: m_melody_loop = 0x065; break; + + case 0x063: m_melody_loop = 0x063; break; + case 0x064: m_melody_loop = 0x064; break; + case 0x069: m_melody_loop = 0x069; break; + case 0x06a: m_melody_loop = 0x06a; break; + case 0x06b: m_melody_loop = 0x06b; break; + case 0x06c: m_melody_loop = 0x06c; break; + + default: m_melody_loop = 0x00; break; } - if (state->m_melody_loop) + if (m_melody_loop) { -// logerror("Changing to sample %02x\n", state->m_melody_loop); - state->m_adpcm->write_command((0x80 | state->m_melody_loop) & 0xff); - state->m_adpcm->write_command(0x81); +// logerror("Changing to sample %02x\n", m_melody_loop); + m_adpcm->write_command((0x80 | m_melody_loop) & 0xff); + m_adpcm->write_command(0x81); } } - if (device->machine().input().code_pressed_once(KEYCODE_PGUP)) + if (machine().input().code_pressed_once(KEYCODE_PGUP)) { - if (state->m_m6295_key_delay >= (0x60 * oki_time_base)) + if (m_m6295_key_delay >= (0x60 * oki_time_base)) { - state->m_m6295_bank += 0x01; - state->m_m6295_bank &= 0x03; - if (state->m_m6295_bank == 0x03) - state->m_m6295_bank = 0x00; - popmessage("Changing Bank to %02x", state->m_m6295_bank); - state->m_adpcm->set_bank_base(((state->m_m6295_bank) * 0x40000)); - - if (state->m_m6295_key_delay == 0xffff) - state->m_m6295_key_delay = 0x00; + m_m6295_bank += 0x01; + m_m6295_bank &= 0x03; + if (m_m6295_bank == 0x03) + m_m6295_bank = 0x00; + popmessage("Changing Bank to %02x", m_m6295_bank); + m_adpcm->set_bank_base(((m_m6295_bank) * 0x40000)); + + if (m_m6295_key_delay == 0xffff) + m_m6295_key_delay = 0x00; else - state->m_m6295_key_delay = (0x30 * oki_time_base); + m_m6295_key_delay = (0x30 * oki_time_base); } else - state->m_m6295_key_delay += (0x01 * oki_time_base); + m_m6295_key_delay += (0x01 * oki_time_base); } - else if (device->machine().input().code_pressed_once(KEYCODE_PGDN)) + else if (machine().input().code_pressed_once(KEYCODE_PGDN)) { - if (state->m_m6295_key_delay >= (0x60 * oki_time_base)) + if (m_m6295_key_delay >= (0x60 * oki_time_base)) { - state->m_m6295_bank -= 0x01; - state->m_m6295_bank &= 0x03; - if (state->m_m6295_bank == 0x03) - state->m_m6295_bank = 0x02; - popmessage("Changing Bank to %02x", state->m_m6295_bank); - state->m_adpcm->set_bank_base(((state->m_m6295_bank) * 0x40000)); - - if (state->m_m6295_key_delay == 0xffff) - state->m_m6295_key_delay = 0x00; + m_m6295_bank -= 0x01; + m_m6295_bank &= 0x03; + if (m_m6295_bank == 0x03) + m_m6295_bank = 0x02; + popmessage("Changing Bank to %02x", m_m6295_bank); + m_adpcm->set_bank_base(((m_m6295_bank) * 0x40000)); + + if (m_m6295_key_delay == 0xffff) + m_m6295_key_delay = 0x00; else - state->m_m6295_key_delay = (0x30 * oki_time_base); + m_m6295_key_delay = (0x30 * oki_time_base); } else - state->m_m6295_key_delay += (0x01 * oki_time_base); + m_m6295_key_delay += (0x01 * oki_time_base); } - else if (device->machine().input().code_pressed_once(KEYCODE_INSERT)) + else if (machine().input().code_pressed_once(KEYCODE_INSERT)) { - if (state->m_m6295_key_delay >= (0x60 * oki_time_base)) + if (m_m6295_key_delay >= (0x60 * oki_time_base)) { - state->m_m6295_comm += 1; - state->m_m6295_comm &= 0x7f; - if (state->m_m6295_comm == 0x00) { state->m_adpcm->set_bank_base((0 * 0x40000)); state->m_m6295_bank = 0; } - if (state->m_m6295_comm == 0x60) { state->m_adpcm->set_bank_base((0 * 0x40000)); state->m_m6295_bank = 0; } - if (state->m_m6295_comm == 0x65) { state->m_adpcm->set_bank_base((1 * 0x40000)); state->m_m6295_bank = 1; } - if (state->m_m6295_comm == 0x69) { state->m_adpcm->set_bank_base((2 * 0x40000)); state->m_m6295_bank = 2; } - if (state->m_m6295_comm == 0x70) { state->m_adpcm->set_bank_base((1 * 0x40000)); state->m_m6295_bank = 1; } - popmessage("Sound test command %02x on Bank %02x", state->m_m6295_comm, state->m_m6295_bank); - - if (state->m_m6295_key_delay == 0xffff) - state->m_m6295_key_delay = 0x00; + m_m6295_comm += 1; + m_m6295_comm &= 0x7f; + if (m_m6295_comm == 0x00) { m_adpcm->set_bank_base((0 * 0x40000)); m_m6295_bank = 0; } + if (m_m6295_comm == 0x60) { m_adpcm->set_bank_base((0 * 0x40000)); m_m6295_bank = 0; } + if (m_m6295_comm == 0x65) { m_adpcm->set_bank_base((1 * 0x40000)); m_m6295_bank = 1; } + if (m_m6295_comm == 0x69) { m_adpcm->set_bank_base((2 * 0x40000)); m_m6295_bank = 2; } + if (m_m6295_comm == 0x70) { m_adpcm->set_bank_base((1 * 0x40000)); m_m6295_bank = 1; } + popmessage("Sound test command %02x on Bank %02x", m_m6295_comm, m_m6295_bank); + + if (m_m6295_key_delay == 0xffff) + m_m6295_key_delay = 0x00; else - state->m_m6295_key_delay = (0x5d * oki_time_base); + m_m6295_key_delay = (0x5d * oki_time_base); } else - state->m_m6295_key_delay += (0x01 * oki_time_base); + m_m6295_key_delay += (0x01 * oki_time_base); } - else if (device->machine().input().code_pressed_once(KEYCODE_DEL)) + else if (machine().input().code_pressed_once(KEYCODE_DEL)) { - if (state->m_m6295_key_delay >= (0x60 * oki_time_base)) + if (m_m6295_key_delay >= (0x60 * oki_time_base)) { - state->m_m6295_comm -= 1; - state->m_m6295_comm &= 0x7f; - if (state->m_m6295_comm == 0x2b) { state->m_adpcm->set_bank_base((0 * 0x40000)); state->m_m6295_bank = 0; } - if (state->m_m6295_comm == 0x64) { state->m_adpcm->set_bank_base((0 * 0x40000)); state->m_m6295_bank = 0; } - if (state->m_m6295_comm == 0x68) { state->m_adpcm->set_bank_base((1 * 0x40000)); state->m_m6295_bank = 1; } - if (state->m_m6295_comm == 0x6c) { state->m_adpcm->set_bank_base((2 * 0x40000)); state->m_m6295_bank = 2; } - if (state->m_m6295_comm == 0x76) { state->m_adpcm->set_bank_base((1 * 0x40000)); state->m_m6295_bank = 1; } - popmessage("Sound test command %02x on Bank %02x", state->m_m6295_comm, state->m_m6295_bank); - - if (state->m_m6295_key_delay == 0xffff) - state->m_m6295_key_delay = 0x00; + m_m6295_comm -= 1; + m_m6295_comm &= 0x7f; + if (m_m6295_comm == 0x2b) { m_adpcm->set_bank_base((0 * 0x40000)); m_m6295_bank = 0; } + if (m_m6295_comm == 0x64) { m_adpcm->set_bank_base((0 * 0x40000)); m_m6295_bank = 0; } + if (m_m6295_comm == 0x68) { m_adpcm->set_bank_base((1 * 0x40000)); m_m6295_bank = 1; } + if (m_m6295_comm == 0x6c) { m_adpcm->set_bank_base((2 * 0x40000)); m_m6295_bank = 2; } + if (m_m6295_comm == 0x76) { m_adpcm->set_bank_base((1 * 0x40000)); m_m6295_bank = 1; } + popmessage("Sound test command %02x on Bank %02x", m_m6295_comm, m_m6295_bank); + + if (m_m6295_key_delay == 0xffff) + m_m6295_key_delay = 0x00; else - state->m_m6295_key_delay = (0x5d * oki_time_base); + m_m6295_key_delay = (0x5d * oki_time_base); } else - state->m_m6295_key_delay += (0x01 * oki_time_base); + m_m6295_key_delay += (0x01 * oki_time_base); } - else if (device->machine().input().code_pressed_once(KEYCODE_Z)) + else if (machine().input().code_pressed_once(KEYCODE_Z)) { - if (state->m_m6295_key_delay >= (0x80 * oki_time_base)) + if (m_m6295_key_delay >= (0x80 * oki_time_base)) { - state->m_adpcm->write_command(0x78); - state->m_adpcm->write_command(0x80 | state->m_m6295_comm); - state->m_adpcm->write_command(0x11); + m_adpcm->write_command(0x78); + m_adpcm->write_command(0x80 | m_m6295_comm); + m_adpcm->write_command(0x11); - popmessage("Playing sound %02x on Bank %02x", state->m_m6295_comm, state->m_m6295_bank); + popmessage("Playing sound %02x on Bank %02x", m_m6295_comm, m_m6295_bank); - if (state->m_m6295_key_delay == 0xffff) - state->m_m6295_key_delay = 0x00; + if (m_m6295_key_delay == 0xffff) + m_m6295_key_delay = 0x00; else - state->m_m6295_key_delay = (0x60 * oki_time_base); + m_m6295_key_delay = (0x60 * oki_time_base); } else - state->m_m6295_key_delay += (0x01 * oki_time_base); -// logerror("Sending %02x to the sound CPU\n", state->m_m6295_comm); + m_m6295_key_delay += (0x01 * oki_time_base); +// logerror("Sending %02x to the sound CPU\n", m_m6295_comm); } else - state->m_m6295_key_delay = 0xffff; + m_m6295_key_delay = 0xffff; } @@ -648,8 +647,8 @@ static MACHINE_CONFIG_START( kickgoal, kickgoal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(kickgoal_program_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) - MCFG_CPU_PERIODIC_INT(kickgoal_interrupt, 240) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kickgoal_state, irq6_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(kickgoal_state, kickgoal_interrupt, 240) MCFG_CPU_ADD("audiocpu", PIC16C57, 12000000/4) /* 3MHz ? */ MCFG_DEVICE_DISABLE() /* Disables since the internal rom isn't dumped */ @@ -684,7 +683,7 @@ static MACHINE_CONFIG_START( actionhw, kickgoal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(kickgoal_program_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kickgoal_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C57, XTAL_12MHz/3) /* verified on pcb */ MCFG_DEVICE_DISABLE() /* Disables since the internal rom isn't dumped */ diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c index f2bd9185b7d..c15469e00b8 100644 --- a/src/mame/drivers/kingdrby.c +++ b/src/mame/drivers/kingdrby.c @@ -1017,17 +1017,17 @@ static MACHINE_CONFIG_START( kingdrby, kingdrby_state ) MCFG_CPU_ADD("master", Z80, CLK_2) MCFG_CPU_PROGRAM_MAP(master_map) MCFG_CPU_IO_MAP(master_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kingdrby_state, irq0_line_hold) MCFG_CPU_ADD("slave", Z80, CLK_2) MCFG_CPU_PROGRAM_MAP(slave_map) MCFG_CPU_IO_MAP(slave_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kingdrby_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, CLK_2) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,1000) /* guess, controls ay8910 tempo.*/ + MCFG_CPU_PERIODIC_INT_DRIVER(kingdrby_state, irq0_line_hold, 1000) /* guess, controls ay8910 tempo.*/ MCFG_QUANTUM_PERFECT_CPU("master") diff --git a/src/mame/drivers/kingobox.c b/src/mame/drivers/kingobox.c index f75951f2001..e169c57e0a7 100644 --- a/src/mame/drivers/kingobox.c +++ b/src/mame/drivers/kingobox.c @@ -442,12 +442,11 @@ static const ay8910_interface ay8910_config = DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r) }; -static INTERRUPT_GEN( kingofb_interrupt ) +INTERRUPT_GEN_MEMBER(kingofb_state::kingofb_interrupt) { - kingofb_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } void kingofb_state::machine_start() @@ -473,20 +472,20 @@ static MACHINE_CONFIG_START( kingofb, kingofb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4.0 MHz */ MCFG_CPU_PROGRAM_MAP(kingobox_map) - MCFG_CPU_VBLANK_INT("screen", kingofb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kingofb_state, kingofb_interrupt) MCFG_CPU_ADD("video", Z80, 4000000) /* 4.0 MHz */ MCFG_CPU_PROGRAM_MAP(kingobox_video_map) - MCFG_CPU_VBLANK_INT("screen", kingofb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kingofb_state, kingofb_interrupt) MCFG_CPU_ADD("sprite", Z80, 4000000) /* 4.0 MHz */ MCFG_CPU_PROGRAM_MAP(kingobox_sprite_map) - MCFG_CPU_VBLANK_INT("screen", kingofb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kingofb_state, kingofb_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4.0 MHz */ MCFG_CPU_PROGRAM_MAP(kingobox_sound_map) MCFG_CPU_IO_MAP(kingobox_sound_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 6000) /* Hz */ + MCFG_CPU_PERIODIC_INT_DRIVER(kingofb_state, nmi_line_pulse, 6000) /* Hz */ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* We really need heavy synching among the processors */ @@ -523,20 +522,20 @@ static MACHINE_CONFIG_START( ringking, kingofb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4.0 MHz */ MCFG_CPU_PROGRAM_MAP(ringking_map) - MCFG_CPU_VBLANK_INT("screen", kingofb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kingofb_state, kingofb_interrupt) MCFG_CPU_ADD("video", Z80, 4000000) /* 4.0 MHz */ MCFG_CPU_PROGRAM_MAP(ringking_video_map) - MCFG_CPU_VBLANK_INT("screen", kingofb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kingofb_state, kingofb_interrupt) MCFG_CPU_ADD("sprite", Z80, 4000000) /* 4.0 MHz */ MCFG_CPU_PROGRAM_MAP(ringking_sprite_map) - MCFG_CPU_VBLANK_INT("screen", kingofb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kingofb_state, kingofb_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4.0 MHz */ MCFG_CPU_PROGRAM_MAP(kingobox_sound_map) MCFG_CPU_IO_MAP(ringking_sound_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 6000) /* Hz */ + MCFG_CPU_PERIODIC_INT_DRIVER(kingofb_state, nmi_line_pulse, 6000) /* Hz */ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* We really need heavy synching among the processors */ diff --git a/src/mame/drivers/kingpin.c b/src/mame/drivers/kingpin.c index a2e00248bdd..4752719d0f5 100644 --- a/src/mame/drivers/kingpin.c +++ b/src/mame/drivers/kingpin.c @@ -178,7 +178,7 @@ static MACHINE_CONFIG_START( kingpin, kingpin_state ) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(kingpin_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 1000) // unknown freq + MCFG_CPU_PERIODIC_INT_DRIVER(kingpin_state, irq0_line_hold, 1000) // unknown freq /* video hardware */ MCFG_TMS9928A_ADD( "tms9928a", TMS9928A, kingpin_tms9928a_interface ) diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c index ca40e2bc767..8b9a86c4914 100644 --- a/src/mame/drivers/kinst.c +++ b/src/mame/drivers/kinst.c @@ -163,6 +163,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_kinst(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(irq0_start); }; @@ -281,10 +282,10 @@ static TIMER_CALLBACK( irq0_stop ) } -static INTERRUPT_GEN( irq0_start ) +INTERRUPT_GEN_MEMBER(kinst_state::irq0_start) { - device->execute().set_input_line(0, ASSERT_LINE); - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(irq0_stop)); + device.execute().set_input_line(0, ASSERT_LINE); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(irq0_stop)); } @@ -675,7 +676,7 @@ static MACHINE_CONFIG_START( kinst, kinst_state ) MCFG_CPU_ADD("maincpu", R4600LE, MASTER_CLOCK*2) MCFG_CPU_CONFIG(r4600_config) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_start) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kinst_state, irq0_start) MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true) diff --git a/src/mame/drivers/kncljoe.c b/src/mame/drivers/kncljoe.c index 75d3081668d..ab4ddbb5b19 100644 --- a/src/mame/drivers/kncljoe.c +++ b/src/mame/drivers/kncljoe.c @@ -257,9 +257,9 @@ static const ay8910_interface ay8910_config = DEVCB_DRIVER_MEMBER(kncljoe_state,unused_w) }; -static INTERRUPT_GEN (sound_nmi) +INTERRUPT_GEN_MEMBER(kncljoe_state::sound_nmi) { - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } void kncljoe_state::machine_start() @@ -289,12 +289,12 @@ static MACHINE_CONFIG_START( kncljoe, kncljoe_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_6MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kncljoe_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", M6803, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(sound_nmi, (double)3970) //measured 3.970 kHz + MCFG_CPU_PERIODIC_INT_DRIVER(kncljoe_state, sound_nmi, (double)3970) //measured 3.970 kHz /* video hardware */ diff --git a/src/mame/drivers/koikoi.c b/src/mame/drivers/koikoi.c index 4ccb6495ae1..42d56a93d15 100644 --- a/src/mame/drivers/koikoi.c +++ b/src/mame/drivers/koikoi.c @@ -365,7 +365,7 @@ static MACHINE_CONFIG_START( koikoi, koikoi_state ) MCFG_CPU_ADD("maincpu", Z80,KOIKOI_CRYSTAL/4) /* ?? */ MCFG_CPU_PROGRAM_MAP(koikoi_map) MCFG_CPU_IO_MAP(koikoi_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", koikoi_state, nmi_line_pulse) /* video hardware */ diff --git a/src/mame/drivers/konamigq.c b/src/mame/drivers/konamigq.c index f42f1eab096..5947be8fad8 100644 --- a/src/mame/drivers/konamigq.c +++ b/src/mame/drivers/konamigq.c @@ -344,7 +344,7 @@ static MACHINE_CONFIG_START( konamigq, konamigq_state ) MCFG_CPU_ADD( "soundcpu", M68000, 8000000 ) MCFG_CPU_PROGRAM_MAP( konamigq_sound_map) - MCFG_CPU_PERIODIC_INT( irq2_line_hold, 480 ) + MCFG_CPU_PERIODIC_INT_DRIVER(konamigq_state, irq2_line_hold, 480) MCFG_MACHINE_START_OVERRIDE(konamigq_state, konamigq ) MCFG_MACHINE_RESET_OVERRIDE(konamigq_state, konamigq ) diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index a5a3af18506..da3049edf61 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -633,10 +633,10 @@ static void dmastart_callback(int data) } -static INTERRUPT_GEN(konamigx_vbinterrupt) +INTERRUPT_GEN_MEMBER(konamigx_state::konamigx_vbinterrupt) { // lift idle suspension - if (resume_trigger && suspension_active) { suspension_active = 0; device->machine().scheduler().trigger(resume_trigger); } + if (resume_trigger && suspension_active) { suspension_active = 0; machine().scheduler().trigger(resume_trigger); } // IRQ 1 is the main 60hz vblank interrupt if (gx_syncen & 0x20) @@ -646,7 +646,7 @@ static INTERRUPT_GEN(konamigx_vbinterrupt) if ((konamigx_wrport1_1 & 0x81) == 0x81 || (gx_syncen & 1)) { gx_syncen &= ~1; - device->execute().set_input_line(1, HOLD_LINE); + device.execute().set_input_line(1, HOLD_LINE); } } @@ -1251,9 +1251,9 @@ WRITE16_MEMBER(konamigx_state::sndcomm68k_w) sndto020[offset] = data; } -static INTERRUPT_GEN(tms_sync) +INTERRUPT_GEN_MEMBER(konamigx_state::tms_sync) { - downcast(device)->sync(); + downcast(&device)->sync(); } READ16_MEMBER(konamigx_state::tms57002_data_word_r) @@ -1761,15 +1761,15 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 24000000) MCFG_CPU_PROGRAM_MAP(gx_type2_map) - MCFG_CPU_VBLANK_INT("screen", konamigx_vbinterrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", konamigx_state, konamigx_vbinterrupt) MCFG_CPU_ADD("soundcpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(gxsndmap) - MCFG_CPU_PERIODIC_INT(irq2_line_hold, 480) + MCFG_CPU_PERIODIC_INT_DRIVER(konamigx_state, irq2_line_hold, 480) MCFG_CPU_ADD("dasp", TMS57002, 12500000) MCFG_CPU_DATA_MAP(gxtmsmap) - MCFG_CPU_PERIODIC_INT(tms_sync, 48000) + MCFG_CPU_PERIODIC_INT_DRIVER(konamigx_state, tms_sync, 48000) MCFG_QUANTUM_TIME(attotime::from_hz(1920)) diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c index 1ffb7b14f33..f6f245c86d8 100644 --- a/src/mame/drivers/konamim2.c +++ b/src/mame/drivers/konamim2.c @@ -250,6 +250,7 @@ public: DECLARE_DRIVER_INIT(m2); virtual void video_start(); UINT32 screen_update_m2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(m2); }; @@ -1150,20 +1151,19 @@ static const powerpc_config ppc602_config = NULL }; -static INTERRUPT_GEN(m2) +INTERRUPT_GEN_MEMBER(konamim2_state::m2) { - konamim2_state *state = device->machine().driver_data(); - if (state->m_irq_enable & 0x800000) + if (m_irq_enable & 0x800000) { - state->m_irq_active |= 0x800000; + m_irq_active |= 0x800000; } - /*if (state->m_irq_enable & 0x8) + /*if (m_irq_enable & 0x8) { - state->m_irq_active |= 0x8; + m_irq_active |= 0x8; }*/ - device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); + device.execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } static MACHINE_CONFIG_START( m2, konamim2_state ) @@ -1172,7 +1172,7 @@ static MACHINE_CONFIG_START( m2, konamim2_state ) MCFG_CPU_ADD("maincpu", PPC602, 66000000) /* actually PPC602, 66MHz */ MCFG_CPU_CONFIG(ppc602_config) MCFG_CPU_PROGRAM_MAP(m2_main) - MCFG_CPU_VBLANK_INT("screen", m2) + MCFG_CPU_VBLANK_INT_DRIVER("screen", konamim2_state, m2) MCFG_CPU_ADD("sub", PPC602, 66000000) /* actually PPC602, 66MHz */ MCFG_CPU_CONFIG(ppc602_config) diff --git a/src/mame/drivers/kontest.c b/src/mame/drivers/kontest.c index dee02247e3e..be6c135956d 100644 --- a/src/mame/drivers/kontest.c +++ b/src/mame/drivers/kontest.c @@ -53,6 +53,8 @@ protected: virtual void video_start(); virtual void palette_init(); +public: + INTERRUPT_GEN_MEMBER(kontest_interrupt); }; @@ -240,11 +242,10 @@ static const sn76496_config psg_intf = ***************************************************************************/ -static INTERRUPT_GEN( kontest_interrupt ) +INTERRUPT_GEN_MEMBER(kontest_state::kontest_interrupt) { - kontest_state *state = device->machine().driver_data(); - if (state->m_control & 8) - device->execute().set_input_line(0, ASSERT_LINE); + if (m_control & 8) + device.execute().set_input_line(0, ASSERT_LINE); } void kontest_state::machine_start() @@ -264,7 +265,7 @@ static MACHINE_CONFIG_START( kontest, kontest_state ) MCFG_CPU_ADD("maincpu", Z80,MAIN_CLOCK/8) MCFG_CPU_PROGRAM_MAP(kontest_map) MCFG_CPU_IO_MAP(kontest_io) - MCFG_CPU_VBLANK_INT("screen", kontest_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kontest_state, kontest_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/kopunch.c b/src/mame/drivers/kopunch.c index 77d0406858d..51f8a016778 100644 --- a/src/mame/drivers/kopunch.c +++ b/src/mame/drivers/kopunch.c @@ -8,10 +8,10 @@ #include "cpu/i8085/i8085.h" #include "includes/kopunch.h" -static INTERRUPT_GEN( kopunch_interrupt ) +INTERRUPT_GEN_MEMBER(kopunch_state::kopunch_interrupt) { - device->execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE); - device->execute().set_input_line(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) @@ -189,7 +189,7 @@ static MACHINE_CONFIG_START( kopunch, kopunch_state ) MCFG_CPU_ADD("maincpu", I8085A, 4000000) /* 4 MHz ???? Uses SIM, must be 8085 */ MCFG_CPU_PROGRAM_MAP(kopunch_map) MCFG_CPU_IO_MAP(kopunch_io_map) - MCFG_CPU_VBLANK_INT("screen",kopunch_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kopunch_state, kopunch_interrupt) /* video hardware */ diff --git a/src/mame/drivers/ksayakyu.c b/src/mame/drivers/ksayakyu.c index d81dc1f4b25..b64117de607 100644 --- a/src/mame/drivers/ksayakyu.c +++ b/src/mame/drivers/ksayakyu.c @@ -271,11 +271,11 @@ static MACHINE_CONFIG_START( ksayakyu, ksayakyu_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,MAIN_CLOCK/8) //divider is guessed MCFG_CPU_PROGRAM_MAP(maincpu_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ksayakyu_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, MAIN_CLOCK/8) //divider is guessed, controls DAC tempo MCFG_CPU_PROGRAM_MAP(soundcpu_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,60) //guess, controls music tempo + MCFG_CPU_PERIODIC_INT_DRIVER(ksayakyu_state, irq0_line_hold, 60) //guess, controls music tempo MCFG_QUANTUM_TIME(attotime::from_hz(60000)) diff --git a/src/mame/drivers/kungfur.c b/src/mame/drivers/kungfur.c index 647911a1598..25d98264d2a 100644 --- a/src/mame/drivers/kungfur.c +++ b/src/mame/drivers/kungfur.c @@ -83,14 +83,14 @@ public: DECLARE_WRITE8_MEMBER(kungfur_adpcm2_w); virtual void machine_start(); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(kungfur_irq); }; -static INTERRUPT_GEN( kungfur_irq ) +INTERRUPT_GEN_MEMBER(kungfur_state::kungfur_irq) { - kungfur_state *state = device->machine().driver_data(); - if (state->m_control & 0x10) - device->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE); + if (m_control & 0x10) + device.execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } @@ -317,7 +317,7 @@ static MACHINE_CONFIG_START( kungfur, kungfur_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 8000000/2) // 4MHz? MCFG_CPU_PROGRAM_MAP(kungfur_map) - MCFG_CPU_PERIODIC_INT(kungfur_irq, 975) // close approximation + MCFG_CPU_PERIODIC_INT_DRIVER(kungfur_state, kungfur_irq, 975) // close approximation MCFG_I8255A_ADD( "ppi8255_0", ppi8255_0_intf ) MCFG_I8255A_ADD( "ppi8255_1", ppi8255_1_intf ) diff --git a/src/mame/drivers/kyugo.c b/src/mame/drivers/kyugo.c index c8457607dac..f39846b4ed8 100644 --- a/src/mame/drivers/kyugo.c +++ b/src/mame/drivers/kyugo.c @@ -523,12 +523,11 @@ void kyugo_state::machine_reset() m_flipscreen = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(kyugo_state::vblank_irq) { - kyugo_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -538,12 +537,12 @@ static MACHINE_CONFIG_START( gyrodine, kyugo_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(kyugo_main_map) MCFG_CPU_IO_MAP(kyugo_main_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", kyugo_state, vblank_irq) MCFG_CPU_ADD("sub", Z80, XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(gyrodine_sub_map) MCFG_CPU_IO_MAP(gyrodine_sub_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(kyugo_state, irq0_line_hold, 4*60) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/labyrunr.c b/src/mame/drivers/labyrunr.c index bc4e5c3f79b..2a9c969f2a3 100644 --- a/src/mame/drivers/labyrunr.c +++ b/src/mame/drivers/labyrunr.c @@ -16,20 +16,18 @@ #include "includes/labyrunr.h" -static INTERRUPT_GEN( labyrunr_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(labyrunr_state::labyrunr_vblank_interrupt) { - labyrunr_state *state = device->machine().driver_data(); - address_space &space = state->generic_space(); - if (k007121_ctrlram_r(state->m_k007121, space, 7) & 0x02) - device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); + address_space &space = generic_space(); + if (k007121_ctrlram_r(m_k007121, space, 7) & 0x02) + device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); } -static INTERRUPT_GEN( labyrunr_timer_interrupt ) +INTERRUPT_GEN_MEMBER(labyrunr_state::labyrunr_timer_interrupt) { - labyrunr_state *state = device->machine().driver_data(); - address_space &space = state->generic_space(); - if (k007121_ctrlram_r(state->m_k007121, space, 7) & 0x01) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + address_space &space = generic_space(); + if (k007121_ctrlram_r(m_k007121, space, 7) & 0x01) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -197,8 +195,8 @@ static MACHINE_CONFIG_START( labyrunr, labyrunr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* 24MHz/8? */ MCFG_CPU_PROGRAM_MAP(labyrunr_map) - MCFG_CPU_VBLANK_INT("screen", labyrunr_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(labyrunr_timer_interrupt, 4*60) + MCFG_CPU_VBLANK_INT_DRIVER("screen", labyrunr_state, labyrunr_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(labyrunr_state, labyrunr_timer_interrupt, 4*60) /* video hardware */ diff --git a/src/mame/drivers/ladybug.c b/src/mame/drivers/ladybug.c index ee008730c58..da0d30fb7df 100644 --- a/src/mame/drivers/ladybug.c +++ b/src/mame/drivers/ladybug.c @@ -814,12 +814,12 @@ static MACHINE_CONFIG_START( sraider, ladybug_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sraider_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ladybug_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sraider_cpu2_map) MCFG_CPU_IO_MAP(sraider_cpu2_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ladybug_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(ladybug_state,sraider) MCFG_MACHINE_RESET_OVERRIDE(ladybug_state,sraider) diff --git a/src/mame/drivers/ladyfrog.c b/src/mame/drivers/ladyfrog.c index ad8b1a209e8..6015ff0aa39 100644 --- a/src/mame/drivers/ladyfrog.c +++ b/src/mame/drivers/ladyfrog.c @@ -306,11 +306,11 @@ static MACHINE_CONFIG_START( ladyfrog, ladyfrog_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(ladyfrog_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ladyfrog_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(ladyfrog_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(ladyfrog_state, irq0_line_hold, 2*60) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/laserbas.c b/src/mame/drivers/laserbas.c index 5b9fa6c248a..bde08024db9 100644 --- a/src/mame/drivers/laserbas.c +++ b/src/mame/drivers/laserbas.c @@ -308,7 +308,7 @@ static MACHINE_CONFIG_START( laserbas, laserbas_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(laserbas_memory) MCFG_CPU_IO_MAP(laserbas_io) - MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", laserbas_state, irq0_line_hold) MCFG_PIT8253_ADD("pit0", laserbas_pit8253_intf_0) MCFG_PIT8253_ADD("pit1", laserbas_pit8253_intf_1) diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c index 3bd17c93882..a4bd4edbda0 100644 --- a/src/mame/drivers/laserbat.c +++ b/src/mame/drivers/laserbat.c @@ -646,17 +646,16 @@ static const ay8910_interface ay8910_config = }; -static INTERRUPT_GEN( laserbat_interrupt ) +INTERRUPT_GEN_MEMBER(laserbat_state::laserbat_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x0a); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x0a); } -static INTERRUPT_GEN( zaccaria_cb1_toggle ) +INTERRUPT_GEN_MEMBER(laserbat_state::zaccaria_cb1_toggle) { - laserbat_state *state = device->machine().driver_data(); - state->m_pia->cb1_w(state->m_cb1_toggle & 1); - state->m_cb1_toggle ^= 1; + m_pia->cb1_w(m_cb1_toggle & 1); + m_cb1_toggle ^= 1; } @@ -750,7 +749,7 @@ static MACHINE_CONFIG_START( laserbat, laserbat_state ) MCFG_CPU_ADD("maincpu", S2650, 14318180/4) // ??? MCFG_CPU_PROGRAM_MAP(laserbat_map) MCFG_CPU_IO_MAP(laserbat_io_map) - MCFG_CPU_VBLANK_INT("screen", laserbat_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", laserbat_state, laserbat_interrupt) /* video hardware */ @@ -788,11 +787,11 @@ static MACHINE_CONFIG_START( catnmous, laserbat_state ) MCFG_CPU_ADD("maincpu", S2650, 14318000/4) /* ? */ MCFG_CPU_PROGRAM_MAP(laserbat_map) MCFG_CPU_IO_MAP(catnmous_io_map) - MCFG_CPU_VBLANK_INT("screen", laserbat_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", laserbat_state, laserbat_interrupt) MCFG_CPU_ADD("audiocpu", M6802,3580000) /* ? */ MCFG_CPU_PROGRAM_MAP(catnmous_sound_map) - MCFG_CPU_PERIODIC_INT(zaccaria_cb1_toggle, (double)3580000/4096) + MCFG_CPU_PERIODIC_INT_DRIVER(laserbat_state, zaccaria_cb1_toggle, (double)3580000/4096) MCFG_PIA6821_ADD("pia", pia_intf) diff --git a/src/mame/drivers/lasso.c b/src/mame/drivers/lasso.c index 34837f7ca58..5890309f213 100644 --- a/src/mame/drivers/lasso.c +++ b/src/mame/drivers/lasso.c @@ -511,7 +511,7 @@ static MACHINE_CONFIG_START( base, lasso_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 11289000/16) /* guess */ MCFG_CPU_PROGRAM_MAP(lasso_main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lasso_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", M6502, 600000) MCFG_CPU_PROGRAM_MAP(lasso_audio_map) @@ -597,7 +597,7 @@ static MACHINE_CONFIG_DERIVED( pinbo, base ) /* basic machine hardware */ MCFG_CPU_REPLACE("maincpu", M6502, XTAL_18MHz/24) MCFG_CPU_PROGRAM_MAP(pinbo_main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lasso_state, irq0_line_hold) MCFG_CPU_REPLACE("audiocpu", Z80, XTAL_18MHz/6) MCFG_CPU_PROGRAM_MAP(pinbo_audio_map) diff --git a/src/mame/drivers/lastbank.c b/src/mame/drivers/lastbank.c index 7588224d1c7..3ea24f78194 100644 --- a/src/mame/drivers/lastbank.c +++ b/src/mame/drivers/lastbank.c @@ -459,7 +459,7 @@ static MACHINE_CONFIG_START( lastbank, lastbank_state ) MCFG_CPU_ADD("audiocpu",Z80,MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(lastbank_audio_map) MCFG_CPU_IO_MAP(lastbank_audio_io) -// MCFG_CPU_PERIODIC_INT(nmi_line_pulse,60) + MCFG_CPU_PERIODIC_INT_DRIVER(lastbank_state, nmi_line_pulse, 60) MCFG_QUANTUM_PERFECT_CPU("maincpu") diff --git a/src/mame/drivers/lastduel.c b/src/mame/drivers/lastduel.c index 012e3a25cdf..7a4ad367a6b 100644 --- a/src/mame/drivers/lastduel.c +++ b/src/mame/drivers/lastduel.c @@ -500,7 +500,7 @@ static MACHINE_CONFIG_START( lastduel, lastduel_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Could be 8 MHz */ MCFG_CPU_PROGRAM_MAP(lastduel_map) - MCFG_CPU_VBLANK_INT("screen",irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lastduel_state, irq2_line_hold) MCFG_TIMER_ADD_PERIODIC("timer_irq", lastduel_timer_cb, attotime::from_hz(120)) /* control reads?? */ MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* Accurate */ @@ -543,7 +543,7 @@ static MACHINE_CONFIG_START( madgear, lastduel_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Accurate */ MCFG_CPU_PROGRAM_MAP(madgear_map) - MCFG_CPU_VBLANK_INT("screen",irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lastduel_state, irq5_line_hold) MCFG_TIMER_ADD_PERIODIC("timer_irq", madgear_timer_cb, attotime::from_hz(120)) /* control reads?? */ MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ diff --git a/src/mame/drivers/lastfght.c b/src/mame/drivers/lastfght.c index 5c8a6b23a46..4628261ab01 100644 --- a/src/mame/drivers/lastfght.c +++ b/src/mame/drivers/lastfght.c @@ -125,6 +125,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_lastfght(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(unknown_interrupt); }; @@ -527,11 +528,10 @@ INPUT_PORTS_END Machine Drivers ***************************************************************************/ -static INTERRUPT_GEN( unknown_interrupt ) +INTERRUPT_GEN_MEMBER(lastfght_state::unknown_interrupt) { - lastfght_state *state = device->machine().driver_data(); - state->m_maincpu->set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); + m_maincpu->set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); } void lastfght_state::machine_start() @@ -581,8 +581,8 @@ static MACHINE_CONFIG_START( lastfght, lastfght_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", H83044, 32000000/2) MCFG_CPU_PROGRAM_MAP( lastfght_map) - MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) - MCFG_CPU_PERIODIC_INT(unknown_interrupt,60) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lastfght_state, irq0_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(lastfght_state, unknown_interrupt, 60) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/legionna.c b/src/mame/drivers/legionna.c index ee6ac48a841..13ba69a8631 100644 --- a/src/mame/drivers/legionna.c +++ b/src/mame/drivers/legionna.c @@ -1052,7 +1052,7 @@ static MACHINE_CONFIG_START( legionna, legionna_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* ??? */ MCFG_CPU_PROGRAM_MAP(legionna_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold)/* VBL */ SEIBU_SOUND_SYSTEM_CPU(14318180/4) @@ -1082,7 +1082,7 @@ static MACHINE_CONFIG_START( heatbrl, legionna_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* ??? */ MCFG_CPU_PROGRAM_MAP(heatbrl_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold)/* VBL */ SEIBU_SOUND_SYSTEM_CPU(14318180/4) @@ -1111,7 +1111,7 @@ static MACHINE_CONFIG_START( godzilla, legionna_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 20000000/2) MCFG_CPU_PROGRAM_MAP(godzilla_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold) SEIBU2_SOUND_SYSTEM_CPU(14318180/4) @@ -1140,7 +1140,7 @@ static MACHINE_CONFIG_START( denjinmk, legionna_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 20000000/2) MCFG_CPU_PROGRAM_MAP(denjinmk_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold) SEIBU2_SOUND_SYSTEM_CPU(14318180/4) @@ -1169,7 +1169,7 @@ static MACHINE_CONFIG_START( grainbow, legionna_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 20000000/2) MCFG_CPU_PROGRAM_MAP(grainbow_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold) SEIBU2_SOUND_SYSTEM_CPU(14318180/4) @@ -1199,7 +1199,7 @@ static MACHINE_CONFIG_START( cupsoc, legionna_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,20000000/2) MCFG_CPU_PROGRAM_MAP(cupsoc_mem) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold)/* VBL */ SEIBU_SOUND_SYSTEM_CPU(14318180/4) @@ -1233,7 +1233,7 @@ static MACHINE_CONFIG_START( cupsocbl, legionna_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,12000000) MCFG_CPU_PROGRAM_MAP(cupsocbl_mem) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) /* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold) /* VBL */ /*Different Sound hardware*/ //SEIBU_SOUND_SYSTEM_CPU(14318180/4) diff --git a/src/mame/drivers/leland.c b/src/mame/drivers/leland.c index d800a2e25ea..8db6247ec9b 100644 --- a/src/mame/drivers/leland.c +++ b/src/mame/drivers/leland.c @@ -737,7 +737,7 @@ static MACHINE_CONFIG_START( leland, leland_state ) MCFG_CPU_ADD("master", Z80, MASTER_CLOCK/2) MCFG_CPU_PROGRAM_MAP(master_map_program) MCFG_CPU_IO_MAP(master_map_io) - MCFG_CPU_VBLANK_INT("screen", leland_master_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", leland_state, leland_master_interrupt) MCFG_CPU_ADD("slave", Z80, MASTER_CLOCK/2) MCFG_CPU_PROGRAM_MAP(slave_small_map_program) diff --git a/src/mame/drivers/lemmings.c b/src/mame/drivers/lemmings.c index 726cec65fa2..80b3424b716 100644 --- a/src/mame/drivers/lemmings.c +++ b/src/mame/drivers/lemmings.c @@ -263,7 +263,7 @@ static MACHINE_CONFIG_START( lemmings, lemmings_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(lemmings_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lemmings_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", M6809,32220000/8) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c index 97ae7c16c1b..c055640ec6a 100644 --- a/src/mame/drivers/lethal.c +++ b/src/mame/drivers/lethal.c @@ -203,12 +203,11 @@ WRITE8_MEMBER(lethal_state::control2_w) ioport("EEPROMOUT")->write(m_cur_control2, 0xff); } -static INTERRUPT_GEN(lethalen_interrupt) +INTERRUPT_GEN_MEMBER(lethal_state::lethalen_interrupt) { - lethal_state *state = device->machine().driver_data(); - if (k056832_is_irq_enabled(state->m_k056832, 0)) - device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); + if (k056832_is_irq_enabled(m_k056832, 0)) + device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(lethal_state::sound_cmd_w) @@ -645,7 +644,7 @@ static MACHINE_CONFIG_START( lethalen, lethal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, MAIN_CLOCK/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(le_main) - MCFG_CPU_VBLANK_INT("screen", lethalen_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lethal_state, lethalen_interrupt) MCFG_CPU_ADD("soundcpu", Z80, MAIN_CLOCK/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(le_sound) diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c index b65d3925719..77809a49946 100644 --- a/src/mame/drivers/lgp.c +++ b/src/mame/drivers/lgp.c @@ -87,6 +87,7 @@ public: DECLARE_DRIVER_INIT(lgp); virtual void machine_start(); UINT32 screen_update_lgp(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_callback_lgp); }; @@ -336,15 +337,14 @@ static TIMER_CALLBACK( irq_stop ) machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE); } -static INTERRUPT_GEN( vblank_callback_lgp ) +INTERRUPT_GEN_MEMBER(lgp_state::vblank_callback_lgp) { - lgp_state *state = device->machine().driver_data(); // NMI - //device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + //device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); // IRQ - device->execute().set_input_line(0, ASSERT_LINE); - state->m_irq_timer->adjust(attotime::from_usec(50)); + device.execute().set_input_line(0, ASSERT_LINE); + m_irq_timer->adjust(attotime::from_usec(50)); } @@ -360,7 +360,7 @@ static MACHINE_CONFIG_START( lgp, lgp_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_PCB_CLOCK) MCFG_CPU_PROGRAM_MAP(main_program_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_callback_lgp) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lgp_state, vblank_callback_lgp) /* sound cpu */ MCFG_CPU_ADD("audiocpu", Z80, SOUND_PCB_CLOCK) diff --git a/src/mame/drivers/liberate.c b/src/mame/drivers/liberate.c index c06e73b6138..ddfdd7e8628 100644 --- a/src/mame/drivers/liberate.c +++ b/src/mame/drivers/liberate.c @@ -760,27 +760,26 @@ GFXDECODE_END * *************************************/ -static INTERRUPT_GEN( deco16_interrupt ) +INTERRUPT_GEN_MEMBER(liberate_state::deco16_interrupt) { - liberate_state *state = device->machine().driver_data(); - int p = ~state->ioport("IN3")->read(); - if ((p & 0x43) && !state->m_latch) + int p = ~ioport("IN3")->read(); + if ((p & 0x43) && !m_latch) { - device->execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); - state->m_latch = 1; + device.execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); + m_latch = 1; } else { if (!(p & 0x43)) - state->m_latch = 0; + m_latch = 0; } } #if 0 -static INTERRUPT_GEN( prosport_interrupt ) +INTERRUPT_GEN_MEMBER(liberate_state::prosport_interrupt) { /* ??? */ - device->execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); + device.execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); } #endif @@ -823,11 +822,11 @@ static MACHINE_CONFIG_START( liberate, liberate_state ) MCFG_CPU_ADD("maincpu",DECO16, 2000000) MCFG_CPU_PROGRAM_MAP(liberate_map) MCFG_CPU_IO_MAP(deco16_io_map) - MCFG_CPU_VBLANK_INT("screen", deco16_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", liberate_state, deco16_interrupt) MCFG_CPU_ADD("audiocpu",M6502, 1500000) MCFG_CPU_PROGRAM_MAP(liberate_sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,16*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(liberate_state, nmi_line_pulse, 16*60) /* ??? */ MCFG_QUANTUM_TIME(attotime::from_hz(12000)) @@ -863,7 +862,7 @@ static MACHINE_CONFIG_DERIVED( liberatb, liberate ) /* basic machine hardware */ MCFG_CPU_REPLACE("maincpu", M6502, 2000000) MCFG_CPU_PROGRAM_MAP(liberatb_map) - MCFG_CPU_VBLANK_INT("screen", deco16_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", liberate_state, deco16_interrupt) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( boomrang, liberate ) @@ -902,11 +901,11 @@ static MACHINE_CONFIG_START( prosport, liberate_state ) MCFG_CPU_ADD("maincpu", DECO16, 2000000) MCFG_CPU_PROGRAM_MAP(prosport_map) MCFG_CPU_IO_MAP(deco16_io_map) - MCFG_CPU_VBLANK_INT("screen", deco16_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", liberate_state, deco16_interrupt) MCFG_CPU_ADD("audiocpu", M6502, 1500000/2) MCFG_CPU_PROGRAM_MAP(liberate_sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,16*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(liberate_state, nmi_line_pulse, 16*60) /* ??? */ // MCFG_QUANTUM_TIME(attotime::from_hz(12000)) diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c index 36621a7599d..46ba608c63c 100644 --- a/src/mame/drivers/limenko.c +++ b/src/mame/drivers/limenko.c @@ -752,7 +752,7 @@ static MACHINE_CONFIG_START( limenko, limenko_state ) MCFG_CPU_ADD("maincpu", E132XN, 20000000*4) /* 4x internal multiplier */ MCFG_CPU_PROGRAM_MAP(limenko_map) MCFG_CPU_IO_MAP(limenko_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", limenko_state, irq0_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") @@ -780,7 +780,7 @@ static MACHINE_CONFIG_START( spotty, limenko_state ) MCFG_CPU_ADD("maincpu", GMS30C2232, 20000000) /* 20 MHz, no internal multiplier */ MCFG_CPU_PROGRAM_MAP(spotty_map) MCFG_CPU_IO_MAP(spotty_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", limenko_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", AT89C4051, 4000000) /* 4 MHz */ MCFG_CPU_IO_MAP(spotty_sound_io_map) diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c index 9a6c9a6f371..fb5376681bc 100644 --- a/src/mame/drivers/lkage.c +++ b/src/mame/drivers/lkage.c @@ -556,7 +556,7 @@ static MACHINE_CONFIG_START( lkage, lkage_state ) MCFG_CPU_ADD("maincpu", Z80, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(lkage_map) MCFG_CPU_IO_MAP(lkage_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lkage_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(lkage_sound_map) @@ -602,7 +602,7 @@ static MACHINE_CONFIG_START( lkageb, lkage_state ) MCFG_CPU_ADD("maincpu", Z80,MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(lkage_map) MCFG_CPU_IO_MAP(lkage_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lkage_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(lkage_sound_map) diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index 371ce7d8197..92457025c64 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -143,6 +143,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_looping(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(looping_interrupt); }; @@ -333,9 +334,9 @@ void looping_state::machine_start() * *************************************/ -static INTERRUPT_GEN( looping_interrupt ) +INTERRUPT_GEN_MEMBER(looping_state::looping_interrupt) { - device->execute().set_input_line_and_vector(0, ASSERT_LINE, 4); + device.execute().set_input_line_and_vector(0, ASSERT_LINE, 4); } @@ -642,7 +643,7 @@ static MACHINE_CONFIG_START( looping, looping_state ) MCFG_CPU_ADD("maincpu", TMS9995L, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(looping_map) MCFG_CPU_IO_MAP(looping_io_map) - MCFG_CPU_VBLANK_INT("screen", looping_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", looping_state, looping_interrupt) MCFG_CPU_ADD("audiocpu", TMS9980L, SOUND_CLOCK/4) MCFG_CPU_PROGRAM_MAP(looping_sound_map) diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c index 0e6a11fb197..0dc7b1b6eb8 100644 --- a/src/mame/drivers/lordgun.c +++ b/src/mame/drivers/lordgun.c @@ -657,7 +657,7 @@ static const ym3812_interface lordgun_ym3812_interface = static MACHINE_CONFIG_START( lordgun, lordgun_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) MCFG_CPU_PROGRAM_MAP(lordgun_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lordgun_state, irq4_line_hold) MCFG_CPU_ADD("soundcpu", Z80, XTAL_20MHz / 4) MCFG_CPU_PROGRAM_MAP(lordgun_soundmem_map) @@ -699,7 +699,7 @@ static const ymf278b_interface ymf278b_config = static MACHINE_CONFIG_START( aliencha, lordgun_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) MCFG_CPU_PROGRAM_MAP(aliencha_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lordgun_state, irq4_line_hold) MCFG_CPU_ADD("soundcpu", Z80, XTAL_20MHz / 4) MCFG_CPU_PROGRAM_MAP(lordgun_soundmem_map) diff --git a/src/mame/drivers/lsasquad.c b/src/mame/drivers/lsasquad.c index 2151bfd40a9..e67594bd1cd 100644 --- a/src/mame/drivers/lsasquad.c +++ b/src/mame/drivers/lsasquad.c @@ -619,7 +619,7 @@ static MACHINE_CONFIG_START( lsasquad, lsasquad_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK / 4) MCFG_CPU_PROGRAM_MAP(lsasquad_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lsasquad_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(lsasquad_sound_map) @@ -674,7 +674,7 @@ static MACHINE_CONFIG_START( daikaiju, lsasquad_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK / 4) MCFG_CPU_PROGRAM_MAP(daikaiju_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lsasquad_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(daikaiju_sound_map) diff --git a/src/mame/drivers/ltcasino.c b/src/mame/drivers/ltcasino.c index 3414288b273..dc0926ceced 100644 --- a/src/mame/drivers/ltcasino.c +++ b/src/mame/drivers/ltcasino.c @@ -647,7 +647,7 @@ static MACHINE_CONFIG_START( ltcasino, ltcasino_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502,2000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(ltcasino_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ltcasino_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c index aa723c545d2..d4f80391712 100644 --- a/src/mame/drivers/luckgrln.c +++ b/src/mame/drivers/luckgrln.c @@ -151,6 +151,7 @@ public: TILE_GET_INFO_MEMBER(get_luckgrln_reel4_tile_info); virtual void video_start(); UINT32 screen_update_luckgrln(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(luckgrln_irq); }; @@ -986,18 +987,17 @@ static const mc6845_interface mc6845_intf = NULL /* update address callback */ }; -static INTERRUPT_GEN( luckgrln_irq ) +INTERRUPT_GEN_MEMBER(luckgrln_state::luckgrln_irq) { - luckgrln_state *state = device->machine().driver_data(); - if(state->m_nmi_enable) - device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_enable) + machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( luckgrln, luckgrln_state ) MCFG_CPU_ADD("maincpu", Z180,8000000) MCFG_CPU_PROGRAM_MAP(mainmap) MCFG_CPU_IO_MAP(portmap) - MCFG_CPU_VBLANK_INT("screen", luckgrln_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", luckgrln_state, luckgrln_irq) MCFG_MC6845_ADD("crtc", H46505, 6000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */ diff --git a/src/mame/drivers/lucky74.c b/src/mame/drivers/lucky74.c index f14b6332dd8..2ff0f56e3b0 100644 --- a/src/mame/drivers/lucky74.c +++ b/src/mame/drivers/lucky74.c @@ -901,12 +901,11 @@ WRITE8_MEMBER(lucky74_state::lamps_b_w) * Interrupts Gen * ************************/ -static INTERRUPT_GEN( nmi_interrupt ) +INTERRUPT_GEN_MEMBER(lucky74_state::nmi_interrupt) { - lucky74_state *state = device->machine().driver_data(); - if ((state->m_ym2149_portb & 0x10) == 0) /* ym2149 portB bit 4 trigger the NMI */ + if ((m_ym2149_portb & 0x10) == 0) /* ym2149 portB bit 4 trigger the NMI */ { - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -1361,7 +1360,7 @@ static MACHINE_CONFIG_START( lucky74, lucky74_state ) MCFG_CPU_ADD("maincpu", Z80, C_06B49P_CLKOUT_03) /* 3 MHz. */ MCFG_CPU_PROGRAM_MAP(lucky74_map) MCFG_CPU_IO_MAP(lucky74_portmap) - MCFG_CPU_VBLANK_INT("screen", nmi_interrupt) /* 60 Hz. measured */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", lucky74_state, nmi_interrupt) /* 60 Hz. measured */ MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/lvcards.c b/src/mame/drivers/lvcards.c index af73815d020..213f69d8cab 100644 --- a/src/mame/drivers/lvcards.c +++ b/src/mame/drivers/lvcards.c @@ -465,7 +465,7 @@ static MACHINE_CONFIG_START( lvcards, lvcards_state ) MCFG_CPU_PROGRAM_MAP(lvcards_map) MCFG_CPU_IO_MAP(lvcards_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lvcards_state, irq0_line_hold) // video hardware diff --git a/src/mame/drivers/lwings.c b/src/mame/drivers/lwings.c index 183e42c20c1..2390dfea38d 100644 --- a/src/mame/drivers/lwings.c +++ b/src/mame/drivers/lwings.c @@ -87,20 +87,18 @@ WRITE8_MEMBER(lwings_state::lwings_bankswitch_w) coin_counter_w(machine(), 0, data & 0x80); } -static INTERRUPT_GEN( lwings_interrupt ) +INTERRUPT_GEN_MEMBER(lwings_state::lwings_interrupt) { - lwings_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ + if(m_nmi_mask) + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ } -static INTERRUPT_GEN( avengers_interrupt ) +INTERRUPT_GEN_MEMBER(lwings_state::avengers_interrupt) { - lwings_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -783,11 +781,11 @@ static MACHINE_CONFIG_START( lwings, lwings_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on PCB */ MCFG_CPU_PROGRAM_MAP(lwings_map) - MCFG_CPU_VBLANK_INT("screen", lwings_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", lwings_state, lwings_interrupt) MCFG_CPU_ADD("soundcpu", Z80, XTAL_12MHz/4) /* verified on PCB */ MCFG_CPU_PROGRAM_MAP(lwings_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(lwings_state, irq0_line_hold, 4*60) /* ??? */ /* video hardware */ @@ -834,7 +832,7 @@ static MACHINE_CONFIG_DERIVED( trojan, lwings ) MCFG_CPU_ADD("adpcm", Z80, XTAL_12MHz/4) /* verified on PCB */ MCFG_CPU_PROGRAM_MAP(trojan_adpcm_map) MCFG_CPU_IO_MAP(trojan_adpcm_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4000) + MCFG_CPU_PERIODIC_INT_DRIVER(lwings_state, irq0_line_hold, 4000) /* video hardware */ MCFG_GFXDECODE(trojan) @@ -853,7 +851,7 @@ static MACHINE_CONFIG_DERIVED( avengers, trojan ) MCFG_CPU_MODIFY("maincpu") //AT: (avengers37b16gre) MCFG_CPU_PROGRAM_MAP(avengers_map) - MCFG_CPU_VBLANK_INT("screen", avengers_interrupt) // RST 38h triggered by software + MCFG_CPU_VBLANK_INT_DRIVER("screen", lwings_state, avengers_interrupt) // RST 38h triggered by software MCFG_CPU_MODIFY("adpcm") MCFG_CPU_IO_MAP(avengers_adpcm_io_map) diff --git a/src/mame/drivers/m10.c b/src/mame/drivers/m10.c index d37b4c7b2df..5e2267bfa86 100644 --- a/src/mame/drivers/m10.c +++ b/src/mame/drivers/m10.c @@ -523,22 +523,22 @@ static TIMER_CALLBACK( interrupt_callback ) } #if 0 -static INTERRUPT_GEN( m11_interrupt ) +INTERRUPT_GEN_MEMBER(m10_state::m11_interrupt) { - 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); + device.execute().set_input_line(0, ASSERT_LINE); + //machine().scheduler().timer_set(machine.primary_screen->time_until_pos(IREMM10_VBEND), FUNC(interrupt_callback), -1); } -static INTERRUPT_GEN( m10_interrupt ) +INTERRUPT_GEN_MEMBER(m10_state::m10_interrupt) { - device->execute().set_input_line(0, ASSERT_LINE); + device.execute().set_input_line(0, ASSERT_LINE); } #endif -static INTERRUPT_GEN( m15_interrupt ) +INTERRUPT_GEN_MEMBER(m10_state::m15_interrupt) { - 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); + device.execute().set_input_line(0, ASSERT_LINE); + machine().scheduler().timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 1, 80), FUNC(interrupt_callback), -1); } /************************************* @@ -832,7 +832,7 @@ static MACHINE_CONFIG_START( m10, m10_state ) MCFG_MACHINE_START_OVERRIDE(m10_state,m10) MCFG_MACHINE_RESET_OVERRIDE(m10_state,m10) - //MCFG_CPU_VBLANK_INT("screen", m10_interrupt) + //MCFG_CPU_VBLANK_INT_DRIVER("screen", m10_state, m10_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -863,7 +863,7 @@ static MACHINE_CONFIG_DERIVED( m11, m10 ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(m11_main) - //MCFG_CPU_VBLANK_INT("screen", m11_interrupt) + //MCFG_CPU_VBLANK_INT_DRIVER("screen", m10_state, m11_interrupt) /* sound hardware */ MACHINE_CONFIG_END @@ -877,7 +877,7 @@ static MACHINE_CONFIG_START( m15, m10_state ) MCFG_MACHINE_START_OVERRIDE(m10_state,m10) MCFG_MACHINE_RESET_OVERRIDE(m10_state,m10) - MCFG_CPU_VBLANK_INT("screen", m15_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m10_state, m15_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/m14.c b/src/mame/drivers/m14.c index c61a3084e33..a17401b315f 100644 --- a/src/mame/drivers/m14.c +++ b/src/mame/drivers/m14.c @@ -86,6 +86,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_m14(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(m14_irq); }; @@ -313,10 +314,10 @@ static GFXDECODE_START( m14 ) GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 0x10 ) GFXDECODE_END -static INTERRUPT_GEN( m14_irq ) +INTERRUPT_GEN_MEMBER(m14_state::m14_irq) { - device->execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE); - device->execute().set_input_line(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); } void m14_state::machine_start() @@ -340,7 +341,7 @@ static MACHINE_CONFIG_START( m14, m14_state ) MCFG_CPU_ADD("maincpu",I8085A,6000000/2) //guess: 6 Mhz internally divided by 2 MCFG_CPU_PROGRAM_MAP(m14_map) MCFG_CPU_IO_MAP(m14_io_map) - MCFG_CPU_VBLANK_INT("screen",m14_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m14_state, m14_irq) /* video hardware */ diff --git a/src/mame/drivers/m52.c b/src/mame/drivers/m52.c index f992d4102ee..2c3c90d44b7 100644 --- a/src/mame/drivers/m52.c +++ b/src/mame/drivers/m52.c @@ -396,7 +396,7 @@ static MACHINE_CONFIG_START( m52, m52_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m52_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/m57.c b/src/mame/drivers/m57.c index ce0cbabf129..54471916119 100644 --- a/src/mame/drivers/m57.c +++ b/src/mame/drivers/m57.c @@ -228,7 +228,7 @@ static MACHINE_CONFIG_START( m57, m57_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m57_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/m58.c b/src/mame/drivers/m58.c index 09f2e0b3223..d856f3fb05e 100644 --- a/src/mame/drivers/m58.c +++ b/src/mame/drivers/m58.c @@ -193,7 +193,7 @@ static MACHINE_CONFIG_START( yard, m58_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3/2) MCFG_CPU_PROGRAM_MAP(yard_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m58_state, irq0_line_hold) /* video hardware */ MCFG_GFXDECODE(yard) diff --git a/src/mame/drivers/m62.c b/src/mame/drivers/m62.c index a2e3839feb2..486729e9eb4 100644 --- a/src/mame/drivers/m62.c +++ b/src/mame/drivers/m62.c @@ -957,7 +957,7 @@ static MACHINE_CONFIG_START( ldrun, m62_state ) MCFG_CPU_ADD("maincpu", Z80, 24000000/6) MCFG_CPU_PROGRAM_MAP(ldrun_map) MCFG_CPU_IO_MAP(kungfum_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m62_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c index 49a3c9233e4..443ae6f4320 100644 --- a/src/mame/drivers/m63.c +++ b/src/mame/drivers/m63.c @@ -184,6 +184,8 @@ public: DECLARE_VIDEO_START(m63); DECLARE_PALETTE_INIT(m63); UINT32 screen_update_m63(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(snd_irq); + INTERRUPT_GEN_MEMBER(vblank_irq); }; @@ -718,10 +720,9 @@ static const samples_interface fghtbskt_samples_interface = fghtbskt_sh_start }; -static INTERRUPT_GEN( snd_irq ) +INTERRUPT_GEN_MEMBER(m63_state::snd_irq) { - m63_state *state = device->machine().driver_data(); - state->m_sound_irq = 1; + m_sound_irq = 1; } MACHINE_START_MEMBER(m63_state,m63) @@ -755,12 +756,11 @@ MACHINE_RESET_MEMBER(m63_state,m63) } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(m63_state::vblank_irq) { - m63_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( m63, m63_state ) @@ -768,12 +768,12 @@ static MACHINE_CONFIG_START( m63, m63_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",Z80,XTAL_12MHz/4) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(m63_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m63_state, vblank_irq) MCFG_CPU_ADD("soundcpu",I8039,XTAL_12MHz/4) /* ????? */ MCFG_CPU_PROGRAM_MAP(i8039_map) MCFG_CPU_IO_MAP(i8039_port_map) - MCFG_CPU_PERIODIC_INT(snd_irq, 60) + MCFG_CPU_PERIODIC_INT_DRIVER(m63_state, snd_irq, 60) MCFG_MACHINE_START_OVERRIDE(m63_state,m63) MCFG_MACHINE_RESET_OVERRIDE(m63_state,m63) @@ -804,7 +804,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( atomboy, m63 ) MCFG_CPU_MODIFY("soundcpu") - MCFG_CPU_PERIODIC_INT(snd_irq, 60/2) + MCFG_CPU_PERIODIC_INT_DRIVER(m63_state, snd_irq, 60/2) MACHINE_CONFIG_END static MACHINE_CONFIG_START( fghtbskt, m63_state ) @@ -812,12 +812,12 @@ static MACHINE_CONFIG_START( fghtbskt, m63_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/4) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(fghtbskt_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m63_state, vblank_irq) MCFG_CPU_ADD("soundcpu", I8039,XTAL_12MHz/4) /* ????? */ MCFG_CPU_PROGRAM_MAP(i8039_map) MCFG_CPU_IO_MAP(i8039_port_map) - MCFG_CPU_PERIODIC_INT(snd_irq, 60/2) + MCFG_CPU_PERIODIC_INT_DRIVER(m63_state, snd_irq, 60/2) MCFG_MACHINE_START_OVERRIDE(m63_state,m63) MCFG_MACHINE_RESET_OVERRIDE(m63_state,m63) diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c index 66c50649fb1..cccfcf028bb 100644 --- a/src/mame/drivers/m72.c +++ b/src/mame/drivers/m72.c @@ -283,12 +283,11 @@ READ8_MEMBER(m72_state::m72_mcu_data_r) return ret; } -static INTERRUPT_GEN( m72_mcu_int ) +INTERRUPT_GEN_MEMBER(m72_state::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->execute().set_input_line(1, ASSERT_LINE); + //m_mcu_snd_cmd_latch |= 0x11; /* 0x10 is special as well - FIXME */ + m_mcu_snd_cmd_latch = 0x11;// | (machine.rand() & 1); /* 0x10 is special as well - FIXME */ + device.execute().set_input_line(1, ASSERT_LINE); } READ8_MEMBER(m72_state::m72_mcu_sample_r) @@ -434,13 +433,12 @@ static int find_sample(int num) } #endif -static INTERRUPT_GEN(fake_nmi) +INTERRUPT_GEN_MEMBER(m72_state::fake_nmi) { - m72_state *state = device->machine().driver_data(); - address_space &space = state->generic_space(); - int sample = m72_sample_r(state->m_audio,space,0); + address_space &space = generic_space(); + int sample = m72_sample_r(m_audio,space,0); if (sample) - m72_sample_w(state->m_audio,space,0,sample); + m72_sample_w(m_audio,space,0,sample); } @@ -1843,7 +1841,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( m72, m72_base ) MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_PERIODIC_INT(fake_nmi,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, fake_nmi, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MACHINE_CONFIG_END @@ -1851,7 +1849,7 @@ static MACHINE_CONFIG_DERIVED( m72_8751, m72_base ) MCFG_CPU_ADD("mcu",I8751, MASTER_CLOCK/4) MCFG_CPU_IO_MAP(mcu_io_map) - MCFG_CPU_VBLANK_INT("screen", m72_mcu_int) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m72_state, m72_mcu_int) MACHINE_CONFIG_END @@ -1902,7 +1900,7 @@ static MACHINE_CONFIG_START( xmultipl, m72_state ) MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_rom_map) MCFG_CPU_IO_MAP(rtype2_sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -1943,7 +1941,7 @@ static MACHINE_CONFIG_START( xmultiplm72, m72_state ) MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_ram_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -1984,7 +1982,7 @@ static MACHINE_CONFIG_START( dbreed, m72_state ) MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_rom_map) MCFG_CPU_IO_MAP(rtype2_sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -2025,7 +2023,7 @@ static MACHINE_CONFIG_START( dbreedm72, m72_state ) MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_ram_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -2066,7 +2064,7 @@ static MACHINE_CONFIG_START( rtype2, m72_state ) MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_rom_map) MCFG_CPU_IO_MAP(rtype2_sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -2107,7 +2105,7 @@ static MACHINE_CONFIG_START( majtitle, m72_state ) MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_rom_map) MCFG_CPU_IO_MAP(rtype2_sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -2148,7 +2146,7 @@ static MACHINE_CONFIG_START( hharry, m72_state ) MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_rom_map) MCFG_CPU_IO_MAP(rtype2_sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -2189,7 +2187,7 @@ static MACHINE_CONFIG_START( hharryu, m72_state ) MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_rom_map) MCFG_CPU_IO_MAP(rtype2_sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -2230,7 +2228,7 @@ static MACHINE_CONFIG_START( dkgenm72, m72_state ) MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_ram_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(fake_nmi,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, fake_nmi, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -2271,7 +2269,7 @@ static MACHINE_CONFIG_START( poundfor, m72_state ) MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_rom_map) MCFG_CPU_IO_MAP(poundfor_sound_portmap) - MCFG_CPU_PERIODIC_INT(fake_nmi,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, fake_nmi, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,m72) @@ -2312,7 +2310,7 @@ static MACHINE_CONFIG_START( cosmccop, m72_state ) MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_rom_map) MCFG_CPU_IO_MAP(rtype2_sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ MCFG_MACHINE_START_OVERRIDE(m72_state,kengo) diff --git a/src/mame/drivers/m79amb.c b/src/mame/drivers/m79amb.c index af9ed73df27..7ec11167e88 100644 --- a/src/mame/drivers/m79amb.c +++ b/src/mame/drivers/m79amb.c @@ -79,6 +79,7 @@ public: DECLARE_WRITE8_MEMBER(m79amb_8002_w); DECLARE_DRIVER_INIT(m79amb); UINT32 screen_update_ramtek(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(m79amb_interrupt); }; @@ -202,9 +203,9 @@ static INPUT_PORTS_START( m79amb ) INPUT_PORTS_END -static INTERRUPT_GEN( m79amb_interrupt ) +INTERRUPT_GEN_MEMBER(m79amb_state::m79amb_interrupt) { - device->execute().set_input_line_and_vector(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 ) @@ -212,7 +213,7 @@ static MACHINE_CONFIG_START( m79amb, m79amb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8080, XTAL_19_6608MHz / 10) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", m79amb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m79amb_state, m79amb_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/m90.c b/src/mame/drivers/m90.c index 3219f6d7dfe..4a511a15aa4 100644 --- a/src/mame/drivers/m90.c +++ b/src/mame/drivers/m90.c @@ -677,37 +677,35 @@ static const ym2151_interface dynablsb_ym2151_config = DEVCB_NULL }; -static INTERRUPT_GEN( fake_nmi ) +INTERRUPT_GEN_MEMBER(m90_state::fake_nmi) { - m90_state *state = device->machine().driver_data(); - address_space &space = *device->machine().firstcpu->space(AS_PROGRAM); - int sample = m72_sample_r(state->m_audio,space,0); + address_space &space = *machine().firstcpu->space(AS_PROGRAM); + int sample = m72_sample_r(m_audio,space,0); if (sample) - m72_sample_w(state->m_audio,space,0,sample); + m72_sample_w(m_audio,space,0,sample); } -static INTERRUPT_GEN( bomblord_fake_nmi ) +INTERRUPT_GEN_MEMBER(m90_state::bomblord_fake_nmi) { - m90_state *state = device->machine().driver_data(); - address_space &space = *device->machine().firstcpu->space(AS_PROGRAM); - int sample = m72_sample_r(state->m_audio,space,0); + address_space &space = *machine().firstcpu->space(AS_PROGRAM); + int sample = m72_sample_r(m_audio,space,0); if (sample != 0x80) - m72_sample_w(state->m_audio,space,0,sample); + m72_sample_w(m_audio,space,0,sample); } -static INTERRUPT_GEN( m90_interrupt ) +INTERRUPT_GEN_MEMBER(m90_state::m90_interrupt) { - generic_pulse_irq_line(device, NEC_INPUT_LINE_INTP0, 1); + generic_pulse_irq_line(device.execute(), NEC_INPUT_LINE_INTP0, 1); } -static INTERRUPT_GEN( dynablsb_interrupt ) +INTERRUPT_GEN_MEMBER(m90_state::dynablsb_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x60/4); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x60/4); } -static INTERRUPT_GEN( bomblord_interrupt ) +INTERRUPT_GEN_MEMBER(m90_state::bomblord_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x50/4); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x50/4); } @@ -717,12 +715,12 @@ static MACHINE_CONFIG_START( m90, m90_state ) MCFG_CPU_ADD("maincpu", V35, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(m90_main_cpu_map) MCFG_CPU_IO_MAP(m90_main_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", m90_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m90_state, m90_interrupt) MCFG_CPU_ADD("soundcpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(m90_sound_cpu_map) MCFG_CPU_IO_MAP(m90_sound_cpu_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 128*60) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(m90_state, nmi_line_pulse, 128*60) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ @@ -802,7 +800,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bbmanw, bbmanwj ) MCFG_CPU_MODIFY("soundcpu") MCFG_CPU_IO_MAP(m99_sound_cpu_io_map) - MCFG_CPU_PERIODIC_INT(fake_nmi, 128*60) + MCFG_CPU_PERIODIC_INT_DRIVER(m90_state, fake_nmi, 128*60) MACHINE_CONFIG_END @@ -810,11 +808,11 @@ static MACHINE_CONFIG_DERIVED( bomblord, m90 ) MCFG_CPU_REPLACE("maincpu", V30, 32000000/4) MCFG_CPU_PROGRAM_MAP(bomblord_main_cpu_map) MCFG_CPU_IO_MAP(m90_main_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", bomblord_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m90_state, bomblord_interrupt) MCFG_CPU_MODIFY("soundcpu") MCFG_CPU_IO_MAP(m99_sound_cpu_io_map) - MCFG_CPU_PERIODIC_INT(bomblord_fake_nmi, 128*60) + MCFG_CPU_PERIODIC_INT_DRIVER(m90_state, bomblord_fake_nmi, 128*60) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(10*8, 50*8-1, 17*8, 47*8-1) @@ -828,11 +826,11 @@ static MACHINE_CONFIG_DERIVED( dynablsb, m90 ) MCFG_CPU_REPLACE("maincpu", V30, 32000000/4) MCFG_CPU_PROGRAM_MAP(dynablsb_main_cpu_map) MCFG_CPU_IO_MAP(dynablsb_main_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", dynablsb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", m90_state, dynablsb_interrupt) MCFG_CPU_MODIFY("soundcpu") MCFG_CPU_IO_MAP(dynablsb_sound_cpu_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 64*60) /* half the sample rate of the original */ + MCFG_CPU_PERIODIC_INT_DRIVER(m90_state, irq0_line_hold, 64*60) /* half the sample rate of the original */ MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_SIZE(320, 240) diff --git a/src/mame/drivers/macrossp.c b/src/mame/drivers/macrossp.c index a7c164cd2e0..60b50003081 100644 --- a/src/mame/drivers/macrossp.c +++ b/src/mame/drivers/macrossp.c @@ -623,7 +623,7 @@ static MACHINE_CONFIG_START( macrossp, macrossp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 50000000/2) /* 25 MHz */ MCFG_CPU_PROGRAM_MAP(macrossp_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) // there are others ... + MCFG_CPU_VBLANK_INT_DRIVER("screen", macrossp_state, irq3_line_hold) // there are others ... MCFG_CPU_ADD("audiocpu", M68000, 32000000/2) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(macrossp_sound_map) diff --git a/src/mame/drivers/macs.c b/src/mame/drivers/macs.c index de89939ad60..30573f05ff7 100644 --- a/src/mame/drivers/macs.c +++ b/src/mame/drivers/macs.c @@ -481,7 +481,7 @@ static MACHINE_CONFIG_START( macs, macs_state ) MCFG_CPU_PROGRAM_MAP(macs_mem) MCFG_CPU_IO_MAP(macs_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", macs_state, irq0_line_hold) MCFG_MACHINE_RESET_OVERRIDE(macs_state,macs) diff --git a/src/mame/drivers/madalien.c b/src/mame/drivers/madalien.c index 54313345b40..d663f0d6fc9 100644 --- a/src/mame/drivers/madalien.c +++ b/src/mame/drivers/madalien.c @@ -178,7 +178,7 @@ static MACHINE_CONFIG_START( madalien, madalien_state ) MCFG_CPU_ADD("audiocpu", M6502, SOUND_CLOCK / 8) /* 512kHz */ MCFG_CPU_PROGRAM_MAP(audio_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", madalien_state, nmi_line_pulse) /* video hardware */ MCFG_FRAGMENT_ADD(madalien_video) diff --git a/src/mame/drivers/madmotor.c b/src/mame/drivers/madmotor.c index 8dd7d945551..e5d9ecd8671 100644 --- a/src/mame/drivers/madmotor.c +++ b/src/mame/drivers/madmotor.c @@ -250,7 +250,7 @@ static MACHINE_CONFIG_START( madmotor, madmotor_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* Custom chip 59, 24 MHz crystal */ MCFG_CPU_PROGRAM_MAP(madmotor_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", madmotor_state, irq6_line_hold)/* VBL */ MCFG_CPU_ADD("audiocpu", H6280, 8053000/2) /* Custom chip 45, Crystal near CPU is 8.053 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/magic10.c b/src/mame/drivers/magic10.c index 6484fde69fa..d949bffd41b 100644 --- a/src/mame/drivers/magic10.c +++ b/src/mame/drivers/magic10.c @@ -730,7 +730,7 @@ static MACHINE_CONFIG_START( magic10, magic10_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) // ? MCFG_CPU_PROGRAM_MAP(magic10_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", magic10_state, irq1_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -787,7 +787,7 @@ static MACHINE_CONFIG_DERIVED( sgsafari, magic10 ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(sgsafari_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) /* L1 interrupts */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", magic10_state, irq2_line_hold) /* L1 interrupts */ MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0*8, 44*8-1, 0*8, 30*8-1) diff --git a/src/mame/drivers/magicard.c b/src/mame/drivers/magicard.c index 90966b7bf28..e4b779ba403 100644 --- a/src/mame/drivers/magicard.c +++ b/src/mame/drivers/magicard.c @@ -218,6 +218,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_magicard(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(magicard_irq); }; @@ -708,18 +709,18 @@ void magicard_state::machine_reset() *************************/ /*Probably there's a mask somewhere if it REALLY uses irqs at all...irq vectors dynamically changes after some time.*/ -static INTERRUPT_GEN( magicard_irq ) +INTERRUPT_GEN_MEMBER(magicard_state::magicard_irq) { - if(device->machine().input().code_pressed(KEYCODE_Z)) //vblank? - device->execute().set_input_line_and_vector(1, HOLD_LINE,0xe4/4); - if(device->machine().input().code_pressed(KEYCODE_X)) //uart irq - device->execute().set_input_line_and_vector(1, HOLD_LINE,0xf0/4); + if(machine().input().code_pressed(KEYCODE_Z)) //vblank? + device.execute().set_input_line_and_vector(1, HOLD_LINE,0xe4/4); + if(machine().input().code_pressed(KEYCODE_X)) //uart irq + device.execute().set_input_line_and_vector(1, HOLD_LINE,0xf0/4); } static MACHINE_CONFIG_START( magicard, magicard_state ) MCFG_CPU_ADD("maincpu", SCC68070, CLOCK_A/2) /* SCC-68070 CCA84 datasheet */ MCFG_CPU_PROGRAM_MAP(magicard_mem) - MCFG_CPU_VBLANK_INT("screen", magicard_irq) /* no interrupts? (it erases the vectors..) */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", magicard_state, magicard_irq) /* no interrupts? (it erases the vectors..) */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/magicfly.c b/src/mame/drivers/magicfly.c index 214b2e05315..ba79b03bdad 100644 --- a/src/mame/drivers/magicfly.c +++ b/src/mame/drivers/magicfly.c @@ -804,7 +804,7 @@ static MACHINE_CONFIG_START( magicfly, magicfly_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK/16) /* guess */ MCFG_CPU_PROGRAM_MAP(magicfly_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", magicfly_state, nmi_line_pulse) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c index 09c270fc1ca..110df6bc1d1 100644 --- a/src/mame/drivers/magmax.c +++ b/src/mame/drivers/magmax.c @@ -347,7 +347,7 @@ static MACHINE_CONFIG_START( magmax, magmax_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(magmax_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", magmax_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80,XTAL_20MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(magmax_sound_map) diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c index 6070568321e..c362af2b657 100644 --- a/src/mame/drivers/mainevt.c +++ b/src/mame/drivers/mainevt.c @@ -31,11 +31,10 @@ Notes: #include "includes/konamipt.h" #include "includes/mainevt.h" -static INTERRUPT_GEN( mainevt_interrupt ) +INTERRUPT_GEN_MEMBER(mainevt_state::mainevt_interrupt) { - mainevt_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) + if (k052109_is_irq_enabled(m_k052109)) irq0_line_hold(device); } @@ -44,11 +43,10 @@ WRITE8_MEMBER(mainevt_state::dv_nmienable_w) m_nmi_enable = data; } -static INTERRUPT_GEN( dv_interrupt ) +INTERRUPT_GEN_MEMBER(mainevt_state::dv_interrupt) { - mainevt_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) + if (m_nmi_enable) nmi_line_pulse(device); } @@ -433,20 +431,18 @@ void mainevt_state::machine_reset() m_nmi_enable = 0; } -static INTERRUPT_GEN( mainevt_sound_timer_irq ) +INTERRUPT_GEN_MEMBER(mainevt_state::mainevt_sound_timer_irq) { - mainevt_state *state = device->machine().driver_data(); - if(state->m_sound_irq_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_sound_irq_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( devstors_sound_timer_irq ) +INTERRUPT_GEN_MEMBER(mainevt_state::devstors_sound_timer_irq) { - mainevt_state *state = device->machine().driver_data(); - if(state->m_sound_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_sound_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( mainevt, mainevt_state ) @@ -454,11 +450,11 @@ static MACHINE_CONFIG_START( mainevt, mainevt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* ?? */ MCFG_CPU_PROGRAM_MAP(mainevt_map) - MCFG_CPU_VBLANK_INT("screen", mainevt_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mainevt_state, mainevt_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(mainevt_sound_map) - MCFG_CPU_PERIODIC_INT(mainevt_sound_timer_irq,8*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(mainevt_state, mainevt_sound_timer_irq, 8*60) /* ??? */ /* video hardware */ @@ -512,11 +508,11 @@ static MACHINE_CONFIG_START( devstors, mainevt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* ?? */ MCFG_CPU_PROGRAM_MAP(devstors_map) - MCFG_CPU_VBLANK_INT("screen", dv_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mainevt_state, dv_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(devstors_sound_map) - MCFG_CPU_PERIODIC_INT(devstors_sound_timer_irq,4*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(mainevt_state, devstors_sound_timer_irq, 4*60) /* ??? */ /* video hardware */ diff --git a/src/mame/drivers/mainsnk.c b/src/mame/drivers/mainsnk.c index a1e32fe15bd..02c370b885a 100644 --- a/src/mame/drivers/mainsnk.c +++ b/src/mame/drivers/mainsnk.c @@ -390,12 +390,12 @@ static MACHINE_CONFIG_START( mainsnk, mainsnk_state ) MCFG_CPU_ADD("maincpu", Z80, 3360000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mainsnk_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,4000000) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 244) + MCFG_CPU_PERIODIC_INT_DRIVER(mainsnk_state, irq0_line_hold, 244) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) diff --git a/src/mame/drivers/majorpkr.c b/src/mame/drivers/majorpkr.c index 98b90b696f9..3ce658c1e56 100644 --- a/src/mame/drivers/majorpkr.c +++ b/src/mame/drivers/majorpkr.c @@ -1032,7 +1032,7 @@ static MACHINE_CONFIG_START( majorpkr, majorpkr_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(map) MCFG_CPU_IO_MAP(portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", majorpkr_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/mappy.c b/src/mame/drivers/mappy.c index bac453d357c..4e6d935ff37 100644 --- a/src/mame/drivers/mappy.c +++ b/src/mame/drivers/mappy.c @@ -763,20 +763,19 @@ static TIMER_CALLBACK( superpac_io_run ) } } -static INTERRUPT_GEN( superpac_main_vblank_irq ) +INTERRUPT_GEN_MEMBER(mappy_state::superpac_main_vblank_irq) { - mappy_state *state = device->machine().driver_data(); - device_t *namcoio_1 = device->machine().device("namcoio_1"); - device_t *namcoio_2 = device->machine().device("namcoio_2"); + device_t *namcoio_1 = machine().device("namcoio_1"); + device_t *namcoio_2 = machine().device("namcoio_2"); - if (state->m_main_irq_mask) - device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); + if (m_main_irq_mask) + machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(superpac_io_run)); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(superpac_io_run)); if (!namcoio_read_reset_line(namcoio_2)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(superpac_io_run), 1); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(superpac_io_run), 1); } static TIMER_CALLBACK( pacnpal_io_run ) @@ -795,20 +794,19 @@ static TIMER_CALLBACK( pacnpal_io_run ) } } -static INTERRUPT_GEN( pacnpal_main_vblank_irq ) +INTERRUPT_GEN_MEMBER(mappy_state::pacnpal_main_vblank_irq) { - mappy_state *state = device->machine().driver_data(); - device_t *namcoio_1 = device->machine().device("namcoio_1"); - device_t *namcoio_2 = device->machine().device("namcoio_2"); + device_t *namcoio_1 = machine().device("namcoio_1"); + device_t *namcoio_2 = machine().device("namcoio_2"); - if (state->m_main_irq_mask) - device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); + if (m_main_irq_mask) + machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(pacnpal_io_run)); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(pacnpal_io_run)); if (!namcoio_read_reset_line(namcoio_2)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(pacnpal_io_run), 1); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(pacnpal_io_run), 1); } static TIMER_CALLBACK( phozon_io_run ) @@ -827,20 +825,19 @@ static TIMER_CALLBACK( phozon_io_run ) } } -static INTERRUPT_GEN( phozon_main_vblank_irq ) +INTERRUPT_GEN_MEMBER(mappy_state::phozon_main_vblank_irq) { - mappy_state *state = device->machine().driver_data(); - device_t *namcoio_1 = device->machine().device("namcoio_1"); - device_t *namcoio_2 = device->machine().device("namcoio_2"); + device_t *namcoio_1 = machine().device("namcoio_1"); + device_t *namcoio_2 = machine().device("namcoio_2"); - if (state->m_main_irq_mask) - device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); + if (m_main_irq_mask) + machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(phozon_io_run)); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(phozon_io_run)); if (!namcoio_read_reset_line(namcoio_2)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(phozon_io_run), 1); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(phozon_io_run), 1); } static TIMER_CALLBACK( mappy_io_run ) @@ -859,36 +856,33 @@ static TIMER_CALLBACK( mappy_io_run ) } } -static INTERRUPT_GEN( mappy_main_vblank_irq ) +INTERRUPT_GEN_MEMBER(mappy_state::mappy_main_vblank_irq) { - mappy_state *state = device->machine().driver_data(); - device_t *namcoio_1 = device->machine().device("namcoio_1"); - device_t *namcoio_2 = device->machine().device("namcoio_2"); + device_t *namcoio_1 = machine().device("namcoio_1"); + device_t *namcoio_2 = machine().device("namcoio_2"); - if(state->m_main_irq_mask) - device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); + if(m_main_irq_mask) + machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(mappy_io_run)); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(mappy_io_run)); if (!namcoio_read_reset_line(namcoio_2)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(mappy_io_run), 1); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(mappy_io_run), 1); } -static INTERRUPT_GEN( sub_vblank_irq ) +INTERRUPT_GEN_MEMBER(mappy_state::sub_vblank_irq) { - mappy_state *state = device->machine().driver_data(); - if(state->m_sub_irq_mask) - device->machine().device("sub")->execute().set_input_line(0, ASSERT_LINE); + if(m_sub_irq_mask) + machine().device("sub")->execute().set_input_line(0, ASSERT_LINE); } -static INTERRUPT_GEN( sub2_vblank_irq ) +INTERRUPT_GEN_MEMBER(mappy_state::sub2_vblank_irq) { - mappy_state *state = device->machine().driver_data(); - if(state->m_sub2_irq_mask) - device->machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE); + if(m_sub2_irq_mask) + machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE); } static ADDRESS_MAP_START( superpac_cpu1_map, AS_PROGRAM, 8, mappy_state ) @@ -1631,11 +1625,11 @@ static MACHINE_CONFIG_START( superpac, mappy_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, PIXEL_CLOCK/4) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(superpac_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", superpac_main_vblank_irq) // also update the custom I/O chips + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, superpac_main_vblank_irq) // also update the custom I/O chips MCFG_CPU_ADD("sub", M6809, PIXEL_CLOCK/4) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(superpac_cpu2_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, sub_vblank_irq) MCFG_WATCHDOG_VBLANK_INIT(8) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ @@ -1669,7 +1663,7 @@ static MACHINE_CONFIG_DERIVED( pacnpal, superpac ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", pacnpal_main_vblank_irq) // also update the custom I/O chips + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, pacnpal_main_vblank_irq) // also update the custom I/O chips MCFG_DEVICE_REMOVE("namcoio_1") MCFG_DEVICE_REMOVE("namcoio_2") @@ -1682,7 +1676,7 @@ static MACHINE_CONFIG_DERIVED( grobda, superpac ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", phozon_main_vblank_irq) // also update the custom I/O chips + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, phozon_main_vblank_irq) // also update the custom I/O chips MCFG_DEVICE_REMOVE("namcoio_1") MCFG_DEVICE_REMOVE("namcoio_2") @@ -1700,15 +1694,15 @@ static MACHINE_CONFIG_START( phozon, mappy_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, PIXEL_CLOCK/4) /* MAIN CPU */ MCFG_CPU_PROGRAM_MAP(phozon_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", phozon_main_vblank_irq) // also update the custom I/O chips + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, phozon_main_vblank_irq) // also update the custom I/O chips MCFG_CPU_ADD("sub", M6809, PIXEL_CLOCK/4) /* SOUND CPU */ MCFG_CPU_PROGRAM_MAP(phozon_cpu2_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, sub_vblank_irq) MCFG_CPU_ADD("sub2", M6809, PIXEL_CLOCK/4) /* SUB CPU */ MCFG_CPU_PROGRAM_MAP(phozon_cpu3_map) - MCFG_CPU_VBLANK_INT("screen", sub2_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, sub2_vblank_irq) MCFG_WATCHDOG_VBLANK_INIT(8) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ @@ -1744,11 +1738,11 @@ static MACHINE_CONFIG_START( mappy, mappy_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, PIXEL_CLOCK/4) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(mappy_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", mappy_main_vblank_irq) // also update the custom I/O chips + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, mappy_main_vblank_irq) // also update the custom I/O chips MCFG_CPU_ADD("sub", M6809, PIXEL_CLOCK/4) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(mappy_cpu2_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, sub_vblank_irq) MCFG_WATCHDOG_VBLANK_INIT(8) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ @@ -1782,7 +1776,7 @@ static MACHINE_CONFIG_DERIVED( digdug2, mappy ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", phozon_main_vblank_irq) // also update the custom I/O chips + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, phozon_main_vblank_irq) // also update the custom I/O chips MCFG_WATCHDOG_VBLANK_INIT(0) @@ -1796,7 +1790,7 @@ static MACHINE_CONFIG_DERIVED( todruaga, mappy ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", phozon_main_vblank_irq) // also update the custom I/O chips + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, phozon_main_vblank_irq) // also update the custom I/O chips MCFG_DEVICE_REMOVE("namcoio_1") MCFG_DEVICE_REMOVE("namcoio_2") @@ -1812,7 +1806,7 @@ static MACHINE_CONFIG_DERIVED( motos, mappy ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", superpac_main_vblank_irq) // also update the custom I/O chips + MCFG_CPU_VBLANK_INT_DRIVER("screen", mappy_state, superpac_main_vblank_irq) // also update the custom I/O chips MCFG_DEVICE_REMOVE("namcoio_1") MCFG_DEVICE_REMOVE("namcoio_2") diff --git a/src/mame/drivers/marineb.c b/src/mame/drivers/marineb.c index 4dfe9f9b850..9c40c7c4ba8 100644 --- a/src/mame/drivers/marineb.c +++ b/src/mame/drivers/marineb.c @@ -523,20 +523,18 @@ static GFXDECODE_START( hopprobo ) GFXDECODE_ENTRY( "gfx2", 0x0000, marineb_big_spritelayout, 0, 64 ) GFXDECODE_END -static INTERRUPT_GEN( marineb_vblank_irq ) +INTERRUPT_GEN_MEMBER(marineb_state::marineb_vblank_irq) { - marineb_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_irq_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( wanted_vblank_irq ) +INTERRUPT_GEN_MEMBER(marineb_state::wanted_vblank_irq) { - marineb_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -546,7 +544,7 @@ static MACHINE_CONFIG_START( marineb, marineb_state ) MCFG_CPU_ADD("maincpu", Z80, 3072000) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(marineb_map) MCFG_CPU_IO_MAP(marineb_io_map) - MCFG_CPU_VBLANK_INT("screen", marineb_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", marineb_state, marineb_vblank_irq) /* video hardware */ @@ -606,7 +604,7 @@ static MACHINE_CONFIG_DERIVED( wanted, marineb ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(wanted_io_map) - MCFG_CPU_VBLANK_INT("screen", wanted_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", marineb_state, wanted_vblank_irq) /* video hardware */ MCFG_GFXDECODE(wanted) diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c index 9a0d06df48b..fd2492f26d9 100644 --- a/src/mame/drivers/marinedt.c +++ b/src/mame/drivers/marinedt.c @@ -673,7 +673,7 @@ static MACHINE_CONFIG_START( marinedt, marinedt_state ) MCFG_CPU_ADD("maincpu", Z80,10000000/4) MCFG_CPU_PROGRAM_MAP(marinedt_map) MCFG_CPU_IO_MAP(marinedt_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", marinedt_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/mario.c b/src/mame/drivers/mario.c index 8d6adb98034..3a6d6a1ecab 100644 --- a/src/mame/drivers/mario.c +++ b/src/mame/drivers/mario.c @@ -323,12 +323,11 @@ GFXDECODE_END * *************************************/ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(mario_state::vblank_irq) { - mario_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( mario_base, mario_state ) @@ -337,7 +336,7 @@ static MACHINE_CONFIG_START( mario_base, mario_state ) MCFG_CPU_ADD("maincpu", Z80, Z80_CLOCK) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(mario_map) MCFG_CPU_IO_MAP(mario_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mario_state, vblank_irq) /* devices */ MCFG_Z80DMA_ADD("z80dma", Z80_CLOCK, mario_dma) diff --git a/src/mame/drivers/markham.c b/src/mame/drivers/markham.c index a8ca4d45966..21d8642b0c0 100644 --- a/src/mame/drivers/markham.c +++ b/src/mame/drivers/markham.c @@ -194,11 +194,11 @@ static MACHINE_CONFIG_START( markham, markham_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000/2) /* 4.000MHz */ MCFG_CPU_PROGRAM_MAP(markham_master_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", markham_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,8000000/2) /* 4.000MHz */ MCFG_CPU_PROGRAM_MAP(markham_slave_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", markham_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c index 312e3b59f09..ae88fafd97d 100644 --- a/src/mame/drivers/mastboy.c +++ b/src/mame/drivers/mastboy.c @@ -479,6 +479,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_mastboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mastboy_interrupt); }; @@ -693,12 +694,11 @@ WRITE8_MEMBER(mastboy_state::mastboy_irq0_ack_w) machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE); } -static INTERRUPT_GEN( mastboy_interrupt ) +INTERRUPT_GEN_MEMBER(mastboy_state::mastboy_interrupt) { - mastboy_state *state = device->machine().driver_data(); - if ((state->m_irq0_ack & 1) == 1) + if ((m_irq0_ack & 1) == 1) { - device->execute().set_input_line(0, ASSERT_LINE); + device.execute().set_input_line(0, ASSERT_LINE); } } @@ -888,7 +888,7 @@ static MACHINE_CONFIG_START( mastboy, mastboy_state ) MCFG_CPU_ADD("maincpu", Z180, 12000000/2) /* HD647180X0CP6-1M1R */ MCFG_CPU_PROGRAM_MAP(mastboy_map) MCFG_CPU_IO_MAP(mastboy_io_map) - MCFG_CPU_VBLANK_INT("screen", mastboy_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mastboy_state, mastboy_interrupt) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/matmania.c b/src/mame/drivers/matmania.c index c3a6a5dc6c2..2518f8e59f3 100644 --- a/src/mame/drivers/matmania.c +++ b/src/mame/drivers/matmania.c @@ -309,11 +309,11 @@ static MACHINE_CONFIG_START( matmania, matmania_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 1500000) /* 1.5 MHz ???? */ MCFG_CPU_PROGRAM_MAP(matmania_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", matmania_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", M6502, 1200000) /* 1.2 MHz ???? */ MCFG_CPU_PROGRAM_MAP(matmania_sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,15*60) /* ???? */ + MCFG_CPU_PERIODIC_INT_DRIVER(matmania_state, nmi_line_pulse, 15*60) /* ???? */ /* IRQs are caused by the main CPU */ MCFG_QUANTUM_TIME(attotime::from_hz(600)) @@ -394,7 +394,7 @@ static MACHINE_CONFIG_START( maniach, matmania_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 1500000) /* 1.5 MHz ???? */ MCFG_CPU_PROGRAM_MAP(maniach_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", matmania_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", M6809, 1500000) /* 1.5 MHz ???? */ MCFG_CPU_PROGRAM_MAP(maniach_sound_map) diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c index 4cb3182c99e..5f265c6856c 100644 --- a/src/mame/drivers/maygayv1.c +++ b/src/mame/drivers/maygayv1.c @@ -243,6 +243,7 @@ public: virtual void video_start(); UINT32 screen_update_maygayv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_maygayv1(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(vsync_interrupt); }; @@ -1025,18 +1026,17 @@ void maygayv1_state::machine_reset() } -static INTERRUPT_GEN( vsync_interrupt ) +INTERRUPT_GEN_MEMBER(maygayv1_state::vsync_interrupt) { - maygayv1_state *state = device->machine().driver_data(); - if (state->m_vsync_latch_preset) - device->machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE); + if (m_vsync_latch_preset) + machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE); } static MACHINE_CONFIG_START( maygayv1, maygayv1_state ) MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK / 2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vsync_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", maygayv1_state, vsync_interrupt) MCFG_CPU_ADD("soundcpu", I8052, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_prg) diff --git a/src/mame/drivers/mayumi.c b/src/mame/drivers/mayumi.c index 62696e53196..1681c7e77a1 100644 --- a/src/mame/drivers/mayumi.c +++ b/src/mame/drivers/mayumi.c @@ -46,6 +46,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_mayumi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mayumi_interrupt); }; @@ -86,12 +87,11 @@ UINT32 mayumi_state::screen_update_mayumi(screen_device &screen, bitmap_ind16 &b * *************************************/ -static INTERRUPT_GEN( mayumi_interrupt ) +INTERRUPT_GEN_MEMBER(mayumi_state::mayumi_interrupt) { - mayumi_state *state = device->machine().driver_data(); - if (state->m_int_enable) - device->execute().set_input_line(0, HOLD_LINE); + if (m_int_enable) + device.execute().set_input_line(0, HOLD_LINE); } /************************************* @@ -399,7 +399,7 @@ static MACHINE_CONFIG_START( mayumi, mayumi_state ) MCFG_CPU_ADD("maincpu", Z80, MCLK/2) /* 5.000 MHz ? */ MCFG_CPU_PROGRAM_MAP(mayumi_map) MCFG_CPU_IO_MAP(mayumi_io_map) - MCFG_CPU_VBLANK_INT("screen", mayumi_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mayumi_state, mayumi_interrupt) MCFG_I8255_ADD( "i8255", mayumi_i8255_intf ) diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c index 81513899e83..25d0ea68d2f 100644 --- a/src/mame/drivers/mazerbla.c +++ b/src/mame/drivers/mazerbla.c @@ -145,6 +145,7 @@ public: virtual void palette_init(); UINT32 screen_update_mazerbla(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_test_vcu(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sound_interrupt); }; @@ -1421,9 +1422,9 @@ static IRQ_CALLBACK(irq_callback) } /* frequency is 14.318 MHz/16/16/16/16 */ -static INTERRUPT_GEN( sound_interrupt ) +INTERRUPT_GEN_MEMBER(mazerbla_state::sound_interrupt) { - device->execute().set_input_line(0, ASSERT_LINE); + device.execute().set_input_line(0, ASSERT_LINE); } @@ -1516,7 +1517,7 @@ static MACHINE_CONFIG_START( mazerbla, mazerbla_state ) MCFG_CPU_ADD("sub", Z80, MASTER_CLOCK) /* 4 MHz, NMI, IM1 INT */ MCFG_CPU_PROGRAM_MAP(mazerbla_cpu2_map) MCFG_CPU_IO_MAP(mazerbla_cpu2_io_map) -// MCFG_CPU_PERIODIC_INT(irq0_line_hold, 400 ) /* frequency in Hz */ + MCFG_CPU_PERIODIC_INT_DRIVER(mazerbla_state, irq0_line_hold, 400) /* frequency in Hz */ MCFG_CPU_ADD("sub2", Z80, MASTER_CLOCK) /* 4 MHz, no NMI, IM1 INT */ MCFG_CPU_PROGRAM_MAP(mazerbla_cpu3_map) @@ -1525,7 +1526,7 @@ static MACHINE_CONFIG_START( mazerbla, mazerbla_state ) and cleared on ANY port access. but handled differently for now */ - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mazerbla_state, irq0_line_hold) /* synchronization forced on the fly */ @@ -1553,7 +1554,7 @@ static MACHINE_CONFIG_START( greatgun, mazerbla_state ) MCFG_CPU_ADD("sub", Z80, SOUND_CLOCK / 4) /* 3.579500 MHz, NMI - caused by sound command write, periodic INT */ MCFG_CPU_PROGRAM_MAP(greatgun_sound_map) - MCFG_CPU_PERIODIC_INT(sound_interrupt, (double)14318180/16/16/16/16 ) + MCFG_CPU_PERIODIC_INT_DRIVER(mazerbla_state, sound_interrupt, (double)14318180/16/16/16/16 ) MCFG_CPU_ADD("sub2", Z80, MASTER_CLOCK) /* 4 MHz, no NMI, IM1 INT */ MCFG_CPU_PROGRAM_MAP(mazerbla_cpu3_map) @@ -1562,7 +1563,7 @@ static MACHINE_CONFIG_START( greatgun, mazerbla_state ) and cleared on ANY port access. but handled differently for now */ - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mazerbla_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c index 4f8cf7cd206..3e3987fb73b 100644 --- a/src/mame/drivers/mcatadv.c +++ b/src/mame/drivers/mcatadv.c @@ -444,7 +444,7 @@ static MACHINE_CONFIG_START( mcatadv, mcatadv_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(mcatadv_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mcatadv_state, irq1_line_hold) MCFG_CPU_ADD("soundcpu", Z80, XTAL_16MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(mcatadv_sound_map) diff --git a/src/mame/drivers/mcr68.c b/src/mame/drivers/mcr68.c index 9621e88665d..cdb0953c40a 100644 --- a/src/mame/drivers/mcr68.c +++ b/src/mame/drivers/mcr68.c @@ -965,7 +965,7 @@ static MACHINE_CONFIG_START( zwackery, mcr68_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 7652400) /* should be XTAL_16MHz/2 */ MCFG_CPU_PROGRAM_MAP(zwackery_map) - MCFG_CPU_VBLANK_INT("screen", mcr68_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mcr68_state, mcr68_interrupt) // MCFG_WATCHDOG_VBLANK_INIT(8) MCFG_MACHINE_START_OVERRIDE(mcr68_state,zwackery) @@ -1000,7 +1000,7 @@ static MACHINE_CONFIG_START( mcr68, mcr68_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 7723800) MCFG_CPU_PROGRAM_MAP(mcr68_map) - MCFG_CPU_VBLANK_INT("screen", mcr68_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mcr68_state, mcr68_interrupt) MCFG_WATCHDOG_VBLANK_INIT(8) MCFG_MACHINE_START_OVERRIDE(mcr68_state,mcr68) diff --git a/src/mame/drivers/meadows.c b/src/mame/drivers/meadows.c index 3b29a3e2cf8..64637d25fa0 100644 --- a/src/mame/drivers/meadows.c +++ b/src/mame/drivers/meadows.c @@ -209,12 +209,11 @@ INPUT_CHANGED_MEMBER(meadows_state::coin_inserted) * *************************************/ -static INTERRUPT_GEN( meadows_interrupt ) +INTERRUPT_GEN_MEMBER(meadows_state::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->execute().set_input_line(1, state->m_main_sense_state ? ASSERT_LINE : CLEAR_LINE); + m_main_sense_state ^= 1; + device.execute().set_input_line(1, m_main_sense_state ? ASSERT_LINE : CLEAR_LINE); } @@ -225,11 +224,10 @@ static INTERRUPT_GEN( meadows_interrupt ) * *************************************/ -static INTERRUPT_GEN( minferno_interrupt ) +INTERRUPT_GEN_MEMBER(meadows_state::minferno_interrupt) { - meadows_state *state = device->machine().driver_data(); - state->m_main_sense_state++; - device->execute().set_input_line(1, (state->m_main_sense_state & 0x40) ? ASSERT_LINE : CLEAR_LINE ); + m_main_sense_state++; + device.execute().set_input_line(1, (m_main_sense_state & 0x40) ? ASSERT_LINE : CLEAR_LINE ); } @@ -307,12 +305,11 @@ READ8_MEMBER(meadows_state::audio_hardware_r) * *************************************/ -static INTERRUPT_GEN( audio_interrupt ) +INTERRUPT_GEN_MEMBER(meadows_state::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->execute().set_input_line(1, state->m_audio_sense_state ? ASSERT_LINE : CLEAR_LINE); + m_audio_sense_state ^= 1; + device.execute().set_input_line(1, m_audio_sense_state ? ASSERT_LINE : CLEAR_LINE); } @@ -645,11 +642,11 @@ static MACHINE_CONFIG_START( meadows, meadows_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", S2650, MASTER_CLOCK/8) /* 5MHz / 8 = 625 kHz */ MCFG_CPU_PROGRAM_MAP(meadows_main_map) - MCFG_CPU_VBLANK_INT("screen", meadows_interrupt) /* one interrupt per frame!? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", meadows_state, meadows_interrupt) /* one interrupt per frame!? */ MCFG_CPU_ADD("audiocpu", S2650, MASTER_CLOCK/8) /* 5MHz / 8 = 625 kHz */ MCFG_CPU_PROGRAM_MAP(audio_map) - MCFG_CPU_PERIODIC_INT(audio_interrupt, (double)5000000/131072) + MCFG_CPU_PERIODIC_INT_DRIVER(meadows_state, audio_interrupt, (double)5000000/131072) MCFG_QUANTUM_TIME(attotime::from_hz(600)) @@ -681,7 +678,7 @@ static MACHINE_CONFIG_START( minferno, meadows_state ) MCFG_CPU_ADD("maincpu", S2650, MASTER_CLOCK/24) /* 5MHz / 8 / 3 = 208.33 kHz */ MCFG_CPU_PROGRAM_MAP(minferno_main_map) MCFG_CPU_IO_MAP(minferno_io_map) - MCFG_CPU_VBLANK_INT("screen", minferno_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", meadows_state, minferno_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -702,11 +699,11 @@ static MACHINE_CONFIG_START( bowl3d, meadows_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", S2650, MASTER_CLOCK/8) /* 5MHz / 8 = 625 kHz */ MCFG_CPU_PROGRAM_MAP(bowl3d_main_map) - MCFG_CPU_VBLANK_INT("screen", meadows_interrupt) /* one interrupt per frame!? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", meadows_state, meadows_interrupt) /* one interrupt per frame!? */ MCFG_CPU_ADD("audiocpu", S2650, MASTER_CLOCK/8) /* 5MHz / 8 = 625 kHz */ MCFG_CPU_PROGRAM_MAP(audio_map) - MCFG_CPU_PERIODIC_INT(audio_interrupt, (double)5000000/131072) + MCFG_CPU_PERIODIC_INT_DRIVER(meadows_state, audio_interrupt, (double)5000000/131072) MCFG_QUANTUM_TIME(attotime::from_hz(600)) diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c index f464c75b718..2cde07a4bb1 100644 --- a/src/mame/drivers/megasys1.c +++ b/src/mame/drivers/megasys1.c @@ -292,9 +292,9 @@ ADDRESS_MAP_END [ Main CPU - System D ] ***************************************************************************/ -static INTERRUPT_GEN( megasys1D_irq ) +INTERRUPT_GEN_MEMBER(megasys1_state::megasys1D_irq) { - device->execute().set_input_line(2, HOLD_LINE); + device.execute().set_input_line(2, HOLD_LINE); } static ADDRESS_MAP_START( megasys1D_map, AS_PROGRAM, 16, megasys1_state ) @@ -1603,7 +1603,7 @@ static MACHINE_CONFIG_START( system_D, megasys1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, SYS_D_CPU_CLOCK) /* 8MHz */ MCFG_CPU_PROGRAM_MAP(megasys1D_map) - MCFG_CPU_VBLANK_INT("screen", megasys1D_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", megasys1_state, megasys1D_irq) MCFG_MACHINE_RESET_OVERRIDE(megasys1_state,megasys1) diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c index 9c8e83443d6..fc8afc4a225 100644 --- a/src/mame/drivers/megazone.c +++ b/src/mame/drivers/megazone.c @@ -244,12 +244,11 @@ void megazone_state::machine_reset() m_i8039_status = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(megazone_state::vblank_irq) { - megazone_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -258,12 +257,12 @@ static MACHINE_CONFIG_START( megazone, megazone_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 18432000/9) /* 2 MHz */ MCFG_CPU_PROGRAM_MAP(megazone_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", megazone_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,18432000/6) /* Z80 Clock is derived from the H1 signal */ MCFG_CPU_PROGRAM_MAP(megazone_sound_map) MCFG_CPU_IO_MAP(megazone_sound_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", megazone_state, irq0_line_hold) MCFG_CPU_ADD("daccpu", I8039,14318000/2) /* 1/2 14MHz crystal */ MCFG_CPU_PROGRAM_MAP(megazone_i8039_map) diff --git a/src/mame/drivers/meijinsn.c b/src/mame/drivers/meijinsn.c index 18a5dfe9f3b..d0ae18a9440 100644 --- a/src/mame/drivers/meijinsn.c +++ b/src/mame/drivers/meijinsn.c @@ -362,7 +362,7 @@ static MACHINE_CONFIG_START( meijinsn, meijinsn_state ) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(meijinsn_sound_map) MCFG_CPU_IO_MAP(meijinsn_sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 160*60) + MCFG_CPU_PERIODIC_INT_DRIVER(meijinsn_state, irq0_line_hold, 160*60) /* video hardware */ diff --git a/src/mame/drivers/mermaid.c b/src/mame/drivers/mermaid.c index 8a51fd59b5e..b8e029e61e6 100644 --- a/src/mame/drivers/mermaid.c +++ b/src/mame/drivers/mermaid.c @@ -439,12 +439,11 @@ static const msm5205_interface msm5205_config = }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(mermaid_state::vblank_irq) { - mermaid_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( mermaid, mermaid_state ) @@ -452,7 +451,7 @@ static MACHINE_CONFIG_START( mermaid, mermaid_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) // ??? MCFG_CPU_PROGRAM_MAP(mermaid_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mermaid_state, vblank_irq) /* video hardware */ diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c index 40f39f0a542..e9a979b688b 100644 --- a/src/mame/drivers/metro.c +++ b/src/mame/drivers/metro.c @@ -187,20 +187,18 @@ WRITE16_MEMBER(metro_state::metro_irq_cause_w) update_irq_state(machine()); } -static INTERRUPT_GEN( metro_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(metro_state::metro_vblank_interrupt) { - metro_state *state = device->machine().driver_data(); - state->m_requested_int[state->m_vblank_bit] = 1; - update_irq_state(device->machine()); + m_requested_int[m_vblank_bit] = 1; + update_irq_state(machine()); } -static INTERRUPT_GEN( metro_periodic_interrupt ) +INTERRUPT_GEN_MEMBER(metro_state::metro_periodic_interrupt) { - metro_state *state = device->machine().driver_data(); - state->m_requested_int[4] = 1; - update_irq_state(device->machine()); + m_requested_int[4] = 1; + update_irq_state(machine()); } static TIMER_CALLBACK( karatour_irq_callback ) @@ -210,17 +208,16 @@ static TIMER_CALLBACK( karatour_irq_callback ) } /* lev 2-7 (lev 1 seems sound related) */ -static INTERRUPT_GEN( karatour_interrupt ) +INTERRUPT_GEN_MEMBER(metro_state::karatour_interrupt) { - metro_state *state = device->machine().driver_data(); - state->m_requested_int[state->m_vblank_bit] = 1; + m_requested_int[m_vblank_bit] = 1; /* write to scroll registers, the duration is a guess */ - device->machine().scheduler().timer_set(attotime::from_usec(2500), FUNC(karatour_irq_callback)); - state->m_requested_int[5] = 1; + machine().scheduler().timer_set(attotime::from_usec(2500), FUNC(karatour_irq_callback)); + m_requested_int[5] = 1; - update_irq_state(device->machine()); + update_irq_state(machine()); } static TIMER_CALLBACK( mouja_irq_callback ) @@ -238,14 +235,13 @@ WRITE16_MEMBER(metro_state::mouja_irq_timer_ctrl_w) m_mouja_irq_timer->adjust(attotime::zero, 0, attotime::from_hz(freq)); } -static INTERRUPT_GEN( puzzlet_interrupt ) +INTERRUPT_GEN_MEMBER(metro_state::puzzlet_interrupt) { - metro_state *state = device->machine().driver_data(); - state->m_requested_int[state->m_vblank_bit] = 1; - update_irq_state(device->machine()); + m_requested_int[m_vblank_bit] = 1; + update_irq_state(machine()); - state->m_maincpu->set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); + m_maincpu->set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); } static void ymf278b_interrupt( device_t *device, int active ) @@ -3421,8 +3417,8 @@ static MACHINE_CONFIG_START( balcube, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(balcube_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3455,8 +3451,8 @@ static MACHINE_CONFIG_START( daitoa, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(daitoa_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3489,8 +3485,8 @@ static MACHINE_CONFIG_START( msgogo, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(msgogo_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) // timing is off, shaking sprites in intro - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) // timing is off, shaking sprites in intro + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 60) // ? MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3523,8 +3519,8 @@ static MACHINE_CONFIG_START( bangball, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(bangball_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 60) // ? MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3557,8 +3553,8 @@ static MACHINE_CONFIG_START( batlbubl, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(batlbubl_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 60) // ? MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3590,8 +3586,8 @@ static MACHINE_CONFIG_START( daitorid, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(daitorid_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_12MHz) MCFG_CPU_CONFIG(metro_cpu_config) @@ -3633,8 +3629,8 @@ static MACHINE_CONFIG_START( dharma, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(dharma_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -3675,8 +3671,8 @@ static MACHINE_CONFIG_START( karatour, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(karatour_map) - MCFG_CPU_VBLANK_INT("screen", karatour_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, karatour_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -3717,8 +3713,8 @@ static MACHINE_CONFIG_START( 3kokushi, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(kokushi_map) - MCFG_CPU_VBLANK_INT("screen", karatour_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, karatour_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -3759,8 +3755,8 @@ static MACHINE_CONFIG_START( lastfort, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(lastfort_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -3800,8 +3796,8 @@ static MACHINE_CONFIG_START( lastforg, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(lastforg_map) - MCFG_CPU_VBLANK_INT("screen", karatour_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, karatour_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -3841,7 +3837,7 @@ static MACHINE_CONFIG_START( dokyusei, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(dokyusei_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3876,7 +3872,7 @@ static MACHINE_CONFIG_START( dokyusp, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(dokyusp_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3913,7 +3909,7 @@ static MACHINE_CONFIG_START( gakusai, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 26.6660MHz/2?, OSCs listed are 26.6660MHz & 3.579545MHz */ MCFG_CPU_PROGRAM_MAP(gakusai_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3950,7 +3946,7 @@ static MACHINE_CONFIG_START( gakusai2, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 26.6660MHz/2?, OSCs listed are 26.6660MHz & 3.579545MHz */ MCFG_CPU_PROGRAM_MAP(gakusai2_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -3987,8 +3983,8 @@ static MACHINE_CONFIG_START( pangpoms, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(pangpoms_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -4029,8 +4025,8 @@ static MACHINE_CONFIG_START( poitto, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(poitto_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -4071,8 +4067,8 @@ static MACHINE_CONFIG_START( pururun, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* Not confirmed */ MCFG_CPU_PROGRAM_MAP(pururun_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) /* Not confiremd */ MCFG_CPU_CONFIG(metro_cpu_config) @@ -4114,8 +4110,8 @@ static MACHINE_CONFIG_START( skyalert, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(skyalert_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -4156,8 +4152,8 @@ static MACHINE_CONFIG_START( toride2g, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(toride2g_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2) MCFG_CPU_CONFIG(metro_cpu_config) @@ -4198,7 +4194,7 @@ static MACHINE_CONFIG_START( mouja, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(mouja_map) - MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt) MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) @@ -4238,8 +4234,8 @@ static MACHINE_CONFIG_START( blzntrnd, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(blzntrnd_map) - MCFG_CPU_VBLANK_INT("screen", karatour_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, karatour_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/2) MCFG_CPU_PROGRAM_MAP(blzntrnd_sound_map) @@ -4286,8 +4282,8 @@ static MACHINE_CONFIG_START( gstrik2, metro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(blzntrnd_map) - MCFG_CPU_VBLANK_INT("screen", karatour_interrupt) - MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ? + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, karatour_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ? MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/2) MCFG_CPU_PROGRAM_MAP(blzntrnd_sound_map) @@ -4329,7 +4325,7 @@ static MACHINE_CONFIG_START( puzzlet, metro_state ) MCFG_CPU_ADD("maincpu", H83007, XTAL_20MHz) // H8/3007 - Hitachi HD6413007F20 CPU. Clock 20MHz MCFG_CPU_PROGRAM_MAP(puzzlet_map) MCFG_CPU_IO_MAP(puzzlet_io_map) - MCFG_CPU_VBLANK_INT("screen", puzzlet_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, puzzlet_interrupt) MCFG_MACHINE_START_OVERRIDE(metro_state,metro) MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro) diff --git a/src/mame/drivers/mexico86.c b/src/mame/drivers/mexico86.c index 5e1b2710c62..d05358b4abb 100644 --- a/src/mame/drivers/mexico86.c +++ b/src/mame/drivers/mexico86.c @@ -477,15 +477,15 @@ static MACHINE_CONFIG_START( mexico86, mexico86_state ) MCFG_CPU_ADD("audiocpu", Z80, 24000000/4) /* 6 MHz, Uses clock divided 24MHz OSC */ MCFG_CPU_PROGRAM_MAP(mexico86_sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mexico86_state, irq0_line_hold) MCFG_CPU_ADD("mcu", M68705, 4000000) /* xtal is 4MHz, divided by 4 internally */ MCFG_CPU_PROGRAM_MAP(mexico86_m68705_map) - MCFG_CPU_VBLANK_INT("screen",mexico86_m68705_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mexico86_state, mexico86_m68705_interrupt) MCFG_CPU_ADD("sub", Z80, 8000000/2) /* 4 MHz, Uses 8Mhz OSC */ MCFG_CPU_PROGRAM_MAP(mexico86_sub_cpu_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mexico86_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs */ @@ -532,7 +532,7 @@ static MACHINE_CONFIG_DERIVED( kikikai, knightb ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", kikikai_interrupt) // IRQs should be triggered by the MCU, but we don't have it + MCFG_CPU_VBLANK_INT_DRIVER("screen", mexico86_state, kikikai_interrupt) // IRQs should be triggered by the MCU, but we don't have it MCFG_DEVICE_REMOVE("mcu") // we don't have code for the MC6801U4 diff --git a/src/mame/drivers/micro3d.c b/src/mame/drivers/micro3d.c index 123f735748c..efaf9043bdd 100644 --- a/src/mame/drivers/micro3d.c +++ b/src/mame/drivers/micro3d.c @@ -335,7 +335,7 @@ static MACHINE_CONFIG_START( micro3d, micro3d_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz / 2) MCFG_CPU_PROGRAM_MAP(hostmem) - MCFG_CPU_VBLANK_INT("screen", micro3d_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", micro3d_state, micro3d_vblank) MCFG_CPU_ADD("vgb", TMS34010, XTAL_40MHz) MCFG_CPU_CONFIG(vgb_config) diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c index f15e56108b5..8f0035cc422 100644 --- a/src/mame/drivers/midas.c +++ b/src/mame/drivers/midas.c @@ -701,7 +701,7 @@ static MACHINE_CONFIG_START( livequiz, midas_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz / 2) MCFG_CPU_PROGRAM_MAP(livequiz_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", midas_state, irq1_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") @@ -730,7 +730,7 @@ static MACHINE_CONFIG_START( hammer, midas_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz / 2) MCFG_CPU_PROGRAM_MAP(hammer_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", midas_state, irq1_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c index b18ff612cb5..e98fa5cf497 100644 --- a/src/mame/drivers/midzeus.c +++ b/src/mame/drivers/midzeus.c @@ -111,10 +111,10 @@ static TIMER_CALLBACK( display_irq_off ) machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE); } -static INTERRUPT_GEN( display_irq ) +INTERRUPT_GEN_MEMBER(midzeus_state::display_irq) { - device->execute().set_input_line(0, ASSERT_LINE); - device->machine().scheduler().timer_set(attotime::from_hz(30000000), FUNC(display_irq_off)); + device.execute().set_input_line(0, ASSERT_LINE); + machine().scheduler().timer_set(attotime::from_hz(30000000), FUNC(display_irq_off)); } @@ -1091,7 +1091,7 @@ static MACHINE_CONFIG_START( midzeus, midzeus_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", TMS32032, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(zeus_map) - MCFG_CPU_VBLANK_INT("screen", display_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", midzeus_state, display_irq) MCFG_MACHINE_START_OVERRIDE(midzeus_state,midzeus) MCFG_MACHINE_RESET_OVERRIDE(midzeus_state,midzeus) @@ -1131,7 +1131,7 @@ static MACHINE_CONFIG_START( midzeus2, midzeus_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", TMS32032, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(zeus2_map) - MCFG_CPU_VBLANK_INT("screen", display_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", midzeus_state, display_irq) MCFG_MACHINE_START_OVERRIDE(midzeus_state,midzeus) MCFG_MACHINE_RESET_OVERRIDE(midzeus_state,midzeus) diff --git a/src/mame/drivers/mikie.c b/src/mame/drivers/mikie.c index 2629b97cf33..dd0425a118b 100644 --- a/src/mame/drivers/mikie.c +++ b/src/mame/drivers/mikie.c @@ -264,12 +264,11 @@ void mikie_state::machine_reset() m_last_irq = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(mikie_state::vblank_irq) { - mikie_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( mikie, mikie_state ) @@ -277,7 +276,7 @@ static MACHINE_CONFIG_START( mikie, mikie_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, OSC/12) MCFG_CPU_PROGRAM_MAP(mikie_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mikie_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, CLK) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/mil4000.c b/src/mame/drivers/mil4000.c index 437b78c3ed6..8976dffc431 100644 --- a/src/mame/drivers/mil4000.c +++ b/src/mame/drivers/mil4000.c @@ -372,7 +372,7 @@ static MACHINE_CONFIG_START( mil4000, mil4000_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000 ) // ? MCFG_CPU_PROGRAM_MAP(mil4000_map) // irq 2/4/5 point to the same place, others invalid - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mil4000_state, irq5_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/miniboy7.c b/src/mame/drivers/miniboy7.c index f2a40d9963d..0c27444e1f7 100644 --- a/src/mame/drivers/miniboy7.c +++ b/src/mame/drivers/miniboy7.c @@ -451,7 +451,7 @@ static MACHINE_CONFIG_START( miniboy7, miniboy7_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK/16) /* guess */ MCFG_CPU_PROGRAM_MAP(miniboy7_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", miniboy7_state, nmi_line_pulse) MCFG_NVRAM_ADD_0FILL("nvram") MCFG_PIA6821_ADD("pia0", miniboy7_pia0_intf) diff --git a/src/mame/drivers/minivadr.c b/src/mame/drivers/minivadr.c index b0d86356f83..14157cc015e 100644 --- a/src/mame/drivers/minivadr.c +++ b/src/mame/drivers/minivadr.c @@ -83,7 +83,7 @@ static MACHINE_CONFIG_START( minivadr, minivadr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,24000000 / 6) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(minivadr_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", minivadr_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c index 54f9491c84a..e9dc24e734b 100644 --- a/src/mame/drivers/mirage.c +++ b/src/mame/drivers/mirage.c @@ -320,7 +320,7 @@ static MACHINE_CONFIG_START( mirage, miragemi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 28000000/2) MCFG_CPU_PROGRAM_MAP(mirage_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", miragemi_state, irq6_line_hold) /* video hardware */ diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c index 4c9aafa129f..70f4f879673 100644 --- a/src/mame/drivers/mirax.c +++ b/src/mame/drivers/mirax.c @@ -130,6 +130,7 @@ public: DECLARE_DRIVER_INIT(mirax); virtual void palette_init(); UINT32 screen_update_mirax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mirax_vblank_irq); }; @@ -444,21 +445,20 @@ static GFXDECODE_START( mirax ) GFXDECODE_END -static INTERRUPT_GEN( mirax_vblank_irq ) +INTERRUPT_GEN_MEMBER(mirax_state::mirax_vblank_irq) { - mirax_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( mirax, mirax_state ) MCFG_CPU_ADD("maincpu", Z80, 12000000/4) // ceramic potted module, encrypted z80 MCFG_CPU_PROGRAM_MAP(mirax_main_map) - MCFG_CPU_VBLANK_INT("screen",mirax_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mirax_state, mirax_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, 12000000/4) MCFG_CPU_PROGRAM_MAP(mirax_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(mirax_state, irq0_line_hold, 4*60) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c index 99f44157a19..a0797683ca9 100644 --- a/src/mame/drivers/missb2.c +++ b/src/mame/drivers/missb2.c @@ -39,6 +39,7 @@ public: DECLARE_MACHINE_START(missb2); DECLARE_MACHINE_RESET(missb2); UINT32 screen_update_missb2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(missb2_interrupt); }; @@ -428,9 +429,9 @@ static const ym3526_interface ym3526_config = /* Interrupt Generator */ -static INTERRUPT_GEN( missb2_interrupt ) +INTERRUPT_GEN_MEMBER(missb2_state::missb2_interrupt) { - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } /* Machine Driver */ @@ -462,16 +463,16 @@ static MACHINE_CONFIG_START( missb2, missb2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MAIN_XTAL/4) // 6 MHz MCFG_CPU_PROGRAM_MAP(master_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", missb2_state, irq0_line_hold) MCFG_CPU_ADD("slave", Z80, MAIN_XTAL/4) // 6 MHz MCFG_CPU_PROGRAM_MAP(slave_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", missb2_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, MAIN_XTAL/8) // 3 MHz MCFG_CPU_PROGRAM_MAP(sound_map) -// MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) - MCFG_CPU_VBLANK_INT("screen", missb2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", missb2_state, irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", missb2_state, missb2_interrupt) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c index 06686a6dc48..facbe8f6234 100644 --- a/src/mame/drivers/mitchell.c +++ b/src/mame/drivers/mitchell.c @@ -1225,15 +1225,15 @@ static MACHINE_CONFIG_DERIVED( spangbl, pang ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(spangbl_map) MCFG_CPU_IO_MAP(spangbl_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mitchell_state, irq0_line_hold) MCFG_DEVICE_REMOVE("scantimer") MCFG_CPU_ADD("audiocpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(spangbl_sound_map) MCFG_CPU_IO_MAP(spangbl_sound_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) -// MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mitchell_state, irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mitchell_state, nmi_line_pulse) MCFG_GFXDECODE(spangbl) @@ -1252,7 +1252,7 @@ static MACHINE_CONFIG_START( mstworld, mitchell_state ) MCFG_CPU_ADD("maincpu", Z80, 6000000*4) MCFG_CPU_PROGRAM_MAP(mitchell_map) MCFG_CPU_IO_MAP(mstworld_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mitchell_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,6000000) /* 6 MHz? */ MCFG_CPU_PROGRAM_MAP(mstworld_sound_map) diff --git a/src/mame/drivers/mjkjidai.c b/src/mame/drivers/mjkjidai.c index 04659ec9ccd..0dcb4f822da 100644 --- a/src/mame/drivers/mjkjidai.c +++ b/src/mame/drivers/mjkjidai.c @@ -414,12 +414,11 @@ static GFXDECODE_START( mjkjidai ) GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 0, 16 ) GFXDECODE_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(mjkjidai_state::vblank_irq) { - mjkjidai_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -446,7 +445,7 @@ static MACHINE_CONFIG_START( mjkjidai, mjkjidai_state ) MCFG_CPU_ADD("maincpu", Z80,10000000/2) /* 5 MHz ??? */ MCFG_CPU_PROGRAM_MAP(mjkjidai_map) MCFG_CPU_IO_MAP(mjkjidai_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mjkjidai_state, vblank_irq) MCFG_NVRAM_HANDLER(mjkjidai) diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c index 80200fb0c47..5d604f66d5e 100644 --- a/src/mame/drivers/mjsister.c +++ b/src/mame/drivers/mjsister.c @@ -499,7 +499,7 @@ static MACHINE_CONFIG_START( mjsister, mjsister_state ) MCFG_CPU_ADD("maincpu", Z80, MCLK/2) /* 6.000 MHz */ MCFG_CPU_PROGRAM_MAP(mjsister_map) MCFG_CPU_IO_MAP(mjsister_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(mjsister_state, irq0_line_hold, 2*60) /* video hardware */ diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c index 44bd7445ebb..5b761a7228d 100644 --- a/src/mame/drivers/mlanding.c +++ b/src/mame/drivers/mlanding.c @@ -768,18 +768,18 @@ static MACHINE_CONFIG_START( mlanding, mlanding_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000 ) /* 12 MHz ??? (guess) */ MCFG_CPU_PROGRAM_MAP(mlanding_mem) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mlanding_state, irq6_line_hold) MCFG_CPU_ADD("sub", M68000, 12000000 ) /* 12 MHz ??? (guess) */ MCFG_CPU_PROGRAM_MAP(mlanding_sub_mem) - MCFG_CPU_PERIODIC_INT(irq6_line_hold,7*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(mlanding_state, irq6_line_hold, 7*60) /* ??? */ MCFG_CPU_ADD("audiocpu", Z80, 4000000 ) /* 4 MHz ??? (guess) */ MCFG_CPU_PROGRAM_MAP(mlanding_z80_mem) MCFG_CPU_ADD("z80sub", Z80, 4000000 ) /* 4 MHz ??? (guess) */ MCFG_CPU_PROGRAM_MAP(mlanding_z80_sub_mem) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mlanding_state, irq0_line_hold) MCFG_CPU_ADD("dsp", TMS32025,12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(DSP_map_program) diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index ae3de414bb6..712c67c7c88 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -2111,7 +2111,7 @@ static MACHINE_CONFIG_DERIVED( srallyc, model2a ) MCFG_CPU_ADD("drivecpu", Z80, 16000000/4) //??? MCFG_CPU_PROGRAM_MAP(drive_map) MCFG_CPU_IO_MAP(drive_io_map) -// MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", model2_state, irq0_line_hold) MACHINE_CONFIG_END static const sharc_config sharc_cfg = diff --git a/src/mame/drivers/mogura.c b/src/mame/drivers/mogura.c index 79aafc18472..bae40604d0b 100644 --- a/src/mame/drivers/mogura.c +++ b/src/mame/drivers/mogura.c @@ -204,7 +204,7 @@ static MACHINE_CONFIG_START( mogura, mogura_state ) MCFG_CPU_ADD("maincpu", Z80,3000000) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(mogura_map) MCFG_CPU_IO_MAP(mogura_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mogura_state, irq0_line_hold) MCFG_GFXDECODE(mogura) diff --git a/src/mame/drivers/mole.c b/src/mame/drivers/mole.c index 3d96b5abe69..6041fab0b93 100644 --- a/src/mame/drivers/mole.c +++ b/src/mame/drivers/mole.c @@ -316,7 +316,7 @@ static MACHINE_CONFIG_START( mole, mole_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 4000000) // ??? MCFG_CPU_PROGRAM_MAP(mole_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mole_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/momoko.c b/src/mame/drivers/momoko.c index c053fb7b04b..06c8c4925f4 100644 --- a/src/mame/drivers/momoko.c +++ b/src/mame/drivers/momoko.c @@ -263,7 +263,7 @@ static MACHINE_CONFIG_START( momoko, momoko_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 5.0MHz */ MCFG_CPU_PROGRAM_MAP(momoko_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", momoko_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 2500000) /* 2.5MHz */ MCFG_CPU_PROGRAM_MAP(momoko_sound_map) diff --git a/src/mame/drivers/monzagp.c b/src/mame/drivers/monzagp.c index 29889c3125f..92bbbb740e0 100644 --- a/src/mame/drivers/monzagp.c +++ b/src/mame/drivers/monzagp.c @@ -259,7 +259,7 @@ static MACHINE_CONFIG_START( monzagp, monzagp_state ) MCFG_CPU_ADD("maincpu", I8035, 12000000/32) /* 400KHz ??? - Main board Crystal is 12MHz */ MCFG_CPU_PROGRAM_MAP(monzagp_map) MCFG_CPU_IO_MAP(monzagp_io) - MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", monzagp_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c index 4e857bf98a9..b919e23cca5 100644 --- a/src/mame/drivers/moo.c +++ b/src/mame/drivers/moo.c @@ -125,32 +125,30 @@ static TIMER_CALLBACK( dmaend_callback ) state->m_maincpu->set_input_line(4, HOLD_LINE); } -static INTERRUPT_GEN( moo_interrupt ) +INTERRUPT_GEN_MEMBER(moo_state::moo_interrupt) { - moo_state *state = device->machine().driver_data(); - if (k053246_is_irq_enabled(state->m_k053246)) + if (k053246_is_irq_enabled(m_k053246)) { - moo_objdma(device->machine(), state->m_game_type); + moo_objdma(machine(), m_game_type); // schedule DMA end interrupt (delay shortened to catch up with V-blank) - state->m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); + m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); } // trigger V-blank interrupt - if (state->m_cur_control2 & 0x20) - device->execute().set_input_line(5, HOLD_LINE); + if (m_cur_control2 & 0x20) + device.execute().set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( moobl_interrupt ) +INTERRUPT_GEN_MEMBER(moo_state::moobl_interrupt) { - moo_state *state = device->machine().driver_data(); - moo_objdma(device->machine(), state->m_game_type); + moo_objdma(machine(), m_game_type); // schedule DMA end interrupt (delay shortened to catch up with V-blank) - state->m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); + m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); // trigger V-blank interrupt - device->execute().set_input_line(5, HOLD_LINE); + device.execute().set_input_line(5, HOLD_LINE); } WRITE16_MEMBER(moo_state::sound_cmd1_w) @@ -515,7 +513,7 @@ static MACHINE_CONFIG_START( moo, moo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(moo_map) - MCFG_CPU_VBLANK_INT("screen", moo_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", moo_state, moo_interrupt) MCFG_CPU_ADD("soundcpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -563,7 +561,7 @@ static MACHINE_CONFIG_START( moobl, moo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16100000) MCFG_CPU_PROGRAM_MAP(moobl_map) - MCFG_CPU_VBLANK_INT("screen", moobl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", moo_state, moobl_interrupt) MCFG_MACHINE_START_OVERRIDE(moo_state,moo) MCFG_MACHINE_RESET_OVERRIDE(moo_state,moo) diff --git a/src/mame/drivers/mosaic.c b/src/mame/drivers/mosaic.c index 2f19198031c..16093ef4268 100644 --- a/src/mame/drivers/mosaic.c +++ b/src/mame/drivers/mosaic.c @@ -267,7 +267,7 @@ static MACHINE_CONFIG_START( mosaic, mosaic_state ) MCFG_CPU_ADD("maincpu", Z180, 7000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(mosaic_map) MCFG_CPU_IO_MAP(mosaic_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mosaic_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/mouser.c b/src/mame/drivers/mouser.c index fe4c2b6a112..c3fbda381f0 100644 --- a/src/mame/drivers/mouser.c +++ b/src/mame/drivers/mouser.c @@ -25,11 +25,10 @@ WRITE8_MEMBER(mouser_state::mouser_nmi_enable_w) m_nmi_enable = data; } -static INTERRUPT_GEN( mouser_nmi_interrupt ) +INTERRUPT_GEN_MEMBER(mouser_state::mouser_nmi_interrupt) { - mouser_state *state = device->machine().driver_data(); - if (BIT(state->m_nmi_enable, 0)) + if (BIT(m_nmi_enable, 0)) nmi_line_pulse(device); } @@ -54,11 +53,10 @@ WRITE8_MEMBER(mouser_state::mouser_sound_nmi_clear_w) m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -static INTERRUPT_GEN( mouser_sound_nmi_assert ) +INTERRUPT_GEN_MEMBER(mouser_state::mouser_sound_nmi_assert) { - mouser_state *state = device->machine().driver_data(); - if (BIT(state->m_nmi_enable, 0)) - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + if (BIT(m_nmi_enable, 0)) + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } static ADDRESS_MAP_START( mouser_map, AS_PROGRAM, 8, mouser_state ) @@ -205,12 +203,12 @@ static MACHINE_CONFIG_START( mouser, mouser_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(mouser_map) - MCFG_CPU_VBLANK_INT("screen", mouser_nmi_interrupt) /* NMI is masked externally */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", mouser_state, mouser_nmi_interrupt) /* NMI is masked externally */ MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ??? */ MCFG_CPU_PROGRAM_MAP(mouser_sound_map) MCFG_CPU_IO_MAP(mouser_sound_io_map) - MCFG_CPU_PERIODIC_INT(mouser_sound_nmi_assert, 4*60) /* ??? This controls the sound tempo */ + MCFG_CPU_PERIODIC_INT_DRIVER(mouser_state, mouser_sound_nmi_assert, 4*60) /* ??? This controls the sound tempo */ /* video hardware */ diff --git a/src/mame/drivers/mpoker.c b/src/mame/drivers/mpoker.c index 7be7527c9dd..145414fa11e 100644 --- a/src/mame/drivers/mpoker.c +++ b/src/mame/drivers/mpoker.c @@ -586,7 +586,7 @@ static MACHINE_CONFIG_START( mpoker, mpoker_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,MASTER_CLOCK/6) /* 3 MHz? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mpoker_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/mpu4plasma.c b/src/mame/drivers/mpu4plasma.c index d908c29d5f1..1daadcfa8c9 100644 --- a/src/mame/drivers/mpu4plasma.c +++ b/src/mame/drivers/mpu4plasma.c @@ -87,7 +87,7 @@ UINT32 mpu4plasma_state::screen_update_mpu4plasma(screen_device &screen, bitmap_ MACHINE_CONFIG_DERIVED_CLASS( mpu4plasma , mod2, mpu4plasma_state ) MCFG_CPU_ADD("plasmacpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(mpu4plasma_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mpu4plasma_state, irq4_line_hold) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/mrdo.c b/src/mame/drivers/mrdo.c index 0bf17f4204d..434bb086f85 100644 --- a/src/mame/drivers/mrdo.c +++ b/src/mame/drivers/mrdo.c @@ -186,7 +186,7 @@ static MACHINE_CONFIG_START( mrdo, mrdo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MAIN_CLOCK/2) /* Verified */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mrdo_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/mrflea.c b/src/mame/drivers/mrflea.c index c5a00afa7a0..ba38051e300 100644 --- a/src/mame/drivers/mrflea.c +++ b/src/mame/drivers/mrflea.c @@ -357,7 +357,7 @@ static MACHINE_CONFIG_START( mrflea, mrflea_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(mrflea_master_map) MCFG_CPU_IO_MAP(mrflea_master_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* NMI resets the game */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", mrflea_state, irq0_line_hold) /* NMI resets the game */ MCFG_CPU_ADD("sub", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(mrflea_slave_map) diff --git a/src/mame/drivers/mrjong.c b/src/mame/drivers/mrjong.c index c649556c755..50f6129d638 100644 --- a/src/mame/drivers/mrjong.c +++ b/src/mame/drivers/mrjong.c @@ -201,7 +201,7 @@ static MACHINE_CONFIG_START( mrjong, mrjong_state ) MCFG_CPU_ADD("maincpu", Z80,15468000/6) /* 2.578 MHz?? */ MCFG_CPU_PROGRAM_MAP(mrjong_map) MCFG_CPU_IO_MAP(mrjong_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mrjong_state, nmi_line_pulse) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/msisaac.c b/src/mame/drivers/msisaac.c index a0bd58410be..361a0324ab4 100644 --- a/src/mame/drivers/msisaac.c +++ b/src/mame/drivers/msisaac.c @@ -478,11 +478,11 @@ static MACHINE_CONFIG_START( msisaac, msisaac_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(msisaac_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", msisaac_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(msisaac_sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* source of IRQs is unknown */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", msisaac_state, irq0_line_hold) /* source of IRQs is unknown */ #ifdef USE_MCU MCFG_CPU_ADD("mcu", M68705,8000000/2) /* 4 MHz */ diff --git a/src/mame/drivers/mugsmash.c b/src/mame/drivers/mugsmash.c index cea78832e1a..4485fc1ff34 100644 --- a/src/mame/drivers/mugsmash.c +++ b/src/mame/drivers/mugsmash.c @@ -410,7 +410,7 @@ static MACHINE_CONFIG_START( mugsmash, mugsmash_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(mugsmash_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mugsmash_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* Guess */ MCFG_CPU_PROGRAM_MAP(mugsmash_sound_map) diff --git a/src/mame/drivers/multfish.c b/src/mame/drivers/multfish.c index 37109161a9d..844fcbaef90 100644 --- a/src/mame/drivers/multfish.c +++ b/src/mame/drivers/multfish.c @@ -1099,7 +1099,7 @@ static MACHINE_CONFIG_START( multfish, multfish_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/4) MCFG_CPU_PROGRAM_MAP(multfish_map) MCFG_CPU_IO_MAP(multfish_portmap) - MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", multfish_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/munchmo.c b/src/mame/drivers/munchmo.c index 4c199cdeca0..5138e8bfeb7 100644 --- a/src/mame/drivers/munchmo.c +++ b/src/mame/drivers/munchmo.c @@ -41,21 +41,19 @@ WRITE8_MEMBER(munchmo_state::mnchmobl_nmi_enable_w) } /* trusted thru schematics, NMI and IRQ triggers at vblank, at the same time (!) */ -static INTERRUPT_GEN( mnchmobl_vblank_irq ) +INTERRUPT_GEN_MEMBER(munchmo_state::mnchmobl_vblank_irq) { - munchmo_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable) + m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); - state->m_maincpu->set_input_line(0, HOLD_LINE); + m_maincpu->set_input_line(0, HOLD_LINE); } -static INTERRUPT_GEN( mnchmobl_sound_irq ) +INTERRUPT_GEN_MEMBER(munchmo_state::mnchmobl_sound_irq) { - //munchmo_state *state = device->machine().driver_data(); - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } WRITE8_MEMBER(munchmo_state::mnchmobl_soundlatch_w) @@ -330,11 +328,11 @@ static MACHINE_CONFIG_START( mnchmobl, munchmo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_15MHz/4) /* ? */ MCFG_CPU_PROGRAM_MAP(mnchmobl_map) - MCFG_CPU_VBLANK_INT("screen", mnchmobl_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", munchmo_state, mnchmobl_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_15MHz/4) /* ? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_VBLANK_INT("screen", mnchmobl_sound_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", munchmo_state, mnchmobl_sound_irq) /* video hardware */ diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c index a84f7cb0824..c7aa028c708 100644 --- a/src/mame/drivers/murogem.c +++ b/src/mame/drivers/murogem.c @@ -247,7 +247,7 @@ static MACHINE_CONFIG_START( murogem, murogem_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6802, 8000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(murogem_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", murogem_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/mustache.c b/src/mame/drivers/mustache.c index 80519a8d3e8..44c31bf546a 100644 --- a/src/mame/drivers/mustache.c +++ b/src/mame/drivers/mustache.c @@ -162,11 +162,10 @@ static TIMER_CALLBACK( clear_irq_cb ) machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE); } -static INTERRUPT_GEN( assert_irq ) +INTERRUPT_GEN_MEMBER(mustache_state::assert_irq) { - mustache_state *state = device->machine().driver_data(); - device->execute().set_input_line(0, ASSERT_LINE); - state->m_clear_irq_timer->adjust(downcast(device)->cycles_to_attotime(14288)); + device.execute().set_input_line(0, ASSERT_LINE); + 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. 6000000 / 56.747 = 105732.4616 cycles per frame, we'll call it A @@ -188,7 +187,7 @@ static MACHINE_CONFIG_START( mustache, mustache_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(memmap) - MCFG_CPU_VBLANK_INT("screen", assert_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mustache_state, assert_irq) MCFG_CPU_ADD(CPUTAG_T5182,Z80, T5182_CLOCK) MCFG_CPU_PROGRAM_MAP(t5182_map) diff --git a/src/mame/drivers/mw18w.c b/src/mame/drivers/mw18w.c index 40fcb25679c..3aaca2b3ea8 100644 --- a/src/mame/drivers/mw18w.c +++ b/src/mame/drivers/mw18w.c @@ -177,7 +177,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( mw18w, mw18w_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_19_968MHz/8) - MCFG_CPU_PERIODIC_INT(irq0_line_assert,960.516) // 555 IC + MCFG_CPU_PERIODIC_INT_DRIVER(mw18w_state, irq0_line_assert, 960.516) // 555 IC MCFG_CPU_PROGRAM_MAP(mw18w_map) MCFG_CPU_IO_MAP(mw18w_portmap) diff --git a/src/mame/drivers/mwarr.c b/src/mame/drivers/mwarr.c index 2628b4e2b7b..a43d6465b1f 100644 --- a/src/mame/drivers/mwarr.c +++ b/src/mame/drivers/mwarr.c @@ -558,7 +558,7 @@ static MACHINE_CONFIG_START( mwarr, mwarr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(mwarr_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mwarr_state, irq4_line_hold) /* video hardware */ diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index 666fe8775e0..0f66fa82492 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -152,9 +152,9 @@ static TIMER_DEVICE_CALLBACK(mchamp_interrupt) state->m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE); } -static INTERRUPT_GEN(ddd_interrupt) +INTERRUPT_GEN_MEMBER(mystwarr_state::ddd_interrupt) { - device->execute().set_input_line(M68K_IRQ_5, HOLD_LINE); + device.execute().set_input_line(M68K_IRQ_5, HOLD_LINE); } @@ -990,7 +990,7 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state ) MCFG_CPU_ADD("soundcpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(mystwarr_sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 480) + MCFG_CPU_PERIODIC_INT_DRIVER(mystwarr_state, nmi_line_pulse, 480) MCFG_QUANTUM_TIME(attotime::from_hz(1920)) @@ -1083,7 +1083,7 @@ static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(dadandrn_map) - MCFG_CPU_VBLANK_INT("screen", ddd_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mystwarr_state, ddd_interrupt) MCFG_DEVICE_REMOVE("scantimer") MCFG_DEVICE_REMOVE("k053252") @@ -1109,7 +1109,7 @@ static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(gaiapols_map) - MCFG_CPU_VBLANK_INT("screen", ddd_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", mystwarr_state, ddd_interrupt) MCFG_DEVICE_REMOVE("scantimer") MCFG_DEVICE_REMOVE("k053252") diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c index 0528ed66d20..2860e6908b6 100644 --- a/src/mame/drivers/namconb1.c +++ b/src/mame/drivers/namconb1.c @@ -307,9 +307,8 @@ static TIMER_CALLBACK( namconb1_TriggerPOSIRQ ) machine.device("maincpu")->execute().set_input_line(state->m_namconb_cpureg[0x02] & 0xf, ASSERT_LINE); } -static INTERRUPT_GEN( namconb1_interrupt ) +INTERRUPT_GEN_MEMBER(namconb1_state::namconb1_interrupt) { - namconb1_state *state = device->machine().driver_data(); /** * 400000 0x00 * 400001 0x00 @@ -344,11 +343,11 @@ static INTERRUPT_GEN( namconb1_interrupt ) * 40001e 0x00 * 40001f 0x00 */ - int scanline = (state->m_generic_paletteram_32[0x1808/4]&0xffff)-32; + int scanline = (m_generic_paletteram_32[0x1808/4]&0xffff)-32; - if((!state->m_vblank_irq_active) && (state->m_namconb_cpureg[0x04] & 0xf0)) { - device->execute().set_input_line(state->m_namconb_cpureg[0x04] & 0xf, ASSERT_LINE); - state->m_vblank_irq_active = 1; + if((!m_vblank_irq_active) && (m_namconb_cpureg[0x04] & 0xf0)) { + device.execute().set_input_line(m_namconb_cpureg[0x04] & 0xf, ASSERT_LINE); + m_vblank_irq_active = 1; } if( scanline<0 ) @@ -357,7 +356,7 @@ static INTERRUPT_GEN( namconb1_interrupt ) } if( scanline < NAMCONB1_VBSTART ) { - device->machine().scheduler().timer_set( device->machine().primary_screen->time_until_pos(scanline), FUNC(namconb1_TriggerPOSIRQ ), scanline); + machine().scheduler().timer_set( machine().primary_screen->time_until_pos(scanline), FUNC(namconb1_TriggerPOSIRQ ), scanline); } } /* namconb1_interrupt */ @@ -370,9 +369,8 @@ static TIMER_CALLBACK( namconb2_TriggerPOSIRQ ) machine.device("maincpu")->execute().set_input_line(state->m_namconb_cpureg[0x02], ASSERT_LINE); } -static INTERRUPT_GEN( namconb2_interrupt ) +INTERRUPT_GEN_MEMBER(namconb1_state::namconb2_interrupt) { - namconb1_state *state = device->machine().driver_data(); /** * f00000 0x01 // VBLANK irq level * f00001 0x00 @@ -402,18 +400,18 @@ static INTERRUPT_GEN( namconb2_interrupt ) * f0001e 0x00 * f0001f 0x01 */ - int scanline = (state->m_generic_paletteram_32[0x1808/4]&0xffff)-32; + int scanline = (m_generic_paletteram_32[0x1808/4]&0xffff)-32; - if((!state->m_vblank_irq_active) && state->m_namconb_cpureg[0x00]) { - device->execute().set_input_line(state->m_namconb_cpureg[0x00], ASSERT_LINE); - state->m_vblank_irq_active = 1; + if((!m_vblank_irq_active) && m_namconb_cpureg[0x00]) { + device.execute().set_input_line(m_namconb_cpureg[0x00], ASSERT_LINE); + m_vblank_irq_active = 1; } if( scanline<0 ) scanline = 0; if( scanline < NAMCONB1_VBSTART ) - device->machine().scheduler().timer_set( device->machine().primary_screen->time_until_pos(scanline), FUNC(namconb2_TriggerPOSIRQ ), scanline); + machine().scheduler().timer_set( machine().primary_screen->time_until_pos(scanline), FUNC(namconb2_TriggerPOSIRQ ), scanline); } /* namconb2_interrupt */ static void namconb1_cpureg8_w(running_machine &machine, int reg, UINT8 data) @@ -1009,7 +1007,7 @@ ADDRESS_MAP_END static MACHINE_CONFIG_START( namconb1, namconb1_state ) MCFG_CPU_ADD("maincpu", M68EC020,MASTER_CLOCK_HZ/2) MCFG_CPU_PROGRAM_MAP(namconb1_am) - MCFG_CPU_VBLANK_INT("screen", namconb1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namconb1_state, namconb1_interrupt) MCFG_CPU_ADD("mcu", M37702, MASTER_CLOCK_HZ/3) MCFG_CPU_PROGRAM_MAP(namcoc75_am) @@ -1041,7 +1039,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( namconb2, namconb1_state ) MCFG_CPU_ADD("maincpu", M68EC020,MASTER_CLOCK_HZ/2) MCFG_CPU_PROGRAM_MAP(namconb2_am) - MCFG_CPU_VBLANK_INT("screen", namconb2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namconb1_state, namconb2_interrupt) MCFG_CPU_ADD("mcu", M37702, MASTER_CLOCK_HZ/3) MCFG_CPU_PROGRAM_MAP(namcoc75_am) diff --git a/src/mame/drivers/namcond1.c b/src/mame/drivers/namcond1.c index 4d43517ffa1..90f7664e864 100644 --- a/src/mame/drivers/namcond1.c +++ b/src/mame/drivers/namcond1.c @@ -265,12 +265,11 @@ static ADDRESS_MAP_START( nd1h8iomap, AS_IO, 8, namcond1_state ) AM_RANGE(H8_ADC_0_L, H8_ADC_3_H) AM_NOP // MCU reads these, but the games have no analog controls ADDRESS_MAP_END -static INTERRUPT_GEN( mcu_interrupt ) +INTERRUPT_GEN_MEMBER(namcond1_state::mcu_interrupt) { - namcond1_state *state = device->machine().driver_data(); - if( state->m_h8_irq5_enabled ) + if( m_h8_irq5_enabled ) { - generic_pulse_irq_line(device, H8_IRQ5, 1); + generic_pulse_irq_line(device.execute(), H8_IRQ5, 1); } } @@ -286,7 +285,7 @@ static MACHINE_CONFIG_START( namcond1, namcond1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_49_152MHz/4) MCFG_CPU_PROGRAM_MAP(namcond1_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcond1_state, irq1_line_hold) // I've disabled this for now, I don't think it's correct, it breaks ncv2 'game options' in test // mode (and could also be responsible for the random resets?) @@ -298,7 +297,7 @@ static MACHINE_CONFIG_START( namcond1, namcond1_state ) MCFG_CPU_ADD("mcu", H83002, XTAL_49_152MHz/3 ) MCFG_CPU_PROGRAM_MAP( nd1h8rwmap) MCFG_CPU_IO_MAP( nd1h8iomap) - MCFG_CPU_VBLANK_INT("screen", mcu_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcond1_state, mcu_interrupt) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/namcos1.c b/src/mame/drivers/namcos1.c index 8b266ccdcaf..422e31addde 100644 --- a/src/mame/drivers/namcos1.c +++ b/src/mame/drivers/namcos1.c @@ -1083,20 +1083,20 @@ static MACHINE_CONFIG_START( ns1, namcos1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809,49152000/32) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos1_state, irq0_line_assert) MCFG_CPU_ADD("sub", M6809,49152000/32) MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos1_state, irq0_line_assert) MCFG_CPU_ADD("audiocpu", M6809,49152000/32) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos1_state, irq0_line_assert) MCFG_CPU_ADD("mcu",HD63701,49152000/8) MCFG_CPU_PROGRAM_MAP(mcu_map) MCFG_CPU_IO_MAP(mcu_port_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos1_state, irq0_line_assert) // heavy sync required to prevent CPUs from fighting for video RAM access and going into deadlocks MCFG_QUANTUM_TIME(attotime::from_hz(38400)) diff --git a/src/mame/drivers/namcos2.c b/src/mame/drivers/namcos2.c index 84a2b7c35e7..97250c5b3a9 100644 --- a/src/mame/drivers/namcos2.c +++ b/src/mame/drivers/namcos2.c @@ -1606,20 +1606,20 @@ via software as INT1 static MACHINE_CONFIG_START( default, namcos2_state ) MCFG_CPU_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(master_default_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(slave_default_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */ MCFG_CPU_PROGRAM_MAP(sound_default_am) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, 120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ MCFG_CPU_PROGRAM_MAP(mcu_default_am) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(12000)) /* CPU slices per frame */ @@ -1680,20 +1680,20 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( gollygho, namcos2_state ) MCFG_CPU_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(master_default_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(slave_default_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */ MCFG_CPU_PROGRAM_MAP(sound_default_am) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, 120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ MCFG_CPU_PROGRAM_MAP(mcu_default_am) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -1727,20 +1727,20 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( finallap, namcos2_state ) MCFG_CPU_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(master_finallap_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(slave_finallap_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */ MCFG_CPU_PROGRAM_MAP(sound_default_am) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, 120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ MCFG_CPU_PROGRAM_MAP(mcu_default_am) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -1778,20 +1778,20 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( sgunner, namcos2_state ) MCFG_CPU_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(master_sgunner_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(slave_sgunner_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */ MCFG_CPU_PROGRAM_MAP(sound_default_am) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, 120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ MCFG_CPU_PROGRAM_MAP(mcu_default_am) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -1827,20 +1827,20 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( luckywld, namcos2_state ) MCFG_CPU_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(master_luckywld_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(slave_luckywld_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */ MCFG_CPU_PROGRAM_MAP(sound_default_am) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ MCFG_CPU_PROGRAM_MAP(mcu_default_am) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -1878,20 +1878,20 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( metlhawk, namcos2_state ) MCFG_CPU_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(master_metlhawk_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_CPU_PROGRAM_MAP(slave_metlhawk_am) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */ MCFG_CPU_PROGRAM_MAP(sound_default_am) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ MCFG_CPU_PROGRAM_MAP(mcu_default_am) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ diff --git a/src/mame/drivers/namcos21.c b/src/mame/drivers/namcos21.c index 683d70f895b..56c0b834f52 100644 --- a/src/mame/drivers/namcos21.c +++ b/src/mame/drivers/namcos21.c @@ -1489,20 +1489,20 @@ MACHINE_START_MEMBER(namcos21_state,namcos21) static MACHINE_CONFIG_START( namcos21, namcos21_state ) MCFG_CPU_ADD("maincpu", M68000,12288000) /* Master */ MCFG_CPU_PROGRAM_MAP(namcos21_68k_master) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000,12288000) /* Slave */ MCFG_CPU_PROGRAM_MAP(namcos21_68k_slave) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809,3072000) /* Sound */ MCFG_CPU_PROGRAM_MAP(am_sound_winrun) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos21_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos21_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705,2048000) /* IO */ MCFG_CPU_PROGRAM_MAP(am_mcu_winrun) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, irq0_line_hold) MCFG_CPU_ADD("dspmaster", TMS32025,24000000) /* 24 MHz? overclocked */ MCFG_CPU_PROGRAM_MAP(master_dsp_program) @@ -1549,20 +1549,20 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( driveyes, namcos21_state ) MCFG_CPU_ADD("maincpu", M68000,12288000) /* Master */ MCFG_CPU_PROGRAM_MAP(driveyes_68k_master) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000,12288000) /* Slave */ MCFG_CPU_PROGRAM_MAP(driveyes_68k_slave) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809,3072000) /* Sound */ MCFG_CPU_PROGRAM_MAP(am_sound_winrun) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos21_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos21_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705,2048000) /* IO */ MCFG_CPU_PROGRAM_MAP(am_mcu_winrun) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, irq0_line_hold) MCFG_CPU_ADD("dsp", TMS32025,24000000*2) /* 24 MHz? overclocked */ MCFG_CPU_PROGRAM_MAP(winrun_dsp_program) @@ -1604,20 +1604,20 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( winrun, namcos21_state ) MCFG_CPU_ADD("maincpu", M68000,12288000) /* Master */ MCFG_CPU_PROGRAM_MAP(am_master_winrun) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, namcos2_68k_master_vblank) MCFG_CPU_ADD("slave", M68000,12288000) /* Slave */ MCFG_CPU_PROGRAM_MAP(am_slave_winrun) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_slave_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, namcos2_68k_slave_vblank) MCFG_CPU_ADD("audiocpu", M6809,3072000) /* Sound */ MCFG_CPU_PROGRAM_MAP(am_sound_winrun) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,120) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos21_state, irq0_line_hold, 2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos21_state, irq1_line_hold, 120) MCFG_CPU_ADD("mcu", HD63705,2048000) /* IO */ MCFG_CPU_PROGRAM_MAP(am_mcu_winrun) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, irq0_line_hold) MCFG_CPU_ADD("dsp", TMS32025,24000000) /* 24 MHz? overclocked */ MCFG_CPU_PROGRAM_MAP(winrun_dsp_program) @@ -1626,7 +1626,7 @@ static MACHINE_CONFIG_START( winrun, namcos21_state ) MCFG_CPU_ADD("gpu", M68000,12288000) /* graphics coprocessor */ MCFG_CPU_PROGRAM_MAP(am_gpu_winrun) - MCFG_CPU_VBLANK_INT("screen", namcos2_68k_gpu_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos21_state, namcos2_68k_gpu_vblank) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */ diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c index 7ebbd663993..89f4f0788ed 100644 --- a/src/mame/drivers/namcos22.c +++ b/src/mame/drivers/namcos22.c @@ -2181,15 +2181,14 @@ WRITE32_MEMBER(namcos22_state::namcos22s_system_controller_w) 00008bf0: sys[0x00] := 0x04 // vblank 00008bf8: sys[0x08] := 0xff // ? */ -static INTERRUPT_GEN( namcos22s_interrupt ) +INTERRUPT_GEN_MEMBER(namcos22_state::namcos22s_interrupt) { - namcos22_state *state = device->machine().driver_data(); - if (nthbyte(state->m_system_controller, 0x00) & 7) + if (nthbyte(m_system_controller, 0x00) & 7) { // vblank irq - state->m_irq_state |= 1; - device->execute().set_input_line(nthbyte(state->m_system_controller, 0x00) & 7, ASSERT_LINE); + m_irq_state |= 1; + device.execute().set_input_line(nthbyte(m_system_controller, 0x00) & 7, ASSERT_LINE); } } @@ -2343,33 +2342,32 @@ Cyber Commando: move.b #$34, $40000004.l */ -static INTERRUPT_GEN( namcos22_interrupt ) +INTERRUPT_GEN_MEMBER(namcos22_state::namcos22_interrupt) { - namcos22_state *state = device->machine().driver_data(); - switch( state->m_gametype ) + switch( m_gametype ) { case NAMCOS22_RIDGE_RACER: case NAMCOS22_RIDGE_RACER2: case NAMCOS22_RAVE_RACER: case NAMCOS22_ACE_DRIVER: case NAMCOS22_VICTORY_LAP: - HandleDrivingIO(device->machine()); + HandleDrivingIO(machine()); break; case NAMCOS22_CYBER_COMMANDO: - HandleCyberCommandoIO(device->machine()); + HandleCyberCommandoIO(machine()); break; default: break; } - if (nthbyte(state->m_system_controller, 0x04) & 7) + if (nthbyte(m_system_controller, 0x04) & 7) { // vblank irq - state->m_irq_state |= 1; - device->execute().set_input_line(nthbyte(state->m_system_controller, 0x04) & 7, ASSERT_LINE); + m_irq_state |= 1; + device.execute().set_input_line(nthbyte(m_system_controller, 0x04) & 7, ASSERT_LINE); } } @@ -2945,7 +2943,7 @@ void namcos22_state::machine_reset() static MACHINE_CONFIG_START( namcos22s, namcos22_state ) MCFG_CPU_ADD("maincpu", M68EC020,SS22_MASTER_CLOCK/2) MCFG_CPU_PROGRAM_MAP(namcos22s_am) - MCFG_CPU_VBLANK_INT("screen", namcos22s_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos22_state, namcos22s_interrupt) MCFG_CPU_ADD("master", TMS32025,SS22_MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(master_dsp_program) @@ -3196,7 +3194,7 @@ ADDRESS_MAP_END static MACHINE_CONFIG_START( namcos22, namcos22_state ) MCFG_CPU_ADD("maincpu", M68020,SS22_MASTER_CLOCK/2) /* 25 MHz? */ MCFG_CPU_PROGRAM_MAP(namcos22_am) - MCFG_CPU_VBLANK_INT("screen", namcos22_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos22_state, namcos22_interrupt) MCFG_CPU_ADD("master", TMS32025,SS22_MASTER_CLOCK) /* ? */ MCFG_CPU_PROGRAM_MAP(master_dsp_program) diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c index a715f2521c5..b5e3f52aa00 100644 --- a/src/mame/drivers/namcos23.c +++ b/src/mame/drivers/namcos23.c @@ -1435,6 +1435,7 @@ public: DECLARE_VIDEO_START(ss23); DECLARE_MACHINE_RESET(gmen); UINT32 screen_update_ss23(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(s23_interrupt); }; @@ -2432,14 +2433,13 @@ UINT32 namcos23_state::screen_update_ss23(screen_device &screen, bitmap_rgb32 &b return 0; } -static INTERRUPT_GEN(s23_interrupt) +INTERRUPT_GEN_MEMBER(namcos23_state::s23_interrupt) { - namcos23_state *state = device->machine().driver_data(); - render_t &render = state->m_render; + render_t &render = m_render; - if(!state->m_ctl_vbl_active) { - state->m_ctl_vbl_active = true; - device->execute().set_input_line(MIPS3_IRQ0, ASSERT_LINE); + if(!m_ctl_vbl_active) { + m_ctl_vbl_active = true; + device.execute().set_input_line(MIPS3_IRQ0, ASSERT_LINE); } render.cur = !render.cur; @@ -3148,12 +3148,12 @@ static MACHINE_CONFIG_START( gorgon, namcos23_state ) MCFG_CPU_ADD("maincpu", R4650BE, S23_BUSCLOCK*4) MCFG_CPU_CONFIG(r4650_config) MCFG_CPU_PROGRAM_MAP(gorgon_map) - MCFG_CPU_VBLANK_INT("screen", s23_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos23_state, s23_interrupt) MCFG_CPU_ADD("audiocpu", H83002, S23_H8CLOCK ) MCFG_CPU_PROGRAM_MAP( s23h8rwmap ) MCFG_CPU_IO_MAP( s23h8iomap ) - MCFG_CPU_VBLANK_INT("screen", irq1_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos23_state, irq1_line_pulse) MCFG_CPU_ADD("ioboard", H83334, S23_H8CLOCK ) MCFG_CPU_PROGRAM_MAP( gorgoniobrdmap ) @@ -3193,12 +3193,12 @@ static MACHINE_CONFIG_START( s23, namcos23_state ) MCFG_CPU_ADD("maincpu", R4650BE, S23_BUSCLOCK*4) MCFG_CPU_CONFIG(r4650_config) MCFG_CPU_PROGRAM_MAP(ss23_map) - MCFG_CPU_VBLANK_INT("screen", s23_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos23_state, s23_interrupt) MCFG_CPU_ADD("audiocpu", H83002, S23_H8CLOCK ) MCFG_CPU_PROGRAM_MAP( s23h8rwmap ) MCFG_CPU_IO_MAP( s23h8iomap ) - MCFG_CPU_VBLANK_INT("screen", irq1_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos23_state, irq1_line_pulse) MCFG_CPU_ADD("ioboard", H83334, S23_H8CLOCK ) MCFG_CPU_PROGRAM_MAP( s23iobrdmap ) @@ -3238,12 +3238,12 @@ static MACHINE_CONFIG_START( ss23, namcos23_state ) MCFG_CPU_ADD("maincpu", R4650BE, S23_BUSCLOCK*5) MCFG_CPU_CONFIG(r4650_config) MCFG_CPU_PROGRAM_MAP(ss23_map) - MCFG_CPU_VBLANK_INT("screen", s23_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos23_state, s23_interrupt) MCFG_CPU_ADD("audiocpu", H83002, S23_H8CLOCK ) MCFG_CPU_PROGRAM_MAP( s23h8rwmap ) MCFG_CPU_IO_MAP( s23h8noiobmap ) - MCFG_CPU_VBLANK_INT("screen", irq1_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos23_state, irq1_line_pulse) MCFG_QUANTUM_TIME(attotime::from_hz(60000)) diff --git a/src/mame/drivers/namcos86.c b/src/mame/drivers/namcos86.c index 04892c84b62..13606327550 100644 --- a/src/mame/drivers/namcos86.c +++ b/src/mame/drivers/namcos86.c @@ -992,16 +992,16 @@ static MACHINE_CONFIG_START( hopmappy, namcos86_state ) /* basic machine hardware */ MCFG_CPU_ADD("cpu1", M6809, 49152000/32) MCFG_CPU_PROGRAM_MAP(cpu1_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos86_state, irq0_line_assert) MCFG_CPU_ADD("cpu2", M6809, 49152000/32) MCFG_CPU_PROGRAM_MAP(hopmappy_cpu2_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos86_state, irq0_line_assert) MCFG_CPU_ADD("mcu", HD63701, 49152000/8) /* or compatible 6808 with extra instructions */ MCFG_CPU_PROGRAM_MAP(hopmappy_mcu_map) MCFG_CPU_IO_MAP(mcu_port_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* ??? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos86_state, irq0_line_hold) /* ??? */ MCFG_QUANTUM_TIME(attotime::from_hz(48000)) /* heavy interleaving needed to avoid hangs in rthunder */ diff --git a/src/mame/drivers/nbmj9195.c b/src/mame/drivers/nbmj9195.c index 73e0c305fd6..062815a5dfa 100644 --- a/src/mame/drivers/nbmj9195.c +++ b/src/mame/drivers/nbmj9195.c @@ -611,9 +611,9 @@ WRITE8_MEMBER(nbmj9195_state::tmpz84c011_1_dir_pe_w) } /* CTC of main cpu, ch0 trigger is vblank */ -static INTERRUPT_GEN( ctc0_trg1 ) +INTERRUPT_GEN_MEMBER(nbmj9195_state::ctc0_trg1) { - z80ctc_device *ctc = device->machine().device("main_ctc"); + z80ctc_device *ctc = machine().device("main_ctc"); ctc->trg1(1); ctc->trg1(0); } @@ -3165,7 +3165,7 @@ static MACHINE_CONFIG_START( NBMJDRV1, nbmj9195_state ) MCFG_CPU_CONFIG(daisy_chain_main) MCFG_CPU_PROGRAM_MAP(sailorws_map) MCFG_CPU_IO_MAP(sailorws_io_map) - MCFG_CPU_VBLANK_INT("screen", ctc0_trg1) /* vblank is connect to ctc triggfer */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nbmj9195_state, ctc0_trg1) /* vblank is connect to ctc triggfer */ MCFG_CPU_ADD("audiocpu", Z80, 8000000) /* TMPZ84C011, 8.00 MHz */ MCFG_CPU_CONFIG(daisy_chain_sound) diff --git a/src/mame/drivers/nemesis.c b/src/mame/drivers/nemesis.c index 576759e1c79..fab632bcd8c 100644 --- a/src/mame/drivers/nemesis.c +++ b/src/mame/drivers/nemesis.c @@ -56,20 +56,18 @@ So this is the correct behavior of real hardware, not an emulation bug. #include "includes/konamipt.h" -static INTERRUPT_GEN( nemesis_interrupt ) +INTERRUPT_GEN_MEMBER(nemesis_state::nemesis_interrupt) { - nemesis_state *state = device->machine().driver_data(); - if (state->m_irq_on) - device->execute().set_input_line(1, HOLD_LINE); + if (m_irq_on) + device.execute().set_input_line(1, HOLD_LINE); } -static INTERRUPT_GEN( blkpnthr_interrupt ) +INTERRUPT_GEN_MEMBER(nemesis_state::blkpnthr_interrupt) { - nemesis_state *state = device->machine().driver_data(); - if (state->m_irq_on) - device->execute().set_input_line(2, HOLD_LINE); + if (m_irq_on) + device.execute().set_input_line(2, HOLD_LINE); } static TIMER_DEVICE_CALLBACK( konamigt_interrupt ) @@ -1558,7 +1556,7 @@ static MACHINE_CONFIG_START( nemesis, nemesis_state ) MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */ // 14318180/2, /* From schematics, should be accurate */ MCFG_CPU_PROGRAM_MAP(nemesis_map) - MCFG_CPU_VBLANK_INT("screen", nemesis_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nemesis_interrupt) MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* From schematics, should be accurate */ MCFG_CPU_PROGRAM_MAP(sound_map) /* fixed */ @@ -1604,7 +1602,7 @@ static MACHINE_CONFIG_START( gx400, nemesis_state ) MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(gx400_sound_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) /* interrupts are triggered by the main CPU */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nmi_line_pulse) /* interrupts are triggered by the main CPU */ /* video hardware */ @@ -1686,7 +1684,7 @@ static MACHINE_CONFIG_START( rf2_gx400, nemesis_state ) MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(gx400_sound_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) /* interrupts are triggered by the main CPU */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nmi_line_pulse) /* interrupts are triggered by the main CPU */ /* video hardware */ @@ -1725,7 +1723,7 @@ static MACHINE_CONFIG_START( salamand, nemesis_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */ MCFG_CPU_PROGRAM_MAP(salamand_map) - MCFG_CPU_VBLANK_INT("screen", nemesis_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nemesis_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(sal_sound_map) @@ -1771,7 +1769,7 @@ static MACHINE_CONFIG_START( blkpnthr, nemesis_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */ MCFG_CPU_PROGRAM_MAP(blkpnthr_map) - MCFG_CPU_VBLANK_INT("screen", blkpnthr_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, blkpnthr_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(blkpnthr_sound_map) @@ -1813,7 +1811,7 @@ static MACHINE_CONFIG_START( citybomb, nemesis_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */ MCFG_CPU_PROGRAM_MAP(citybomb_map) - MCFG_CPU_VBLANK_INT("screen", nemesis_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nemesis_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(city_sound_map) @@ -1859,7 +1857,7 @@ static MACHINE_CONFIG_START( nyanpani, nemesis_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */ MCFG_CPU_PROGRAM_MAP(nyanpani_map) - MCFG_CPU_VBLANK_INT("screen", nemesis_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nemesis_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(city_sound_map) @@ -2655,7 +2653,7 @@ static MACHINE_CONFIG_START( bubsys, nemesis_state ) MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */ MCFG_CPU_PROGRAM_MAP(gx400_sound_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) /* interrupts are triggered by the main CPU */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nmi_line_pulse) /* interrupts are triggered by the main CPU */ /* video hardware */ diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c index a9c2c36e2c2..c3efaa6635b 100644 --- a/src/mame/drivers/neoprint.c +++ b/src/mame/drivers/neoprint.c @@ -464,8 +464,8 @@ static const ym2610_interface ym2610_config = static MACHINE_CONFIG_START( neoprint, neoprint_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(neoprint_map) -// MCFG_CPU_PERIODIC_INT(irq3_line_hold,45) /* camera / printer irq, unknown timing */ - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) // lv1,2,3 valid? + MCFG_CPU_PERIODIC_INT_DRIVER(neoprint_state, irq3_line_hold, 45) /* camera / printer irq, unknown timing */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", neoprint_state, irq2_line_hold) // lv1,2,3 valid? MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(neoprint_audio_map) @@ -504,8 +504,8 @@ MACHINE_RESET_MEMBER(neoprint_state,nprsp) static MACHINE_CONFIG_START( nprsp, neoprint_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(nprsp_map) -// MCFG_CPU_PERIODIC_INT(irq3_line_hold,45) /* camera / printer irq, unknown timing */ - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) // lv1,2,3 valid? + MCFG_CPU_PERIODIC_INT_DRIVER(neoprint_state, irq3_line_hold, 45) /* camera / printer irq, unknown timing */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", neoprint_state, irq2_line_hold) // lv1,2,3 valid? MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(neoprint_audio_map) diff --git a/src/mame/drivers/neptunp2.c b/src/mame/drivers/neptunp2.c index c585a5d2b20..0c8190a3d9c 100644 --- a/src/mame/drivers/neptunp2.c +++ b/src/mame/drivers/neptunp2.c @@ -95,7 +95,7 @@ static MACHINE_CONFIG_START( neptunp2, neptunp2_state ) MCFG_CPU_ADD("maincpu",I80188,20000000) // N80C188-20 AMD MCFG_CPU_PROGRAM_MAP(neptunp2_map) MCFG_CPU_IO_MAP(neptunp2_io) -// MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", neptunp2_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/news.c b/src/mame/drivers/news.c index d3621628ab9..40ef17bc7b7 100644 --- a/src/mame/drivers/news.c +++ b/src/mame/drivers/news.c @@ -130,7 +130,7 @@ static MACHINE_CONFIG_START( news, news_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(news_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", news_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c index d3738f9660f..ec11e277f4e 100644 --- a/src/mame/drivers/nightgal.c +++ b/src/mame/drivers/nightgal.c @@ -868,7 +868,7 @@ static MACHINE_CONFIG_START( royalqn, nightgal_state ) MCFG_CPU_ADD("maincpu", Z80,MASTER_CLOCK / 8) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(royalqn_map) MCFG_CPU_IO_MAP(royalqn_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nightgal_state, irq0_line_hold) MCFG_CPU_ADD("sub", NSC8105, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(royalqn_nsc_map) @@ -902,11 +902,11 @@ static MACHINE_CONFIG_DERIVED( sexygal, royalqn ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(sexygal_map) MCFG_CPU_IO_MAP(sexygal_io) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,244)//??? + MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 244)//??? MCFG_CPU_MODIFY("sub") MCFG_CPU_PROGRAM_MAP(sexygal_nsc_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nightgal_state, irq0_line_hold) MCFG_DEVICE_REMOVE("aysnd") @@ -919,7 +919,7 @@ static MACHINE_CONFIG_DERIVED( ngalsumr, royalqn ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(royalqn_map) MCFG_CPU_IO_MAP(royalqn_io) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,244)//??? + MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 244)//??? MACHINE_CONFIG_END /* diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c index 86dcb645e81..d4e8e591c0f 100644 --- a/src/mame/drivers/ninjakd2.c +++ b/src/mame/drivers/ninjakd2.c @@ -166,9 +166,9 @@ TODO: static void omegaf_io_protection_reset(running_machine &machine); -static INTERRUPT_GEN( ninjakd2_interrupt ) +INTERRUPT_GEN_MEMBER(ninjakd2_state::ninjakd2_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ } @@ -939,7 +939,7 @@ static MACHINE_CONFIG_START( ninjakd2, ninjakd2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MAIN_CLOCK_12/2) /* verified */ MCFG_CPU_PROGRAM_MAP(ninjakd2_main_cpu) - MCFG_CPU_VBLANK_INT("screen", ninjakd2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ninjakd2_state, ninjakd2_interrupt) MCFG_CPU_ADD("soundcpu", Z80, MAIN_CLOCK_5) /* verified */ MCFG_CPU_PROGRAM_MAP(ninjakd2_sound_cpu) diff --git a/src/mame/drivers/ninjaw.c b/src/mame/drivers/ninjaw.c index d3d1ce590f3..6b6940b1bac 100644 --- a/src/mame/drivers/ninjaw.c +++ b/src/mame/drivers/ninjaw.c @@ -843,14 +843,14 @@ static MACHINE_CONFIG_START( ninjaw, ninjaw_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,16000000/2) /* 8 MHz ? */ MCFG_CPU_PROGRAM_MAP(ninjaw_master_map) - MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", ninjaw_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 16/4 MHz ? */ MCFG_CPU_PROGRAM_MAP(ninjaw_sound_map) MCFG_CPU_ADD("sub", M68000,16000000/2) /* 8 MHz ? */ MCFG_CPU_PROGRAM_MAP(ninjaw_slave_map) - MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", ninjaw_state, irq4_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices */ @@ -923,14 +923,14 @@ static MACHINE_CONFIG_START( darius2, ninjaw_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,16000000/2) /* 8 MHz ? */ MCFG_CPU_PROGRAM_MAP(darius2_master_map) - MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", ninjaw_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(ninjaw_sound_map) MCFG_CPU_ADD("sub", M68000,16000000/2) /* 8 MHz ? */ MCFG_CPU_PROGRAM_MAP(darius2_slave_map) - MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", ninjaw_state, irq4_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices */ diff --git a/src/mame/drivers/nitedrvr.c b/src/mame/drivers/nitedrvr.c index 91c4655c087..a13cfd5f03d 100644 --- a/src/mame/drivers/nitedrvr.c +++ b/src/mame/drivers/nitedrvr.c @@ -139,7 +139,7 @@ static MACHINE_CONFIG_START( nitedrvr, nitedrvr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, XTAL_12_096MHz/12) // 1 MHz MCFG_CPU_PROGRAM_MAP(nitedrvr_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nitedrvr_state, irq0_line_hold) MCFG_WATCHDOG_VBLANK_INIT(3) diff --git a/src/mame/drivers/niyanpai.c b/src/mame/drivers/niyanpai.c index 6ce4865a20e..819d57e3cd1 100644 --- a/src/mame/drivers/niyanpai.c +++ b/src/mame/drivers/niyanpai.c @@ -926,9 +926,9 @@ static INPUT_PORTS_START( zokumahj ) // I don't have manual for this game. INPUT_PORTS_END -static INTERRUPT_GEN( niyanpai_interrupt ) +INTERRUPT_GEN_MEMBER(niyanpai_state::niyanpai_interrupt) { - device->execute().set_input_line_and_vector(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[] = @@ -943,7 +943,7 @@ static MACHINE_CONFIG_START( niyanpai, niyanpai_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12288000/2) /* TMP68301, 6.144 MHz */ MCFG_CPU_PROGRAM_MAP(niyanpai_map) - MCFG_CPU_VBLANK_INT("screen", niyanpai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", niyanpai_state, niyanpai_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 8000000) /* TMPZ84C011, 8.00 MHz */ MCFG_CPU_CONFIG(daisy_chain_sound) diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index 2312d3240a7..e901fbe0fc6 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -1010,7 +1010,7 @@ static MACHINE_CONFIG_START( nmg5, nmg5_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(nmg5_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmg5_state, irq6_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(nmg5_sound_map) diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c index 9ff8e5d15ef..7d815c6ecf0 100644 --- a/src/mame/drivers/nmk16.c +++ b/src/mame/drivers/nmk16.c @@ -3549,7 +3549,7 @@ static MACHINE_CONFIG_START( tharrier, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(tharrier_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_CPU_ADD("audiocpu", Z80, 3000000) @@ -3594,7 +3594,7 @@ static MACHINE_CONFIG_START( manybloc, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10? MHz - check */ MCFG_CPU_PROGRAM_MAP(manybloc_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,56)/* this needs to equal the framerate on this, rather than being double it .. */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 56)/* this needs to equal the framerate on this, rather than being double it .. */ MCFG_TIMER_ADD_SCANLINE("scantimer", manybloc_scanline, "screen", 0, 1) MCFG_CPU_ADD("audiocpu", Z80, 3000000) @@ -3637,7 +3637,7 @@ static MACHINE_CONFIG_START( mustang, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ MCFG_CPU_PROGRAM_MAP(mustang_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -3678,7 +3678,7 @@ static MACHINE_CONFIG_START( mustangb, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ MCFG_CPU_PROGRAM_MAP(mustangb_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) SEIBU_SOUND_SYSTEM_CPU(14318180/4) @@ -3712,7 +3712,7 @@ static MACHINE_CONFIG_START( bioship, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, BIOSHIP_CRYSTAL1 ) /* 10.0 MHz (verified) */ MCFG_CPU_PROGRAM_MAP(bioship_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,100)/* 112 breaks the title screen */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 100)/* 112 breaks the title screen */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -3753,7 +3753,7 @@ static MACHINE_CONFIG_START( vandyke, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* 68000p12 running at 10Mhz, verified on pcb */ MCFG_CPU_PROGRAM_MAP(vandyke_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -3794,7 +3794,7 @@ static MACHINE_CONFIG_START( vandykeb, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ MCFG_CPU_PROGRAM_MAP(vandykeb_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_CPU_ADD("mcu", PIC16C57, 12000000) /* 3MHz */ @@ -3828,7 +3828,7 @@ static MACHINE_CONFIG_START( acrobatm, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz (verified on pcb) */ MCFG_CPU_PROGRAM_MAP(acrobatm_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -3870,8 +3870,8 @@ static MACHINE_CONFIG_START( tdragonb, nmk16_state ) /* bootleg using Raiden sou /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(tdragonb_map) - //MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ?? drives music */ + //MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ?? drives music */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) SEIBU_SOUND_SYSTEM_CPU(14318180/4) @@ -3901,8 +3901,8 @@ static MACHINE_CONFIG_START( tdragon, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_8MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tdragon_map) - //MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ?? drives music */ + //MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ?? drives music */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -3944,8 +3944,8 @@ static MACHINE_CONFIG_START( ssmissin, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 Mhz */ MCFG_CPU_PROGRAM_MAP(ssmissin_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112) /* input related */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112) /* input related */ MCFG_CPU_ADD("audiocpu", Z80, 8000000/2) /* 4 Mhz */ MCFG_CPU_PROGRAM_MAP(ssmissin_sound_map) @@ -3977,7 +3977,7 @@ static MACHINE_CONFIG_START( strahl, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ? */ MCFG_CPU_PROGRAM_MAP(strahl_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -4018,8 +4018,8 @@ static MACHINE_CONFIG_START( hachamf, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ MCFG_CPU_PROGRAM_MAP(hachamf_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -4060,8 +4060,8 @@ static MACHINE_CONFIG_START( macross, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ MCFG_CPU_PROGRAM_MAP(macross_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -4101,8 +4101,8 @@ static MACHINE_CONFIG_START( blkheart, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_8MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(macross_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -4142,8 +4142,8 @@ static MACHINE_CONFIG_START( gunnail, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz? */ MCFG_CPU_PROGRAM_MAP(gunnail_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112) MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) @@ -4183,8 +4183,8 @@ static MACHINE_CONFIG_START( macross2, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ MCFG_CPU_PROGRAM_MAP(macross2_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(macross2_sound_map) @@ -4225,8 +4225,8 @@ static MACHINE_CONFIG_START( tdragon2, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(macross2_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(macross2_sound_map) @@ -4267,8 +4267,8 @@ static MACHINE_CONFIG_START( raphero, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) /* 14 MHz measured */ MCFG_CPU_PROGRAM_MAP(raphero_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_CPU_ADD("audiocpu",TMP90841, 8000000) MCFG_CPU_PROGRAM_MAP(raphero_sound_mem_map) @@ -4308,8 +4308,8 @@ static MACHINE_CONFIG_START( bjtwin, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(bjtwin_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ?? drives music */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ?? drives music */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -4934,7 +4934,7 @@ static MACHINE_CONFIG_START( twinactn, nmk16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,12000000) MCFG_CPU_PROGRAM_MAP(twinactn_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) MCFG_CPU_ADD("audiocpu", Z80, 4000000) diff --git a/src/mame/drivers/norautp.c b/src/mame/drivers/norautp.c index 6151ee6cd75..c2c5d1b3248 100644 --- a/src/mame/drivers/norautp.c +++ b/src/mame/drivers/norautp.c @@ -1282,7 +1282,7 @@ static MACHINE_CONFIG_DERIVED( norautp, noraut_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold) MACHINE_CONFIG_END @@ -1290,7 +1290,7 @@ static MACHINE_CONFIG_DERIVED( norautpl, noraut_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold) /* sound hardware */ MCFG_SOUND_MODIFY("discrete") @@ -1303,7 +1303,7 @@ static MACHINE_CONFIG_DERIVED( norautxp, noraut_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(norautxp_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold) MACHINE_CONFIG_END @@ -1312,7 +1312,7 @@ static MACHINE_CONFIG_DERIVED( nortest1, noraut_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(nortest1_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold) MACHINE_CONFIG_END @@ -1321,7 +1321,7 @@ static MACHINE_CONFIG_DERIVED( norautx4, noraut_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(norautx4_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold) MACHINE_CONFIG_END @@ -1331,7 +1331,7 @@ static MACHINE_CONFIG_DERIVED( norautx8, noraut_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(norautx8_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold) MACHINE_CONFIG_END #endif @@ -1341,7 +1341,7 @@ static MACHINE_CONFIG_DERIVED( kimble, noraut_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(kimble_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold) /* sound hardware */ MCFG_SOUND_MODIFY("discrete") @@ -1354,7 +1354,7 @@ static MACHINE_CONFIG_DERIVED( newhilop, noraut_base ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(newhilop_map) // MCFG_CPU_IO_MAP(newhilop_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", norautp_state, irq0_line_hold) MACHINE_CONFIG_END /********** 8080 based **********/ diff --git a/src/mame/drivers/nova2001.c b/src/mame/drivers/nova2001.c index 928472bc3ab..49af05e577c 100644 --- a/src/mame/drivers/nova2001.c +++ b/src/mame/drivers/nova2001.c @@ -683,7 +683,7 @@ static MACHINE_CONFIG_START( nova2001, nova2001_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MAIN_CLOCK/4) // 3 MHz verified on schematics MCFG_CPU_PROGRAM_MAP(nova2001_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nova2001_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -715,11 +715,11 @@ static MACHINE_CONFIG_START( ninjakun, nova2001_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MAIN_CLOCK/4) // 3 MHz MCFG_CPU_PROGRAM_MAP(ninjakun_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nova2001_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, MAIN_CLOCK/4) // 3 MHz MCFG_CPU_PROGRAM_MAP(ninjakun_cpu2_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* ? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nova2001_state, irq0_line_hold, 4*60) /* ? */ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */ @@ -756,7 +756,7 @@ static MACHINE_CONFIG_START( pkunwar, nova2001_state ) MCFG_CPU_ADD("maincpu", Z80, MAIN_CLOCK/4) // 3 MHz MCFG_CPU_PROGRAM_MAP(pkunwar_map) MCFG_CPU_IO_MAP(pkunwar_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nova2001_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -789,11 +789,11 @@ static MACHINE_CONFIG_START( raiders5, nova2001_state ) MCFG_CPU_ADD("maincpu", Z80, MAIN_CLOCK/4) // 3 MHz MCFG_CPU_PROGRAM_MAP(raiders5_cpu1_map) MCFG_CPU_IO_MAP(raiders5_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nova2001_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, MAIN_CLOCK/4) // 3 MHz MCFG_CPU_PROGRAM_MAP(raiders5_cpu2_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* ? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nova2001_state, irq0_line_hold, 4*60) /* ? */ MCFG_QUANTUM_TIME(attotime::from_hz(24000)) diff --git a/src/mame/drivers/nsmpoker.c b/src/mame/drivers/nsmpoker.c index 33f0459c18c..00cc3f73378 100644 --- a/src/mame/drivers/nsmpoker.c +++ b/src/mame/drivers/nsmpoker.c @@ -83,6 +83,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_nsmpoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(nsmpoker_interrupt); }; @@ -145,9 +146,9 @@ void nsmpoker_state::palette_init() * Read / Write Handlers * **************************/ -static INTERRUPT_GEN( nsmpoker_interrupt ) +INTERRUPT_GEN_MEMBER(nsmpoker_state::nsmpoker_interrupt) { - device->execute().set_input_line_and_vector(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) @@ -398,7 +399,7 @@ static MACHINE_CONFIG_START( nsmpoker, nsmpoker_state ) MCFG_CPU_ADD("maincpu", TMS9995L, MASTER_CLOCK/2) /* guess */ MCFG_CPU_PROGRAM_MAP(nsmpoker_map) MCFG_CPU_IO_MAP(nsmpoker_portmap) - MCFG_CPU_VBLANK_INT("screen", nsmpoker_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nsmpoker_state, nsmpoker_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/nss.c b/src/mame/drivers/nss.c index 420f1cd9c6f..aeeaca7dce3 100644 --- a/src/mame/drivers/nss.c +++ b/src/mame/drivers/nss.c @@ -329,6 +329,7 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(game_over_flag_r); virtual void machine_start(); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(nss_vblank_irq); }; @@ -814,12 +815,10 @@ static MACHINE_CONFIG_START( snes, nss_state ) MCFG_SOUND_ROUTE(1, "rspeaker", 1.00) MACHINE_CONFIG_END -static INTERRUPT_GEN ( nss_vblank_irq ) +INTERRUPT_GEN_MEMBER(nss_state::nss_vblank_irq) { - nss_state *state = device->machine().driver_data(); - - if(state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } void nss_state::machine_reset() @@ -845,7 +844,7 @@ static MACHINE_CONFIG_DERIVED( nss, snes ) MCFG_CPU_ADD("bios", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(bios_map) MCFG_CPU_IO_MAP(bios_io_map) - MCFG_CPU_VBLANK_INT("screen", nss_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nss_state, nss_vblank_irq) MCFG_M50458_ADD("m50458",m50458_intf,4000000) /* TODO: correct clock */ MCFG_S3520CF_ADD("s3520cf") /* RTC */ diff --git a/src/mame/drivers/nycaptor.c b/src/mame/drivers/nycaptor.c index 124cf2528ba..439888e8382 100644 --- a/src/mame/drivers/nycaptor.c +++ b/src/mame/drivers/nycaptor.c @@ -832,15 +832,15 @@ static MACHINE_CONFIG_START( nycaptor, nycaptor_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000/2) /* ??? */ MCFG_CPU_PROGRAM_MAP(nycaptor_master_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(nycaptor_slave_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* IRQ generated by ??? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold) /* IRQ generated by ??? */ MCFG_CPU_ADD("audiocpu", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(nycaptor_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* IRQ generated by ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */ MCFG_CPU_ADD("mcu", M68705,2000000) MCFG_CPU_PROGRAM_MAP(nycaptor_m68705_map) @@ -890,15 +890,15 @@ static MACHINE_CONFIG_START( cyclshtg, nycaptor_state ) MCFG_CPU_ADD("maincpu", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(cyclshtg_master_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(cyclshtg_slave_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(nycaptor_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60) #ifdef USE_MCU MCFG_CPU_ADD("mcu", M68705,2000000) @@ -948,16 +948,16 @@ static MACHINE_CONFIG_START( bronx, nycaptor_state ) MCFG_CPU_ADD("maincpu", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(bronx_master_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(bronx_slave_map) MCFG_CPU_IO_MAP(bronx_slave_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(nycaptor_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60) MCFG_QUANTUM_TIME(attotime::from_hz(120)) diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index f3d0e3d0350..89c6dc7582a 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -129,6 +129,7 @@ public: DECLARE_WRITE8_MEMBER(nyny_ay8910_37_port_a_w); virtual void machine_start(); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(update_pia_1); }; @@ -169,20 +170,19 @@ WRITE_LINE_MEMBER(nyny_state::main_cpu_firq) * *************************************/ -static INTERRUPT_GEN( update_pia_1 ) +INTERRUPT_GEN_MEMBER(nyny_state::update_pia_1) { - nyny_state *state = device->machine().driver_data(); /* update the different PIA pins from the input ports */ /* CA1 - copy of PA0 (COIN1) */ - state->m_pia1->ca1_w(state->ioport("IN0")->read() & 0x01); + m_pia1->ca1_w(ioport("IN0")->read() & 0x01); /* CA2 - copy of PA1 (SERVICE1) */ - state->m_pia1->ca2_w(state->ioport("IN0")->read() & 0x02); + m_pia1->ca2_w(ioport("IN0")->read() & 0x02); /* CB1 - (crosshatch) */ - state->m_pia1->cb1_w(state->ioport("CROSS")->read()); + m_pia1->cb1_w(ioport("CROSS")->read()); /* CB2 - NOT CONNECTED */ } @@ -713,7 +713,7 @@ static MACHINE_CONFIG_START( nyny, nyny_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 1400000) /* 1.40 MHz? The clock signal is generated by analog chips */ MCFG_CPU_PROGRAM_MAP(nyny_main_map) - MCFG_CPU_PERIODIC_INT(update_pia_1, 25) + MCFG_CPU_PERIODIC_INT_DRIVER(nyny_state, update_pia_1, 25) MCFG_CPU_ADD("audiocpu", M6802, AUDIO_CPU_1_CLOCK) MCFG_CPU_PROGRAM_MAP(nyny_audio_1_map) diff --git a/src/mame/drivers/ohmygod.c b/src/mame/drivers/ohmygod.c index 9c1fcf57db6..d3f59c180df 100644 --- a/src/mame/drivers/ohmygod.c +++ b/src/mame/drivers/ohmygod.c @@ -319,7 +319,7 @@ static MACHINE_CONFIG_START( ohmygod, ohmygod_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(ohmygod_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ohmygod_state, irq1_line_hold) MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ diff --git a/src/mame/drivers/ojankohs.c b/src/mame/drivers/ojankohs.c index 59877c80645..d4f48616a54 100644 --- a/src/mame/drivers/ojankohs.c +++ b/src/mame/drivers/ojankohs.c @@ -857,7 +857,7 @@ static MACHINE_CONFIG_START( ojankohs, ojankohs_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6.00 MHz ? */ MCFG_CPU_PROGRAM_MAP(ojankohs_map) MCFG_CPU_IO_MAP(ojankohs_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ojankohs_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(ojankohs_state,ojankohs) MCFG_NVRAM_ADD_0FILL("nvram") @@ -893,7 +893,7 @@ static MACHINE_CONFIG_START( ojankoy, ojankohs_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6.00 MHz ? */ MCFG_CPU_PROGRAM_MAP(ojankoy_map) MCFG_CPU_IO_MAP(ojankoy_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ojankohs_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(ojankohs_state,ojankoy) MCFG_NVRAM_ADD_0FILL("nvram") @@ -930,7 +930,7 @@ static MACHINE_CONFIG_START( ccasino, ojankohs_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6.00 MHz ? */ MCFG_CPU_PROGRAM_MAP(ojankoy_map) MCFG_CPU_IO_MAP(ccasino_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ojankohs_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(ojankohs_state,ojankohs) MCFG_NVRAM_ADD_0FILL("nvram") @@ -966,7 +966,7 @@ static MACHINE_CONFIG_START( ojankoc, ojankohs_state ) MCFG_CPU_ADD("maincpu", Z80,8000000/2) /* 4.00 MHz */ MCFG_CPU_PROGRAM_MAP(ojankoc_map) MCFG_CPU_IO_MAP(ojankoc_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ojankohs_state, irq0_line_hold) MCFG_MACHINE_START_OVERRIDE(ojankohs_state,ojankoc) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/olibochu.c b/src/mame/drivers/olibochu.c index d36771dcbf6..fba926379f8 100644 --- a/src/mame/drivers/olibochu.c +++ b/src/mame/drivers/olibochu.c @@ -452,7 +452,7 @@ static MACHINE_CONFIG_START( olibochu, olibochu_state ) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ?? */ MCFG_CPU_PROGRAM_MAP(olibochu_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,60) //??? + MCFG_CPU_PERIODIC_INT_DRIVER(olibochu_state, irq0_line_hold, 60) //??? // MCFG_QUANTUM_PERFECT_CPU("maincpu") diff --git a/src/mame/drivers/omegrace.c b/src/mame/drivers/omegrace.c index 2ff92f6b0b2..e9a629cd72a 100644 --- a/src/mame/drivers/omegrace.c +++ b/src/mame/drivers/omegrace.c @@ -491,7 +491,7 @@ static MACHINE_CONFIG_START( omegrace, omegrace_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/4) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(port_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,250) + MCFG_CPU_PERIODIC_INT_DRIVER(omegrace_state, irq0_line_hold, 250) /* audio CPU */ /* XTAL101 Crystal @ 12mhz */ @@ -500,7 +500,7 @@ static MACHINE_CONFIG_START( omegrace, omegrace_state ) MCFG_CPU_ADD("audiocpu", Z80,12000000/8) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_port) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,250) + MCFG_CPU_PERIODIC_INT_DRIVER(omegrace_state, nmi_line_pulse, 250) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/oneshot.c b/src/mame/drivers/oneshot.c index bf8ffe5cb35..3ac86724acf 100644 --- a/src/mame/drivers/oneshot.c +++ b/src/mame/drivers/oneshot.c @@ -372,7 +372,7 @@ static MACHINE_CONFIG_START( oneshot, oneshot_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(oneshot_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", oneshot_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 5000000) MCFG_CPU_PROGRAM_MAP(oneshot_sound_map) diff --git a/src/mame/drivers/onetwo.c b/src/mame/drivers/onetwo.c index e2f99c21ff8..b500918ea88 100644 --- a/src/mame/drivers/onetwo.c +++ b/src/mame/drivers/onetwo.c @@ -362,7 +362,7 @@ static MACHINE_CONFIG_START( onetwo, onetwo_state ) MCFG_CPU_ADD("maincpu", Z80,MASTER_CLOCK) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(main_cpu) MCFG_CPU_IO_MAP(main_cpu_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", onetwo_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,MASTER_CLOCK) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_cpu) diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index 5d521aabf18..4ca2c2cf17e 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -735,7 +735,7 @@ static MACHINE_CONFIG_START( opwolf, opwolf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK ) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(opwolf_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", opwolf_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK ) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(opwolf_sound_z80_map) @@ -785,14 +785,14 @@ static MACHINE_CONFIG_START( opwolfb, opwolf_state ) /* OSC clocks unknown for t /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK ) /* 8 MHz ??? */ MCFG_CPU_PROGRAM_MAP(opwolfb_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", opwolf_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK ) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(opwolf_sound_z80_map) MCFG_CPU_ADD("sub", Z80, SOUND_CPU_CLOCK ) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(opwolfb_sub_z80_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", opwolf_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */ diff --git a/src/mame/drivers/orbit.c b/src/mame/drivers/orbit.c index 207f124c068..c937177203d 100644 --- a/src/mame/drivers/orbit.c +++ b/src/mame/drivers/orbit.c @@ -47,10 +47,10 @@ static TIMER_CALLBACK( irq_off ) } -static INTERRUPT_GEN( orbit_interrupt ) +INTERRUPT_GEN_MEMBER(orbit_state::orbit_interrupt) { - device->execute().set_input_line(0, ASSERT_LINE); - device->machine().scheduler().timer_set(device->machine().primary_screen->time_until_vblank_end(), FUNC(irq_off)); + device.execute().set_input_line(0, ASSERT_LINE); + machine().scheduler().timer_set(machine().primary_screen->time_until_vblank_end(), FUNC(irq_off)); } @@ -299,7 +299,7 @@ static MACHINE_CONFIG_START( orbit, orbit_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800, MASTER_CLOCK / 16) MCFG_CPU_PROGRAM_MAP(orbit_map) - MCFG_CPU_VBLANK_INT("screen", orbit_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", orbit_state, orbit_interrupt) MCFG_TIMER_ADD_SCANLINE("32v", nmi_32v, "screen", 0, 32) diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c index 5e2cf62a169..f6a652e6630 100644 --- a/src/mame/drivers/othello.c +++ b/src/mame/drivers/othello.c @@ -417,7 +417,7 @@ static MACHINE_CONFIG_START( othello, othello_state ) MCFG_CPU_ADD("maincpu",Z80,XTAL_8MHz/2) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", othello_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu",Z80,XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(audio_map) diff --git a/src/mame/drivers/othldrby.c b/src/mame/drivers/othldrby.c index 894d211396b..e776e8ddc33 100644 --- a/src/mame/drivers/othldrby.c +++ b/src/mame/drivers/othldrby.c @@ -242,7 +242,7 @@ static MACHINE_CONFIG_START( othldrby, othldrby_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(othldrby_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", othldrby_state, irq4_line_hold) /* video hardware */ diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c index 6c924025571..abea9f18aaf 100644 --- a/src/mame/drivers/othunder.c +++ b/src/mame/drivers/othunder.c @@ -273,12 +273,11 @@ WRITE16_MEMBER(othunder_state::irq_ack_w) update_irq(machine()); } -static INTERRUPT_GEN( vblank_interrupt ) +INTERRUPT_GEN_MEMBER(othunder_state::vblank_interrupt) { - othunder_state *state = device->machine().driver_data(); - state->m_vblank_irq = 1; - update_irq(device->machine()); + m_vblank_irq = 1; + update_irq(machine()); } static TIMER_CALLBACK( ad_interrupt ) @@ -710,7 +709,7 @@ static MACHINE_CONFIG_START( othunder, othunder_state ) // MCFG_CPU_ADD("maincpu", M68000, 24000000/2 ) /* 12 MHz */ MCFG_CPU_ADD("maincpu", M68000, 13000000 ) /* fixes garbage graphics on startup */ MCFG_CPU_PROGRAM_MAP(othunder_map) - MCFG_CPU_VBLANK_INT("screen", vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", othunder_state, vblank_interrupt) MCFG_CPU_ADD("audiocpu", Z80,16000000/4 ) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c index 3396ba13473..2024664a4da 100644 --- a/src/mame/drivers/overdriv.c +++ b/src/mame/drivers/overdriv.c @@ -86,12 +86,11 @@ static TIMER_DEVICE_CALLBACK( overdriv_cpuA_scanline ) timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( cpuB_interrupt ) +INTERRUPT_GEN_MEMBER(overdriv_state::cpuB_interrupt) { - overdriv_state *state = device->machine().driver_data(); - if (k053246_is_irq_enabled(state->m_k053246)) - device->execute().set_input_line(4, HOLD_LINE); + if (k053246_is_irq_enabled(m_k053246)) + device.execute().set_input_line(4, HOLD_LINE); } @@ -333,7 +332,7 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state ) MCFG_CPU_ADD("sub", M68000,24000000/2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(overdriv_slave_map) - MCFG_CPU_VBLANK_INT("screen", cpuB_interrupt) /* IRQ 5 and 6 are generated by the main CPU. */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", overdriv_state, cpuB_interrupt) /* IRQ 5 and 6 are generated by the main CPU. */ /* IRQ 5 is used only in test mode, to request the checksums of the gfx ROMs. */ MCFG_CPU_ADD("audiocpu", M6809,3579545) /* 1.789 MHz?? This might be the right speed, but ROM testing */ diff --git a/src/mame/drivers/pachifev.c b/src/mame/drivers/pachifev.c index 125556931a0..950438d7c32 100644 --- a/src/mame/drivers/pachifev.c +++ b/src/mame/drivers/pachifev.c @@ -107,6 +107,7 @@ public: DECLARE_READ8_MEMBER(controls_r); virtual void machine_start(); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(pachifev_vblank_irq); }; WRITE8_MEMBER(pachifev_state::controls_w) @@ -317,34 +318,33 @@ void pachifev_state::machine_reset() } -static INTERRUPT_GEN( pachifev_vblank_irq ) +INTERRUPT_GEN_MEMBER(pachifev_state::pachifev_vblank_irq) { { static const char *const inname[2] = { "PLUNGER_P1", "PLUNGER_P2" }; - pachifev_state *state = device->machine().driver_data(); /* I wish I had found a better way to handle cocktail inputs, but I can't find a way to access internal RAM */ /* (bit 5 of 0xf0aa : 0 = player 1 and 1 = player 2 - bit 6 of 0xf0aa : 0 = upright and 1 = cocktail). */ /* All I found is that in main RAM, 0xe00f.b determines the player : 0x00 = player 1 and 0x01 = player 2. */ - address_space *ramspace = device->memory().space(AS_PROGRAM); + address_space *ramspace = device.memory().space(AS_PROGRAM); UINT8 player = 0; - if ((ramspace->read_byte(0xe00f) == 0x01) && ((state->ioport("DSW1")->read() & 0x08) == 0x00)) + if ((ramspace->read_byte(0xe00f) == 0x01) && ((ioport("DSW1")->read() & 0x08) == 0x00)) player = 1; - int current_power=state->ioport(inname[player])->read() & 0x3f; - if(current_power != state->m_previous_power) + int current_power=ioport(inname[player])->read() & 0x3f; + if(current_power != m_previous_power) { popmessage ("%d%%", (current_power * 100) / 0x3f); } - if( (!current_power) && (state->m_previous_power) ) + if( (!current_power) && (m_previous_power) ) { - state->m_input_power=state->m_previous_power; - state->m_cnt=NUM_PLUNGER_REPEATS; + m_input_power=m_previous_power; + m_cnt=NUM_PLUNGER_REPEATS; } - state->m_previous_power=current_power; + m_previous_power=current_power; } } @@ -378,7 +378,7 @@ static MACHINE_CONFIG_START( pachifev, pachifev_state ) MCFG_CPU_CONFIG(pachifev_processor_config) MCFG_CPU_PROGRAM_MAP(pachifev_map) MCFG_CPU_IO_MAP(pachifev_cru) - MCFG_CPU_VBLANK_INT("screen",pachifev_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pachifev_state, pachifev_vblank_irq) /* video hardware */ diff --git a/src/mame/drivers/pacland.c b/src/mame/drivers/pacland.c index e8ade835d96..f3f4f691538 100644 --- a/src/mame/drivers/pacland.c +++ b/src/mame/drivers/pacland.c @@ -396,20 +396,18 @@ static const namco_interface namco_config = 0 /* stereo */ }; -static INTERRUPT_GEN( main_vblank_irq ) +INTERRUPT_GEN_MEMBER(pacland_state::main_vblank_irq) { - pacland_state *state = device->machine().driver_data(); - if(state->m_main_irq_mask) - device->machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); + if(m_main_irq_mask) + machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); } -static INTERRUPT_GEN( mcu_vblank_irq ) +INTERRUPT_GEN_MEMBER(pacland_state::mcu_vblank_irq) { - pacland_state *state = device->machine().driver_data(); - if(state->m_mcu_irq_mask) - device->machine().device("mcu")->execute().set_input_line(0, ASSERT_LINE); + if(m_mcu_irq_mask) + machine().device("mcu")->execute().set_input_line(0, ASSERT_LINE); } static MACHINE_CONFIG_START( pacland, pacland_state ) @@ -417,12 +415,12 @@ static MACHINE_CONFIG_START( pacland, pacland_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 49152000/32) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", main_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pacland_state, main_vblank_irq) MCFG_CPU_ADD("mcu", HD63701, 49152000/8) /* 1.536 MHz? */ MCFG_CPU_PROGRAM_MAP(mcu_map) MCFG_CPU_IO_MAP(mcu_port_map) - MCFG_CPU_VBLANK_INT("screen", mcu_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pacland_state, mcu_vblank_irq) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synching between the MCU and the CPU */ diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c index 713627c03fc..62098382f76 100644 --- a/src/mame/drivers/pacman.c +++ b/src/mame/drivers/pacman.c @@ -399,20 +399,18 @@ MACHINE_RESET_MEMBER(pacman_state,superabc) * *************************************/ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(pacman_state::vblank_irq) { - pacman_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } -static INTERRUPT_GEN( vblank_nmi ) +INTERRUPT_GEN_MEMBER(pacman_state::vblank_nmi) { - pacman_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_irq_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(pacman_state::irq_mask_w) @@ -694,9 +692,9 @@ READ8_MEMBER(pacman_state::bigbucks_question_r) * ************************************/ -static INTERRUPT_GEN( s2650_interrupt ) +INTERRUPT_GEN_MEMBER(pacman_state::s2650_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); } WRITE8_MEMBER(pacman_state::porky_banking_w) @@ -3294,7 +3292,7 @@ static MACHINE_CONFIG_START( pacman, pacman_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) MCFG_CPU_PROGRAM_MAP(pacman_map) MCFG_CPU_IO_MAP(writeport) - MCFG_CPU_VBLANK_INT("screen",vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pacman_state, vblank_irq) MCFG_WATCHDOG_VBLANK_INIT(16) /* video hardware */ @@ -3375,7 +3373,7 @@ static MACHINE_CONFIG_DERIVED( dremshpr, pacman ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(dremshpr_map) MCFG_CPU_IO_MAP(dremshpr_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_nmi) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pacman_state, vblank_nmi) /* sound hardware */ MCFG_SOUND_REPLACE("namco", AY8910, 14318000/8) @@ -3413,7 +3411,7 @@ static MACHINE_CONFIG_DERIVED( vanvan, pacman ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(dremshpr_map) MCFG_CPU_IO_MAP(vanvan_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_nmi) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pacman_state, vblank_nmi) /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -3435,7 +3433,7 @@ static MACHINE_CONFIG_DERIVED( bigbucks, pacman ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(bigbucks_map) MCFG_CPU_IO_MAP(bigbucks_portmap) - MCFG_CPU_PERIODIC_INT(vblank_irq,20*60) + MCFG_CPU_PERIODIC_INT_DRIVER(pacman_state, vblank_irq, 20*60) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) @@ -3448,7 +3446,7 @@ static MACHINE_CONFIG_DERIVED( s2650games, pacman ) MCFG_DEVICE_REMOVE("maincpu") MCFG_CPU_ADD("maincpu", S2650, MASTER_CLOCK/6/2) /* 2H */ MCFG_CPU_PROGRAM_MAP(s2650games_map) - MCFG_CPU_VBLANK_INT("screen", s2650_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pacman_state, s2650_interrupt) MCFG_GFXDECODE(s2650games) @@ -3496,7 +3494,7 @@ static MACHINE_CONFIG_DERIVED( rocktrv2, pacman ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(rocktrv2_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pacman_state, irq0_line_hold) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) @@ -3509,7 +3507,7 @@ static MACHINE_CONFIG_DERIVED( mschamp, pacman ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(mschamp_map) MCFG_CPU_IO_MAP(mschamp_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pacman_state, vblank_irq) MCFG_MACHINE_RESET_OVERRIDE(pacman_state,mschamp) MACHINE_CONFIG_END diff --git a/src/mame/drivers/pandoras.c b/src/mame/drivers/pandoras.c index 6038214b487..aacc50a2484 100644 --- a/src/mame/drivers/pandoras.c +++ b/src/mame/drivers/pandoras.c @@ -35,20 +35,18 @@ Boards: #define SOUND_CLOCK XTAL_14_31818MHz -static INTERRUPT_GEN( pandoras_master_interrupt ) +INTERRUPT_GEN_MEMBER(pandoras_state::pandoras_master_interrupt) { - pandoras_state *state = device->machine().driver_data(); - if (state->m_irq_enable_a) - device->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE); + if (m_irq_enable_a) + device.execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE); } -static INTERRUPT_GEN( pandoras_slave_interrupt ) +INTERRUPT_GEN_MEMBER(pandoras_state::pandoras_slave_interrupt) { - pandoras_state *state = device->machine().driver_data(); - if (state->m_irq_enable_b) - device->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE); + if (m_irq_enable_b) + device.execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(pandoras_state::pandoras_int_control_w) @@ -344,11 +342,11 @@ static MACHINE_CONFIG_START( pandoras, pandoras_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/6) /* CPU A */ MCFG_CPU_PROGRAM_MAP(pandoras_master_map) - MCFG_CPU_VBLANK_INT("screen", pandoras_master_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pandoras_state, pandoras_master_interrupt) MCFG_CPU_ADD("sub", M6809, MASTER_CLOCK/6) /* CPU B */ MCFG_CPU_PROGRAM_MAP(pandoras_slave_map) - MCFG_CPU_VBLANK_INT("screen", pandoras_slave_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pandoras_state, pandoras_slave_interrupt) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK/8) MCFG_CPU_PROGRAM_MAP(pandoras_sound_map) diff --git a/src/mame/drivers/paradise.c b/src/mame/drivers/paradise.c index 4e3ecc8e259..f5547771a85 100644 --- a/src/mame/drivers/paradise.c +++ b/src/mame/drivers/paradise.c @@ -692,14 +692,13 @@ void paradise_state::machine_reset() } -static INTERRUPT_GEN(paradise_irq) +INTERRUPT_GEN_MEMBER(paradise_state::paradise_irq) { - paradise_state *state = device->machine().driver_data(); - if (state->irq_count<300) - state->irq_count++; + if (irq_count<300) + irq_count++; else - device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); + machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); } static MACHINE_CONFIG_START( paradise, paradise_state ) @@ -708,7 +707,7 @@ static MACHINE_CONFIG_START( paradise, paradise_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* Z8400B - 6mhz Verified */ MCFG_CPU_PROGRAM_MAP(paradise_map) MCFG_CPU_IO_MAP(paradise_io_map) - MCFG_CPU_PERIODIC_INT(paradise_irq,4*54) /* No nmi routine, timing is confirmed (i.e. three timing irqs for each vblank irq */ + MCFG_CPU_PERIODIC_INT_DRIVER(paradise_state, paradise_irq, 4*54) /* No nmi routine, timing is confirmed (i.e. three timing irqs for each vblank irq */ /* video hardware */ diff --git a/src/mame/drivers/parodius.c b/src/mame/drivers/parodius.c index f410a8a5c8e..82426fc836c 100644 --- a/src/mame/drivers/parodius.c +++ b/src/mame/drivers/parodius.c @@ -19,11 +19,10 @@ static KONAMI_SETLINES_CALLBACK( parodius_banking ); -static INTERRUPT_GEN( parodius_interrupt ) +INTERRUPT_GEN_MEMBER(parodius_state::parodius_interrupt) { - parodius_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) - device->execute().set_input_line(0, HOLD_LINE); + if (k052109_is_irq_enabled(m_k052109)) + device.execute().set_input_line(0, HOLD_LINE); } READ8_MEMBER(parodius_state::bankedram_r) @@ -290,7 +289,7 @@ static MACHINE_CONFIG_START( parodius, parodius_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* 053248 */ MCFG_CPU_PROGRAM_MAP(parodius_map) - MCFG_CPU_VBLANK_INT("screen", parodius_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", parodius_state, parodius_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(parodius_sound_map) diff --git a/src/mame/drivers/pasha2.c b/src/mame/drivers/pasha2.c index 3d1be994719..7180e50e07e 100644 --- a/src/mame/drivers/pasha2.c +++ b/src/mame/drivers/pasha2.c @@ -418,7 +418,7 @@ static MACHINE_CONFIG_START( pasha2, pasha2_state ) MCFG_CPU_ADD("maincpu", E116XT, 20000000*4) /* 4x internal multiplier */ MCFG_CPU_PROGRAM_MAP(pasha2_map) MCFG_CPU_IO_MAP(pasha2_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pasha2_state, irq0_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/pass.c b/src/mame/drivers/pass.c index 646a19ed181..f4bb3ce9d46 100644 --- a/src/mame/drivers/pass.c +++ b/src/mame/drivers/pass.c @@ -236,12 +236,12 @@ static MACHINE_CONFIG_START( pass, pass_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14318180/2 ) MCFG_CPU_PROGRAM_MAP(pass_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) /* all the same */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", pass_state, irq1_line_hold) /* all the same */ MCFG_CPU_ADD("audiocpu", Z80, 14318180/4 ) MCFG_CPU_PROGRAM_MAP(pass_sound_map) MCFG_CPU_IO_MAP(pass_sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,60) /* probably not accurate, unknown timing and generation (ym2203 sound chip?). */ + MCFG_CPU_PERIODIC_INT_DRIVER(pass_state, irq0_line_hold, 60) /* probably not accurate, unknown timing and generation (ym2203 sound chip?). */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/pastelg.c b/src/mame/drivers/pastelg.c index a16b38d15c4..911a3100f42 100644 --- a/src/mame/drivers/pastelg.c +++ b/src/mame/drivers/pastelg.c @@ -410,7 +410,7 @@ static MACHINE_CONFIG_START( pastelg, pastelg_state ) MCFG_CPU_ADD("maincpu", Z80, 19968000/4) /* unknown divider, galds definitely relies on this for correct voice pitch */ MCFG_CPU_PROGRAM_MAP(pastelg_map) MCFG_CPU_IO_MAP(pastelg_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) // nmiclock not written, chip is 1411M1 instead of 1413M3 + MCFG_CPU_VBLANK_INT_DRIVER("screen", pastelg_state, irq0_line_assert) // nmiclock not written, chip is 1411M1 instead of 1413M3 MCFG_MACHINE_RESET(nb1413m3) MCFG_NVRAM_ADD_0FILL("nvram") @@ -466,7 +466,7 @@ static MACHINE_CONFIG_START( threeds, pastelg_state ) MCFG_CPU_ADD("maincpu", Z80, 19968000/4) /* unknown divider, galds definitely relies on this for correct voice pitch */ MCFG_CPU_PROGRAM_MAP(pastelg_map) MCFG_CPU_IO_MAP(threeds_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pastelg_state, irq0_line_assert) MCFG_MACHINE_RESET(nb1413m3) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/pbaction.c b/src/mame/drivers/pbaction.c index 385c60ee525..09bd3f39d99 100644 --- a/src/mame/drivers/pbaction.c +++ b/src/mame/drivers/pbaction.c @@ -249,9 +249,9 @@ static GFXDECODE_START( pbaction ) GFXDECODE_END -static INTERRUPT_GEN( pbaction_interrupt ) +INTERRUPT_GEN_MEMBER(pbaction_state::pbaction_interrupt) { - device->execute().set_input_line_and_vector(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 */ } @@ -270,12 +270,11 @@ void pbaction_state::machine_reset() m_scroll = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(pbaction_state::vblank_irq) { - pbaction_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( pbaction, pbaction_state ) @@ -283,12 +282,12 @@ static MACHINE_CONFIG_START( pbaction, pbaction_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(pbaction_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pbaction_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, 3072000) MCFG_CPU_PROGRAM_MAP(pbaction_sound_map) MCFG_CPU_IO_MAP(pbaction_sound_io_map) - MCFG_CPU_PERIODIC_INT(pbaction_interrupt,2*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(pbaction_state, pbaction_interrupt, 2*60) /* ??? */ /* IRQs are caused by the main CPU */ diff --git a/src/mame/drivers/pcktgal.c b/src/mame/drivers/pcktgal.c index 83cb7d8d8eb..5e9c5de8361 100644 --- a/src/mame/drivers/pcktgal.c +++ b/src/mame/drivers/pcktgal.c @@ -222,7 +222,7 @@ static MACHINE_CONFIG_START( pcktgal, pcktgal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 2000000) MCFG_CPU_PROGRAM_MAP(pcktgal_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pcktgal_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", M6502, 1500000) MCFG_CPU_PROGRAM_MAP(pcktgal_sound_map) diff --git a/src/mame/drivers/pengo.c b/src/mame/drivers/pengo.c index 9e9bc6014b6..fe130576092 100644 --- a/src/mame/drivers/pengo.c +++ b/src/mame/drivers/pengo.c @@ -77,6 +77,7 @@ public: DECLARE_WRITE8_MEMBER(irq_mask_w); DECLARE_DRIVER_INIT(penta); DECLARE_DRIVER_INIT(pengo); + INTERRUPT_GEN_MEMBER(vblank_irq); }; @@ -369,12 +370,11 @@ static const namco_interface namco_config = * *************************************/ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(pengo_state::vblank_irq) { - pengo_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -383,7 +383,7 @@ static MACHINE_CONFIG_START( pengo, pengo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) MCFG_CPU_PROGRAM_MAP(pengo_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pengo_state, vblank_irq) /* video hardware */ MCFG_GFXDECODE(pengo) diff --git a/src/mame/drivers/peyper.c b/src/mame/drivers/peyper.c index 88f3e8289f4..3de34dc1c04 100644 --- a/src/mame/drivers/peyper.c +++ b/src/mame/drivers/peyper.c @@ -537,7 +537,7 @@ static MACHINE_CONFIG_START( peyper, peyper_state ) MCFG_CPU_ADD("maincpu", Z80, 2500000) MCFG_CPU_PROGRAM_MAP(peyper_map) MCFG_CPU_IO_MAP(peyper_io) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 1250 * 2) + MCFG_CPU_PERIODIC_INT_DRIVER(peyper_state, irq0_line_hold, 1250 * 2) /* video hardware */ diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index f577fb294f0..536601e7fef 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -520,7 +520,7 @@ MACHINE_CONFIG_FRAGMENT( pgmbase ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 20000000) /* 20 mhz! verified on real board */ MCFG_CPU_PROGRAM_MAP(pgm_basic_mem) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pgm_state, irq6_line_hold) MCFG_TIMER_ADD_SCANLINE("scantimer", pgm_interrupt, "screen", 0, 1) MCFG_CPU_ADD("soundcpu", Z80, 33868800/4) diff --git a/src/mame/drivers/photon.c b/src/mame/drivers/photon.c index 2b4c6ed0285..1cf054849b7 100644 --- a/src/mame/drivers/photon.c +++ b/src/mame/drivers/photon.c @@ -37,6 +37,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_photon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(pk8000_interrupt); }; @@ -185,9 +186,9 @@ static INPUT_PORTS_START( photon ) PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END -static INTERRUPT_GEN( pk8000_interrupt ) +INTERRUPT_GEN_MEMBER(photon_state::pk8000_interrupt) { - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } static IRQ_CALLBACK(pk8000_irq_callback) @@ -217,7 +218,7 @@ static MACHINE_CONFIG_START( photon, photon_state ) MCFG_CPU_ADD("maincpu",I8080, 1780000) MCFG_CPU_PROGRAM_MAP(pk8000_mem) MCFG_CPU_IO_MAP(pk8000_io) - MCFG_CPU_VBLANK_INT("screen", pk8000_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", photon_state, pk8000_interrupt) /* video hardware */ diff --git a/src/mame/drivers/pinkiri8.c b/src/mame/drivers/pinkiri8.c index 615ba482587..7467d8293ff 100644 --- a/src/mame/drivers/pinkiri8.c +++ b/src/mame/drivers/pinkiri8.c @@ -1132,7 +1132,7 @@ static MACHINE_CONFIG_START( pinkiri8, pinkiri8_state ) MCFG_CPU_ADD("maincpu",Z180,16000000) MCFG_CPU_PROGRAM_MAP(pinkiri8_map) MCFG_CPU_IO_MAP(pinkiri8_io) - MCFG_CPU_VBLANK_INT("screen",nmi_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pinkiri8_state, nmi_line_assert) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c index d7cea9d08bf..e54bbb8de08 100644 --- a/src/mame/drivers/pipeline.c +++ b/src/mame/drivers/pipeline.c @@ -391,7 +391,7 @@ static MACHINE_CONFIG_START( pipeline, pipeline_state ) MCFG_CPU_ADD("maincpu", Z80, 7372800/2) MCFG_CPU_PROGRAM_MAP(cpu0_mem) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pipeline_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", Z80, 7372800/2) MCFG_CPU_CONFIG(daisy_chain_sound) diff --git a/src/mame/drivers/pirates.c b/src/mame/drivers/pirates.c index 7ec34a53ef4..6b01d19c12d 100644 --- a/src/mame/drivers/pirates.c +++ b/src/mame/drivers/pirates.c @@ -263,7 +263,7 @@ GFXDECODE_END static MACHINE_CONFIG_START( pirates, pirates_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16mhz */ MCFG_CPU_PROGRAM_MAP(pirates_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pirates_state, irq1_line_hold) MCFG_EEPROM_ADD("eeprom", eeprom_intf) diff --git a/src/mame/drivers/pitnrun.c b/src/mame/drivers/pitnrun.c index 7fee2a2e0c6..207aa4aea64 100644 --- a/src/mame/drivers/pitnrun.c +++ b/src/mame/drivers/pitnrun.c @@ -70,10 +70,9 @@ K1000233A #include "includes/pitnrun.h" -static INTERRUPT_GEN( pitnrun_nmi_source ) +INTERRUPT_GEN_MEMBER(pitnrun_state::pitnrun_nmi_source) { - pitnrun_state *state = device->machine().driver_data(); - if(state->m_nmi) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } WRITE8_MEMBER(pitnrun_state::nmi_enable_w) @@ -231,12 +230,12 @@ GFXDECODE_END static MACHINE_CONFIG_START( pitnrun, pitnrun_state ) MCFG_CPU_ADD("maincpu", Z80,XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(pitnrun_map) - MCFG_CPU_VBLANK_INT("screen", pitnrun_nmi_source) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pitnrun_state, pitnrun_nmi_source) MCFG_CPU_ADD("audiocpu", Z80, XTAL_5MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(pitnrun_sound_map) MCFG_CPU_IO_MAP(pitnrun_sound_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pitnrun_state, irq0_line_hold) MCFG_CPU_ADD("mcu", M68705,XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(pitnrun_mcu_map) diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c index 03162a8d79c..d86ab138b63 100644 --- a/src/mame/drivers/pkscram.c +++ b/src/mame/drivers/pkscram.c @@ -303,7 +303,7 @@ static MACHINE_CONFIG_START( pkscramble, pkscram_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000 ) MCFG_CPU_PROGRAM_MAP(pkscramble_map) - //MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) /* only valid irq */ + //MCFG_CPU_VBLANK_INT_DRIVER("screen", pkscram_state, irq1_line_hold) /* only valid irq */ MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/pktgaldx.c b/src/mame/drivers/pktgaldx.c index fdc49c35268..a8ef4444f66 100644 --- a/src/mame/drivers/pktgaldx.c +++ b/src/mame/drivers/pktgaldx.c @@ -328,7 +328,7 @@ static MACHINE_CONFIG_START( pktgaldx, pktgaldx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(pktgaldx_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pktgaldx_state, irq6_line_hold) /* video hardware */ @@ -367,7 +367,7 @@ static MACHINE_CONFIG_START( pktgaldb, pktgaldx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(pktgaldb_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pktgaldx_state, irq6_line_hold) /* video hardware */ diff --git a/src/mame/drivers/playch10.c b/src/mame/drivers/playch10.c index 58f9d6589d8..be389c160ef 100644 --- a/src/mame/drivers/playch10.c +++ b/src/mame/drivers/playch10.c @@ -656,16 +656,15 @@ static GFXDECODE_START( playch10 ) GFXDECODE_ENTRY( "gfx1", 0, bios_charlayout, 0, 32 ) GFXDECODE_END -static INTERRUPT_GEN( playch10_interrupt ) { - playch10_state *state = device->machine().driver_data(); +INTERRUPT_GEN_MEMBER(playch10_state::playch10_interrupt){ /* LS161A, Sheet 1 - bottom left of Z80 */ - if ( !state->m_pc10_dog_di && !state->m_pc10_nmi_enable ) { - device->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE ); + if ( !m_pc10_dog_di && !m_pc10_nmi_enable ) { + device.execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE ); } - else if ( state->m_pc10_nmi_enable ) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + else if ( m_pc10_nmi_enable ) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static const nes_interface nes_config = @@ -679,7 +678,7 @@ static MACHINE_CONFIG_START( playch10, playch10_state ) MCFG_CPU_ADD("maincpu", Z80, 8000000/2) // 4 MHz MCFG_CPU_PROGRAM_MAP(bios_map) MCFG_CPU_IO_MAP(bios_io_map) - MCFG_CPU_VBLANK_INT("top", playch10_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("top", playch10_state, playch10_interrupt) MCFG_CPU_ADD("cart", N2A03, N2A03_DEFAULTCLOCK) MCFG_CPU_PROGRAM_MAP(cart_map) diff --git a/src/mame/drivers/playmark.c b/src/mame/drivers/playmark.c index 491cb159a99..8b1b2b47aa3 100644 --- a/src/mame/drivers/playmark.c +++ b/src/mame/drivers/playmark.c @@ -1069,7 +1069,7 @@ static MACHINE_CONFIG_START( bigtwin, playmark_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(bigtwin_main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C57, 12000000) /* 3MHz */ /* Program and Data Maps are internal to the MCU */ @@ -1103,7 +1103,7 @@ static MACHINE_CONFIG_START( bigtwinb, playmark_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(bigtwinb_main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C57, 12000000) /* 3MHz */ /* Program and Data Maps are internal to the MCU */ @@ -1137,7 +1137,7 @@ static MACHINE_CONFIG_START( wbeachvl, playmark_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(wbeachvl_main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq2_line_hold) // MCFG_CPU_ADD("audiocpu", PIC16C57, 12000000) /* 3MHz */ /* Program and Data Maps are internal to the MCU */ @@ -1174,7 +1174,7 @@ static MACHINE_CONFIG_START( excelsr, playmark_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(excelsr_main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C57, 12000000) /* 3MHz */ /* Program and Data Maps are internal to the MCU */ @@ -1208,7 +1208,7 @@ static MACHINE_CONFIG_START( hotmind, playmark_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(hotmind_main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C57, XTAL_24MHz/2) /* verified on pcb */ /* Program and Data Maps are internal to the MCU */ @@ -1245,7 +1245,7 @@ static MACHINE_CONFIG_START( hrdtimes, playmark_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(hrdtimes_main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq6_line_hold) // MCFG_CPU_ADD("audiocpu", PIC16C57, XTAL_24MHz/2) /* verified on pcb */ /* Program and Data Maps are internal to the MCU */ diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c index 19f2232fb00..4184fd4c103 100644 --- a/src/mame/drivers/plygonet.c +++ b/src/mame/drivers/plygonet.c @@ -154,9 +154,9 @@ READ32_MEMBER(polygonet_state::psac_rom_r) /* irq 3 is network. don't generate if you don't emulate the network h/w! */ /* irq 5 is vblank */ /* irq 7 does nothing (it jsrs to a rts and then rte) */ -static INTERRUPT_GEN(polygonet_interrupt) +INTERRUPT_GEN_MEMBER(polygonet_state::polygonet_interrupt) { - device->execute().set_input_line(M68K_IRQ_5, HOLD_LINE); + device.execute().set_input_line(M68K_IRQ_5, HOLD_LINE); } /* sound CPU communications */ @@ -555,9 +555,9 @@ WRITE8_MEMBER(polygonet_state::sound_bankswitch_w) reset_sound_region(machine()); } -static INTERRUPT_GEN(audio_interrupt) +INTERRUPT_GEN_MEMBER(polygonet_state::audio_interrupt) { - device->execute().set_input_line(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 ) @@ -622,7 +622,7 @@ static MACHINE_CONFIG_START( plygonet, polygonet_state ) MCFG_CPU_ADD("maincpu", M68EC020, 16000000) /* 16 MHz (xtal is 32.0 MHz) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", polygonet_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", polygonet_state, polygonet_interrupt) MCFG_CPU_ADD("dsp", DSP56156, 40000000) /* xtal is 40.0 MHz, DSP has an internal divide-by-2 */ MCFG_CPU_PROGRAM_MAP(dsp_program_map) @@ -630,7 +630,7 @@ static MACHINE_CONFIG_START( plygonet, polygonet_state ) MCFG_CPU_ADD("soundcpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(audio_interrupt, 480) + MCFG_CPU_PERIODIC_INT_DRIVER(polygonet_state, audio_interrupt, 480) MCFG_GFXDECODE(plygonet) diff --git a/src/mame/drivers/pokechmp.c b/src/mame/drivers/pokechmp.c index 6a3b4eddd7c..3576e87668c 100644 --- a/src/mame/drivers/pokechmp.c +++ b/src/mame/drivers/pokechmp.c @@ -206,11 +206,11 @@ static MACHINE_CONFIG_START( pokechmp, pokechmp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 4000000) MCFG_CPU_PROGRAM_MAP(pokechmp_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pokechmp_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", M6502, 4000000) MCFG_CPU_PROGRAM_MAP(pokechmp_sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pokechmp_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/poker72.c b/src/mame/drivers/poker72.c index 69a0ca1352c..0ce178bbd6a 100644 --- a/src/mame/drivers/poker72.c +++ b/src/mame/drivers/poker72.c @@ -354,7 +354,7 @@ static MACHINE_CONFIG_START( poker72, poker72_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(poker72_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", poker72_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c index ffb559a5013..960048866f0 100644 --- a/src/mame/drivers/policetr.c +++ b/src/mame/drivers/policetr.c @@ -107,10 +107,10 @@ static TIMER_CALLBACK( irq5_gen ) } -static INTERRUPT_GEN( irq4_gen ) +INTERRUPT_GEN_MEMBER(policetr_state::irq4_gen) { - 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)); + device.execute().set_input_line(R3000_IRQ4, ASSERT_LINE); + machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), FUNC(irq5_gen)); } @@ -416,7 +416,7 @@ static MACHINE_CONFIG_START( policetr, policetr_state ) MCFG_CPU_ADD("maincpu", R3000BE, MASTER_CLOCK/2) MCFG_CPU_CONFIG(r3000_config) MCFG_CPU_PROGRAM_MAP(policetr_map) - MCFG_CPU_VBLANK_INT("screen", irq4_gen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", policetr_state, irq4_gen) MCFG_EEPROM_ADD("eeprom", eeprom_interface_policetr) diff --git a/src/mame/drivers/polyplay.c b/src/mame/drivers/polyplay.c index 627e0189881..d71d2093d15 100644 --- a/src/mame/drivers/polyplay.c +++ b/src/mame/drivers/polyplay.c @@ -118,24 +118,23 @@ void polyplay_state::machine_reset() } -static INTERRUPT_GEN( periodic_interrupt ) +INTERRUPT_GEN_MEMBER(polyplay_state::periodic_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x4e); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x4e); } -static INTERRUPT_GEN( coin_interrupt ) +INTERRUPT_GEN_MEMBER(polyplay_state::coin_interrupt) { - polyplay_state *state = device->machine().driver_data(); - if (state->ioport("INPUT")->read() & 0x80) - state->m_last = 0; + if (ioport("INPUT")->read() & 0x80) + m_last = 0; else { - if (state->m_last == 0) /* coin inserted */ - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x50); + if (m_last == 0) /* coin inserted */ + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x50); - state->m_last = 1; + m_last = 1; } } @@ -273,8 +272,8 @@ static MACHINE_CONFIG_START( polyplay, polyplay_state ) MCFG_CPU_ADD("maincpu", Z80, 9830400/4) MCFG_CPU_PROGRAM_MAP(polyplay_map) MCFG_CPU_IO_MAP(polyplay_io_map) - MCFG_CPU_PERIODIC_INT(periodic_interrupt,75) - MCFG_CPU_VBLANK_INT("screen", coin_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(polyplay_state, periodic_interrupt, 75) + MCFG_CPU_VBLANK_INT_DRIVER("screen", polyplay_state, coin_interrupt) MCFG_TIMER_ADD("timer", polyplay_timer_callback) diff --git a/src/mame/drivers/poo.c b/src/mame/drivers/poo.c index 427a965d5db..6b3d71e1f0c 100644 --- a/src/mame/drivers/poo.c +++ b/src/mame/drivers/poo.c @@ -339,13 +339,13 @@ static MACHINE_CONFIG_START( unclepoo, poo_state ) MCFG_CPU_ADD("maincpu", Z80,18000000/6) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(unclepoo_main_map) MCFG_CPU_IO_MAP(unclepoo_main_portmap) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,256) // ??? controls game speed + MCFG_CPU_VBLANK_INT_DRIVER("screen", poo_state, nmi_line_pulse) + MCFG_CPU_PERIODIC_INT_DRIVER(poo_state, irq0_line_hold, 256) // ??? controls game speed MCFG_CPU_ADD("subcpu", Z80,18000000/12) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(unclepoo_sub_map) MCFG_CPU_IO_MAP(unclepoo_sub_portmap) -// MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", poo_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/poolshrk.c b/src/mame/drivers/poolshrk.c index 3121fa3e021..f0a82546031 100644 --- a/src/mame/drivers/poolshrk.c +++ b/src/mame/drivers/poolshrk.c @@ -216,7 +216,7 @@ static MACHINE_CONFIG_START( poolshrk, poolshrk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800, 11055000 / 8) /* ? */ MCFG_CPU_PROGRAM_MAP(poolshrk_cpu_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", poolshrk_state, irq0_line_assert) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/pooyan.c b/src/mame/drivers/pooyan.c index 44a1415375f..35e50798195 100644 --- a/src/mame/drivers/pooyan.c +++ b/src/mame/drivers/pooyan.c @@ -24,12 +24,11 @@ * *************************************/ -static INTERRUPT_GEN( pooyan_interrupt ) +INTERRUPT_GEN_MEMBER(pooyan_state::pooyan_interrupt) { - pooyan_state *state = device->machine().driver_data(); - if (state->m_irq_enable) - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + if (m_irq_enable) + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } @@ -193,7 +192,7 @@ static MACHINE_CONFIG_START( pooyan, pooyan_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", pooyan_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pooyan_state, pooyan_interrupt) /* video hardware */ diff --git a/src/mame/drivers/popeye.c b/src/mame/drivers/popeye.c index cfbdde9cbbf..44fd68c1c19 100644 --- a/src/mame/drivers/popeye.c +++ b/src/mame/drivers/popeye.c @@ -21,11 +21,11 @@ Notes: #include "sound/ay8910.h" #include "includes/popeye.h" -static INTERRUPT_GEN( popeye_interrupt ) +INTERRUPT_GEN_MEMBER(popeye_state::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->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (device.state().state_int(Z80_I) & 1) /* skyskipr: 0/1, popeye: 2/3 but also 0/1 */ + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -428,7 +428,7 @@ static MACHINE_CONFIG_START( skyskipr, popeye_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz/2) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(skyskipr_map) MCFG_CPU_IO_MAP(popeye_io_map) - MCFG_CPU_VBLANK_INT("screen", popeye_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", popeye_state, popeye_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/popobear.c b/src/mame/drivers/popobear.c index c4a17a66d0d..0052f8c5249 100644 --- a/src/mame/drivers/popobear.c +++ b/src/mame/drivers/popobear.c @@ -458,8 +458,8 @@ static MACHINE_CONFIG_START( popobear, popobear_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_42MHz/4) // XTAL CORRECT, DIVISOR GUESSED MCFG_CPU_PROGRAM_MAP(popobear_mem) // levels 2,3,5 look interesting - //MCFG_CPU_VBLANK_INT("screen",irq5_line_assert) - //MCFG_CPU_PERIODIC_INT(irq2_line_assert,120) + //MCFG_CPU_VBLANK_INT_DRIVER("screen", popobear_state, irq5_line_assert) + //MCFG_CPU_PERIODIC_INT_DRIVER(popobear_state, irq2_line_assert, 120) MCFG_TIMER_ADD_SCANLINE("scantimer", popobear_irq, "screen", 0, 1) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/popper.c b/src/mame/drivers/popper.c index 7e268e19d60..a9150bb6220 100644 --- a/src/mame/drivers/popper.c +++ b/src/mame/drivers/popper.c @@ -328,12 +328,11 @@ void popper_state::machine_reset() m_gfx_bank = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(popper_state::vblank_irq) { - popper_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -342,11 +341,11 @@ static MACHINE_CONFIG_START( popper, popper_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,18432000/6) MCFG_CPU_PROGRAM_MAP(popper_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", popper_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,18432000/12) MCFG_CPU_PROGRAM_MAP(popper_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) //NMIs caused by the main CPU + MCFG_CPU_PERIODIC_INT_DRIVER(popper_state, irq0_line_hold, 4*60) //NMIs caused by the main CPU MCFG_QUANTUM_TIME(attotime::from_hz(1800)) diff --git a/src/mame/drivers/portrait.c b/src/mame/drivers/portrait.c index 8ef875ee8b2..6ba242bc3c6 100644 --- a/src/mame/drivers/portrait.c +++ b/src/mame/drivers/portrait.c @@ -243,7 +243,7 @@ GFXDECODE_END static MACHINE_CONFIG_START( portrait, portrait_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(portrait_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", portrait_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", I8039, 3120000) /* ? */ MCFG_CPU_PROGRAM_MAP(portrait_sound_map) diff --git a/src/mame/drivers/powerins.c b/src/mame/drivers/powerins.c index 0a44d73ad0c..c42a2c39971 100644 --- a/src/mame/drivers/powerins.c +++ b/src/mame/drivers/powerins.c @@ -343,7 +343,7 @@ static MACHINE_CONFIG_START( powerins, powerins_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12MHz */ MCFG_CPU_PROGRAM_MAP(powerins_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", powerins_state, irq4_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 6000000) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(powerins_sound_map) @@ -407,7 +407,7 @@ static MACHINE_CONFIG_DERIVED( powerinb, powerins ) MCFG_CPU_MODIFY("soundcpu") /* 6 MHz */ MCFG_CPU_IO_MAP(powerinb_sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 120) // YM2203 rate is at 150?? + MCFG_CPU_PERIODIC_INT_DRIVER(powerins_state, irq0_line_hold, 120) // YM2203 rate is at 150?? MCFG_DEVICE_REMOVE("ym2203") // Sound code talks to one, but it's not fitted on the board MACHINE_CONFIG_END diff --git a/src/mame/drivers/ppmast93.c b/src/mame/drivers/ppmast93.c index 081bb98ef0e..f17c5d990e4 100644 --- a/src/mame/drivers/ppmast93.c +++ b/src/mame/drivers/ppmast93.c @@ -366,12 +366,12 @@ static MACHINE_CONFIG_START( ppmast93, ppmast93_state ) MCFG_CPU_ADD("maincpu", Z80,5000000) /* 5 MHz */ MCFG_CPU_PROGRAM_MAP(ppmast93_cpu1_map) MCFG_CPU_IO_MAP(ppmast93_cpu1_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ppmast93_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,5000000) /* 5 MHz */ MCFG_CPU_PROGRAM_MAP(ppmast93_cpu2_map) MCFG_CPU_IO_MAP(ppmast93_cpu2_io) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,8000) + MCFG_CPU_PERIODIC_INT_DRIVER(ppmast93_state, irq0_line_hold, 8000) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/prehisle.c b/src/mame/drivers/prehisle.c index 20e903d8f43..fe40efb9f98 100644 --- a/src/mame/drivers/prehisle.c +++ b/src/mame/drivers/prehisle.c @@ -210,7 +210,7 @@ static MACHINE_CONFIG_START( prehisle, prehisle_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_18MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(prehisle_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", prehisle_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(prehisle_sound_map) diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c index afdf668e3fa..d1098e8d43e 100644 --- a/src/mame/drivers/progolf.c +++ b/src/mame/drivers/progolf.c @@ -87,6 +87,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_progolf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(progolf_interrupt); }; @@ -370,7 +371,7 @@ GFXDECODE_END //#ifdef UNUSED_FUNCTION -static INTERRUPT_GEN( progolf_interrupt ) +INTERRUPT_GEN_MEMBER(progolf_state::progolf_interrupt) { } //#endif @@ -423,7 +424,7 @@ static MACHINE_CONFIG_START( progolf, progolf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 3000000/2) /* guess, 3 Mhz makes the game to behave worse? */ MCFG_CPU_PROGRAM_MAP(main_cpu) - MCFG_CPU_VBLANK_INT("screen", progolf_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", progolf_state, progolf_interrupt) MCFG_CPU_ADD("audiocpu", M6502, 500000) MCFG_CPU_PROGRAM_MAP(sound_cpu) diff --git a/src/mame/drivers/psattack.c b/src/mame/drivers/psattack.c index bd6f0da995e..691ce8cb7a6 100644 --- a/src/mame/drivers/psattack.c +++ b/src/mame/drivers/psattack.c @@ -92,6 +92,7 @@ public: virtual void video_start(); UINT32 screen_update_psattack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_psattack(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(psattack_interrupt); }; @@ -136,7 +137,7 @@ void psattack_state::screen_eof_psattack(screen_device &screen, bool state) } -static INTERRUPT_GEN(psattack_interrupt) +INTERRUPT_GEN_MEMBER(psattack_state::psattack_interrupt) { } @@ -178,7 +179,7 @@ static const vr0_interface vr0_config = static MACHINE_CONFIG_START( psattack, psattack_state ) MCFG_CPU_ADD("maincpu", SE3208, 43000000) MCFG_CPU_PROGRAM_MAP(psattack_mem) - MCFG_CPU_VBLANK_INT("screen", psattack_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", psattack_state, psattack_interrupt) //MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c index b59c17cabdf..abdfa4d8543 100644 --- a/src/mame/drivers/psikyo.c +++ b/src/mame/drivers/psikyo.c @@ -1049,7 +1049,7 @@ static MACHINE_CONFIG_START( sngkace, psikyo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, XTAL_32MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(psikyo_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", psikyo_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sngkace_sound_map) @@ -1098,7 +1098,7 @@ static MACHINE_CONFIG_START( gunbird, psikyo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) MCFG_CPU_PROGRAM_MAP(psikyo_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", psikyo_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ! LZ8420M (Z80 core) ! */ MCFG_CPU_PROGRAM_MAP(gunbird_sound_map) @@ -1135,7 +1135,7 @@ static MACHINE_CONFIG_START( s1945bl, psikyo_state ) /* Bootleg hardware based o /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) MCFG_CPU_PROGRAM_MAP(psikyo_bootleg_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", psikyo_state, irq1_line_hold) /* video hardware */ @@ -1183,7 +1183,7 @@ static MACHINE_CONFIG_START( s1945, psikyo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) MCFG_CPU_PROGRAM_MAP(psikyo_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", psikyo_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ! LZ8420M (Z80 core) ! */ MCFG_CPU_PROGRAM_MAP(gunbird_sound_map) diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c index 5483aa4c304..31af67efb87 100644 --- a/src/mame/drivers/psikyo4.c +++ b/src/mame/drivers/psikyo4.c @@ -191,9 +191,9 @@ READ32_MEMBER(psikyo4_state::ps4_eeprom_r) return 0x00; } -static INTERRUPT_GEN(psikyosh_interrupt) +INTERRUPT_GEN_MEMBER(psikyo4_state::psikyosh_interrupt) { - device->execute().set_input_line(4, HOLD_LINE); + device.execute().set_input_line(4, HOLD_LINE); } CUSTOM_INPUT_MEMBER(psikyo4_state::system_port_r) @@ -681,7 +681,7 @@ static MACHINE_CONFIG_START( ps4big, psikyo4_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", SH2, MASTER_CLOCK/2) MCFG_CPU_PROGRAM_MAP(ps4_map) - MCFG_CPU_VBLANK_INT("lscreen", psikyosh_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", psikyo4_state, psikyosh_interrupt) MCFG_EEPROM_ADD("eeprom", eeprom_interface_93C56) diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c index 8dd2f2fd2f8..11ff190f2b5 100644 --- a/src/mame/drivers/psikyosh.c +++ b/src/mame/drivers/psikyosh.c @@ -347,9 +347,9 @@ READ32_MEMBER(psikyosh_state::psh_eeprom_r) return 0; } -static INTERRUPT_GEN(psikyosh_interrupt) +INTERRUPT_GEN_MEMBER(psikyosh_state::psikyosh_interrupt) { - device->execute().set_input_line(4, ASSERT_LINE); + device.execute().set_input_line(4, ASSERT_LINE); } // VBL handler writes 0x00 on entry, 0xc0 on exit @@ -808,7 +808,7 @@ static MACHINE_CONFIG_START( psikyo3v1, psikyosh_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", SH2, MASTER_CLOCK/2) MCFG_CPU_PROGRAM_MAP(ps3v1_map) - MCFG_CPU_VBLANK_INT("screen", psikyosh_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", psikyosh_state, psikyosh_interrupt) MCFG_EEPROM_ADD("eeprom", eeprom_interface_93C56) diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c index 0139dabba71..179eabb689c 100644 --- a/src/mame/drivers/pturn.c +++ b/src/mame/drivers/pturn.c @@ -118,6 +118,8 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_pturn(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(pturn_sub_intgen); + INTERRUPT_GEN_MEMBER(pturn_main_intgen); }; @@ -459,21 +461,19 @@ static INPUT_PORTS_START( pturn ) PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) ) INPUT_PORTS_END -static INTERRUPT_GEN( pturn_sub_intgen ) +INTERRUPT_GEN_MEMBER(pturn_state::pturn_sub_intgen) { - pturn_state *state = device->machine().driver_data(); - if(state->m_nmi_sub) + if(m_nmi_sub) { - device->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); + device.execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); } } -static INTERRUPT_GEN( pturn_main_intgen ) +INTERRUPT_GEN_MEMBER(pturn_state::pturn_main_intgen) { - pturn_state *state = device->machine().driver_data(); - if (state->m_nmi_main) + if (m_nmi_main) { - device->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); + device.execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); } } @@ -486,11 +486,11 @@ void pturn_state::machine_reset() static MACHINE_CONFIG_START( pturn, pturn_state ) MCFG_CPU_ADD("maincpu", Z80, 12000000/3) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", pturn_main_intgen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pturn_state, pturn_main_intgen) MCFG_CPU_ADD("audiocpu", Z80, 12000000/3) MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_PERIODIC_INT(pturn_sub_intgen,3*60) + MCFG_CPU_PERIODIC_INT_DRIVER(pturn_state, pturn_sub_intgen, 3*60) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/punchout.c b/src/mame/drivers/punchout.c index bdcb8a27d17..56121af00a4 100644 --- a/src/mame/drivers/punchout.c +++ b/src/mame/drivers/punchout.c @@ -928,12 +928,11 @@ void punchout_state::machine_reset() memset(m_rp5c01_mem, 0, sizeof(m_rp5c01_mem)); } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(punchout_state::vblank_irq) { - punchout_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -944,11 +943,11 @@ static MACHINE_CONFIG_START( punchout, punchout_state ) MCFG_CPU_ADD("maincpu", Z80, 8000000/2) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(punchout_map) MCFG_CPU_IO_MAP(punchout_io_map) - MCFG_CPU_VBLANK_INT("top", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("top", punchout_state, vblank_irq) MCFG_CPU_ADD("audiocpu", N2A03, N2A03_DEFAULTCLOCK) MCFG_CPU_PROGRAM_MAP(punchout_sound_map) - MCFG_CPU_VBLANK_INT("top", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("top", punchout_state, nmi_line_pulse) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/pushman.c b/src/mame/drivers/pushman.c index b0edf6818a5..d23e74f8b42 100644 --- a/src/mame/drivers/pushman.c +++ b/src/mame/drivers/pushman.c @@ -429,7 +429,7 @@ static MACHINE_CONFIG_START( pushman, pushman_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(pushman_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pushman_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -479,7 +479,7 @@ static MACHINE_CONFIG_START( bballs, pushman_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(bballs_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pushman_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/pzletime.c b/src/mame/drivers/pzletime.c index aaccbeb5f72..948e72beaec 100644 --- a/src/mame/drivers/pzletime.c +++ b/src/mame/drivers/pzletime.c @@ -324,7 +324,7 @@ static MACHINE_CONFIG_START( pzletime, pzletime_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,10000000) MCFG_CPU_PROGRAM_MAP(pzletime_map) - MCFG_CPU_VBLANK_INT("screen",irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", pzletime_state, irq4_line_hold) /* video hardware */ diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c index 17c622bd487..5783caec758 100644 --- a/src/mame/drivers/qdrmfgp.c +++ b/src/mame/drivers/qdrmfgp.c @@ -300,12 +300,11 @@ static TIMER_CALLBACK( gp2_timer_callback ) machine.device("maincpu")->execute().set_input_line(3, HOLD_LINE); } -static INTERRUPT_GEN(qdrmfgp2_interrupt) +INTERRUPT_GEN_MEMBER(qdrmfgp_state::qdrmfgp2_interrupt) { - qdrmfgp_state *state = device->machine().driver_data(); /* trigger V-blank interrupt */ - if (state->m_control & 0x0008) - device->execute().set_input_line(4, HOLD_LINE); + if (m_control & 0x0008) + device.execute().set_input_line(4, HOLD_LINE); } static void gp2_ide_interrupt(device_t *device, int state) @@ -718,7 +717,7 @@ static MACHINE_CONFIG_START( qdrmfgp2, qdrmfgp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 32000000/2) /* 16.000 MHz */ MCFG_CPU_PROGRAM_MAP(qdrmfgp2_map) - MCFG_CPU_VBLANK_INT("screen", qdrmfgp2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", qdrmfgp_state, qdrmfgp2_interrupt) MCFG_MACHINE_START_OVERRIDE(qdrmfgp_state,qdrmfgp2) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/quantum.c b/src/mame/drivers/quantum.c index 1924d9eee41..bfeaf32e043 100644 --- a/src/mame/drivers/quantum.c +++ b/src/mame/drivers/quantum.c @@ -292,7 +292,7 @@ static MACHINE_CONFIG_START( quantum, quantum_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK / 2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, (double)MASTER_CLOCK / 4096 / 12) + MCFG_CPU_PERIODIC_INT_DRIVER(quantum_state, irq1_line_hold, (double)MASTER_CLOCK / 4096 / 12) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/quasar.c b/src/mame/drivers/quasar.c index db0a14624d4..2f74768a509 100644 --- a/src/mame/drivers/quasar.c +++ b/src/mame/drivers/quasar.c @@ -268,9 +268,9 @@ static GFXDECODE_START( quasar ) GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 64+1 ) /* ROM chars */ GFXDECODE_END -static INTERRUPT_GEN( quasar_interrupt ) +INTERRUPT_GEN_MEMBER(quasar_state::quasar_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); } static const s2636_interface s2636_0_config = @@ -328,7 +328,7 @@ static MACHINE_CONFIG_START( quasar, quasar_state ) MCFG_CPU_ADD("maincpu", S2650, 14318000/4) /* 14 mhz crystal divide by 4 on board */ MCFG_CPU_PROGRAM_MAP(quasar) MCFG_CPU_IO_MAP(quasar_io) - MCFG_CPU_VBLANK_INT("screen", quasar_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", quasar_state, quasar_interrupt) MCFG_CPU_ADD("soundcpu",I8035,6000000) /* 6MHz crystal divide by 15 in CPU */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/quizdna.c b/src/mame/drivers/quizdna.c index 88801eda608..15a4fd14322 100644 --- a/src/mame/drivers/quizdna.c +++ b/src/mame/drivers/quizdna.c @@ -447,7 +447,7 @@ static MACHINE_CONFIG_START( quizdna, quizdna_state ) MCFG_CPU_ADD("maincpu", Z80, MCLK/2) /* 8.000 MHz */ MCFG_CPU_PROGRAM_MAP(quizdna_map) MCFG_CPU_IO_MAP(quizdna_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", quizdna_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/quizo.c b/src/mame/drivers/quizo.c index b0758c7ea80..9464b19af84 100644 --- a/src/mame/drivers/quizo.c +++ b/src/mame/drivers/quizo.c @@ -208,7 +208,7 @@ static MACHINE_CONFIG_START( quizo, quizo_state ) MCFG_CPU_PROGRAM_MAP(memmap) MCFG_CPU_IO_MAP(portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", quizo_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/quizpani.c b/src/mame/drivers/quizpani.c index f70b03f2b37..db4f555f478 100644 --- a/src/mame/drivers/quizpani.c +++ b/src/mame/drivers/quizpani.c @@ -197,8 +197,8 @@ static const nmk112_interface quizpani_nmk112_intf = static MACHINE_CONFIG_START( quizpani, quizpani_state ) MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(quizpani_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) - MCFG_CPU_PERIODIC_INT(irq1_line_hold,164) // music tempo + MCFG_CPU_VBLANK_INT_DRIVER("screen", quizpani_state, irq4_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(quizpani_state, irq1_line_hold, 164) // music tempo MCFG_GFXDECODE(quizpani) MCFG_PALETTE_LENGTH(0x200) diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c index 5333e92e55e..2a3412196b9 100644 --- a/src/mame/drivers/quizpun2.c +++ b/src/mame/drivers/quizpun2.c @@ -488,12 +488,12 @@ static MACHINE_CONFIG_START( quizpun2, quizpun2_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz / 2) // 4 MHz? MCFG_CPU_PROGRAM_MAP(quizpun2_map) MCFG_CPU_IO_MAP(quizpun2_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", quizpun2_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz / 2) // 4 MHz? MCFG_CPU_PROGRAM_MAP(quizpun2_sound_map) MCFG_CPU_IO_MAP(quizpun2_sound_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", quizpun2_state, irq0_line_hold) // NMI generated by main CPU diff --git a/src/mame/drivers/r2dx_v33.c b/src/mame/drivers/r2dx_v33.c index e3f5ae5d2f6..8279da2c078 100644 --- a/src/mame/drivers/r2dx_v33.c +++ b/src/mame/drivers/r2dx_v33.c @@ -71,6 +71,7 @@ public: tilemap_t *m_tx_tilemap; virtual void video_start(); UINT32 screen_update_rdx_v33(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(rdx_v33_interrupt); }; @@ -509,9 +510,9 @@ static ADDRESS_MAP_START( nzerotea_map, AS_PROGRAM, 16, r2dx_v33_state ) AM_RANGE(0x40000, 0xfffff) AM_ROM AM_REGION("mainprg", 0x40000 ) ADDRESS_MAP_END -static INTERRUPT_GEN( rdx_v33_interrupt ) +INTERRUPT_GEN_MEMBER(r2dx_v33_state::rdx_v33_interrupt) { - device->execute().set_input_line_and_vector(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 = @@ -692,7 +693,7 @@ static MACHINE_CONFIG_START( rdx_v33, r2dx_v33_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V33, 32000000/2 ) // ? MCFG_CPU_PROGRAM_MAP(rdx_v33_map) - MCFG_CPU_VBLANK_INT("screen", rdx_v33_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", r2dx_v33_state, rdx_v33_interrupt) //MCFG_MACHINE_RESET_OVERRIDE(r2dx_v33_state,rdx_v33) @@ -722,7 +723,7 @@ static MACHINE_CONFIG_START( nzerotea, r2dx_v33_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V33,XTAL_32MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(nzerotea_map) - MCFG_CPU_VBLANK_INT("screen", rdx_v33_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", r2dx_v33_state, rdx_v33_interrupt) MCFG_MACHINE_RESET(seibu_sound) diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c index 771519511eb..68c9e3b5b22 100644 --- a/src/mame/drivers/rabbit.c +++ b/src/mame/drivers/rabbit.c @@ -138,6 +138,7 @@ public: TILE_GET_INFO_MEMBER(get_rabbit_tilemap3_tile_info); virtual void video_start(); UINT32 screen_update_rabbit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(rabbit_vblank_interrupt); }; @@ -869,16 +870,15 @@ GFXDECODE_END */ -static INTERRUPT_GEN( rabbit_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(rabbit_state::rabbit_vblank_interrupt) { - rabbit_state *state = device->machine().driver_data(); - device->machine().device("maincpu")->execute().set_input_line(state->m_vblirqlevel, HOLD_LINE); + machine().device("maincpu")->execute().set_input_line(m_vblirqlevel, HOLD_LINE); } static MACHINE_CONFIG_START( rabbit, rabbit_state ) MCFG_CPU_ADD("maincpu", M68EC020, XTAL_24MHz) MCFG_CPU_PROGRAM_MAP(rabbit_map) - MCFG_CPU_VBLANK_INT("screen", rabbit_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rabbit_state, rabbit_vblank_interrupt) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/raiden.c b/src/mame/drivers/raiden.c index 725ed7d5e02..4abb4263262 100644 --- a/src/mame/drivers/raiden.c +++ b/src/mame/drivers/raiden.c @@ -237,9 +237,9 @@ GFXDECODE_END /******************************************************************************/ -static INTERRUPT_GEN( raiden_interrupt ) +INTERRUPT_GEN_MEMBER(raiden_state::raiden_interrupt) { - device->execute().set_input_line_and_vector(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 ) @@ -247,11 +247,11 @@ static MACHINE_CONFIG_START( raiden, raiden_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V30,XTAL_20MHz/2) /* NEC V30 CPU, 20MHz verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", raiden_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", raiden_state, raiden_interrupt) MCFG_CPU_ADD("sub", V30,XTAL_20MHz/2) /* NEC V30 CPU, 20MHz verified on pcb */ MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_VBLANK_INT("screen", raiden_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", raiden_state, raiden_interrupt) SEIBU_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verified on pcb */ diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c index 2be07048d59..c81e44e32fe 100644 --- a/src/mame/drivers/raiden2.c +++ b/src/mame/drivers/raiden2.c @@ -1006,9 +1006,9 @@ UINT32 raiden2_state::screen_update_raiden2(screen_device &screen, bitmap_ind16 * *************************************/ -static INTERRUPT_GEN( raiden2_interrupt ) +INTERRUPT_GEN_MEMBER(raiden2_state::raiden2_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xc0/4); /* VBL */ + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc0/4); /* VBL */ } @@ -1825,7 +1825,7 @@ static MACHINE_CONFIG_START( raiden2, raiden2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V30,XTAL_32MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(raiden2_mem) - MCFG_CPU_VBLANK_INT("screen", raiden2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", raiden2_state, raiden2_interrupt) MCFG_MACHINE_RESET_OVERRIDE(raiden2_state,raiden2) @@ -1881,7 +1881,7 @@ static MACHINE_CONFIG_START( zeroteam, raiden2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V30,XTAL_32MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(zeroteam_mem) - MCFG_CPU_VBLANK_INT("screen", raiden2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", raiden2_state, raiden2_interrupt) MCFG_MACHINE_RESET_OVERRIDE(raiden2_state,zeroteam) diff --git a/src/mame/drivers/rainbow.c b/src/mame/drivers/rainbow.c index 749841458e8..0647d34e3bd 100644 --- a/src/mame/drivers/rainbow.c +++ b/src/mame/drivers/rainbow.c @@ -676,7 +676,7 @@ static MACHINE_CONFIG_START( rbisland, rbisland_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rbisland_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rbisland_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rbisland_sound_map) @@ -716,7 +716,7 @@ static MACHINE_CONFIG_START( jumping, rbisland_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/3) /* not verified but matches original */ MCFG_CPU_PROGRAM_MAP(jumping_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rbisland_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6) /* not verified but music tempo matches original */ MCFG_CPU_PROGRAM_MAP(jumping_sound_map) diff --git a/src/mame/drivers/rallyx.c b/src/mame/drivers/rallyx.c index ce740be1b14..d0f09cc3e2f 100644 --- a/src/mame/drivers/rallyx.c +++ b/src/mame/drivers/rallyx.c @@ -888,20 +888,18 @@ MACHINE_RESET_MEMBER(rallyx_state,rallyx) m_stars_enable = 0; } -static INTERRUPT_GEN( rallyx_vblank_irq ) +INTERRUPT_GEN_MEMBER(rallyx_state::rallyx_vblank_irq) { - rallyx_state *state = device->machine().driver_data(); - if(state->m_main_irq_mask) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_main_irq_mask) + device.execute().set_input_line(0, ASSERT_LINE); } -static INTERRUPT_GEN( jungler_vblank_irq ) +INTERRUPT_GEN_MEMBER(rallyx_state::jungler_vblank_irq) { - rallyx_state *state = device->machine().driver_data(); - if(state->m_main_irq_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_main_irq_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( rallyx, rallyx_state ) @@ -910,7 +908,7 @@ static MACHINE_CONFIG_START( rallyx, rallyx_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(rallyx_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", rallyx_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rallyx_state, rallyx_vblank_irq) MCFG_MACHINE_START_OVERRIDE(rallyx_state,rallyx) MCFG_MACHINE_RESET_OVERRIDE(rallyx_state,rallyx) @@ -948,7 +946,7 @@ static MACHINE_CONFIG_START( jungler, rallyx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(jungler_map) - MCFG_CPU_VBLANK_INT("screen", jungler_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rallyx_state, jungler_vblank_irq) MCFG_MACHINE_START_OVERRIDE(rallyx_state,rallyx) MCFG_MACHINE_RESET_OVERRIDE(rallyx_state,rallyx) diff --git a/src/mame/drivers/rastan.c b/src/mame/drivers/rastan.c index d1ce6b13d4f..f9023d83722 100644 --- a/src/mame/drivers/rastan.c +++ b/src/mame/drivers/rastan.c @@ -407,7 +407,7 @@ static MACHINE_CONFIG_START( rastan, rastan_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rastan_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rastan_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rastan_s_map) diff --git a/src/mame/drivers/rbmk.c b/src/mame/drivers/rbmk.c index ffb75ebbf06..34ec77cedda 100644 --- a/src/mame/drivers/rbmk.c +++ b/src/mame/drivers/rbmk.c @@ -79,6 +79,7 @@ public: DECLARE_WRITE16_MEMBER(eeprom_w); virtual void video_start(); UINT32 screen_update_rbmk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mcu_irq); }; @@ -527,20 +528,20 @@ UINT32 rbmk_state::screen_update_rbmk(screen_device &screen, bitmap_ind16 &bitma return 0; } -static INTERRUPT_GEN( mcu_irq ) +INTERRUPT_GEN_MEMBER(rbmk_state::mcu_irq) { - device->machine().device("mcu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + machine().device("mcu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( rbmk, rbmk_state ) MCFG_CPU_ADD("maincpu", M68000, 22000000 /2) MCFG_CPU_PROGRAM_MAP(rbmk_mem) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rbmk_state, irq1_line_hold) MCFG_CPU_ADD("mcu", AT89C4051, 22000000 / 4) // frequency isn't right MCFG_CPU_PROGRAM_MAP(rbmk_mcu_mem) MCFG_CPU_IO_MAP(rbmk_mcu_io) - MCFG_CPU_VBLANK_INT("screen", mcu_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rbmk_state, mcu_irq) MCFG_GFXDECODE(rbmk) diff --git a/src/mame/drivers/rcorsair.c b/src/mame/drivers/rcorsair.c index 8f0b584eabc..051a7f79248 100644 --- a/src/mame/drivers/rcorsair.c +++ b/src/mame/drivers/rcorsair.c @@ -135,7 +135,7 @@ static MACHINE_CONFIG_START( rcorsair, rcorsair_state ) MCFG_CPU_ADD("maincpu", I8085A,8000000) /* Sound CPU? */ MCFG_CPU_PROGRAM_MAP(rcorsair_map) -// MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rcorsair_state, irq0_line_hold) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/realbrk.c b/src/mame/drivers/realbrk.c index 8ee1af6fad4..97cdb6c522f 100644 --- a/src/mame/drivers/realbrk.c +++ b/src/mame/drivers/realbrk.c @@ -746,10 +746,10 @@ GFXDECODE_END Billiard Academy Real Break ***************************************************************************/ -static INTERRUPT_GEN( realbrk_interrupt ) +INTERRUPT_GEN_MEMBER(realbrk_state::realbrk_interrupt) { /* VBlank is connected to INT1 (external interrupts pin 1) */ - tmp68301_external_interrupt_1(device->machine()); + tmp68301_external_interrupt_1(machine()); } static MACHINE_CONFIG_START( realbrk, realbrk_state ) @@ -757,7 +757,7 @@ static MACHINE_CONFIG_START( realbrk, realbrk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000, XTAL_32MHz / 2) /* !! TMP68301 !! */ MCFG_CPU_PROGRAM_MAP(realbrk_mem) - MCFG_CPU_VBLANK_INT("screen", realbrk_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", realbrk_state, realbrk_interrupt) MCFG_MACHINE_START( tmp68301 ) MCFG_MACHINE_RESET( tmp68301 ) diff --git a/src/mame/drivers/redalert.c b/src/mame/drivers/redalert.c index bd80b5f315e..40fae296b11 100644 --- a/src/mame/drivers/redalert.c +++ b/src/mame/drivers/redalert.c @@ -107,13 +107,13 @@ * *************************************/ -static INTERRUPT_GEN( redalert_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(redalert_state::redalert_vblank_interrupt) { - if( device->machine().root_device().ioport("COIN")->read() ) + if( machine().root_device().ioport("COIN")->read() ) /* the service coin as conntected to the CPU's RDY pin as well */ - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); - device->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); + device.execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); } @@ -390,7 +390,7 @@ static MACHINE_CONFIG_START( redalert, redalert_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(redalert_main_map) - MCFG_CPU_VBLANK_INT("screen", redalert_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", redalert_state, redalert_vblank_interrupt) /* video hardware */ MCFG_FRAGMENT_ADD(redalert_video) @@ -404,7 +404,7 @@ static MACHINE_CONFIG_START( ww3, redalert_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(ww3_main_map) - MCFG_CPU_VBLANK_INT("screen", redalert_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", redalert_state, redalert_vblank_interrupt) /* video hardware */ MCFG_FRAGMENT_ADD(ww3_video) @@ -418,7 +418,7 @@ static MACHINE_CONFIG_START( panther, redalert_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(panther_main_map) - MCFG_CPU_VBLANK_INT("screen", redalert_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", redalert_state, redalert_vblank_interrupt) /* video hardware */ MCFG_FRAGMENT_ADD(panther_video) @@ -432,7 +432,7 @@ static MACHINE_CONFIG_START( demoneye, redalert_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(demoneye_main_map) - MCFG_CPU_VBLANK_INT("screen", redalert_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", redalert_state, redalert_vblank_interrupt) /* video hardware */ MCFG_FRAGMENT_ADD(demoneye_video) diff --git a/src/mame/drivers/retofinv.c b/src/mame/drivers/retofinv.c index ec5cec4f981..027a9313c6f 100644 --- a/src/mame/drivers/retofinv.c +++ b/src/mame/drivers/retofinv.c @@ -328,20 +328,18 @@ static GFXDECODE_START( retofinv ) GFXDECODE_ENTRY( "gfx3", 0, bglayout, 64*16+256*2, 64 ) GFXDECODE_END -static INTERRUPT_GEN( main_vblank_irq ) +INTERRUPT_GEN_MEMBER(retofinv_state::main_vblank_irq) { - retofinv_state *state = device->machine().driver_data(); - if(state->m_main_irq_mask) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_main_irq_mask) + device.execute().set_input_line(0, ASSERT_LINE); } -static INTERRUPT_GEN( sub_vblank_irq ) +INTERRUPT_GEN_MEMBER(retofinv_state::sub_vblank_irq) { - retofinv_state *state = device->machine().driver_data(); - if(state->m_sub_irq_mask) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_sub_irq_mask) + device.execute().set_input_line(0, ASSERT_LINE); } @@ -367,15 +365,15 @@ static MACHINE_CONFIG_START( retofinv, retofinv_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 18432000/6) /* 3.072 MHz? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", main_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", retofinv_state, main_vblank_irq) MCFG_CPU_ADD("sub", Z80, 18432000/6) /* 3.072 MHz? */ MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", retofinv_state, sub_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, 18432000/6) /* 3.072 MHz? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(retofinv_state, nmi_line_pulse, 2*60) MCFG_CPU_ADD("68705", M68705,18432000/6) /* 3.072 MHz? */ MCFG_CPU_PROGRAM_MAP(mcu_map) diff --git a/src/mame/drivers/rgum.c b/src/mame/drivers/rgum.c index fc6b322f44e..5833d97f528 100644 --- a/src/mame/drivers/rgum.c +++ b/src/mame/drivers/rgum.c @@ -268,7 +268,7 @@ static MACHINE_CONFIG_START( rgum, rgum_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M65C02,24000000/16) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(rgum_map) -// MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rgum_state, nmi_line_pulse) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/rltennis.c b/src/mame/drivers/rltennis.c index 27f465668de..a8e4dfeac5e 100644 --- a/src/mame/drivers/rltennis.c +++ b/src/mame/drivers/rltennis.c @@ -147,12 +147,11 @@ static TIMER_CALLBACK( sample_player ) state->m_timer->adjust(attotime::from_hz( RLT_TIMER_FREQ )); } -static INTERRUPT_GEN( rltennis_interrupt ) +INTERRUPT_GEN_MEMBER(rltennis_state::rltennis_interrupt) { - rltennis_state *state = device->machine().driver_data(); - ++state->m_unk_counter; /* frame counter? verify */ - device->execute().set_input_line(4, HOLD_LINE); - device->execute().set_input_line(1, HOLD_LINE); /* hack, to avoid dead loop */ + ++m_unk_counter; /* frame counter? verify */ + device.execute().set_input_line(4, HOLD_LINE); + device.execute().set_input_line(1, HOLD_LINE); /* hack, to avoid dead loop */ } void rltennis_state::machine_start() @@ -185,7 +184,7 @@ static MACHINE_CONFIG_START( rltennis, rltennis_state ) MCFG_CPU_ADD("maincpu", M68000, RLT_XTAL/2) /* 68000P8 ??? */ MCFG_CPU_PROGRAM_MAP(rltennis_main) - MCFG_CPU_VBLANK_INT("screen", rltennis_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rltennis_state, rltennis_interrupt) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE( RLT_REFRESH_RATE ) diff --git a/src/mame/drivers/rmhaihai.c b/src/mame/drivers/rmhaihai.c index f6350fa50ec..886805f0543 100644 --- a/src/mame/drivers/rmhaihai.c +++ b/src/mame/drivers/rmhaihai.c @@ -469,7 +469,7 @@ static MACHINE_CONFIG_START( rmhaihai, rmhaihai_state ) MCFG_CPU_ADD("maincpu",Z80,20000000/4) /* 5 MHz ??? */ MCFG_CPU_PROGRAM_MAP(rmhaihai_map) MCFG_CPU_IO_MAP(rmhaihai_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rmhaihai_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/rockrage.c b/src/mame/drivers/rockrage.c index 11ecdf52ffe..3b73ad8165b 100644 --- a/src/mame/drivers/rockrage.c +++ b/src/mame/drivers/rockrage.c @@ -57,11 +57,10 @@ Notes: #include "includes/konamipt.h" -static INTERRUPT_GEN( rockrage_interrupt ) +INTERRUPT_GEN_MEMBER(rockrage_state::rockrage_interrupt) { - rockrage_state *state = device->machine().driver_data(); - if (k007342_is_int_enabled(state->m_k007342)) - device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); + if (k007342_is_int_enabled(m_k007342)) + device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(rockrage_state::rockrage_bankswitch_w) @@ -263,7 +262,7 @@ static MACHINE_CONFIG_START( rockrage, rockrage_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* 24MHz/8 */ MCFG_CPU_PROGRAM_MAP(rockrage_map) - MCFG_CPU_VBLANK_INT("screen", rockrage_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rockrage_state, rockrage_interrupt) MCFG_CPU_ADD("audiocpu", M6809, 1500000) /* 24MHz/16 */ MCFG_CPU_PROGRAM_MAP(rockrage_sound_map) diff --git a/src/mame/drivers/rocnrope.c b/src/mame/drivers/rocnrope.c index 5f0518770c5..243c3a23a9e 100644 --- a/src/mame/drivers/rocnrope.c +++ b/src/mame/drivers/rocnrope.c @@ -186,12 +186,11 @@ GFXDECODE_END * *************************************/ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(rocnrope_state::vblank_irq) { - rocnrope_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -200,7 +199,7 @@ static MACHINE_CONFIG_START( rocnrope, rocnrope_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK / 3 / 4) /* Verified in schematics */ MCFG_CPU_PROGRAM_MAP(rocnrope_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rocnrope_state, vblank_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/rohga.c b/src/mame/drivers/rohga.c index e0ebffc34cd..bde11038e64 100644 --- a/src/mame/drivers/rohga.c +++ b/src/mame/drivers/rohga.c @@ -800,7 +800,7 @@ static MACHINE_CONFIG_START( rohga, rohga_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(rohga_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rohga_state, irq6_line_assert) MCFG_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */ MCFG_CPU_PROGRAM_MAP(rohga_sound_map) @@ -850,7 +850,7 @@ static MACHINE_CONFIG_START( wizdfire, rohga_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(wizdfire_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rohga_state, irq6_line_assert) MCFG_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */ MCFG_CPU_PROGRAM_MAP(rohga_sound_map) @@ -904,7 +904,7 @@ static MACHINE_CONFIG_START( nitrobal, rohga_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(nitrobal_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rohga_state, irq6_line_assert) MCFG_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */ MCFG_CPU_PROGRAM_MAP(rohga_sound_map) @@ -958,7 +958,7 @@ static MACHINE_CONFIG_START( schmeisr, rohga_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(schmeisr_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rohga_state, irq6_line_assert) MCFG_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */ MCFG_CPU_PROGRAM_MAP(rohga_sound_map) diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c index b248f1840f5..1681c59d374 100644 --- a/src/mame/drivers/rollerg.c +++ b/src/mame/drivers/rollerg.c @@ -277,7 +277,7 @@ static MACHINE_CONFIG_START( rollerg, rollerg_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(rollerg_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rollerg_state, irq0_line_assert) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(rollerg_sound_map) diff --git a/src/mame/drivers/rollrace.c b/src/mame/drivers/rollrace.c index c1275843fbc..4b4b7bb5f29 100644 --- a/src/mame/drivers/rollrace.c +++ b/src/mame/drivers/rollrace.c @@ -208,20 +208,18 @@ static GFXDECODE_START( rollrace ) GFXDECODE_ENTRY( "gfx5", 0x0000, spritelayout, 0, 32 ) GFXDECODE_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(rollrace_state::vblank_irq) { - rollrace_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( sound_timer_irq ) +INTERRUPT_GEN_MEMBER(rollrace_state::sound_timer_irq) { - rollrace_state *state = device->machine().driver_data(); - if(state->m_sound_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_sound_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( rollrace, rollrace_state ) @@ -229,11 +227,11 @@ static MACHINE_CONFIG_START( rollrace, rollrace_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,XTAL_24MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rollrace_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rollrace_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,XTAL_24MHz/16) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rollrace_sound_map) - MCFG_CPU_PERIODIC_INT(sound_timer_irq,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(rollrace_state, sound_timer_irq, 4*60) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c index 0469b895395..b524f48b589 100644 --- a/src/mame/drivers/roul.c +++ b/src/mame/drivers/roul.c @@ -279,7 +279,7 @@ static MACHINE_CONFIG_START( roul, roul_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(roul_map) MCFG_CPU_IO_MAP(roul_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen",nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", roul_state, nmi_line_pulse) MCFG_CPU_ADD("soundcpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/route16.c b/src/mame/drivers/route16.c index ab4b93508c0..154706963a3 100644 --- a/src/mame/drivers/route16.c +++ b/src/mame/drivers/route16.c @@ -601,7 +601,7 @@ static MACHINE_CONFIG_START( route16, route16_state ) MCFG_CPU_ADD("cpu1", Z80, 2500000) /* 10MHz / 4 = 2.5MHz */ MCFG_CPU_PROGRAM_MAP(route16_cpu1_map) MCFG_CPU_IO_MAP(cpu1_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", route16_state, irq0_line_hold) MCFG_CPU_ADD("cpu2", Z80, 2500000) /* 10MHz / 4 = 2.5MHz */ MCFG_CPU_PROGRAM_MAP(route16_cpu2_map) @@ -667,7 +667,7 @@ static MACHINE_CONFIG_DERIVED( spacecho, speakres ) /* basic machine hardware */ MCFG_CPU_MODIFY("cpu2") - MCFG_CPU_PERIODIC_INT(irq0_line_hold,48*60) + MCFG_CPU_PERIODIC_INT_DRIVER(route16_state, irq0_line_hold, 48*60) MACHINE_CONFIG_END diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c index 1ab6b4821ce..eaf95827094 100644 --- a/src/mame/drivers/royalmah.c +++ b/src/mame/drivers/royalmah.c @@ -197,6 +197,8 @@ public: virtual void palette_init(); DECLARE_PALETTE_INIT(mjderngr); UINT32 screen_update_royalmah(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(suzume_irq); + INTERRUPT_GEN_MEMBER(mjtensin_interrupt); }; @@ -3169,7 +3171,7 @@ static MACHINE_CONFIG_START( royalmah, royalmah_state ) MCFG_CPU_ADD("maincpu", Z80, 18432000/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(royalmah_map) MCFG_CPU_IO_MAP(royalmah_iomap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", royalmah_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -3200,7 +3202,7 @@ static MACHINE_CONFIG_DERIVED( janoh, royalmah ) MCFG_CPU_ADD("sub", Z80, 4000000) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(janoh_sub_map) MCFG_CPU_IO_MAP(janoh_sub_iomap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", royalmah_state, irq0_line_hold) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( jansou, royalmah ) @@ -3211,7 +3213,7 @@ static MACHINE_CONFIG_DERIVED( jansou, royalmah ) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4.000 MHz */ MCFG_CPU_PROGRAM_MAP(jansou_sub_map) MCFG_CPU_IO_MAP(jansou_sub_iomap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4000000/512) + MCFG_CPU_PERIODIC_INT_DRIVER(royalmah_state, irq0_line_hold, 4000000/512) MCFG_DAC_ADD("dac") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) @@ -3246,17 +3248,16 @@ static MACHINE_CONFIG_DERIVED( ippatsu, dondenmj ) MCFG_CPU_IO_MAP(ippatsu_iomap) MACHINE_CONFIG_END -static INTERRUPT_GEN( suzume_irq ) +INTERRUPT_GEN_MEMBER(royalmah_state::suzume_irq) { - royalmah_state *state = device->machine().driver_data(); - if ( state->m_suzume_bank & 0x40 ) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if ( m_suzume_bank & 0x40 ) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_DERIVED( suzume, dondenmj ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(suzume_iomap) - MCFG_CPU_VBLANK_INT("screen", suzume_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", royalmah_state, suzume_irq) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( tontonb, dondenmj ) @@ -3332,7 +3333,7 @@ static MACHINE_CONFIG_DERIVED( mjifb, mjderngr ) MCFG_CPU_REPLACE("maincpu",TMP90841, 8000000) /* ? */ MCFG_CPU_PROGRAM_MAP(mjifb_map) MCFG_CPU_IO_MAP(mjifb_iomap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", royalmah_state, irq0_line_hold) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) @@ -3343,18 +3344,17 @@ static MACHINE_CONFIG_DERIVED( mjdejavu, mjderngr ) MCFG_CPU_REPLACE("maincpu",TMP90841, 8000000) /* ? */ MCFG_CPU_PROGRAM_MAP(mjdejavu_map) MCFG_CPU_IO_MAP(mjifb_iomap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", royalmah_state, irq0_line_hold) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) MACHINE_CONFIG_END -static INTERRUPT_GEN( mjtensin_interrupt ) +INTERRUPT_GEN_MEMBER(royalmah_state::mjtensin_interrupt) { - royalmah_state *state = device->machine().driver_data(); - state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); // vblank + m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); // vblank } WRITE_LINE_MEMBER(royalmah_state::mjtensin_rtc_irq) @@ -3373,7 +3373,7 @@ static MACHINE_CONFIG_DERIVED( mjtensin, mjderngr ) MCFG_CPU_REPLACE("maincpu",TMP90841, 12000000) /* ? */ MCFG_CPU_PROGRAM_MAP(mjtensin_map) MCFG_CPU_IO_MAP(mjtensin_iomap) - MCFG_CPU_VBLANK_INT("screen", mjtensin_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", royalmah_state, mjtensin_interrupt) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) @@ -3386,7 +3386,7 @@ static MACHINE_CONFIG_DERIVED( cafetime, mjderngr ) MCFG_CPU_REPLACE("maincpu",TMP90841, 12000000) /* ? */ MCFG_CPU_PROGRAM_MAP(cafetime_map) MCFG_CPU_IO_MAP(cafetime_iomap) - MCFG_CPU_VBLANK_INT("screen", mjtensin_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", royalmah_state, mjtensin_interrupt) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) @@ -3399,7 +3399,7 @@ static MACHINE_CONFIG_DERIVED( mjvegasa, mjderngr ) MCFG_CPU_REPLACE("maincpu",TMP90841, XTAL_8MHz) /* ? */ MCFG_CPU_PROGRAM_MAP(mjvegasa_map) MCFG_CPU_IO_MAP(mjvegasa_iomap) - MCFG_CPU_VBLANK_INT("screen", mjtensin_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", royalmah_state, mjtensin_interrupt) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index 25f85113444..c2e9cde1a09 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -171,12 +171,11 @@ READ16_MEMBER(rungun_state::sound_status_msb_r) return 0; } -static INTERRUPT_GEN(rng_interrupt) +INTERRUPT_GEN_MEMBER(rungun_state::rng_interrupt) { - rungun_state *state = device->machine().driver_data(); - if (state->m_sysreg[0x0c / 2] & 0x09) - device->execute().set_input_line(M68K_IRQ_5, ASSERT_LINE); + if (m_sysreg[0x0c / 2] & 0x09) + device.execute().set_input_line(M68K_IRQ_5, ASSERT_LINE); } static ADDRESS_MAP_START( rungun_map, AS_PROGRAM, 16, rungun_state ) @@ -226,14 +225,13 @@ WRITE8_MEMBER(rungun_state::z80ctrl_w) m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -static INTERRUPT_GEN(audio_interrupt) +INTERRUPT_GEN_MEMBER(rungun_state::audio_interrupt) { - rungun_state *state = device->machine().driver_data(); - if (state->m_z80_control & 0x80) + if (m_z80_control & 0x80) return; - device->execute().set_input_line(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) */ @@ -399,11 +397,11 @@ static MACHINE_CONFIG_START( rng, rungun_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(rungun_map) - MCFG_CPU_VBLANK_INT("screen", rng_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", rungun_state, rng_interrupt) MCFG_CPU_ADD("soundcpu", Z80, 10000000) // 8Mhz (10Mhz is much safer in self-test due to heavy sync) MCFG_CPU_PROGRAM_MAP(rungun_sound_map) - MCFG_CPU_PERIODIC_INT(audio_interrupt, 480) + MCFG_CPU_PERIODIC_INT_DRIVER(rungun_state, audio_interrupt, 480) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // higher if sound stutters diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c index 264614bf74d..3cec39180c4 100644 --- a/src/mame/drivers/sandscrp.c +++ b/src/mame/drivers/sandscrp.c @@ -111,6 +111,7 @@ public: virtual void machine_reset(); UINT32 screen_update_sandscrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_sandscrp(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(sandscrp_interrupt); }; @@ -160,11 +161,10 @@ static void update_irq_state(running_machine &machine) /* Called once/frame to generate the VBLANK interrupt */ -static INTERRUPT_GEN( sandscrp_interrupt ) +INTERRUPT_GEN_MEMBER(sandscrp_state::sandscrp_interrupt) { - sandscrp_state *state = device->machine().driver_data(); - state->m_vblank_irq = 1; - update_irq_state(device->machine()); + m_vblank_irq = 1; + update_irq_state(machine()); } @@ -500,7 +500,7 @@ static MACHINE_CONFIG_START( sandscrp, sandscrp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,12000000) /* TMP68HC000N-12 */ MCFG_CPU_PROGRAM_MAP(sandscrp) - MCFG_CPU_VBLANK_INT("screen", sandscrp_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sandscrp_state, sandscrp_interrupt) MCFG_CPU_ADD("audiocpu", Z80,4000000) /* Z8400AB1, Reads the DSWs: it can't be disabled */ MCFG_CPU_PROGRAM_MAP(sandscrp_soundmem) diff --git a/src/mame/drivers/sauro.c b/src/mame/drivers/sauro.c index be07dd82109..3e3640c5d63 100644 --- a/src/mame/drivers/sauro.c +++ b/src/mame/drivers/sauro.c @@ -367,16 +367,16 @@ static GFXDECODE_START( trckydoc ) GFXDECODE_ENTRY( "gfx2", 0, trckydoc_spritelayout, 0, 64 ) GFXDECODE_END -static INTERRUPT_GEN( sauro_interrupt ) +INTERRUPT_GEN_MEMBER(sauro_state::sauro_interrupt) { - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( tecfri, sauro_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_20MHz/4) /* verified on pcb */ - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sauro_state, irq0_line_hold) MCFG_NVRAM_ADD_1FILL("nvram") @@ -419,7 +419,7 @@ static MACHINE_CONFIG_DERIVED( sauro, tecfri ) MCFG_CPU_ADD("audiocpu", Z80, 4000000) // 4 MHz? MCFG_CPU_PROGRAM_MAP(sauro_sound_map) - MCFG_CPU_PERIODIC_INT(sauro_interrupt, 8*60) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(sauro_state, sauro_interrupt, 8*60) // ? MCFG_GFXDECODE(sauro) diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c index a354b2e61a2..f99a695dfbc 100644 --- a/src/mame/drivers/sbasketb.c +++ b/src/mame/drivers/sbasketb.c @@ -176,12 +176,11 @@ static GFXDECODE_START( sbasketb ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 16*16, 16*16 ) GFXDECODE_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(sbasketb_state::vblank_irq) { - sbasketb_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } //------------------------------------------------- @@ -199,7 +198,7 @@ static MACHINE_CONFIG_START( sbasketb, sbasketb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 1400000) /* 1.400 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sbasketb_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sbasketb_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_14_31818MHz / 4) /* 3.5795 MHz */ MCFG_CPU_PROGRAM_MAP(sbasketb_sound_map) diff --git a/src/mame/drivers/scotrsht.c b/src/mame/drivers/scotrsht.c index 8b77888347d..51df2292506 100644 --- a/src/mame/drivers/scotrsht.c +++ b/src/mame/drivers/scotrsht.c @@ -46,12 +46,11 @@ WRITE8_MEMBER(scotrsht_state::ctrl_w) flip_screen_set(data & 0x08); } -static INTERRUPT_GEN( scotrsht_interrupt ) +INTERRUPT_GEN_MEMBER(scotrsht_state::scotrsht_interrupt) { - scotrsht_state *state = device->machine().driver_data(); - if (state->m_irq_enable) - device->execute().set_input_line(0, HOLD_LINE); + if (m_irq_enable) + device.execute().set_input_line(0, HOLD_LINE); } WRITE8_MEMBER(scotrsht_state::scotrsht_soundlatch_w) @@ -185,7 +184,7 @@ static MACHINE_CONFIG_START( scotrsht, scotrsht_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 18432000/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(scotrsht_map) - MCFG_CPU_VBLANK_INT("screen", scotrsht_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", scotrsht_state, scotrsht_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 18432000/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(scotrsht_sound_map) diff --git a/src/mame/drivers/scramble.c b/src/mame/drivers/scramble.c index 0c8b57a74ca..1f3a92fcbb6 100644 --- a/src/mame/drivers/scramble.c +++ b/src/mame/drivers/scramble.c @@ -1533,7 +1533,7 @@ static MACHINE_CONFIG_DERIVED( hunchbks, scramble ) MCFG_CPU_REPLACE("maincpu", S2650, 18432000/6) MCFG_CPU_PROGRAM_MAP(hunchbks_map) MCFG_CPU_IO_MAP(hunchbks_readport) - MCFG_CPU_VBLANK_INT("screen", hunchbks_vh_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", scramble_state, hunchbks_vh_interrupt) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) diff --git a/src/mame/drivers/sderby.c b/src/mame/drivers/sderby.c index 6adbff69d79..df56acf5c3a 100644 --- a/src/mame/drivers/sderby.c +++ b/src/mame/drivers/sderby.c @@ -497,7 +497,7 @@ static MACHINE_CONFIG_START( sderby, sderby_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(sderby_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sderby_state, irq2_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -520,7 +520,7 @@ static MACHINE_CONFIG_START( luckboom, sderby_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(luckboom_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sderby_state, irq4_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -543,7 +543,7 @@ static MACHINE_CONFIG_START( spacewin, sderby_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(spacewin_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sderby_state, irq2_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -566,7 +566,7 @@ static MACHINE_CONFIG_START( pmroulet, sderby_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(roulette_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sderby_state, irq2_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/segag80r.c b/src/mame/drivers/segag80r.c index 0272e47ebdc..5eaed2c20ee 100644 --- a/src/mame/drivers/segag80r.c +++ b/src/mame/drivers/segag80r.c @@ -843,7 +843,7 @@ static MACHINE_CONFIG_START( g80r_base, segag80r_state ) MCFG_CPU_ADD("maincpu", Z80, VIDEO_CLOCK/4) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", segag80r_vblank_start) + MCFG_CPU_VBLANK_INT_DRIVER("screen", segag80r_state, segag80r_vblank_start) /* video hardware */ @@ -931,7 +931,7 @@ static MACHINE_CONFIG_DERIVED( sindbadm, g80r_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(sindbadm_portmap) - MCFG_CPU_VBLANK_INT("screen", sindbadm_vblank_start) + MCFG_CPU_VBLANK_INT_DRIVER("screen", segag80r_state, sindbadm_vblank_start) MCFG_I8255A_ADD( "ppi8255", sindbadm_ppi_intf ) @@ -943,7 +943,7 @@ static MACHINE_CONFIG_DERIVED( sindbadm, g80r_base ) MCFG_CPU_ADD("audiocpu", Z80, SINDBADM_SOUND_CLOCK/2) MCFG_CPU_PROGRAM_MAP(sindbadm_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(segag80r_state, irq0_line_hold, 4*60) /* sound hardware */ MCFG_SOUND_ADD("sn1", SN76496_NEW, SINDBADM_SOUND_CLOCK/4) diff --git a/src/mame/drivers/segag80v.c b/src/mame/drivers/segag80v.c index 503e7a3e630..3339efc726f 100644 --- a/src/mame/drivers/segag80v.c +++ b/src/mame/drivers/segag80v.c @@ -898,7 +898,7 @@ static MACHINE_CONFIG_START( g80v_base, segag80v_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK/2) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", segag80v_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/segajw.c b/src/mame/drivers/segajw.c index fb54da8500e..38a16b8fad2 100644 --- a/src/mame/drivers/segajw.c +++ b/src/mame/drivers/segajw.c @@ -91,7 +91,7 @@ static MACHINE_CONFIG_START( segajw, segajw_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,8000000) // unknown clock MCFG_CPU_PROGRAM_MAP(segajw_map) - MCFG_CPU_VBLANK_INT("screen",irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", segajw_state, irq4_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c index ce0d3a22b1a..ce264191313 100644 --- a/src/mame/drivers/segald.c +++ b/src/mame/drivers/segald.c @@ -373,7 +373,7 @@ static MACHINE_CONFIG_START( astron, segald_state ) MCFG_CPU_ADD("maincpu", Z80, SCHEMATIC_CLOCK/4) MCFG_CPU_PROGRAM_MAP(mainmem) MCFG_CPU_IO_MAP(mainport) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 1000.0/59.94) + MCFG_CPU_PERIODIC_INT_DRIVER(segald_state, nmi_line_pulse, 1000.0/59.94) MCFG_LASERDISC_LDV1000_ADD("laserdisc") diff --git a/src/mame/drivers/segas32.c b/src/mame/drivers/segas32.c index 9f24c46ed67..da91f88678c 100644 --- a/src/mame/drivers/segas32.c +++ b/src/mame/drivers/segas32.c @@ -569,14 +569,13 @@ static TIMER_CALLBACK( end_of_vblank_int ) } -static INTERRUPT_GEN( start_of_vblank_int ) +INTERRUPT_GEN_MEMBER(segas32_state::start_of_vblank_int) { - segas32_state *state = device->machine().driver_data(); - signal_v60_irq(device->machine(), MAIN_IRQ_VBSTART); - system32_set_vblank(device->machine(), 1); - device->machine().scheduler().timer_set(device->machine().primary_screen->time_until_pos(0), FUNC(end_of_vblank_int)); - if (state->m_system32_prot_vblank) - (*state->m_system32_prot_vblank)(device); + signal_v60_irq(machine(), MAIN_IRQ_VBSTART); + system32_set_vblank(machine(), 1); + machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), FUNC(end_of_vblank_int)); + if (m_system32_prot_vblank) + (*m_system32_prot_vblank)(&device); } @@ -2193,7 +2192,7 @@ static MACHINE_CONFIG_START( system32, segas32_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V60, MASTER_CLOCK/2) MCFG_CPU_PROGRAM_MAP(system32_map) - MCFG_CPU_VBLANK_INT("screen", start_of_vblank_int) + MCFG_CPU_VBLANK_INT_DRIVER("screen", segas32_state, start_of_vblank_int) MCFG_CPU_ADD("soundcpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(system32_sound_map) @@ -2252,7 +2251,7 @@ static MACHINE_CONFIG_START( multi32, segas32_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V70, MULTI32_CLOCK/2) MCFG_CPU_PROGRAM_MAP(multi32_map) - MCFG_CPU_VBLANK_INT("lscreen", start_of_vblank_int) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", segas32_state, start_of_vblank_int) MCFG_CPU_ADD("soundcpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(multi32_sound_map) diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c index 6f62e18ab19..cf936cabc4f 100644 --- a/src/mame/drivers/seibuspi.c +++ b/src/mame/drivers/seibuspi.c @@ -1789,9 +1789,9 @@ static const eeprom_interface eeprom_intf = 1 /* reset_delay */ }; -static INTERRUPT_GEN( spi_interrupt ) +INTERRUPT_GEN_MEMBER(seibuspi_state::spi_interrupt) { - device->execute().set_input_line(0, ASSERT_LINE ); + device.execute().set_input_line(0, ASSERT_LINE ); } static IRQ_CALLBACK(spi_irq_callback) @@ -1847,7 +1847,7 @@ static MACHINE_CONFIG_START( spi, seibuspi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I386, 50000000/2) /* Intel 386DX, 25MHz */ MCFG_CPU_PROGRAM_MAP(spi_map) - MCFG_CPU_VBLANK_INT("screen", spi_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt) MCFG_CPU_ADD("soundcpu", Z80, 28636360/4) MCFG_CPU_PROGRAM_MAP(spisound_map) @@ -2193,7 +2193,7 @@ static MACHINE_CONFIG_START( seibu386, seibuspi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I386, 40000000) /* AMD 386DX, 40MHz */ MCFG_CPU_PROGRAM_MAP(seibu386_map) - MCFG_CPU_VBLANK_INT("screen", spi_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt) MCFG_MACHINE_RESET_OVERRIDE(seibuspi_state,seibu386) @@ -2246,7 +2246,7 @@ static MACHINE_CONFIG_START( sys386f2, seibuspi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I386, 25000000) /* 25mhz */ MCFG_CPU_PROGRAM_MAP(sys386f2_map) - MCFG_CPU_VBLANK_INT("screen", spi_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt) /* no z80? */ diff --git a/src/mame/drivers/seicross.c b/src/mame/drivers/seicross.c index fcd7f8942ad..b8b6dd54d01 100644 --- a/src/mame/drivers/seicross.c +++ b/src/mame/drivers/seicross.c @@ -388,12 +388,11 @@ static const ay8910_interface ay8910_config = DEVCB_DRIVER_MEMBER(seicross_state,friskyt_portB_w) }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(seicross_state::vblank_irq) { - seicross_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -404,7 +403,7 @@ static MACHINE_CONFIG_START( nvram, seicross_state ) MCFG_CPU_ADD("maincpu", Z80, 3072000) /* 3.072 MHz? */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seicross_state, vblank_irq) MCFG_CPU_ADD("mcu", NSC8105, 3072000) /* ??? */ MCFG_CPU_PROGRAM_MAP(mcu_nvram_map) diff --git a/src/mame/drivers/sengokmj.c b/src/mame/drivers/sengokmj.c index 96e2ac95327..762e4d3377a 100644 --- a/src/mame/drivers/sengokmj.c +++ b/src/mame/drivers/sengokmj.c @@ -71,6 +71,7 @@ public: DECLARE_WRITE16_MEMBER(mahjong_panel_w); DECLARE_WRITE16_MEMBER(sengokmj_out_w); DECLARE_READ16_MEMBER(sengokmj_system_r); + INTERRUPT_GEN_MEMBER(sengokmj_interrupt); }; @@ -288,9 +289,9 @@ static GFXDECODE_START( sengokmj ) GFXDECODE_ENTRY( "tx_gfx", 0, charlayout, 0x700, 0x10 ) /* Text */ GFXDECODE_END -static INTERRUPT_GEN( sengokmj_interrupt ) +INTERRUPT_GEN_MEMBER(sengokmj_state::sengokmj_interrupt) { - device->execute().set_input_line_and_vector(0,HOLD_LINE,0xc8/4); + device.execute().set_input_line_and_vector(0,HOLD_LINE,0xc8/4); } static MACHINE_CONFIG_START( sengokmj, sengokmj_state ) @@ -299,7 +300,7 @@ static MACHINE_CONFIG_START( sengokmj, sengokmj_state ) MCFG_CPU_ADD("maincpu", V30, 16000000/2) /* V30-8 */ MCFG_CPU_PROGRAM_MAP(sengokmj_map) MCFG_CPU_IO_MAP(sengokmj_io_map) - MCFG_CPU_VBLANK_INT("screen", sengokmj_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sengokmj_state, sengokmj_interrupt) SEIBU_SOUND_SYSTEM_CPU(14318180/4) diff --git a/src/mame/drivers/senjyo.c b/src/mame/drivers/senjyo.c index 006a7322acd..31872f46ac1 100644 --- a/src/mame/drivers/senjyo.c +++ b/src/mame/drivers/senjyo.c @@ -88,12 +88,11 @@ void senjyo_state::machine_reset() m_int_delay_kludge = 10; } -static INTERRUPT_GEN( senjyo_interrupt ) +INTERRUPT_GEN_MEMBER(senjyo_state::senjyo_interrupt) { - senjyo_state *state = device->machine().driver_data(); - if (state->m_int_delay_kludge == 0) device->execute().set_input_line(0, HOLD_LINE); - else state->m_int_delay_kludge--; + if (m_int_delay_kludge == 0) device.execute().set_input_line(0, HOLD_LINE); + else m_int_delay_kludge--; } WRITE8_MEMBER(senjyo_state::flip_screen_w) @@ -572,7 +571,7 @@ static MACHINE_CONFIG_START( senjyo, senjyo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(senjyo_map) - MCFG_CPU_VBLANK_INT("screen", senjyo_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", senjyo_state, senjyo_interrupt) MCFG_CPU_ADD("sub", Z80, 2000000) /* 2 MHz? */ MCFG_CPU_CONFIG(senjyo_daisy_chain) diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index fc5513d6f99..1dca6aa058d 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -7484,7 +7484,7 @@ static MACHINE_CONFIG_START( tndrcade, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(tndrcade_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_hold) MCFG_CPU_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ MCFG_CPU_PROGRAM_MAP(tndrcade_sub_map) @@ -7534,7 +7534,7 @@ static MACHINE_CONFIG_START( twineagl, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(downtown_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) MCFG_CPU_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ MCFG_CPU_PROGRAM_MAP(twineagl_sub_map) @@ -7637,7 +7637,7 @@ static MACHINE_CONFIG_START( usclssic, seta_state ) MCFG_CPU_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ MCFG_CPU_PROGRAM_MAP(calibr50_sub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* NMI caused by main cpu when writing to the sound latch */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq0_line_hold) /* NMI caused by main cpu when writing to the sound latch */ MCFG_MACHINE_RESET_OVERRIDE(seta_state,calibr50) @@ -7685,7 +7685,7 @@ static MACHINE_CONFIG_START( calibr50, seta_state ) MCFG_CPU_ADD("sub", M65C02, XTAL_16MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(calibr50_sub_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* IRQ: 4/frame + MCFG_CPU_PERIODIC_INT_DRIVER(seta_state, irq0_line_hold, 4*60) /* IRQ: 4/frame NMI: when the 68k writes the sound latch */ MCFG_MACHINE_RESET_OVERRIDE(seta_state,calibr50) @@ -7724,7 +7724,7 @@ static MACHINE_CONFIG_START( metafox, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(downtown_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) MCFG_CPU_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ MCFG_CPU_PROGRAM_MAP(metafox_sub_map) @@ -7877,7 +7877,7 @@ static MACHINE_CONFIG_START( blockcar, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(blockcar_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) @@ -8151,9 +8151,9 @@ MACHINE_CONFIG_END Gundhara ***************************************************************************/ #if __uPD71054_TIMER -static INTERRUPT_GEN( wrofaero_interrupt ) +INTERRUPT_GEN_MEMBER(seta_state::wrofaero_interrupt) { - device->execute().set_input_line(2, HOLD_LINE ); + device.execute().set_input_line(2, HOLD_LINE ); } MACHINE_START_MEMBER(seta_state,wrofaero){ uPD71054_timer_init(machine()); } @@ -8290,7 +8290,7 @@ static MACHINE_CONFIG_START( kamenrid, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(kamenrid_map) - MCFG_CPU_VBLANK_INT("screen", wrofaero_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, wrofaero_interrupt) #if __uPD71054_TIMER MCFG_MACHINE_START_OVERRIDE(seta_state, wrofaero ) @@ -8442,7 +8442,7 @@ static MACHINE_CONFIG_START( madshark, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(madshark_map) - MCFG_CPU_VBLANK_INT("screen", wrofaero_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, wrofaero_interrupt) #if __uPD71054_TIMER MCFG_MACHINE_START_OVERRIDE(seta_state, wrofaero ) @@ -8484,7 +8484,7 @@ static MACHINE_CONFIG_START( magspeed, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(magspeed_map) - MCFG_CPU_VBLANK_INT("screen", wrofaero_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, wrofaero_interrupt) #if __uPD71054_TIMER MCFG_MACHINE_START_OVERRIDE(seta_state, wrofaero ) @@ -8527,7 +8527,7 @@ static MACHINE_CONFIG_START( msgundam, seta_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(msgundam_map) #if __uPD71054_TIMER - MCFG_CPU_VBLANK_INT("screen", wrofaero_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, wrofaero_interrupt) #else MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_2_and_4, "screen", 0, 1) #endif // __uPD71054_TIMER @@ -8609,7 +8609,7 @@ static MACHINE_CONFIG_START( triplfun, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(triplfun_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) @@ -8643,7 +8643,7 @@ static MACHINE_CONFIG_START( kiwame, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(kiwame_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* lev 1-7 are the same. WARNING: + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq1_line_hold)/* lev 1-7 are the same. WARNING: the interrupt table is written to. */ MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) @@ -8722,7 +8722,7 @@ static MACHINE_CONFIG_START( thunderl, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(thunderl_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_hold) MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) @@ -8772,7 +8772,7 @@ static MACHINE_CONFIG_DERIVED( thunderlbl, thunderl ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(thunderlbl_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 10000000/2) MCFG_CPU_PROGRAM_MAP(thunderlbl_sound_map) @@ -8790,7 +8790,7 @@ static MACHINE_CONFIG_START( wiggie, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(wiggie_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 16000000/4) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(wiggie_sound_map) @@ -8827,7 +8827,7 @@ static MACHINE_CONFIG_START( wits, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(thunderl_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_hold) MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) @@ -8863,7 +8863,7 @@ static MACHINE_CONFIG_START( umanclub, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(umanclub_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) @@ -8945,7 +8945,7 @@ static MACHINE_CONFIG_START( wrofaero, seta_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(wrofaero_map) #if __uPD71054_TIMER - MCFG_CPU_VBLANK_INT("screen", wrofaero_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, wrofaero_interrupt) #else MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_2_and_4, "screen", 0, 1) #endif // __uPD71054_TIMER @@ -8995,7 +8995,7 @@ static MACHINE_CONFIG_START( zingzip, seta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(wrofaero_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) diff --git a/src/mame/drivers/seta2.c b/src/mame/drivers/seta2.c index af4a6b1e2ce..21c9b2e946a 100644 --- a/src/mame/drivers/seta2.c +++ b/src/mame/drivers/seta2.c @@ -2006,15 +2006,15 @@ GFXDECODE_END ***************************************************************************/ -static INTERRUPT_GEN( seta2_interrupt ) +INTERRUPT_GEN_MEMBER(seta2_state::seta2_interrupt) { /* VBlank is connected to INT0 (external interrupts pin 0) */ - tmp68301_external_interrupt_0(device->machine()); + tmp68301_external_interrupt_0(machine()); } -static INTERRUPT_GEN( samshoot_interrupt ) +INTERRUPT_GEN_MEMBER(seta2_state::samshoot_interrupt) { - tmp68301_external_interrupt_2(device->machine()); // to do: hook up x1-10 interrupts + tmp68301_external_interrupt_2(machine()); // to do: hook up x1-10 interrupts } static const x1_010_interface x1_010_sound_intf = @@ -2025,7 +2025,7 @@ static const x1_010_interface x1_010_sound_intf = static MACHINE_CONFIG_START( seta2, seta2_state ) MCFG_CPU_ADD("maincpu", M68301, XTAL_50MHz/3) // !! TMP68301 !! MCFG_CPU_PROGRAM_MAP(mj4simai_map) - MCFG_CPU_VBLANK_INT("screen", seta2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta2_state, seta2_interrupt) MCFG_MACHINE_START( tmp68301 ) MCFG_MACHINE_RESET( tmp68301 ) @@ -2148,7 +2148,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( samshoot, seta2 ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(samshoot_map) - MCFG_CPU_PERIODIC_INT(samshoot_interrupt,60) + MCFG_CPU_PERIODIC_INT_DRIVER(seta2_state, samshoot_interrupt, 60) MCFG_NVRAM_ADD_0FILL("nvram") @@ -2174,32 +2174,31 @@ static TIMER_DEVICE_CALLBACK( funcube_interrupt ) state->m_maincpu->set_input_line(2, HOLD_LINE); } -static INTERRUPT_GEN( funcube_sub_timer_irq ) +INTERRUPT_GEN_MEMBER(seta2_state::funcube_sub_timer_irq) { - seta2_state *state = device->machine().driver_data(); - if ( state->m_funcube_serial_count ) + if ( m_funcube_serial_count ) { - device->execute().set_input_line(H8_SCI_1_RX, HOLD_LINE); + device.execute().set_input_line(H8_SCI_1_RX, HOLD_LINE); } else { - UINT8 press = device->machine().root_device().ioport("TOUCH_PRESS")->read(); - UINT8 release = state->m_funcube_press && !press; + UINT8 press = machine().root_device().ioport("TOUCH_PRESS")->read(); + UINT8 release = m_funcube_press && !press; if ( press || release ) { - state->m_funcube_serial_fifo[0] = press ? 0xfe : 0xfd; - state->m_funcube_serial_fifo[1] = device->machine().root_device().ioport("TOUCH_X")->read(); - state->m_funcube_serial_fifo[2] = device->machine().root_device().ioport("TOUCH_Y")->read(); - state->m_funcube_serial_fifo[3] = 0xff; - state->m_funcube_serial_count = 4; + m_funcube_serial_fifo[0] = press ? 0xfe : 0xfd; + m_funcube_serial_fifo[1] = machine().root_device().ioport("TOUCH_X")->read(); + m_funcube_serial_fifo[2] = machine().root_device().ioport("TOUCH_Y")->read(); + m_funcube_serial_fifo[3] = 0xff; + m_funcube_serial_count = 4; } - state->m_funcube_press = press; + m_funcube_press = press; } - device->execute().set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); + device.execute().set_input_line(H8_METRO_TIMER_HACK, HOLD_LINE); } MACHINE_RESET_MEMBER(seta2_state,funcube) @@ -2219,7 +2218,7 @@ static MACHINE_CONFIG_START( funcube, seta2_state ) MCFG_CPU_ADD("sub", H83007, FUNCUBE_SUB_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(funcube_sub_map) MCFG_CPU_IO_MAP(funcube_sub_io) - MCFG_CPU_PERIODIC_INT(funcube_sub_timer_irq, 60*10 ) + MCFG_CPU_PERIODIC_INT_DRIVER(seta2_state, funcube_sub_timer_irq, 60*10) MCFG_NVRAM_ADD_0FILL("nvram") @@ -2271,7 +2270,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( namcostr, seta2_state ) MCFG_CPU_ADD("maincpu", M68301, XTAL_50MHz/3) // !! TMP68301 !! MCFG_CPU_PROGRAM_MAP(namcostr_map) - MCFG_CPU_VBLANK_INT("screen", seta2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", seta2_state, seta2_interrupt) MCFG_MACHINE_START( tmp68301 ) MCFG_MACHINE_RESET( tmp68301 ) diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c index f9cde4c9b01..89ae579a89b 100644 --- a/src/mame/drivers/sf.c +++ b/src/mame/drivers/sf.c @@ -838,7 +838,7 @@ static MACHINE_CONFIG_START( sf, sf_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz ? (xtal is 16MHz) */ MCFG_CPU_PROGRAM_MAP(sf_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sf_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* ? xtal is 3.579545MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -848,7 +848,7 @@ static MACHINE_CONFIG_START( sf, sf_state ) MCFG_CPU_ADD("audio2", Z80, 3579545) /* ? xtal is 3.579545MHz */ MCFG_CPU_PROGRAM_MAP(sound2_map) MCFG_CPU_IO_MAP(sound2_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,8000) + MCFG_CPU_PERIODIC_INT_DRIVER(sf_state, irq0_line_hold, 8000) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -902,7 +902,7 @@ static MACHINE_CONFIG_DERIVED( sfp, sf ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sf_state, irq6_line_hold) MACHINE_CONFIG_END diff --git a/src/mame/drivers/sfbonus.c b/src/mame/drivers/sfbonus.c index c236afdc945..971382d781d 100644 --- a/src/mame/drivers/sfbonus.c +++ b/src/mame/drivers/sfbonus.c @@ -1359,8 +1359,8 @@ static MACHINE_CONFIG_START( sfbonus, sfbonus_state ) MCFG_CPU_ADD("maincpu", Z80, 6000000) // custom packaged z80 CPU ?? Mhz MCFG_CPU_PROGRAM_MAP(sfbonus_map) MCFG_CPU_IO_MAP(sfbonus_io) - MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) - //MCFG_CPU_PERIODIC_INT(nmi_line_pulse,100) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sfbonus_state, irq0_line_hold) + //MCFG_CPU_PERIODIC_INT_DRIVER(sfbonus_state, nmi_line_pulse, 100) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/shangha3.c b/src/mame/drivers/shangha3.c index fd7e63199be..70f5ceef0e0 100644 --- a/src/mame/drivers/shangha3.c +++ b/src/mame/drivers/shangha3.c @@ -471,7 +471,7 @@ static MACHINE_CONFIG_START( shangha3, shangha3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(shangha3_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shangha3_state, irq4_line_hold) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) @@ -504,7 +504,7 @@ static MACHINE_CONFIG_START( heberpop, shangha3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(heberpop_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shangha3_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 6000000) /* 6 MHz ??? */ MCFG_CPU_PROGRAM_MAP(heberpop_sound_map) @@ -542,7 +542,7 @@ static MACHINE_CONFIG_START( blocken, shangha3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(blocken_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shangha3_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 6000000) /* 6 MHz ??? */ MCFG_CPU_PROGRAM_MAP(heberpop_sound_map) diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c index da394be3ea7..183ac9cde75 100644 --- a/src/mame/drivers/shanghai.c +++ b/src/mame/drivers/shanghai.c @@ -39,6 +39,7 @@ public: virtual void video_start(); DECLARE_PALETTE_INIT(shanghai); UINT32 screen_update_shanghai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(shanghai_interrupt); }; @@ -124,9 +125,9 @@ UINT32 shanghai_state::screen_update_shanghai(screen_device &screen, bitmap_ind1 return 0; } -static INTERRUPT_GEN( shanghai_interrupt ) +INTERRUPT_GEN_MEMBER(shanghai_state::shanghai_interrupt) { - device->execute().set_input_line_and_vector(0,HOLD_LINE,0x80); + device.execute().set_input_line_and_vector(0,HOLD_LINE,0x80); } WRITE16_MEMBER(shanghai_state::shanghai_coin_w) @@ -446,7 +447,7 @@ static MACHINE_CONFIG_START( shanghai, shanghai_state ) MCFG_CPU_ADD("maincpu", V30,16000000/2) /* ? */ MCFG_CPU_PROGRAM_MAP(shanghai_map) MCFG_CPU_IO_MAP(shanghai_portmap) - MCFG_CPU_VBLANK_INT("screen", shanghai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, shanghai_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -479,7 +480,7 @@ static MACHINE_CONFIG_START( shangha2, shanghai_state ) MCFG_CPU_ADD("maincpu", V30,16000000/2) /* ? */ MCFG_CPU_PROGRAM_MAP(shangha2_map) MCFG_CPU_IO_MAP(shangha2_portmap) - MCFG_CPU_VBLANK_INT("screen", shanghai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, shanghai_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -510,7 +511,7 @@ static MACHINE_CONFIG_START( kothello, shanghai_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V30,16000000/2) /* ? */ MCFG_CPU_PROGRAM_MAP(kothello_map) - MCFG_CPU_VBLANK_INT("screen", shanghai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, shanghai_interrupt) SEIBU3A_SOUND_SYSTEM_CPU(14318180/4) diff --git a/src/mame/drivers/shangkid.c b/src/mame/drivers/shangkid.c index 7e851a421c5..1e750614829 100644 --- a/src/mame/drivers/shangkid.c +++ b/src/mame/drivers/shangkid.c @@ -363,12 +363,12 @@ static MACHINE_CONFIG_START( chinhero, shangkid_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(chinhero_main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shangkid_state, irq0_line_hold) MCFG_CPU_ADD("bbx", Z80, XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(chinhero_bbx_map) MCFG_CPU_IO_MAP(chinhero_bbx_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shangkid_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(chinhero_sound_map) @@ -455,7 +455,7 @@ static MACHINE_CONFIG_START( dynamski, shangkid_state ) MCFG_CPU_ADD("maincpu", Z80, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(dynamski_map) MCFG_CPU_IO_MAP(dynamski_portmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shangkid_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/shisen.c b/src/mame/drivers/shisen.c index ccd3c7fb519..edf13678770 100644 --- a/src/mame/drivers/shisen.c +++ b/src/mame/drivers/shisen.c @@ -215,12 +215,12 @@ static MACHINE_CONFIG_START( shisen, shisen_state ) MCFG_CPU_ADD("maincpu", Z80, 6000000) /* 6 MHz ? */ MCFG_CPU_PROGRAM_MAP(shisen_map) MCFG_CPU_IO_MAP(shisen_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shisen_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 3579645) MCFG_CPU_PROGRAM_MAP(shisen_sound_map) MCFG_CPU_IO_MAP(shisen_sound_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1? (Vigilante) */ + MCFG_CPU_PERIODIC_INT_DRIVER(shisen_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c index b80f0b62d50..f4263098168 100644 --- a/src/mame/drivers/shougi.c +++ b/src/mame/drivers/shougi.c @@ -112,6 +112,7 @@ public: DECLARE_READ8_MEMBER(dummy_r); virtual void palette_init(); UINT32 screen_update_shougi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(shougi_vblank_nmi); }; @@ -273,15 +274,14 @@ WRITE8_MEMBER(shougi_state::nmi_enable_w) m_nmi_enabled = 1; /* enable NMIs */ } -static INTERRUPT_GEN( shougi_vblank_nmi ) +INTERRUPT_GEN_MEMBER(shougi_state::shougi_vblank_nmi) { - shougi_state *state = device->machine().driver_data(); - if ( state->m_nmi_enabled == 1 ) + if ( m_nmi_enabled == 1 ) { /* NMI lines are tied together on both CPUs and connected to the LS74 /Q output */ - device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); - device->machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } } @@ -405,7 +405,7 @@ static MACHINE_CONFIG_START( shougi, shougi_state ) MCFG_CPU_ADD("maincpu", Z80,10000000/4) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", shougi_vblank_nmi) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shougi_state, shougi_vblank_nmi) MCFG_CPU_ADD("sub", Z80,10000000/4) MCFG_CPU_PROGRAM_MAP(sub_map) diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c index 91735a088d1..f517ce3d3bf 100644 --- a/src/mame/drivers/sidearms.c +++ b/src/mame/drivers/sidearms.c @@ -657,7 +657,7 @@ static MACHINE_CONFIG_START( sidearms, sidearms_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_CPU_PROGRAM_MAP(sidearms_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sidearms_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_CPU_PROGRAM_MAP(sidearms_sound_map) @@ -700,7 +700,7 @@ static MACHINE_CONFIG_START( turtship, sidearms_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_CPU_PROGRAM_MAP(turtship_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sidearms_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_CPU_PROGRAM_MAP(sidearms_sound_map) @@ -742,12 +742,12 @@ static MACHINE_CONFIG_START( whizz, sidearms_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_CPU_PROGRAM_MAP(whizz_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sidearms_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(whizz_sound_map) MCFG_CPU_IO_MAP(whizz_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sidearms_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(60000)) diff --git a/src/mame/drivers/sidepckt.c b/src/mame/drivers/sidepckt.c index df0214e1cdb..35a4dc68404 100644 --- a/src/mame/drivers/sidepckt.c +++ b/src/mame/drivers/sidepckt.c @@ -390,7 +390,7 @@ static MACHINE_CONFIG_START( sidepckt, sidepckt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2000000) /* 2 MHz */ MCFG_CPU_PROGRAM_MAP(sidepckt_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sidepckt_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", M6502, 1500000) /* 1.5 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/sigmab52.c b/src/mame/drivers/sigmab52.c index 82bae37ef39..26cbc2e340c 100644 --- a/src/mame/drivers/sigmab52.c +++ b/src/mame/drivers/sigmab52.c @@ -150,6 +150,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_jwildb52(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(timer_irq); }; @@ -536,9 +537,9 @@ INPUT_PORTS_END * Interrupts Gen (to fix) * ******************************/ -static INTERRUPT_GEN( timer_irq ) +INTERRUPT_GEN_MEMBER(sigmab52_state::timer_irq) { - generic_pulse_irq_line(device, M6809_IRQ_LINE, 1); + generic_pulse_irq_line(device.execute(), M6809_IRQ_LINE, 1); } @@ -591,13 +592,13 @@ static MACHINE_CONFIG_START( jwildb52, sigmab52_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MAIN_CLOCK/9) /* 2 MHz */ MCFG_CPU_PROGRAM_MAP(jwildb52_map) - MCFG_CPU_VBLANK_INT("screen", timer_irq) /* Fix me */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", sigmab52_state, timer_irq) /* Fix me */ #if 0 MCFG_CPU_ADD("audiocpu", M6809, MAIN_CLOCK/9) /* 2 MHz */ MCFG_CPU_PROGRAM_MAP(sound_prog_map) //temporary teh same int as for main cpu - MCFG_CPU_PERIODIC_INT(timer_irq, 1000) /* Fix me */ + MCFG_CPU_PERIODIC_INT_DRIVER(sigmab52_state, timer_irq, 1000) /* Fix me */ #endif diff --git a/src/mame/drivers/sigmab98.c b/src/mame/drivers/sigmab98.c index 9b128162c0a..7d778221e1e 100644 --- a/src/mame/drivers/sigmab98.c +++ b/src/mame/drivers/sigmab98.c @@ -177,6 +177,7 @@ public: DECLARE_MACHINE_RESET(sammymdl); UINT32 screen_update_sigmab98(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_sammymdl(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(gegege_vblank_interrupt); }; @@ -1690,16 +1691,16 @@ const eeprom_interface eeprom_intf = 7 // reset_delay (otherwise gegege will hang when saving settings) }; -static INTERRUPT_GEN( gegege_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(sigmab98_state::gegege_vblank_interrupt) { - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0x5a); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x5a); } static MACHINE_CONFIG_START( gegege, sigmab98_state ) MCFG_CPU_ADD("maincpu", Z80, 10000000) // !! TAXAN KY-80, clock @X1? !! MCFG_CPU_PROGRAM_MAP(gegege_mem_map) MCFG_CPU_IO_MAP(gegege_io_map) - MCFG_CPU_VBLANK_INT("screen", gegege_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sigmab98_state, gegege_vblank_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") MCFG_EEPROM_ADD("eeprom", eeprom_intf) diff --git a/src/mame/drivers/silkroad.c b/src/mame/drivers/silkroad.c index e482c5a7448..b5b8f9cabf9 100644 --- a/src/mame/drivers/silkroad.c +++ b/src/mame/drivers/silkroad.c @@ -283,7 +283,7 @@ static MACHINE_CONFIG_START( silkroad, silkroad_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) MCFG_CPU_PROGRAM_MAP(cpu_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", silkroad_state, irq4_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/silvmil.c b/src/mame/drivers/silvmil.c index 2cf42249141..2130e833598 100644 --- a/src/mame/drivers/silvmil.c +++ b/src/mame/drivers/silvmil.c @@ -318,7 +318,7 @@ static MACHINE_CONFIG_START( silvmil, silvmil_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) MCFG_CPU_PROGRAM_MAP(silvmil_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", silvmil_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_4_096MHz) // 4.096MHz or 3.579545MHz - Need to verify MCFG_CPU_PROGRAM_MAP(silvmil_sound_map) diff --git a/src/mame/drivers/simpl156.c b/src/mame/drivers/simpl156.c index 87c51f9a03a..51c24ebdb64 100644 --- a/src/mame/drivers/simpl156.c +++ b/src/mame/drivers/simpl156.c @@ -383,9 +383,9 @@ static GFXDECODE_START( simpl156 ) GFXDECODE_END -static INTERRUPT_GEN( simpl156_vbl_interrupt ) +INTERRUPT_GEN_MEMBER(simpl156_state::simpl156_vbl_interrupt) { - device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); + device.execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); } @@ -425,7 +425,7 @@ static MACHINE_CONFIG_START( chainrec, simpl156_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", ARM, 28000000 /* /4 */) /*DE156*/ /* 7.000 MHz */ /* measured at 7.. seems to need 28? */ MCFG_CPU_PROGRAM_MAP(chainrec_map) - MCFG_CPU_VBLANK_INT("screen", simpl156_vbl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", simpl156_state, simpl156_vbl_interrupt) MCFG_EEPROM_93C46_ADD("eeprom") // 93C45 diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c index 2e09a7bafe7..1a98e3c9cc8 100644 --- a/src/mame/drivers/simpsons.c +++ b/src/mame/drivers/simpsons.c @@ -260,19 +260,18 @@ static TIMER_CALLBACK( dmaend_callback ) } -static INTERRUPT_GEN( simpsons_irq ) +INTERRUPT_GEN_MEMBER(simpsons_state::simpsons_irq) { - simpsons_state *state = device->machine().driver_data(); - if (k053246_is_irq_enabled(state->m_k053246)) + if (k053246_is_irq_enabled(m_k053246)) { - simpsons_objdma(device->machine()); + simpsons_objdma(machine()); // 32+256us delay at 8MHz dotclock; artificially shortened since actual V-blank length is unknown - device->machine().scheduler().timer_set(attotime::from_usec(30), FUNC(dmaend_callback)); + machine().scheduler().timer_set(attotime::from_usec(30), FUNC(dmaend_callback)); } - if (k052109_is_irq_enabled(state->m_k052109)) - device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); + if (k052109_is_irq_enabled(m_k052109)) + device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } static const k052109_interface simpsons_k052109_intf = @@ -309,7 +308,7 @@ static MACHINE_CONFIG_START( simpsons, simpsons_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, XTAL_24MHz/8) /* 052001 (verified on pcb) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", simpsons_irq) /* IRQ triggered by the 052109, FIRQ by the sprite hardware */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", simpsons_state, simpsons_irq) /* IRQ triggered by the 052109, FIRQ by the sprite hardware */ MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(z80_map) diff --git a/src/mame/drivers/skimaxx.c b/src/mame/drivers/skimaxx.c index 7469ff52019..a514fe8f90a 100644 --- a/src/mame/drivers/skimaxx.c +++ b/src/mame/drivers/skimaxx.c @@ -525,7 +525,7 @@ void skimaxx_state::machine_reset() static MACHINE_CONFIG_START( skimaxx, skimaxx_state ) MCFG_CPU_ADD("maincpu", M68EC030, XTAL_40MHz) MCFG_CPU_PROGRAM_MAP(68030_1_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) // 1,3,7 are identical, rest is RTE + MCFG_CPU_VBLANK_INT_DRIVER("screen", skimaxx_state, irq3_line_hold) // 1,3,7 are identical, rest is RTE MCFG_CPU_ADD("subcpu", M68EC030, XTAL_40MHz) MCFG_CPU_PROGRAM_MAP(68030_2_map) diff --git a/src/mame/drivers/skyarmy.c b/src/mame/drivers/skyarmy.c index cb73c396717..a09a31148ed 100644 --- a/src/mame/drivers/skyarmy.c +++ b/src/mame/drivers/skyarmy.c @@ -54,6 +54,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_skyarmy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(skyarmy_nmi_source); }; WRITE8_MEMBER(skyarmy_state::skyarmy_flip_screen_x_w) @@ -155,11 +156,10 @@ UINT32 skyarmy_state::screen_update_skyarmy(screen_device &screen, bitmap_ind16 return 0; } -static INTERRUPT_GEN( skyarmy_nmi_source ) +INTERRUPT_GEN_MEMBER(skyarmy_state::skyarmy_nmi_source) { - skyarmy_state *state = device->machine().driver_data(); - if(state->m_nmi) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -284,8 +284,8 @@ static MACHINE_CONFIG_START( skyarmy, skyarmy_state ) MCFG_CPU_ADD("maincpu", Z80,4000000) MCFG_CPU_PROGRAM_MAP(skyarmy_map) MCFG_CPU_IO_MAP(skyarmy_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) - MCFG_CPU_PERIODIC_INT(skyarmy_nmi_source,650) /* Hz */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", skyarmy_state, irq0_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(skyarmy_state, skyarmy_nmi_source, 650) /* Hz */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/skydiver.c b/src/mame/drivers/skydiver.c index cbe039a4e26..bc4e1ae60e6 100644 --- a/src/mame/drivers/skydiver.c +++ b/src/mame/drivers/skydiver.c @@ -143,21 +143,20 @@ WRITE8_MEMBER(skydiver_state::skydiver_nmion_w) } -static INTERRUPT_GEN( skydiver_interrupt ) +INTERRUPT_GEN_MEMBER(skydiver_state::skydiver_interrupt) { - skydiver_state *state = device->machine().driver_data(); - device_t *discrete = device->machine().device("discrete"); + device_t *discrete = machine().device("discrete"); /* Convert range data to divide value and write to sound */ - address_space &space = *device->machine().firstcpu->space(AS_PROGRAM); - discrete_sound_w(discrete, space, SKYDIVER_RANGE_DATA, (0x01 << (~state->m_videoram[0x394] & 0x07)) & 0xff); // Range 0-2 + address_space &space = *machine().firstcpu->space(AS_PROGRAM); + discrete_sound_w(discrete, space, SKYDIVER_RANGE_DATA, (0x01 << (~m_videoram[0x394] & 0x07)) & 0xff); // Range 0-2 - discrete_sound_w(discrete, space, SKYDIVER_RANGE3_EN, state->m_videoram[0x394] & 0x08); // Range 3 - note disable - discrete_sound_w(discrete, space, SKYDIVER_NOTE_DATA, ~state->m_videoram[0x395] & 0xff); // Note - freq - discrete_sound_w(discrete, space, SKYDIVER_NOISE_DATA, state->m_videoram[0x396] & 0x0f); // NAM - Noise Amplitude + discrete_sound_w(discrete, space, SKYDIVER_RANGE3_EN, m_videoram[0x394] & 0x08); // Range 3 - note disable + discrete_sound_w(discrete, space, SKYDIVER_NOTE_DATA, ~m_videoram[0x395] & 0xff); // Note - freq + discrete_sound_w(discrete, space, SKYDIVER_NOISE_DATA, m_videoram[0x396] & 0x0f); // NAM - Noise Amplitude - if (state->m_nmion) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmion) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -378,7 +377,7 @@ static MACHINE_CONFIG_START( skydiver, skydiver_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800,MASTER_CLOCK/16) /* ???? */ MCFG_CPU_PROGRAM_MAP(skydiver_map) - MCFG_CPU_PERIODIC_INT(skydiver_interrupt, 5*60) + MCFG_CPU_PERIODIC_INT_DRIVER(skydiver_state, skydiver_interrupt, 5*60) MCFG_WATCHDOG_VBLANK_INIT(8) // 128V clocks the same as VBLANK diff --git a/src/mame/drivers/skyfox.c b/src/mame/drivers/skyfox.c index 17f8d4f8778..08cf9983c6c 100644 --- a/src/mame/drivers/skyfox.c +++ b/src/mame/drivers/skyfox.c @@ -211,12 +211,11 @@ GFXDECODE_END /* Scroll the background on every vblank (guess). */ -static INTERRUPT_GEN( skyfox_interrupt ) +INTERRUPT_GEN_MEMBER(skyfox_state::skyfox_interrupt) { - skyfox_state *state = device->machine().driver_data(); /* Scroll the bg */ - state->m_bg_pos += (state->m_bg_ctrl >> 1) & 0x7; // maybe.. + m_bg_pos += (m_bg_ctrl >> 1) & 0x7; // maybe.. } void skyfox_state::machine_start() @@ -240,7 +239,7 @@ static MACHINE_CONFIG_START( skyfox, skyfox_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz/2) /* Verified at 4MHz */ MCFG_CPU_PROGRAM_MAP(skyfox_map) - MCFG_CPU_VBLANK_INT("screen", skyfox_interrupt) /* NMI caused by coin insertion */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", skyfox_state, skyfox_interrupt) /* NMI caused by coin insertion */ MCFG_CPU_ADD("audiocpu", Z80, XTAL_14_31818MHz/8) /* Verified at 1.789772MHz */ MCFG_CPU_PROGRAM_MAP(skyfox_sound_map) diff --git a/src/mame/drivers/skykid.c b/src/mame/drivers/skykid.c index ca0c47a5df8..eb27c2deba6 100644 --- a/src/mame/drivers/skykid.c +++ b/src/mame/drivers/skykid.c @@ -422,21 +422,19 @@ static const namco_interface namco_config = 0 /* stereo */ }; -static INTERRUPT_GEN( main_vblank_irq ) +INTERRUPT_GEN_MEMBER(skykid_state::main_vblank_irq) { - skykid_state *state = device->machine().driver_data(); - if(state->m_main_irq_mask) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_main_irq_mask) + device.execute().set_input_line(0, ASSERT_LINE); } -static INTERRUPT_GEN( mcu_vblank_irq ) +INTERRUPT_GEN_MEMBER(skykid_state::mcu_vblank_irq) { - skykid_state *state = device->machine().driver_data(); - if(state->m_mcu_irq_mask) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_mcu_irq_mask) + device.execute().set_input_line(0, ASSERT_LINE); } @@ -445,12 +443,12 @@ static MACHINE_CONFIG_START( skykid, skykid_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809,49152000/32) MCFG_CPU_PROGRAM_MAP(skykid_map) - MCFG_CPU_VBLANK_INT("screen", main_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", skykid_state, main_vblank_irq) MCFG_CPU_ADD("mcu", HD63701,49152000/8) /* or compatible 6808 with extra instructions */ MCFG_CPU_PROGRAM_MAP(mcu_map) MCFG_CPU_IO_MAP(mcu_port_map) - MCFG_CPU_VBLANK_INT("screen", mcu_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", skykid_state, mcu_vblank_irq) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */ diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c index 8ef0a478c0c..02ef368709b 100644 --- a/src/mame/drivers/skylncr.c +++ b/src/mame/drivers/skylncr.c @@ -109,6 +109,7 @@ public: TILE_GET_INFO_MEMBER(get_reel_4_tile_info); virtual void video_start(); UINT32 screen_update_skylncr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(skylncr_vblank_interrupt); }; @@ -695,10 +696,9 @@ static const ay8910_interface ay8910_config = // It runs in IM 0, thus needs an opcode on the data bus -static INTERRUPT_GEN( skylncr_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(skylncr_state::skylncr_vblank_interrupt) { - skylncr_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -712,7 +712,7 @@ static MACHINE_CONFIG_START( skylncr, skylncr_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(mem_map_skylncr) MCFG_CPU_IO_MAP(io_map_skylncr) - MCFG_CPU_VBLANK_INT("screen", skylncr_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", skylncr_state, skylncr_vblank_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/skyraid.c b/src/mame/drivers/skyraid.c index 6abbd7de96a..0fdff4c0509 100644 --- a/src/mame/drivers/skyraid.c +++ b/src/mame/drivers/skyraid.c @@ -220,7 +220,7 @@ static MACHINE_CONFIG_START( skyraid, skyraid_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 12096000 / 12) MCFG_CPU_PROGRAM_MAP(skyraid_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", skyraid_state, irq0_line_hold) MCFG_WATCHDOG_VBLANK_INIT(4) /* video hardware */ diff --git a/src/mame/drivers/slapfght.c b/src/mame/drivers/slapfght.c index 93ac56a61fa..f11ca1b9d83 100644 --- a/src/mame/drivers/slapfght.c +++ b/src/mame/drivers/slapfght.c @@ -734,12 +734,11 @@ static const ay8910_interface ay8910_interface_2 = DEVCB_NULL }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(slapfght_state::vblank_irq) { - slapfght_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -749,11 +748,11 @@ static MACHINE_CONFIG_START( perfrman, slapfght_state ) MCFG_CPU_ADD("maincpu", Z80,16000000/4) /* 4MHz ???, 16MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(perfrman_map) MCFG_CPU_IO_MAP(slapfght_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", slapfght_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,16000000/8) /* 2MHz ???, 16MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(perfrman_sound_map) - MCFG_CPU_PERIODIC_INT(getstar_interrupt,4*60) /* music speed, verified */ + MCFG_CPU_PERIODIC_INT_DRIVER(slapfght_state, getstar_interrupt, 4*60) /* music speed, verified */ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */ @@ -795,11 +794,11 @@ static MACHINE_CONFIG_START( tigerhb, slapfght_state ) MCFG_CPU_ADD("maincpu", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(tigerh_map) MCFG_CPU_IO_MAP(tigerhb_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", slapfght_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(slapfght_sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,6*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(slapfght_state, nmi_line_pulse, 6*60) /* ??? */ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */ @@ -840,11 +839,11 @@ static MACHINE_CONFIG_START( tigerh, slapfght_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_36MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tigerh_map) MCFG_CPU_IO_MAP(tigerh_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", slapfght_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_36MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(slapfght_sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,6*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(slapfght_state, nmi_line_pulse, 6*60) /* ??? */ MCFG_CPU_ADD("mcu", M68705,XTAL_36MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tigerh_m68705_map) @@ -889,11 +888,11 @@ static MACHINE_CONFIG_START( slapfigh, slapfght_state ) MCFG_CPU_ADD("maincpu",Z80, XTAL_36MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(slapfght_map) MCFG_CPU_IO_MAP(slapfght_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", slapfght_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_36MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(slapfght_sound_map) - MCFG_CPU_PERIODIC_INT(getstar_interrupt, 3*60) + MCFG_CPU_PERIODIC_INT_DRIVER(slapfght_state, getstar_interrupt, 3*60) MCFG_CPU_ADD("mcu", M68705, XTAL_36MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(slapfight_m68705_map) diff --git a/src/mame/drivers/slapshot.c b/src/mame/drivers/slapshot.c index 45c19ec7cf9..7a8fa877dd7 100644 --- a/src/mame/drivers/slapshot.c +++ b/src/mame/drivers/slapshot.c @@ -178,10 +178,10 @@ static TIMER_CALLBACK( slapshot_interrupt6 ) } -static INTERRUPT_GEN( slapshot_interrupt ) +INTERRUPT_GEN_MEMBER(slapshot_state::slapshot_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000 - 500), FUNC(slapshot_interrupt6)); - device->execute().set_input_line(5, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(200000 - 500), FUNC(slapshot_interrupt6)); + device.execute().set_input_line(5, HOLD_LINE); } @@ -543,7 +543,7 @@ static MACHINE_CONFIG_START( slapshot, slapshot_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14346000) /* 28.6860 MHz / 2 ??? */ MCFG_CPU_PROGRAM_MAP(slapshot_map) - MCFG_CPU_VBLANK_INT("screen", slapshot_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", slapshot_state, slapshot_interrupt) MCFG_CPU_ADD("audiocpu", Z80,32000000/8) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(opwolf3_z80_sound_map) @@ -589,7 +589,7 @@ static MACHINE_CONFIG_START( opwolf3, slapshot_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14346000) /* 28.6860 MHz / 2 ??? */ MCFG_CPU_PROGRAM_MAP(opwolf3_map) - MCFG_CPU_VBLANK_INT("screen", slapshot_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", slapshot_state, slapshot_interrupt) MCFG_CPU_ADD("audiocpu", Z80,32000000/8) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(opwolf3_z80_sound_map) diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c index 8228b3597c7..c53787fba35 100644 --- a/src/mame/drivers/sliver.c +++ b/src/mame/drivers/sliver.c @@ -473,7 +473,7 @@ static TIMER_DEVICE_CALLBACK ( obj_irq_cb ) static MACHINE_CONFIG_START( sliver, sliver_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(sliver_map) - MCFG_CPU_VBLANK_INT("screen",irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sliver_state, irq4_line_hold) MCFG_TIMER_ADD_PERIODIC("obj_actel", obj_irq_cb, attotime::from_hz(60)) /* unknown clock, causes "obj actel ready error" without this */ // irq 2 valid but not used? diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c index f33d7a5d16e..485ad250bfc 100644 --- a/src/mame/drivers/snk.c +++ b/src/mame/drivers/snk.c @@ -3625,16 +3625,16 @@ static MACHINE_CONFIG_START( marvins, snk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 3360000) /* 3.36 MHz */ MCFG_CPU_PROGRAM_MAP(marvins_cpuA_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, 3360000) /* 3.36 MHz */ MCFG_CPU_PROGRAM_MAP(marvins_cpuB_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* verified on schematics */ MCFG_CPU_PROGRAM_MAP(marvins_sound_map) MCFG_CPU_IO_MAP(marvins_sound_portmap) - MCFG_CPU_PERIODIC_INT(nmi_line_assert, 244) // schematics show a separate 244Hz timer + MCFG_CPU_PERIODIC_INT_DRIVER(snk_state, nmi_line_assert, 244) // schematics show a separate 244Hz timer MCFG_QUANTUM_TIME(attotime::from_hz(6000)) @@ -3694,16 +3694,16 @@ static MACHINE_CONFIG_START( jcross, snk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 3350000) /* NOT verified */ MCFG_CPU_PROGRAM_MAP(jcross_cpuA_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, 3350000) /* NOT verified */ MCFG_CPU_PROGRAM_MAP(jcross_cpuB_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* NOT verified */ MCFG_CPU_PROGRAM_MAP(jcross_sound_map) MCFG_CPU_IO_MAP(jcross_sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_assert, 244) // Marvin's frequency, sounds ok + MCFG_CPU_PERIODIC_INT_DRIVER(snk_state, irq0_line_assert, 244) // Marvin's frequency, sounds ok MCFG_QUANTUM_TIME(attotime::from_hz(6000)) @@ -3762,7 +3762,7 @@ static MACHINE_CONFIG_DERIVED( hal21, jcross ) MCFG_CPU_MODIFY("audiocpu") MCFG_CPU_PROGRAM_MAP(hal21_sound_map) MCFG_CPU_IO_MAP(hal21_sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 220) // music tempo, hand tuned + MCFG_CPU_PERIODIC_INT_DRIVER(snk_state, irq0_line_hold, 220) // music tempo, hand tuned /* video hardware */ MCFG_VIDEO_START_OVERRIDE(snk_state,hal21) @@ -3774,11 +3774,11 @@ static MACHINE_CONFIG_START( tnk3, snk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_13_4MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tnk3_cpuA_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_13_4MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tnk3_cpuB_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tnk3_YM3526_sound_map) @@ -3858,11 +3858,11 @@ static MACHINE_CONFIG_START( ikari, snk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_13_4MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(ikari_cpuA_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_13_4MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(ikari_cpuB_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(YM3526_YM3526_sound_map) @@ -3915,11 +3915,11 @@ static MACHINE_CONFIG_START( bermudat, snk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(bermudat_cpuA_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(bermudat_cpuB_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(YM3526_Y8950_sound_map) @@ -4018,11 +4018,11 @@ static MACHINE_CONFIG_START( tdfever, snk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(tdfever_cpuA_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(tdfever_cpuB_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(YM3526_Y8950_sound_map) diff --git a/src/mame/drivers/snk6502.c b/src/mame/drivers/snk6502.c index c9c3365d939..fbaa838f3c5 100644 --- a/src/mame/drivers/snk6502.c +++ b/src/mame/drivers/snk6502.c @@ -740,17 +740,16 @@ GFXDECODE_END * *************************************/ -static INTERRUPT_GEN( satansat_interrupt ) +INTERRUPT_GEN_MEMBER(snk6502_state::satansat_interrupt) { - snk6502_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ + if(m_irq_mask) + device.execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ } -static INTERRUPT_GEN( snk6502_interrupt ) +INTERRUPT_GEN_MEMBER(snk6502_state::snk6502_interrupt) { - device->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ + device.execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ } @@ -824,7 +823,7 @@ static MACHINE_CONFIG_START( sasuke, snk6502_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 16) // 700 kHz MCFG_CPU_PROGRAM_MAP(sasuke_map) - MCFG_CPU_VBLANK_INT("screen",satansat_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk6502_state, satansat_interrupt) MCFG_MACHINE_RESET_OVERRIDE(snk6502_state,sasuke) @@ -897,7 +896,7 @@ static MACHINE_CONFIG_START( vanguard, snk6502_state ) //MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 8) // 1.4 MHz MCFG_CPU_ADD("maincpu", M6502, 930000) // adjusted MCFG_CPU_PROGRAM_MAP(vanguard_map) - MCFG_CPU_VBLANK_INT("screen",snk6502_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk6502_state, snk6502_interrupt) MCFG_MACHINE_RESET_OVERRIDE(snk6502_state,vanguard) diff --git a/src/mame/drivers/snk68.c b/src/mame/drivers/snk68.c index 71b7a8fb17a..05ea006a56b 100644 --- a/src/mame/drivers/snk68.c +++ b/src/mame/drivers/snk68.c @@ -593,7 +593,7 @@ static MACHINE_CONFIG_START( pow, snk68_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_18MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(pow_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snk68_state, irq1_line_hold) MCFG_CPU_ADD("soundcpu", Z80, XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/snookr10.c b/src/mame/drivers/snookr10.c index daf079f2038..214577ca64e 100644 --- a/src/mame/drivers/snookr10.c +++ b/src/mame/drivers/snookr10.c @@ -690,7 +690,7 @@ static MACHINE_CONFIG_START( snookr10, snookr10_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M65SC02, MASTER_CLOCK/8) /* 2 MHz (1.999 MHz measured) */ MCFG_CPU_PROGRAM_MAP(snookr10_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snookr10_state, nmi_line_pulse) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c index ff5d92c42c1..f7ef463b773 100644 --- a/src/mame/drivers/snowbros.c +++ b/src/mame/drivers/snowbros.c @@ -1695,7 +1695,7 @@ static MACHINE_CONFIG_START( twinadv, snowbros_state ) MCFG_CPU_ADD("soundcpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(twinadv_sound_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", snowbros_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/solomon.c b/src/mame/drivers/solomon.c index e8aecb72468..8e57aaabb42 100644 --- a/src/mame/drivers/solomon.c +++ b/src/mame/drivers/solomon.c @@ -193,12 +193,11 @@ static GFXDECODE_START( solomon ) GFXDECODE_ENTRY( "gfx3", 0, spritelayout, 0, 8 ) /* colors 0-127 */ GFXDECODE_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(solomon_state::vblank_irq) { - solomon_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -208,12 +207,12 @@ static MACHINE_CONFIG_START( solomon, solomon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4.0 MHz (?????) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", solomon_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, 3072000) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_portmap) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(solomon_state, irq0_line_hold, 2*60) /* ??? */ /* NMIs are caused by the main CPU */ /* video hardware */ diff --git a/src/mame/drivers/sonson.c b/src/mame/drivers/sonson.c index 182b425bf51..9b19d940b3d 100644 --- a/src/mame/drivers/sonson.c +++ b/src/mame/drivers/sonson.c @@ -244,11 +244,11 @@ static MACHINE_CONFIG_START( sonson, sonson_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809,12000000/6) /* 2 MHz ??? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sonson_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", M6809,12000000/6) /* 2 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* FIRQs are triggered by the main CPU */ + MCFG_CPU_PERIODIC_INT_DRIVER(sonson_state, irq0_line_hold, 4*60) /* FIRQs are triggered by the main CPU */ /* video hardware */ diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c index 5e4f2a8fb21..6c9d8da5bb2 100644 --- a/src/mame/drivers/spaceg.c +++ b/src/mame/drivers/spaceg.c @@ -428,7 +428,7 @@ static MACHINE_CONFIG_START( spaceg, spaceg_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,2500000) /* 2.5 MHz */ MCFG_CPU_PROGRAM_MAP(spaceg_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) /* 60 Hz NMIs (verified) */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", spaceg_state, nmi_line_pulse) /* 60 Hz NMIs (verified) */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/spbactn.c b/src/mame/drivers/spbactn.c index f6867d9a617..0ab3285b9d1 100644 --- a/src/mame/drivers/spbactn.c +++ b/src/mame/drivers/spbactn.c @@ -349,7 +349,7 @@ static MACHINE_CONFIG_START( spbactn, spbactn_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) MCFG_CPU_PROGRAM_MAP(spbactn_map) - MCFG_CPU_VBLANK_INT("screen", irq3_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", spbactn_state, irq3_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(spbactn_sound_map) diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c index 6e0f442433f..577569a3f51 100644 --- a/src/mame/drivers/spcforce.c +++ b/src/mame/drivers/spcforce.c @@ -253,12 +253,11 @@ static const sn76496_config psg_intf = }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(spcforce_state::vblank_irq) { - spcforce_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(3, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(3, HOLD_LINE); } static MACHINE_CONFIG_START( spcforce, spcforce_state ) @@ -267,7 +266,7 @@ static MACHINE_CONFIG_START( spcforce, spcforce_state ) /* FIXME: The 8085A had a max clock of 6MHz, internally divided by 2! */ MCFG_CPU_ADD("maincpu", I8085A, 8000000 * 2) /* 4.00 MHz??? */ MCFG_CPU_PROGRAM_MAP(spcforce_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", spcforce_state, vblank_irq) MCFG_CPU_ADD("audiocpu", I8035, 6144000) /* divisor ??? */ MCFG_CPU_PROGRAM_MAP(spcforce_sound_map) diff --git a/src/mame/drivers/speedatk.c b/src/mame/drivers/speedatk.c index 6e0e8f60fb3..0dd3836b364 100644 --- a/src/mame/drivers/speedatk.c +++ b/src/mame/drivers/speedatk.c @@ -325,7 +325,7 @@ static MACHINE_CONFIG_START( speedatk, speedatk_state ) MCFG_CPU_ADD("maincpu", Z80,MASTER_CLOCK/2) //divider is unknown MCFG_CPU_PROGRAM_MAP(speedatk_mem) MCFG_CPU_IO_MAP(speedatk_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", speedatk_state, irq0_line_hold) MCFG_WATCHDOG_VBLANK_INIT(8) // timing is unknown diff --git a/src/mame/drivers/speedbal.c b/src/mame/drivers/speedbal.c index 18c055eae5d..5188a5801ed 100644 --- a/src/mame/drivers/speedbal.c +++ b/src/mame/drivers/speedbal.c @@ -223,12 +223,12 @@ static MACHINE_CONFIG_START( speedbal, speedbal_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(main_cpu_map) MCFG_CPU_IO_MAP(main_cpu_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", speedbal_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 2660000) /* 2.66 MHz ??? Maybe yes */ MCFG_CPU_PROGRAM_MAP(sound_cpu_map) MCFG_CPU_IO_MAP(sound_cpu_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,8*60) + MCFG_CPU_PERIODIC_INT_DRIVER(speedbal_state, irq0_line_hold, 8*60) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/speedspn.c b/src/mame/drivers/speedspn.c index 8c1ed3a8ec4..038f8008c62 100644 --- a/src/mame/drivers/speedspn.c +++ b/src/mame/drivers/speedspn.c @@ -273,7 +273,7 @@ static MACHINE_CONFIG_START( speedspn, speedspn_state ) MCFG_CPU_ADD("maincpu",Z80,6000000) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(speedspn_map) MCFG_CPU_IO_MAP(speedspn_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", speedspn_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,6000000) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(speedspn_sound_map) diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c index fcf5fb08c89..39b9c5d3791 100644 --- a/src/mame/drivers/speglsht.c +++ b/src/mame/drivers/speglsht.c @@ -391,12 +391,12 @@ static MACHINE_CONFIG_START( speglsht, speglsht_state ) MCFG_CPU_PROGRAM_MAP(st0016_mem) MCFG_CPU_IO_MAP(st0016_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", speglsht_state, irq0_line_hold) MCFG_CPU_ADD("sub", R3000LE, 25000000) MCFG_CPU_CONFIG(r3000_config) MCFG_CPU_PROGRAM_MAP(speglsht_mem) - MCFG_CPU_VBLANK_INT("screen", irq4_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", speglsht_state, irq4_line_assert) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) MCFG_MACHINE_RESET_OVERRIDE(speglsht_state,speglsht) diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c index fd11bcfff0d..0b4421acff2 100644 --- a/src/mame/drivers/spiders.c +++ b/src/mame/drivers/spiders.c @@ -269,19 +269,19 @@ static const pia6821_interface pia_1_intf = DEVCB_DRIVER_LINE_MEMBER(spiders_state,main_cpu_irq) /* IRQB */ }; -static INTERRUPT_GEN( update_pia_1 ) +INTERRUPT_GEN_MEMBER(spiders_state::update_pia_1) { - pia6821_device *pia1 = device->machine().device("pia1"); + pia6821_device *pia1 = machine().device("pia1"); /* update the different PIA pins from the input ports */ /* CA1 - copy of PA1 (COIN1) */ - pia1->ca1_w(device->machine().root_device().ioport("IN0")->read() & 0x02); + pia1->ca1_w(machine().root_device().ioport("IN0")->read() & 0x02); /* CA2 - copy of PA0 (SERVICE1) */ - pia1->ca2_w(device->machine().root_device().ioport("IN0")->read() & 0x01); + pia1->ca2_w(machine().root_device().ioport("IN0")->read() & 0x01); /* CB1 - (crosshatch) */ - pia1->cb1_w(device->machine().root_device().ioport("XHATCH")->read()); + pia1->cb1_w(machine().root_device().ioport("XHATCH")->read()); /* CB2 - NOT CONNECTED */ } @@ -693,7 +693,7 @@ static MACHINE_CONFIG_START( spiders, spiders_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2800000) MCFG_CPU_PROGRAM_MAP(spiders_main_map) - MCFG_CPU_PERIODIC_INT(update_pia_1, 25) + MCFG_CPU_PERIODIC_INT_DRIVER(spiders_state, update_pia_1, 25) MCFG_CPU_ADD("audiocpu", M6802, 3000000) MCFG_CPU_PROGRAM_MAP(spiders_audio_map) diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c index ea6cb645086..a22d1aba6f9 100644 --- a/src/mame/drivers/splash.c +++ b/src/mame/drivers/splash.c @@ -496,11 +496,11 @@ static MACHINE_CONFIG_START( splash, splash_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* 12MHz (24/2) */ MCFG_CPU_PROGRAM_MAP(splash_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", splash_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_30MHz/8) /* 3.75MHz (30/8) */ MCFG_CPU_PROGRAM_MAP(splash_sound_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,60*64) /* needed for the msm5205 to play the samples */ + MCFG_CPU_PERIODIC_INT_DRIVER(splash_state, nmi_line_pulse, 60*64) /* needed for the msm5205 to play the samples */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -539,11 +539,10 @@ static const ym2203_interface ym2203_config = DEVCB_LINE(ym_irq) }; -static INTERRUPT_GEN( roldfrog_interrupt ) +INTERRUPT_GEN_MEMBER(splash_state::roldfrog_interrupt) { - splash_state *state = device->machine().driver_data(); - state->m_vblank_irq = 1; - roldfrog_update_irq(device->machine()); + m_vblank_irq = 1; + roldfrog_update_irq(machine()); } static MACHINE_CONFIG_START( roldfrog, splash_state ) @@ -551,12 +550,12 @@ static MACHINE_CONFIG_START( roldfrog, splash_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* 12 MHz - verified */ MCFG_CPU_PROGRAM_MAP(roldfrog_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", splash_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) /* 3 MHz - verified */ MCFG_CPU_PROGRAM_MAP(roldfrog_sound_map) MCFG_CPU_IO_MAP(roldfrog_sound_io_map) - MCFG_CPU_VBLANK_INT("screen", roldfrog_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", splash_state, roldfrog_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -632,7 +631,7 @@ static MACHINE_CONFIG_START( funystrp, splash_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* 12 MHz (24/2) */ MCFG_CPU_PROGRAM_MAP(funystrp_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", splash_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/4) /* 6MHz (24/4) */ MCFG_CPU_PROGRAM_MAP(funystrp_sound_map) diff --git a/src/mame/drivers/spoker.c b/src/mame/drivers/spoker.c index 37a6a8e0732..669ed88c0a1 100644 --- a/src/mame/drivers/spoker.c +++ b/src/mame/drivers/spoker.c @@ -59,6 +59,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_spoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(spoker_interrupt); }; WRITE8_MEMBER(spoker_state::bg_tile_w) @@ -519,11 +520,10 @@ void spoker_state::machine_reset() m_video_enable = 1; } -static INTERRUPT_GEN( spoker_interrupt ) +INTERRUPT_GEN_MEMBER(spoker_state::spoker_interrupt) { -// spoker_state *state = device->machine().driver_data(); - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } static MACHINE_CONFIG_START( spoker, spoker_state ) @@ -532,7 +532,7 @@ static MACHINE_CONFIG_START( spoker, spoker_state ) MCFG_CPU_ADD("maincpu", Z180, XTAL_12MHz / 2) /* HD64180RP8, 8 MHz? */ MCFG_CPU_PROGRAM_MAP(spoker_map) MCFG_CPU_IO_MAP(spoker_portmap) - MCFG_CPU_VBLANK_INT("screen",spoker_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", spoker_state, spoker_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") @@ -564,8 +564,8 @@ static MACHINE_CONFIG_DERIVED( 3super8, spoker ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(spoker_map) MCFG_CPU_IO_MAP(3super8_portmap) - MCFG_CPU_VBLANK_INT("screen",spoker_interrupt) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,120) // this signal comes from the PIC + MCFG_CPU_VBLANK_INT_DRIVER("screen", spoker_state, spoker_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(spoker_state, irq0_line_hold, 120) // this signal comes from the PIC MCFG_GFXDECODE(3super8) diff --git a/src/mame/drivers/spool99.c b/src/mame/drivers/spool99.c index 2483e48fc74..fba8c37c366 100644 --- a/src/mame/drivers/spool99.c +++ b/src/mame/drivers/spool99.c @@ -352,7 +352,7 @@ static MACHINE_CONFIG_START( spool99, spool99_state ) MCFG_CPU_ADD("maincpu", Z80, 24000000/8) MCFG_CPU_PROGRAM_MAP(spool99_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", spool99_state, irq0_line_hold) MCFG_GFXDECODE(spool99) diff --git a/src/mame/drivers/sprcros2.c b/src/mame/drivers/sprcros2.c index e7eb7007fa3..236614d2037 100644 --- a/src/mame/drivers/sprcros2.c +++ b/src/mame/drivers/sprcros2.c @@ -262,12 +262,11 @@ static TIMER_DEVICE_CALLBACK( sprcros2_m_interrupt ) } } -static INTERRUPT_GEN( sprcros2_s_interrupt ) +INTERRUPT_GEN_MEMBER(sprcros2_state::sprcros2_s_interrupt) { - sprcros2_state *state = device->machine().driver_data(); - if(state->m_s_port3&0x01) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_s_port3&0x01) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } void sprcros2_state::machine_start() @@ -288,7 +287,7 @@ static MACHINE_CONFIG_START( sprcros2, sprcros2_state ) MCFG_CPU_ADD("slave", Z80,10000000/2) MCFG_CPU_PROGRAM_MAP(sprcros2_slave_map) MCFG_CPU_IO_MAP(sprcros2_slave_io_map) - MCFG_CPU_PERIODIC_INT(sprcros2_s_interrupt,2*60) //2 nmis + MCFG_CPU_PERIODIC_INT_DRIVER(sprcros2_state, sprcros2_s_interrupt, 2*60) //2 nmis /* video hardware */ diff --git a/src/mame/drivers/sprint2.c b/src/mame/drivers/sprint2.c index b4bf7e9c06d..fe95637e6b6 100644 --- a/src/mame/drivers/sprint2.c +++ b/src/mame/drivers/sprint2.c @@ -66,10 +66,10 @@ static int service_mode(running_machine &machine) } -static INTERRUPT_GEN( sprint2 ) +INTERRUPT_GEN_MEMBER(sprint2_state::sprint2) { - sprint2_state *state = device->machine().driver_data(); - device_t *discrete = device->machine().device("discrete"); + sprint2_state *state = machine().driver_data(); + device_t *discrete = machine().device("discrete"); /* handle steering wheels */ @@ -79,40 +79,40 @@ static INTERRUPT_GEN( sprint2 ) for (i = 0; i < 2; i++) { - signed char delta = state->ioport(i ? "DIAL_P2" : "DIAL_P1")->read() - state->m_dial[i]; + signed char delta = ioport(i ? "DIAL_P2" : "DIAL_P1")->read() - m_dial[i]; if (delta < 0) { - state->m_steering[i] = 0x00; + m_steering[i] = 0x00; } if (delta > 0) { - state->m_steering[i] = 0x40; + m_steering[i] = 0x40; } - state->m_dial[i] += delta; + m_dial[i] += delta; - switch (device->machine().root_device().ioport(i ? "GEAR_P2" : "GEAR_P1")->read() & 15) + switch (machine().root_device().ioport(i ? "GEAR_P2" : "GEAR_P1")->read() & 15) { - case 1: state->m_gear[i] = 1; break; - case 2: state->m_gear[i] = 2; break; - case 4: state->m_gear[i] = 3; break; - case 8: state->m_gear[i] = 4; break; + case 1: m_gear[i] = 1; break; + case 2: m_gear[i] = 2; break; + case 4: m_gear[i] = 3; break; + case 8: m_gear[i] = 4; break; } } } - address_space &space = *device->machine().firstcpu->space(AS_PROGRAM); - discrete_sound_w(discrete, space, SPRINT2_MOTORSND1_DATA, state->m_video_ram[0x394] & 15); // also DOMINOS_FREQ_DATA - discrete_sound_w(discrete, space, SPRINT2_MOTORSND2_DATA, state->m_video_ram[0x395] & 15); - discrete_sound_w(discrete, space, SPRINT2_CRASHSND_DATA, state->m_video_ram[0x396] & 15); // also DOMINOS_AMP_DATA + address_space &space = *machine().firstcpu->space(AS_PROGRAM); + discrete_sound_w(discrete, space, SPRINT2_MOTORSND1_DATA, m_video_ram[0x394] & 15); // also DOMINOS_FREQ_DATA + discrete_sound_w(discrete, space, SPRINT2_MOTORSND2_DATA, m_video_ram[0x395] & 15); + discrete_sound_w(discrete, space, SPRINT2_CRASHSND_DATA, m_video_ram[0x396] & 15); // also DOMINOS_AMP_DATA /* interrupts and watchdog are disabled during service mode */ - device->machine().watchdog_enable(!service_mode(device->machine())); + machine().watchdog_enable(!service_mode(machine())); - if (!service_mode(device->machine())) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (!service_mode(machine())) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -499,7 +499,7 @@ static MACHINE_CONFIG_START( sprint2, sprint2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, XTAL_12_096MHz / 16) MCFG_CPU_PROGRAM_MAP(sprint2_map) - MCFG_CPU_VBLANK_INT("screen", sprint2) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sprint2_state, sprint2) MCFG_WATCHDOG_VBLANK_INIT(8) /* video hardware */ diff --git a/src/mame/drivers/spy.c b/src/mame/drivers/spy.c index 919893995d0..5cdc95cfb29 100644 --- a/src/mame/drivers/spy.c +++ b/src/mame/drivers/spy.c @@ -26,12 +26,11 @@ #include "includes/konamipt.h" #include "includes/spy.h" -static INTERRUPT_GEN( spy_interrupt ) +INTERRUPT_GEN_MEMBER(spy_state::spy_interrupt) { - spy_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) - device->execute().set_input_line(0, HOLD_LINE); + if (k052109_is_irq_enabled(m_k052109)) + device.execute().set_input_line(0, HOLD_LINE); } READ8_MEMBER(spy_state::spy_bankedram1_r) @@ -532,7 +531,7 @@ static MACHINE_CONFIG_START( spy, spy_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(spy_map) - MCFG_CPU_VBLANK_INT("screen", spy_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", spy_state, spy_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(spy_sound_map) diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c index f629badac10..24a1cfc3f4b 100644 --- a/src/mame/drivers/srmp2.c +++ b/src/mame/drivers/srmp2.c @@ -1165,8 +1165,8 @@ static MACHINE_CONFIG_START( srmp2, srmp2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,16000000/2) /* 8.00 MHz */ MCFG_CPU_PROGRAM_MAP(srmp2_map) - MCFG_CPU_VBLANK_INT("screen",irq4_line_assert) - MCFG_CPU_PERIODIC_INT(irq2_line_assert,15*60) /* Interrupt times is not understood */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", srmp2_state, irq4_line_assert) + MCFG_CPU_PERIODIC_INT_DRIVER(srmp2_state, irq2_line_assert, 15*60) /* Interrupt times is not understood */ MCFG_MACHINE_START_OVERRIDE(srmp2_state,srmp2) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1207,7 +1207,7 @@ static MACHINE_CONFIG_START( srmp3, srmp2_state ) // 4000000, /* 4.00 MHz ? */ MCFG_CPU_PROGRAM_MAP(srmp3_map) MCFG_CPU_IO_MAP(srmp3_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", srmp2_state, irq0_line_assert) MCFG_MACHINE_START_OVERRIDE(srmp2_state,srmp3) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1255,8 +1255,8 @@ static MACHINE_CONFIG_START( mjyuugi, srmp2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,16000000/2) /* 8.00 MHz */ MCFG_CPU_PROGRAM_MAP(mjyuugi_map) - MCFG_CPU_VBLANK_INT("screen",irq4_line_assert) - MCFG_CPU_PERIODIC_INT(irq2_line_assert,15*60) /* Interrupt times is not understood */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", srmp2_state, irq4_line_assert) + MCFG_CPU_PERIODIC_INT_DRIVER(srmp2_state, irq2_line_assert, 15*60) /* Interrupt times is not understood */ MCFG_MACHINE_START_OVERRIDE(srmp2_state,srmp2) diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c index b56bcf8a20c..18b25122bda 100644 --- a/src/mame/drivers/srmp5.c +++ b/src/mame/drivers/srmp5.c @@ -559,12 +559,12 @@ static MACHINE_CONFIG_START( srmp5, srmp5_state ) MCFG_CPU_ADD("maincpu",Z80,8000000) MCFG_CPU_PROGRAM_MAP(st0016_mem) MCFG_CPU_IO_MAP(st0016_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", srmp5_state, irq0_line_hold) MCFG_CPU_ADD("sub", R3000LE, 25000000) MCFG_CPU_CONFIG(r3000_config) MCFG_CPU_PROGRAM_MAP(srmp5_mem) - MCFG_CPU_VBLANK_INT("screen", irq4_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", srmp5_state, irq4_line_assert) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c index 5eff4350907..accdcce6e27 100644 --- a/src/mame/drivers/srmp6.c +++ b/src/mame/drivers/srmp6.c @@ -674,7 +674,7 @@ static MACHINE_CONFIG_START( srmp6, srmp6_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(srmp6_map) - MCFG_CPU_VBLANK_INT("screen",irq4_line_assert) // irq3 is a timer irq, but it's never enabled + MCFG_CPU_VBLANK_INT_DRIVER("screen", srmp6_state, irq4_line_assert) // irq3 is a timer irq, but it's never enabled MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/srumbler.c b/src/mame/drivers/srumbler.c index ed993146de5..0900615eb4a 100644 --- a/src/mame/drivers/srumbler.c +++ b/src/mame/drivers/srumbler.c @@ -243,7 +243,7 @@ static MACHINE_CONFIG_START( srumbler, srumbler_state ) MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* 3 MHz ??? */ MCFG_CPU_PROGRAM_MAP(srumbler_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(srumbler_state, irq0_line_hold, 4*60) /* video hardware */ diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c index 7626ed74e9e..d0e9997d2e9 100644 --- a/src/mame/drivers/ssfindo.c +++ b/src/mame/drivers/ssfindo.c @@ -247,6 +247,7 @@ public: DECLARE_DRIVER_INIT(tetfight); virtual void machine_reset(); UINT32 screen_update_ssfindo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ssfindo_interrupt); }; @@ -330,13 +331,12 @@ static void PS7500_startTimer1(running_machine &machine) state->m_PS7500timer1->adjust(attotime::from_usec(val ), 0, attotime::from_usec(val )); } -static INTERRUPT_GEN( ssfindo_interrupt ) +INTERRUPT_GEN_MEMBER(ssfindo_state::ssfindo_interrupt) { - ssfindo_state *state = device->machine().driver_data(); - state->m_PS7500_IO[IRQSTA]|=0x08; - if(state->m_PS7500_IO[IRQMSKA]&0x08) + m_PS7500_IO[IRQSTA]|=0x08; + if(m_PS7500_IO[IRQMSKA]&0x08) { - generic_pulse_irq_line(device, ARM7_IRQ_LINE, 1); + generic_pulse_irq_line(device.execute(), ARM7_IRQ_LINE, 1); } } @@ -757,7 +757,7 @@ static MACHINE_CONFIG_START( ssfindo, ssfindo_state ) MCFG_CPU_ADD("maincpu", ARM7, 54000000) // guess... MCFG_CPU_PROGRAM_MAP(ssfindo_map) - MCFG_CPU_VBLANK_INT("screen", ssfindo_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ssfindo_state, ssfindo_interrupt) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sshangha.c b/src/mame/drivers/sshangha.c index 5201d733b36..eb9d6f5bf7e 100644 --- a/src/mame/drivers/sshangha.c +++ b/src/mame/drivers/sshangha.c @@ -395,7 +395,7 @@ static MACHINE_CONFIG_START( sshangha, sshangha_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 28000000/2) MCFG_CPU_PROGRAM_MAP(sshangha_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sshangha_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 16000000/4) MCFG_CPU_PROGRAM_MAP(sshangha_sound_map) diff --git a/src/mame/drivers/ssingles.c b/src/mame/drivers/ssingles.c index 7adb48c7350..f6ed88b7f61 100644 --- a/src/mame/drivers/ssingles.c +++ b/src/mame/drivers/ssingles.c @@ -173,6 +173,7 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(controls_r); DECLARE_DRIVER_INIT(ssingles); virtual void video_start(); + INTERRUPT_GEN_MEMBER(atamanot_irq); }; //fake palette @@ -568,7 +569,7 @@ static MACHINE_CONFIG_START( ssingles, ssingles_state ) MCFG_CPU_ADD("maincpu", Z80,4000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(ssingles_map) MCFG_CPU_IO_MAP(ssingles_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ssingles_state, nmi_line_pulse) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(4000000, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */ @@ -592,7 +593,7 @@ static MACHINE_CONFIG_START( ssingles, ssingles_state ) MACHINE_CONFIG_END -static INTERRUPT_GEN( atamanot_irq ) +INTERRUPT_GEN_MEMBER(ssingles_state::atamanot_irq) { // ... } @@ -601,7 +602,7 @@ static MACHINE_CONFIG_DERIVED( atamanot, ssingles ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(atamanot_map) MCFG_CPU_IO_MAP(atamanot_io_map) - MCFG_CPU_VBLANK_INT("screen", atamanot_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ssingles_state, atamanot_irq) MCFG_DEVICE_REMOVE("crtc") diff --git a/src/mame/drivers/sslam.c b/src/mame/drivers/sslam.c index 1c5771d51b8..cb2bdc3bb5c 100644 --- a/src/mame/drivers/sslam.c +++ b/src/mame/drivers/sslam.c @@ -707,7 +707,7 @@ static MACHINE_CONFIG_START( sslam, sslam_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(sslam_program_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sslam_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", I8051, 12000000) MCFG_DEVICE_DISABLE() /* Internal code is not dumped - 2 boards were protected */ @@ -737,7 +737,7 @@ static MACHINE_CONFIG_START( powerbls, sslam_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(powerbls_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sslam_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", I80C51, 12000000) /* 83C751 */ MCFG_CPU_IO_MAP(sound_io_map) diff --git a/src/mame/drivers/ssozumo.c b/src/mame/drivers/ssozumo.c index ae425aeea87..52f906637d9 100644 --- a/src/mame/drivers/ssozumo.c +++ b/src/mame/drivers/ssozumo.c @@ -180,12 +180,11 @@ static GFXDECODE_START( ssozumo ) GFXDECODE_ENTRY( "gfx3", 0, spritelayout, 8*8, 2 ) GFXDECODE_END -static INTERRUPT_GEN( sound_timer_irq ) +INTERRUPT_GEN_MEMBER(ssozumo_state::sound_timer_irq) { - ssozumo_state *state = device->machine().driver_data(); - if(state->m_sound_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_sound_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( ssozumo, ssozumo_state ) @@ -193,11 +192,11 @@ static MACHINE_CONFIG_START( ssozumo, ssozumo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 1200000) /* 1.2 MHz ???? */ MCFG_CPU_PROGRAM_MAP(ssozumo_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ssozumo_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", M6502, 975000) /* 975 kHz ?? */ MCFG_CPU_PROGRAM_MAP(ssozumo_sound_map) - MCFG_CPU_PERIODIC_INT(sound_timer_irq,272/16*57) // guess, assume to be the same as tagteam + MCFG_CPU_PERIODIC_INT_DRIVER(ssozumo_state, sound_timer_irq, 272/16*57) // guess, assume to be the same as tagteam /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sspeedr.c b/src/mame/drivers/sspeedr.c index c042cef3361..b5e1890f055 100644 --- a/src/mame/drivers/sspeedr.c +++ b/src/mame/drivers/sspeedr.c @@ -190,7 +190,7 @@ static MACHINE_CONFIG_START( sspeedr, sspeedr_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_19_968MHz/8) MCFG_CPU_PROGRAM_MAP(sspeedr_map) MCFG_CPU_IO_MAP(sspeedr_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sspeedr_state, irq0_line_assert) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/ssrj.c b/src/mame/drivers/ssrj.c index 42942673c22..2eccd5413ef 100644 --- a/src/mame/drivers/ssrj.c +++ b/src/mame/drivers/ssrj.c @@ -144,7 +144,7 @@ static MACHINE_CONFIG_START( ssrj, ssrj_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000/2) MCFG_CPU_PROGRAM_MAP(ssrj_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ssrj_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c index 67d6823847d..2967db92747 100644 --- a/src/mame/drivers/sstrangr.c +++ b/src/mame/drivers/sstrangr.c @@ -197,7 +197,7 @@ static MACHINE_CONFIG_START( sstrangr, sstrangr_state ) MCFG_CPU_ADD("maincpu",I8080,1996800) /* clock is a guess, taken from mw8080bw */ MCFG_CPU_PROGRAM_MAP(sstrangr_map) MCFG_CPU_IO_MAP(sstrangr_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(sstrangr_state, irq0_line_hold, 2*60) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/stactics.c b/src/mame/drivers/stactics.c index fe75ab4bee5..d277eec83bd 100644 --- a/src/mame/drivers/stactics.c +++ b/src/mame/drivers/stactics.c @@ -151,13 +151,12 @@ WRITE8_MEMBER(stactics_state::stactics_coin_lockout_w) * *************************************/ -static INTERRUPT_GEN( stactics_interrupt ) +INTERRUPT_GEN_MEMBER(stactics_state::stactics_interrupt) { - stactics_state *state = device->machine().driver_data(); - move_motor(device->machine(), state); + move_motor(machine(), this); - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } @@ -303,7 +302,7 @@ static MACHINE_CONFIG_START( stactics, stactics_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8080, 1933560) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", stactics_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", stactics_state, stactics_interrupt) /* video hardware */ diff --git a/src/mame/drivers/stadhero.c b/src/mame/drivers/stadhero.c index 3baa5082868..8796ea1ff30 100644 --- a/src/mame/drivers/stadhero.c +++ b/src/mame/drivers/stadhero.c @@ -229,7 +229,7 @@ static MACHINE_CONFIG_START( stadhero, stadhero_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", stadhero_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", M6502, XTAL_24MHz/16) MCFG_CPU_PROGRAM_MAP(audio_map) diff --git a/src/mame/drivers/starcrus.c b/src/mame/drivers/starcrus.c index 7488ac11971..b06334a4e55 100644 --- a/src/mame/drivers/starcrus.c +++ b/src/mame/drivers/starcrus.c @@ -140,7 +140,7 @@ static MACHINE_CONFIG_START( starcrus, starcrus_state ) MCFG_CPU_ADD("maincpu", I8080,9750000/9) /* 8224 chip is a divide by 9 */ MCFG_CPU_PROGRAM_MAP(starcrus_map) MCFG_CPU_IO_MAP(starcrus_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", starcrus_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/starfire.c b/src/mame/drivers/starfire.c index 924756e3015..3424e9b0ba6 100644 --- a/src/mame/drivers/starfire.c +++ b/src/mame/drivers/starfire.c @@ -263,7 +263,7 @@ static MACHINE_CONFIG_START( starfire, starfire_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, STARFIRE_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", starfire_state, nmi_line_pulse) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/starshp1.c b/src/mame/drivers/starshp1.c index 279c5502828..c58fd02ca37 100644 --- a/src/mame/drivers/starshp1.c +++ b/src/mame/drivers/starshp1.c @@ -14,10 +14,10 @@ Atari Starship 1 driver -static INTERRUPT_GEN( starshp1_interrupt ) +INTERRUPT_GEN_MEMBER(starshp1_state::starshp1_interrupt) { - if ((device->machine().root_device().ioport("SYSTEM")->read() & 0x90) != 0x90) - generic_pulse_irq_line(device, 0, 1); + if ((machine().root_device().ioport("SYSTEM")->read() & 0x90) != 0x90) + generic_pulse_irq_line(device.execute(), 0, 1); } @@ -299,7 +299,7 @@ static MACHINE_CONFIG_START( starshp1, starshp1_state ) MCFG_CPU_ADD("maincpu", M6502, STARSHP1_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(starshp1_map) - MCFG_CPU_VBLANK_INT("screen", starshp1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", starshp1_state, starshp1_interrupt) /* video hardware */ diff --git a/src/mame/drivers/starwars.c b/src/mame/drivers/starwars.c index c5e122a6a72..bdb119457b1 100644 --- a/src/mame/drivers/starwars.c +++ b/src/mame/drivers/starwars.c @@ -318,7 +318,7 @@ static MACHINE_CONFIG_START( starwars, starwars_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(irq0_line_assert, (double)MASTER_CLOCK / 4096 / 12) + MCFG_CPU_PERIODIC_INT_DRIVER(starwars_state, irq0_line_assert, (double)MASTER_CLOCK / 4096 / 12) MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(CLOCK_3KHZ / 128)) MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK / 8) diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c index 2f368746f0c..f3da64996aa 100644 --- a/src/mame/drivers/statriv2.c +++ b/src/mame/drivers/statriv2.c @@ -110,6 +110,7 @@ public: virtual void palette_init(); DECLARE_VIDEO_START(vertical); UINT32 screen_update_statriv2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(statriv2_interrupt); }; @@ -209,17 +210,16 @@ UINT32 statriv2_state::screen_update_statriv2(screen_device &screen, bitmap_ind1 * *************************************/ -static INTERRUPT_GEN( statriv2_interrupt ) +INTERRUPT_GEN_MEMBER(statriv2_state::statriv2_interrupt) { - statriv2_state *state = device->machine().driver_data(); - UINT8 new_coin = state->ioport("COIN")->read(); + UINT8 new_coin = ioport("COIN")->read(); /* check the coin inputs once per frame */ - state->m_latched_coin |= new_coin & (new_coin ^ state->m_last_coin); - state->m_last_coin = new_coin; + m_latched_coin |= new_coin & (new_coin ^ m_last_coin); + m_last_coin = new_coin; - device->execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE); - device->execute().set_input_line(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); } @@ -602,7 +602,7 @@ static MACHINE_CONFIG_START( statriv2, statriv2_state ) MCFG_CPU_ADD("maincpu", I8085A, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(statriv2_map) MCFG_CPU_IO_MAP(statriv2_io_map) - MCFG_CPU_VBLANK_INT("screen", statriv2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", statriv2_state, statriv2_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/stfight.c b/src/mame/drivers/stfight.c index 65104628944..9e8c2ccef02 100644 --- a/src/mame/drivers/stfight.c +++ b/src/mame/drivers/stfight.c @@ -436,11 +436,11 @@ static MACHINE_CONFIG_START( stfight, stfight_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 3000000) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(cpu1_map) - MCFG_CPU_VBLANK_INT("screen", stfight_vb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", stfight_state, stfight_vb_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(cpu2_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,120) + MCFG_CPU_PERIODIC_INT_DRIVER(stfight_state, irq0_line_hold, 120) MCFG_QUANTUM_TIME(attotime::from_hz(600)) diff --git a/src/mame/drivers/stlforce.c b/src/mame/drivers/stlforce.c index 8b88b4131a3..7f4ae62eb0e 100644 --- a/src/mame/drivers/stlforce.c +++ b/src/mame/drivers/stlforce.c @@ -191,7 +191,7 @@ static MACHINE_CONFIG_START( stlforce, stlforce_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 15000000) MCFG_CPU_PROGRAM_MAP(stlforce_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", stlforce_state, irq4_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/strnskil.c b/src/mame/drivers/strnskil.c index 420363be2d8..32bdcd88f17 100644 --- a/src/mame/drivers/strnskil.c +++ b/src/mame/drivers/strnskil.c @@ -356,7 +356,7 @@ static MACHINE_CONFIG_START( strnskil, strnskil_state ) MCFG_CPU_ADD("sub", Z80,8000000/2) /* 4.000MHz */ MCFG_CPU_PROGRAM_MAP(strnskil_map2) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(strnskil_state, irq0_line_hold, 2*60) // MCFG_QUANTUM_PERFECT_CPU("maincpu") MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/sub.c b/src/mame/drivers/sub.c index 863e12c7cac..039bbe79bea 100644 --- a/src/mame/drivers/sub.c +++ b/src/mame/drivers/sub.c @@ -134,6 +134,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_sub(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(subm_sound_irq); }; void sub_state::video_start() @@ -418,12 +419,11 @@ void sub_state::palette_init() } -static INTERRUPT_GEN( subm_sound_irq ) +INTERRUPT_GEN_MEMBER(sub_state::subm_sound_irq) { - sub_state *state = device->machine().driver_data(); - if(state->m_nmi_en) - device->machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_en) + machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( sub, sub_state ) @@ -432,12 +432,12 @@ static MACHINE_CONFIG_START( sub, sub_state ) MCFG_CPU_ADD("maincpu", Z80,MASTER_CLOCK/6) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(subm_map) MCFG_CPU_IO_MAP(subm_io) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sub_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80,MASTER_CLOCK/6) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(subm_sound_map) MCFG_CPU_IO_MAP(subm_sound_io) - MCFG_CPU_PERIODIC_INT(subm_sound_irq, 120) //??? + MCFG_CPU_PERIODIC_INT_DRIVER(sub_state, subm_sound_irq, 120) //??? /* video hardware */ diff --git a/src/mame/drivers/subs.c b/src/mame/drivers/subs.c index d963d855d4e..7ebb98ea41a 100644 --- a/src/mame/drivers/subs.c +++ b/src/mame/drivers/subs.c @@ -179,7 +179,7 @@ static MACHINE_CONFIG_START( subs, subs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502,12096000/16) /* clock input is the "4H" signal */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(subs_interrupt,4*57) + MCFG_CPU_PERIODIC_INT_DRIVER(subs_state, subs_interrupt, 4*57) /* video hardware */ diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c index 4084fdc4c75..99dec05ebc2 100644 --- a/src/mame/drivers/subsino2.c +++ b/src/mame/drivers/subsino2.c @@ -166,6 +166,7 @@ public: DECLARE_MACHINE_RESET(am188em); DECLARE_VIDEO_START(xtrain); UINT32 screen_update_subsino2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(am188em_int0_irq); }; @@ -862,12 +863,11 @@ MACHINE_RESET_MEMBER(subsino2_state,am188em) m_am188em_regs[AM188EM_I0CON+1] = 0x00; } -static INTERRUPT_GEN( am188em_int0_irq ) +INTERRUPT_GEN_MEMBER(subsino2_state::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->execute().set_input_line_and_vector(0, HOLD_LINE, 0x0c); // INT0 (background scrolling in xplan) + if ( ((m_am188em_regs[AM188EM_IMASK+0] & 0x10) == 0) || // IMASK.I0 mask + ((m_am188em_regs[AM188EM_I0CON+0] & 0x08) == 0) ) // I0CON.MSK mask + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x0c); // INT0 (background scrolling in xplan) } static TIMER_DEVICE_CALLBACK( am188em_timer2_irq ) @@ -2177,7 +2177,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( bishjan, subsino2_state ) MCFG_CPU_ADD("maincpu", H83044, XTAL_44_1MHz / 3) MCFG_CPU_PROGRAM_MAP( bishjan_map ) - MCFG_CPU_VBLANK_INT( "screen", irq0_line_hold ) + MCFG_CPU_VBLANK_INT_DRIVER("screen", subsino2_state, irq0_line_hold) MCFG_TIMER_ADD_PERIODIC("timer", h8_timer_irq, attotime::from_hz(60)) // timer, ?? Hz MCFG_NVRAM_ADD_0FILL("nvram") @@ -2274,7 +2274,7 @@ static MACHINE_CONFIG_START( xplan, subsino2_state ) MCFG_CPU_ADD("maincpu", I80188, XTAL_20MHz ) // !! AMD AM188-EM !! MCFG_CPU_PROGRAM_MAP( xplan_map ) MCFG_CPU_IO_MAP( xplan_io ) - MCFG_CPU_VBLANK_INT( "screen", am188em_int0_irq ) + MCFG_CPU_VBLANK_INT_DRIVER("screen", subsino2_state, am188em_int0_irq) MCFG_TIMER_ADD_PERIODIC("timer2", am188em_timer2_irq, attotime::from_hz(60)) // timer 2, ?? Hz MCFG_MACHINE_RESET_OVERRIDE(subsino2_state,am188em) diff --git a/src/mame/drivers/summit.c b/src/mame/drivers/summit.c index b828f0c9bf0..cfef0db9593 100644 --- a/src/mame/drivers/summit.c +++ b/src/mame/drivers/summit.c @@ -300,7 +300,7 @@ static MACHINE_CONFIG_START( summit, summit_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,4000000) MCFG_CPU_PROGRAM_MAP(mainmap) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", summit_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c index a2aa2ccf72c..065f58d7514 100644 --- a/src/mame/drivers/suna16.c +++ b/src/mame/drivers/suna16.c @@ -828,7 +828,7 @@ static MACHINE_CONFIG_START( uballoon, suna16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(uballoon_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", suna16_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* ? */ MCFG_CPU_PROGRAM_MAP(uballoon_sound_map) @@ -878,7 +878,7 @@ static MACHINE_CONFIG_START( sunaq, suna16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 24000000/4) MCFG_CPU_PROGRAM_MAP(sunaq_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", suna16_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 14318000/4) MCFG_CPU_PROGRAM_MAP(sunaq_sound_map) diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c index 2e0e2f0f904..06ee8a93375 100644 --- a/src/mame/drivers/suna8.c +++ b/src/mame/drivers/suna8.c @@ -1624,12 +1624,12 @@ static MACHINE_CONFIG_START( hardhead, suna8_state ) MCFG_CPU_ADD("maincpu", Z80, SUNA8_MASTER_CLOCK / 4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(hardhead_map) MCFG_CPU_IO_MAP(hardhead_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* No NMI */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", suna8_state, irq0_line_hold) /* No NMI */ MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(hardhead_sound_map) MCFG_CPU_IO_MAP(hardhead_sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* No NMI */ + MCFG_CPU_PERIODIC_INT_DRIVER(suna8_state, irq0_line_hold, 4*60) /* No NMI */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1689,11 +1689,11 @@ static MACHINE_CONFIG_START( rranger, suna8_state ) MCFG_CPU_ADD("maincpu", Z80, SUNA8_MASTER_CLOCK / 4) /* ? */ MCFG_CPU_PROGRAM_MAP(rranger_map) MCFG_CPU_IO_MAP(rranger_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* IRQ & NMI ! */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", suna8_state, irq0_line_hold) /* IRQ & NMI ! */ MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4) /* ? */ MCFG_CPU_PROGRAM_MAP(rranger_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* NMI = retn */ + MCFG_CPU_PERIODIC_INT_DRIVER(suna8_state, irq0_line_hold, 4*60) /* NMI = retn */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1763,7 +1763,7 @@ static MACHINE_CONFIG_START( brickzn, suna8_state ) MCFG_CPU_ADD("maincpu", Z80, SUNA8_MASTER_CLOCK / 4) /* SUNA PROTECTION BLOCK */ MCFG_CPU_PROGRAM_MAP(brickzn_map) MCFG_CPU_IO_MAP(brickzn_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) // nmi breaks ramtest but is needed! + MCFG_CPU_VBLANK_INT_DRIVER("screen", suna8_state, irq0_line_hold) // nmi breaks ramtest but is needed! MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4) /* Z0840006PSC */ MCFG_CPU_PROGRAM_MAP(brickzn_sound_map) @@ -1873,7 +1873,7 @@ static MACHINE_CONFIG_START( starfigh, suna8_state ) MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4) /* ? */ MCFG_CPU_PROGRAM_MAP(hardhead_sound_map) MCFG_CPU_IO_MAP(hardhead_sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* No NMI */ + MCFG_CPU_PERIODIC_INT_DRIVER(suna8_state, irq0_line_hold, 4*60) /* No NMI */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1920,7 +1920,7 @@ static MACHINE_CONFIG_START( sparkman, suna8_state ) MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4) /* ? */ MCFG_CPU_PROGRAM_MAP(hardhead_sound_map) MCFG_CPU_IO_MAP(hardhead_sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* No NMI */ + MCFG_CPU_PERIODIC_INT_DRIVER(suna8_state, irq0_line_hold, 4*60) /* No NMI */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c index 54f6f8e3926..9503f4b65e3 100644 --- a/src/mame/drivers/supbtime.c +++ b/src/mame/drivers/supbtime.c @@ -343,7 +343,7 @@ static MACHINE_CONFIG_START( supbtime, supbtime_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(supbtime_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", supbtime_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", H6280, 32220000/8) /* Custom chip 45, audio section crystal is 32.220 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -384,7 +384,7 @@ static MACHINE_CONFIG_START( chinatwn, supbtime_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(chinatwn_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", supbtime_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", H6280, 32220000/8) /* Custom chip 45, audio section crystal is 32.220 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/supdrapo.c b/src/mame/drivers/supdrapo.c index 6f8c4131b18..12fda872164 100644 --- a/src/mame/drivers/supdrapo.c +++ b/src/mame/drivers/supdrapo.c @@ -445,7 +445,7 @@ static MACHINE_CONFIG_START( supdrapo, supdrapo_state ) MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) /* guess */ MCFG_CPU_PROGRAM_MAP(sdpoker_mem) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", supdrapo_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c index 79b4e19baba..83001feb49d 100644 --- a/src/mame/drivers/superchs.c +++ b/src/mame/drivers/superchs.c @@ -328,11 +328,11 @@ static MACHINE_CONFIG_START( superchs, superchs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(superchs_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", superchs_state, irq2_line_hold) MCFG_CPU_ADD("sub", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(superchs_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", superchs_state, irq4_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(480)) /* Need to interleave CPU 1 & 3 */ diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c index 80dc0183d13..5202859f15b 100644 --- a/src/mame/drivers/superdq.c +++ b/src/mame/drivers/superdq.c @@ -52,6 +52,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_superdq(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(superdq_vblank); }; TILE_GET_INFO_MEMBER(superdq_state::get_tile_info) @@ -131,20 +132,19 @@ void superdq_state::machine_reset() m_color_bank = 0; } -static INTERRUPT_GEN( superdq_vblank ) +INTERRUPT_GEN_MEMBER(superdq_state::superdq_vblank) { - superdq_state *state = device->machine().driver_data(); /* status is read when the STATUS line from the laserdisc toggles (600usec after the vblank). We could set up a timer to do that, but this works as well */ - state->m_ld_in_latch = state->m_laserdisc->status_r(); + m_ld_in_latch = m_laserdisc->status_r(); /* command is written when the COMMAND line from the laserdisc 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->execute().set_input_line(0, ASSERT_LINE); + m_laserdisc->data_w(m_ld_out_latch); + device.execute().set_input_line(0, ASSERT_LINE); } WRITE8_MEMBER(superdq_state::superdq_videoram_w) @@ -345,7 +345,7 @@ static MACHINE_CONFIG_START( superdq, superdq_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/8) MCFG_CPU_PROGRAM_MAP(superdq_map) MCFG_CPU_IO_MAP(superdq_io) - MCFG_CPU_VBLANK_INT("screen", superdq_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", superdq_state, superdq_vblank) MCFG_LASERDISC_LDV1000_ADD("laserdisc") diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c index d38bb74198e..90e73208e86 100644 --- a/src/mame/drivers/superqix.c +++ b/src/mame/drivers/superqix.c @@ -982,20 +982,18 @@ static const ay8910_interface bootleg_ay8910_interface_2 = DEVCB_NULL }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(superqix_state::vblank_irq) { - superqix_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( sqix_timer_irq ) +INTERRUPT_GEN_MEMBER(superqix_state::sqix_timer_irq) { - superqix_state *state = device->machine().driver_data(); - if (state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + if (m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } @@ -1004,7 +1002,7 @@ static MACHINE_CONFIG_START( pbillian, superqix_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(pbillian_port_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", superqix_state, vblank_irq) MCFG_MACHINE_START_OVERRIDE(superqix_state,pbillian) @@ -1035,7 +1033,7 @@ static MACHINE_CONFIG_START( hotsmash, superqix_state ) MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(hotsmash_port_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", superqix_state, vblank_irq) MCFG_CPU_ADD("mcu", M68705, 4000000) /* ???? */ MCFG_CPU_PROGRAM_MAP(m68705_map) @@ -1071,7 +1069,7 @@ static MACHINE_CONFIG_START( sqix, superqix_state ) MCFG_CPU_ADD("maincpu", Z80, 12000000/2) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(sqix_port_map) - MCFG_CPU_PERIODIC_INT(sqix_timer_irq, 4*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(superqix_state, sqix_timer_irq, 4*60) /* ??? */ MCFG_CPU_ADD("mcu", I8751, 12000000/3) /* ??? */ MCFG_CPU_IO_MAP(bootleg_mcu_io_map) @@ -1119,7 +1117,7 @@ static MACHINE_CONFIG_START( sqixbl, superqix_state ) MCFG_CPU_ADD("maincpu", Z80, 12000000/2) /* 6 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(sqix_port_map) - MCFG_CPU_PERIODIC_INT(sqix_timer_irq, 4*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(superqix_state, sqix_timer_irq, 4*60) /* ??? */ MCFG_MACHINE_START_OVERRIDE(superqix_state,superqix) diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c index 2ef653f7e4d..b770bf695d5 100644 --- a/src/mame/drivers/supertnk.c +++ b/src/mame/drivers/supertnk.c @@ -126,6 +126,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_supertnk(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(supertnk_interrupt); }; @@ -167,10 +168,10 @@ WRITE8_MEMBER(supertnk_state::supertnk_bankswitch_1_w) * *************************************/ -static INTERRUPT_GEN( supertnk_interrupt ) +INTERRUPT_GEN_MEMBER(supertnk_state::supertnk_interrupt) { /* On a TMS9980, a 6 on the interrupt bus means a level 4 interrupt */ - device->execute().set_input_line_and_vector(0, ASSERT_LINE, 6); + device.execute().set_input_line_and_vector(0, ASSERT_LINE, 6); } @@ -429,7 +430,7 @@ static MACHINE_CONFIG_START( supertnk, supertnk_state ) MCFG_CPU_ADD("maincpu", TMS9980L, 2598750) /* ? to which frequency is the 20.79 Mhz crystal mapped down? */ MCFG_CPU_PROGRAM_MAP(supertnk_map) MCFG_CPU_IO_MAP(supertnk_io_map) - MCFG_CPU_VBLANK_INT("screen", supertnk_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", supertnk_state, supertnk_interrupt) /* video hardware */ diff --git a/src/mame/drivers/superwng.c b/src/mame/drivers/superwng.c index 2dc3f2b3e0c..0c7964c4993 100644 --- a/src/mame/drivers/superwng.c +++ b/src/mame/drivers/superwng.c @@ -74,6 +74,8 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_superwng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(superwng_nmi_interrupt); + INTERRUPT_GEN_MEMBER(superwng_sound_nmi_assert); }; TILE_GET_INFO_MEMBER(superwng_state::get_bg_tile_info) @@ -204,11 +206,10 @@ WRITE8_MEMBER(superwng_state::superwng_nmi_enable_w) m_nmi_enable = data; } -static INTERRUPT_GEN( superwng_nmi_interrupt ) +INTERRUPT_GEN_MEMBER(superwng_state::superwng_nmi_interrupt) { - superwng_state *state = device->machine().driver_data(); - if (BIT(state->m_nmi_enable, 0)) + if (BIT(m_nmi_enable, 0)) nmi_line_pulse(device); } @@ -229,11 +230,10 @@ WRITE8_MEMBER(superwng_state::superwng_sound_nmi_clear_w) m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -static INTERRUPT_GEN( superwng_sound_nmi_assert ) +INTERRUPT_GEN_MEMBER(superwng_state::superwng_sound_nmi_assert) { - superwng_state *state = device->machine().driver_data(); - if (BIT(state->m_nmi_enable, 0)) - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + if (BIT(m_nmi_enable, 0)) + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } WRITE8_MEMBER(superwng_state::superwng_bg_vram_w) @@ -466,11 +466,11 @@ static MACHINE_CONFIG_START( superwng, superwng_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(superwng_map) - MCFG_CPU_VBLANK_INT("screen", superwng_nmi_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", superwng_state, superwng_nmi_interrupt) MCFG_CPU_ADD("audiocpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(superwng_sound_map) - MCFG_CPU_PERIODIC_INT(superwng_sound_nmi_assert, 4*60) + MCFG_CPU_PERIODIC_INT_DRIVER(superwng_state, superwng_sound_nmi_assert, 4*60) /* video hardware */ diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c index f307fd4267f..bb627442148 100644 --- a/src/mame/drivers/suprgolf.c +++ b/src/mame/drivers/suprgolf.c @@ -515,7 +515,7 @@ static MACHINE_CONFIG_START( suprgolf, suprgolf_state ) MCFG_CPU_ADD("maincpu", Z80,MASTER_CLOCK/2) /* guess */ MCFG_CPU_PROGRAM_MAP(suprgolf_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", suprgolf_state, irq0_line_hold) diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c index 2ac9fb7e1bf..b5d8735e30b 100644 --- a/src/mame/drivers/suprloco.c +++ b/src/mame/drivers/suprloco.c @@ -171,11 +171,11 @@ static MACHINE_CONFIG_START( suprloco, suprloco_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", suprloco_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* NMIs are caused by the main CPU */ + MCFG_CPU_PERIODIC_INT_DRIVER(suprloco_state, irq0_line_hold, 4*60) /* NMIs are caused by the main CPU */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/suprridr.c b/src/mame/drivers/suprridr.c index 9d9c1811d6e..782af94657b 100644 --- a/src/mame/drivers/suprridr.c +++ b/src/mame/drivers/suprridr.c @@ -99,11 +99,10 @@ WRITE8_MEMBER(suprridr_state::nmi_enable_w) } -static INTERRUPT_GEN( main_nmi_gen ) +INTERRUPT_GEN_MEMBER(suprridr_state::main_nmi_gen) { - suprridr_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -360,7 +359,7 @@ static MACHINE_CONFIG_START( suprridr, suprridr_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_49_152MHz/16) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_portmap) - MCFG_CPU_VBLANK_INT("screen", main_nmi_gen) + MCFG_CPU_VBLANK_INT_DRIVER("screen", suprridr_state, main_nmi_gen) MCFG_CPU_ADD("audiocpu", Z80, 10000000/4) /* 2.5 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c index fb939269312..6b4cd3879df 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -316,7 +316,7 @@ static MACHINE_CONFIG_START( suprslam, suprslam_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(suprslam_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", suprslam_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/surpratk.c b/src/mame/drivers/surpratk.c index fff5ee3b484..90589c029e5 100644 --- a/src/mame/drivers/surpratk.c +++ b/src/mame/drivers/surpratk.c @@ -18,11 +18,10 @@ /* prototypes */ static KONAMI_SETLINES_CALLBACK( surpratk_banking ); -static INTERRUPT_GEN( surpratk_interrupt ) +INTERRUPT_GEN_MEMBER(surpratk_state::surpratk_interrupt) { - surpratk_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) - device->execute().set_input_line(0, HOLD_LINE); + if (k052109_is_irq_enabled(m_k052109)) + device.execute().set_input_line(0, HOLD_LINE); } READ8_MEMBER(surpratk_state::bankedram_r) @@ -230,7 +229,7 @@ static MACHINE_CONFIG_START( surpratk, surpratk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* 053248 */ MCFG_CPU_PROGRAM_MAP(surpratk_map) - MCFG_CPU_VBLANK_INT("screen", surpratk_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", surpratk_state, surpratk_interrupt) /* video hardware */ diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index d104083d158..177194a02f5 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -591,14 +591,14 @@ READ8_MEMBER(system1_state::mcu_io_r) } -static INTERRUPT_GEN( mcu_irq_assert ) +INTERRUPT_GEN_MEMBER(system1_state::mcu_irq_assert) { /* toggle the INT0 line on the MCU */ - device->execute().set_input_line(MCS51_INT0_LINE, ASSERT_LINE); - device->execute().set_input_line(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)); + machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10)); } @@ -2147,7 +2147,7 @@ static MACHINE_CONFIG_START( sys1ppi, system1_state ) MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK) /* not really, see notes above */ MCFG_CPU_PROGRAM_MAP(system1_map) MCFG_CPU_IO_MAP(system1_ppi_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", system1_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK/2) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2220,7 +2220,7 @@ static MACHINE_CONFIG_FRAGMENT( mcu ) MCFG_CPU_ADD("mcu", I8751, SOUND_CLOCK) MCFG_CPU_IO_MAP(mcu_io_map) - MCFG_CPU_VBLANK_INT("screen", mcu_irq_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", system1_state, mcu_irq_assert) MCFG_TIMER_ADD_PERIODIC("mcu_t0", mcu_t0_callback, attotime::from_usec(2500)) /* ??? actual clock unknown */ MACHINE_CONFIG_END diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c index c1316297634..105dc3dbb3e 100644 --- a/src/mame/drivers/system16.c +++ b/src/mame/drivers/system16.c @@ -100,9 +100,9 @@ #define SHADOW_COLORS_MULTIPLIER 2 -static INTERRUPT_GEN( sys16_interrupt ) +INTERRUPT_GEN_MEMBER(segas1x_bootleg_state::sys16_interrupt) { - device->execute().set_input_line(4, HOLD_LINE); /* Interrupt vector 4, used by VBlank */ + device.execute().set_input_line(4, HOLD_LINE); /* Interrupt vector 4, used by VBlank */ } @@ -2015,7 +2015,7 @@ static MACHINE_CONFIG_START( system16, segas1x_bootleg_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) - MCFG_CPU_VBLANK_INT("screen", sys16_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", segas1x_bootleg_state, sys16_interrupt) MCFG_CPU_ADD("soundcpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2165,7 +2165,7 @@ static MACHINE_CONFIG_START( goldnaxeb1, segas1x_bootleg_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(goldnaxeb1_map) - MCFG_CPU_VBLANK_INT("screen", sys16_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", segas1x_bootleg_state, sys16_interrupt) /* video hardware */ @@ -2295,7 +2295,7 @@ static MACHINE_CONFIG_START( system18, segas1x_bootleg_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", segas1x_bootleg_state, irq4_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(sound_18_map) diff --git a/src/mame/drivers/tagteam.c b/src/mame/drivers/tagteam.c index 2a8465d707d..a9ebf4f1fcf 100644 --- a/src/mame/drivers/tagteam.c +++ b/src/mame/drivers/tagteam.c @@ -195,12 +195,11 @@ static GFXDECODE_START( tagteam ) GFXDECODE_END -static INTERRUPT_GEN( sound_timer_irq ) +INTERRUPT_GEN_MEMBER(tagteam_state::sound_timer_irq) { - tagteam_state *state = device->machine().driver_data(); - if(state->m_sound_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_sound_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -209,11 +208,11 @@ static MACHINE_CONFIG_START( tagteam, tagteam_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, XTAL_12MHz/8) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(irq0_line_assert,272/16*57) // connected to bit 4 of vcount (basically once every 16 scanlines) + MCFG_CPU_PERIODIC_INT_DRIVER(tagteam_state, irq0_line_assert, 272/16*57) // connected to bit 4 of vcount (basically once every 16 scanlines) MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz/2/6) // daughterboard gets 12mhz/2 from mainboard, but how it's divided further is a guess MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(sound_timer_irq,272/16*57) // same source as maincpu irq + MCFG_CPU_PERIODIC_INT_DRIVER(tagteam_state, sound_timer_irq, 272/16*57) // same source as maincpu irq /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tail2nos.c b/src/mame/drivers/tail2nos.c index 5e042b2fc6a..9bb77e2d355 100644 --- a/src/mame/drivers/tail2nos.c +++ b/src/mame/drivers/tail2nos.c @@ -238,7 +238,7 @@ static MACHINE_CONFIG_START( tail2nos, tail2nos_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tail2nos_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80,XTAL_20MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c index 2b8201885e4..a78279e6c24 100644 --- a/src/mame/drivers/taito_b.c +++ b/src/mame/drivers/taito_b.c @@ -202,10 +202,10 @@ static TIMER_CALLBACK( rsaga2_interrupt2 ) state->m_maincpu->set_input_line(2, HOLD_LINE); } -static INTERRUPT_GEN( rastansaga2_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::rastansaga2_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(rsaga2_interrupt2)); - device->execute().set_input_line(4, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(rsaga2_interrupt2)); + device.execute().set_input_line(4, HOLD_LINE); } @@ -215,10 +215,10 @@ static TIMER_CALLBACK( crimec_interrupt3 ) state->m_maincpu->set_input_line(3, HOLD_LINE); } -static INTERRUPT_GEN( crimec_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::crimec_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(crimec_interrupt3)); - device->execute().set_input_line(5, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(crimec_interrupt3)); + device.execute().set_input_line(5, HOLD_LINE); } @@ -228,10 +228,10 @@ static TIMER_CALLBACK( hitice_interrupt6 ) state->m_maincpu->set_input_line(6, HOLD_LINE); } -static INTERRUPT_GEN( hitice_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::hitice_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(hitice_interrupt6)); - device->execute().set_input_line(4, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(hitice_interrupt6)); + device.execute().set_input_line(4, HOLD_LINE); } @@ -241,10 +241,10 @@ static TIMER_CALLBACK( rambo3_interrupt1 ) state->m_maincpu->set_input_line(1, HOLD_LINE); } -static INTERRUPT_GEN( rambo3_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::rambo3_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(rambo3_interrupt1)); - device->execute().set_input_line(6, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(rambo3_interrupt1)); + device.execute().set_input_line(6, HOLD_LINE); } @@ -254,10 +254,10 @@ static TIMER_CALLBACK( pbobble_interrupt5 ) state->m_maincpu->set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( pbobble_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::pbobble_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(pbobble_interrupt5)); - device->execute().set_input_line(3, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(pbobble_interrupt5)); + device.execute().set_input_line(3, HOLD_LINE); } static TIMER_CALLBACK( viofight_interrupt1 ) @@ -266,10 +266,10 @@ static TIMER_CALLBACK( viofight_interrupt1 ) state->m_maincpu->set_input_line(1, HOLD_LINE); } -static INTERRUPT_GEN( viofight_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::viofight_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(viofight_interrupt1)); - device->execute().set_input_line(4, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(viofight_interrupt1)); + device.execute().set_input_line(4, HOLD_LINE); } static TIMER_CALLBACK( masterw_interrupt4 ) @@ -278,10 +278,10 @@ static TIMER_CALLBACK( masterw_interrupt4 ) state->m_maincpu->set_input_line(4, HOLD_LINE); } -static INTERRUPT_GEN( masterw_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::masterw_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(masterw_interrupt4)); - device->execute().set_input_line(5, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(masterw_interrupt4)); + device.execute().set_input_line(5, HOLD_LINE); } static TIMER_CALLBACK( silentd_interrupt4 ) @@ -290,10 +290,10 @@ static TIMER_CALLBACK( silentd_interrupt4 ) state->m_maincpu->set_input_line(4, HOLD_LINE); } -static INTERRUPT_GEN( silentd_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::silentd_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(silentd_interrupt4)); - device->execute().set_input_line(6, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(silentd_interrupt4)); + device.execute().set_input_line(6, HOLD_LINE); } static TIMER_CALLBACK( selfeena_interrupt4 ) @@ -302,10 +302,10 @@ static TIMER_CALLBACK( selfeena_interrupt4 ) state->m_maincpu->set_input_line(4, HOLD_LINE); } -static INTERRUPT_GEN( selfeena_interrupt ) +INTERRUPT_GEN_MEMBER(taitob_state::selfeena_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(5000), FUNC(selfeena_interrupt4)); - device->execute().set_input_line(6, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(5000), FUNC(selfeena_interrupt4)); + device.execute().set_input_line(6, HOLD_LINE); } static TIMER_CALLBACK( sbm_interrupt5 )//4 @@ -314,10 +314,10 @@ static TIMER_CALLBACK( sbm_interrupt5 )//4 state->m_maincpu->set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( sbm_interrupt )//5 +INTERRUPT_GEN_MEMBER(taitob_state::sbm_interrupt)//5 { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(10000), FUNC(sbm_interrupt5)); - device->execute().set_input_line(4, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(10000), FUNC(sbm_interrupt5)); + device.execute().set_input_line(4, HOLD_LINE); } static TIMER_CALLBACK( realpunc_interrupt3 )//3 @@ -326,10 +326,10 @@ static TIMER_CALLBACK( realpunc_interrupt3 )//3 state->m_maincpu->set_input_line(3, HOLD_LINE); } -static INTERRUPT_GEN( realpunc_interrupt )//2 +INTERRUPT_GEN_MEMBER(taitob_state::realpunc_interrupt)//2 { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(10000), FUNC(realpunc_interrupt3)); - device->execute().set_input_line(2, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(10000), FUNC(realpunc_interrupt3)); + device.execute().set_input_line(2, HOLD_LINE); } @@ -2040,7 +2040,7 @@ static MACHINE_CONFIG_START( rastsag2, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(rastsag2_map) - MCFG_CPU_VBLANK_INT("screen", rastansaga2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, rastansaga2_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2084,7 +2084,7 @@ static MACHINE_CONFIG_START( ashura, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(rastsag2_map) - MCFG_CPU_VBLANK_INT("screen", rastansaga2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, rastansaga2_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2128,7 +2128,7 @@ static MACHINE_CONFIG_START( crimec, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(crimec_map) - MCFG_CPU_VBLANK_INT("screen", crimec_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, crimec_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2172,7 +2172,7 @@ static MACHINE_CONFIG_START( tetrist, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ???*/ MCFG_CPU_PROGRAM_MAP(tetrist_map) - MCFG_CPU_VBLANK_INT("screen", rastansaga2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, rastansaga2_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2215,7 +2215,7 @@ static MACHINE_CONFIG_START( tetrista, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(tetrista_map) - MCFG_CPU_VBLANK_INT("screen", masterw_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, masterw_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(masterw_sound_map) @@ -2259,7 +2259,7 @@ static MACHINE_CONFIG_START( hitice, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(hitice_map) - MCFG_CPU_VBLANK_INT("screen", hitice_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, hitice_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(viofight_sound_map) @@ -2308,7 +2308,7 @@ static MACHINE_CONFIG_START( rambo3p, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rambo3_map) - MCFG_CPU_VBLANK_INT("screen", rambo3_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, rambo3_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2352,7 +2352,7 @@ static MACHINE_CONFIG_START( rambo3, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rambo3_map) - MCFG_CPU_VBLANK_INT("screen", rambo3_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, rambo3_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2395,7 +2395,7 @@ static MACHINE_CONFIG_START( pbobble, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(pbobble_map) - MCFG_CPU_VBLANK_INT("screen", pbobble_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, pbobble_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2443,7 +2443,7 @@ static MACHINE_CONFIG_START( spacedx, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(spacedx_map) - MCFG_CPU_VBLANK_INT("screen", pbobble_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, pbobble_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2491,7 +2491,7 @@ static MACHINE_CONFIG_START( spacedxo, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(spacedxo_map) - MCFG_CPU_VBLANK_INT("screen", selfeena_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, selfeena_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2535,7 +2535,7 @@ static MACHINE_CONFIG_START( qzshowby, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz according to the readme*/ MCFG_CPU_PROGRAM_MAP(qzshowby_map) - MCFG_CPU_VBLANK_INT("screen", pbobble_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, pbobble_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2583,7 +2583,7 @@ static MACHINE_CONFIG_START( viofight, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(viofight_map) - MCFG_CPU_VBLANK_INT("screen", viofight_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, viofight_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 6000000) /* 6 MHz verified */ MCFG_CPU_PROGRAM_MAP(viofight_sound_map) @@ -2630,7 +2630,7 @@ static MACHINE_CONFIG_START( masterw, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(masterw_map) - MCFG_CPU_VBLANK_INT("screen", masterw_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, masterw_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(masterw_sound_map) @@ -2675,7 +2675,7 @@ static MACHINE_CONFIG_START( silentd, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz ??? */ MCFG_CPU_PROGRAM_MAP(silentd_map) - MCFG_CPU_VBLANK_INT("screen", silentd_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, silentd_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2719,7 +2719,7 @@ static MACHINE_CONFIG_START( selfeena, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(selfeena_map) - MCFG_CPU_VBLANK_INT("screen", selfeena_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, selfeena_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2772,7 +2772,7 @@ static MACHINE_CONFIG_START( ryujin, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(selfeena_map) - MCFG_CPU_VBLANK_INT("screen", selfeena_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, selfeena_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2823,7 +2823,7 @@ static MACHINE_CONFIG_START( sbm, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(sbm_map) - MCFG_CPU_VBLANK_INT("screen", sbm_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, sbm_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -2872,7 +2872,7 @@ static MACHINE_CONFIG_START( realpunc, taitob_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(realpunc_map) - MCFG_CPU_VBLANK_INT("screen", realpunc_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitob_state, realpunc_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 6000000) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c index 34d855a9624..81e73f073d9 100644 --- a/src/mame/drivers/taito_f2.c +++ b/src/mame/drivers/taito_f2.c @@ -578,10 +578,10 @@ static TIMER_CALLBACK( taitof2_interrupt6 ) state->m_maincpu->set_input_line(6, HOLD_LINE); } -static INTERRUPT_GEN( taitof2_interrupt ) +INTERRUPT_GEN_MEMBER(taitof2_state::taitof2_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(500), FUNC(taitof2_interrupt6)); - device->execute().set_input_line(5, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(500), FUNC(taitof2_interrupt6)); + device.execute().set_input_line(5, HOLD_LINE); } @@ -3040,7 +3040,7 @@ static MACHINE_CONFIG_START( taito_f2, taitof2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 24000000/2) /* 12 MHz */ - MCFG_CPU_VBLANK_INT("screen", taitof2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitof2_state, taitof2_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 24000000/6) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -3598,7 +3598,7 @@ static MACHINE_CONFIG_START( cameltrya, taitof2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cameltry_map) - MCFG_CPU_VBLANK_INT("screen", taitof2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitof2_state, taitof2_interrupt) MCFG_CPU_ADD("audiocpu", Z80,24000000/4) /* verifed on pcb */ MCFG_CPU_PROGRAM_MAP(cameltrya_sound_map) @@ -3647,7 +3647,7 @@ static MACHINE_CONFIG_START( driveout, taitof2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(driveout_map) - MCFG_CPU_VBLANK_INT("screen", taitof2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitof2_state, taitof2_interrupt) MCFG_CPU_ADD("audiocpu", Z80,24000000/6) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(driveout_sound_map) diff --git a/src/mame/drivers/taito_f3.c b/src/mame/drivers/taito_f3.c index 4253a9d1596..1523edc2902 100644 --- a/src/mame/drivers/taito_f3.c +++ b/src/mame/drivers/taito_f3.c @@ -395,10 +395,10 @@ static TIMER_CALLBACK( f3_interrupt3 ) machine.device("maincpu")->execute().set_input_line(3, HOLD_LINE); // some signal from video hardware? } -static INTERRUPT_GEN( f3_interrupt2 ) +INTERRUPT_GEN_MEMBER(taito_f3_state::f3_interrupt2) { - device->execute().set_input_line(2, HOLD_LINE); // vblank - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(10000), FUNC(f3_interrupt3)); + device.execute().set_input_line(2, HOLD_LINE); // vblank + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(10000), FUNC(f3_interrupt3)); } static SOUND_RESET( f3 ) @@ -429,7 +429,7 @@ static MACHINE_CONFIG_START( f3, taito_f3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(f3_map) - MCFG_CPU_VBLANK_INT("screen", f3_interrupt2) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2) MCFG_MACHINE_START_OVERRIDE(taito_f3_state,f3) @@ -523,7 +523,7 @@ static MACHINE_CONFIG_START( bubsympb, taito_f3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(f3_map) - MCFG_CPU_VBLANK_INT("screen", f3_interrupt2) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2) MCFG_MACHINE_START_OVERRIDE(taito_f3_state,f3) diff --git a/src/mame/drivers/taito_h.c b/src/mame/drivers/taito_h.c index 4436c254419..ca3a07823b8 100644 --- a/src/mame/drivers/taito_h.c +++ b/src/mame/drivers/taito_h.c @@ -566,7 +566,7 @@ static MACHINE_CONFIG_START( syvalion, taitoh_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz / 2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(syvalion_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoh_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz / 2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -607,7 +607,7 @@ static MACHINE_CONFIG_START( recordbr, taitoh_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz / 2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(recordbr_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoh_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz / 2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -648,7 +648,7 @@ static MACHINE_CONFIG_START( dleague, taitoh_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz / 2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(dleague_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoh_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz / 2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c index 77fc0f495a8..99624fab91f 100644 --- a/src/mame/drivers/taito_l.c +++ b/src/mame/drivers/taito_l.c @@ -1851,7 +1851,7 @@ static MACHINE_CONFIG_START( fhawk, taitol_state ) MCFG_CPU_ADD("slave", Z80, XTAL_12MHz/3) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(fhawk_2_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,3*60) /* fixes slow down problems */ + MCFG_CPU_PERIODIC_INT_DRIVER(taitol_state, irq0_line_hold, 3*60) /* fixes slow down problems */ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) @@ -1943,7 +1943,7 @@ static MACHINE_CONFIG_START( kurikint, taitol_state ) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/3) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(kurikint_2_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitol_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) @@ -2081,8 +2081,8 @@ static MACHINE_CONFIG_START( evilston, taitol_state ) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/3) /* not verified */ MCFG_CPU_PROGRAM_MAP(evilston_2_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,60) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitol_state, irq0_line_hold) + MCFG_CPU_PERIODIC_INT_DRIVER(taitol_state, nmi_line_pulse, 60) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/taito_x.c b/src/mame/drivers/taito_x.c index c3fabe84d78..49856330f22 100644 --- a/src/mame/drivers/taito_x.c +++ b/src/mame/drivers/taito_x.c @@ -829,7 +829,7 @@ static MACHINE_CONFIG_START( superman, taitox_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(superman_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitox_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -872,7 +872,7 @@ static MACHINE_CONFIG_START( daisenpu, taitox_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(daisenpu_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitox_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(daisenpu_sound_map) @@ -912,7 +912,7 @@ static MACHINE_CONFIG_START( gigandes, taitox_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz? */ MCFG_CPU_PROGRAM_MAP(gigandes_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitox_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -954,7 +954,7 @@ static MACHINE_CONFIG_START( ballbros, taitox_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz? */ MCFG_CPU_PROGRAM_MAP(ballbros_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitox_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c index 3692e1e2094..17e442e2946 100644 --- a/src/mame/drivers/taito_z.c +++ b/src/mame/drivers/taito_z.c @@ -1036,19 +1036,18 @@ static TIMER_CALLBACK( taitoz_cpub_interrupt5 ) /***** Routines for particular games *****/ -static INTERRUPT_GEN( sci_interrupt ) +INTERRUPT_GEN_MEMBER(taitoz_state::sci_interrupt) { /* Need 2 int4's per int6 else (-$6b63,A5) never set to 1 which causes all sprites to vanish! Spriteram has areas for 2 frames so in theory only needs updating every other frame. */ - taitoz_state *state = device->machine().driver_data(); - state->m_sci_int6 = !state->m_sci_int6; + m_sci_int6 = !m_sci_int6; - if (state->m_sci_int6) - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000 - 500), FUNC(taitoz_interrupt6)); + if (m_sci_int6) + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(200000 - 500), FUNC(taitoz_interrupt6)); - device->execute().set_input_line(4, HOLD_LINE); + device.execute().set_input_line(4, HOLD_LINE); } @@ -3076,14 +3075,14 @@ static MACHINE_CONFIG_START( contcirc, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(contcirc_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(contcirc_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq6_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,taitoz) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3138,14 +3137,14 @@ static MACHINE_CONFIG_START( chasehq, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(chasehq_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(chq_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,taitoz) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3200,14 +3199,14 @@ static MACHINE_CONFIG_START( enforce, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(enforce_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(enforce_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq6_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,taitoz) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3263,11 +3262,11 @@ static MACHINE_CONFIG_START( bshark, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(bshark_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_CPU_ADD("sub", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(bshark_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,bshark) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3331,14 +3330,14 @@ static MACHINE_CONFIG_START( sci, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sci_map) - MCFG_CPU_VBLANK_INT("screen", sci_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, sci_interrupt) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sci_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,taitoz) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3393,14 +3392,14 @@ static MACHINE_CONFIG_START( nightstr, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(nightstr_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(nightstr_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,taitoz) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3457,14 +3456,14 @@ static MACHINE_CONFIG_START( aquajack, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(aquajack_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(aquajack_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,taitoz) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3520,11 +3519,11 @@ static MACHINE_CONFIG_START( spacegun, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz ??? */ MCFG_CPU_PROGRAM_MAP(spacegun_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_CPU_ADD("sub", M68000, 16000000) /* 16 MHz ??? */ MCFG_CPU_PROGRAM_MAP(spacegun_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,bshark) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3579,14 +3578,14 @@ static MACHINE_CONFIG_START( dblaxle, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(dblaxle_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(dblaxle_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,taitoz) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) @@ -3641,14 +3640,14 @@ static MACHINE_CONFIG_START( racingb, taitoz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(racingb_map) - MCFG_CPU_VBLANK_INT("screen", sci_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, sci_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(racingb_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoz_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(taitoz_state,taitoz) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c index a043b9dbd3d..1159e04e536 100644 --- a/src/mame/drivers/taitoair.c +++ b/src/mame/drivers/taitoair.c @@ -709,7 +709,7 @@ static MACHINE_CONFIG_START( airsys, taitoair_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000 / 2) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(airsys_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitoair_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000 / 2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/taitojc.c b/src/mame/drivers/taitojc.c index 41bf00b5a3d..0cd7fbe5eda 100644 --- a/src/mame/drivers/taitojc.c +++ b/src/mame/drivers/taitojc.c @@ -1217,9 +1217,9 @@ void taitojc_state::machine_reset() m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } -static INTERRUPT_GEN( taitojc_vblank ) +INTERRUPT_GEN_MEMBER(taitojc_state::taitojc_vblank) { - device->execute().set_input_line_and_vector(2, HOLD_LINE, 130); + device.execute().set_input_line_and_vector(2, HOLD_LINE, 130); } static const tc0640fio_interface taitojc_io_intf = @@ -1239,7 +1239,7 @@ static MACHINE_CONFIG_START( taitojc, taitojc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68040, 25000000) MCFG_CPU_PROGRAM_MAP(taitojc_map) - MCFG_CPU_VBLANK_INT("screen", taitojc_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitojc_state, taitojc_vblank) MCFG_CPU_ADD("sub", MC68HC11, 4000000) // MC68HC11M0 MCFG_CPU_PROGRAM_MAP(hc11_pgm_map) diff --git a/src/mame/drivers/taitosj.c b/src/mame/drivers/taitosj.c index e61645b7ece..82323ec3f82 100644 --- a/src/mame/drivers/taitosj.c +++ b/src/mame/drivers/taitosj.c @@ -1791,7 +1791,7 @@ static MACHINE_CONFIG_START( nomcu, taitosj_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",Z80,8000000/2) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(taitosj_main_nomcu_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitosj_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80,6000000/2) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(taitosj_audio_map) @@ -1799,7 +1799,7 @@ static MACHINE_CONFIG_START( nomcu, taitosj_state ) /* - no interrupts synced with vblank */ /* - NMI triggered by the main CPU */ /* - periodic IRQ, with frequency 6000000/(4*16*16*10*16) = 36.621 Hz, */ - MCFG_CPU_PERIODIC_INT(irq0_line_hold, (double)6000000/(4*16*16*10*16)) + MCFG_CPU_PERIODIC_INT_DRIVER(taitosj_state, irq0_line_hold, (double)6000000/(4*16*16*10*16)) /* video hardware */ diff --git a/src/mame/drivers/taitotz.c b/src/mame/drivers/taitotz.c index 6a905557640..33bcd8d5862 100644 --- a/src/mame/drivers/taitotz.c +++ b/src/mame/drivers/taitotz.c @@ -525,6 +525,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_taitotz(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(taitotz_vbi); }; @@ -2445,9 +2446,9 @@ void taitotz_state::machine_start() } -static INTERRUPT_GEN( taitotz_vbi ) +INTERRUPT_GEN_MEMBER(taitotz_state::taitotz_vbi) { - device->machine().device("iocpu")->execute().set_input_line(TLCS900_INT3, ASSERT_LINE); + machine().device("iocpu")->execute().set_input_line(TLCS900_INT3, ASSERT_LINE); } static void ide_interrupt(device_t *device, int state) @@ -2487,7 +2488,7 @@ static MACHINE_CONFIG_START( taitotz, taitotz_state ) MCFG_CPU_ADD("iocpu", TMP95C063, 25000000) MCFG_CPU_CONFIG(taitotz_tlcs900_interface) MCFG_CPU_PROGRAM_MAP(tlcs900h_mem) - MCFG_CPU_VBLANK_INT("screen", taitotz_vbi) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taitotz_state, taitotz_vbi) /* MN1020819DA sound CPU */ diff --git a/src/mame/drivers/tankbatt.c b/src/mame/drivers/tankbatt.c index 318fe2b9daf..9b523c81856 100644 --- a/src/mame/drivers/tankbatt.c +++ b/src/mame/drivers/tankbatt.c @@ -179,10 +179,9 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tankbatt_state ) AM_RANGE(0x2000, 0xffff) AM_READNOP //anything else might be left-over for a diagnostic ROM or something related to the discrete sound HW ADDRESS_MAP_END -static INTERRUPT_GEN( tankbatt_interrupt ) +INTERRUPT_GEN_MEMBER(tankbatt_state::tankbatt_interrupt) { - tankbatt_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) device->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); + if (m_nmi_enable) device.execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); } INPUT_CHANGED_MEMBER(tankbatt_state::coin_inserted) @@ -287,7 +286,7 @@ static MACHINE_CONFIG_START( tankbatt, tankbatt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 1000000) /* 1 MHz ???? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", tankbatt_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tankbatt_state, tankbatt_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c index e3d6bce417c..9d4d4a8711b 100644 --- a/src/mame/drivers/tankbust.c +++ b/src/mame/drivers/tankbust.c @@ -317,12 +317,11 @@ void tankbust_state::machine_reset() m_variable_data = 0x11; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(tankbust_state::vblank_irq) { - tankbust_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } static MACHINE_CONFIG_START( tankbust, tankbust_state ) @@ -330,7 +329,7 @@ static MACHINE_CONFIG_START( tankbust, tankbust_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_14_31818MHz/2) /* Verified on PCB */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tankbust_state, vblank_irq) MCFG_CPU_ADD("sub", Z80, XTAL_14_31818MHz/4) /* Verified on PCB */ // MCFG_CPU_ADD("sub", Z80, XTAL_14_31818MHz/3) /* Accurate to audio recording, but apparently incorrect clock */ diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c index 55e01e43aff..78c36107c4a 100644 --- a/src/mame/drivers/taotaido.c +++ b/src/mame/drivers/taotaido.c @@ -332,7 +332,7 @@ static const ym2610_interface ym2610_config = static MACHINE_CONFIG_START( taotaido, taotaido_state ) MCFG_CPU_ADD("maincpu", M68000, 32000000/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taotaido_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80,20000000/4) // ?? MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c index dae39a68b23..3cc29967bf5 100644 --- a/src/mame/drivers/tapatune.c +++ b/src/mame/drivers/tapatune.c @@ -385,7 +385,7 @@ static MACHINE_CONFIG_START( tapatune, tapatune_state ) MCFG_CPU_ADD("soundcpu", Z80, 24000000/6 ) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_assert, 183) + MCFG_CPU_PERIODIC_INT_DRIVER(tapatune_state, irq0_line_assert, 183) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tasman.c b/src/mame/drivers/tasman.c index b5d7a791ae1..632e30f9028 100644 --- a/src/mame/drivers/tasman.c +++ b/src/mame/drivers/tasman.c @@ -598,7 +598,7 @@ static MACHINE_CONFIG_START( kongambl, kongambl_state ) MCFG_CPU_ADD("sndcpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(kongamaud_map) - MCFG_CPU_PERIODIC_INT(irq2_line_hold, 480) + MCFG_CPU_PERIODIC_INT_DRIVER(kongambl_state, irq2_line_hold, 480) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/tatsumi.c b/src/mame/drivers/tatsumi.c index 1172c37823f..3a5a855b4a6 100644 --- a/src/mame/drivers/tatsumi.c +++ b/src/mame/drivers/tatsumi.c @@ -849,9 +849,9 @@ static const ym2151_interface ym2151_config = DEVCB_LINE(sound_irq) }; -static INTERRUPT_GEN( roundup5_interrupt ) +INTERRUPT_GEN_MEMBER(tatsumi_state::roundup5_interrupt) { - device->execute().set_input_line_and_vector(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) @@ -873,18 +873,18 @@ static MACHINE_CONFIG_START( apache3, tatsumi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V30, CLOCK_1 / 2) MCFG_CPU_PROGRAM_MAP(apache3_v30_map) - MCFG_CPU_VBLANK_INT("screen", roundup5_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tatsumi_state, roundup5_interrupt) MCFG_CPU_ADD("sub", M68000, CLOCK_2 / 4) MCFG_CPU_PROGRAM_MAP(apache3_68000_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tatsumi_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", V20, CLOCK_1 / 2) MCFG_CPU_PROGRAM_MAP(apache3_v20_map) MCFG_CPU_ADD("sub2", Z80, CLOCK_2 / 8) MCFG_CPU_PROGRAM_MAP(apache3_z80_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tatsumi_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) MCFG_NVRAM_ADD_0FILL("nvram") @@ -918,7 +918,7 @@ static MACHINE_CONFIG_START( roundup5, tatsumi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V30, CLOCK_1 / 2) MCFG_CPU_PROGRAM_MAP(roundup5_v30_map) - MCFG_CPU_VBLANK_INT("screen", roundup5_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tatsumi_state, roundup5_interrupt) MCFG_CPU_ADD("sub", M68000, CLOCK_2 / 4) MCFG_CPU_PROGRAM_MAP(roundup5_68000_map) @@ -959,11 +959,11 @@ static MACHINE_CONFIG_START( cyclwarr, tatsumi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, CLOCK_2 / 4) MCFG_CPU_PROGRAM_MAP(cyclwarr_68000a_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tatsumi_state, irq5_line_hold) MCFG_CPU_ADD("sub", M68000, CLOCK_2 / 4) MCFG_CPU_PROGRAM_MAP(cyclwarr_68000b_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tatsumi_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, CLOCK_1 / 4) MCFG_CPU_PROGRAM_MAP(cyclwarr_z80_map) @@ -1001,11 +1001,11 @@ static MACHINE_CONFIG_START( bigfight, tatsumi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, CLOCK_2 / 4) MCFG_CPU_PROGRAM_MAP(bigfight_68000a_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tatsumi_state, irq5_line_hold) MCFG_CPU_ADD("sub", M68000, CLOCK_2 / 4) MCFG_CPU_PROGRAM_MAP(bigfight_68000b_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tatsumi_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80, CLOCK_1 / 4) MCFG_CPU_PROGRAM_MAP(cyclwarr_z80_map) diff --git a/src/mame/drivers/tattack.c b/src/mame/drivers/tattack.c index 5b96ad4995a..60ff135c0df 100644 --- a/src/mame/drivers/tattack.c +++ b/src/mame/drivers/tattack.c @@ -201,7 +201,7 @@ static MACHINE_CONFIG_START( tattack, tattack_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 8000000 / 2) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(mem) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tattack_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/taxidriv.c b/src/mame/drivers/taxidriv.c index 17d022284ee..f8181be275d 100644 --- a/src/mame/drivers/taxidriv.c +++ b/src/mame/drivers/taxidriv.c @@ -369,16 +369,16 @@ static MACHINE_CONFIG_START( taxidriv, taxidriv_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", taxidriv_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(cpu2_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* ??? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", taxidriv_state, irq0_line_hold) /* ??? */ MCFG_CPU_ADD("audiocpu", Z80,4000000) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(cpu3_map) MCFG_CPU_IO_MAP(cpu3_port_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* ??? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", taxidriv_state, irq0_line_hold) /* ??? */ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c index 473cbfe4149..23bd09f4209 100644 --- a/src/mame/drivers/tbowl.c +++ b/src/mame/drivers/tbowl.c @@ -459,12 +459,12 @@ static MACHINE_CONFIG_START( tbowl, tbowl_state ) /* CPU on Board '6206B' */ MCFG_CPU_ADD("maincpu", Z80, 8000000) /* NEC D70008AC-8 (Z80 Clone) */ MCFG_CPU_PROGRAM_MAP(6206B_map) - MCFG_CPU_VBLANK_INT("lscreen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", tbowl_state, irq0_line_hold) /* CPU on Board '6206C' */ MCFG_CPU_ADD("sub", Z80, 8000000) /* NEC D70008AC-8 (Z80 Clone) */ MCFG_CPU_PROGRAM_MAP(6206C_map) - MCFG_CPU_VBLANK_INT("lscreen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", tbowl_state, irq0_line_hold) /* CPU on Board '6206A' */ MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* Actual Z80 */ diff --git a/src/mame/drivers/tceptor.c b/src/mame/drivers/tceptor.c index 81b0ce89e40..deb58219e0e 100644 --- a/src/mame/drivers/tceptor.c +++ b/src/mame/drivers/tceptor.c @@ -37,13 +37,12 @@ WRITE16_MEMBER(tceptor_state::m68k_shared_word_w) /*******************************************************************/ -static INTERRUPT_GEN( m6809_vb_interrupt ) +INTERRUPT_GEN_MEMBER(tceptor_state::m6809_vb_interrupt) { - tceptor_state *state = device->machine().driver_data(); - if (state->m_m6809_irq_enable) - device->execute().set_input_line(0, HOLD_LINE); + if (m_m6809_irq_enable) + device.execute().set_input_line(0, HOLD_LINE); else - state->m_m6809_irq_enable = 1; + m_m6809_irq_enable = 1; } WRITE8_MEMBER(tceptor_state::m6809_irq_enable_w) @@ -57,11 +56,10 @@ WRITE8_MEMBER(tceptor_state::m6809_irq_disable_w) } -static INTERRUPT_GEN( m68k_vb_interrupt ) +INTERRUPT_GEN_MEMBER(tceptor_state::m68k_vb_interrupt) { - tceptor_state *state = device->machine().driver_data(); - if (state->m_m68k_irq_enable) - device->execute().set_input_line(M68K_IRQ_1, HOLD_LINE); + if (m_m68k_irq_enable) + device.execute().set_input_line(M68K_IRQ_1, HOLD_LINE); } WRITE16_MEMBER(tceptor_state::m68k_irq_enable_w) @@ -70,13 +68,12 @@ WRITE16_MEMBER(tceptor_state::m68k_irq_enable_w) } -static INTERRUPT_GEN( mcu_vb_interrupt ) +INTERRUPT_GEN_MEMBER(tceptor_state::mcu_vb_interrupt) { - tceptor_state *state = device->machine().driver_data(); - if (state->m_mcu_irq_enable) - device->execute().set_input_line(0, HOLD_LINE); + if (m_mcu_irq_enable) + device.execute().set_input_line(0, HOLD_LINE); else - state->m_mcu_irq_enable = 1; + m_mcu_irq_enable = 1; } WRITE8_MEMBER(tceptor_state::mcu_irq_enable_w) @@ -364,7 +361,7 @@ static MACHINE_CONFIG_START( tceptor, tceptor_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 49152000/32) MCFG_CPU_PROGRAM_MAP(m6809_map) - MCFG_CPU_VBLANK_INT("2dscreen", m6809_vb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("2dscreen", tceptor_state, m6809_vb_interrupt) MCFG_CPU_ADD("audiocpu", M65C02, 49152000/24) MCFG_CPU_PROGRAM_MAP(m6502_a_map) @@ -374,12 +371,12 @@ static MACHINE_CONFIG_START( tceptor, tceptor_state ) MCFG_CPU_ADD("sub", M68000, 49152000/4) MCFG_CPU_PROGRAM_MAP(m68k_map) - MCFG_CPU_VBLANK_INT("2dscreen", m68k_vb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("2dscreen", tceptor_state, m68k_vb_interrupt) MCFG_CPU_ADD("mcu", HD63701, 49152000/8) /* or compatible 6808 with extra instructions */ MCFG_CPU_PROGRAM_MAP(mcu_map) MCFG_CPU_IO_MAP(mcu_io_map) - MCFG_CPU_VBLANK_INT("2dscreen", mcu_vb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("2dscreen", tceptor_state, mcu_vb_interrupt) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/techno.c b/src/mame/drivers/techno.c index 7149302d636..4b3c3f144a0 100644 --- a/src/mame/drivers/techno.c +++ b/src/mame/drivers/techno.c @@ -49,6 +49,8 @@ protected: private: bool m_digwait; UINT8 m_keyrow; +public: + INTERRUPT_GEN_MEMBER(techno_intgen); }; @@ -230,15 +232,14 @@ static INPUT_PORTS_START( techno ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Fix top left target middle") PORT_CODE(KEYCODE_EQUALS) INPUT_PORTS_END -static INTERRUPT_GEN( techno_intgen ) +INTERRUPT_GEN_MEMBER(techno_state::techno_intgen) { - techno_state *state = device->machine().driver_data(); // vectors change per int: 88-8F, 98-9F) - if ((state->m_vector & 7) == 7) - state->m_vector = (state->m_vector ^ 0x10) & 0x97; - state->m_vector++; + if ((m_vector & 7) == 7) + m_vector = (m_vector ^ 0x10) & 0x97; + m_vector++; // core doesn't support clearing of irq via hardware - generic_pulse_irq_line_and_vector(device, 1, state->m_vector, 1); + generic_pulse_irq_line_and_vector(device.execute(), 1, m_vector, 1); } void techno_state::machine_reset() @@ -251,7 +252,7 @@ static MACHINE_CONFIG_START( techno, techno_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, TECHNO_MAINCLK) MCFG_CPU_PROGRAM_MAP(techno_map) - MCFG_CPU_PERIODIC_INT(techno_intgen, TECHNO_MAINCLK/256) // 31250Hz + MCFG_CPU_PERIODIC_INT_DRIVER(techno_state, techno_intgen, TECHNO_MAINCLK/256) // 31250Hz //MCFG_CPU_ADD("cpu2", TMS7000, 4000000) //MCFG_CPU_PROGRAM_MAP(techno_sub_map) diff --git a/src/mame/drivers/tecmo.c b/src/mame/drivers/tecmo.c index 9010def04b9..12bdeba1c2e 100644 --- a/src/mame/drivers/tecmo.c +++ b/src/mame/drivers/tecmo.c @@ -633,7 +633,7 @@ static MACHINE_CONFIG_START( rygar, tecmo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rygar_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tecmo_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, XTAL_4MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(rygar_sound_map) @@ -692,7 +692,7 @@ static MACHINE_CONFIG_START( backfirt, tecmo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/4) MCFG_CPU_PROGRAM_MAP(rygar_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tecmo_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, XTAL_8MHz/2) MCFG_CPU_PROGRAM_MAP(rygar_sound_map) diff --git a/src/mame/drivers/tecmo16.c b/src/mame/drivers/tecmo16.c index fa025813321..7c2ea1468dd 100644 --- a/src/mame/drivers/tecmo16.c +++ b/src/mame/drivers/tecmo16.c @@ -378,7 +378,7 @@ static MACHINE_CONFIG_START( fstarfrc, tecmo16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12MHz */ MCFG_CPU_PROGRAM_MAP(fstarfrc_map) - MCFG_CPU_VBLANK_INT("screen", irq5_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tecmo16_state, irq5_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/tecmosys.c b/src/mame/drivers/tecmosys.c index 171c5fa73c6..5f411e8504c 100644 --- a/src/mame/drivers/tecmosys.c +++ b/src/mame/drivers/tecmosys.c @@ -455,7 +455,7 @@ void tecmosys_state::machine_start() static MACHINE_CONFIG_START( deroon, tecmosys_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tecmosys_state, irq1_line_hold) MCFG_WATCHDOG_VBLANK_INIT(400) // guess MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/2 ) diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c index 548f99436b9..fe7662b4561 100644 --- a/src/mame/drivers/tehkanwc.c +++ b/src/mame/drivers/tehkanwc.c @@ -642,16 +642,16 @@ static MACHINE_CONFIG_START( tehkanwc, tehkanwc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 18432000/4) /* 18.432000 / 4 */ MCFG_CPU_PROGRAM_MAP(main_mem) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tehkanwc_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, 18432000/4) MCFG_CPU_PROGRAM_MAP(sub_mem) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tehkanwc_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 18432000/4) MCFG_CPU_PROGRAM_MAP(sound_mem) MCFG_CPU_IO_MAP(sound_port) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tehkanwc_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - seems enough to keep the CPUs in sync */ diff --git a/src/mame/drivers/tempest.c b/src/mame/drivers/tempest.c index 97fe6b65404..ace53fda189 100644 --- a/src/mame/drivers/tempest.c +++ b/src/mame/drivers/tempest.c @@ -588,7 +588,7 @@ static MACHINE_CONFIG_START( tempest, tempest_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(irq0_line_assert, (double)MASTER_CLOCK / 4096 / 12) + MCFG_CPU_PERIODIC_INT_DRIVER(tempest_state, irq0_line_assert, (double)MASTER_CLOCK / 4096 / 12) MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(CLOCK_3KHZ / 256)) MCFG_ATARIVGEAROM_ADD("earom") diff --git a/src/mame/drivers/terracre.c b/src/mame/drivers/terracre.c index 4017d40c5fa..2ebb649a60d 100644 --- a/src/mame/drivers/terracre.c +++ b/src/mame/drivers/terracre.c @@ -528,12 +528,12 @@ GFXDECODE_END static MACHINE_CONFIG_START( amazon, terracre_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz MCFG_CPU_PROGRAM_MAP(amazon_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", terracre_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) // 4mhz? should be derived from XTAL_22MHz? how? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_3526_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_16MHz/4/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(terracre_state, irq0_line_hold, XTAL_16MHz/4/512) // ? MCFG_MACHINE_START_OVERRIDE(terracre_state,amazon) @@ -563,12 +563,12 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( ym3526, terracre_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz MCFG_CPU_PROGRAM_MAP(terracre_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", terracre_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) // 4.0mhz when compared to sound recordings, should be derived from XTAL_22MHz? how? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_3526_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_16MHz/4/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(terracre_state, irq0_line_hold, XTAL_16MHz/4/512) // ? MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE( 60 ) @@ -596,12 +596,12 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( ym2203, terracre_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) // 8mhz MCFG_CPU_PROGRAM_MAP(terracre_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", terracre_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) // 4.0mhz when compared to sound recordings, should be derived from XTAL_22MHz? how? MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_2203_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_16MHz/4/512) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(terracre_state, irq0_line_hold, XTAL_16MHz/4/512) // ? MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/tetrisp2.c b/src/mame/drivers/tetrisp2.c index 0ab6d1c40cd..9a8bfb59c78 100644 --- a/src/mame/drivers/tetrisp2.c +++ b/src/mame/drivers/tetrisp2.c @@ -1329,7 +1329,7 @@ static MACHINE_CONFIG_START( tetrisp2, tetrisp2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(tetrisp2_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") MCFG_WATCHDOG_VBLANK_INIT(8) /* guess */ @@ -1361,7 +1361,7 @@ static MACHINE_CONFIG_START( nndmseal, tetrisp2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) MCFG_CPU_PROGRAM_MAP(nndmseal_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1391,7 +1391,7 @@ static MACHINE_CONFIG_START( rockn, tetrisp2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(rockn1_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1422,7 +1422,7 @@ static MACHINE_CONFIG_START( rockn2, tetrisp2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(rockn2_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1453,11 +1453,11 @@ static MACHINE_CONFIG_START( rocknms, tetrisp2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(rocknms_main_map) - MCFG_CPU_VBLANK_INT("lscreen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", tetrisp2_state, irq2_line_hold) MCFG_CPU_ADD("sub", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(rocknms_sub_map) - MCFG_CPU_VBLANK_INT("lscreen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", tetrisp2_state, irq2_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1495,11 +1495,11 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( stepstag, stepstag_state ) MCFG_CPU_ADD("maincpu", M68000, 16000000 ) //?? MCFG_CPU_PROGRAM_MAP(stepstag_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) // lev 4 triggered by system timer + MCFG_CPU_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold) // lev 4 triggered by system timer MCFG_CPU_ADD("sub", M68000, 16000000 ) //?? MCFG_CPU_PROGRAM_MAP(stepstag_sub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) // lev 6 triggered by main CPU + MCFG_CPU_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq4_line_hold) // lev 6 triggered by main CPU MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/tgtpanic.c b/src/mame/drivers/tgtpanic.c index cfc29194bd5..afa12e493ec 100644 --- a/src/mame/drivers/tgtpanic.c +++ b/src/mame/drivers/tgtpanic.c @@ -134,7 +134,7 @@ static MACHINE_CONFIG_START( tgtpanic, tgtpanic_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(prg_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 20) /* Unverified */ + MCFG_CPU_PERIODIC_INT_DRIVER(tgtpanic_state, irq0_line_hold, 20) /* Unverified */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c index 4fb033be25c..f3bb642e14c 100644 --- a/src/mame/drivers/thedeep.c +++ b/src/mame/drivers/thedeep.c @@ -437,11 +437,10 @@ static TIMER_DEVICE_CALLBACK( thedeep_interrupt ) } } -static INTERRUPT_GEN( thedeep_mcu_irq ) +INTERRUPT_GEN_MEMBER(thedeep_state::thedeep_mcu_irq) { - thedeep_state *state = device->machine().driver_data(); - state->m_mcu->set_input_line(MCS51_INT1_LINE, ASSERT_LINE); + m_mcu->set_input_line(MCS51_INT1_LINE, ASSERT_LINE); } static MACHINE_CONFIG_START( thedeep, thedeep_state ) @@ -458,7 +457,7 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state ) /* MCU is a i8751 running at 8Mhz (8mhz xtal)*/ MCFG_CPU_ADD("mcu", I8751, XTAL_8MHz) MCFG_CPU_IO_MAP(mcu_io_map) - MCFG_CPU_VBLANK_INT("screen",thedeep_mcu_irq ) // unknown source, but presumably vblank + MCFG_CPU_VBLANK_INT_DRIVER("screen", thedeep_state, thedeep_mcu_irq) // unknown source, but presumably vblank MCFG_DEVICE_DISABLE() diff --git a/src/mame/drivers/thepit.c b/src/mame/drivers/thepit.c index ba9265eb31c..ee0d6dc0faa 100644 --- a/src/mame/drivers/thepit.c +++ b/src/mame/drivers/thepit.c @@ -635,12 +635,11 @@ static const ay8910_interface ay8910_config = DEVCB_NULL }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(thepit_state::vblank_irq) { - thepit_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( thepit, thepit_state ) @@ -648,12 +647,12 @@ static MACHINE_CONFIG_START( thepit, thepit_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, PIXEL_CLOCK/2) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(thepit_main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", thepit_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK/4) /* 2.5 MHz */ MCFG_CPU_PROGRAM_MAP(audio_map) MCFG_CPU_IO_MAP(audio_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", thepit_state, irq0_line_hold) /* video hardware */ MCFG_GFXDECODE(thepit) diff --git a/src/mame/drivers/thief.c b/src/mame/drivers/thief.c index f8d5f30e11d..41c5d989712 100644 --- a/src/mame/drivers/thief.c +++ b/src/mame/drivers/thief.c @@ -33,13 +33,13 @@ Credits: -static INTERRUPT_GEN( thief_interrupt ) +INTERRUPT_GEN_MEMBER(thief_state::thief_interrupt) { /* SLAM switch causes an NMI if it's pressed */ - if( (device->machine().root_device().ioport("P2")->read() & 0x10) == 0 ) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if( (machine().root_device().ioport("P2")->read() & 0x10) == 0 ) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); else - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } /**********************************************************/ @@ -439,7 +439,7 @@ static MACHINE_CONFIG_START( sharkatt, thief_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(sharkatt_main_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", thief_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", thief_state, thief_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -474,7 +474,7 @@ static MACHINE_CONFIG_START( thief, thief_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(thief_main_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", thief_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", thief_state, thief_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -509,7 +509,7 @@ static MACHINE_CONFIG_START( natodef, thief_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(thief_main_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", thief_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", thief_state, thief_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/thoop2.c b/src/mame/drivers/thoop2.c index ee4f35e27f8..12ffa9e0ddc 100644 --- a/src/mame/drivers/thoop2.c +++ b/src/mame/drivers/thoop2.c @@ -191,7 +191,7 @@ static MACHINE_CONFIG_START( thoop2, thoop2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(thoop2_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", thoop2_state, irq6_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c index 7ca009fd0a1..72ba330938c 100644 --- a/src/mame/drivers/thunderx.c +++ b/src/mame/drivers/thunderx.c @@ -21,12 +21,11 @@ static KONAMI_SETLINES_CALLBACK( thunderx_banking ); /***************************************************************************/ -static INTERRUPT_GEN( scontra_interrupt ) +INTERRUPT_GEN_MEMBER(thunderx_state::scontra_interrupt) { - thunderx_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) - device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); + if (k052109_is_irq_enabled(m_k052109)) + device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } static TIMER_CALLBACK( thunderx_firq_callback ) @@ -658,7 +657,7 @@ static MACHINE_CONFIG_START( scontra, thunderx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, XTAL_24MHz/8) /* Verified on pcb, CPU is 052001 */ MCFG_CPU_PROGRAM_MAP(scontra_map) - MCFG_CPU_VBLANK_INT("screen", scontra_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", thunderx_state, scontra_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(scontra_sound_map) @@ -701,7 +700,7 @@ static MACHINE_CONFIG_START( thunderx, thunderx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(thunderx_map) - MCFG_CPU_VBLANK_INT("screen", scontra_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", thunderx_state, scontra_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* ? */ MCFG_CPU_PROGRAM_MAP(thunderx_sound_map) diff --git a/src/mame/drivers/tiamc1.c b/src/mame/drivers/tiamc1.c index 1b8e56b35b0..c9aca11c735 100644 --- a/src/mame/drivers/tiamc1.c +++ b/src/mame/drivers/tiamc1.c @@ -224,7 +224,7 @@ static MACHINE_CONFIG_START( tiamc1, tiamc1_state ) MCFG_CPU_PROGRAM_MAP(tiamc1_map) MCFG_CPU_IO_MAP(tiamc1_io_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tiamc1_state, irq1_line_hold) /* video hardware */ diff --git a/src/mame/drivers/tigeroad.c b/src/mame/drivers/tigeroad.c index af81d962a94..10d476b9b34 100644 --- a/src/mame/drivers/tigeroad.c +++ b/src/mame/drivers/tigeroad.c @@ -520,7 +520,7 @@ static MACHINE_CONFIG_START( tigeroad, tigeroad_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tigeroad_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -563,7 +563,7 @@ static MACHINE_CONFIG_DERIVED( toramich, tigeroad ) MCFG_CPU_ADD("sample", Z80, 3579545) /* ? */ MCFG_CPU_PROGRAM_MAP(sample_map) MCFG_CPU_IO_MAP(sample_port_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4000) /* ? */ + MCFG_CPU_PERIODIC_INT_DRIVER(tigeroad_state, irq0_line_hold, 4000) /* ? */ /* sound hardware */ MCFG_SOUND_ADD("msm", MSM5205, 384000) diff --git a/src/mame/drivers/timelimt.c b/src/mame/drivers/timelimt.c index a55630dff9f..65313295dcc 100644 --- a/src/mame/drivers/timelimt.c +++ b/src/mame/drivers/timelimt.c @@ -214,11 +214,10 @@ static const ay8910_interface ay8910_config = DEVCB_NULL }; -static INTERRUPT_GEN( timelimt_irq ) +INTERRUPT_GEN_MEMBER(timelimt_state::timelimt_irq) { - timelimt_state *state = device->machine().driver_data(); - if ( state->m_nmi_enabled ) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if ( m_nmi_enabled ) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } /***************************************************************************/ @@ -229,12 +228,12 @@ static MACHINE_CONFIG_START( timelimt, timelimt_state ) MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 5.000 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", timelimt_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", timelimt_state, timelimt_irq) MCFG_CPU_ADD("audiocpu", Z80,18432000/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* ? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", timelimt_state, irq0_line_hold) /* ? */ MCFG_QUANTUM_TIME(attotime::from_hz(3000)) diff --git a/src/mame/drivers/timeplt.c b/src/mame/drivers/timeplt.c index e19acad6a45..b9f07831dc6 100644 --- a/src/mame/drivers/timeplt.c +++ b/src/mame/drivers/timeplt.c @@ -59,12 +59,11 @@ * *************************************/ -static INTERRUPT_GEN( timeplt_interrupt ) +INTERRUPT_GEN_MEMBER(timeplt_state::timeplt_interrupt) { - timeplt_state *state = device->machine().driver_data(); - if (state->m_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + if (m_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } @@ -470,7 +469,7 @@ static MACHINE_CONFIG_START( timeplt, timeplt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3/2) /* not confirmed, but common for Konami games of the era */ MCFG_CPU_PROGRAM_MAP(timeplt_main_map) - MCFG_CPU_VBLANK_INT("screen", timeplt_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state, timeplt_interrupt) /* video hardware */ @@ -496,7 +495,7 @@ static MACHINE_CONFIG_DERIVED( psurge, timeplt ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(psurge_main_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state, nmi_line_pulse) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bikkuric, timeplt ) diff --git a/src/mame/drivers/timetrv.c b/src/mame/drivers/timetrv.c index 64c381353ce..255354c6a20 100644 --- a/src/mame/drivers/timetrv.c +++ b/src/mame/drivers/timetrv.c @@ -43,6 +43,8 @@ public: DECLARE_READ8_MEMBER(ld_r); virtual void video_start(); UINT32 screen_update_timetrv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(ld_irq); }; @@ -134,14 +136,14 @@ static INPUT_PORTS_START( timetrv ) // 0x80 eeprom read bit INPUT_PORTS_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(timetrv_state::vblank_irq) { - device->execute().set_input_line_and_vector(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 ) +INTERRUPT_GEN_MEMBER(timetrv_state::ld_irq) { - device->execute().set_input_line_and_vector(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 ) @@ -150,8 +152,8 @@ static MACHINE_CONFIG_START( timetrv, timetrv_state ) MCFG_CPU_ADD("maincpu",I80188,20000000) //??? MCFG_CPU_PROGRAM_MAP(timetrv_map) MCFG_CPU_IO_MAP(timetrv_io) - MCFG_CPU_VBLANK_INT("screen",vblank_irq) - MCFG_CPU_PERIODIC_INT(ld_irq,60) //remove from here + MCFG_CPU_VBLANK_INT_DRIVER("screen", timetrv_state, vblank_irq) + MCFG_CPU_PERIODIC_INT_DRIVER(timetrv_state, ld_irq, 60) //remove from here /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index 3d9e01dd412..7945d84014f 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -164,27 +164,24 @@ WRITE16_MEMBER(tmnt_state::k053244_word_noA1_w) k053244_w(m_k053245, space, offset + 1, data & 0xff); } -static INTERRUPT_GEN(cuebrick_interrupt) +INTERRUPT_GEN_MEMBER(tmnt_state::cuebrick_interrupt) { - tmnt_state *state = device->machine().driver_data(); - if (state->m_irq5_mask) - device->execute().set_input_line(M68K_IRQ_5, HOLD_LINE); + if (m_irq5_mask) + device.execute().set_input_line(M68K_IRQ_5, HOLD_LINE); } -static INTERRUPT_GEN( punkshot_interrupt ) +INTERRUPT_GEN_MEMBER(tmnt_state::punkshot_interrupt) { - tmnt_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) + if (k052109_is_irq_enabled(m_k052109)) irq4_line_hold(device); } -static INTERRUPT_GEN( lgtnfght_interrupt ) +INTERRUPT_GEN_MEMBER(tmnt_state::lgtnfght_interrupt) { - tmnt_state *state = device->machine().driver_data(); - if (k052109_is_irq_enabled(state->m_k052109)) + if (k052109_is_irq_enabled(m_k052109)) irq5_line_hold(device); } @@ -2242,12 +2239,11 @@ MACHINE_RESET_MEMBER(tmnt_state,common) } /* cuebrick, mia and tmnt */ -static INTERRUPT_GEN( tmnt_vblank_irq ) +INTERRUPT_GEN_MEMBER(tmnt_state::tmnt_vblank_irq) { - tmnt_state *state = device->machine().driver_data(); - if(state->m_irq5_mask) - device->execute().set_input_line(5, HOLD_LINE); + if(m_irq5_mask) + device.execute().set_input_line(5, HOLD_LINE); } @@ -2256,7 +2252,7 @@ static MACHINE_CONFIG_START( cuebrick, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz */ MCFG_CPU_PROGRAM_MAP(cuebrick_main_map) - MCFG_CPU_VBLANK_INT("screen",cuebrick_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, cuebrick_interrupt) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) @@ -2294,7 +2290,7 @@ static MACHINE_CONFIG_START( mia, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/3) MCFG_CPU_PROGRAM_MAP(mia_main_map) - MCFG_CPU_VBLANK_INT("screen", tmnt_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, tmnt_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(mia_audio_map) @@ -2346,7 +2342,7 @@ static MACHINE_CONFIG_START( tmnt, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/3) MCFG_CPU_PROGRAM_MAP(tmnt_main_map) - MCFG_CPU_VBLANK_INT("screen", tmnt_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, tmnt_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(tmnt_audio_map) @@ -2398,7 +2394,7 @@ static MACHINE_CONFIG_START( punkshot, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(punkshot_main_map) - MCFG_CPU_VBLANK_INT("screen", punkshot_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, punkshot_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(punkshot_audio_map) @@ -2440,7 +2436,7 @@ static MACHINE_CONFIG_START( lgtnfght, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) MCFG_CPU_PROGRAM_MAP(lgtnfght_main_map) - MCFG_CPU_VBLANK_INT("screen", lgtnfght_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, lgtnfght_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(lgtnfght_audio_map) @@ -2484,7 +2480,7 @@ static MACHINE_CONFIG_START( blswhstl, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(blswhstl_main_map) - MCFG_CPU_VBLANK_INT("screen", punkshot_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, punkshot_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(ssriders_audio_map) @@ -2550,7 +2546,7 @@ static MACHINE_CONFIG_START( glfgreat, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* Confirmed */ MCFG_CPU_PROGRAM_MAP(glfgreat_main_map) - MCFG_CPU_VBLANK_INT("screen", lgtnfght_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, lgtnfght_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(glfgreat_audio_map) @@ -2613,7 +2609,7 @@ static MACHINE_CONFIG_START( prmrsocr, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* Confirmed */ MCFG_CPU_PROGRAM_MAP(prmrsocr_main_map) - MCFG_CPU_VBLANK_INT("screen", lgtnfght_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, lgtnfght_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 8000000) /* ? */ MCFG_CPU_PROGRAM_MAP(prmrsocr_audio_map) @@ -2658,7 +2654,7 @@ static MACHINE_CONFIG_START( tmnt2, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(tmnt2_main_map) - MCFG_CPU_VBLANK_INT("screen", punkshot_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, punkshot_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 8000000) /* 8 MHz; clock is correct, but there's 1 cycle wait for ROM/RAM */ /* access. Access speed of ROM/RAM used on the machine is 150ns, */ @@ -2709,7 +2705,7 @@ static MACHINE_CONFIG_START( ssriders, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) MCFG_CPU_PROGRAM_MAP(ssriders_main_map) - MCFG_CPU_VBLANK_INT("screen", punkshot_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, punkshot_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ????? makes the ROM test sync */ MCFG_CPU_PROGRAM_MAP(ssriders_audio_map) @@ -2756,7 +2752,7 @@ static MACHINE_CONFIG_START( sunsetbl, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(sunsetbl_main_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, irq4_line_hold) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) @@ -2792,7 +2788,7 @@ static MACHINE_CONFIG_START( thndrx2, tmnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(thndrx2_main_map) - MCFG_CPU_VBLANK_INT("screen", punkshot_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmnt_state, punkshot_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(thndrx2_audio_map) diff --git a/src/mame/drivers/tmspoker.c b/src/mame/drivers/tmspoker.c index 92604f68fac..e220c20f05d 100644 --- a/src/mame/drivers/tmspoker.c +++ b/src/mame/drivers/tmspoker.c @@ -233,6 +233,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_tmspoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(tmspoker_interrupt); }; @@ -285,9 +286,9 @@ void tmspoker_state::palette_init() // popmessage("written : %02X", data); //} -static INTERRUPT_GEN( tmspoker_interrupt ) +INTERRUPT_GEN_MEMBER(tmspoker_state::tmspoker_interrupt) { - device->execute().set_input_line_and_vector(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 } @@ -568,7 +569,7 @@ static MACHINE_CONFIG_START( tmspoker, tmspoker_state ) MCFG_CPU_ADD("maincpu", TMS9980L, MASTER_CLOCK/4) /* guess */ MCFG_CPU_PROGRAM_MAP(tmspoker_map) MCFG_CPU_IO_MAP(tmspoker_cru_map) - MCFG_CPU_VBLANK_INT("screen", tmspoker_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tmspoker_state, tmspoker_interrupt) // MCFG_NVRAM_HANDLER(generic_0fill) diff --git a/src/mame/drivers/tnzs.c b/src/mame/drivers/tnzs.c index 06a88b6f265..d446ec764f9 100644 --- a/src/mame/drivers/tnzs.c +++ b/src/mame/drivers/tnzs.c @@ -1620,11 +1620,11 @@ static MACHINE_CONFIG_START( arknoid2, tnzs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", arknoid2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, arknoid2_interrupt) MCFG_CPU_ADD("sub", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_QUANTUM_PERFECT_CPU("maincpu") @@ -1661,11 +1661,11 @@ static MACHINE_CONFIG_START( drtoppel, tnzs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) /* 6.0 MHz ??? - Main board Crystal is 12MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", arknoid2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, arknoid2_interrupt) MCFG_CPU_ADD("sub", Z80,XTAL_12MHz/2) /* 6.0 MHz ??? - Main board Crystal is 12MHz */ MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_QUANTUM_PERFECT_CPU("maincpu") @@ -1702,11 +1702,11 @@ static MACHINE_CONFIG_START( tnzs, tnzs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) /* 6.0 MHz ??? - Main board Crystal is 12MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,XTAL_12MHz/2) /* 6.0 MHz ??? - Main board Crystal is 12MHz */ MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_CPU_ADD("mcu", I8742, 12000000/2) /* 400KHz ??? - Main board Crystal is 12MHz */ MCFG_CPU_IO_MAP(i8742_io_map) @@ -1745,11 +1745,11 @@ static MACHINE_CONFIG_START( insectx, tnzs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_QUANTUM_PERFECT_CPU("maincpu") @@ -1784,11 +1784,11 @@ static MACHINE_CONFIG_START( kageki, tnzs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(kageki_sub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_QUANTUM_PERFECT_CPU("maincpu") @@ -1829,11 +1829,11 @@ static MACHINE_CONFIG_START( tnzsb, tnzs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu0_type2) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tnzsb_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tnzsb_cpu2_map) @@ -1892,11 +1892,11 @@ static MACHINE_CONFIG_START( jpopnics, tnzs_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) /* Not verified - Main board Crystal is 12MHz */ MCFG_CPU_PROGRAM_MAP(jpopnics_main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80,XTAL_12MHz/2) /* Not verified - Main board Crystal is 12MHz */ MCFG_CPU_PROGRAM_MAP(jpopnics_sub_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tnzs_state, irq0_line_hold) MCFG_QUANTUM_PERFECT_CPU("maincpu") diff --git a/src/mame/drivers/toaplan1.c b/src/mame/drivers/toaplan1.c index eb6e5f3f8b7..3398084dd97 100644 --- a/src/mame/drivers/toaplan1.c +++ b/src/mame/drivers/toaplan1.c @@ -1532,7 +1532,7 @@ static MACHINE_CONFIG_START( rallybik, toaplan1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) MCFG_CPU_PROGRAM_MAP(rallybik_main_map) - MCFG_CPU_VBLANK_INT("screen", toaplan1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan1_state, toaplan1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_28MHz/8) MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map) @@ -1569,7 +1569,7 @@ static MACHINE_CONFIG_START( truxton, toaplan1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) MCFG_CPU_PROGRAM_MAP(truxton_main_map) - MCFG_CPU_VBLANK_INT("screen", toaplan1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan1_state, toaplan1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_28MHz/8) MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map) @@ -1606,7 +1606,7 @@ static MACHINE_CONFIG_START( hellfire, toaplan1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) MCFG_CPU_PROGRAM_MAP(hellfire_main_map) - MCFG_CPU_VBLANK_INT("screen", toaplan1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan1_state, toaplan1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_28MHz/8) MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map) @@ -1643,7 +1643,7 @@ static MACHINE_CONFIG_START( zerowing, toaplan1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) MCFG_CPU_PROGRAM_MAP(zerowing_main_map) - MCFG_CPU_VBLANK_INT("screen", toaplan1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan1_state, toaplan1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_28MHz/8) MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map) @@ -1680,7 +1680,7 @@ static MACHINE_CONFIG_START( demonwld, toaplan1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) MCFG_CPU_PROGRAM_MAP(demonwld_main_map) - MCFG_CPU_VBLANK_INT("screen", toaplan1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan1_state, toaplan1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_28MHz/8) MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map) @@ -1721,7 +1721,7 @@ static MACHINE_CONFIG_START( samesame, toaplan1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) MCFG_CPU_PROGRAM_MAP(samesame_main_map) - MCFG_CPU_VBLANK_INT("screen", toaplan1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan1_state, toaplan1_interrupt) MCFG_CPU_ADD("audiocpu", Z180, XTAL_28MHz/8) /* HD647180XOFS6 CPU */ MCFG_CPU_PROGRAM_MAP(hd647180_mem_map) @@ -1756,7 +1756,7 @@ static MACHINE_CONFIG_START( outzone, toaplan1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) MCFG_CPU_PROGRAM_MAP(outzone_main_map) - MCFG_CPU_VBLANK_INT("screen", toaplan1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan1_state, toaplan1_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_28MHz/8) MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map) @@ -1793,7 +1793,7 @@ static MACHINE_CONFIG_START( vimana, toaplan1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(vimana_main_map) - MCFG_CPU_VBLANK_INT("screen", toaplan1_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan1_state, toaplan1_interrupt) MCFG_CPU_ADD("audiocpu", Z180, XTAL_28MHz/8) /* HD647180XOFS6 CPU */ MCFG_CPU_PROGRAM_MAP(hd647180_mem_map) diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index b16634f73fb..04d36d66f92 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -497,9 +497,9 @@ static void toaplan2_vblank_irq(running_machine &machine, int irq_line) machine.scheduler().timer_set(machine.primary_screen->time_until_pos(0xe6), FUNC(toaplan2_raise_irq), irq_line); } -static INTERRUPT_GEN( toaplan2_vblank_irq1 ) { toaplan2_vblank_irq(device->machine(), 1); } -static INTERRUPT_GEN( toaplan2_vblank_irq2 ) { toaplan2_vblank_irq(device->machine(), 2); } -static INTERRUPT_GEN( toaplan2_vblank_irq4 ) { toaplan2_vblank_irq(device->machine(), 4); } +INTERRUPT_GEN_MEMBER(toaplan2_state::toaplan2_vblank_irq1){ toaplan2_vblank_irq(machine(), 1); } +INTERRUPT_GEN_MEMBER(toaplan2_state::toaplan2_vblank_irq2){ toaplan2_vblank_irq(machine(), 2); } +INTERRUPT_GEN_MEMBER(toaplan2_state::toaplan2_vblank_irq4){ toaplan2_vblank_irq(machine(), 4); } READ16_MEMBER(toaplan2_state::video_count_r) @@ -1018,9 +1018,9 @@ WRITE16_MEMBER(toaplan2_state::bbakraid_eeprom_w) } -static INTERRUPT_GEN( bbakraid_snd_interrupt ) +INTERRUPT_GEN_MEMBER(toaplan2_state::bbakraid_snd_interrupt) { - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } @@ -3028,7 +3028,7 @@ static MACHINE_CONFIG_START( tekipaki, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* 10MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(tekipaki_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) #ifdef USE_HD64x180 MCFG_CPU_ADD("audiocpu", Z180, XTAL_10MHz) /* HD647180 CPU actually */ @@ -3069,7 +3069,7 @@ static MACHINE_CONFIG_START( ghox, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(ghox_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) #ifdef USE_HD64x180 MCFG_CPU_ADD("audiocpu", Z180, XTAL_10MHz) /* HD647180 CPU actually */ @@ -3160,7 +3160,7 @@ static MACHINE_CONFIG_START( dogyuun, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_25MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(dogyuun_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", V25, XTAL_25MHz/2) /* NEC V25 type Toaplan marked CPU ??? */ MCFG_CPU_PROGRAM_MAP(v25_mem) @@ -3203,7 +3203,7 @@ static MACHINE_CONFIG_START( kbash, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* 16MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(kbash_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) /* ROM based v25 */ MCFG_CPU_ADD("audiocpu", V25, XTAL_16MHz) /* NEC V25 type Toaplan marked CPU ??? */ @@ -3246,7 +3246,7 @@ static MACHINE_CONFIG_START( kbash2, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* 16MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(kbash2_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_MACHINE_START_OVERRIDE(toaplan2_state,toaplan2) @@ -3283,7 +3283,7 @@ static MACHINE_CONFIG_START( truxton2, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(truxton2_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq2) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq2) MCFG_MACHINE_START_OVERRIDE(toaplan2_state,toaplan2) @@ -3332,7 +3332,7 @@ static MACHINE_CONFIG_START( pipibibs, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(pipibibs_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", Z80, XTAL_27MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(pipibibs_sound_z80_mem) @@ -3373,7 +3373,7 @@ static MACHINE_CONFIG_START( pipibibsbl, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* 10MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(pipibibi_bootleg_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", Z80, XTAL_27MHz/8) /* ??? 3.37MHz */ MCFG_CPU_PROGRAM_MAP(pipibibs_sound_z80_mem) @@ -3453,7 +3453,7 @@ static MACHINE_CONFIG_START( fixeight, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(fixeight_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", V25, XTAL_16MHz) /* NEC V25 type Toaplan marked CPU ??? */ MCFG_CPU_PROGRAM_MAP(fixeight_v25_mem) @@ -3497,7 +3497,7 @@ static MACHINE_CONFIG_START( fixeightbl, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* 10MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(fixeightbl_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq2) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq2) MCFG_MACHINE_START_OVERRIDE(toaplan2_state,toaplan2) @@ -3532,7 +3532,7 @@ static MACHINE_CONFIG_START( vfive, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(vfive_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", V25, XTAL_20MHz/2) /* Verified on pcb, NEC V25 type Toaplan mark scratched out */ MCFG_CPU_PROGRAM_MAP(vfive_v25_mem) @@ -3571,7 +3571,7 @@ static MACHINE_CONFIG_START( batsugun, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* 16MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(batsugun_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", V25, XTAL_32MHz/2) /* NEC V25 type Toaplan marked CPU ??? */ MCFG_CPU_PROGRAM_MAP(v25_mem) @@ -3613,7 +3613,7 @@ static MACHINE_CONFIG_START( snowbro2, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(snowbro2_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_MACHINE_START_OVERRIDE(toaplan2_state,toaplan2) @@ -3650,7 +3650,7 @@ static MACHINE_CONFIG_START( mahoudai, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* 16MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(mahoudai_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) /* 4MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(raizing_sound_z80_mem) @@ -3693,7 +3693,7 @@ static MACHINE_CONFIG_START( shippumd, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* 16MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(shippumd_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) /* 4MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(raizing_sound_z80_mem) @@ -3747,7 +3747,7 @@ static MACHINE_CONFIG_START( bgaregga, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* 16MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(bgaregga_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq4) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) /* 4MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(bgaregga_sound_z80_mem) @@ -3796,7 +3796,7 @@ static MACHINE_CONFIG_START( batrider, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* 16MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(batrider_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq2) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq2) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) /* 4MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(batrider_sound_z80_mem) @@ -3844,12 +3844,12 @@ static MACHINE_CONFIG_START( bbakraid, toaplan2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* 16MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(bbakraid_68k_mem) - MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq1) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toaplan2_state, toaplan2_vblank_irq1) MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/6) /* 5.3333MHz , 32MHz Oscillator */ MCFG_CPU_PROGRAM_MAP(bbakraid_sound_z80_mem) MCFG_CPU_IO_MAP(bbakraid_sound_z80_port) - MCFG_CPU_PERIODIC_INT(bbakraid_snd_interrupt, 448) + MCFG_CPU_PERIODIC_INT_DRIVER(toaplan2_state, bbakraid_snd_interrupt, 448) MCFG_QUANTUM_TIME(attotime::from_hz(600)) diff --git a/src/mame/drivers/toki.c b/src/mame/drivers/toki.c index 5bd29ccc6d9..d181fd2b799 100644 --- a/src/mame/drivers/toki.c +++ b/src/mame/drivers/toki.c @@ -418,7 +418,7 @@ static MACHINE_CONFIG_START( toki, toki_state ) /* KOYO 20.000MHz near the cpu * /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,XTAL_20MHz /2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(toki_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)/* VBL */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", toki_state, irq1_line_hold)/* VBL */ SEIBU_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verifed on pcb */ @@ -448,7 +448,7 @@ static MACHINE_CONFIG_START( tokib, toki_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10MHz causes bad slowdowns with monkey machine rd1, but is correct, 20Mhz XTAL */ MCFG_CPU_PROGRAM_MAP(tokib_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)/* VBL (could be level1, same vector) */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", toki_state, irq6_line_hold)/* VBL (could be level1, same vector) */ MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* verified with PCB */ MCFG_CPU_PROGRAM_MAP(tokib_audio_map) diff --git a/src/mame/drivers/tomcat.c b/src/mame/drivers/tomcat.c index 2ff6a9849de..a03db3a7c67 100644 --- a/src/mame/drivers/tomcat.c +++ b/src/mame/drivers/tomcat.c @@ -397,8 +397,8 @@ static const riot6532_interface tomcat_riot6532_intf = static MACHINE_CONFIG_START( tomcat, tomcat_state ) MCFG_CPU_ADD("maincpu", M68010, XTAL_12MHz / 2) MCFG_CPU_PROGRAM_MAP(tomcat_map) - MCFG_CPU_PERIODIC_INT(irq1_line_assert, 5*60) - //MCFG_CPU_PERIODIC_INT(irq1_line_assert, (double)XTAL_12MHz / 16 / 16 / 16 / 12) + MCFG_CPU_PERIODIC_INT_DRIVER(tomcat_state, irq1_line_assert, 5*60) + //MCFG_CPU_PERIODIC_INT_DRIVER(tomcat_state, irq1_line_assert, (double)XTAL_12MHz / 16 / 16 / 16 / 12) MCFG_CPU_ADD("dsp", TMS32010, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP( dsp_map) diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c index ca726e20ae3..ada448adf9d 100644 --- a/src/mame/drivers/topspeed.c +++ b/src/mame/drivers/topspeed.c @@ -337,18 +337,18 @@ static TIMER_CALLBACK( topspeed_cpub_interrupt6 ) } -static INTERRUPT_GEN( topspeed_interrupt ) +INTERRUPT_GEN_MEMBER(topspeed_state::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->execute().set_input_line(5, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(200000 - 500), FUNC(topspeed_interrupt6)); + device.execute().set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( topspeed_cpub_interrupt ) +INTERRUPT_GEN_MEMBER(topspeed_state::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->execute().set_input_line(5, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(200000 - 500), FUNC(topspeed_cpub_interrupt6)); + device.execute().set_input_line(5, HOLD_LINE); } @@ -751,14 +751,14 @@ static MACHINE_CONFIG_START( topspeed, topspeed_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(topspeed_map) - MCFG_CPU_VBLANK_INT("screen", topspeed_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", topspeed_state, topspeed_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz / 4) MCFG_CPU_PROGRAM_MAP(z80_map) MCFG_CPU_ADD("subcpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(topspeed_cpub_map) - MCFG_CPU_VBLANK_INT("screen", topspeed_cpub_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", topspeed_state, topspeed_cpub_interrupt) MCFG_TC0220IOC_ADD("tc0220ioc", topspeed_io_intf) diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c index 4e9f95dc180..f29d1d1fa61 100644 --- a/src/mame/drivers/toratora.c +++ b/src/mame/drivers/toratora.c @@ -58,6 +58,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_toratora(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(toratora_timer); }; @@ -150,23 +151,22 @@ WRITE_LINE_MEMBER(toratora_state::main_cpu_irq) } -static INTERRUPT_GEN( toratora_timer ) +INTERRUPT_GEN_MEMBER(toratora_state::toratora_timer) { - toratora_state *state = device->machine().driver_data(); - state->m_timer++; /* timer counting at 16 Hz */ + m_timer++; /* timer counting at 16 Hz */ /* also, when the timer overflows (16 seconds) watchdog would kick in */ - if (state->m_timer & 0x100) + if (m_timer & 0x100) popmessage("watchdog!"); - if (state->m_last != (state->ioport("INPUT")->read() & 0x0f)) + if (m_last != (ioport("INPUT")->read() & 0x0f)) { - state->m_last = state->ioport("INPUT")->read() & 0x0f; - generic_pulse_irq_line(device, 0, 1); + m_last = ioport("INPUT")->read() & 0x0f; + generic_pulse_irq_line(device.execute(), 0, 1); } - state->m_pia_u1->set_a_input(device->machine().root_device().ioport("INPUT")->read() & 0x0f, 0); - state->m_pia_u1->ca1_w(device->machine().root_device().ioport("INPUT")->read() & 0x10); - state->m_pia_u1->ca2_w(device->machine().root_device().ioport("INPUT")->read() & 0x20); + m_pia_u1->set_a_input(machine().root_device().ioport("INPUT")->read() & 0x0f, 0); + m_pia_u1->ca1_w(machine().root_device().ioport("INPUT")->read() & 0x10); + m_pia_u1->ca2_w(machine().root_device().ioport("INPUT")->read() & 0x20); } READ8_MEMBER(toratora_state::timer_r) @@ -449,7 +449,7 @@ static MACHINE_CONFIG_START( toratora, toratora_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800,500000) /* ?????? game speed is entirely controlled by this */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(toratora_timer,16) /* timer counting at 16 Hz */ + MCFG_CPU_PERIODIC_INT_DRIVER(toratora_state, toratora_timer, 16) /* timer counting at 16 Hz */ MCFG_PIA6821_ADD("pia_u1", pia_u1_intf) MCFG_PIA6821_ADD("pia_u2", pia_u2_intf) diff --git a/src/mame/drivers/toypop.c b/src/mame/drivers/toypop.c index 9510cade6ba..fe35b4858c6 100644 --- a/src/mame/drivers/toypop.c +++ b/src/mame/drivers/toypop.c @@ -99,33 +99,31 @@ static TIMER_CALLBACK( namcoio_run ) } } -static INTERRUPT_GEN( toypop_main_vblank_irq ) +INTERRUPT_GEN_MEMBER(toypop_state::toypop_main_vblank_irq) { - toypop_state *state = device->machine().driver_data(); - device_t *namcoio_0 = device->machine().device("58xx"); - device_t *namcoio_1 = device->machine().device("56xx_1"); - device_t *namcoio_2 = device->machine().device("56xx_2"); + device_t *namcoio_0 = machine().device("58xx"); + device_t *namcoio_1 = machine().device("56xx_1"); + device_t *namcoio_2 = machine().device("56xx_2"); - if(state->m_main_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_main_irq_mask) + 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)); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run)); if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */ - device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run), 1); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run), 1); if (!namcoio_read_reset_line(namcoio_2)) /* 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), 2); + machine().scheduler().timer_set(attotime::from_usec(50), FUNC(namcoio_run), 2); } -static INTERRUPT_GEN( toypop_sound_timer_irq ) +INTERRUPT_GEN_MEMBER(toypop_state::toypop_sound_timer_irq) { - toypop_state *state = device->machine().driver_data(); - if(state->m_sound_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_sound_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } WRITE8_MEMBER(toypop_state::toypop_sound_clear_w) @@ -160,11 +158,10 @@ void toypop_state::machine_reset() m_interrupt_enable_68k = 0; } -static INTERRUPT_GEN( toypop_m68000_interrupt ) +INTERRUPT_GEN_MEMBER(toypop_state::toypop_m68000_interrupt) { - toypop_state *state = device->machine().driver_data(); - if (state->m_interrupt_enable_68k) - device->execute().set_input_line(6, HOLD_LINE); + if (m_interrupt_enable_68k) + device.execute().set_input_line(6, HOLD_LINE); } WRITE16_MEMBER(toypop_state::toypop_m68000_interrupt_enable_w) @@ -549,15 +546,15 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 1536000) /* 1.536 MHz (measured on Libble Rabble board) */ MCFG_CPU_PROGRAM_MAP(liblrabl_map) - MCFG_CPU_VBLANK_INT("screen", toypop_main_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_main_vblank_irq) MCFG_CPU_ADD("audiocpu", M6809, 1536000) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_VBLANK_INT("screen", toypop_sound_timer_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_sound_timer_irq) MCFG_CPU_ADD("sub", M68000, 6144000) /* 6.144 MHz (measured on Libble Rabble board) */ MCFG_CPU_PROGRAM_MAP(m68k_map) - MCFG_CPU_VBLANK_INT("screen", toypop_m68000_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_m68000_interrupt) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index 4b0fbec9f92..7a25028e9b4 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -278,12 +278,11 @@ static GFXDECODE_START( tp84 ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 64*4*8, 16*8 ) GFXDECODE_END -static INTERRUPT_GEN( sub_vblank_irq ) +INTERRUPT_GEN_MEMBER(tp84_state::sub_vblank_irq) { - tp84_state *state = device->machine().driver_data(); - if(state->m_sub_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_sub_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -309,11 +308,11 @@ static MACHINE_CONFIG_START( tp84, tp84_state ) /* basic machine hardware */ MCFG_CPU_ADD("cpu1",M6809, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(tp84_cpu1_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tp84_state, irq0_line_hold) MCFG_CPU_ADD("sub", M6809, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu2_map) - MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tp84_state, sub_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,XTAL_14_31818MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(audio_map) diff --git a/src/mame/drivers/trackfld.c b/src/mame/drivers/trackfld.c index 12cef41fa1a..2cc1ed56513 100644 --- a/src/mame/drivers/trackfld.c +++ b/src/mame/drivers/trackfld.c @@ -883,20 +883,18 @@ MACHINE_RESET_MEMBER(trackfld_state,trackfld) m_old_gfx_bank = 0; } -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(trackfld_state::vblank_irq) { - trackfld_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } -static INTERRUPT_GEN( vblank_nmi ) +INTERRUPT_GEN_MEMBER(trackfld_state::vblank_nmi) { - trackfld_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_irq_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } //------------------------------------------------- @@ -913,7 +911,7 @@ static MACHINE_CONFIG_START( trackfld, trackfld_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/6/2) /* a guess for now */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", trackfld_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK/4) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -953,12 +951,11 @@ static MACHINE_CONFIG_START( trackfld, trackfld_state ) MACHINE_CONFIG_END -static INTERRUPT_GEN( yieartf_timer_irq ) +INTERRUPT_GEN_MEMBER(trackfld_state::yieartf_timer_irq) { - trackfld_state *state = device->machine().driver_data(); - if (state->m_yieartf_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_yieartf_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( yieartf, trackfld_state ) @@ -966,8 +963,8 @@ static MACHINE_CONFIG_START( yieartf, trackfld_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/6/2) /* a guess for now */ MCFG_CPU_PROGRAM_MAP(yieartf_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) - MCFG_CPU_PERIODIC_INT(yieartf_timer_irq,480) + MCFG_CPU_VBLANK_INT_DRIVER("screen", trackfld_state, vblank_irq) + MCFG_CPU_PERIODIC_INT_DRIVER(trackfld_state, yieartf_timer_irq, 480) // z80 isn't used // MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK/4) @@ -1041,7 +1038,7 @@ static MACHINE_CONFIG_DERIVED( wizzquiz, trackfld ) // right cpu? MCFG_CPU_REPLACE("maincpu",M6800,2048000) /* 1.400 MHz ??? */ MCFG_CPU_PROGRAM_MAP(wizzquiz_map) - MCFG_CPU_VBLANK_INT("screen", vblank_nmi) + MCFG_CPU_VBLANK_INT_DRIVER("screen", trackfld_state, vblank_nmi) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( reaktor, trackfld ) @@ -1050,7 +1047,7 @@ static MACHINE_CONFIG_DERIVED( reaktor, trackfld ) MCFG_CPU_REPLACE("maincpu",Z80,MASTER_CLOCK/6) MCFG_CPU_PROGRAM_MAP(reaktor_map) MCFG_CPU_IO_MAP(reaktor_io_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", trackfld_state, vblank_irq) MACHINE_CONFIG_END diff --git a/src/mame/drivers/travrusa.c b/src/mame/drivers/travrusa.c index bd015c1d9bd..f5649d1dc20 100644 --- a/src/mame/drivers/travrusa.c +++ b/src/mame/drivers/travrusa.c @@ -301,7 +301,7 @@ static MACHINE_CONFIG_START( travrusa, travrusa_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", travrusa_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/triplhnt.c b/src/mame/drivers/triplhnt.c index ac4531147cc..af61ba1d6cb 100644 --- a/src/mame/drivers/triplhnt.c +++ b/src/mame/drivers/triplhnt.c @@ -311,7 +311,7 @@ static MACHINE_CONFIG_START( triplhnt, triplhnt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800, 800000) MCFG_CPU_PROGRAM_MAP(triplhnt_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", triplhnt_state, irq0_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/truco.c b/src/mame/drivers/truco.c index b5f391ca4b1..c43d835537c 100644 --- a/src/mame/drivers/truco.c +++ b/src/mame/drivers/truco.c @@ -389,20 +389,19 @@ void truco_state::machine_reset() m_battery_ram[0x020] = m_battery_ram[0x011]; } -static INTERRUPT_GEN( truco_interrupt ) +INTERRUPT_GEN_MEMBER(truco_state::truco_interrupt) { - truco_state *state = device->machine().driver_data(); /* coinup */ - if ( state->ioport("COIN")->read() & 1 ) + if ( ioport("COIN")->read() & 1 ) { - if ( state->m_trigger == 0 ) + if ( m_trigger == 0 ) { - generic_pulse_irq_line(device, M6809_IRQ_LINE, 1); - state->m_trigger++; + generic_pulse_irq_line(device.execute(), M6809_IRQ_LINE, 1); + m_trigger++; } } else - state->m_trigger = 0; + m_trigger = 0; } @@ -457,7 +456,7 @@ static MACHINE_CONFIG_START( truco, truco_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", truco_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", truco_state, truco_interrupt) MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(1.6)) /* 1.6 seconds */ MCFG_PIA6821_ADD("pia0", pia0_intf) diff --git a/src/mame/drivers/trucocl.c b/src/mame/drivers/trucocl.c index 24ee5c4643d..a25d32d51b0 100644 --- a/src/mame/drivers/trucocl.c +++ b/src/mame/drivers/trucocl.c @@ -122,12 +122,11 @@ static GFXDECODE_START( trucocl ) GFXDECODE_ENTRY( "gfx1", 0x10000, tilelayout, 0, 2 ) GFXDECODE_END -static INTERRUPT_GEN( trucocl_interrupt ) +INTERRUPT_GEN_MEMBER(trucocl_state::trucocl_interrupt) { - trucocl_state *state = device->machine().driver_data(); - if(state->m_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -135,7 +134,7 @@ static MACHINE_CONFIG_START( trucocl, trucocl_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 18432000/6) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", trucocl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", trucocl_state, trucocl_interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/trvmadns.c b/src/mame/drivers/trvmadns.c index 7a56da2c4ce..13f97765c9a 100644 --- a/src/mame/drivers/trvmadns.c +++ b/src/mame/drivers/trvmadns.c @@ -347,7 +347,7 @@ static MACHINE_CONFIG_START( trvmadns, trvmadns_state ) MCFG_CPU_ADD("maincpu", Z80,10000000/2) // ? MCFG_CPU_PROGRAM_MAP(cpu_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", trvmadns_state, nmi_line_pulse) /* video hardware */ diff --git a/src/mame/drivers/trvquest.c b/src/mame/drivers/trvquest.c index 9dc327f340a..b1b6d0f5a4f 100644 --- a/src/mame/drivers/trvquest.c +++ b/src/mame/drivers/trvquest.c @@ -204,18 +204,17 @@ MACHINE_RESET_MEMBER(gameplan_state,trvquest) m_video_data = 0; } -static INTERRUPT_GEN( trvquest_interrupt ) +INTERRUPT_GEN_MEMBER(gameplan_state::trvquest_interrupt) { - gameplan_state *state = device->machine().driver_data(); - state->m_via_2->write_ca1(1); - state->m_via_2->write_ca1(0); + m_via_2->write_ca1(1); + m_via_2->write_ca1(0); } static MACHINE_CONFIG_START( trvquest, gameplan_state ) MCFG_CPU_ADD("maincpu", M6809,XTAL_6MHz/4) MCFG_CPU_PROGRAM_MAP(cpu_map) - MCFG_CPU_VBLANK_INT("screen", trvquest_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", gameplan_state, trvquest_interrupt) MCFG_NVRAM_ADD_1FILL("nvram") MCFG_MACHINE_START_OVERRIDE(gameplan_state,trvquest) diff --git a/src/mame/drivers/tryout.c b/src/mame/drivers/tryout.c index 496d247bc5b..5125634aaf1 100644 --- a/src/mame/drivers/tryout.c +++ b/src/mame/drivers/tryout.c @@ -192,7 +192,7 @@ static MACHINE_CONFIG_START( tryout, tryout_state ) MCFG_CPU_ADD("audiocpu", M6502, 1500000) /* ? */ MCFG_CPU_PROGRAM_MAP(sound_cpu) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,1000) /* controls BGM tempo, 1000 is an hand-tuned value to match a side-by-side video */ + MCFG_CPU_PERIODIC_INT_DRIVER(tryout_state, nmi_line_pulse, 1000) /* controls BGM tempo, 1000 is an hand-tuned value to match a side-by-side video */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tsamurai.c b/src/mame/drivers/tsamurai.c index 4dfffd946a2..321cfdad134 100644 --- a/src/mame/drivers/tsamurai.c +++ b/src/mame/drivers/tsamurai.c @@ -46,10 +46,9 @@ WRITE8_MEMBER(tsamurai_state::nmi_enable_w) m_nmi_enabled = data; } -static INTERRUPT_GEN( samurai_interrupt ) +INTERRUPT_GEN_MEMBER(tsamurai_state::samurai_interrupt) { - tsamurai_state *state = device->machine().driver_data(); - if (state->m_nmi_enabled) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_nmi_enabled) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } READ8_MEMBER(tsamurai_state::unknown_d803_r) @@ -267,10 +266,9 @@ WRITE8_MEMBER(tsamurai_state::vsgongf_sound_nmi_enable_w) m_vsgongf_sound_nmi_enabled = data; } -static INTERRUPT_GEN( vsgongf_sound_interrupt ) +INTERRUPT_GEN_MEMBER(tsamurai_state::vsgongf_sound_interrupt) { - tsamurai_state *state = device->machine().driver_data(); - if (state->m_vsgongf_sound_nmi_enabled) device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_vsgongf_sound_nmi_enabled) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } /* what are these, protection of some kind? */ @@ -682,7 +680,7 @@ static MACHINE_CONFIG_START( tsamurai, tsamurai_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(z80_io_map) - MCFG_CPU_VBLANK_INT("screen", samurai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, samurai_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) MCFG_CPU_PROGRAM_MAP(sound1_map) @@ -723,12 +721,12 @@ static MACHINE_CONFIG_START( vsgongf, tsamurai_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) MCFG_CPU_PROGRAM_MAP(vsgongf_map) - MCFG_CPU_VBLANK_INT("screen", samurai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, samurai_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) MCFG_CPU_PROGRAM_MAP(sound_vsgongf_map) MCFG_CPU_IO_MAP(vsgongf_audio_io_map) - MCFG_CPU_PERIODIC_INT(vsgongf_sound_interrupt,3*60) + MCFG_CPU_PERIODIC_INT_DRIVER(tsamurai_state, vsgongf_sound_interrupt, 3*60) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -761,7 +759,7 @@ static MACHINE_CONFIG_START( m660, tsamurai_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) MCFG_CPU_PROGRAM_MAP(m660_map) MCFG_CPU_IO_MAP(z80_m660_io_map) - MCFG_CPU_VBLANK_INT("screen", samurai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, samurai_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) MCFG_CPU_PROGRAM_MAP(sound1_m660_map) @@ -772,7 +770,7 @@ static MACHINE_CONFIG_START( m660, tsamurai_state ) MCFG_CPU_ADD("audio3", Z80, XTAL_24MHz/8) MCFG_CPU_PROGRAM_MAP(sound3_m660_map) MCFG_CPU_IO_MAP(sound3_m660_io_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, nmi_line_pulse) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 0bddc8cbf31..90edfae741b 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -85,6 +85,7 @@ public: virtual void video_start(); UINT32 screen_update_ttchamp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ttchamp_irq); }; @@ -269,9 +270,9 @@ static INPUT_PORTS_START(ttchamp) INPUT_PORTS_END -static INTERRUPT_GEN( ttchamp_irq ) /* right? */ +INTERRUPT_GEN_MEMBER(ttchamp_state::ttchamp_irq)/* right? */ { - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( ttchamp, ttchamp_state ) @@ -279,7 +280,7 @@ static MACHINE_CONFIG_START( ttchamp, ttchamp_state ) MCFG_CPU_ADD("maincpu", V30, 8000000) MCFG_CPU_PROGRAM_MAP(ttchamp_map) MCFG_CPU_IO_MAP(ttchamp_io) - MCFG_CPU_VBLANK_INT("screen", ttchamp_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ttchamp_state, ttchamp_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tubep.c b/src/mame/drivers/tubep.c index d0fa497f3ff..af02ecf00c2 100644 --- a/src/mame/drivers/tubep.c +++ b/src/mame/drivers/tubep.c @@ -942,7 +942,7 @@ static MACHINE_CONFIG_DERIVED( tubepb, tubep ) MCFG_CPU_REPLACE("mcu", M6802,6000000) /* ? MHz Xtal */ MCFG_CPU_PROGRAM_MAP(nsc_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tubep_state, nmi_line_pulse) MACHINE_CONFIG_END diff --git a/src/mame/drivers/tugboat.c b/src/mame/drivers/tugboat.c index 1599238169e..91aadc3143f 100644 --- a/src/mame/drivers/tugboat.c +++ b/src/mame/drivers/tugboat.c @@ -333,7 +333,7 @@ GFXDECODE_END static MACHINE_CONFIG_START( tugboat, tugboat_state ) MCFG_CPU_ADD("maincpu", M6502, 2000000) /* 2 MHz ???? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tugboat_state, nmi_line_pulse) MCFG_PIA6821_ADD("pia0", pia0_intf) diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c index c6d76c0372d..2a691ad504b 100644 --- a/src/mame/drivers/tumbleb.c +++ b/src/mame/drivers/tumbleb.c @@ -439,11 +439,10 @@ static void tumbleb2_playmusic( device_t *device ) } -static INTERRUPT_GEN( tumbleb2_interrupt ) +INTERRUPT_GEN_MEMBER(tumbleb_state::tumbleb2_interrupt) { - tumbleb_state *state = device->machine().driver_data(); - device->execute().set_input_line(6, HOLD_LINE); - tumbleb2_playmusic(state->m_oki); + device.execute().set_input_line(6, HOLD_LINE); + tumbleb2_playmusic(m_oki); } static const int tumbleb_sound_lookup[256] = { @@ -1977,7 +1976,7 @@ static MACHINE_CONFIG_START( tumblepb, tumbleb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(tumblepopb_main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold) MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb) MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb) @@ -2012,7 +2011,7 @@ static MACHINE_CONFIG_START( tumbleb2, tumbleb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(tumblepopb_main_map) - MCFG_CPU_VBLANK_INT("screen", tumbleb2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tumbleb_state, tumbleb2_interrupt) MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb) MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb) @@ -2046,7 +2045,7 @@ static MACHINE_CONFIG_START( jumpkids, tumbleb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(jumpkids_main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold) /* z80? */ MCFG_CPU_ADD("audiocpu", Z80, 8000000/2) @@ -2084,7 +2083,7 @@ static MACHINE_CONFIG_START( fncywld, tumbleb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(fncywld_main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold) MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb) MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb) @@ -2151,7 +2150,7 @@ static MACHINE_CONFIG_START( htchctch, tumbleb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 15000000) /* verified */ MCFG_CPU_PROGRAM_MAP(htchctch_main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 15000000/4) /* verified on dquizgo */ MCFG_CPU_PROGRAM_MAP(semicom_sound_map) @@ -2244,7 +2243,7 @@ static MACHINE_CONFIG_START( suprtrio, tumbleb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) /* 14mhz should be correct, but lots of sprite flicker later in game */ MCFG_CPU_PROGRAM_MAP(suprtrio_main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(suprtrio_sound_map) @@ -2282,7 +2281,7 @@ static MACHINE_CONFIG_START( pangpang, tumbleb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(pangpang_main_map) - MCFG_CPU_VBLANK_INT("screen", tumbleb2_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tumbleb_state, tumbleb2_interrupt) MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb) MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb) diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c index b2fea7b8a82..05efbf66a7f 100644 --- a/src/mame/drivers/tumblep.c +++ b/src/mame/drivers/tumblep.c @@ -307,7 +307,7 @@ static MACHINE_CONFIG_START( tumblep, tumblep_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 14000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tumblep_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", H6280, 32220000/8) /* Custom chip 45; Audio section crystal is 32.220 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/tunhunt.c b/src/mame/drivers/tunhunt.c index 04b1e49d617..17329659a38 100644 --- a/src/mame/drivers/tunhunt.c +++ b/src/mame/drivers/tunhunt.c @@ -297,7 +297,7 @@ static MACHINE_CONFIG_START( tunhunt, tunhunt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, XTAL_12_096MHz/6) /* ??? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60) /* 48V, 112V, 176V, 240V */ + MCFG_CPU_PERIODIC_INT_DRIVER(tunhunt_state, irq0_line_hold, 4*60) /* 48V, 112V, 176V, 240V */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/turbo.c b/src/mame/drivers/turbo.c index d1c6d9f182e..a0fb273af39 100644 --- a/src/mame/drivers/turbo.c +++ b/src/mame/drivers/turbo.c @@ -930,7 +930,7 @@ static MACHINE_CONFIG_START( turbo, turbo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(turbo_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", turbo_state, irq0_line_hold) MCFG_I8255_ADD( "i8255_0", turbo_8255_intf_0 ) MCFG_I8255_ADD( "i8255_1", turbo_8255_intf_1 ) @@ -961,7 +961,7 @@ static MACHINE_CONFIG_START( subroc3d, turbo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(subroc3d_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", turbo_state, irq0_line_hold) MCFG_I8255_ADD( "i8255_0", subroc3d_8255_intf_0 ) MCFG_I8255_ADD( "i8255_1", subroc3d_8255_intf_1 ) @@ -990,7 +990,7 @@ static MACHINE_CONFIG_START( buckrog, turbo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(buckrog_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", turbo_state, irq0_line_hold) MCFG_CPU_ADD("subcpu", Z80, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(buckrog_cpu2_map) diff --git a/src/mame/drivers/tutankhm.c b/src/mame/drivers/tutankhm.c index 98752cc6870..a7c460b3f96 100644 --- a/src/mame/drivers/tutankhm.c +++ b/src/mame/drivers/tutankhm.c @@ -61,14 +61,13 @@ * *************************************/ -static INTERRUPT_GEN( tutankhm_interrupt ) +INTERRUPT_GEN_MEMBER(tutankhm_state::tutankhm_interrupt) { - tutankhm_state *state = device->machine().driver_data(); /* 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->execute().set_input_line(0, ASSERT_LINE); + m_irq_toggle ^= 1; + if (m_irq_toggle && m_irq_enable) + device.execute().set_input_line(0, ASSERT_LINE); } @@ -221,7 +220,7 @@ static MACHINE_CONFIG_START( tutankhm, tutankhm_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, XTAL_18_432MHz/12) /* 1.5 MHz ??? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", tutankhm_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", tutankhm_state, tutankhm_interrupt) MCFG_MACHINE_START_OVERRIDE(tutankhm_state,tutankhm) MCFG_MACHINE_RESET_OVERRIDE(tutankhm_state,tutankhm) diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c index 97d1d8b7248..4fe506c5158 100644 --- a/src/mame/drivers/twin16.c +++ b/src/mame/drivers/twin16.c @@ -55,8 +55,8 @@ Known Issues: -#define CPUA_IRQ_ENABLE (state->m_CPUA_register & 0x20) -#define CPUB_IRQ_ENABLE (state->m_CPUB_register & 0x02) +#define CPUA_IRQ_ENABLE (m_CPUA_register & 0x20) +#define CPUB_IRQ_ENABLE (m_CPUB_register & 0x02) @@ -685,16 +685,14 @@ static const k007232_interface k007232_config = /* Interrupt Generators */ -static INTERRUPT_GEN( CPUA_interrupt ) +INTERRUPT_GEN_MEMBER(twin16_state::CPUA_interrupt) { - twin16_state *state = device->machine().driver_data(); - if (CPUA_IRQ_ENABLE) device->execute().set_input_line(5, HOLD_LINE); + if (CPUA_IRQ_ENABLE) device.execute().set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( CPUB_interrupt ) +INTERRUPT_GEN_MEMBER(twin16_state::CPUB_interrupt) { - twin16_state *state = device->machine().driver_data(); - if (CPUB_IRQ_ENABLE) device->execute().set_input_line(5, HOLD_LINE); + if (CPUB_IRQ_ENABLE) device.execute().set_input_line(5, HOLD_LINE); } /* Machine Drivers */ @@ -722,11 +720,11 @@ static MACHINE_CONFIG_START( twin16, twin16_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", M68000, XTAL_18_432MHz/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", CPUA_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", twin16_state, CPUA_interrupt) MCFG_CPU_ADD("sub", M68000, XTAL_18_432MHz/2) MCFG_CPU_PROGRAM_MAP(sub_map) - MCFG_CPU_VBLANK_INT("screen", CPUB_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", twin16_state, CPUB_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -780,7 +778,7 @@ static MACHINE_CONFIG_START( fround, twin16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) MCFG_CPU_PROGRAM_MAP(fround_map) - MCFG_CPU_VBLANK_INT("screen", CPUA_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", twin16_state, CPUA_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 3579545) MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/twincobr.c b/src/mame/drivers/twincobr.c index 4beb33507d9..81c7ba473f7 100644 --- a/src/mame/drivers/twincobr.c +++ b/src/mame/drivers/twincobr.c @@ -564,7 +564,7 @@ static MACHINE_CONFIG_START( twincobr, twincobr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz/4) /* 7MHz - Main board Crystal is 28MHz */ MCFG_CPU_PROGRAM_MAP(main_program_map) - MCFG_CPU_VBLANK_INT("screen", twincobr_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", twincobr_state, twincobr_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_28MHz/8) /* 3.5MHz */ MCFG_CPU_PROGRAM_MAP(sound_program_map) diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c index 2c263f3c2fb..8f56e810e26 100644 --- a/src/mame/drivers/twins.c +++ b/src/mame/drivers/twins.c @@ -193,7 +193,7 @@ static MACHINE_CONFIG_START( twins, twins_state ) MCFG_CPU_ADD("maincpu", V30, 8000000) MCFG_CPU_PROGRAM_MAP(twins_map) MCFG_CPU_IO_MAP(twins_io) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", twins_state, nmi_line_pulse) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -281,7 +281,7 @@ static MACHINE_CONFIG_START( twinsa, twins_state ) MCFG_CPU_ADD("maincpu", V30, XTAL_16MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(twins_map) MCFG_CPU_IO_MAP(twinsa_io) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", twins_state, nmi_line_pulse) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tx1.c b/src/mame/drivers/tx1.c index 29127218b86..fe632937824 100644 --- a/src/mame/drivers/tx1.c +++ b/src/mame/drivers/tx1.c @@ -81,9 +81,9 @@ WRITE8_MEMBER(tx1_state::z80_intreq_w) } /* Periodic Z80 interrupt */ -static INTERRUPT_GEN( z80_irq ) +INTERRUPT_GEN_MEMBER(tx1_state::z80_irq) { - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } READ16_MEMBER(tx1_state::z80_shared_r) @@ -701,7 +701,7 @@ static MACHINE_CONFIG_START( tx1, tx1_state ) MCFG_CPU_ADD("audio_cpu", Z80, TX1_PIXEL_CLOCK / 2) MCFG_CPU_PROGRAM_MAP(tx1_sound_prg) MCFG_CPU_IO_MAP(tx1_sound_io) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, TX1_PIXEL_CLOCK / 4 / 2048 / 2) + MCFG_CPU_PERIODIC_INT_DRIVER(tx1_state, irq0_line_hold, TX1_PIXEL_CLOCK / 4 / 2048 / 2) MCFG_MACHINE_RESET_OVERRIDE(tx1_state,tx1) MCFG_NVRAM_ADD_0FILL("nvram") @@ -753,7 +753,7 @@ static MACHINE_CONFIG_START( buggyboy, tx1_state ) MCFG_CPU_ADD("audio_cpu", Z80, BUGGYBOY_ZCLK / 2) MCFG_CPU_PROGRAM_MAP(buggyboy_sound_prg) - MCFG_CPU_PERIODIC_INT(z80_irq, BUGGYBOY_ZCLK / 2 / 4 / 2048) + MCFG_CPU_PERIODIC_INT_DRIVER(tx1_state, z80_irq, BUGGYBOY_ZCLK / 2 / 4 / 2048) MCFG_CPU_IO_MAP(buggyboy_sound_io) MCFG_MACHINE_RESET_OVERRIDE(tx1_state,buggyboy) @@ -808,7 +808,7 @@ static MACHINE_CONFIG_START( buggybjr, tx1_state ) MCFG_CPU_ADD("audio_cpu", Z80, BUGGYBOY_ZCLK / 2) MCFG_CPU_PROGRAM_MAP(buggybjr_sound_prg) MCFG_CPU_IO_MAP(buggyboy_sound_io) - MCFG_CPU_PERIODIC_INT(z80_irq, BUGGYBOY_ZCLK / 2 / 4 / 2048) + MCFG_CPU_PERIODIC_INT_DRIVER(tx1_state, z80_irq, BUGGYBOY_ZCLK / 2 / 4 / 2048) MCFG_MACHINE_RESET_OVERRIDE(tx1_state,buggyboy) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/ultraman.c b/src/mame/drivers/ultraman.c index 248b0030b18..6a5194a5780 100644 --- a/src/mame/drivers/ultraman.c +++ b/src/mame/drivers/ultraman.c @@ -218,7 +218,7 @@ static MACHINE_CONFIG_START( ultraman, ultraman_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ultraman_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,24000000/6) /* 4 MHz? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c index 422f1851d92..2e84c1fdef7 100644 --- a/src/mame/drivers/ultrsprt.c +++ b/src/mame/drivers/ultrsprt.c @@ -36,6 +36,7 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(analog_ctrl_r); virtual void machine_start(); UINT32 screen_update_ultrsprt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ultrsprt_vblank); }; @@ -203,9 +204,9 @@ static INPUT_PORTS_START( ultrsprt ) INPUT_PORTS_END -static INTERRUPT_GEN( ultrsprt_vblank ) +INTERRUPT_GEN_MEMBER(ultrsprt_state::ultrsprt_vblank) { - device->execute().set_input_line(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) @@ -227,11 +228,11 @@ static MACHINE_CONFIG_START( ultrsprt, ultrsprt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", PPC403GA, 25000000) /* PowerPC 403GA 25MHz */ MCFG_CPU_PROGRAM_MAP(ultrsprt_map) - MCFG_CPU_VBLANK_INT("screen", ultrsprt_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ultrsprt_state, ultrsprt_vblank) MCFG_CPU_ADD("audiocpu", M68000, 8000000) /* Not sure about the frequency */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq5_line_hold, 1) // ??? + MCFG_CPU_PERIODIC_INT_DRIVER(ultrsprt_state, irq5_line_hold, 1) // ??? MCFG_QUANTUM_TIME(attotime::from_hz(12000)) diff --git a/src/mame/drivers/umipoker.c b/src/mame/drivers/umipoker.c index 30ab41f92f3..62087881983 100644 --- a/src/mame/drivers/umipoker.c +++ b/src/mame/drivers/umipoker.c @@ -662,12 +662,12 @@ static MACHINE_CONFIG_START( umipoker, umipoker_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000,16000000) // TMP68HC000-16 MCFG_CPU_PROGRAM_MAP(umipoker_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", umipoker_state, irq6_line_assert) MCFG_CPU_ADD("audiocpu",Z80,4000000) MCFG_CPU_PROGRAM_MAP(umipoker_audio_map) MCFG_CPU_IO_MAP(umipoker_audio_io_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, 120) // ? controls ym3812 music tempo + MCFG_CPU_PERIODIC_INT_DRIVER(umipoker_state, irq0_line_hold, 120) // ? controls ym3812 music tempo MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c index 28bbd182751..2eaa3f8e1ff 100644 --- a/src/mame/drivers/undrfire.c +++ b/src/mame/drivers/undrfire.c @@ -697,11 +697,10 @@ GFXDECODE_END MACHINE DRIVERS ***********************************************************/ -static INTERRUPT_GEN( undrfire_interrupt ) +INTERRUPT_GEN_MEMBER(undrfire_state::undrfire_interrupt) { - undrfire_state *state = device->machine().driver_data(); - state->m_frame_counter ^= 1; - device->execute().set_input_line(4, HOLD_LINE); + m_frame_counter ^= 1; + device.execute().set_input_line(4, HOLD_LINE); } static const tc0100scn_interface undrfire_tc0100scn_intf = @@ -729,7 +728,7 @@ static MACHINE_CONFIG_START( undrfire, undrfire_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(undrfire_map) - MCFG_CPU_VBLANK_INT("screen", undrfire_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", undrfire_state, undrfire_interrupt) MCFG_EEPROM_ADD("eeprom", undrfire_eeprom_interface) @@ -758,11 +757,11 @@ static MACHINE_CONFIG_START( cbombers, undrfire_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(cbombers_cpua_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", undrfire_state, irq4_line_hold) MCFG_CPU_ADD("sub", M68000, 16000000) /* 16 MHz */ MCFG_CPU_PROGRAM_MAP(cbombers_cpub_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", undrfire_state, irq4_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(480)) /* CPU slices - Need to interleave Cpu's 1 & 3 */ diff --git a/src/mame/drivers/unico.c b/src/mame/drivers/unico.c index 524a95ab11d..976de93346e 100644 --- a/src/mame/drivers/unico.c +++ b/src/mame/drivers/unico.c @@ -593,7 +593,7 @@ static MACHINE_CONFIG_START( burglarx, unico_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(burglarx_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", unico_state, irq2_line_hold) MCFG_MACHINE_RESET_OVERRIDE(unico_state,unico) @@ -638,7 +638,7 @@ static MACHINE_CONFIG_START( zeropnt, unico_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(zeropnt_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", unico_state, irq2_line_hold) MCFG_MACHINE_RESET_OVERRIDE(unico_state,zeropt) @@ -678,7 +678,7 @@ static MACHINE_CONFIG_START( zeropnt2, unico_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68EC020, 16000000) MCFG_CPU_PROGRAM_MAP(zeropnt2_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", unico_state, irq2_line_hold) MCFG_MACHINE_RESET_OVERRIDE(unico_state,zeropt) diff --git a/src/mame/drivers/unkhorse.c b/src/mame/drivers/unkhorse.c index 54dfd8da620..bd1d7bc3df8 100644 --- a/src/mame/drivers/unkhorse.c +++ b/src/mame/drivers/unkhorse.c @@ -40,6 +40,7 @@ public: DECLARE_WRITE_LINE_MEMBER(horse_timer_out); virtual void palette_init(); UINT32 screen_update_horse(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(horse_interrupt); }; @@ -191,10 +192,10 @@ INPUT_PORTS_END ***************************************************************************/ -static INTERRUPT_GEN( horse_interrupt ) +INTERRUPT_GEN_MEMBER(horse_state::horse_interrupt) { - device->execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE); - device->execute().set_input_line(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 ) @@ -202,7 +203,7 @@ static MACHINE_CONFIG_START( horse, horse_state ) MCFG_CPU_ADD("maincpu", I8085A, XTAL_12MHz / 2) MCFG_CPU_PROGRAM_MAP(horse_map) MCFG_CPU_IO_MAP(horse_io_map) - MCFG_CPU_VBLANK_INT("screen", horse_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", horse_state, horse_interrupt) MCFG_I8155_ADD("i8155", XTAL_12MHz / 2, i8155_intf) diff --git a/src/mame/drivers/usgames.c b/src/mame/drivers/usgames.c index 030cd638681..4553edf46ff 100644 --- a/src/mame/drivers/usgames.c +++ b/src/mame/drivers/usgames.c @@ -234,7 +234,7 @@ static MACHINE_CONFIG_START( usg32, usgames_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2000000) /* ?? */ MCFG_CPU_PROGRAM_MAP(usgames_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,5*60) /* ?? */ + MCFG_CPU_PERIODIC_INT_DRIVER(usgames_state, irq0_line_hold, 5*60) /* ?? */ MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index 97f96c1bcdc..de8ac6e1ac2 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -985,7 +985,7 @@ static QS1000_INTERFACE( qs1000_intf ) static MACHINE_CONFIG_START( common, vamphalf_state ) MCFG_CPU_ADD("maincpu", E116T, 50000000) /* 50 MHz */ MCFG_CPU_PROGRAM_MAP(common_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") @@ -1045,7 +1045,7 @@ static MACHINE_CONFIG_DERIVED( misncrft, common ) MCFG_CPU_REPLACE("maincpu", GMS30C2116, 50000000) /* 50 MHz */ MCFG_CPU_PROGRAM_MAP(common_map) MCFG_CPU_IO_MAP(misncrft_io) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold) MCFG_FRAGMENT_ADD(sound_qs1000) MACHINE_CONFIG_END @@ -1076,7 +1076,7 @@ static MACHINE_CONFIG_DERIVED( mrdig, common ) MCFG_CPU_PROGRAM_MAP(common_map) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(mrdig_io) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold) MCFG_FRAGMENT_ADD(sound_ym_oki) MACHINE_CONFIG_END @@ -1085,7 +1085,7 @@ static MACHINE_CONFIG_DERIVED( wyvernwg, common ) MCFG_CPU_REPLACE("maincpu", E132T, 50000000) /* 50 MHz */ MCFG_CPU_PROGRAM_MAP(common_32bit_map) MCFG_CPU_IO_MAP(wyvernwg_io) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold) MCFG_FRAGMENT_ADD(sound_qs1000) MACHINE_CONFIG_END @@ -1094,7 +1094,7 @@ static MACHINE_CONFIG_DERIVED( finalgdr, common ) MCFG_CPU_REPLACE("maincpu", E132T, 50000000) /* 50 MHz */ MCFG_CPU_PROGRAM_MAP(common_32bit_map) MCFG_CPU_IO_MAP(finalgdr_io) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1105,7 +1105,7 @@ static MACHINE_CONFIG_DERIVED( mrkicker, common ) MCFG_CPU_REPLACE("maincpu", E132T, 50000000) /* 50 MHz */ MCFG_CPU_PROGRAM_MAP(common_32bit_map) MCFG_CPU_IO_MAP(mrkicker_io) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1116,7 +1116,7 @@ static MACHINE_CONFIG_START( aoh, vamphalf_state ) MCFG_CPU_ADD("maincpu", E132XN, 20000000*4) /* 4x internal multiplier */ MCFG_CPU_PROGRAM_MAP(aoh_map) MCFG_CPU_IO_MAP(aoh_io) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold) MCFG_EEPROM_93C46_ADD("eeprom") diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c index 2fc18a31de6..72d6cef1cee 100644 --- a/src/mame/drivers/vaportra.c +++ b/src/mame/drivers/vaportra.c @@ -264,7 +264,7 @@ static MACHINE_CONFIG_START( vaportra, vaportra_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,12000000) /* Custom chip 59 */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vaportra_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", H6280, 32220000/4) /* Custom chip 45; Audio section crystal is 32.220 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/vastar.c b/src/mame/drivers/vastar.c index 429901a02d3..21b2afbe0d6 100644 --- a/src/mame/drivers/vastar.c +++ b/src/mame/drivers/vastar.c @@ -289,12 +289,11 @@ static const ay8910_interface ay8910_config = DEVCB_NULL }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(vastar_state::vblank_irq) { - vastar_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static MACHINE_CONFIG_START( vastar, vastar_state ) @@ -303,12 +302,12 @@ static MACHINE_CONFIG_START( vastar, vastar_state ) MCFG_CPU_ADD("maincpu", Z80, 3072000) /* 3.072 MHz ???? */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_port_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vastar_state, vblank_irq) MCFG_CPU_ADD("sub", Z80, 3072000) /* 3.072 MHz ???? */ MCFG_CPU_PROGRAM_MAP(cpu2_map) MCFG_CPU_IO_MAP(cpu2_port_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(vastar_state, irq0_line_hold, 4*60) /* ??? */ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - seems enough to ensure proper */ /* synchronization of the CPUs */ diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c index 51d137df846..6a070fc1fe1 100644 --- a/src/mame/drivers/vcombat.c +++ b/src/mame/drivers/vcombat.c @@ -582,7 +582,7 @@ static const mc6845_interface mc6845_intf = static MACHINE_CONFIG_START( vcombat, vcombat_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vcombat_state, irq1_line_assert) /* The middle board i860 */ MCFG_CPU_ADD("vid_0", I860, XTAL_20MHz) @@ -595,7 +595,7 @@ static MACHINE_CONFIG_START( vcombat, vcombat_state ) /* Sound CPU */ MCFG_CPU_ADD("soundcpu", M68000, XTAL_12MHz) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, 15000) /* Remove this if MC6845 is enabled */ + MCFG_CPU_PERIODIC_INT_DRIVER(vcombat_state, irq1_line_hold, 15000) /* Remove this if MC6845 is enabled */ MCFG_NVRAM_ADD_0FILL("nvram") MCFG_MACHINE_RESET_OVERRIDE(vcombat_state,vcombat) @@ -630,7 +630,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( shadfgtr, vcombat_state ) MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vcombat_state, irq1_line_assert) /* The middle board i860 */ MCFG_CPU_ADD("vid_0", I860, XTAL_20MHz) diff --git a/src/mame/drivers/vega.c b/src/mame/drivers/vega.c index 653cc26c33b..7ea1b8a9488 100644 --- a/src/mame/drivers/vega.c +++ b/src/mame/drivers/vega.c @@ -842,7 +842,7 @@ static MACHINE_CONFIG_START( vega, vega_state ) MCFG_CPU_ADD("maincpu", I8035, 4000000) MCFG_CPU_PROGRAM_MAP(vega_map) MCFG_CPU_IO_MAP(vega_io_map) - MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vega_state, irq0_line_hold) diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c index 2bf27c405da..e62afacb9d0 100644 --- a/src/mame/drivers/vendetta.c +++ b/src/mame/drivers/vendetta.c @@ -404,11 +404,10 @@ INPUT_PORTS_END ***************************************************************************/ -static INTERRUPT_GEN( vendetta_irq ) +INTERRUPT_GEN_MEMBER(vendetta_state::vendetta_irq) { - vendetta_state *state = device->machine().driver_data(); - if (state->m_irq_enabled) - device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); + if (m_irq_enabled) + device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } static const k052109_interface vendetta_k052109_intf = @@ -504,7 +503,7 @@ static MACHINE_CONFIG_START( vendetta, vendetta_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", KONAMI, XTAL_24MHz/8) /* 052001 (verified on pcb) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vendetta_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vendetta_state, vendetta_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified with PCB */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/vertigo.c b/src/mame/drivers/vertigo.c index d49bbd36d45..df90ef47914 100644 --- a/src/mame/drivers/vertigo.c +++ b/src/mame/drivers/vertigo.c @@ -125,7 +125,7 @@ static MACHINE_CONFIG_START( vertigo, vertigo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(vertigo_map) - MCFG_CPU_PERIODIC_INT(vertigo_interrupt,60) + MCFG_CPU_PERIODIC_INT_DRIVER(vertigo_state, vertigo_interrupt, 60) MCFG_FRAGMENT_ADD(exidy440_audio) diff --git a/src/mame/drivers/victory.c b/src/mame/drivers/victory.c index d0956445f5f..e578ebddd72 100644 --- a/src/mame/drivers/victory.c +++ b/src/mame/drivers/victory.c @@ -214,7 +214,7 @@ static MACHINE_CONFIG_START( victory, victory_state ) MCFG_CPU_ADD("maincpu", Z80, VICTORY_MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", victory_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", victory_state, victory_vblank_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/videopkr.c b/src/mame/drivers/videopkr.c index 58615e4ba68..f916c3d7a53 100644 --- a/src/mame/drivers/videopkr.c +++ b/src/mame/drivers/videopkr.c @@ -1237,7 +1237,7 @@ static MACHINE_CONFIG_START( videopkr, videopkr_state ) MCFG_CPU_PROGRAM_MAP(i8039_map) MCFG_CPU_IO_MAP(i8039_io_port) - MCFG_CPU_VBLANK_INT("screen", irq0_line_assert) + MCFG_CPU_VBLANK_INT_DRIVER("screen", videopkr_state, irq0_line_assert) MCFG_CPU_ADD("soundcpu", I8039, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(i8039_sound_mem) diff --git a/src/mame/drivers/vigilant.c b/src/mame/drivers/vigilant.c index 69873e4831e..71848a22aea 100644 --- a/src/mame/drivers/vigilant.c +++ b/src/mame/drivers/vigilant.c @@ -483,12 +483,12 @@ static MACHINE_CONFIG_START( vigilant, vigilant_state ) MCFG_CPU_ADD("maincpu", Z80, 3579645) /* 3.579645 MHz */ MCFG_CPU_PROGRAM_MAP(vigilant_map) MCFG_CPU_IO_MAP(vigilant_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vigilant_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 3579645) /* 3.579645 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1 */ + MCFG_CPU_PERIODIC_INT_DRIVER(vigilant_state, nmi_line_pulse, 128*55) /* clocked by V1 */ /* IRQs are generated by main Z80 and YM2151 */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -523,12 +523,12 @@ static MACHINE_CONFIG_START( buccanrs, vigilant_state ) MCFG_CPU_ADD("maincpu", Z80, 5688800) /* 5.688800 MHz */ MCFG_CPU_PROGRAM_MAP(vigilant_map) MCFG_CPU_IO_MAP(vigilant_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vigilant_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 18432000/6) /* 3.072000 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(buccanrs_sound_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1 */ + MCFG_CPU_PERIODIC_INT_DRIVER(vigilant_state, nmi_line_pulse, 128*55) /* clocked by V1 */ /* IRQs are generated by main Z80 and YM2151 */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -579,12 +579,12 @@ static MACHINE_CONFIG_START( kikcubic, vigilant_state ) MCFG_CPU_ADD("maincpu", Z80, 3579645) /* 3.579645 MHz */ MCFG_CPU_PROGRAM_MAP(kikcubic_map) MCFG_CPU_IO_MAP(kikcubic_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vigilant_state, irq0_line_hold) MCFG_CPU_ADD("soundcpu", Z80, 3579645) /* 3.579645 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(sound_io_map) - MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55) /* clocked by V1 */ + MCFG_CPU_PERIODIC_INT_DRIVER(vigilant_state, nmi_line_pulse, 128*55) /* clocked by V1 */ /* IRQs are generated by main Z80 and YM2151 */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/viper.c b/src/mame/drivers/viper.c index b319aae6cc8..fee8f6a512c 100644 --- a/src/mame/drivers/viper.c +++ b/src/mame/drivers/viper.c @@ -347,6 +347,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_viper(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(viper_vblank); }; UINT32 viper_state::screen_update_viper(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) @@ -1925,10 +1926,10 @@ static const powerpc_config viper_ppc_cfg = NULL }; -static INTERRUPT_GEN(viper_vblank) +INTERRUPT_GEN_MEMBER(viper_state::viper_vblank) { - mpc8240_interrupt(device->machine(), MPC8240_IRQ0); - //mpc8240_interrupt(device->machine, MPC8240_IRQ3); + mpc8240_interrupt(machine(), MPC8240_IRQ0); + //mpc8240_interrupt(device.machine, MPC8240_IRQ3); } static void voodoo_vblank(device_t *device, int state) @@ -1993,7 +1994,7 @@ static MACHINE_CONFIG_START( viper, viper_state ) MCFG_CPU_ADD("maincpu", MPC8240, 200000000) MCFG_CPU_CONFIG(viper_ppc_cfg) MCFG_CPU_PROGRAM_MAP(viper_map) - MCFG_CPU_VBLANK_INT("screen", viper_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", viper_state, viper_vblank) MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) diff --git a/src/mame/drivers/vmetal.c b/src/mame/drivers/vmetal.c index 6856eeb65fd..0e17722c574 100644 --- a/src/mame/drivers/vmetal.c +++ b/src/mame/drivers/vmetal.c @@ -484,7 +484,7 @@ static MACHINE_CONFIG_START( varia, vmetal_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(varia_program_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) // also level 3 + MCFG_CPU_VBLANK_INT_DRIVER("screen", vmetal_state, irq1_line_hold) // also level 3 /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/volfied.c b/src/mame/drivers/volfied.c index ecefaa91114..5a0caa05107 100644 --- a/src/mame/drivers/volfied.c +++ b/src/mame/drivers/volfied.c @@ -261,7 +261,7 @@ static MACHINE_CONFIG_START( volfied, volfied_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) /* 8MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", volfied_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) /* 4MHz sound CPU, required to run the game */ MCFG_CPU_PROGRAM_MAP(z80_map) diff --git a/src/mame/drivers/vpoker.c b/src/mame/drivers/vpoker.c index 744812a5251..4fefc1af3af 100644 --- a/src/mame/drivers/vpoker.c +++ b/src/mame/drivers/vpoker.c @@ -656,7 +656,7 @@ static MACHINE_CONFIG_START( vpoker, vpoker_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M6809,XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(main_map) -// MCFG_CPU_VBLANK_INT("screen",irq0_line_hold) //irq0 valid too + MCFG_CPU_VBLANK_INT_DRIVER("screen", vpoker_state, irq0_line_hold) //irq0 valid too /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/vroulet.c b/src/mame/drivers/vroulet.c index 5f82b2ac6b0..286d8afdc09 100644 --- a/src/mame/drivers/vroulet.c +++ b/src/mame/drivers/vroulet.c @@ -288,7 +288,7 @@ static MACHINE_CONFIG_START( vroulet, vroulet_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) //??? MCFG_CPU_PROGRAM_MAP(vroulet_map) MCFG_CPU_IO_MAP(vroulet_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vroulet_state, irq0_line_hold) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/vulgus.c b/src/mame/drivers/vulgus.c index 802c2bfe1c1..f86c75bad51 100644 --- a/src/mame/drivers/vulgus.c +++ b/src/mame/drivers/vulgus.c @@ -47,9 +47,9 @@ All Clocks and Vsync verified by Corrado Tomaselli (August 2012) #include "includes/vulgus.h" -static INTERRUPT_GEN( vulgus_vblank_irq ) +INTERRUPT_GEN_MEMBER(vulgus_state::vulgus_vblank_irq) { - device->execute().set_input_line_and_vector(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 ) @@ -213,11 +213,11 @@ static MACHINE_CONFIG_START( vulgus, vulgus_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/4) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen",vulgus_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", vulgus_state, vulgus_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/4) /* 3 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,8*60) + MCFG_CPU_PERIODIC_INT_DRIVER(vulgus_state, irq0_line_hold, 8*60) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/wallc.c b/src/mame/drivers/wallc.c index 20a1346a6bb..9e499937b93 100644 --- a/src/mame/drivers/wallc.c +++ b/src/mame/drivers/wallc.c @@ -302,7 +302,7 @@ static MACHINE_CONFIG_START( wallc, wallc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 12288000 / 4) /* 3.072 MHz ? */ MCFG_CPU_PROGRAM_MAP(wallc_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wallc_state, irq0_line_hold) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/wardner.c b/src/mame/drivers/wardner.c index 81ce2fca050..201b9acb2d0 100644 --- a/src/mame/drivers/wardner.c +++ b/src/mame/drivers/wardner.c @@ -391,7 +391,7 @@ static MACHINE_CONFIG_START( wardner, wardner_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/4) /* 6MHz */ MCFG_CPU_PROGRAM_MAP(main_program_map) MCFG_CPU_IO_MAP(main_io_map) - MCFG_CPU_VBLANK_INT("screen", wardner_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wardner_state, wardner_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_14MHz/4) /* 3.5MHz */ MCFG_CPU_PROGRAM_MAP(sound_program_map) diff --git a/src/mame/drivers/warpsped.c b/src/mame/drivers/warpsped.c index dc744364d22..98dd355cf18 100644 --- a/src/mame/drivers/warpsped.c +++ b/src/mame/drivers/warpsped.c @@ -308,7 +308,7 @@ static MACHINE_CONFIG_START( warpspeed, warpspeed_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_5MHz/2) MCFG_CPU_PROGRAM_MAP(warpspeed_map) MCFG_CPU_IO_MAP(warpspeed_io_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", warpspeed_state, irq0_line_hold) /* video hardware */ diff --git a/src/mame/drivers/warpwarp.c b/src/mame/drivers/warpwarp.c index aada67ce4b9..2a22fe7da0f 100644 --- a/src/mame/drivers/warpwarp.c +++ b/src/mame/drivers/warpwarp.c @@ -139,12 +139,11 @@ TODO: /* Interrupt Gen */ -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(warpwarp_state::vblank_irq) { - warpwarp_state *state = device->machine().driver_data(); - if(state->m_ball_on) - device->execute().set_input_line(0, ASSERT_LINE); + if(m_ball_on) + device.execute().set_input_line(0, ASSERT_LINE); } @@ -732,7 +731,7 @@ static MACHINE_CONFIG_START( geebee, warpwarp_state ) MCFG_CPU_ADD("maincpu", I8080, MASTER_CLOCK/9) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(geebee_map) MCFG_CPU_IO_MAP(geebee_port_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", warpwarp_state, vblank_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -767,7 +766,7 @@ static MACHINE_CONFIG_START( bombbee, warpwarp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8080, MASTER_CLOCK/9) /* 18.432 MHz / 9 */ MCFG_CPU_PROGRAM_MAP(bombbee_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", warpwarp_state, vblank_irq) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/warriorb.c b/src/mame/drivers/warriorb.c index 83c9f62e0a0..bc4f0288b18 100644 --- a/src/mame/drivers/warriorb.c +++ b/src/mame/drivers/warriorb.c @@ -546,7 +546,7 @@ static MACHINE_CONFIG_START( darius2d, warriorb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? (Might well be 16!) */ MCFG_CPU_PROGRAM_MAP(darius2d_map) - MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", warriorb_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) @@ -609,7 +609,7 @@ static MACHINE_CONFIG_START( warriorb, warriorb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz ? */ MCFG_CPU_PROGRAM_MAP(warriorb_map) - MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("lscreen", warriorb_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80,16000000/4) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) diff --git a/src/mame/drivers/wc90.c b/src/mame/drivers/wc90.c index 9956609b5c4..6acc0f7fecd 100644 --- a/src/mame/drivers/wc90.c +++ b/src/mame/drivers/wc90.c @@ -310,11 +310,11 @@ static MACHINE_CONFIG_START( wc90, wc90_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(wc90_map_1) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wc90_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, XTAL_8MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(wc90_map_2) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wc90_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/wc90b.c b/src/mame/drivers/wc90b.c index 71f9c76bc99..ed5b86c3595 100644 --- a/src/mame/drivers/wc90b.c +++ b/src/mame/drivers/wc90b.c @@ -365,11 +365,11 @@ static MACHINE_CONFIG_START( wc90b, wc90b_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(wc90b_map1) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wc90b_state, irq0_line_hold) MCFG_CPU_ADD("sub", Z80, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(wc90b_map2) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wc90b_state, irq0_line_hold) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_cpu) diff --git a/src/mame/drivers/wecleman.c b/src/mame/drivers/wecleman.c index b6bb5f690a8..ca8099ae541 100644 --- a/src/mame/drivers/wecleman.c +++ b/src/mame/drivers/wecleman.c @@ -1099,9 +1099,9 @@ MACHINE_CONFIG_END Hot Chase Hardware Definitions ***************************************************************************/ -static INTERRUPT_GEN( hotchase_sound_timer ) +INTERRUPT_GEN_MEMBER(wecleman_state::hotchase_sound_timer) { - generic_pulse_irq_line(device, M6809_FIRQ_LINE, 1); + generic_pulse_irq_line(device.execute(), M6809_FIRQ_LINE, 1); } static const k051316_interface hotchase_k051316_intf_0 = @@ -1146,7 +1146,7 @@ static MACHINE_CONFIG_START( hotchase, wecleman_state ) MCFG_CPU_ADD("audiocpu", M6809, 3579545 / 2) /* 3.579/2 MHz - PCB is drawn in one set's readme */ MCFG_CPU_PROGRAM_MAP(hotchase_sound_map) - MCFG_CPU_PERIODIC_INT( hotchase_sound_timer, 496 ) + MCFG_CPU_PERIODIC_INT_DRIVER(wecleman_state, hotchase_sound_timer, 496) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/welltris.c b/src/mame/drivers/welltris.c index 9466ffb9bd1..073f4c4f46f 100644 --- a/src/mame/drivers/welltris.c +++ b/src/mame/drivers/welltris.c @@ -707,7 +707,7 @@ static MACHINE_CONFIG_START( welltris, welltris_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", welltris_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c index a2f1cc7c40b..802d7a8e01f 100644 --- a/src/mame/drivers/wgp.c +++ b/src/mame/drivers/wgp.c @@ -472,10 +472,10 @@ static TIMER_CALLBACK( wgp_cpub_interrupt6 ) /* FWIW offset of 10000,10500 on ints can get CPUB obeying the first CPUA command the same frame; probably not necessary */ -static INTERRUPT_GEN( wgp_cpub_interrupt ) +INTERRUPT_GEN_MEMBER(wgp_state::wgp_cpub_interrupt) { - device->machine().scheduler().timer_set(downcast(device)->cycles_to_attotime(200000-500), FUNC(wgp_cpub_interrupt6)); - device->execute().set_input_line(4, HOLD_LINE); + machine().scheduler().timer_set(downcast(&device)->cycles_to_attotime(200000-500), FUNC(wgp_cpub_interrupt6)); + device.execute().set_input_line(4, HOLD_LINE); } @@ -994,14 +994,14 @@ static MACHINE_CONFIG_START( wgp, wgp_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wgp_state, irq4_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 16000000/4) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) MCFG_CPU_ADD("sub", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(cpu2_map) - MCFG_CPU_VBLANK_INT("screen", wgp_cpub_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wgp_state, wgp_cpub_interrupt) MCFG_QUANTUM_TIME(attotime::from_hz(30000)) diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c index 1768fbd8ea9..02642fb21f9 100644 --- a/src/mame/drivers/wheelfir.c +++ b/src/mame/drivers/wheelfir.c @@ -817,7 +817,7 @@ static MACHINE_CONFIG_START( wheelfir, wheelfir_state ) MCFG_CPU_ADD("subcpu", M68000, 32000000/2) MCFG_CPU_PROGRAM_MAP(wheelfir_sub) - //MCFG_CPU_PERIODIC_INT(irq1_line_hold,256*60) + //MCFG_CPU_PERIODIC_INT_DRIVER(wheelfir_state, irq1_line_hold, 256*60) MCFG_QUANTUM_TIME(attotime::from_hz(12000)) diff --git a/src/mame/drivers/whitestar.c b/src/mame/drivers/whitestar.c index 5f129ace66d..d93acd165bd 100644 --- a/src/mame/drivers/whitestar.c +++ b/src/mame/drivers/whitestar.c @@ -49,6 +49,7 @@ public: DECLARE_DRIVER_INIT(whitestar); virtual void machine_reset(); virtual void palette_init(); + INTERRUPT_GEN_MEMBER(whitestar_firq_interrupt); }; static INPUT_PORTS_START( whitestar ) @@ -182,9 +183,9 @@ DRIVER_INIT_MEMBER(whitestar_state,whitestar) } // the appropriate device is passed in, so we can share this routine -static INTERRUPT_GEN( whitestar_firq_interrupt ) +INTERRUPT_GEN_MEMBER(whitestar_state::whitestar_firq_interrupt) { - device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); + device.execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } #define DMD_CHUNK_SIZE 10 @@ -271,11 +272,11 @@ static MACHINE_CONFIG_START( whitestar, whitestar_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, 2000000) MCFG_CPU_PROGRAM_MAP(whitestar_map) - MCFG_CPU_PERIODIC_INT(whitestar_firq_interrupt, 976) // value taken from PinMAME + MCFG_CPU_PERIODIC_INT_DRIVER(whitestar_state, whitestar_firq_interrupt, 976) // value taken from PinMAME MCFG_CPU_ADD("dmdcpu", M6809, (8000000/4)) MCFG_CPU_PROGRAM_MAP(whitestar_dmd_map) - MCFG_CPU_PERIODIC_INT(whitestar_firq_interrupt, 80) // value taken from PinMAME + MCFG_CPU_PERIODIC_INT_DRIVER(whitestar_state, whitestar_firq_interrupt, 80) // value taken from PinMAME /* sound hardware */ diff --git a/src/mame/drivers/wildpkr.c b/src/mame/drivers/wildpkr.c index 9bd98a83b72..a50f7644485 100644 --- a/src/mame/drivers/wildpkr.c +++ b/src/mame/drivers/wildpkr.c @@ -276,7 +276,7 @@ static MACHINE_CONFIG_START( wildpkr, wildpkr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, MAIN_CLOCK) MCFG_CPU_PROGRAM_MAP(wildpkr_map) -// MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) //guess + MCFG_CPU_VBLANK_INT_DRIVER("screen", wildpkr_state, irq1_line_hold) //guess MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/wink.c b/src/mame/drivers/wink.c index fd8c659cb40..9acc0feb9ba 100644 --- a/src/mame/drivers/wink.c +++ b/src/mame/drivers/wink.c @@ -43,6 +43,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_wink(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(wink_sound); }; @@ -329,10 +330,9 @@ static const ay8910_interface ay8912_interface = }; //AY portA is fed by an input clock at 15625 Hz -static INTERRUPT_GEN( wink_sound ) +INTERRUPT_GEN_MEMBER(wink_state::wink_sound) { - wink_state *state = device->machine().driver_data(); - state->m_sound_flag ^= 0x80; + m_sound_flag ^= 0x80; } void wink_state::machine_reset() @@ -345,12 +345,12 @@ static MACHINE_CONFIG_START( wink, wink_state ) MCFG_CPU_ADD("maincpu", Z80, 12000000 / 4) MCFG_CPU_PROGRAM_MAP(wink_map) MCFG_CPU_IO_MAP(wink_io) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wink_state, nmi_line_pulse) MCFG_CPU_ADD("audiocpu", Z80, 12000000 / 8) MCFG_CPU_PROGRAM_MAP(wink_sound_map) MCFG_CPU_IO_MAP(wink_sound_io) - MCFG_CPU_PERIODIC_INT(wink_sound, 15625) + MCFG_CPU_PERIODIC_INT_DRIVER(wink_state, wink_sound, 15625) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/wiping.c b/src/mame/drivers/wiping.c index 81bb0c14fc1..e2fc9aaef83 100644 --- a/src/mame/drivers/wiping.c +++ b/src/mame/drivers/wiping.c @@ -262,20 +262,18 @@ static GFXDECODE_START( wiping ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 64*4, 64 ) GFXDECODE_END -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(wiping_state::vblank_irq) { - wiping_state *state = device->machine().driver_data(); - if(state->m_main_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_main_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } -static INTERRUPT_GEN( sound_timer_irq ) +INTERRUPT_GEN_MEMBER(wiping_state::sound_timer_irq) { - wiping_state *state = device->machine().driver_data(); - if(state->m_sound_irq_mask) - device->execute().set_input_line(0, HOLD_LINE); + if(m_sound_irq_mask) + device.execute().set_input_line(0, HOLD_LINE); } @@ -285,11 +283,11 @@ static MACHINE_CONFIG_START( wiping, wiping_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,18432000/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wiping_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,18432000/6) /* 3.072 MHz */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(sound_timer_irq,120) /* periodic interrupt, don't know about the frequency */ + MCFG_CPU_PERIODIC_INT_DRIVER(wiping_state, sound_timer_irq, 120) /* periodic interrupt, don't know about the frequency */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c index d5effaaa0d2..789bac50cd6 100644 --- a/src/mame/drivers/witch.c +++ b/src/mame/drivers/witch.c @@ -239,6 +239,8 @@ public: TILE_GET_INFO_MEMBER(get_gfx1_tile_info); virtual void video_start(); UINT32 screen_update_witch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(witch_main_interrupt); + INTERRUPT_GEN_MEMBER(witch_sub_interrupt); }; @@ -779,26 +781,26 @@ UINT32 witch_state::screen_update_witch(screen_device &screen, bitmap_ind16 &bit return 0; } -static INTERRUPT_GEN( witch_main_interrupt ) +INTERRUPT_GEN_MEMBER(witch_state::witch_main_interrupt) { - device->execute().set_input_line(0,ASSERT_LINE); + device.execute().set_input_line(0,ASSERT_LINE); } -static INTERRUPT_GEN( witch_sub_interrupt ) +INTERRUPT_GEN_MEMBER(witch_state::witch_sub_interrupt) { - device->execute().set_input_line(0,ASSERT_LINE); + device.execute().set_input_line(0,ASSERT_LINE); } static MACHINE_CONFIG_START( witch, witch_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,8000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(map_main) - MCFG_CPU_VBLANK_INT("screen", witch_main_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", witch_state, witch_main_interrupt) /* 2nd z80 */ MCFG_CPU_ADD("sub", Z80,8000000) /* ? MHz */ MCFG_CPU_PROGRAM_MAP(map_sub) - MCFG_CPU_VBLANK_INT("screen", witch_sub_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", witch_state, witch_sub_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") diff --git a/src/mame/drivers/wiz.c b/src/mame/drivers/wiz.c index 0fa46a2a721..499107e1267 100644 --- a/src/mame/drivers/wiz.c +++ b/src/mame/drivers/wiz.c @@ -700,20 +700,18 @@ void wiz_state::machine_reset() m_dsc0 = m_dsc1 = 1; } -static INTERRUPT_GEN( wiz_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(wiz_state::wiz_vblank_interrupt) { - wiz_state *state = device->machine().driver_data(); - if(state->m_main_nmi_mask & 1) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_main_nmi_mask & 1) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static INTERRUPT_GEN( wiz_sound_interrupt ) +INTERRUPT_GEN_MEMBER(wiz_state::wiz_sound_interrupt) { - wiz_state *state = device->machine().driver_data(); - if(state->m_sound_nmi_mask & 1) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_sound_nmi_mask & 1) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -722,11 +720,11 @@ static MACHINE_CONFIG_START( wiz, wiz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, 18432000/6) /* 3.072 MHz ??? */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", wiz_vblank_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wiz_state, wiz_vblank_interrupt) MCFG_CPU_ADD("audiocpu", Z80, 14318000/8) /* ? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT(wiz_sound_interrupt,4*60) /* ??? */ + MCFG_CPU_PERIODIC_INT_DRIVER(wiz_state, wiz_sound_interrupt, 4*60) /* ??? */ /* video hardware */ diff --git a/src/mame/drivers/wrally.c b/src/mame/drivers/wrally.c index 499ab78f4c6..d7867778875 100644 --- a/src/mame/drivers/wrally.c +++ b/src/mame/drivers/wrally.c @@ -248,7 +248,7 @@ static MACHINE_CONFIG_START( wrally, wrally_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,XTAL_24MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(wrally_map) - MCFG_CPU_VBLANK_INT("screen", irq6_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", wrally_state, irq6_line_hold) MCFG_CPU_ADD("mcu", DS5002FP, XTAL_24MHz/2) /* verified on pcb */ MCFG_CPU_CONFIG(dallas_config) diff --git a/src/mame/drivers/xorworld.c b/src/mame/drivers/xorworld.c index b298290d980..b8a8157feb3 100644 --- a/src/mame/drivers/xorworld.c +++ b/src/mame/drivers/xorworld.c @@ -175,8 +175,8 @@ static MACHINE_CONFIG_START( xorworld, xorworld_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", M68000, 10000000) // 10 MHz MCFG_CPU_PROGRAM_MAP(xorworld_map) - MCFG_CPU_VBLANK_INT("screen",irq6_line_assert) // irq 4 or 6 - MCFG_CPU_PERIODIC_INT(irq2_line_assert,3*60) //timed irq, unknown timing + MCFG_CPU_VBLANK_INT_DRIVER("screen", xorworld_state, irq6_line_assert) // irq 4 or 6 + MCFG_CPU_PERIODIC_INT_DRIVER(xorworld_state, irq2_line_assert, 3*60) //timed irq, unknown timing MCFG_QUANTUM_TIME(attotime::from_hz(60)) diff --git a/src/mame/drivers/xtheball.c b/src/mame/drivers/xtheball.c index 766b58203bf..a348260f510 100644 --- a/src/mame/drivers/xtheball.c +++ b/src/mame/drivers/xtheball.c @@ -338,7 +338,7 @@ static MACHINE_CONFIG_START( xtheball, xtheball_state ) MCFG_CPU_ADD("maincpu", TMS34010, 40000000) MCFG_CPU_CONFIG(tms_config) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_PERIODIC_INT(irq1_line_hold, 15000) + MCFG_CPU_PERIODIC_INT_DRIVER(xtheball_state, irq1_line_hold, 15000) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/xxmissio.c b/src/mame/drivers/xxmissio.c index e0f5a32a4ee..88551536c1c 100644 --- a/src/mame/drivers/xxmissio.c +++ b/src/mame/drivers/xxmissio.c @@ -63,18 +63,16 @@ WRITE8_MEMBER(xxmissio_state::xxmissio_status_s_w) } } -static INTERRUPT_GEN( xxmissio_interrupt_m ) +INTERRUPT_GEN_MEMBER(xxmissio_state::xxmissio_interrupt_m) { - xxmissio_state *state = device->machine().driver_data(); - state->m_status &= ~0x20; - device->execute().set_input_line(0, HOLD_LINE); + m_status &= ~0x20; + device.execute().set_input_line(0, HOLD_LINE); } -static INTERRUPT_GEN( xxmissio_interrupt_s ) +INTERRUPT_GEN_MEMBER(xxmissio_state::xxmissio_interrupt_s) { - xxmissio_state *state = device->machine().driver_data(); - state->m_status &= ~0x10; - device->execute().set_input_line(0, HOLD_LINE); + m_status &= ~0x10; + device.execute().set_input_line(0, HOLD_LINE); } void xxmissio_state::machine_start() @@ -286,11 +284,11 @@ static MACHINE_CONFIG_START( xxmissio, xxmissio_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,12000000/4) /* 3.0MHz */ MCFG_CPU_PROGRAM_MAP(map1) - MCFG_CPU_VBLANK_INT("screen", xxmissio_interrupt_m) + MCFG_CPU_VBLANK_INT_DRIVER("screen", xxmissio_state, xxmissio_interrupt_m) MCFG_CPU_ADD("sub", Z80,12000000/4) /* 3.0MHz */ MCFG_CPU_PROGRAM_MAP(map2) - MCFG_CPU_PERIODIC_INT(xxmissio_interrupt_s,2*60) + MCFG_CPU_PERIODIC_INT_DRIVER(xxmissio_state, xxmissio_interrupt_s, 2*60) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/xyonix.c b/src/mame/drivers/xyonix.c index 8183b58303d..a7ba09b9249 100644 --- a/src/mame/drivers/xyonix.c +++ b/src/mame/drivers/xyonix.c @@ -235,8 +235,8 @@ static MACHINE_CONFIG_START( xyonix, xyonix_state ) MCFG_CPU_ADD("maincpu", Z80,16000000 / 4) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(port_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) - MCFG_CPU_PERIODIC_INT(irq0_line_assert,4*60) /* ?? controls music tempo */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", xyonix_state, nmi_line_pulse) + MCFG_CPU_PERIODIC_INT_DRIVER(xyonix_state, irq0_line_assert, 4*60) /* ?? controls music tempo */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/yiear.c b/src/mame/drivers/yiear.c index 966d6bd8d0e..11a2d08cac1 100644 --- a/src/mame/drivers/yiear.c +++ b/src/mame/drivers/yiear.c @@ -121,21 +121,19 @@ WRITE8_MEMBER(yiear_state::yiear_VLM5030_control_w) vlm5030_rst(device, (data >> 2) & 1); } -static INTERRUPT_GEN( yiear_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(yiear_state::yiear_vblank_interrupt) { - yiear_state *state = device->machine().driver_data(); - if (state->m_yiear_irq_enable) - device->execute().set_input_line(0, HOLD_LINE); + if (m_yiear_irq_enable) + device.execute().set_input_line(0, HOLD_LINE); } -static INTERRUPT_GEN( yiear_nmi_interrupt ) +INTERRUPT_GEN_MEMBER(yiear_state::yiear_nmi_interrupt) { - yiear_state *state = device->machine().driver_data(); - if (state->m_yiear_nmi_enable) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_yiear_nmi_enable) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -289,8 +287,8 @@ static MACHINE_CONFIG_START( yiear, yiear_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809,XTAL_18_432MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", yiear_vblank_interrupt) - MCFG_CPU_PERIODIC_INT(yiear_nmi_interrupt,480) /* music tempo (correct frequency unknown) */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", yiear_state, yiear_vblank_interrupt) + MCFG_CPU_PERIODIC_INT_DRIVER(yiear_state, yiear_nmi_interrupt, 480) /* music tempo (correct frequency unknown) */ /* video hardware */ diff --git a/src/mame/drivers/yunsun16.c b/src/mame/drivers/yunsun16.c index 3024333d2cf..bf76b640999 100644 --- a/src/mame/drivers/yunsun16.c +++ b/src/mame/drivers/yunsun16.c @@ -590,7 +590,7 @@ static MACHINE_CONFIG_START( magicbub, yunsun16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", yunsun16_state, irq2_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* ? */ MCFG_CPU_PROGRAM_MAP(sound_map) @@ -632,7 +632,7 @@ static MACHINE_CONFIG_START( shocking, yunsun16_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq2_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", yunsun16_state, irq2_line_hold) /* video hardware */ diff --git a/src/mame/drivers/yunsung8.c b/src/mame/drivers/yunsung8.c index 58ba1b8c9f9..0991b3760d0 100644 --- a/src/mame/drivers/yunsung8.c +++ b/src/mame/drivers/yunsung8.c @@ -502,11 +502,11 @@ static MACHINE_CONFIG_START( yunsung8, yunsung8_state ) MCFG_CPU_ADD("maincpu", Z80, 8000000) /* Z80B */ MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_IO_MAP(port_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* No nmi routine */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", yunsung8_state, irq0_line_hold) /* No nmi routine */ MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* ? */ MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* NMI caused by the MSM5205? */ + MCFG_CPU_VBLANK_INT_DRIVER("screen", yunsung8_state, irq0_line_hold) /* NMI caused by the MSM5205? */ /* video hardware */ diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c index 3bcd01d7036..b20fcda3bd5 100644 --- a/src/mame/drivers/zaccaria.c +++ b/src/mame/drivers/zaccaria.c @@ -151,13 +151,12 @@ WRITE8_MEMBER(zaccaria_state::zaccaria_port0b_w) m_last_port0b = data; } -static INTERRUPT_GEN( zaccaria_cb1_toggle ) +INTERRUPT_GEN_MEMBER(zaccaria_state::zaccaria_cb1_toggle) { - zaccaria_state *state = device->machine().driver_data(); - pia6821_device *pia0 = device->machine().device("pia0"); + pia6821_device *pia0 = machine().device("pia0"); - pia0->cb1_w(state->m_toggle & 1); - state->m_toggle ^= 1; + pia0->cb1_w(m_toggle & 1); + m_toggle ^= 1; } WRITE8_MEMBER(zaccaria_state::zaccaria_port1b_w) @@ -570,12 +569,11 @@ static const tms5220_interface tms5220_config = DEVCB_DEVICE_LINE_MEMBER("pia1", pia6821_device, ca2_w) /* READYQ handler */ }; -static INTERRUPT_GEN( vblank_irq ) +INTERRUPT_GEN_MEMBER(zaccaria_state::vblank_irq) { - zaccaria_state *state = device->machine().driver_data(); - if(state->m_nmi_mask) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if(m_nmi_mask) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } @@ -584,12 +582,12 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,XTAL_18_432MHz/6) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", zaccaria_state, vblank_irq) MCFG_QUANTUM_TIME(attotime::from_hz(1000000)) MCFG_CPU_ADD("audiocpu", M6802,XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map_1) - MCFG_CPU_PERIODIC_INT(zaccaria_cb1_toggle,(double)XTAL_3_579545MHz/4096) + MCFG_CPU_PERIODIC_INT_DRIVER(zaccaria_state, zaccaria_cb1_toggle, (double)XTAL_3_579545MHz/4096) MCFG_QUANTUM_TIME(attotime::from_hz(1000000)) MCFG_CPU_ADD("audio2", M6802,XTAL_3_579545MHz) /* verified on pcb */ diff --git a/src/mame/drivers/zaxxon.c b/src/mame/drivers/zaxxon.c index a7f92f77724..603a3badb18 100644 --- a/src/mame/drivers/zaxxon.c +++ b/src/mame/drivers/zaxxon.c @@ -297,12 +297,11 @@ INPUT_CHANGED_MEMBER(zaxxon_state::service_switch) } -static INTERRUPT_GEN( vblank_int ) +INTERRUPT_GEN_MEMBER(zaxxon_state::vblank_int) { - zaxxon_state *state = device->machine().driver_data(); - if (state->m_int_enabled) - device->execute().set_input_line(0, ASSERT_LINE); + if (m_int_enabled) + device.execute().set_input_line(0, ASSERT_LINE); } @@ -962,7 +961,7 @@ static MACHINE_CONFIG_START( root, zaxxon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/16) MCFG_CPU_PROGRAM_MAP(zaxxon_map) - MCFG_CPU_VBLANK_INT("screen", vblank_int) + MCFG_CPU_VBLANK_INT_DRIVER("screen", zaxxon_state, vblank_int) MCFG_I8255A_ADD( "ppi8255", zaxxon_ppi_intf ) @@ -1026,7 +1025,7 @@ static MACHINE_CONFIG_DERIVED( congo, root ) MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(congo_sound_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold, (double)SOUND_CLOCK/16/16/16/4) + MCFG_CPU_PERIODIC_INT_DRIVER(zaxxon_state, irq0_line_hold, (double)SOUND_CLOCK/16/16/16/4) /* video hardware */ MCFG_PALETTE_LENGTH(512) diff --git a/src/mame/drivers/zerozone.c b/src/mame/drivers/zerozone.c index a7e1aed0959..785f469c2f7 100644 --- a/src/mame/drivers/zerozone.c +++ b/src/mame/drivers/zerozone.c @@ -169,7 +169,7 @@ static MACHINE_CONFIG_START( zerozone, zerozone_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT("screen", irq1_line_hold) + MCFG_CPU_VBLANK_INT_DRIVER("screen", zerozone_state, irq1_line_hold) MCFG_CPU_ADD("audiocpu", Z80, 1000000) /* 1 MHz ??? */ MCFG_CPU_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c index aaa7fd0f0cf..341ee4ff598 100644 --- a/src/mame/drivers/zn.c +++ b/src/mame/drivers/zn.c @@ -117,6 +117,7 @@ public: DECLARE_MACHINE_RESET(coh1001l); DECLARE_MACHINE_RESET(coh1002v); DECLARE_MACHINE_RESET(coh1002m); + INTERRUPT_GEN_MEMBER(qsound_interrupt); }; INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ... ) @@ -719,9 +720,9 @@ WRITE8_MEMBER(zn_state::qsound_bankswitch_w) membank( "bank10" )->set_base( memregion( "audiocpu" )->base() + 0x10000 + ( ( data & 0x0f ) * 0x4000 ) ); } -static INTERRUPT_GEN( qsound_interrupt ) +INTERRUPT_GEN_MEMBER(zn_state::qsound_interrupt) { - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } WRITE32_MEMBER(zn_state::zn_qsound_w) @@ -779,7 +780,7 @@ static MACHINE_CONFIG_DERIVED( coh1000c, zn1_1mb_vram ) MCFG_CPU_ADD( "audiocpu", Z80, 8000000 ) /* 8MHz ?? */ MCFG_CPU_PROGRAM_MAP( qsound_map) MCFG_CPU_IO_MAP( qsound_portmap) - MCFG_CPU_PERIODIC_INT( qsound_interrupt, 60*4 ) /* 4 interrupts per frame ?? */ + MCFG_CPU_PERIODIC_INT_DRIVER(zn_state, qsound_interrupt, 60*4) /* 4 interrupts per frame ?? */ MCFG_MACHINE_RESET_OVERRIDE(zn_state, coh1000c ) @@ -793,7 +794,7 @@ static MACHINE_CONFIG_DERIVED( coh1002c, zn1_2mb_vram ) MCFG_CPU_ADD( "audiocpu", Z80, 8000000 ) /* 8MHz ?? */ MCFG_CPU_PROGRAM_MAP( qsound_map) MCFG_CPU_IO_MAP( qsound_portmap) - MCFG_CPU_PERIODIC_INT( qsound_interrupt, 60*4 ) /* 4 interrupts per frame ?? */ + MCFG_CPU_PERIODIC_INT_DRIVER(zn_state, qsound_interrupt, 60*4) /* 4 interrupts per frame ?? */ MCFG_MACHINE_RESET_OVERRIDE(zn_state, coh1000c ) @@ -973,7 +974,7 @@ static MACHINE_CONFIG_DERIVED( coh3002c, zn2 ) MCFG_CPU_ADD("audiocpu", Z80, 8000000 ) /* 8MHz ?? */ MCFG_CPU_PROGRAM_MAP( qsound_map) MCFG_CPU_IO_MAP( qsound_portmap) - MCFG_CPU_PERIODIC_INT( qsound_interrupt, 60*4 ) /* 4 interrupts per frame ?? */ + MCFG_CPU_PERIODIC_INT_DRIVER(zn_state, qsound_interrupt, 60*4) /* 4 interrupts per frame ?? */ MCFG_MACHINE_RESET_OVERRIDE(zn_state, coh3002c ) diff --git a/src/mame/drivers/zodiack.c b/src/mame/drivers/zodiack.c index 81e72a04af6..c827e3ae1ee 100644 --- a/src/mame/drivers/zodiack.c +++ b/src/mame/drivers/zodiack.c @@ -115,11 +115,10 @@ static TIMER_DEVICE_CALLBACK( zodiack_scanline ) timer.machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE); } -static INTERRUPT_GEN( zodiack_sound_nmi_gen ) +INTERRUPT_GEN_MEMBER(zodiack_state::zodiack_sound_nmi_gen) { - zodiack_state *state = device->machine().driver_data(); - if (state->m_sound_nmi_enabled) + if (m_sound_nmi_enabled) nmi_line_pulse(device); } @@ -565,7 +564,7 @@ static MACHINE_CONFIG_START( zodiack, zodiack_state ) MCFG_CPU_ADD("audiocpu", Z80, 14318000/8) /* 1.78975 MHz??? */ MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_PERIODIC_INT(zodiack_sound_nmi_gen,8*60) /* IRQs are triggered by the main CPU */ + MCFG_CPU_PERIODIC_INT_DRIVER(zodiack_state, zodiack_sound_nmi_gen, 8*60) /* IRQs are triggered by the main CPU */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index 9ef819ca684..e8ad1332557 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -207,6 +207,7 @@ public: DECLARE_VIDEO_START(jetwave); UINT32 screen_update_zr107(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_jetwave(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(zr107_vblank); }; @@ -716,9 +717,9 @@ static const k056230_interface zr107_k056230_intf = DMA0 */ -static INTERRUPT_GEN( zr107_vblank ) +INTERRUPT_GEN_MEMBER(zr107_state::zr107_vblank) { - device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); + device.execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } void zr107_state::machine_reset() @@ -731,7 +732,7 @@ static MACHINE_CONFIG_START( zr107, zr107_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", PPC403GA, 64000000/2) /* PowerPC 403GA 32MHz */ MCFG_CPU_PROGRAM_MAP(zr107_map) - MCFG_CPU_VBLANK_INT("screen", zr107_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", zr107_state, zr107_vblank) MCFG_CPU_ADD("audiocpu", M68000, 64000000/8) /* 8MHz */ MCFG_CPU_PROGRAM_MAP(sound_memmap) @@ -787,7 +788,7 @@ static MACHINE_CONFIG_START( jetwave, zr107_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", PPC403GA, 64000000/2) /* PowerPC 403GA 32MHz */ MCFG_CPU_PROGRAM_MAP(jetwave_map) - MCFG_CPU_VBLANK_INT("screen", zr107_vblank) + MCFG_CPU_VBLANK_INT_DRIVER("screen", zr107_state, zr107_vblank) MCFG_CPU_ADD("audiocpu", M68000, 64000000/8) /* 8MHz */ MCFG_CPU_PROGRAM_MAP(sound_memmap) diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h index b0cef4b42c7..4549d4485fe 100644 --- a/src/mame/includes/20pacgal.h +++ b/src/mame/includes/20pacgal.h @@ -55,6 +55,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_20pacgal(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h index 6676072004c..ecdd7776d12 100644 --- a/src/mame/includes/8080bw.h +++ b/src/mame/includes/8080bw.h @@ -85,6 +85,7 @@ public: UINT32 screen_update_polaris(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_ballbomb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(polaris_interrupt); }; diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index d8f68baba38..cb344629c79 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -47,6 +47,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_88games(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(k88games_interrupt); }; /*----------- defined in video/88games.c -----------*/ diff --git a/src/mame/includes/aeroboto.h b/src/mame/includes/aeroboto.h index 7ef502bd22d..57ed42a2a04 100644 --- a/src/mame/includes/aeroboto.h +++ b/src/mame/includes/aeroboto.h @@ -59,4 +59,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_aeroboto(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(aeroboto_interrupt); }; diff --git a/src/mame/includes/airbustr.h b/src/mame/includes/airbustr.h index a55c63af950..3375a592590 100644 --- a/src/mame/includes/airbustr.h +++ b/src/mame/includes/airbustr.h @@ -68,4 +68,5 @@ public: virtual void video_start(); UINT32 screen_update_airbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_airbustr(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(slave_interrupt); }; diff --git a/src/mame/includes/ajax.h b/src/mame/includes/ajax.h index 51b08aac7a1..1b1173d0342 100644 --- a/src/mame/includes/ajax.h +++ b/src/mame/includes/ajax.h @@ -37,13 +37,10 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_ajax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ajax_interrupt); }; -/*----------- defined in machine/ajax.c -----------*/ -INTERRUPT_GEN( ajax_interrupt ); - /*----------- defined in video/ajax.c -----------*/ - extern void ajax_tile_callback(running_machine &machine, int layer,int bank,int *code,int *color,int *flags,int *priority); extern void ajax_sprite_callback(running_machine &machine, int *code,int *color,int *priority,int *shadow); extern void ajax_zoom_callback(running_machine &machine, int *code,int *color,int *flags); diff --git a/src/mame/includes/aliens.h b/src/mame/includes/aliens.h index b8efcfde4e5..1e34a9a7ea3 100644 --- a/src/mame/includes/aliens.h +++ b/src/mame/includes/aliens.h @@ -39,6 +39,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_aliens(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(aliens_interrupt); }; /*----------- defined in video/aliens.c -----------*/ diff --git a/src/mame/includes/alpha68k.h b/src/mame/includes/alpha68k.h index 11c958cd97f..46b6a67ca9f 100644 --- a/src/mame/includes/alpha68k.h +++ b/src/mame/includes/alpha68k.h @@ -104,6 +104,7 @@ public: UINT32 screen_update_alpha68k_II(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_alpha68k_V(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_alpha68k_V_sb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(alpha68k_sound_nmi); }; /* game_id - used to deal with a few game specific situations */ diff --git a/src/mame/includes/appoooh.h b/src/mame/includes/appoooh.h index 9bb134896df..4a32c164515 100644 --- a/src/mame/includes/appoooh.h +++ b/src/mame/includes/appoooh.h @@ -52,6 +52,7 @@ public: DECLARE_PALETTE_INIT(robowres); UINT32 screen_update_appoooh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_robowres(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; #define CHR1_OFST 0x00 /* palette page of char set #1 */ diff --git a/src/mame/includes/asterix.h b/src/mame/includes/asterix.h index b343381fb52..c94f5e67a57 100644 --- a/src/mame/includes/asterix.h +++ b/src/mame/includes/asterix.h @@ -43,6 +43,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_asterix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(asterix_interrupt); }; /*----------- defined in video/asterix.c -----------*/ diff --git a/src/mame/includes/asteroid.h b/src/mame/includes/asteroid.h index e6003be2cc6..589add9f3a9 100644 --- a/src/mame/includes/asteroid.h +++ b/src/mame/includes/asteroid.h @@ -29,16 +29,11 @@ public: DECLARE_DRIVER_INIT(asterock); DECLARE_DRIVER_INIT(asteroidb); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(asteroid_interrupt); + INTERRUPT_GEN_MEMBER(asterock_interrupt); + INTERRUPT_GEN_MEMBER(llander_interrupt); }; - -/*----------- defined in machine/asteroid.c -----------*/ - -INTERRUPT_GEN( asteroid_interrupt ); -INTERRUPT_GEN( asterock_interrupt ); -INTERRUPT_GEN( llander_interrupt ); - - /*----------- defined in audio/asteroid.c -----------*/ DISCRETE_SOUND_EXTERN( asteroid ); diff --git a/src/mame/includes/asuka.h b/src/mame/includes/asuka.h index 58bcad330d0..a3690d7189a 100644 --- a/src/mame/includes/asuka.h +++ b/src/mame/includes/asuka.h @@ -50,6 +50,7 @@ public: UINT32 screen_update_bonzeadv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_asuka(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_asuka(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(cadash_interrupt); }; /*----------- defined in machine/bonzeadv.c -----------*/ diff --git a/src/mame/includes/atarisy2.h b/src/mame/includes/atarisy2.h index 0ee3daf3ef9..95c2c59221e 100644 --- a/src/mame/includes/atarisy2.h +++ b/src/mame/includes/atarisy2.h @@ -79,6 +79,7 @@ public: DECLARE_MACHINE_RESET(atarisy2); DECLARE_VIDEO_START(atarisy2); UINT32 screen_update_atarisy2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_int); }; diff --git a/src/mame/includes/aztarac.h b/src/mame/includes/aztarac.h index 5cc2aeb0967..b0c5b9e9219 100644 --- a/src/mame/includes/aztarac.h +++ b/src/mame/includes/aztarac.h @@ -27,7 +27,5 @@ public: DECLARE_WRITE8_MEMBER(aztarac_snd_status_w); virtual void machine_reset(); virtual void video_start(); + INTERRUPT_GEN_MEMBER(aztarac_snd_timed_irq); }; - -/*----------- defined in audio/aztarac.c -----------*/ -INTERRUPT_GEN( aztarac_snd_timed_irq ); diff --git a/src/mame/includes/badlands.h b/src/mame/includes/badlands.h index 0b55c481768..790f2906db3 100644 --- a/src/mame/includes/badlands.h +++ b/src/mame/includes/badlands.h @@ -31,6 +31,7 @@ public: DECLARE_VIDEO_START(badlands); DECLARE_MACHINE_RESET(badlandsb); UINT32 screen_update_badlands(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_int); }; /*----------- defined in video/badlands.c -----------*/ diff --git a/src/mame/includes/bagman.h b/src/mame/includes/bagman.h index 11ce8f29f32..1d0b34ac6e7 100644 --- a/src/mame/includes/bagman.h +++ b/src/mame/includes/bagman.h @@ -48,6 +48,7 @@ public: DECLARE_VIDEO_START(bagman); DECLARE_PALETTE_INIT(bagman); UINT32 screen_update_bagman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; /*----------- timings -----------*/ diff --git a/src/mame/includes/balsente.h b/src/mame/includes/balsente.h index bb193906ce3..dbb4bbe974c 100644 --- a/src/mame/includes/balsente.h +++ b/src/mame/includes/balsente.h @@ -193,6 +193,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_balsente(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(balsente_update_analog_inputs); }; @@ -202,8 +203,6 @@ TIMER_DEVICE_CALLBACK( balsente_interrupt_timer ); void balsente_noise_gen(device_t *device, int count, short *buffer); -INTERRUPT_GEN( balsente_update_analog_inputs ); - TIMER_DEVICE_CALLBACK( balsente_counter_callback ); TIMER_DEVICE_CALLBACK( balsente_clock_counter_0_ff ); diff --git a/src/mame/includes/bankp.h b/src/mame/includes/bankp.h index c1a99bd3df6..8c7e4928d5c 100644 --- a/src/mame/includes/bankp.h +++ b/src/mame/includes/bankp.h @@ -39,4 +39,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_bankp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/battlane.h b/src/mame/includes/battlane.h index 64557ed9dac..becdb476a7d 100644 --- a/src/mame/includes/battlane.h +++ b/src/mame/includes/battlane.h @@ -39,4 +39,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_battlane(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(battlane_cpu1_interrupt); }; diff --git a/src/mame/includes/battlex.h b/src/mame/includes/battlex.h index 5082a8f77cd..4bff1294a34 100644 --- a/src/mame/includes/battlex.h +++ b/src/mame/includes/battlex.h @@ -36,4 +36,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_battlex(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(battlex_interrupt); }; diff --git a/src/mame/includes/battlnts.h b/src/mame/includes/battlnts.h index df40a4a98b4..d5ffb68384b 100644 --- a/src/mame/includes/battlnts.h +++ b/src/mame/includes/battlnts.h @@ -29,6 +29,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_battlnts(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(battlnts_interrupt); }; /*----------- defined in video/battlnts.c -----------*/ diff --git a/src/mame/includes/blockade.h b/src/mame/includes/blockade.h index cde296c7a6f..5a3509ee265 100644 --- a/src/mame/includes/blockade.h +++ b/src/mame/includes/blockade.h @@ -27,6 +27,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_blockade(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(blockade_interrupt); }; /*----------- defined in audio/blockade.c -----------*/ diff --git a/src/mame/includes/blockhl.h b/src/mame/includes/blockhl.h index a72e0709f55..d4bd2d65d58 100644 --- a/src/mame/includes/blockhl.h +++ b/src/mame/includes/blockhl.h @@ -37,6 +37,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_blockhl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(blockhl_interrupt); }; /*----------- defined in video/blockhl.c -----------*/ diff --git a/src/mame/includes/bombjack.h b/src/mame/includes/bombjack.h index 023dd3bca34..e8effb4b156 100644 --- a/src/mame/includes/bombjack.h +++ b/src/mame/includes/bombjack.h @@ -40,4 +40,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_bombjack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/bottom9.h b/src/mame/includes/bottom9.h index 15e3597993e..c35cc095a2a 100644 --- a/src/mame/includes/bottom9.h +++ b/src/mame/includes/bottom9.h @@ -47,6 +47,8 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_bottom9(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(bottom9_interrupt); + INTERRUPT_GEN_MEMBER(bottom9_sound_interrupt); }; /*----------- defined in video/bottom9.c -----------*/ diff --git a/src/mame/includes/brkthru.h b/src/mame/includes/brkthru.h index 3c0f8a3cf7e..5bc0f75c399 100644 --- a/src/mame/includes/brkthru.h +++ b/src/mame/includes/brkthru.h @@ -46,4 +46,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_brkthru(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/bublbobl.h b/src/mame/includes/bublbobl.h index 651cb4ab32c..4b6299632b1 100644 --- a/src/mame/includes/bublbobl.h +++ b/src/mame/includes/bublbobl.h @@ -109,8 +109,5 @@ public: DECLARE_MACHINE_START(common); DECLARE_MACHINE_RESET(common); UINT32 screen_update_bublbobl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(bublbobl_m68705_interrupt); }; - -/*----------- defined in machine/bublbobl.c -----------*/ -// for 68705 bootleg -INTERRUPT_GEN( bublbobl_m68705_interrupt ); diff --git a/src/mame/includes/bwing.h b/src/mame/includes/bwing.h index 82343973149..41b7cfe24ef 100644 --- a/src/mame/includes/bwing.h +++ b/src/mame/includes/bwing.h @@ -75,6 +75,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_bwing(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(bwp3_interrupt); }; /*----------- defined in video/bwing.c -----------*/ diff --git a/src/mame/includes/bzone.h b/src/mame/includes/bzone.h index 841bcadf944..da00703a629 100644 --- a/src/mame/includes/bzone.h +++ b/src/mame/includes/bzone.h @@ -26,6 +26,7 @@ public: DECLARE_DRIVER_INIT(bradley); virtual void machine_start(); DECLARE_MACHINE_START(redbaron); + INTERRUPT_GEN_MEMBER(bzone_interrupt); }; diff --git a/src/mame/includes/capbowl.h b/src/mame/includes/capbowl.h index c5da47c978c..9973ec89e85 100644 --- a/src/mame/includes/capbowl.h +++ b/src/mame/includes/capbowl.h @@ -41,4 +41,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_capbowl(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(capbowl_interrupt); }; diff --git a/src/mame/includes/carjmbre.h b/src/mame/includes/carjmbre.h index a52b2d391ab..7a4ba38169f 100644 --- a/src/mame/includes/carjmbre.h +++ b/src/mame/includes/carjmbre.h @@ -32,4 +32,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_carjmbre(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/carpolo.h b/src/mame/includes/carpolo.h index 30785ded873..c3e24e1f5b4 100644 --- a/src/mame/includes/carpolo.h +++ b/src/mame/includes/carpolo.h @@ -68,6 +68,7 @@ public: virtual void palette_init(); UINT32 screen_update_carpolo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_carpolo(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(carpolo_timer_interrupt); }; @@ -83,8 +84,6 @@ WRITE_LINE_DEVICE_HANDLER( carpolo_7474_2s_2_q_cb ); WRITE_LINE_DEVICE_HANDLER( carpolo_7474_2u_1_q_cb ); WRITE_LINE_DEVICE_HANDLER( carpolo_7474_2u_2_q_cb ); -INTERRUPT_GEN( carpolo_timer_interrupt ); - void carpolo_generate_car_car_interrupt(running_machine &machine, int car1, int car2); void carpolo_generate_ball_screen_interrupt(running_machine &machine, UINT8 cause); void carpolo_generate_car_goal_interrupt(running_machine &machine, int car, int right_goal); diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h index 87f43bd5ce3..84f276ad99a 100644 --- a/src/mame/includes/cave.h +++ b/src/mame/includes/cave.h @@ -201,6 +201,7 @@ public: DECLARE_VIDEO_START(sailormn_3_layers); DECLARE_PALETTE_INIT(sailormn); UINT32 screen_update_cave(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cave_interrupt); }; /*----------- defined in video/cave.c -----------*/ diff --git a/src/mame/includes/cclimber.h b/src/mame/includes/cclimber.h index d83e9300442..dd888f7e713 100644 --- a/src/mame/includes/cclimber.h +++ b/src/mame/includes/cclimber.h @@ -70,4 +70,5 @@ public: UINT32 screen_update_swimmer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_yamato(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_toprollr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/champbas.h b/src/mame/includes/champbas.h index f59c214f2dc..0b5ddcf9de4 100644 --- a/src/mame/includes/champbas.h +++ b/src/mame/includes/champbas.h @@ -63,4 +63,5 @@ public: UINT32 screen_update_champbas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_exctsccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_champbas(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/changela.h b/src/mame/includes/changela.h index 0a497a0c452..5502472904a 100644 --- a/src/mame/includes/changela.h +++ b/src/mame/includes/changela.h @@ -89,4 +89,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_changela(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(chl_mcu_irq); }; diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h index 58d9df73064..299de28a9e0 100644 --- a/src/mame/includes/cheekyms.h +++ b/src/mame/includes/cheekyms.h @@ -36,4 +36,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_cheekyms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/circusc.h b/src/mame/includes/circusc.h index 898670dca28..ddd7f847855 100644 --- a/src/mame/includes/circusc.h +++ b/src/mame/includes/circusc.h @@ -58,4 +58,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_circusc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/commando.h b/src/mame/includes/commando.h index 629ba469fdd..0d80f7d26d7 100644 --- a/src/mame/includes/commando.h +++ b/src/mame/includes/commando.h @@ -47,4 +47,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_commando(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(commando_interrupt); }; diff --git a/src/mame/includes/contra.h b/src/mame/includes/contra.h index cf237f1760f..cc5573fa090 100644 --- a/src/mame/includes/contra.h +++ b/src/mame/includes/contra.h @@ -61,4 +61,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_contra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(contra_interrupt); }; diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h index 04a974380ec..bade2c5a213 100644 --- a/src/mame/includes/cps1.h +++ b/src/mame/includes/cps1.h @@ -213,14 +213,14 @@ public: UINT32 screen_update_fcrash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_kodb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_cps1(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(cps1_interrupt); + INTERRUPT_GEN_MEMBER(cps1_qsound_interrupt); }; /*----------- defined in drivers/cps1.c -----------*/ ADDRESS_MAP_EXTERN( qsound_sub_map, 8 ); -INTERRUPT_GEN( cps1_interrupt ); - GFXDECODE_EXTERN( cps1 ); diff --git a/src/mame/includes/cps3.h b/src/mame/includes/cps3.h index 0b2e529daf7..49125fe880e 100644 --- a/src/mame/includes/cps3.h +++ b/src/mame/includes/cps3.h @@ -106,6 +106,8 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_cps3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cps3_vbl_interrupt); + INTERRUPT_GEN_MEMBER(cps3_other_interrupt); }; diff --git a/src/mame/includes/crbaloon.h b/src/mame/includes/crbaloon.h index 7ec2462a679..f3e440034b9 100644 --- a/src/mame/includes/crbaloon.h +++ b/src/mame/includes/crbaloon.h @@ -37,6 +37,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_crbaloon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/crimfght.h b/src/mame/includes/crimfght.h index 7655d010d79..6aced1a278c 100644 --- a/src/mame/includes/crimfght.h +++ b/src/mame/includes/crimfght.h @@ -32,6 +32,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_crimfght(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(crimfght_interrupt); }; /*----------- defined in video/crimfght.c -----------*/ diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h index 1cfab1bff07..779a2a8db3a 100644 --- a/src/mame/includes/cvs.h +++ b/src/mame/includes/cvs.h @@ -105,6 +105,7 @@ public: DECLARE_VIDEO_START(cvs); DECLARE_PALETTE_INIT(cvs); UINT32 screen_update_cvs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cvs_main_cpu_interrupt); }; /*----------- defined in video/cvs.c -----------*/ diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h index d433dd6b93e..6ed7727dadc 100644 --- a/src/mame/includes/cyberbal.h +++ b/src/mame/includes/cyberbal.h @@ -56,12 +56,12 @@ public: UINT32 screen_update_cyberbal_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_cyberbal_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_cyberbal2p(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cyberbal_sound_68k_irq_gen); }; /*----------- defined in audio/cyberbal.c -----------*/ void cyberbal_sound_reset(running_machine &machine); -INTERRUPT_GEN( cyberbal_sound_68k_irq_gen ); /*----------- defined in video/cyberbal.c -----------*/ diff --git a/src/mame/includes/dcheese.h b/src/mame/includes/dcheese.h index 05da645e69b..b1b18d0386b 100644 --- a/src/mame/includes/dcheese.h +++ b/src/mame/includes/dcheese.h @@ -47,6 +47,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_dcheese(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(dcheese_vblank); }; /*----------- defined in drivers/dcheese.c -----------*/ diff --git a/src/mame/includes/ddribble.h b/src/mame/includes/ddribble.h index c2eef7095c5..797fe32fabe 100644 --- a/src/mame/includes/ddribble.h +++ b/src/mame/includes/ddribble.h @@ -60,4 +60,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_ddribble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ddribble_interrupt_0); + INTERRUPT_GEN_MEMBER(ddribble_interrupt_1); }; diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h index 8d9f1283f5b..7b8d37cbf3c 100644 --- a/src/mame/includes/dec8.h +++ b/src/mame/includes/dec8.h @@ -130,6 +130,8 @@ public: UINT32 screen_update_srdarwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_cobracom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_dec8(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(gondo_interrupt); + INTERRUPT_GEN_MEMBER(oscar_interrupt); }; /*----------- defined in video/dec8.c -----------*/ diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h index ea061bd7311..e18a3eb585d 100644 --- a/src/mame/includes/deco32.h +++ b/src/mame/includes/deco32.h @@ -109,6 +109,7 @@ public: UINT32 screen_update_fghthist(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_nslasher(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void screen_eof_captaven(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(deco32_vbl_interrupt); }; class dragngun_state : public deco32_state diff --git a/src/mame/includes/djmain.h b/src/mame/includes/djmain.h index 4d98866c7e8..777981cb010 100644 --- a/src/mame/includes/djmain.h +++ b/src/mame/includes/djmain.h @@ -54,6 +54,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_djmain(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vb_interrupt); }; /*----------- defined in video/djmain.c -----------*/ diff --git a/src/mame/includes/dkong.h b/src/mame/includes/dkong.h index e13bc82b8e8..4092c824c4a 100644 --- a/src/mame/includes/dkong.h +++ b/src/mame/includes/dkong.h @@ -256,6 +256,8 @@ public: UINT32 screen_update_dkong(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_pestplce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_spclforc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(s2650_interrupt); + INTERRUPT_GEN_MEMBER(vblank_irq); }; /*----------- defined in audio/dkong.c -----------*/ diff --git a/src/mame/includes/dribling.h b/src/mame/includes/dribling.h index 98955ee4d2d..c47320e4a6c 100644 --- a/src/mame/includes/dribling.h +++ b/src/mame/includes/dribling.h @@ -47,4 +47,5 @@ public: virtual void machine_reset(); virtual void palette_init(); UINT32 screen_update_dribling(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(dribling_irq_gen); }; diff --git a/src/mame/includes/drmicro.h b/src/mame/includes/drmicro.h index cd14f3c1aac..088273f28b2 100644 --- a/src/mame/includes/drmicro.h +++ b/src/mame/includes/drmicro.h @@ -35,4 +35,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_drmicro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(drmicro_interrupt); }; diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h index a612366a7d1..26b610ec35d 100644 --- a/src/mame/includes/dynax.h +++ b/src/mame/includes/dynax.h @@ -471,6 +471,11 @@ public: UINT32 screen_update_jantouki_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_jantouki_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_htengoku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sprtmtch_vblank_interrupt); + INTERRUPT_GEN_MEMBER(jantouki_vblank_interrupt); + INTERRUPT_GEN_MEMBER(jantouki_sound_vblank_interrupt); + INTERRUPT_GEN_MEMBER(yarunara_clock_interrupt); + INTERRUPT_GEN_MEMBER(mjelctrn_vblank_interrupt); }; //----------- defined in drivers/dynax.c ----------- diff --git a/src/mame/includes/dynduke.h b/src/mame/includes/dynduke.h index 17392b90cd8..7c591977ad6 100644 --- a/src/mame/includes/dynduke.h +++ b/src/mame/includes/dynduke.h @@ -41,4 +41,5 @@ public: TILE_GET_INFO_MEMBER(get_tx_tile_info); virtual void video_start(); UINT32 screen_update_dynduke(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(dynduke_interrupt); }; diff --git a/src/mame/includes/espial.h b/src/mame/includes/espial.h index 850648c85ef..ed6cf060ba1 100644 --- a/src/mame/includes/espial.h +++ b/src/mame/includes/espial.h @@ -52,4 +52,5 @@ public: virtual void palette_init(); DECLARE_VIDEO_START(netwars); UINT32 screen_update_espial(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(espial_sound_nmi_gen); }; diff --git a/src/mame/includes/esripsys.h b/src/mame/includes/esripsys.h index af1dd1b5249..7dd9bb747b7 100644 --- a/src/mame/includes/esripsys.h +++ b/src/mame/includes/esripsys.h @@ -93,9 +93,9 @@ public: DECLARE_DRIVER_INIT(esripsys); virtual void video_start(); UINT32 screen_update_esripsys(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(esripsys_vblank_irq); }; /*----------- defined in video/esripsys.c -----------*/ -INTERRUPT_GEN( esripsys_vblank_irq ); int esripsys_draw(running_machine &machine, int l, int r, int fig, int attr, int addr, int col, int x_scale, int bank); diff --git a/src/mame/includes/exidy.h b/src/mame/includes/exidy.h index ec4d66e7e2e..118c2b6b9aa 100644 --- a/src/mame/includes/exidy.h +++ b/src/mame/includes/exidy.h @@ -68,9 +68,9 @@ public: virtual void video_start(); DECLARE_MACHINE_START(teetert); UINT32 screen_update_exidy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(exidy_vblank_interrupt); }; /*----------- defined in video/exidy.c -----------*/ void exidy_video_config(running_machine &machine, UINT8 _collision_mask, UINT8 _collision_invert, int _is_2bpp); -INTERRUPT_GEN( exidy_vblank_interrupt ); diff --git a/src/mame/includes/exidy440.h b/src/mame/includes/exidy440.h index a8b8e828399..9596185d958 100644 --- a/src/mame/includes/exidy440.h +++ b/src/mame/includes/exidy440.h @@ -69,6 +69,7 @@ public: DECLARE_VIDEO_START(topsecex); UINT32 screen_update_exidy440(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_topsecex(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(exidy440_vblank_interrupt); }; @@ -78,7 +79,5 @@ void exidy440_bank_select(running_machine &machine, UINT8 bank); /*----------- defined in video/exidy440.c -----------*/ -INTERRUPT_GEN( exidy440_vblank_interrupt ); - MACHINE_CONFIG_EXTERN( exidy440_video ); MACHINE_CONFIG_EXTERN( topsecex_video ); diff --git a/src/mame/includes/exprraid.h b/src/mame/includes/exprraid.h index f451d85816f..08fb86f3da3 100644 --- a/src/mame/includes/exprraid.h +++ b/src/mame/includes/exprraid.h @@ -54,4 +54,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_exprraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(exprraid_interrupt); }; diff --git a/src/mame/includes/fantland.h b/src/mame/includes/fantland.h index dd84a0304e6..c7c7b53978f 100644 --- a/src/mame/includes/fantland.h +++ b/src/mame/includes/fantland.h @@ -48,4 +48,6 @@ public: DECLARE_MACHINE_START(borntofi); DECLARE_MACHINE_RESET(borntofi); UINT32 screen_update_fantland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(fantland_irq); + INTERRUPT_GEN_MEMBER(fantland_sound_irq); }; diff --git a/src/mame/includes/fastfred.h b/src/mame/includes/fastfred.h index 4c9c5b89eb5..49db2e61bca 100644 --- a/src/mame/includes/fastfred.h +++ b/src/mame/includes/fastfred.h @@ -63,6 +63,8 @@ public: DECLARE_VIDEO_START(imago); UINT32 screen_update_fastfred(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_imago(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(sound_timer_irq); }; /*----------- defined in video/fastfred.c -----------*/ diff --git a/src/mame/includes/firetrap.h b/src/mame/includes/firetrap.h index 0cb9a637a38..9a4fafbbd3e 100644 --- a/src/mame/includes/firetrap.h +++ b/src/mame/includes/firetrap.h @@ -71,4 +71,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_firetrap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(firetrap_irq); }; diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h index 2b5966d31c4..0fa34f9bfb3 100644 --- a/src/mame/includes/firetrk.h +++ b/src/mame/includes/firetrk.h @@ -104,6 +104,7 @@ public: UINT32 screen_update_firetrk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_superbug(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_montecar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(firetrk_interrupt); }; diff --git a/src/mame/includes/fitfight.h b/src/mame/includes/fitfight.h index 836861bb6cf..f7349c91489 100644 --- a/src/mame/includes/fitfight.h +++ b/src/mame/includes/fitfight.h @@ -62,4 +62,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_fitfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(snd_irq); }; diff --git a/src/mame/includes/flkatck.h b/src/mame/includes/flkatck.h index a09f8aaad68..e8ed22519bf 100644 --- a/src/mame/includes/flkatck.h +++ b/src/mame/includes/flkatck.h @@ -39,4 +39,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_flkatck(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(flkatck_interrupt); }; diff --git a/src/mame/includes/freekick.h b/src/mame/includes/freekick.h index 64b67edba51..efc9ff181e3 100644 --- a/src/mame/includes/freekick.h +++ b/src/mame/includes/freekick.h @@ -51,4 +51,5 @@ public: UINT32 screen_update_pbillrd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_freekick(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_gigas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(freekick_irqgen); }; diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h index 7301b95537c..000f2434d7a 100644 --- a/src/mame/includes/fromanc2.h +++ b/src/mame/includes/fromanc2.h @@ -105,6 +105,7 @@ public: DECLARE_VIDEO_START(fromanc4); UINT32 screen_update_fromanc2_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_fromanc2_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(fromanc2_interrupt); }; /*----------- defined in video/fromanc2.c -----------*/ diff --git a/src/mame/includes/gaelco3d.h b/src/mame/includes/gaelco3d.h index 60d9155472f..6c70a0162be 100644 --- a/src/mame/includes/gaelco3d.h +++ b/src/mame/includes/gaelco3d.h @@ -116,6 +116,7 @@ public: DECLARE_MACHINE_RESET(gaelco3d2); DECLARE_MACHINE_RESET(common); UINT32 screen_update_gaelco3d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_gen); }; /*----------- defined in video/gaelco3d.c -----------*/ diff --git a/src/mame/includes/galaga.h b/src/mame/includes/galaga.h index 5d612bf5df9..82135083a11 100644 --- a/src/mame/includes/galaga.h +++ b/src/mame/includes/galaga.h @@ -58,6 +58,8 @@ public: DECLARE_PALETTE_INIT(galaga); UINT32 screen_update_galaga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_galaga(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(main_vblank_irq); + INTERRUPT_GEN_MEMBER(sub_vblank_irq); }; class xevious_state : public galaga_state @@ -93,6 +95,7 @@ public: DECLARE_PALETTE_INIT(battles); DECLARE_MACHINE_RESET(battles); UINT32 screen_update_xevious(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(battles_interrupt_4); }; @@ -203,8 +206,6 @@ DECLARE_WRITE8_HANDLER( battles_customio_data3_w ); DECLARE_WRITE8_HANDLER( battles_CPU4_coin_w ); DECLARE_WRITE8_HANDLER( battles_noise_sound_w ); -INTERRUPT_GEN( battles_interrupt_4 ); - /*----------- defined in video/digdug.c -----------*/ DECLARE_WRITE8_HANDLER( digdug_videoram_w ); diff --git a/src/mame/includes/galastrm.h b/src/mame/includes/galastrm.h index bd562c26a24..047283c6e88 100644 --- a/src/mame/includes/galastrm.h +++ b/src/mame/includes/galastrm.h @@ -48,4 +48,5 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(coin_word_r); virtual void video_start(); UINT32 screen_update_galastrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(galastrm_interrupt); }; diff --git a/src/mame/includes/galaxia.h b/src/mame/includes/galaxia.h index f7a238a9adf..d58b6bcc49c 100644 --- a/src/mame/includes/galaxia.h +++ b/src/mame/includes/galaxia.h @@ -28,4 +28,5 @@ public: DECLARE_PALETTE_INIT(astrowar); UINT32 screen_update_galaxia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_astrowar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(galaxia_interrupt); }; diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index 5b39189be3f..9887103b2a9 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -224,6 +224,8 @@ public: DECLARE_PALETTE_INIT(moonwar); void tenspot_set_game_bank(running_machine& machine, int bank, int from_game); UINT32 screen_update_galaxian(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(interrupt_gen); + INTERRUPT_GEN_MEMBER(fakechange_interrupt_gen); }; diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h index f77d73e5551..f1f006d78a8 100644 --- a/src/mame/includes/galaxold.h +++ b/src/mame/includes/galaxold.h @@ -178,6 +178,8 @@ public: DECLARE_VIDEO_START(dambustr); UINT32 screen_update_galaxold(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_dambustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(hunchbks_vh_interrupt); }; /*----------- defined in video/galaxold.c -----------*/ @@ -193,6 +195,4 @@ WRITE_LINE_DEVICE_HANDLER( galaxold_7474_9m_1_callback ); #define galaxold_coin_counter_0_w galaxold_coin_counter_w -INTERRUPT_GEN( hunchbks_vh_interrupt ); - #endif diff --git a/src/mame/includes/gameplan.h b/src/mame/includes/gameplan.h index 4a3186a8320..8d4d6137825 100644 --- a/src/mame/includes/gameplan.h +++ b/src/mame/includes/gameplan.h @@ -70,6 +70,7 @@ public: DECLARE_VIDEO_START(common); UINT32 screen_update_gameplan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_leprechn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(trvquest_interrupt); }; /*----------- defined in video/gameplan.c -----------*/ diff --git a/src/mame/includes/gaplus.h b/src/mame/includes/gaplus.h index 4f8e6b92715..02fd9205e96 100644 --- a/src/mame/includes/gaplus.h +++ b/src/mame/includes/gaplus.h @@ -47,4 +47,7 @@ public: virtual void palette_init(); UINT32 screen_update_gaplus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_gaplus(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(gaplus_vblank_main_irq); + INTERRUPT_GEN_MEMBER(gaplus_vblank_sub_irq); + INTERRUPT_GEN_MEMBER(gaplus_vblank_sub2_irq); }; diff --git a/src/mame/includes/gbusters.h b/src/mame/includes/gbusters.h index 6283949fd71..9c3af4f2c45 100644 --- a/src/mame/includes/gbusters.h +++ b/src/mame/includes/gbusters.h @@ -41,6 +41,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_gbusters(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(gbusters_interrupt); }; /*----------- defined in video/gbusters.c -----------*/ diff --git a/src/mame/includes/gcpinbal.h b/src/mame/includes/gcpinbal.h index 239b4f85e96..94e388f2e5f 100644 --- a/src/mame/includes/gcpinbal.h +++ b/src/mame/includes/gcpinbal.h @@ -59,4 +59,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_gcpinbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(gcpinbal_interrupt); }; diff --git a/src/mame/includes/gijoe.h b/src/mame/includes/gijoe.h index 21d433a04f6..73ab2a196e1 100644 --- a/src/mame/includes/gijoe.h +++ b/src/mame/includes/gijoe.h @@ -45,6 +45,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_gijoe(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(gijoe_interrupt); }; /*----------- defined in video/gijoe.c -----------*/ diff --git a/src/mame/includes/glass.h b/src/mame/includes/glass.h index 0c81eafdf13..7a35d3a406f 100644 --- a/src/mame/includes/glass.h +++ b/src/mame/includes/glass.h @@ -47,4 +47,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_glass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(glass_interrupt); }; diff --git a/src/mame/includes/goldstar.h b/src/mame/includes/goldstar.h index 882b919f7cf..42dd3b14653 100644 --- a/src/mame/includes/goldstar.h +++ b/src/mame/includes/goldstar.h @@ -147,4 +147,5 @@ public: UINT32 screen_update_magical(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_amcoe1a(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_unkch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(lucky8_irq); }; diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h index f3d2e542986..b572ae262be 100644 --- a/src/mame/includes/gottlieb.h +++ b/src/mame/includes/gottlieb.h @@ -302,6 +302,7 @@ public: virtual void video_start(); DECLARE_VIDEO_START(screwloo); UINT32 screen_update_gottlieb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(gottlieb_interrupt); }; /*----------- defined in video/gottlieb.c -----------*/ diff --git a/src/mame/includes/gradius3.h b/src/mame/includes/gradius3.h index 0e0c45c3d88..705a95407bf 100644 --- a/src/mame/includes/gradius3.h +++ b/src/mame/includes/gradius3.h @@ -49,6 +49,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_gradius3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cpuA_interrupt); }; /*----------- defined in video/gradius3.c -----------*/ diff --git a/src/mame/includes/grchamp.h b/src/mame/includes/grchamp.h index b79dd448dc2..63202c74870 100644 --- a/src/mame/includes/grchamp.h +++ b/src/mame/includes/grchamp.h @@ -72,6 +72,8 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_grchamp(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(grchamp_cpu0_interrupt); + INTERRUPT_GEN_MEMBER(grchamp_cpu1_interrupt); }; /* Discrete Sound Input Nodes */ diff --git a/src/mame/includes/groundfx.h b/src/mame/includes/groundfx.h index 8528d0ece16..d23c35a1967 100644 --- a/src/mame/includes/groundfx.h +++ b/src/mame/includes/groundfx.h @@ -38,4 +38,5 @@ public: DECLARE_DRIVER_INIT(groundfx); virtual void video_start(); UINT32 screen_update_groundfx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(groundfx_interrupt); }; diff --git a/src/mame/includes/gsword.h b/src/mame/includes/gsword.h index 8d02f9f0d0a..5633645b13b 100644 --- a/src/mame/includes/gsword.h +++ b/src/mame/includes/gsword.h @@ -46,4 +46,5 @@ public: DECLARE_MACHINE_RESET(josvolly); DECLARE_PALETTE_INIT(josvolly); UINT32 screen_update_gsword(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(gsword_snd_interrupt); }; diff --git a/src/mame/includes/gunbustr.h b/src/mame/includes/gunbustr.h index ff2cad10060..ba9cd8e5051 100644 --- a/src/mame/includes/gunbustr.h +++ b/src/mame/includes/gunbustr.h @@ -40,4 +40,5 @@ public: DECLARE_DRIVER_INIT(gunbustr); virtual void video_start(); UINT32 screen_update_gunbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(gunbustr_interrupt); }; diff --git a/src/mame/includes/gyruss.h b/src/mame/includes/gyruss.h index f66f2460392..662af9a56c4 100644 --- a/src/mame/includes/gyruss.h +++ b/src/mame/includes/gyruss.h @@ -54,4 +54,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_gyruss(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(master_vblank_irq); + INTERRUPT_GEN_MEMBER(slave_vblank_irq); }; diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h index 8d1af5e52fa..c7b8849ae4d 100644 --- a/src/mame/includes/harddriv.h +++ b/src/mame/includes/harddriv.h @@ -217,6 +217,7 @@ public: DECLARE_MACHINE_START(harddriv); DECLARE_MACHINE_RESET(harddriv); DECLARE_VIDEO_START(harddriv); + INTERRUPT_GEN_MEMBER(hd68k_irq_gen); }; @@ -224,9 +225,6 @@ public: /* Driver/Multisync board */ - - -INTERRUPT_GEN( hd68k_irq_gen ); DECLARE_WRITE16_HANDLER( hd68k_irq_ack_w ); void hdgsp_irq_gen(device_t *device, int state); void hdmsp_irq_gen(device_t *device, int state); diff --git a/src/mame/includes/homedata.h b/src/mame/includes/homedata.h index f75f0f0c2d5..84e09023293 100644 --- a/src/mame/includes/homedata.h +++ b/src/mame/includes/homedata.h @@ -125,4 +125,6 @@ public: UINT32 screen_update_pteacher(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_mirderby(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_homedata(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(homedata_irq); + INTERRUPT_GEN_MEMBER(upd7807_irq); }; diff --git a/src/mame/includes/hyperspt.h b/src/mame/includes/hyperspt.h index 458af777aea..578d9a48709 100644 --- a/src/mame/includes/hyperspt.h +++ b/src/mame/includes/hyperspt.h @@ -43,4 +43,5 @@ public: virtual void palette_init(); DECLARE_VIDEO_START(roadf); UINT32 screen_update_hyperspt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/itech32.h b/src/mame/includes/itech32.h index 36eb5a3d2da..58d46747a3b 100644 --- a/src/mame/includes/itech32.h +++ b/src/mame/includes/itech32.h @@ -158,6 +158,7 @@ public: virtual void video_start(); DECLARE_MACHINE_RESET(drivedge); UINT32 screen_update_itech32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(generate_int1); }; /*----------- defined in drivers/itech32.c -----------*/ diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h index 87ffcb5ac7e..aa8e9bafe33 100644 --- a/src/mame/includes/itech8.h +++ b/src/mame/includes/itech8.h @@ -94,6 +94,7 @@ public: UINT32 screen_update_slikshot(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_itech8_2page(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_itech8_2page_large(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(generate_nmi); }; diff --git a/src/mame/includes/jack.h b/src/mame/includes/jack.h index 1bff8baf6f4..105ca8edc97 100644 --- a/src/mame/includes/jack.h +++ b/src/mame/includes/jack.h @@ -57,4 +57,5 @@ public: DECLARE_PALETTE_INIT(joinem); UINT32 screen_update_jack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_joinem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(joinem_vblank_irq); }; diff --git a/src/mame/includes/jackal.h b/src/mame/includes/jackal.h index f4b36bc9f21..d1bcbf40849 100644 --- a/src/mame/includes/jackal.h +++ b/src/mame/includes/jackal.h @@ -43,6 +43,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_jackal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(jackal_interrupt); }; /*----------- defined in video/jackal.c -----------*/ diff --git a/src/mame/includes/jailbrek.h b/src/mame/includes/jailbrek.h index 37d7bf40a6d..79cd8b24ebb 100644 --- a/src/mame/includes/jailbrek.h +++ b/src/mame/includes/jailbrek.h @@ -43,5 +43,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_jailbrek(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(jb_interrupt); + INTERRUPT_GEN_MEMBER(jb_interrupt_nmi); }; diff --git a/src/mame/includes/karnov.h b/src/mame/includes/karnov.h index 30526839e00..a47f8031b21 100644 --- a/src/mame/includes/karnov.h +++ b/src/mame/includes/karnov.h @@ -58,6 +58,7 @@ public: DECLARE_VIDEO_START(karnov); DECLARE_VIDEO_START(wndrplnt); UINT32 screen_update_karnov(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(karnov_interrupt); }; enum { diff --git a/src/mame/includes/kchamp.h b/src/mame/includes/kchamp.h index dab2fe71c6a..e0e4731913c 100644 --- a/src/mame/includes/kchamp.h +++ b/src/mame/includes/kchamp.h @@ -50,4 +50,6 @@ public: DECLARE_MACHINE_START(kchamp); UINT32 screen_update_kchampvs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_kchamp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(kc_interrupt); + INTERRUPT_GEN_MEMBER(sound_int); }; diff --git a/src/mame/includes/kickgoal.h b/src/mame/includes/kickgoal.h index b7c3d6f63ec..c4b5169c0d0 100644 --- a/src/mame/includes/kickgoal.h +++ b/src/mame/includes/kickgoal.h @@ -75,4 +75,5 @@ public: DECLARE_VIDEO_START(kickgoal); DECLARE_VIDEO_START(actionhw); UINT32 screen_update_kickgoal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(kickgoal_interrupt); }; diff --git a/src/mame/includes/kingobox.h b/src/mame/includes/kingobox.h index dba077e4a7e..952fb187a48 100644 --- a/src/mame/includes/kingobox.h +++ b/src/mame/includes/kingobox.h @@ -58,4 +58,5 @@ public: DECLARE_PALETTE_INIT(ringking); UINT32 screen_update_kingofb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_ringking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(kingofb_interrupt); }; diff --git a/src/mame/includes/kncljoe.h b/src/mame/includes/kncljoe.h index 0b9742a313c..8f6421fd9d7 100644 --- a/src/mame/includes/kncljoe.h +++ b/src/mame/includes/kncljoe.h @@ -46,4 +46,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_kncljoe(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sound_nmi); }; diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h index f5483167078..a325e9950ca 100644 --- a/src/mame/includes/konamigx.h +++ b/src/mame/includes/konamigx.h @@ -78,6 +78,8 @@ public: UINT32 screen_update_konamigx(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_konamigx_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_konamigx_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(konamigx_vbinterrupt); + INTERRUPT_GEN_MEMBER(tms_sync); }; diff --git a/src/mame/includes/kopunch.h b/src/mame/includes/kopunch.h index f2c1c18e574..48b61a38904 100644 --- a/src/mame/includes/kopunch.h +++ b/src/mame/includes/kopunch.h @@ -43,4 +43,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_kopunch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(kopunch_interrupt); }; diff --git a/src/mame/includes/kyugo.h b/src/mame/includes/kyugo.h index 2dc64e36090..c3e900fa141 100644 --- a/src/mame/includes/kyugo.h +++ b/src/mame/includes/kyugo.h @@ -59,5 +59,6 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_kyugo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/labyrunr.h b/src/mame/includes/labyrunr.h index 04b55eafd04..7a83b81ccc3 100644 --- a/src/mame/includes/labyrunr.h +++ b/src/mame/includes/labyrunr.h @@ -42,4 +42,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_labyrunr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(labyrunr_vblank_interrupt); + INTERRUPT_GEN_MEMBER(labyrunr_timer_interrupt); }; diff --git a/src/mame/includes/laserbat.h b/src/mame/includes/laserbat.h index 426ab152d48..d5bea0798a0 100644 --- a/src/mame/includes/laserbat.h +++ b/src/mame/includes/laserbat.h @@ -82,4 +82,6 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_laserbat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(laserbat_interrupt); + INTERRUPT_GEN_MEMBER(zaccaria_cb1_toggle); }; diff --git a/src/mame/includes/leland.h b/src/mame/includes/leland.h index 1a0746478d0..f5871c23e65 100644 --- a/src/mame/includes/leland.h +++ b/src/mame/includes/leland.h @@ -142,6 +142,7 @@ public: DECLARE_VIDEO_START(ataxx); UINT32 screen_update_leland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_ataxx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(leland_master_interrupt); }; @@ -153,20 +154,6 @@ public: #define SERIAL_TYPE_ENCRYPT 3 #define SERIAL_TYPE_ENCRYPT_XOR 4 - - - - - - - - - - - - -INTERRUPT_GEN( leland_master_interrupt ); - void cerberus_bankswitch(running_machine &machine); void mayhem_bankswitch(running_machine &machine); void dangerz_bankswitch(running_machine &machine); diff --git a/src/mame/includes/lethal.h b/src/mame/includes/lethal.h index ade6aaf3306..9ee62ba5afd 100644 --- a/src/mame/includes/lethal.h +++ b/src/mame/includes/lethal.h @@ -40,6 +40,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_lethalen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(lethalen_interrupt); }; /*----------- defined in video/lethal.c -----------*/ diff --git a/src/mame/includes/liberate.h b/src/mame/includes/liberate.h index 260ed5a517f..4185adf4f6f 100644 --- a/src/mame/includes/liberate.h +++ b/src/mame/includes/liberate.h @@ -67,4 +67,6 @@ public: UINT32 screen_update_prosport(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_boomrang(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_prosoccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(deco16_interrupt); + INTERRUPT_GEN_MEMBER(prosport_interrupt); }; diff --git a/src/mame/includes/lucky74.h b/src/mame/includes/lucky74.h index d58c79005d2..87c5b1b7e52 100644 --- a/src/mame/includes/lucky74.h +++ b/src/mame/includes/lucky74.h @@ -40,4 +40,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_lucky74(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(nmi_interrupt); }; diff --git a/src/mame/includes/lwings.h b/src/mame/includes/lwings.h index 1d99d822728..642d1767568 100644 --- a/src/mame/includes/lwings.h +++ b/src/mame/includes/lwings.h @@ -60,4 +60,6 @@ public: DECLARE_VIDEO_START(avengers); UINT32 screen_update_lwings(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_trojan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(lwings_interrupt); + INTERRUPT_GEN_MEMBER(avengers_interrupt); }; diff --git a/src/mame/includes/m10.h b/src/mame/includes/m10.h index 352f3dd8b13..76694d7c213 100644 --- a/src/mame/includes/m10.h +++ b/src/mame/includes/m10.h @@ -88,5 +88,8 @@ public: DECLARE_VIDEO_START(m15); UINT32 screen_update_m10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_m15(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(m11_interrupt); + INTERRUPT_GEN_MEMBER(m10_interrupt); + INTERRUPT_GEN_MEMBER(m15_interrupt); }; diff --git a/src/mame/includes/m72.h b/src/mame/includes/m72.h index f76bc708d9d..36e280e71bf 100644 --- a/src/mame/includes/m72.h +++ b/src/mame/includes/m72.h @@ -117,4 +117,6 @@ public: DECLARE_MACHINE_RESET(kengo); UINT32 screen_update_m72(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_majtitle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(m72_mcu_int); + INTERRUPT_GEN_MEMBER(fake_nmi); }; diff --git a/src/mame/includes/m90.h b/src/mame/includes/m90.h index 88fac30f37c..bbf822e89e2 100644 --- a/src/mame/includes/m90.h +++ b/src/mame/includes/m90.h @@ -43,4 +43,9 @@ public: UINT32 screen_update_m90(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_bomblord(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_dynablsb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(fake_nmi); + INTERRUPT_GEN_MEMBER(bomblord_fake_nmi); + INTERRUPT_GEN_MEMBER(m90_interrupt); + INTERRUPT_GEN_MEMBER(dynablsb_interrupt); + INTERRUPT_GEN_MEMBER(bomblord_interrupt); }; diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h index 4b331f09507..e3b1cb17805 100644 --- a/src/mame/includes/mainevt.h +++ b/src/mame/includes/mainevt.h @@ -45,6 +45,10 @@ public: DECLARE_VIDEO_START(dv); UINT32 screen_update_mainevt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_dv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mainevt_interrupt); + INTERRUPT_GEN_MEMBER(dv_interrupt); + INTERRUPT_GEN_MEMBER(mainevt_sound_timer_irq); + INTERRUPT_GEN_MEMBER(devstors_sound_timer_irq); }; /*----------- defined in video/mainevt.c -----------*/ diff --git a/src/mame/includes/mappy.h b/src/mame/includes/mappy.h index da35e63ad26..1ccf205f6c8 100644 --- a/src/mame/includes/mappy.h +++ b/src/mame/includes/mappy.h @@ -52,4 +52,10 @@ public: UINT32 screen_update_superpac(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_phozon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_mappy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(superpac_main_vblank_irq); + INTERRUPT_GEN_MEMBER(pacnpal_main_vblank_irq); + INTERRUPT_GEN_MEMBER(phozon_main_vblank_irq); + INTERRUPT_GEN_MEMBER(mappy_main_vblank_irq); + INTERRUPT_GEN_MEMBER(sub_vblank_irq); + INTERRUPT_GEN_MEMBER(sub2_vblank_irq); }; diff --git a/src/mame/includes/marineb.h b/src/mame/includes/marineb.h index 4da0d34b685..00115de7e31 100644 --- a/src/mame/includes/marineb.h +++ b/src/mame/includes/marineb.h @@ -44,4 +44,6 @@ public: UINT32 screen_update_springer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_hoccer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_hopprobo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(marineb_vblank_irq); + INTERRUPT_GEN_MEMBER(wanted_vblank_irq); }; diff --git a/src/mame/includes/mario.h b/src/mame/includes/mario.h index 64168f67c3e..e17f7e95ebd 100644 --- a/src/mame/includes/mario.h +++ b/src/mame/includes/mario.h @@ -82,6 +82,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_mario(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; /*----------- defined in audio/mario.c -----------*/ diff --git a/src/mame/includes/mcr68.h b/src/mame/includes/mcr68.h index 4803ad177b2..fbdae4710bc 100644 --- a/src/mame/includes/mcr68.h +++ b/src/mame/includes/mcr68.h @@ -98,6 +98,7 @@ public: DECLARE_VIDEO_START(mcr68); UINT32 screen_update_zwackery(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_mcr68(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mcr68_interrupt); }; /*----------- defined in machine/mcr68.c -----------*/ @@ -105,5 +106,3 @@ public: extern const pia6821_interface zwackery_pia0_intf; extern const pia6821_interface zwackery_pia1_intf; extern const pia6821_interface zwackery_pia2_intf; - -INTERRUPT_GEN( mcr68_interrupt ); diff --git a/src/mame/includes/meadows.h b/src/mame/includes/meadows.h index 504a5442818..183027ca1e2 100644 --- a/src/mame/includes/meadows.h +++ b/src/mame/includes/meadows.h @@ -46,6 +46,9 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_meadows(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(meadows_interrupt); + INTERRUPT_GEN_MEMBER(minferno_interrupt); + INTERRUPT_GEN_MEMBER(audio_interrupt); }; diff --git a/src/mame/includes/megasys1.h b/src/mame/includes/megasys1.h index 7f629dcca30..40a19aad10b 100644 --- a/src/mame/includes/megasys1.h +++ b/src/mame/includes/megasys1.h @@ -112,4 +112,5 @@ public: DECLARE_MACHINE_RESET(megasys1_hachoo); UINT32 screen_update_megasys1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_megasys1(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(megasys1D_irq); }; diff --git a/src/mame/includes/megazone.h b/src/mame/includes/megazone.h index 6ea6ce834b6..fc2602cf804 100644 --- a/src/mame/includes/megazone.h +++ b/src/mame/includes/megazone.h @@ -52,4 +52,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_megazone(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/mermaid.h b/src/mame/includes/mermaid.h index e8377bfab45..735e3870bd0 100644 --- a/src/mame/includes/mermaid.h +++ b/src/mame/includes/mermaid.h @@ -79,4 +79,5 @@ public: DECLARE_PALETTE_INIT(rougien); UINT32 screen_update_mermaid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_mermaid(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h index d8833980469..afb2f8e1a31 100644 --- a/src/mame/includes/metro.h +++ b/src/mame/includes/metro.h @@ -162,6 +162,10 @@ public: DECLARE_VIDEO_START(blzntrnd); DECLARE_VIDEO_START(gstrik2); UINT32 screen_update_metro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(metro_vblank_interrupt); + INTERRUPT_GEN_MEMBER(metro_periodic_interrupt); + INTERRUPT_GEN_MEMBER(karatour_interrupt); + INTERRUPT_GEN_MEMBER(puzzlet_interrupt); }; diff --git a/src/mame/includes/mexico86.h b/src/mame/includes/mexico86.h index 097992cdb4d..363e574c0fa 100644 --- a/src/mame/includes/mexico86.h +++ b/src/mame/includes/mexico86.h @@ -55,8 +55,6 @@ public: virtual void machine_reset(); UINT32 screen_update_mexico86(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_kikikai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(kikikai_interrupt); + INTERRUPT_GEN_MEMBER(mexico86_m68705_interrupt); }; - -/*----------- defined in machine/mexico86.c -----------*/ -INTERRUPT_GEN( kikikai_interrupt ); -INTERRUPT_GEN( mexico86_m68705_interrupt ); diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h index 8e68325f445..d7018098b50 100644 --- a/src/mame/includes/micro3d.h +++ b/src/mame/includes/micro3d.h @@ -114,6 +114,7 @@ public: virtual void machine_reset(); virtual void video_start(); virtual void video_reset(); + INTERRUPT_GEN_MEMBER(micro3d_vblank); }; struct micro3d_vtx @@ -162,5 +163,3 @@ extern const device_type MICRO3D; /*----------- defined in video/micro3d.c -----------*/ void micro3d_tms_interrupt(device_t *device, int state); void micro3d_scanline_update(screen_device &screen, bitmap_ind16 &bitmap, int scanline, const tms34010_display_params *params); - -INTERRUPT_GEN( micro3d_vblank ); diff --git a/src/mame/includes/midzeus.h b/src/mame/includes/midzeus.h index e1ab4cb5400..239e2768bec 100644 --- a/src/mame/includes/midzeus.h +++ b/src/mame/includes/midzeus.h @@ -58,6 +58,7 @@ public: DECLARE_VIDEO_START(midzeus2); UINT32 screen_update_midzeus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_midzeus2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(display_irq); }; /*----------- defined in video/midzeus2.c -----------*/ diff --git a/src/mame/includes/mikie.h b/src/mame/includes/mikie.h index 567b692ece6..a6439352ddd 100644 --- a/src/mame/includes/mikie.h +++ b/src/mame/includes/mikie.h @@ -44,4 +44,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_mikie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/mjkjidai.h b/src/mame/includes/mjkjidai.h index 1cd3654c4f8..1b3541e2c61 100644 --- a/src/mame/includes/mjkjidai.h +++ b/src/mame/includes/mjkjidai.h @@ -29,4 +29,5 @@ public: TILE_GET_INFO_MEMBER(get_tile_info); virtual void video_start(); UINT32 screen_update_mjkjidai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/moo.h b/src/mame/includes/moo.h index ab0ee01a02c..82d856d1384 100644 --- a/src/mame/includes/moo.h +++ b/src/mame/includes/moo.h @@ -54,6 +54,8 @@ public: DECLARE_MACHINE_RESET(moo); DECLARE_VIDEO_START(moo); UINT32 screen_update_moo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(moo_interrupt); + INTERRUPT_GEN_MEMBER(moobl_interrupt); }; /*----------- defined in video/moo.c -----------*/ diff --git a/src/mame/includes/mouser.h b/src/mame/includes/mouser.h index e5b867d0288..7357be6aef8 100644 --- a/src/mame/includes/mouser.h +++ b/src/mame/includes/mouser.h @@ -36,4 +36,6 @@ public: virtual void machine_reset(); virtual void palette_init(); UINT32 screen_update_mouser(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mouser_nmi_interrupt); + INTERRUPT_GEN_MEMBER(mouser_sound_nmi_assert); }; diff --git a/src/mame/includes/munchmo.h b/src/mame/includes/munchmo.h index 2703ae06ae6..240e70a8716 100644 --- a/src/mame/includes/munchmo.h +++ b/src/mame/includes/munchmo.h @@ -47,4 +47,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_mnchmobl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mnchmobl_vblank_irq); + INTERRUPT_GEN_MEMBER(mnchmobl_sound_irq); }; diff --git a/src/mame/includes/mustache.h b/src/mame/includes/mustache.h index 8154395ed67..25bf6d47b62 100644 --- a/src/mame/includes/mustache.h +++ b/src/mame/includes/mustache.h @@ -20,4 +20,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_mustache(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(assert_irq); }; diff --git a/src/mame/includes/mystwarr.h b/src/mame/includes/mystwarr.h index 1e91ce86e9b..234fd877fcc 100644 --- a/src/mame/includes/mystwarr.h +++ b/src/mame/includes/mystwarr.h @@ -71,4 +71,5 @@ public: UINT32 screen_update_metamrph(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_dadandrn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_martchmp(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ddd_interrupt); }; diff --git a/src/mame/includes/namconb1.h b/src/mame/includes/namconb1.h index 7eb6023be6c..b7f0a6989fd 100644 --- a/src/mame/includes/namconb1.h +++ b/src/mame/includes/namconb1.h @@ -77,4 +77,6 @@ public: DECLARE_VIDEO_START(namconb2); UINT32 screen_update_namconb1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_namconb2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(namconb1_interrupt); + INTERRUPT_GEN_MEMBER(namconb2_interrupt); }; diff --git a/src/mame/includes/namcond1.h b/src/mame/includes/namcond1.h index 871d2e5b92d..d9319fba208 100644 --- a/src/mame/includes/namcond1.h +++ b/src/mame/includes/namcond1.h @@ -27,4 +27,5 @@ public: DECLARE_WRITE16_MEMBER(namcond1_cuskey_w); virtual void machine_start(); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(mcu_interrupt); }; diff --git a/src/mame/includes/namcos2.h b/src/mame/includes/namcos2.h index d1403942d37..704e0e41f03 100644 --- a/src/mame/includes/namcos2.h +++ b/src/mame/includes/namcos2.h @@ -178,6 +178,9 @@ public: // general void zdrawgfxzoom(bitmap_ind16 &dest_bmp, const rectangle &clip, gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy, int scalex, int scaley, int zpos); void zdrawgfxzoom(bitmap_rgb32 &dest_bmp, const rectangle &clip, gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy, int scalex, int scaley, int zpos); + INTERRUPT_GEN_MEMBER(namcos2_68k_master_vblank); + INTERRUPT_GEN_MEMBER(namcos2_68k_slave_vblank); + INTERRUPT_GEN_MEMBER(namcos2_68k_gpu_vblank); }; class namcos2_state : public namcos2_shared_state @@ -333,15 +336,12 @@ DECLARE_WRITE16_HANDLER( namcos2_68k_key_w ); DECLARE_WRITE16_HANDLER( namcos2_68k_master_C148_w ); DECLARE_READ16_HANDLER( namcos2_68k_master_C148_r ); -INTERRUPT_GEN( namcos2_68k_master_vblank ); DECLARE_WRITE16_HANDLER( namcos2_68k_slave_C148_w ); DECLARE_READ16_HANDLER( namcos2_68k_slave_C148_r ); -INTERRUPT_GEN( namcos2_68k_slave_vblank ); DECLARE_WRITE16_HANDLER( namcos2_68k_gpu_C148_w ); DECLARE_READ16_HANDLER( namcos2_68k_gpu_C148_r ); -INTERRUPT_GEN( namcos2_68k_gpu_vblank ); void namcos2_adjust_posirq_timer( running_machine &machine, int scanline ); diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index 1436bfb937f..1b6072ff3f2 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -256,6 +256,8 @@ public: DECLARE_VIDEO_START(common); UINT32 screen_update_namcos22s(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_namcos22(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(namcos22s_interrupt); + INTERRUPT_GEN_MEMBER(namcos22_interrupt); }; /*----------- defined in video/namcos22.c -----------*/ diff --git a/src/mame/includes/nbmj9195.h b/src/mame/includes/nbmj9195.h index 0b2a7dceb9e..03cfb9cdda6 100644 --- a/src/mame/includes/nbmj9195.h +++ b/src/mame/includes/nbmj9195.h @@ -111,6 +111,7 @@ public: DECLARE_VIDEO_START(nbmj9195_1layer); DECLARE_VIDEO_START(nbmj9195_nb22090); UINT32 screen_update_nbmj9195(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(ctc0_trg1); }; /*----------- defined in video/nbmj9195.c -----------*/ diff --git a/src/mame/includes/nemesis.h b/src/mame/includes/nemesis.h index 283c8641ca5..a26662f5f23 100644 --- a/src/mame/includes/nemesis.h +++ b/src/mame/includes/nemesis.h @@ -85,4 +85,6 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_nemesis(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(nemesis_interrupt); + INTERRUPT_GEN_MEMBER(blkpnthr_interrupt); }; diff --git a/src/mame/includes/ninjakd2.h b/src/mame/includes/ninjakd2.h index 6241e16fe08..98624e6bd45 100644 --- a/src/mame/includes/ninjakd2.h +++ b/src/mame/includes/ninjakd2.h @@ -76,4 +76,5 @@ public: UINT32 screen_update_robokid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_omegaf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_ninjakd2(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(ninjakd2_interrupt); }; diff --git a/src/mame/includes/niyanpai.h b/src/mame/includes/niyanpai.h index b6e74001bd1..ef1c903ada5 100644 --- a/src/mame/includes/niyanpai.h +++ b/src/mame/includes/niyanpai.h @@ -80,4 +80,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_niyanpai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(niyanpai_interrupt); }; diff --git a/src/mame/includes/orbit.h b/src/mame/includes/orbit.h index 591eb602107..d6ff2f1b3e8 100644 --- a/src/mame/includes/orbit.h +++ b/src/mame/includes/orbit.h @@ -44,6 +44,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_orbit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(orbit_interrupt); }; /*----------- defined in audio/orbit.c -----------*/ DECLARE_WRITE8_DEVICE_HANDLER( orbit_note_w ); diff --git a/src/mame/includes/othunder.h b/src/mame/includes/othunder.h index 23f3f88b50d..8b742b8129a 100644 --- a/src/mame/includes/othunder.h +++ b/src/mame/includes/othunder.h @@ -63,4 +63,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_othunder(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_interrupt); }; diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h index 26be23451fa..067180e4a6b 100644 --- a/src/mame/includes/overdriv.h +++ b/src/mame/includes/overdriv.h @@ -43,6 +43,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(cpuB_interrupt); }; /*----------- defined in video/overdriv.c -----------*/ diff --git a/src/mame/includes/pacland.h b/src/mame/includes/pacland.h index a92cd948f76..7e345c4456d 100644 --- a/src/mame/includes/pacland.h +++ b/src/mame/includes/pacland.h @@ -38,4 +38,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_pacland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(main_vblank_irq); + INTERRUPT_GEN_MEMBER(mcu_vblank_irq); }; diff --git a/src/mame/includes/pacman.h b/src/mame/includes/pacman.h index 805250283b0..e6392cacc2f 100644 --- a/src/mame/includes/pacman.h +++ b/src/mame/includes/pacman.h @@ -136,6 +136,9 @@ public: DECLARE_VIDEO_START(jrpacman); UINT32 screen_update_pacman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_s2650games(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(vblank_nmi); + INTERRUPT_GEN_MEMBER(s2650_interrupt); }; /*----------- defined in machine/pacplus.c -----------*/ diff --git a/src/mame/includes/pandoras.h b/src/mame/includes/pandoras.h index e0bc16f3739..2ffb9c7f626 100644 --- a/src/mame/includes/pandoras.h +++ b/src/mame/includes/pandoras.h @@ -51,4 +51,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_pandoras(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(pandoras_master_interrupt); + INTERRUPT_GEN_MEMBER(pandoras_slave_interrupt); }; diff --git a/src/mame/includes/paradise.h b/src/mame/includes/paradise.h index 6a852ea0e9b..f6e7fd7b211 100644 --- a/src/mame/includes/paradise.h +++ b/src/mame/includes/paradise.h @@ -54,4 +54,5 @@ public: UINT32 screen_update_paradise(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_torus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_madball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(paradise_irq); }; diff --git a/src/mame/includes/parodius.h b/src/mame/includes/parodius.h index 402d4cac6e2..2d677a52d88 100644 --- a/src/mame/includes/parodius.h +++ b/src/mame/includes/parodius.h @@ -43,6 +43,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_parodius(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(parodius_interrupt); }; /*----------- defined in video/parodius.c -----------*/ diff --git a/src/mame/includes/pbaction.h b/src/mame/includes/pbaction.h index 4af2e53bc7c..7233f0aabd8 100644 --- a/src/mame/includes/pbaction.h +++ b/src/mame/includes/pbaction.h @@ -52,4 +52,6 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_pbaction(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(pbaction_interrupt); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/pitnrun.h b/src/mame/includes/pitnrun.h index 1964d3b07a1..93bb7d6d04a 100644 --- a/src/mame/includes/pitnrun.h +++ b/src/mame/includes/pitnrun.h @@ -52,4 +52,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_pitnrun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(pitnrun_nmi_source); }; diff --git a/src/mame/includes/playch10.h b/src/mame/includes/playch10.h index 28033c0a7dc..deb35a2d0ed 100644 --- a/src/mame/includes/playch10.h +++ b/src/mame/includes/playch10.h @@ -117,6 +117,7 @@ public: UINT32 screen_update_playch10_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_playch10_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_playch10_single(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(playch10_interrupt); }; /*----------- defined in video/playch10.c -----------*/ diff --git a/src/mame/includes/plygonet.h b/src/mame/includes/plygonet.h index 24a7dc1dd7f..cf653706032 100644 --- a/src/mame/includes/plygonet.h +++ b/src/mame/includes/plygonet.h @@ -73,4 +73,6 @@ public: virtual void machine_start(); virtual void video_start(); UINT32 screen_update_polygonet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(polygonet_interrupt); + INTERRUPT_GEN_MEMBER(audio_interrupt); }; diff --git a/src/mame/includes/policetr.h b/src/mame/includes/policetr.h index c7ffb16fe9d..93ecdffd782 100644 --- a/src/mame/includes/policetr.h +++ b/src/mame/includes/policetr.h @@ -47,4 +47,5 @@ public: DECLARE_DRIVER_INIT(plctr13b); virtual void video_start(); UINT32 screen_update_policetr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(irq4_gen); }; diff --git a/src/mame/includes/polyplay.h b/src/mame/includes/polyplay.h index cf7baf84db2..f0f613faf2c 100644 --- a/src/mame/includes/polyplay.h +++ b/src/mame/includes/polyplay.h @@ -33,6 +33,8 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_polyplay(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(periodic_interrupt); + INTERRUPT_GEN_MEMBER(coin_interrupt); }; diff --git a/src/mame/includes/pooyan.h b/src/mame/includes/pooyan.h index a38cd0f187c..cf897308d9b 100644 --- a/src/mame/includes/pooyan.h +++ b/src/mame/includes/pooyan.h @@ -33,4 +33,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_pooyan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(pooyan_interrupt); }; diff --git a/src/mame/includes/popeye.h b/src/mame/includes/popeye.h index f58ae216d52..2a57446ecf4 100644 --- a/src/mame/includes/popeye.h +++ b/src/mame/includes/popeye.h @@ -41,4 +41,5 @@ public: DECLARE_VIDEO_START(popeye); DECLARE_PALETTE_INIT(popeyebl); UINT32 screen_update_popeye(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(popeye_interrupt); }; diff --git a/src/mame/includes/popper.h b/src/mame/includes/popper.h index df5d1c36d65..8d90b778cf0 100644 --- a/src/mame/includes/popper.h +++ b/src/mame/includes/popper.h @@ -55,4 +55,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_popper(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/psikyo4.h b/src/mame/includes/psikyo4.h index 0d0093f30db..2077005655d 100644 --- a/src/mame/includes/psikyo4.h +++ b/src/mame/includes/psikyo4.h @@ -52,4 +52,5 @@ public: virtual void video_start(); UINT32 screen_update_psikyo4_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_psikyo4_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(psikyosh_interrupt); }; diff --git a/src/mame/includes/psikyosh.h b/src/mame/includes/psikyosh.h index c8354d46c53..4062aacddd8 100644 --- a/src/mame/includes/psikyosh.h +++ b/src/mame/includes/psikyosh.h @@ -66,4 +66,5 @@ public: virtual void machine_start(); virtual void video_start(); UINT32 screen_update_psikyosh(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(psikyosh_interrupt); }; diff --git a/src/mame/includes/punchout.h b/src/mame/includes/punchout.h index 566a257f998..349abbd32ce 100644 --- a/src/mame/includes/punchout.h +++ b/src/mame/includes/punchout.h @@ -67,4 +67,5 @@ public: UINT32 screen_update_punchout_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_armwrest_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_armwrest_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/qdrmfgp.h b/src/mame/includes/qdrmfgp.h index 09e6b8d3e13..01e352639a7 100644 --- a/src/mame/includes/qdrmfgp.h +++ b/src/mame/includes/qdrmfgp.h @@ -39,6 +39,7 @@ public: DECLARE_MACHINE_START(qdrmfgp2); DECLARE_VIDEO_START(qdrmfgp2); UINT32 screen_update_qdrmfgp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(qdrmfgp2_interrupt); }; /*----------- defined in video/qdrmfgp.c -----------*/ diff --git a/src/mame/includes/quasar.h b/src/mame/includes/quasar.h index 82fd0ed6018..bc46c4d6f78 100644 --- a/src/mame/includes/quasar.h +++ b/src/mame/includes/quasar.h @@ -29,4 +29,5 @@ public: DECLARE_VIDEO_START(quasar); DECLARE_PALETTE_INIT(quasar); UINT32 screen_update_quasar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(quasar_interrupt); }; diff --git a/src/mame/includes/raiden.h b/src/mame/includes/raiden.h index 856f09b0718..d4c86b4af3f 100644 --- a/src/mame/includes/raiden.h +++ b/src/mame/includes/raiden.h @@ -40,4 +40,5 @@ public: virtual void video_start(); DECLARE_VIDEO_START(raidena); UINT32 screen_update_raiden(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(raiden_interrupt); }; diff --git a/src/mame/includes/raiden2.h b/src/mame/includes/raiden2.h index a038371a3b2..f7e4ef10235 100644 --- a/src/mame/includes/raiden2.h +++ b/src/mame/includes/raiden2.h @@ -149,6 +149,7 @@ public: DECLARE_MACHINE_RESET(xsedae); DECLARE_MACHINE_RESET(raidendx); UINT32 screen_update_raiden2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(raiden2_interrupt); }; /*----------- defined in machine/r2crypt.c -----------*/ diff --git a/src/mame/includes/rallyx.h b/src/mame/includes/rallyx.h index 0e05ff5728c..4313043879a 100644 --- a/src/mame/includes/rallyx.h +++ b/src/mame/includes/rallyx.h @@ -64,4 +64,6 @@ public: UINT32 screen_update_rallyx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_jungler(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_locomotn(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(rallyx_vblank_irq); + INTERRUPT_GEN_MEMBER(jungler_vblank_irq); }; diff --git a/src/mame/includes/realbrk.h b/src/mame/includes/realbrk.h index 38a20a2f997..44c7ac468c9 100644 --- a/src/mame/includes/realbrk.h +++ b/src/mame/includes/realbrk.h @@ -46,4 +46,5 @@ public: virtual void video_start(); UINT32 screen_update_realbrk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_dai2kaku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(realbrk_interrupt); }; diff --git a/src/mame/includes/redalert.h b/src/mame/includes/redalert.h index 47ac951e617..836492d3597 100644 --- a/src/mame/includes/redalert.h +++ b/src/mame/includes/redalert.h @@ -40,6 +40,7 @@ public: UINT32 screen_update_redalert(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_demoneye(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_panther(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(redalert_vblank_interrupt); }; /*----------- defined in audio/redalert.c -----------*/ diff --git a/src/mame/includes/retofinv.h b/src/mame/includes/retofinv.h index 0f2518554a8..a11aa01096b 100644 --- a/src/mame/includes/retofinv.h +++ b/src/mame/includes/retofinv.h @@ -62,4 +62,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_retofinv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(main_vblank_irq); + INTERRUPT_GEN_MEMBER(sub_vblank_irq); }; diff --git a/src/mame/includes/rltennis.h b/src/mame/includes/rltennis.h index b7afb6b78ea..4682f42c51d 100644 --- a/src/mame/includes/rltennis.h +++ b/src/mame/includes/rltennis.h @@ -47,4 +47,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_rltennis(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(rltennis_interrupt); }; diff --git a/src/mame/includes/rockrage.h b/src/mame/includes/rockrage.h index b9af30e72c5..4137230d67d 100644 --- a/src/mame/includes/rockrage.h +++ b/src/mame/includes/rockrage.h @@ -31,6 +31,7 @@ public: virtual void machine_reset(); virtual void palette_init(); UINT32 screen_update_rockrage(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(rockrage_interrupt); }; /*----------- defined in video/rockrage.c -----------*/ diff --git a/src/mame/includes/rocnrope.h b/src/mame/includes/rocnrope.h index 3d52de7bfd1..33d18857cbc 100644 --- a/src/mame/includes/rocnrope.h +++ b/src/mame/includes/rocnrope.h @@ -29,4 +29,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_rocnrope(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/rollrace.h b/src/mame/includes/rollrace.h index 6336a435df7..7183e05605c 100644 --- a/src/mame/includes/rollrace.h +++ b/src/mame/includes/rollrace.h @@ -35,4 +35,6 @@ public: DECLARE_WRITE8_MEMBER(rollrace_flipx_w); virtual void palette_init(); UINT32 screen_update_rollrace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(sound_timer_irq); }; diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index ac07dfcc512..bb6bdae3c02 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -53,6 +53,8 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_rng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(rng_interrupt); + INTERRUPT_GEN_MEMBER(audio_interrupt); }; /*----------- defined in video/rungun.c -----------*/ diff --git a/src/mame/includes/sauro.h b/src/mame/includes/sauro.h index f52d7c18e40..42c6756b1b3 100644 --- a/src/mame/includes/sauro.h +++ b/src/mame/includes/sauro.h @@ -38,4 +38,5 @@ public: DECLARE_VIDEO_START(sauro); UINT32 screen_update_trckydoc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_sauro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sauro_interrupt); }; diff --git a/src/mame/includes/sbasketb.h b/src/mame/includes/sbasketb.h index 252c180a258..770ad8ff220 100644 --- a/src/mame/includes/sbasketb.h +++ b/src/mame/includes/sbasketb.h @@ -43,4 +43,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_sbasketb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/scotrsht.h b/src/mame/includes/scotrsht.h index d6c5a015e40..6f9412f536c 100644 --- a/src/mame/includes/scotrsht.h +++ b/src/mame/includes/scotrsht.h @@ -26,4 +26,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_scotrsht(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(scotrsht_interrupt); }; diff --git a/src/mame/includes/segag80r.h b/src/mame/includes/segag80r.h index c35b12a9e95..dca5a3c05d5 100644 --- a/src/mame/includes/segag80r.h +++ b/src/mame/includes/segag80r.h @@ -99,6 +99,8 @@ public: virtual void machine_start(); virtual void video_start(); UINT32 screen_update_segag80r(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(segag80r_vblank_start); + INTERRUPT_GEN_MEMBER(sindbadm_vblank_start); }; @@ -116,6 +118,3 @@ MACHINE_CONFIG_EXTERN( monsterb_sound_board ); #define G80_BACKGROUND_MONSTERB 2 #define G80_BACKGROUND_PIGNEWT 3 #define G80_BACKGROUND_SINDBADM 4 - -INTERRUPT_GEN( segag80r_vblank_start ); -INTERRUPT_GEN( sindbadm_vblank_start ); diff --git a/src/mame/includes/segas32.h b/src/mame/includes/segas32.h index 6b1f7a4296b..f0d3f6fe5e1 100644 --- a/src/mame/includes/segas32.h +++ b/src/mame/includes/segas32.h @@ -177,6 +177,7 @@ public: UINT32 screen_update_system32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_multi32_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_multi32_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(start_of_vblank_int); }; /*----------- defined in machine/segas32.c -----------*/ diff --git a/src/mame/includes/seibuspi.h b/src/mame/includes/seibuspi.h index 94529b6963d..3d4affcaf8c 100644 --- a/src/mame/includes/seibuspi.h +++ b/src/mame/includes/seibuspi.h @@ -115,6 +115,7 @@ public: DECLARE_MACHINE_RESET(sxx2f); UINT32 screen_update_spi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_sys386f2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(spi_interrupt); }; /*----------- defined in machine/spisprit.c -----------*/ void seibuspi_sprite_decrypt(UINT8 *src, int romsize); diff --git a/src/mame/includes/seicross.h b/src/mame/includes/seicross.h index c6a86eedb02..808292db910 100644 --- a/src/mame/includes/seicross.h +++ b/src/mame/includes/seicross.h @@ -30,4 +30,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_seicross(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/senjyo.h b/src/mame/includes/senjyo.h index eb3fbe7366c..1d42befacfe 100644 --- a/src/mame/includes/senjyo.h +++ b/src/mame/includes/senjyo.h @@ -82,6 +82,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_senjyo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(senjyo_interrupt); }; /*----------- defined in audio/senjyo.c -----------*/ diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h index dafb2286610..f2e3641dbf6 100644 --- a/src/mame/includes/seta.h +++ b/src/mame/includes/seta.h @@ -198,6 +198,7 @@ public: UINT32 screen_update_seta_layers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_seta_buffer_sprites(screen_device &screen, bool state); void screen_eof_setaroul(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(wrofaero_interrupt); }; /*----------- defined in video/seta.c -----------*/ diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h index 31800283a18..629d0f1921c 100644 --- a/src/mame/includes/seta2.h +++ b/src/mame/includes/seta2.h @@ -71,4 +71,7 @@ public: DECLARE_VIDEO_START(seta2_xoffset); UINT32 screen_update_seta2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_seta2(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(seta2_interrupt); + INTERRUPT_GEN_MEMBER(samshoot_interrupt); + INTERRUPT_GEN_MEMBER(funcube_sub_timer_irq); }; diff --git a/src/mame/includes/simpl156.h b/src/mame/includes/simpl156.h index 3b1a7d72a23..052ac66f191 100644 --- a/src/mame/includes/simpl156.h +++ b/src/mame/includes/simpl156.h @@ -59,4 +59,5 @@ public: DECLARE_DRIVER_INIT(chainrec); virtual void video_start(); UINT32 screen_update_simpl156(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(simpl156_vbl_interrupt); }; diff --git a/src/mame/includes/simpsons.h b/src/mame/includes/simpsons.h index da3618f5c8f..2cbd5817229 100644 --- a/src/mame/includes/simpsons.h +++ b/src/mame/includes/simpsons.h @@ -40,6 +40,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_simpsons(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(simpsons_irq); }; /*----------- defined in machine/simpsons.c -----------*/ diff --git a/src/mame/includes/skydiver.h b/src/mame/includes/skydiver.h index 25cefd5221c..5e64fd66d8a 100644 --- a/src/mame/includes/skydiver.h +++ b/src/mame/includes/skydiver.h @@ -51,6 +51,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_skydiver(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(skydiver_interrupt); }; /*----------- defined in audio/skydiver.c -----------*/ diff --git a/src/mame/includes/skyfox.h b/src/mame/includes/skyfox.h index 7b96337928d..5c50bf75993 100644 --- a/src/mame/includes/skyfox.h +++ b/src/mame/includes/skyfox.h @@ -32,4 +32,5 @@ public: virtual void machine_reset(); virtual void palette_init(); UINT32 screen_update_skyfox(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(skyfox_interrupt); }; diff --git a/src/mame/includes/skykid.h b/src/mame/includes/skykid.h index 3b5b1afe39b..dcced65541f 100644 --- a/src/mame/includes/skykid.h +++ b/src/mame/includes/skykid.h @@ -41,4 +41,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_skykid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(main_vblank_irq); + INTERRUPT_GEN_MEMBER(mcu_vblank_irq); }; diff --git a/src/mame/includes/slapfght.h b/src/mame/includes/slapfght.h index 9d36cc26a8e..9f562c14c9e 100644 --- a/src/mame/includes/slapfght.h +++ b/src/mame/includes/slapfght.h @@ -125,6 +125,8 @@ public: DECLARE_VIDEO_START(slapfight); UINT32 screen_update_perfrman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_slapfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(getstar_interrupt); }; @@ -141,6 +143,3 @@ public: m_gs_d = 0; \ m_gs_e = 0; - -/*----------- defined in machine/slapfght.c -----------*/ -INTERRUPT_GEN( getstar_interrupt ); diff --git a/src/mame/includes/slapshot.h b/src/mame/includes/slapshot.h index 070bbe928c0..b0e1b6f319f 100644 --- a/src/mame/includes/slapshot.h +++ b/src/mame/includes/slapshot.h @@ -66,5 +66,6 @@ public: virtual void video_start(); UINT32 screen_update_slapshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_taito_no_buffer(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(slapshot_interrupt); }; diff --git a/src/mame/includes/snk6502.h b/src/mame/includes/snk6502.h index a42c0323ec0..f7563a1f284 100644 --- a/src/mame/includes/snk6502.h +++ b/src/mame/includes/snk6502.h @@ -61,6 +61,8 @@ public: DECLARE_MACHINE_RESET(pballoon); DECLARE_VIDEO_START(pballoon); UINT32 screen_update_snk6502(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(satansat_interrupt); + INTERRUPT_GEN_MEMBER(snk6502_interrupt); }; diff --git a/src/mame/includes/solomon.h b/src/mame/includes/solomon.h index 84d4941ff31..5c5b11d33ec 100644 --- a/src/mame/includes/solomon.h +++ b/src/mame/includes/solomon.h @@ -31,4 +31,5 @@ public: TILE_GET_INFO_MEMBER(get_fg_tile_info); virtual void video_start(); UINT32 screen_update_solomon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h index f70fbe87a2a..0a954da2b4e 100644 --- a/src/mame/includes/spcforce.h +++ b/src/mame/includes/spcforce.h @@ -34,4 +34,5 @@ public: DECLARE_WRITE8_MEMBER(spcforce_flip_screen_w); virtual void palette_init(); UINT32 screen_update_spcforce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/spiders.h b/src/mame/includes/spiders.h index f2e61ca8cb1..0058d32a24d 100644 --- a/src/mame/includes/spiders.h +++ b/src/mame/includes/spiders.h @@ -29,6 +29,7 @@ public: DECLARE_WRITE8_MEMBER(gfx_rom_intf_w); DECLARE_READ8_MEMBER(gfx_rom_r); virtual void machine_start(); + INTERRUPT_GEN_MEMBER(update_pia_1); }; /*----------- defined in audio/spiders.c -----------*/ diff --git a/src/mame/includes/splash.h b/src/mame/includes/splash.h index 05c5e4b6d9f..b3d35db4b25 100644 --- a/src/mame/includes/splash.h +++ b/src/mame/includes/splash.h @@ -64,4 +64,5 @@ public: DECLARE_MACHINE_RESET(funystrp); UINT32 screen_update_splash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_funystrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(roldfrog_interrupt); }; diff --git a/src/mame/includes/sprcros2.h b/src/mame/includes/sprcros2.h index 781c89b7f6d..fdf2ea0b5d0 100644 --- a/src/mame/includes/sprcros2.h +++ b/src/mame/includes/sprcros2.h @@ -31,4 +31,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_sprcros2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sprcros2_s_interrupt); }; diff --git a/src/mame/includes/sprint2.h b/src/mame/includes/sprint2.h index ae527fea815..59d0c2f04c5 100644 --- a/src/mame/includes/sprint2.h +++ b/src/mame/includes/sprint2.h @@ -66,6 +66,7 @@ public: virtual void palette_init(); UINT32 screen_update_sprint2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_sprint2(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(sprint2); }; /*----------- defined in audio/sprint2.c -----------*/ diff --git a/src/mame/includes/spy.h b/src/mame/includes/spy.h index 5db7af6b6b4..fe892dfd9bf 100644 --- a/src/mame/includes/spy.h +++ b/src/mame/includes/spy.h @@ -45,6 +45,7 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_spy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(spy_interrupt); }; /*----------- defined in video/spy.c -----------*/ diff --git a/src/mame/includes/ssozumo.h b/src/mame/includes/ssozumo.h index 81f84f7917c..ddce6e12cb4 100644 --- a/src/mame/includes/ssozumo.h +++ b/src/mame/includes/ssozumo.h @@ -36,4 +36,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_ssozumo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sound_timer_irq); }; diff --git a/src/mame/includes/stactics.h b/src/mame/includes/stactics.h index 68bb71ccccf..6b521ed866c 100644 --- a/src/mame/includes/stactics.h +++ b/src/mame/includes/stactics.h @@ -60,6 +60,7 @@ public: DECLARE_VIDEO_START(stactics); DECLARE_PALETTE_INIT(stactics); UINT32 screen_update_stactics(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(stactics_interrupt); }; /*----------- defined in video/stactics.c -----------*/ MACHINE_CONFIG_EXTERN( stactics_video ); diff --git a/src/mame/includes/starshp1.h b/src/mame/includes/starshp1.h index 238079f6c67..cc006978627 100644 --- a/src/mame/includes/starshp1.h +++ b/src/mame/includes/starshp1.h @@ -80,6 +80,7 @@ public: virtual void palette_init(); UINT32 screen_update_starshp1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_starshp1(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(starshp1_interrupt); }; /*----------- defined in audio/starshp1.c -----------*/ diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h index b285d45b3e6..ba8f1327070 100644 --- a/src/mame/includes/stfight.h +++ b/src/mame/includes/stfight.h @@ -46,10 +46,10 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_stfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(stfight_vb_interrupt); }; /*----------- defined in machine/stfight.c -----------*/ -INTERRUPT_GEN( stfight_vb_interrupt ); void stfight_adpcm_int(device_t *device); DECLARE_WRITE8_DEVICE_HANDLER( stfight_adpcm_control_w ); diff --git a/src/mame/includes/subs.h b/src/mame/includes/subs.h index 4a8bc36e9e3..0df9e94d535 100644 --- a/src/mame/includes/subs.h +++ b/src/mame/includes/subs.h @@ -44,12 +44,9 @@ public: virtual void palette_init(); UINT32 screen_update_subs_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_subs_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(subs_interrupt); }; - -/*----------- defined in machine/subs.c -----------*/ -INTERRUPT_GEN( subs_interrupt ); - /*----------- defined in audio/subs.c -----------*/ DECLARE_WRITE8_DEVICE_HANDLER( subs_noise_reset_w ); diff --git a/src/mame/includes/superqix.h b/src/mame/includes/superqix.h index 9168aa3c00e..a17780062d4 100644 --- a/src/mame/includes/superqix.h +++ b/src/mame/includes/superqix.h @@ -78,4 +78,6 @@ public: DECLARE_VIDEO_START(superqix); UINT32 screen_update_pbillian(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_superqix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(sqix_timer_irq); }; diff --git a/src/mame/includes/suprridr.h b/src/mame/includes/suprridr.h index 159e5610ba2..f3043d0ddce 100644 --- a/src/mame/includes/suprridr.h +++ b/src/mame/includes/suprridr.h @@ -41,6 +41,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_suprridr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(main_nmi_gen); }; /*----------- defined in video/suprridr.c -----------*/ diff --git a/src/mame/includes/surpratk.h b/src/mame/includes/surpratk.h index ebafb196e17..6bc9f19b90e 100644 --- a/src/mame/includes/surpratk.h +++ b/src/mame/includes/surpratk.h @@ -35,6 +35,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_surpratk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(surpratk_interrupt); }; /*----------- defined in video/surpratk.c -----------*/ diff --git a/src/mame/includes/system1.h b/src/mame/includes/system1.h index 294927932f0..58c1af73fed 100644 --- a/src/mame/includes/system1.h +++ b/src/mame/includes/system1.h @@ -107,6 +107,7 @@ public: UINT32 screen_update_system1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_system2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_system2_rowscroll(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(mcu_irq_assert); }; diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index d381990b79a..5869ca0b172 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -193,4 +193,5 @@ public: UINT32 screen_update_system18old(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_s16a_bootleg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_s16a_bootleg_passht4b(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sys16_interrupt); }; diff --git a/src/mame/includes/tagteam.h b/src/mame/includes/tagteam.h index 9702e7cd1fb..ca7979415f1 100644 --- a/src/mame/includes/tagteam.h +++ b/src/mame/includes/tagteam.h @@ -28,4 +28,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_tagteam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sound_timer_irq); }; diff --git a/src/mame/includes/taito_b.h b/src/mame/includes/taito_b.h index 4a968ed7370..c0dabbf122f 100644 --- a/src/mame/includes/taito_b.h +++ b/src/mame/includes/taito_b.h @@ -73,4 +73,15 @@ public: UINT32 screen_update_taitob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void screen_eof_taitob(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(rastansaga2_interrupt); + INTERRUPT_GEN_MEMBER(crimec_interrupt); + INTERRUPT_GEN_MEMBER(hitice_interrupt); + INTERRUPT_GEN_MEMBER(rambo3_interrupt); + INTERRUPT_GEN_MEMBER(pbobble_interrupt); + INTERRUPT_GEN_MEMBER(viofight_interrupt); + INTERRUPT_GEN_MEMBER(masterw_interrupt); + INTERRUPT_GEN_MEMBER(silentd_interrupt); + INTERRUPT_GEN_MEMBER(selfeena_interrupt); + INTERRUPT_GEN_MEMBER(sbm_interrupt); + INTERRUPT_GEN_MEMBER(realpunc_interrupt); }; diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index 7b5c0130fe2..05c6213cbde 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -142,4 +142,5 @@ public: void screen_eof_taitof2_partial_buffer_delayed_thundfox(screen_device &screen, bool state); void screen_eof_taitof2_full_buffer_delayed(screen_device &screen, bool state); void screen_eof_taitof2_partial_buffer_delayed_qzchikyu(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(taitof2_interrupt); }; diff --git a/src/mame/includes/taito_f3.h b/src/mame/includes/taito_f3.h index 324e79ca053..2c310de5739 100644 --- a/src/mame/includes/taito_f3.h +++ b/src/mame/includes/taito_f3.h @@ -272,4 +272,5 @@ public: DECLARE_VIDEO_START(f3); UINT32 screen_update_f3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void screen_eof_f3(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(f3_interrupt2); }; diff --git a/src/mame/includes/taito_z.h b/src/mame/includes/taito_z.h index f12c00b3f28..c3f06f3f437 100644 --- a/src/mame/includes/taito_z.h +++ b/src/mame/includes/taito_z.h @@ -85,4 +85,5 @@ public: UINT32 screen_update_spacegun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_dblaxle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_racingb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sci_interrupt); }; diff --git a/src/mame/includes/taitojc.h b/src/mame/includes/taitojc.h index 34b2248c679..005fb112ec1 100644 --- a/src/mame/includes/taitojc.h +++ b/src/mame/includes/taitojc.h @@ -161,6 +161,7 @@ public: virtual void video_start(); UINT32 screen_update_taitojc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_dendego(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(taitojc_vblank); }; diff --git a/src/mame/includes/tankbatt.h b/src/mame/includes/tankbatt.h index c680c733ef5..f68c2e75254 100644 --- a/src/mame/includes/tankbatt.h +++ b/src/mame/includes/tankbatt.h @@ -30,4 +30,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_tankbatt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(tankbatt_interrupt); }; diff --git a/src/mame/includes/tankbust.h b/src/mame/includes/tankbust.h index afe70b06760..580ce0dc78e 100644 --- a/src/mame/includes/tankbust.h +++ b/src/mame/includes/tankbust.h @@ -43,4 +43,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_tankbust(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/tatsumi.h b/src/mame/includes/tatsumi.h index 9254974d0a2..6c184e73192 100644 --- a/src/mame/includes/tatsumi.h +++ b/src/mame/includes/tatsumi.h @@ -124,6 +124,7 @@ public: UINT32 screen_update_roundup5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_cyclwarr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_bigfight(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(roundup5_interrupt); }; /*----------- defined in machine/tatsumi.c -----------*/ diff --git a/src/mame/includes/tceptor.h b/src/mame/includes/tceptor.h index 1b3c699cfe9..1b3067a388f 100644 --- a/src/mame/includes/tceptor.h +++ b/src/mame/includes/tceptor.h @@ -64,4 +64,7 @@ public: UINT32 screen_update_tceptor_3d_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_tceptor_3d_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_tceptor(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(m6809_vb_interrupt); + INTERRUPT_GEN_MEMBER(m68k_vb_interrupt); + INTERRUPT_GEN_MEMBER(mcu_vb_interrupt); }; diff --git a/src/mame/includes/thedeep.h b/src/mame/includes/thedeep.h index 9ea4d5a4b75..88fab684fe0 100644 --- a/src/mame/includes/thedeep.h +++ b/src/mame/includes/thedeep.h @@ -50,4 +50,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_thedeep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(thedeep_mcu_irq); }; diff --git a/src/mame/includes/thepit.h b/src/mame/includes/thepit.h index 0c45f6f52da..8bdf670d58d 100644 --- a/src/mame/includes/thepit.h +++ b/src/mame/includes/thepit.h @@ -39,4 +39,5 @@ public: virtual void palette_init(); DECLARE_PALETTE_INIT(suprmous); UINT32 screen_update_thepit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/thief.h b/src/mame/includes/thief.h index d20e4d6cb44..c0a9e9878e7 100644 --- a/src/mame/includes/thief.h +++ b/src/mame/includes/thief.h @@ -34,4 +34,5 @@ public: DECLARE_DRIVER_INIT(thief); virtual void video_start(); UINT32 screen_update_thief(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(thief_interrupt); }; diff --git a/src/mame/includes/thunderx.h b/src/mame/includes/thunderx.h index 0c60e788eb5..4e21b807064 100644 --- a/src/mame/includes/thunderx.h +++ b/src/mame/includes/thunderx.h @@ -51,6 +51,7 @@ public: DECLARE_MACHINE_START(thunderx); DECLARE_MACHINE_RESET(thunderx); UINT32 screen_update_scontra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(scontra_interrupt); }; diff --git a/src/mame/includes/timelimt.h b/src/mame/includes/timelimt.h index dc415dfc8f0..7c52f4c0935 100644 --- a/src/mame/includes/timelimt.h +++ b/src/mame/includes/timelimt.h @@ -29,4 +29,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_timelimt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(timelimt_irq); }; diff --git a/src/mame/includes/timeplt.h b/src/mame/includes/timeplt.h index 4e7e42355ff..613efed9fe4 100644 --- a/src/mame/includes/timeplt.h +++ b/src/mame/includes/timeplt.h @@ -51,4 +51,5 @@ public: virtual void palette_init(); DECLARE_VIDEO_START(chkun); UINT32 screen_update_timeplt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(timeplt_interrupt); }; diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h index 65dfdb807d2..1bd11cc3e90 100644 --- a/src/mame/includes/tmnt.h +++ b/src/mame/includes/tmnt.h @@ -140,6 +140,10 @@ public: UINT32 screen_update_tmnt2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_thndrx2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_blswhstl(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(cuebrick_interrupt); + INTERRUPT_GEN_MEMBER(punkshot_interrupt); + INTERRUPT_GEN_MEMBER(lgtnfght_interrupt); + INTERRUPT_GEN_MEMBER(tmnt_vblank_irq); }; diff --git a/src/mame/includes/tnzs.h b/src/mame/includes/tnzs.h index 376d756566d..db31970aea7 100644 --- a/src/mame/includes/tnzs.h +++ b/src/mame/includes/tnzs.h @@ -98,8 +98,5 @@ public: DECLARE_MACHINE_RESET(jpopnics); UINT32 screen_update_tnzs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_tnzs(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(arknoid2_interrupt); }; - - -/*----------- defined in machine/tnzs.c -----------*/ -INTERRUPT_GEN( arknoid2_interrupt ); diff --git a/src/mame/includes/toaplan1.h b/src/mame/includes/toaplan1.h index c93fe0d0d9a..9ea323ebd02 100644 --- a/src/mame/includes/toaplan1.h +++ b/src/mame/includes/toaplan1.h @@ -143,12 +143,11 @@ public: void screen_eof_rallybik(screen_device &screen, bool state); void screen_eof_toaplan1(screen_device &screen, bool state); void screen_eof_samesame(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(toaplan1_interrupt); }; /*----------- defined in machine/toaplan1.c -----------*/ - -INTERRUPT_GEN( toaplan1_interrupt ); void toaplan1_driver_savestate(running_machine &machine); void demonwld_driver_savestate(running_machine &machine); void vimana_driver_savestate(running_machine &machine); diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h index f396facdcc5..ba74b88da16 100644 --- a/src/mame/includes/toaplan2.h +++ b/src/mame/includes/toaplan2.h @@ -127,4 +127,8 @@ public: UINT32 screen_update_toaplan2_dual(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_toaplan2_mixed(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_toaplan2(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(toaplan2_vblank_irq1); + INTERRUPT_GEN_MEMBER(toaplan2_vblank_irq2); + INTERRUPT_GEN_MEMBER(toaplan2_vblank_irq4); + INTERRUPT_GEN_MEMBER(bbakraid_snd_interrupt); }; diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h index bd1fa891a13..3a10dfa4a37 100644 --- a/src/mame/includes/topspeed.h +++ b/src/mame/includes/topspeed.h @@ -55,4 +55,6 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_topspeed(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(topspeed_interrupt); + INTERRUPT_GEN_MEMBER(topspeed_cpub_interrupt); }; diff --git a/src/mame/includes/toypop.h b/src/mame/includes/toypop.h index 50c06fe1656..93df15890ce 100644 --- a/src/mame/includes/toypop.h +++ b/src/mame/includes/toypop.h @@ -50,4 +50,7 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_toypop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(toypop_main_vblank_irq); + INTERRUPT_GEN_MEMBER(toypop_sound_timer_irq); + INTERRUPT_GEN_MEMBER(toypop_m68000_interrupt); }; diff --git a/src/mame/includes/tp84.h b/src/mame/includes/tp84.h index c02cb68cdd8..d38523066c2 100644 --- a/src/mame/includes/tp84.h +++ b/src/mame/includes/tp84.h @@ -41,4 +41,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_tp84(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(sub_vblank_irq); }; diff --git a/src/mame/includes/trackfld.h b/src/mame/includes/trackfld.h index 6c4e400ab44..f224e7e230d 100644 --- a/src/mame/includes/trackfld.h +++ b/src/mame/includes/trackfld.h @@ -66,4 +66,7 @@ public: DECLARE_PALETTE_INIT(trackfld); DECLARE_VIDEO_START(atlantol); UINT32 screen_update_trackfld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(vblank_nmi); + INTERRUPT_GEN_MEMBER(yieartf_timer_irq); }; diff --git a/src/mame/includes/truco.h b/src/mame/includes/truco.h index 59c79674d8a..d2df2f4f31d 100644 --- a/src/mame/includes/truco.h +++ b/src/mame/includes/truco.h @@ -17,4 +17,5 @@ public: virtual void machine_reset(); virtual void palette_init(); UINT32 screen_update_truco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(truco_interrupt); }; diff --git a/src/mame/includes/trucocl.h b/src/mame/includes/trucocl.h index 2c685e5212e..ed61c222ef2 100644 --- a/src/mame/includes/trucocl.h +++ b/src/mame/includes/trucocl.h @@ -22,4 +22,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_trucocl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(trucocl_interrupt); }; diff --git a/src/mame/includes/tsamurai.h b/src/mame/includes/tsamurai.h index 8e94aa86133..dda28e3a0a4 100644 --- a/src/mame/includes/tsamurai.h +++ b/src/mame/includes/tsamurai.h @@ -59,4 +59,6 @@ public: DECLARE_VIDEO_START(vsgongf); UINT32 screen_update_tsamurai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(samurai_interrupt); + INTERRUPT_GEN_MEMBER(vsgongf_sound_interrupt); }; diff --git a/src/mame/includes/tumbleb.h b/src/mame/includes/tumbleb.h index 27ed21800c2..7c3fc8501f5 100644 --- a/src/mame/includes/tumbleb.h +++ b/src/mame/includes/tumbleb.h @@ -101,4 +101,5 @@ public: UINT32 screen_update_bcstory(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_semibase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_sdfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(tumbleb2_interrupt); }; diff --git a/src/mame/includes/tutankhm.h b/src/mame/includes/tutankhm.h index 7547cbafe59..52bfc917efc 100644 --- a/src/mame/includes/tutankhm.h +++ b/src/mame/includes/tutankhm.h @@ -32,4 +32,5 @@ public: DECLARE_MACHINE_START(tutankhm); DECLARE_MACHINE_RESET(tutankhm); UINT32 screen_update_tutankhm(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(tutankhm_interrupt); }; diff --git a/src/mame/includes/twin16.h b/src/mame/includes/twin16.h index 276af8262c0..880ec71021f 100644 --- a/src/mame/includes/twin16.h +++ b/src/mame/includes/twin16.h @@ -63,6 +63,8 @@ public: DECLARE_VIDEO_START(twin16); UINT32 screen_update_twin16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_twin16(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(CPUA_interrupt); + INTERRUPT_GEN_MEMBER(CPUB_interrupt); }; /*----------- defined in drivers/twin16.c -----------*/ diff --git a/src/mame/includes/twincobr.h b/src/mame/includes/twincobr.h index 36c5f5b505c..0708abc73fb 100644 --- a/src/mame/includes/twincobr.h +++ b/src/mame/includes/twincobr.h @@ -105,13 +105,12 @@ public: DECLARE_VIDEO_START(toaplan0); DECLARE_MACHINE_RESET(wardner); UINT32 screen_update_toaplan0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(twincobr_interrupt); + INTERRUPT_GEN_MEMBER(wardner_interrupt); }; /*----------- defined in machine/twincobr.c -----------*/ - -INTERRUPT_GEN( twincobr_interrupt ); -INTERRUPT_GEN( wardner_interrupt ); extern void twincobr_driver_savestate(running_machine &machine); /*----------- defined in video/twincobr.c -----------*/ diff --git a/src/mame/includes/tx1.h b/src/mame/includes/tx1.h index 6954475c090..a8e07730f5b 100644 --- a/src/mame/includes/tx1.h +++ b/src/mame/includes/tx1.h @@ -177,6 +177,7 @@ public: UINT32 screen_update_buggybjr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_tx1(screen_device &screen, bool state); void screen_eof_buggyboy(screen_device &screen, bool state); + INTERRUPT_GEN_MEMBER(z80_irq); }; /*----------- defined in audio/tx1.c -----------*/ diff --git a/src/mame/includes/undrfire.h b/src/mame/includes/undrfire.h index 130c7107e5f..ae73805f827 100644 --- a/src/mame/includes/undrfire.h +++ b/src/mame/includes/undrfire.h @@ -45,4 +45,5 @@ public: virtual void video_start(); UINT32 screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(undrfire_interrupt); }; diff --git a/src/mame/includes/vastar.h b/src/mame/includes/vastar.h index b4c3ed19d92..cc367326d46 100644 --- a/src/mame/includes/vastar.h +++ b/src/mame/includes/vastar.h @@ -47,4 +47,5 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_vastar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/vendetta.h b/src/mame/includes/vendetta.h index 852d7059c94..cbf700ef64e 100644 --- a/src/mame/includes/vendetta.h +++ b/src/mame/includes/vendetta.h @@ -44,6 +44,7 @@ public: virtual void machine_start(); virtual void machine_reset(); UINT32 screen_update_vendetta(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vendetta_irq); }; /*----------- defined in video/vendetta.c -----------*/ diff --git a/src/mame/includes/vertigo.h b/src/mame/includes/vertigo.h index 9b5cc09123f..292a48786e1 100644 --- a/src/mame/includes/vertigo.h +++ b/src/mame/includes/vertigo.h @@ -110,6 +110,7 @@ public: DECLARE_WRITE16_MEMBER(vertigo_pit8254_lsb_w); virtual void machine_start(); virtual void machine_reset(); + INTERRUPT_GEN_MEMBER(vertigo_interrupt); }; /*----------- defined in machine/vertigo.c -----------*/ @@ -118,8 +119,6 @@ void vertigo_update_irq(device_t *device); extern const struct pit8253_config vertigo_pit8254_config; -INTERRUPT_GEN( vertigo_interrupt ); - /*----------- defined in video/vertigo.c -----------*/ void vertigo_vproc_init(running_machine &machine); diff --git a/src/mame/includes/victory.h b/src/mame/includes/victory.h index 5a2222443f6..b757ae835de 100644 --- a/src/mame/includes/victory.h +++ b/src/mame/includes/victory.h @@ -62,8 +62,5 @@ public: DECLARE_WRITE8_MEMBER(victory_video_control_w); virtual void video_start(); UINT32 screen_update_victory(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(victory_vblank_interrupt); }; - - -/*----------- defined in video/victory.c -----------*/ -INTERRUPT_GEN( victory_vblank_interrupt ); diff --git a/src/mame/includes/vulgus.h b/src/mame/includes/vulgus.h index def89799105..7c470c75319 100644 --- a/src/mame/includes/vulgus.h +++ b/src/mame/includes/vulgus.h @@ -26,4 +26,5 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_vulgus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vulgus_vblank_irq); }; diff --git a/src/mame/includes/warpwarp.h b/src/mame/includes/warpwarp.h index 8203f68e4b4..5bd3d822421 100644 --- a/src/mame/includes/warpwarp.h +++ b/src/mame/includes/warpwarp.h @@ -47,6 +47,7 @@ public: DECLARE_VIDEO_START(navarone); DECLARE_PALETTE_INIT(navarone); UINT32 screen_update_geebee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/wecleman.h b/src/mame/includes/wecleman.h index cf326a8e560..619947323c7 100644 --- a/src/mame/includes/wecleman.h +++ b/src/mame/includes/wecleman.h @@ -78,6 +78,7 @@ public: DECLARE_VIDEO_START(hotchase); UINT32 screen_update_wecleman(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_hotchase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(hotchase_sound_timer); }; /*----------- defined in video/wecleman.c -----------*/ diff --git a/src/mame/includes/wgp.h b/src/mame/includes/wgp.h index aa052350ead..58cedfe76a6 100644 --- a/src/mame/includes/wgp.h +++ b/src/mame/includes/wgp.h @@ -69,4 +69,5 @@ public: virtual void video_start(); DECLARE_VIDEO_START(wgp2); UINT32 screen_update_wgp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(wgp_cpub_interrupt); }; diff --git a/src/mame/includes/wiping.h b/src/mame/includes/wiping.h index 8093c7ff858..daf72f2df7e 100644 --- a/src/mame/includes/wiping.h +++ b/src/mame/includes/wiping.h @@ -22,4 +22,6 @@ public: DECLARE_WRITE8_MEMBER(wiping_flipscreen_w); virtual void palette_init(); UINT32 screen_update_wiping(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(sound_timer_irq); }; diff --git a/src/mame/includes/wiz.h b/src/mame/includes/wiz.h index 862a858f47d..211d85244c3 100644 --- a/src/mame/includes/wiz.h +++ b/src/mame/includes/wiz.h @@ -51,4 +51,6 @@ public: UINT32 screen_update_wiz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_stinger(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_kungfut(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(wiz_vblank_interrupt); + INTERRUPT_GEN_MEMBER(wiz_sound_interrupt); }; diff --git a/src/mame/includes/xxmissio.h b/src/mame/includes/xxmissio.h index ff67e217257..536e06aa0f7 100644 --- a/src/mame/includes/xxmissio.h +++ b/src/mame/includes/xxmissio.h @@ -29,6 +29,8 @@ public: virtual void machine_start(); virtual void video_start(); UINT32 screen_update_xxmissio(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(xxmissio_interrupt_m); + INTERRUPT_GEN_MEMBER(xxmissio_interrupt_s); }; DECLARE_WRITE8_DEVICE_HANDLER( xxmissio_scroll_x_w ); diff --git a/src/mame/includes/yiear.h b/src/mame/includes/yiear.h index c1ade688e46..ca8044a5b57 100644 --- a/src/mame/includes/yiear.h +++ b/src/mame/includes/yiear.h @@ -36,4 +36,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_yiear(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(yiear_vblank_interrupt); + INTERRUPT_GEN_MEMBER(yiear_nmi_interrupt); }; diff --git a/src/mame/includes/zaccaria.h b/src/mame/includes/zaccaria.h index 7399f89a3af..7e5a453b483 100644 --- a/src/mame/includes/zaccaria.h +++ b/src/mame/includes/zaccaria.h @@ -45,4 +45,6 @@ public: virtual void video_start(); virtual void palette_init(); UINT32 screen_update_zaccaria(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(zaccaria_cb1_toggle); + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/zaxxon.h b/src/mame/includes/zaxxon.h index d4f8c763079..03a8d223541 100644 --- a/src/mame/includes/zaxxon.h +++ b/src/mame/includes/zaxxon.h @@ -72,6 +72,7 @@ public: UINT32 screen_update_futspy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_razmataz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_congo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(vblank_int); }; diff --git a/src/mame/includes/zodiack.h b/src/mame/includes/zodiack.h index 11107f62dcd..df82552b6c9 100644 --- a/src/mame/includes/zodiack.h +++ b/src/mame/includes/zodiack.h @@ -67,6 +67,7 @@ public: TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); DECLARE_PALETTE_INIT(zodiack); + INTERRUPT_GEN_MEMBER(zodiack_sound_nmi_gen); }; class percuss_state : public zodiack_state diff --git a/src/mame/machine/ajax.c b/src/mame/machine/ajax.c index 286044694eb..477755889c5 100644 --- a/src/mame/machine/ajax.c +++ b/src/mame/machine/ajax.c @@ -225,10 +225,9 @@ void ajax_state::machine_reset() m_firq_enable = 0; } -INTERRUPT_GEN( ajax_interrupt ) +INTERRUPT_GEN_MEMBER(ajax_state::ajax_interrupt) { - ajax_state *state = device->machine().driver_data(); - if (k051960_is_irq_enabled(state->m_k051960)) - device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); + if (k051960_is_irq_enabled(m_k051960)) + device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } diff --git a/src/mame/machine/asteroid.c b/src/mame/machine/asteroid.c index 192f0020b9f..a8681e806a6 100644 --- a/src/mame/machine/asteroid.c +++ b/src/mame/machine/asteroid.c @@ -13,25 +13,25 @@ #include "includes/asteroid.h" -INTERRUPT_GEN( asteroid_interrupt ) +INTERRUPT_GEN_MEMBER(asteroid_state::asteroid_interrupt) { /* Turn off interrupts if self-test is enabled */ - if (!(device->machine().root_device().ioport("IN0")->read() & 0x80)) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (!(machine().root_device().ioport("IN0")->read() & 0x80)) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -INTERRUPT_GEN( asterock_interrupt ) +INTERRUPT_GEN_MEMBER(asteroid_state::asterock_interrupt) { /* Turn off interrupts if self-test is enabled */ - if ((device->machine().root_device().ioport("IN0")->read() & 0x80)) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if ((machine().root_device().ioport("IN0")->read() & 0x80)) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -INTERRUPT_GEN( llander_interrupt ) +INTERRUPT_GEN_MEMBER(asteroid_state::llander_interrupt) { /* Turn off interrupts if self-test is enabled */ - if (device->machine().root_device().ioport("IN0")->read() & 0x02) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (machine().root_device().ioport("IN0")->read() & 0x02) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } READ8_MEMBER(asteroid_state::asteroid_IN0_r) diff --git a/src/mame/machine/balsente.c b/src/mame/machine/balsente.c index 0a03899470f..5097e24b141 100644 --- a/src/mame/machine/balsente.c +++ b/src/mame/machine/balsente.c @@ -556,9 +556,8 @@ WRITE8_MEMBER(balsente_state::balsente_m6850_sound_w) * *************************************/ -INTERRUPT_GEN( balsente_update_analog_inputs ) +INTERRUPT_GEN_MEMBER(balsente_state::balsente_update_analog_inputs) { - balsente_state *state = device->machine().driver_data(); int i; static const char *const analog[] = { "AN0", "AN1", "AN2", "AN3" }; @@ -567,7 +566,7 @@ INTERRUPT_GEN( balsente_update_analog_inputs ) /* ports are read once a frame, just at varying intervals. To get around this, we */ /* read all the analog inputs at VBLANK time and just return the cached values. */ for (i = 0; i < 4; i++) - state->m_analog_input_data[i] = device->machine().root_device().ioport(analog[i])->read(); + m_analog_input_data[i] = machine().root_device().ioport(analog[i])->read(); } diff --git a/src/mame/machine/bublbobl.c b/src/mame/machine/bublbobl.c index 25e485f8beb..b657006ff2b 100644 --- a/src/mame/machine/bublbobl.c +++ b/src/mame/machine/bublbobl.c @@ -372,11 +372,11 @@ static TIMER_CALLBACK( bublbobl_m68705_irq_ack ) machine.device("mcu")->execute().set_input_line(0, CLEAR_LINE); } -INTERRUPT_GEN( bublbobl_m68705_interrupt ) +INTERRUPT_GEN_MEMBER(bublbobl_state::bublbobl_m68705_interrupt) { - device->execute().set_input_line(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 */ + machine().scheduler().timer_set(attotime::from_msec(1000/60), FUNC(bublbobl_m68705_irq_ack)); /* TODO: understand how this is ack'ed */ } diff --git a/src/mame/machine/carpolo.c b/src/mame/machine/carpolo.c index e62fcd9f657..7ef216990b8 100644 --- a/src/mame/machine/carpolo.c +++ b/src/mame/machine/carpolo.c @@ -202,27 +202,26 @@ READ8_MEMBER(carpolo_state::carpolo_interrupt_cause_r) } -INTERRUPT_GEN( carpolo_timer_interrupt ) +INTERRUPT_GEN_MEMBER(carpolo_state::carpolo_timer_interrupt) { - carpolo_state *state = device->machine().driver_data(); UINT8 port_value; int player; /* cause the timer interrupt */ - ttl74148_input_line_w(state->m_ttl74148_3s, PRI0_PRIORTITY_LINE, 0); - state->m_priority_0_extension = TIMER_EXTRA_BITS; + ttl74148_input_line_w(m_ttl74148_3s, PRI0_PRIORTITY_LINE, 0); + m_priority_0_extension = TIMER_EXTRA_BITS; - ttl74148_update(state->m_ttl74148_3s); + ttl74148_update(m_ttl74148_3s); /* check the coins here as well - they drive the clock of the flip-flops */ - port_value = state->ioport("IN0")->read(); + port_value = ioport("IN0")->read(); - state->m_ttl7474_2s_1->clock_w((port_value & 0x01) >> 0); - state->m_ttl7474_2s_2->clock_w((port_value & 0x02) >> 1); - state->m_ttl7474_2u_1->clock_w((port_value & 0x04) >> 2); - state->m_ttl7474_2u_2->clock_w((port_value & 0x08) >> 3); + m_ttl7474_2s_1->clock_w((port_value & 0x01) >> 0); + m_ttl7474_2s_2->clock_w((port_value & 0x02) >> 1); + m_ttl7474_2u_1->clock_w((port_value & 0x04) >> 2); + m_ttl7474_2u_2->clock_w((port_value & 0x08) >> 3); /* read the steering controls */ for (player = 0; player < 4; player++) @@ -234,20 +233,20 @@ INTERRUPT_GEN( carpolo_timer_interrupt ) switch (player) { default: - case 0: movement_flip_flop = state->m_ttl7474_1f_1; dir_flip_flop = state->m_ttl7474_1f_2; break; - case 1: movement_flip_flop = state->m_ttl7474_1d_1; dir_flip_flop = state->m_ttl7474_1d_2; break; - case 2: movement_flip_flop = state->m_ttl7474_1c_1; dir_flip_flop = state->m_ttl7474_1c_2; break; - case 3: movement_flip_flop = state->m_ttl7474_1a_1; dir_flip_flop = state->m_ttl7474_1a_2; break; + case 0: movement_flip_flop = m_ttl7474_1f_1; dir_flip_flop = m_ttl7474_1f_2; break; + case 1: movement_flip_flop = m_ttl7474_1d_1; dir_flip_flop = m_ttl7474_1d_2; break; + case 2: movement_flip_flop = m_ttl7474_1c_1; dir_flip_flop = m_ttl7474_1c_2; break; + case 3: movement_flip_flop = m_ttl7474_1a_1; dir_flip_flop = m_ttl7474_1a_2; break; } - port_value = device->machine().root_device().ioport(portnames[player])->read(); + port_value = machine().root_device().ioport(portnames[player])->read(); - if (port_value != state->m_last_wheel_value[player]) + if (port_value != m_last_wheel_value[player]) { /* set the movement direction */ - dir_flip_flop->d_w(((port_value - state->m_last_wheel_value[player]) & 0x80) ? 1 : 0); + dir_flip_flop->d_w(((port_value - m_last_wheel_value[player]) & 0x80) ? 1 : 0); - state->m_last_wheel_value[player] = port_value; + m_last_wheel_value[player] = port_value; } /* as the wheel moves, both flip-flops are clocked */ @@ -258,7 +257,7 @@ INTERRUPT_GEN( carpolo_timer_interrupt ) /* finally read the accelerator pedals */ - port_value = device->machine().root_device().ioport("PEDALS")->read(); + port_value = machine().root_device().ioport("PEDALS")->read(); for (player = 0; player < 4; player++) { @@ -266,24 +265,24 @@ INTERRUPT_GEN( carpolo_timer_interrupt ) how much, resulting in only two different possible levels */ if (port_value & 0x01) { - ttl74153_input_line_w(state->m_ttl74153_1k, 0, player, 1); - ttl74153_input_line_w(state->m_ttl74153_1k, 1, player, 0); + ttl74153_input_line_w(m_ttl74153_1k, 0, player, 1); + ttl74153_input_line_w(m_ttl74153_1k, 1, player, 0); } else if (port_value & 0x02) { - ttl74153_input_line_w(state->m_ttl74153_1k, 0, player, 1); - ttl74153_input_line_w(state->m_ttl74153_1k, 1, player, 1); + ttl74153_input_line_w(m_ttl74153_1k, 0, player, 1); + ttl74153_input_line_w(m_ttl74153_1k, 1, player, 1); } else { - ttl74153_input_line_w(state->m_ttl74153_1k, 0, player, 0); + ttl74153_input_line_w(m_ttl74153_1k, 0, player, 0); /* the other line is irrelevant */ } port_value >>= 2; } - ttl74153_update(state->m_ttl74153_1k); + ttl74153_update(m_ttl74153_1k); } // FIXME: Remove trampolines diff --git a/src/mame/machine/galaxold.c b/src/mame/machine/galaxold.c index f51c0ce6237..5748c637462 100644 --- a/src/mame/machine/galaxold.c +++ b/src/mame/machine/galaxold.c @@ -413,9 +413,9 @@ DRIVER_INIT_MEMBER(galaxold_state,4in1) state_save_register_global(machine(), m__4in1_bank); } -INTERRUPT_GEN( hunchbks_vh_interrupt ) +INTERRUPT_GEN_MEMBER(galaxold_state::hunchbks_vh_interrupt) { - generic_pulse_irq_line_and_vector(device,0,0x03,1); + generic_pulse_irq_line_and_vector(device.execute(),0,0x03,1); } DRIVER_INIT_MEMBER(galaxold_state,ladybugg) diff --git a/src/mame/machine/harddriv.c b/src/mame/machine/harddriv.c index 7d404ce5b9a..fd9d23c6065 100644 --- a/src/mame/machine/harddriv.c +++ b/src/mame/machine/harddriv.c @@ -113,11 +113,10 @@ static void hd68k_update_interrupts(running_machine &machine) } -INTERRUPT_GEN( hd68k_irq_gen ) +INTERRUPT_GEN_MEMBER(harddriv_state::hd68k_irq_gen) { - harddriv_state *state = device->machine().driver_data(); - state->m_irq_state = 1; - atarigen_update_interrupts(device->machine()); + m_irq_state = 1; + atarigen_update_interrupts(machine()); } diff --git a/src/mame/machine/leland.c b/src/mame/machine/leland.c index 72acbaea020..5cfc8ab501c 100644 --- a/src/mame/machine/leland.c +++ b/src/mame/machine/leland.c @@ -446,11 +446,11 @@ static TIMER_CALLBACK( ataxx_interrupt_callback ) } -INTERRUPT_GEN( leland_master_interrupt ) +INTERRUPT_GEN_MEMBER(leland_state::leland_master_interrupt) { /* check for coins here */ - if ((device->machine().root_device().ioport("IN1")->read() & 0x0e) != 0x0e) - device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + if ((machine().root_device().ioport("IN1")->read() & 0x0e) != 0x0e) + device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } diff --git a/src/mame/machine/mcr68.c b/src/mame/machine/mcr68.c index c8eb69ade74..489a47f2535 100644 --- a/src/mame/machine/mcr68.c +++ b/src/mame/machine/mcr68.c @@ -212,19 +212,18 @@ MACHINE_RESET_MEMBER(mcr68_state,zwackery) * *************************************/ -INTERRUPT_GEN( mcr68_interrupt ) +INTERRUPT_GEN_MEMBER(mcr68_state::mcr68_interrupt) { - mcr68_state *state = device->machine().driver_data(); /* update the 6840 VBLANK clock */ - if (!state->m_m6840_state[0].timer_active) - subtract_from_counter(device->machine(), 0, 1); + if (!m_m6840_state[0].timer_active) + subtract_from_counter(machine(), 0, 1); logerror("--- VBLANK ---\n"); /* also set a timer to generate the 493 signal at a specific time before the next VBLANK */ /* the timing of this is crucial for Blasted and Tri-Sports, which check the timing of */ /* VBLANK and 493 using counter 2 */ - device->machine().scheduler().timer_set(attotime::from_hz(30) - state->m_timing_factor, state->m_v493_callback, state->m_v493_callback_name); + machine().scheduler().timer_set(attotime::from_hz(30) - m_timing_factor, m_v493_callback, m_v493_callback_name); } diff --git a/src/mame/machine/mexico86.c b/src/mame/machine/mexico86.c index abf17184579..0c5be9d4e75 100644 --- a/src/mame/machine/mexico86.c +++ b/src/mame/machine/mexico86.c @@ -150,15 +150,14 @@ static void mcu_simulate( running_machine &machine ) } -INTERRUPT_GEN( kikikai_interrupt ) +INTERRUPT_GEN_MEMBER(mexico86_state::kikikai_interrupt) { - mexico86_state *state = device->machine().driver_data(); - if (state->m_mcu_running) - mcu_simulate(device->machine()); + if (m_mcu_running) + mcu_simulate(machine()); - device->execute().set_input_line_vector(0, state->m_protection_ram[0]); - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line_vector(0, m_protection_ram[0]); + device.execute().set_input_line(0, HOLD_LINE); } @@ -218,9 +217,9 @@ static void kiki_clogic(running_machine &machine, int address, int latch) ***************************************************************************/ -INTERRUPT_GEN( mexico86_m68705_interrupt ) +INTERRUPT_GEN_MEMBER(mexico86_state::mexico86_m68705_interrupt) { - device->execute().set_input_line(0, ASSERT_LINE); + device.execute().set_input_line(0, ASSERT_LINE); } diff --git a/src/mame/machine/namcos2.c b/src/mame/machine/namcos2.c index 218b7f80dfc..963bd22d841 100644 --- a/src/mame/machine/namcos2.c +++ b/src/mame/machine/namcos2.c @@ -680,29 +680,27 @@ void namcos2_adjust_posirq_timer( running_machine &machine, int scanline ) namcos2_posirq_timer->adjust(machine.primary_screen->time_until_pos(scanline, 80), scanline); } -INTERRUPT_GEN( namcos2_68k_master_vblank ) +INTERRUPT_GEN_MEMBER(namcos2_shared_state::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->execute().set_input_line(namcos2_68k_master_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); + if (!is_system21()) namcos2_adjust_posirq_timer(machine(), GetPosIRQScanline(machine())); + device.execute().set_input_line(namcos2_68k_master_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); } -INTERRUPT_GEN( namcos2_68k_slave_vblank ) +INTERRUPT_GEN_MEMBER(namcos2_shared_state::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->execute().set_input_line(namcos2_68k_slave_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); + if (!is_system21()) namcos2_adjust_posirq_timer(machine(), GetPosIRQScanline(machine())); + device.execute().set_input_line(namcos2_68k_slave_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); } -INTERRUPT_GEN( namcos2_68k_gpu_vblank ) +INTERRUPT_GEN_MEMBER(namcos2_shared_state::namcos2_68k_gpu_vblank) { /* only used by namcos21 */ - int scanline = GetPosIRQScanline(device->machine()); + int scanline = GetPosIRQScanline(machine()); scanline = 0x50+0x89; /* HACK for Winning Run */ //printf( "namcos2_68k_gpu_vblank(%d)\n",namcos2_68k_gpu_C148[NAMCOS2_C148_POSIRQ] ); - namcos2_adjust_posirq_timer(device->machine(), scanline); - device->execute().set_input_line(namcos2_68k_gpu_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); + namcos2_adjust_posirq_timer(machine(), scanline); + device.execute().set_input_line(namcos2_68k_gpu_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); } /**************************************************************/ diff --git a/src/mame/machine/slapfght.c b/src/mame/machine/slapfght.c index fe7aa796896..7f441be674d 100644 --- a/src/mame/machine/slapfght.c +++ b/src/mame/machine/slapfght.c @@ -761,11 +761,10 @@ WRITE8_MEMBER(slapfght_state::getstar_sh_intenable_w) /* Generate interrups only if they have been enabled */ -INTERRUPT_GEN( getstar_interrupt ) +INTERRUPT_GEN_MEMBER(slapfght_state::getstar_interrupt) { - slapfght_state *state = device->machine().driver_data(); - if (state->m_getstar_sh_intenabled) - device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + if (m_getstar_sh_intenabled) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } #ifdef UNUSED_FUNCTION diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c index d6ff05a453b..a47efa07382 100644 --- a/src/mame/machine/stfight.c +++ b/src/mame/machine/stfight.c @@ -115,11 +115,11 @@ static TIMER_CALLBACK( stfight_interrupt_1 ) machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); } -INTERRUPT_GEN( stfight_vb_interrupt ) +INTERRUPT_GEN_MEMBER(stfight_state::stfight_vb_interrupt) { // Do a RST10 - device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); - device->machine().scheduler().timer_set(attotime::from_hz(120), FUNC(stfight_interrupt_1)); + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); + 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 e8e3e145764..c6fbd52d40c 100644 --- a/src/mame/machine/subs.c +++ b/src/mame/machine/subs.c @@ -22,11 +22,11 @@ void subs_state::machine_reset() /*************************************************************************** subs_interrupt ***************************************************************************/ -INTERRUPT_GEN( subs_interrupt ) +INTERRUPT_GEN_MEMBER(subs_state::subs_interrupt) { /* only do NMI interrupt if not in TEST mode */ - if ((device->machine().root_device().ioport("IN1")->read() & 0x40)==0x40) - device->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE); + if ((machine().root_device().ioport("IN1")->read() & 0x40)==0x40) + 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 12f00cba753..a1fcb305614 100644 --- a/src/mame/machine/tnzs.c +++ b/src/mame/machine/tnzs.c @@ -614,29 +614,28 @@ WRITE8_MEMBER(tnzs_state::tnzs_mcu_w) } } -INTERRUPT_GEN( arknoid2_interrupt ) +INTERRUPT_GEN_MEMBER(tnzs_state::arknoid2_interrupt) { - tnzs_state *state = device->machine().driver_data(); int coin; - switch (state->m_mcu_type) + switch (m_mcu_type) { case MCU_ARKANOID: case MCU_EXTRMATN: case MCU_DRTOPPEL: case MCU_PLUMPOP: coin = 0; - coin |= ((state->ioport("COIN1")->read() & 1) << 0); - coin |= ((state->ioport("COIN2")->read() & 1) << 1); - coin |= ((state->ioport("IN2")->read() & 3) << 2); + coin |= ((ioport("COIN1")->read() & 1) << 0); + coin |= ((ioport("COIN2")->read() & 1) << 1); + coin |= ((ioport("IN2")->read() & 3) << 2); coin ^= 0x0c; - mcu_handle_coins(device->machine(), coin); + mcu_handle_coins(machine(), coin); break; default: break; } - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } MACHINE_RESET_MEMBER(tnzs_state,tnzs) diff --git a/src/mame/machine/toaplan1.c b/src/mame/machine/toaplan1.c index 1fb939f6e06..3bd01768d4b 100644 --- a/src/mame/machine/toaplan1.c +++ b/src/mame/machine/toaplan1.c @@ -39,12 +39,11 @@ static const UINT8 toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER+1][2][4] = }; -INTERRUPT_GEN( toaplan1_interrupt ) +INTERRUPT_GEN_MEMBER(toaplan1_state::toaplan1_interrupt) { - toaplan1_state *state = device->machine().driver_data(); - if (state->m_intenable) - device->execute().set_input_line(4, HOLD_LINE); + if (m_intenable) + device.execute().set_input_line(4, HOLD_LINE); } WRITE16_MEMBER(toaplan1_state::toaplan1_intenable_w) diff --git a/src/mame/machine/twincobr.c b/src/mame/machine/twincobr.c index 4a969de6d3d..9af773d1ae2 100644 --- a/src/mame/machine/twincobr.c +++ b/src/mame/machine/twincobr.c @@ -14,21 +14,19 @@ static const int toaplan_port_type[2] = { 0x7800c, 0x5c }; -INTERRUPT_GEN( twincobr_interrupt ) +INTERRUPT_GEN_MEMBER(twincobr_state::twincobr_interrupt) { - twincobr_state *state = device->machine().driver_data(); - if (state->m_intenable) { - state->m_intenable = 0; - device->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); + if (m_intenable) { + m_intenable = 0; + device.execute().set_input_line(M68K_IRQ_4, HOLD_LINE); } } -INTERRUPT_GEN( wardner_interrupt ) +INTERRUPT_GEN_MEMBER(twincobr_state::wardner_interrupt) { - twincobr_state *state = device->machine().driver_data(); - if (state->m_intenable) { - state->m_intenable = 0; - device->execute().set_input_line(0, HOLD_LINE); + if (m_intenable) { + m_intenable = 0; + device.execute().set_input_line(0, HOLD_LINE); } } diff --git a/src/mame/machine/vertigo.c b/src/mame/machine/vertigo.c index 7b5cf25f970..36898df6bfb 100644 --- a/src/mame/machine/vertigo.c +++ b/src/mame/machine/vertigo.c @@ -140,11 +140,11 @@ READ16_MEMBER(vertigo_state::vertigo_coin_r) } -INTERRUPT_GEN( vertigo_interrupt ) +INTERRUPT_GEN_MEMBER(vertigo_state::vertigo_interrupt) { /* Coin inputs cause IRQ6 */ - if ((device->machine().root_device().ioport("COIN")->read() & 0x7) < 0x7) - update_irq_encoder(device->machine(), INPUT_LINE_IRQ6, ASSERT_LINE); + if ((machine().root_device().ioport("COIN")->read() & 0x7) < 0x7) + update_irq_encoder(machine(), INPUT_LINE_IRQ6, ASSERT_LINE); } diff --git a/src/mame/machine/xevious.c b/src/mame/machine/xevious.c index 8723bb5b989..68973e7709a 100644 --- a/src/mame/machine/xevious.c +++ b/src/mame/machine/xevious.c @@ -182,8 +182,8 @@ READ8_HANDLER( battles_input_port_r ) } -INTERRUPT_GEN( battles_interrupt_4 ) +INTERRUPT_GEN_MEMBER(xevious_state::battles_interrupt_4) { - device->execute().set_input_line(0, HOLD_LINE); + device.execute().set_input_line(0, HOLD_LINE); } diff --git a/src/mame/video/esripsys.c b/src/mame/video/esripsys.c index 49e529cfea7..ce3a9c042d8 100644 --- a/src/mame/video/esripsys.c +++ b/src/mame/video/esripsys.c @@ -9,11 +9,10 @@ #include "includes/esripsys.h" -INTERRUPT_GEN( esripsys_vblank_irq ) +INTERRUPT_GEN_MEMBER(esripsys_state::esripsys_vblank_irq) { - esripsys_state *state = device->machine().driver_data(); - device->machine().device("game_cpu")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE); - state->m_frame_vbl = 0; + machine().device("game_cpu")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE); + m_frame_vbl = 0; } static TIMER_CALLBACK( hblank_start_callback ) diff --git a/src/mame/video/exidy.c b/src/mame/video/exidy.c index 3ce33d5341d..3ff6bcb3f88 100644 --- a/src/mame/video/exidy.c +++ b/src/mame/video/exidy.c @@ -65,15 +65,14 @@ INLINE void latch_condition(running_machine &machine, int collision) } -INTERRUPT_GEN( exidy_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(exidy_state::exidy_vblank_interrupt) { - exidy_state *state = device->machine().driver_data(); /* latch the current condition */ - latch_condition(device->machine(), 0); - state->m_int_condition &= ~0x80; + latch_condition(machine(), 0); + m_int_condition &= ~0x80; /* set the IRQ line */ - device->execute().set_input_line(0, ASSERT_LINE); + device.execute().set_input_line(0, ASSERT_LINE); } diff --git a/src/mame/video/exidy440.c b/src/mame/video/exidy440.c index 1e0fa28790d..3e5c4752a8a 100644 --- a/src/mame/video/exidy440.c +++ b/src/mame/video/exidy440.c @@ -233,12 +233,11 @@ static void exidy440_update_firq(running_machine &machine) } -INTERRUPT_GEN( exidy440_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(exidy440_state::exidy440_vblank_interrupt) { - exidy440_state *state = device->machine().driver_data(); /* set the FIRQ line on a VBLANK */ - state->m_firq_vblank = 1; - exidy440_update_firq(device->machine()); + m_firq_vblank = 1; + exidy440_update_firq(machine()); } diff --git a/src/mame/video/micro3d.c b/src/mame/video/micro3d.c index ebe673e3bfd..3dd369f455d 100644 --- a/src/mame/video/micro3d.c +++ b/src/mame/video/micro3d.c @@ -752,10 +752,9 @@ READ32_MEMBER(micro3d_state::micro3d_pipe_r) return m_pipe_data; } -INTERRUPT_GEN( micro3d_vblank ) +INTERRUPT_GEN_MEMBER(micro3d_state::micro3d_vblank) { -// mc68901_int_gen(device->machine(), GPIP7); - micro3d_state *state = device->machine().driver_data(); +// mc68901_int_gen(machine(), GPIP7); - state->m_display_buffer = state->m_drawing_buffer ^ 1; + m_display_buffer = m_drawing_buffer ^ 1; } diff --git a/src/mame/video/segag80r.c b/src/mame/video/segag80r.c index 2fc7229446a..a437b5061a4 100644 --- a/src/mame/video/segag80r.c +++ b/src/mame/video/segag80r.c @@ -39,20 +39,19 @@ static void vblank_latch_set(running_machine &machine) } -INTERRUPT_GEN( segag80r_vblank_start ) +INTERRUPT_GEN_MEMBER(segag80r_state::segag80r_vblank_start) { - segag80r_state *state = device->machine().driver_data(); - vblank_latch_set(device->machine()); + vblank_latch_set(machine()); /* if interrupts are enabled, clock one */ - if (state->m_video_control & 0x04) + if (m_video_control & 0x04) irq0_line_hold(device); } -INTERRUPT_GEN( sindbadm_vblank_start ) +INTERRUPT_GEN_MEMBER(segag80r_state::sindbadm_vblank_start) { - vblank_latch_set(device->machine()); + vblank_latch_set(machine()); /* interrupts appear to always be enabled, but they have a manual */ /* acknowledge rather than an automatic ack; they are also not masked */ diff --git a/src/mame/video/victory.c b/src/mame/video/victory.c index 865ac9c8f65..588f4c13d3c 100644 --- a/src/mame/video/victory.c +++ b/src/mame/video/victory.c @@ -80,12 +80,11 @@ static void victory_update_irq(running_machine &machine) } -INTERRUPT_GEN( victory_vblank_interrupt ) +INTERRUPT_GEN_MEMBER(victory_state::victory_vblank_interrupt) { - victory_state *state = device->machine().driver_data(); - state->m_vblank_irq = 1; + m_vblank_irq = 1; - victory_update_irq(device->machine()); + victory_update_irq(machine()); } -- cgit v1.2.3