summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/emu/attotime.c4
-rw-r--r--src/emu/attotime.h27
-rw-r--r--src/emu/cpu/cop400/cop400.c8
-rw-r--r--src/emu/cpu/e132xs/e132xs.c4
-rw-r--r--src/emu/cpu/h83002/h8_8.c10
-rw-r--r--src/emu/cpu/h83002/h8periph.c8
-rw-r--r--src/emu/cpu/hd61700/hd61700.c2
-rw-r--r--src/emu/cpu/m6800/m6800.c2
-rw-r--r--src/emu/cpu/mb88xx/mb88xx.c8
-rw-r--r--src/emu/cpu/mips/mips3com.c2
-rw-r--r--src/emu/cpu/mn10200/mn10200.c8
-rw-r--r--src/emu/cpu/nec/v25.c6
-rw-r--r--src/emu/cpu/nec/v25sfr.c12
-rw-r--r--src/emu/cpu/powerpc/ppccom.c8
-rw-r--r--src/emu/cpu/sc61860/sc61860.c2
-rw-r--r--src/emu/cpu/sh2/sh2comn.c14
-rw-r--r--src/emu/cpu/sh4/sh4.c2
-rw-r--r--src/emu/cpu/sh4/sh4comn.c28
-rw-r--r--src/emu/cpu/tlcs90/tlcs90.c2
-rw-r--r--src/emu/cpu/tms34010/tms34010.c2
-rw-r--r--src/emu/cpu/tms9900/99xxcore.h2
-rw-r--r--src/emu/cpu/z8/z8.c8
-rw-r--r--src/emu/debug/debugcpu.c4
-rw-r--r--src/emu/diexec.c2
-rw-r--r--src/emu/diexec.h2
-rw-r--r--src/emu/imagedev/bitbngr.c16
-rw-r--r--src/emu/imagedev/flopdrv.c6
-rw-r--r--src/emu/machine.c4
-rw-r--r--src/emu/machine/6526cia.c4
-rw-r--r--src/emu/machine/6532riot.c2
-rw-r--r--src/emu/machine/6850acia.c4
-rw-r--r--src/emu/machine/68681.c18
-rw-r--r--src/emu/machine/74123.c4
-rw-r--r--src/emu/machine/8042kbdc.c2
-rw-r--r--src/emu/machine/8237dma.c2
-rw-r--r--src/emu/machine/8257dma.c8
-rw-r--r--src/emu/machine/am53cf96.c6
-rw-r--r--src/emu/machine/at28c16.c4
-rw-r--r--src/emu/machine/cdp1852.c2
-rw-r--r--src/emu/machine/ds2401.c14
-rw-r--r--src/emu/machine/ds2404.c2
-rw-r--r--src/emu/machine/idectrl.c18
-rw-r--r--src/emu/machine/intelfsh.c10
-rw-r--r--src/emu/machine/k056230.c2
-rw-r--r--src/emu/machine/ldcore.h6
-rw-r--r--src/emu/machine/ldpr8210.c12
-rw-r--r--src/emu/machine/ldv1000.c4
-rw-r--r--src/emu/machine/ldvp931.c12
-rw-r--r--src/emu/machine/mb3773.c2
-rw-r--r--src/emu/machine/mc146818.c8
-rw-r--r--src/emu/machine/mc68901.c16
-rw-r--r--src/emu/machine/microtch.c2
-rw-r--r--src/emu/machine/pc16552d.c6
-rw-r--r--src/emu/machine/pic8259.c2
-rw-r--r--src/emu/machine/pit8253.c4
-rw-r--r--src/emu/machine/rtc65271.c10
-rw-r--r--src/emu/machine/s3c24xx.c28
-rw-r--r--src/emu/machine/timekpr.c2
-rw-r--r--src/emu/machine/tmp68301.c4
-rw-r--r--src/emu/machine/wd33c93.c10
-rw-r--r--src/emu/machine/z80ctc.c12
-rw-r--r--src/emu/machine/z80dart.c8
-rw-r--r--src/emu/machine/z80dma.c6
-rw-r--r--src/emu/machine/z80sti.c12
-rw-r--r--src/emu/mconfig.c4
-rw-r--r--src/emu/mconfig.h4
-rw-r--r--src/emu/schedule.c4
-rw-r--r--src/emu/schedule.h2
-rw-r--r--src/emu/screen.c6
-rw-r--r--src/emu/sound.c4
-rw-r--r--src/emu/sound/aica.c6
-rw-r--r--src/emu/sound/asc.c4
-rw-r--r--src/emu/sound/bsmt2000.c2
-rw-r--r--src/emu/sound/es5503.c2
-rw-r--r--src/emu/sound/fm.c2
-rw-r--r--src/emu/sound/fm.h2
-rw-r--r--src/emu/sound/fm2612.c2
-rw-r--r--src/emu/sound/fmopl.c2
-rw-r--r--src/emu/sound/ics2115.c8
-rw-r--r--src/emu/sound/k054539.c2
-rw-r--r--src/emu/sound/msm5205.c2
-rw-r--r--src/emu/sound/pokey.c18
-rw-r--r--src/emu/sound/scsp.c6
-rw-r--r--src/emu/sound/speaker.c2
-rw-r--r--src/emu/sound/tms5110.c4
-rw-r--r--src/emu/sound/tms5220.c4
-rw-r--r--src/emu/sound/upd7759.c6
-rw-r--r--src/emu/sound/ym2151.c10
-rw-r--r--src/emu/sound/ym2413.c2
-rw-r--r--src/emu/sound/ymf262.c2
-rw-r--r--src/emu/sound/ymf278b.c8
-rw-r--r--src/emu/sound/ymz280b.c4
-rw-r--r--src/emu/timer.c30
-rw-r--r--src/emu/timer.h14
-rw-r--r--src/emu/video.c14
-rw-r--r--src/emu/video/mc6845.c4
-rw-r--r--src/emu/video/pc_vga.c4
-rw-r--r--src/emu/watchdog.c4
-rw-r--r--src/ldplayer/ldplayer.c8
-rw-r--r--src/mame/audio/8080bw.c8
-rw-r--r--src/mame/audio/amiga.c2
-rw-r--r--src/mame/audio/cage.c6
-rw-r--r--src/mame/audio/carnival.c2
-rw-r--r--src/mame/audio/dcs.c22
-rw-r--r--src/mame/audio/gottlieb.c4
-rw-r--r--src/mame/audio/leland.c10
-rw-r--r--src/mame/audio/mcr.c6
-rw-r--r--src/mame/audio/n8080.c16
-rw-r--r--src/mame/audio/namco52.c2
-rw-r--r--src/mame/audio/namco54.c2
-rw-r--r--src/mame/audio/segag80r.c6
-rw-r--r--src/mame/audio/segasnd.c4
-rw-r--r--src/mame/audio/snes_snd.c8
-rw-r--r--src/mame/audio/starwars.c4
-rw-r--r--src/mame/audio/turbo.c2
-rw-r--r--src/mame/audio/williams.c4
-rw-r--r--src/mame/drivers/2mindril.c8
-rw-r--r--src/mame/drivers/39in1.c2
-rw-r--r--src/mame/drivers/40love.c2
-rw-r--r--src/mame/drivers/8080bw.c2
-rw-r--r--src/mame/drivers/acefruit.c2
-rw-r--r--src/mame/drivers/airbustr.c6
-rw-r--r--src/mame/drivers/ajax.c2
-rw-r--r--src/mame/drivers/ampoker2.c2
-rw-r--r--src/mame/drivers/angelkds.c2
-rw-r--r--src/mame/drivers/arabian.c2
-rw-r--r--src/mame/drivers/argus.c6
-rw-r--r--src/mame/drivers/aristmk4.c4
-rw-r--r--src/mame/drivers/aristmk5.c6
-rw-r--r--src/mame/drivers/arkanoid.c2
-rw-r--r--src/mame/drivers/artmagic.c4
-rw-r--r--src/mame/drivers/asterix.c2
-rw-r--r--src/mame/drivers/asuka.c12
-rw-r--r--src/mame/drivers/atarisy1.c2
-rw-r--r--src/mame/drivers/backfire.c4
-rw-r--r--src/mame/drivers/balsente.c4
-rw-r--r--src/mame/drivers/baraduke.c2
-rw-r--r--src/mame/drivers/battlane.c2
-rw-r--r--src/mame/drivers/bfcobra.c2
-rw-r--r--src/mame/drivers/bfm_sc2.c4
-rw-r--r--src/mame/drivers/bigevglf.c2
-rw-r--r--src/mame/drivers/bking.c2
-rw-r--r--src/mame/drivers/bladestl.c2
-rw-r--r--src/mame/drivers/blitz68k.c2
-rw-r--r--src/mame/drivers/bnstars.c2
-rw-r--r--src/mame/drivers/btoads.c2
-rw-r--r--src/mame/drivers/bublbobl.c4
-rw-r--r--src/mame/drivers/bwing.c2
-rw-r--r--src/mame/drivers/cabal.c4
-rw-r--r--src/mame/drivers/cave.c16
-rw-r--r--src/mame/drivers/champbas.c4
-rw-r--r--src/mame/drivers/chihiro.c2
-rw-r--r--src/mame/drivers/chinagat.c6
-rw-r--r--src/mame/drivers/chqflag.c2
-rw-r--r--src/mame/drivers/cidelsa.c2
-rw-r--r--src/mame/drivers/cischeat.c2
-rw-r--r--src/mame/drivers/cloak.c2
-rw-r--r--src/mame/drivers/cntsteer.c4
-rw-r--r--src/mame/drivers/cojag.c2
-rw-r--r--src/mame/drivers/combatsc.c8
-rw-r--r--src/mame/drivers/contra.c2
-rw-r--r--src/mame/drivers/coolpool.c4
-rw-r--r--src/mame/drivers/crgolf.c2
-rw-r--r--src/mame/drivers/crystal.c2
-rw-r--r--src/mame/drivers/cubeqst.c2
-rw-r--r--src/mame/drivers/cvs.c2
-rw-r--r--src/mame/drivers/cyberbal.c2
-rw-r--r--src/mame/drivers/cybertnk.c2
-rw-r--r--src/mame/drivers/darius.c2
-rw-r--r--src/mame/drivers/dassault.c2
-rw-r--r--src/mame/drivers/dblewing.c2
-rw-r--r--src/mame/drivers/ddayjlc.c2
-rw-r--r--src/mame/drivers/ddealer.c2
-rw-r--r--src/mame/drivers/ddragon.c6
-rw-r--r--src/mame/drivers/ddribble.c2
-rw-r--r--src/mame/drivers/deadang.c2
-rw-r--r--src/mame/drivers/dec0.c4
-rw-r--r--src/mame/drivers/dec8.c8
-rw-r--r--src/mame/drivers/deco32.c2
-rw-r--r--src/mame/drivers/decocass.c2
-rw-r--r--src/mame/drivers/djboy.c2
-rw-r--r--src/mame/drivers/dlair.c2
-rw-r--r--src/mame/drivers/dmndrby.c2
-rw-r--r--src/mame/drivers/dogfgt.c2
-rw-r--r--src/mame/drivers/dragrace.c2
-rw-r--r--src/mame/drivers/drmicro.c2
-rw-r--r--src/mame/drivers/dunhuang.c2
-rw-r--r--src/mame/drivers/dynduke.c2
-rw-r--r--src/mame/drivers/eprom.c6
-rw-r--r--src/mame/drivers/equites.c4
-rw-r--r--src/mame/drivers/esd16.c2
-rw-r--r--src/mame/drivers/esh.c2
-rw-r--r--src/mame/drivers/exidy.c4
-rw-r--r--src/mame/drivers/expro02.c4
-rw-r--r--src/mame/drivers/exterm.c2
-rw-r--r--src/mame/drivers/exzisus.c2
-rw-r--r--src/mame/drivers/f1gp.c4
-rw-r--r--src/mame/drivers/fantland.c2
-rw-r--r--src/mame/drivers/firebeat.c2
-rw-r--r--src/mame/drivers/firefox.c4
-rw-r--r--src/mame/drivers/flkatck.c2
-rw-r--r--src/mame/drivers/flstory.c8
-rw-r--r--src/mame/drivers/fuukifg2.c4
-rw-r--r--src/mame/drivers/gaelco.c6
-rw-r--r--src/mame/drivers/gaelco3d.c2
-rw-r--r--src/mame/drivers/gal3.c2
-rw-r--r--src/mame/drivers/galaga.c8
-rw-r--r--src/mame/drivers/galaxian.c2
-rw-r--r--src/mame/drivers/galpani2.c2
-rw-r--r--src/mame/drivers/galpanic.c2
-rw-r--r--src/mame/drivers/gameplan.c4
-rw-r--r--src/mame/drivers/gaplus.c6
-rw-r--r--src/mame/drivers/ggconnie.c2
-rw-r--r--src/mame/drivers/ghosteo.c4
-rw-r--r--src/mame/drivers/gladiatr.c4
-rw-r--r--src/mame/drivers/gottlieb.c2
-rw-r--r--src/mame/drivers/gpworld.c2
-rw-r--r--src/mame/drivers/gradius3.c2
-rw-r--r--src/mame/drivers/grchamp.c2
-rw-r--r--src/mame/drivers/gsword.c4
-rw-r--r--src/mame/drivers/gticlub.c6
-rw-r--r--src/mame/drivers/guab.c8
-rw-r--r--src/mame/drivers/gyruss.c2
-rw-r--r--src/mame/drivers/harddriv.c4
-rw-r--r--src/mame/drivers/hitme.c2
-rw-r--r--src/mame/drivers/hng64.c2
-rw-r--r--src/mame/drivers/homedata.c6
-rw-r--r--src/mame/drivers/hornet.c4
-rw-r--r--src/mame/drivers/hvyunit.c2
-rw-r--r--src/mame/drivers/hyprduel.c6
-rw-r--r--src/mame/drivers/ikki.c2
-rw-r--r--src/mame/drivers/imolagp.c2
-rw-r--r--src/mame/drivers/itech32.c10
-rw-r--r--src/mame/drivers/itech8.c2
-rw-r--r--src/mame/drivers/jackal.c2
-rw-r--r--src/mame/drivers/jalmah.c2
-rw-r--r--src/mame/drivers/jangou.c2
-rw-r--r--src/mame/drivers/jedi.c2
-rw-r--r--src/mame/drivers/jpmimpct.c4
-rw-r--r--src/mame/drivers/jpmsys5.c4
-rw-r--r--src/mame/drivers/kingobox.c4
-rw-r--r--src/mame/drivers/kinst.c2
-rw-r--r--src/mame/drivers/konamigx.c4
-rw-r--r--src/mame/drivers/ksayakyu.c2
-rw-r--r--src/mame/drivers/ksys573.c6
-rw-r--r--src/mame/drivers/kyugo.c2
-rw-r--r--src/mame/drivers/ladyfrog.c2
-rw-r--r--src/mame/drivers/lasso.c2
-rw-r--r--src/mame/drivers/lgp.c2
-rw-r--r--src/mame/drivers/liberate.c6
-rw-r--r--src/mame/drivers/lockon.c4
-rw-r--r--src/mame/drivers/lsasquad.c4
-rw-r--r--src/mame/drivers/m72.c4
-rw-r--r--src/mame/drivers/macrossp.c2
-rw-r--r--src/mame/drivers/magmax.c2
-rw-r--r--src/mame/drivers/mappy.c22
-rw-r--r--src/mame/drivers/markham.c2
-rw-r--r--src/mame/drivers/matmania.c4
-rw-r--r--src/mame/drivers/mcatadv.c2
-rw-r--r--src/mame/drivers/meadows.c4
-rw-r--r--src/mame/drivers/mediagx.c4
-rw-r--r--src/mame/drivers/megaplay.c2
-rw-r--r--src/mame/drivers/megasys1.c2
-rw-r--r--src/mame/drivers/megatech.c6
-rw-r--r--src/mame/drivers/megazone.c2
-rw-r--r--src/mame/drivers/meritm.c2
-rw-r--r--src/mame/drivers/metro.c6
-rw-r--r--src/mame/drivers/mexico86.c2
-rw-r--r--src/mame/drivers/mhavoc.c2
-rw-r--r--src/mame/drivers/micro3d.c2
-rw-r--r--src/mame/drivers/midvunit.c2
-rw-r--r--src/mame/drivers/midzeus.c4
-rw-r--r--src/mame/drivers/missb2.c2
-rw-r--r--src/mame/drivers/mlanding.c4
-rw-r--r--src/mame/drivers/model1.c4
-rw-r--r--src/mame/drivers/model2.c14
-rw-r--r--src/mame/drivers/model3.c4
-rw-r--r--src/mame/drivers/moo.c4
-rw-r--r--src/mame/drivers/mpu4.c2
-rw-r--r--src/mame/drivers/mpu4drvr.c6
-rw-r--r--src/mame/drivers/mrflea.c2
-rw-r--r--src/mame/drivers/ms32.c4
-rw-r--r--src/mame/drivers/mw8080bw.c40
-rw-r--r--src/mame/drivers/mystwarr.c2
-rw-r--r--src/mame/drivers/namcona1.c2
-rw-r--r--src/mame/drivers/namcond1.c2
-rw-r--r--src/mame/drivers/namcos1.c2
-rw-r--r--src/mame/drivers/namcos2.c14
-rw-r--r--src/mame/drivers/namcos21.c6
-rw-r--r--src/mame/drivers/namcos22.c4
-rw-r--r--src/mame/drivers/namcos23.c14
-rw-r--r--src/mame/drivers/namcos86.c2
-rw-r--r--src/mame/drivers/neodrvr.c8
-rw-r--r--src/mame/drivers/neogeo.c4
-rw-r--r--src/mame/drivers/neoprint.c2
-rw-r--r--src/mame/drivers/ninjaw.c4
-rw-r--r--src/mame/drivers/nitedrvr.c2
-rw-r--r--src/mame/drivers/nmk16.c4
-rw-r--r--src/mame/drivers/nova2001.c4
-rw-r--r--src/mame/drivers/nss.c2
-rw-r--r--src/mame/drivers/nwk-tr.c2
-rw-r--r--src/mame/drivers/nycaptor.c6
-rw-r--r--src/mame/drivers/ohmygod.c2
-rw-r--r--src/mame/drivers/opwolf.c4
-rw-r--r--src/mame/drivers/othello.c2
-rw-r--r--src/mame/drivers/othunder.c2
-rw-r--r--src/mame/drivers/overdriv.c2
-rw-r--r--src/mame/drivers/pacland.c2
-rw-r--r--src/mame/drivers/pandoras.c2
-rw-r--r--src/mame/drivers/paranoia.c2
-rw-r--r--src/mame/drivers/parodius.c2
-rw-r--r--src/mame/drivers/pgm.c4
-rw-r--r--src/mame/drivers/photon2.c2
-rw-r--r--src/mame/drivers/pipeline.c2
-rw-r--r--src/mame/drivers/pitnrun.c2
-rw-r--r--src/mame/drivers/plygonet.c2
-rw-r--r--src/mame/drivers/polepos.c4
-rw-r--r--src/mame/drivers/polyplay.c2
-rw-r--r--src/mame/drivers/popper.c2
-rw-r--r--src/mame/drivers/psychic5.c4
-rw-r--r--src/mame/drivers/pushman.c4
-rw-r--r--src/mame/drivers/qdrmfgp.c2
-rw-r--r--src/mame/drivers/quasar.c2
-rw-r--r--src/mame/drivers/rabbit.c2
-rw-r--r--src/mame/drivers/raiden.c2
-rw-r--r--src/mame/drivers/rainbow.c4
-rw-r--r--src/mame/drivers/rastan.c2
-rw-r--r--src/mame/drivers/retofinv.c2
-rw-r--r--src/mame/drivers/rollerg.c2
-rw-r--r--src/mame/drivers/rungun.c2
-rw-r--r--src/mame/drivers/sandscrp.c4
-rw-r--r--src/mame/drivers/sbrkout.c2
-rw-r--r--src/mame/drivers/seattle.c4
-rw-r--r--src/mame/drivers/segag80r.c2
-rw-r--r--src/mame/drivers/segahang.c2
-rw-r--r--src/mame/drivers/segaorun.c4
-rw-r--r--src/mame/drivers/segas16a.c6
-rw-r--r--src/mame/drivers/segas16b.c4
-rw-r--r--src/mame/drivers/segas18.c2
-rw-r--r--src/mame/drivers/segas24.c6
-rw-r--r--src/mame/drivers/segaxbd.c8
-rw-r--r--src/mame/drivers/segaybd.c4
-rw-r--r--src/mame/drivers/seibuspi.c2
-rw-r--r--src/mame/drivers/seicross.c2
-rw-r--r--src/mame/drivers/seta.c8
-rw-r--r--src/mame/drivers/sfcbox.c2
-rw-r--r--src/mame/drivers/sfkick.c2
-rw-r--r--src/mame/drivers/shanghai.c2
-rw-r--r--src/mame/drivers/shangkid.c2
-rw-r--r--src/mame/drivers/shougi.c2
-rw-r--r--src/mame/drivers/sidearms.c2
-rw-r--r--src/mame/drivers/simpl156.c10
-rw-r--r--src/mame/drivers/simpsons.c4
-rw-r--r--src/mame/drivers/skykid.c2
-rw-r--r--src/mame/drivers/slapfght.c8
-rw-r--r--src/mame/drivers/slapshot.c4
-rw-r--r--src/mame/drivers/sms.c2
-rw-r--r--src/mame/drivers/snk.c12
-rw-r--r--src/mame/drivers/snk6502.c2
-rw-r--r--src/mame/drivers/sothello.c2
-rw-r--r--src/mame/drivers/spacefb.c2
-rw-r--r--src/mame/drivers/speglsht.c2
-rw-r--r--src/mame/drivers/splash.c2
-rw-r--r--src/mame/drivers/sprint8.c2
-rw-r--r--src/mame/drivers/srmp5.c2
-rw-r--r--src/mame/drivers/ssfindo.c12
-rw-r--r--src/mame/drivers/sshangha.c2
-rw-r--r--src/mame/drivers/sslam.c2
-rw-r--r--src/mame/drivers/st0016.c2
-rw-r--r--src/mame/drivers/starwars.c2
-rw-r--r--src/mame/drivers/stfight.c2
-rw-r--r--src/mame/drivers/strnskil.c2
-rw-r--r--src/mame/drivers/stv.c22
-rw-r--r--src/mame/drivers/stvinit.c48
-rw-r--r--src/mame/drivers/subsino2.c6
-rw-r--r--src/mame/drivers/suna16.c8
-rw-r--r--src/mame/drivers/superchs.c2
-rw-r--r--src/mame/drivers/superqix.c4
-rw-r--r--src/mame/drivers/suprloco.c2
-rw-r--r--src/mame/drivers/suprnova.c6
-rw-r--r--src/mame/drivers/system1.c8
-rw-r--r--src/mame/drivers/taito_b.c36
-rw-r--r--src/mame/drivers/taito_h.c6
-rw-r--r--src/mame/drivers/taito_l.c6
-rw-r--r--src/mame/drivers/taito_x.c8
-rw-r--r--src/mame/drivers/taito_z.c14
-rw-r--r--src/mame/drivers/taitoair.c2
-rw-r--r--src/mame/drivers/taitojc.c2
-rw-r--r--src/mame/drivers/taitosj.c2
-rw-r--r--src/mame/drivers/tankbust.c2
-rw-r--r--src/mame/drivers/tatsumi.c8
-rw-r--r--src/mame/drivers/taxidrvr.c2
-rw-r--r--src/mame/drivers/tbowl.c2
-rw-r--r--src/mame/drivers/tceptor.c2
-rw-r--r--src/mame/drivers/tecmo16.c2
-rw-r--r--src/mame/drivers/tehkanwc.c4
-rw-r--r--src/mame/drivers/tempest.c2
-rw-r--r--src/mame/drivers/tetrisp2.c6
-rw-r--r--src/mame/drivers/thayers.c6
-rw-r--r--src/mame/drivers/timelimt.c2
-rw-r--r--src/mame/drivers/tmmjprd.c2
-rw-r--r--src/mame/drivers/tmnt.c2
-rw-r--r--src/mame/drivers/toaplan1.c12
-rw-r--r--src/mame/drivers/toaplan2.c16
-rw-r--r--src/mame/drivers/tomcat.c2
-rw-r--r--src/mame/drivers/toypop.c8
-rw-r--r--src/mame/drivers/tp84.c2
-rw-r--r--src/mame/drivers/triforce.c2
-rw-r--r--src/mame/drivers/trucocl.c2
-rw-r--r--src/mame/drivers/trvquest.c2
-rw-r--r--src/mame/drivers/tubep.c2
-rw-r--r--src/mame/drivers/tumbleb.c4
-rw-r--r--src/mame/drivers/turbo.c2
-rw-r--r--src/mame/drivers/twin16.c6
-rw-r--r--src/mame/drivers/twincobr.c2
-rw-r--r--src/mame/drivers/twinkle.c2
-rw-r--r--src/mame/drivers/uapce.c2
-rw-r--r--src/mame/drivers/ultraman.c2
-rw-r--r--src/mame/drivers/ultrsprt.c2
-rw-r--r--src/mame/drivers/undrfire.c2
-rw-r--r--src/mame/drivers/vastar.c2
-rw-r--r--src/mame/drivers/vcombat.c2
-rw-r--r--src/mame/drivers/vegas.c4
-rw-r--r--src/mame/drivers/vendetta.c2
-rw-r--r--src/mame/drivers/videopkr.c2
-rw-r--r--src/mame/drivers/volfied.c2
-rw-r--r--src/mame/drivers/wardner.c2
-rw-r--r--src/mame/drivers/wecleman.c4
-rw-r--r--src/mame/drivers/wgp.c4
-rw-r--r--src/mame/drivers/wheelfir.c2
-rw-r--r--src/mame/drivers/wrally.c2
-rw-r--r--src/mame/drivers/xexex.c4
-rw-r--r--src/mame/drivers/xorworld.c2
-rw-r--r--src/mame/drivers/xxmissio.c2
-rw-r--r--src/mame/drivers/zaccaria.c6
-rw-r--r--src/mame/drivers/zerozone.c2
-rw-r--r--src/mame/drivers/zr107.c6
-rw-r--r--src/mame/machine/amiga.c4
-rw-r--r--src/mame/machine/archimds.c24
-rw-r--r--src/mame/machine/arkanoid.c2
-rw-r--r--src/mame/machine/asic65.c6
-rw-r--r--src/mame/machine/atarigen.c4
-rw-r--r--src/mame/machine/balsente.c6
-rw-r--r--src/mame/machine/cdi070.c22
-rw-r--r--src/mame/machine/cdicdic.c26
-rw-r--r--src/mame/machine/cdislave.c22
-rw-r--r--src/mame/machine/cubocd32.c16
-rw-r--r--src/mame/machine/dc.c18
-rw-r--r--src/mame/machine/decocass.c4
-rw-r--r--src/mame/machine/gaelco3d.c4
-rw-r--r--src/mame/machine/harddriv.c4
-rw-r--r--src/mame/machine/irobot.c2
-rw-r--r--src/mame/machine/mcr.c2
-rw-r--r--src/mame/machine/mcr68.c12
-rw-r--r--src/mame/machine/megadriv.c70
-rw-r--r--src/mame/machine/mhavoc.c2
-rw-r--r--src/mame/machine/micro3d.c4
-rw-r--r--src/mame/machine/midwayic.c2
-rw-r--r--src/mame/machine/model1.c4
-rw-r--r--src/mame/machine/n64.c2
-rw-r--r--src/mame/machine/namco06.c4
-rw-r--r--src/mame/machine/namco50.c2
-rw-r--r--src/mame/machine/namco53.c2
-rw-r--r--src/mame/machine/namcos2.c2
-rw-r--r--src/mame/machine/naomi.c10
-rw-r--r--src/mame/machine/opwolf.c2
-rw-r--r--src/mame/machine/pcshare.c6
-rw-r--r--src/mame/machine/pitnrun.c2
-rw-r--r--src/mame/machine/psx.c8
-rw-r--r--src/mame/machine/qix.c2
-rw-r--r--src/mame/machine/rainbow.c2
-rw-r--r--src/mame/machine/segamsys.c16
-rw-r--r--src/mame/machine/slikshot.c2
-rw-r--r--src/mame/machine/snes.c26
-rw-r--r--src/mame/machine/stfight.c2
-rw-r--r--src/mame/machine/stvcd.c8
-rw-r--r--src/mame/machine/tait8741.c2
-rw-r--r--src/mame/machine/taitosj.c4
-rw-r--r--src/mame/machine/ticket.c6
-rw-r--r--src/mame/machine/vertigo.c2
-rw-r--r--src/mame/machine/xevious.c2
-rw-r--r--src/mame/video/avgdvg.c2
-rw-r--r--src/mame/video/dc.c32
-rw-r--r--src/mame/video/dday.c2
-rw-r--r--src/mame/video/galaxold.c2
-rw-r--r--src/mame/video/gameplan.c2
-rw-r--r--src/mame/video/jaguar.c6
-rw-r--r--src/mame/video/midtunit.c2
-rw-r--r--src/mame/video/midvunit.c2
-rw-r--r--src/mame/video/midyunit.c2
-rw-r--r--src/mame/video/midzeus2.c2
-rw-r--r--src/mame/video/n8080.c4
-rw-r--r--src/mame/video/nbmj9195.c2
-rw-r--r--src/mame/video/niyanpai.c2
-rw-r--r--src/mame/video/ppu2c0x.c6
-rw-r--r--src/mame/video/segas32.c2
-rw-r--r--src/mame/video/twin16.c2
-rw-r--r--src/mame/video/victory.c6
498 files changed, 1236 insertions, 1263 deletions
diff --git a/src/emu/attotime.c b/src/emu/attotime.c
index 6268cdd8189..a7693047e49 100644
--- a/src/emu/attotime.c
+++ b/src/emu/attotime.c
@@ -62,7 +62,7 @@ const attotime attotime::never(ATTOTIME_MAX_SECONDS, 0);
attotime &attotime::operator*=(UINT32 factor)
{
- // if one of the items is attotime_never, return attotime_never
+ // if one of the items is attotime::never, return attotime::never
if (seconds >= ATTOTIME_MAX_SECONDS)
return *this = never;
@@ -102,7 +102,7 @@ attotime &attotime::operator*=(UINT32 factor)
attotime &attotime::operator/=(UINT32 factor)
{
- // if one of the items is attotime_never, return attotime_never
+ // if one of the items is attotime::never, return attotime::never
if (seconds >= ATTOTIME_MAX_SECONDS)
return *this = never;
diff --git a/src/emu/attotime.h b/src/emu/attotime.h
index 573f497056d..83a7f9bc47c 100644
--- a/src/emu/attotime.h
+++ b/src/emu/attotime.h
@@ -104,24 +104,6 @@ const seconds_t ATTOTIME_MAX_SECONDS = 1000000000;
#define ATTOSECONDS_IN_USEC(x) ((attoseconds_t)(x) * ATTOSECONDS_PER_MICROSECOND)
#define ATTOSECONDS_IN_NSEC(x) ((attoseconds_t)(x) * ATTOSECONDS_PER_NANOSECOND)
-// macros for building attotimes from other types at runtime
-#define ATTOTIME_IN_HZ(hz) attotime::from_hz(hz)
-#define ATTOTIME_IN_SEC(s) attotime::from_seconds(s)
-#define ATTOTIME_IN_MSEC(ms) attotime::from_msec(ms)
-#define ATTOTIME_IN_USEC(us) attotime::from_usec(us)
-#define ATTOTIME_IN_NSEC(ns) attotime::from_nsec(ns)
-
-// macros for building a reduced-resolution attotime for tokenized storage in a UINT64
-// this form supports up to 1000 seconds and sacrifices 1/1000 of the full attotime resolution
-#define UINT64_ATTOTIME_IN_HZ(hz) ((UINT64)((ATTOSECONDS_PER_SECOND / 1000) / (hz)))
-#define UINT64_ATTOTIME_IN_SEC(s) ((UINT64)(s) * (ATTOSECONDS_PER_SECOND / 1000))
-#define UINT64_ATTOTIME_IN_MSEC(ms) ((UINT64)(ms) * (ATTOSECONDS_PER_SECOND / 1000 / 1000))
-#define UINT64_ATTOTIME_IN_USEC(us) ((UINT64)(us) * (ATTOSECONDS_PER_SECOND / 1000 / 1000 / 1000))
-#define UINT64_ATTOTIME_IN_NSEC(ns) ((UINT64)(ns) * (ATTOSECONDS_PER_SECOND / 1000 / 1000 / 1000 / 1000))
-
-// macros for converting a UINT64 attotime to a full attotime
-#define UINT64_ATTOTIME_TO_ATTOTIME(v) attotime((v) / (ATTOSECONDS_PER_SECOND / 1000), ((v) % (ATTOSECONDS_PER_SECOND / 1000)) * 1000)
-
//**************************************************************************
@@ -446,13 +428,4 @@ inline attotime attotime::from_double(double _time)
}
-
-//**************************************************************************
-// LEGACY MAPPINGS
-//**************************************************************************
-
-#define attotime_zero attotime::zero
-#define attotime_never attotime::never
-
-
#endif // __ATTOTIME_H__
diff --git a/src/emu/cpu/cop400/cop400.c b/src/emu/cpu/cop400/cop400.c
index 8d0b1b32e3c..2064ab73865 100644
--- a/src/emu/cpu/cop400/cop400.c
+++ b/src/emu/cpu/cop400/cop400.c
@@ -887,14 +887,14 @@ static void cop400_init(legacy_cpu_device *device, UINT8 g_mask, UINT8 d_mask, U
/* allocate serial timer */
cpustate->serial_timer = timer_alloc(device->machine, serial_tick, cpustate);
- timer_adjust_periodic(cpustate->serial_timer, attotime_zero, 0, ATTOTIME_IN_HZ(device->clock() / 16));
+ timer_adjust_periodic(cpustate->serial_timer, attotime::zero, 0, attotime::from_hz(device->clock() / 16));
/* allocate counter timer */
if (has_counter)
{
cpustate->counter_timer = timer_alloc(device->machine, counter_tick, cpustate);
- timer_adjust_periodic(cpustate->counter_timer, attotime_zero, 0, ATTOTIME_IN_HZ(device->clock() / 16 / 4));
+ timer_adjust_periodic(cpustate->counter_timer, attotime::zero, 0, attotime::from_hz(device->clock() / 16 / 4));
}
/* allocate IN latch timer */
@@ -902,7 +902,7 @@ static void cop400_init(legacy_cpu_device *device, UINT8 g_mask, UINT8 d_mask, U
if (has_inil)
{
cpustate->inil_timer = timer_alloc(device->machine, inil_tick, cpustate);
- timer_adjust_periodic(cpustate->inil_timer, attotime_zero, 0, ATTOTIME_IN_HZ(device->clock() / 16));
+ timer_adjust_periodic(cpustate->inil_timer, attotime::zero, 0, attotime::from_hz(device->clock() / 16));
}
/* allocate Microbus timer */
@@ -910,7 +910,7 @@ static void cop400_init(legacy_cpu_device *device, UINT8 g_mask, UINT8 d_mask, U
if (cpustate->intf->microbus == COP400_MICROBUS_ENABLED)
{
cpustate->microbus_timer = timer_alloc(device->machine, microbus_tick, cpustate);
- timer_adjust_periodic(cpustate->microbus_timer, attotime_zero, 0, ATTOTIME_IN_HZ(device->clock() / 16));
+ timer_adjust_periodic(cpustate->microbus_timer, attotime::zero, 0, attotime::from_hz(device->clock() / 16));
}
/* register for state saving */
diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c
index d7212e22a87..c1255e115e5 100644
--- a/src/emu/cpu/e132xs/e132xs.c
+++ b/src/emu/cpu/e132xs/e132xs.c
@@ -620,7 +620,7 @@ static void adjust_timer_interrupt(hyperstone_state *cpustate)
if (delta > 0x80000000)
{
if (!cpustate->timer_int_pending)
- timer_adjust_oneshot(cpustate->timer, attotime_zero, 0);
+ timer_adjust_oneshot(cpustate->timer, attotime::zero, 0);
}
else
{
@@ -632,7 +632,7 @@ static void adjust_timer_interrupt(hyperstone_state *cpustate)
/* otherwise, disable the timer */
else
- timer_adjust_oneshot(cpustate->timer, attotime_never, 0);
+ timer_adjust_oneshot(cpustate->timer, attotime::never, 0);
}
static TIMER_CALLBACK( e132xs_timer_callback )
diff --git a/src/emu/cpu/h83002/h8_8.c b/src/emu/cpu/h83002/h8_8.c
index 1567a63d129..467385ecb0c 100644
--- a/src/emu/cpu/h83002/h8_8.c
+++ b/src/emu/cpu/h83002/h8_8.c
@@ -410,21 +410,21 @@ static void recalc_8bit_timer(h83xx_state *h8, int t)
// if "no clock source", stop
if (div < 2)
{
- timer_adjust_oneshot(h8->timer[(t*2)], attotime_never, 0);
- timer_adjust_oneshot(h8->timer[(t*2)+1], attotime_never, 0);
+ timer_adjust_oneshot(h8->timer[(t*2)], attotime::never, 0);
+ timer_adjust_oneshot(h8->timer[(t*2)+1], attotime::never, 0);
return;
}
if (h8->TCORA[t])
{
time = (h8->device->unscaled_clock() / dividers[div]) / (h8->TCORA[t] - h8->TCNT[t]);
- timer_adjust_oneshot(h8->timer[(t*2)], ATTOTIME_IN_HZ(time), 0);
+ timer_adjust_oneshot(h8->timer[(t*2)], attotime::from_hz(time), 0);
}
if (h8->TCORB[t])
{
time = (h8->device->unscaled_clock() / dividers[div]) / (h8->TCORB[t] - h8->TCNT[t]);
- timer_adjust_oneshot(h8->timer[(t*2)+1], ATTOTIME_IN_HZ(time), 0);
+ timer_adjust_oneshot(h8->timer[(t*2)+1], attotime::from_hz(time), 0);
}
}
@@ -433,7 +433,7 @@ static void timer_8bit_expire(h83xx_state *h8, int t, int sel)
{
static const int irqbase[2] = { 19, 22 };
- timer_adjust_oneshot(h8->timer[(t*2)+sel], attotime_never, 0);
+ timer_adjust_oneshot(h8->timer[(t*2)+sel], attotime::never, 0);
h8->TCSR[t] |= ((0x40)<<sel);
diff --git a/src/emu/cpu/h83002/h8periph.c b/src/emu/cpu/h83002/h8periph.c
index 85aa8d8e3e3..adabe4ed52a 100644
--- a/src/emu/cpu/h83002/h8periph.c
+++ b/src/emu/cpu/h83002/h8periph.c
@@ -42,7 +42,7 @@ extern void h8_3002_InterruptRequest(h83xx_state *h8, UINT8 source, UINT8 state)
static void h8itu_timer_expire(h83xx_state *h8, int which)
{
- timer_adjust_oneshot(h8->timer[which], attotime_never, 0);
+ timer_adjust_oneshot(h8->timer[which], attotime::never, 0);
h8->h8TCNT[which] = 0;
h8->per_regs[tsr[which]] |= 4;
// interrupt on overflow ?
@@ -489,7 +489,7 @@ static void h8itu_3007_timer_expire(h83xx_state *h8, int tnum)
else
{
//logerror("h8/3007 timer %d GRA match, stopping\n",tnum);
- timer_adjust_oneshot(h8->timer[tnum], attotime_never, 0);
+ timer_adjust_oneshot(h8->timer[tnum], attotime::never, 0);
}
h8->per_regs[0x64] |= 1<<tnum;
@@ -511,7 +511,7 @@ static void h8itu_3007_timer_expire(h83xx_state *h8, int tnum)
else
{
//logerror("h8/3007 timer %d GRB match, stopping\n",tnum);
- timer_adjust_oneshot(h8->timer[tnum], attotime_never, 0);
+ timer_adjust_oneshot(h8->timer[tnum], attotime::never, 0);
}
h8->per_regs[0x65] |= 1<<tnum;
@@ -790,5 +790,5 @@ void h8_itu_reset(h83xx_state *h8)
// stop all the timers
for (i=0; i<5; i++)
- timer_adjust_oneshot(h8->timer[i], attotime_never, 0);
+ timer_adjust_oneshot(h8->timer[i], attotime::never, 0);
}
diff --git a/src/emu/cpu/hd61700/hd61700.c b/src/emu/cpu/hd61700/hd61700.c
index 8a028b17b3a..ce02bcfe41a 100644
--- a/src/emu/cpu/hd61700/hd61700.c
+++ b/src/emu/cpu/hd61700/hd61700.c
@@ -169,7 +169,7 @@ void hd61700_cpu_device::device_start()
m_program = this->space(AS_PROGRAM);
m_sec_timer = device_timer_alloc(*this, SEC_TIMER);
- timer_adjust_periodic(m_sec_timer, ATTOTIME_IN_SEC(1), 0, ATTOTIME_IN_SEC(1));
+ timer_adjust_periodic(m_sec_timer, attotime::from_seconds(1), 0, attotime::from_seconds(1));
// save state
state_save_register_device_item(this, 0, m_ppc);
diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c
index 9fe201c8a89..6fdab202fdc 100644
--- a/src/emu/cpu/m6800/m6800.c
+++ b/src/emu/cpu/m6800/m6800.c
@@ -743,7 +743,7 @@ INLINE void set_rmcr(m6800_state *cpustate, UINT8 data)
{
int divisor = M6800_RMCR_SS[cpustate->rmcr & M6800_RMCR_SS_MASK];
- timer_adjust_periodic(cpustate->sci_timer, ATTOTIME_IN_HZ(cpustate->clock / divisor), 0, ATTOTIME_IN_HZ(cpustate->clock / divisor));
+ timer_adjust_periodic(cpustate->sci_timer, attotime::from_hz(cpustate->clock / divisor), 0, attotime::from_hz(cpustate->clock / divisor));
}
break;
}
diff --git a/src/emu/cpu/mb88xx/mb88xx.c b/src/emu/cpu/mb88xx/mb88xx.c
index e8c6bfe6858..db376f27434 100644
--- a/src/emu/cpu/mb88xx/mb88xx.c
+++ b/src/emu/cpu/mb88xx/mb88xx.c
@@ -217,7 +217,7 @@ static TIMER_CALLBACK( serial_timer )
/* if we get too many interrupts with no servicing, disable the timer
until somebody does something */
if (cpustate->SBcount >= SERIAL_DISABLE_THRESH)
- timer_adjust_oneshot(cpustate->serial, attotime_never, 0);
+ timer_adjust_oneshot(cpustate->serial, attotime::never, 0);
/* only read if not full; this is needed by the Namco 52xx to ensure that
the program can write to S and recover the value even if serial is enabled */
@@ -261,9 +261,9 @@ static void update_pio_enable( mb88_state *cpustate, UINT8 newpio )
if ((cpustate->pio ^ newpio) & 0x30)
{
if ((newpio & 0x30) == 0)
- timer_adjust_oneshot(cpustate->serial, attotime_never, 0);
+ timer_adjust_oneshot(cpustate->serial, attotime::never, 0);
else if ((newpio & 0x30) == 0x20)
- timer_adjust_periodic(cpustate->serial, ATTOTIME_IN_HZ(cpustate->device->clock() / SERIAL_PRESCALE), 0, ATTOTIME_IN_HZ(cpustate->device->clock() / SERIAL_PRESCALE));
+ timer_adjust_periodic(cpustate->serial, attotime::from_hz(cpustate->device->clock() / SERIAL_PRESCALE), 0, attotime::from_hz(cpustate->device->clock() / SERIAL_PRESCALE));
else
fatalerror("mb88xx: update_pio_enable set serial enable to unsupported value %02X\n", newpio & 0x30);
}
@@ -625,7 +625,7 @@ static CPU_EXECUTE( mb88 )
{
/* re-enable the timer if we disabled it previously */
if (cpustate->SBcount >= SERIAL_DISABLE_THRESH)
- timer_adjust_periodic(cpustate->serial, ATTOTIME_IN_HZ(cpustate->device->clock() / SERIAL_PRESCALE), 0, ATTOTIME_IN_HZ(cpustate->device->clock() / SERIAL_PRESCALE));
+ timer_adjust_periodic(cpustate->serial, attotime::from_hz(cpustate->device->clock() / SERIAL_PRESCALE), 0, attotime::from_hz(cpustate->device->clock() / SERIAL_PRESCALE));
cpustate->SBcount = 0;
}
cpustate->sf = 0;
diff --git a/src/emu/cpu/mips/mips3com.c b/src/emu/cpu/mips/mips3com.c
index 9d42ac924ea..a26fbbda93d 100644
--- a/src/emu/cpu/mips/mips3com.c
+++ b/src/emu/cpu/mips/mips3com.c
@@ -208,7 +208,7 @@ void mips3com_update_cycle_counting(mips3_state *mips)
timer_adjust_oneshot(mips->compare_int_timer, newtime, 0);
return;
}
- timer_adjust_oneshot(mips->compare_int_timer, attotime_never, 0);
+ timer_adjust_oneshot(mips->compare_int_timer, attotime::never, 0);
}
diff --git a/src/emu/cpu/mn10200/mn10200.c b/src/emu/cpu/mn10200/mn10200.c
index b728c85a420..1f125ce575b 100644
--- a/src/emu/cpu/mn10200/mn10200.c
+++ b/src/emu/cpu/mn10200/mn10200.c
@@ -192,7 +192,7 @@ static void refresh_timer(mn102_info *cpustate, int tmr)
rate /= cpustate->simple_timer[tmr].base;
if (tmr != 8) // HACK: timer 8 is run at 500 kHz by the Taito program for no obvious reason, which kills performance
- timer_adjust_oneshot(cpustate->timer_timers[tmr], ATTOTIME_IN_HZ(rate), tmr);
+ timer_adjust_oneshot(cpustate->timer_timers[tmr], attotime::from_hz(rate), tmr);
}
else
{
@@ -202,7 +202,7 @@ static void refresh_timer(mn102_info *cpustate, int tmr)
}
else // disabled, so stop it
{
- timer_adjust_oneshot(cpustate->timer_timers[tmr], attotime_never, tmr);
+ timer_adjust_oneshot(cpustate->timer_timers[tmr], attotime::never, tmr);
}
}
@@ -296,7 +296,7 @@ static CPU_INIT(mn10200)
for (tmr = 0; tmr < NUM_TIMERS_8BIT; tmr++)
{
cpustate->timer_timers[tmr] = timer_alloc(device->machine, simple_timer_cb, cpustate);
- timer_adjust_oneshot(cpustate->timer_timers[tmr], attotime_never, tmr);
+ timer_adjust_oneshot(cpustate->timer_timers[tmr], attotime::never, tmr);
}
}
@@ -319,7 +319,7 @@ static CPU_RESET(mn10200)
cpustate->simple_timer[tmr].mode = 0;
cpustate->simple_timer[tmr].cur = 0;
cpustate->simple_timer[tmr].base = 0;
- timer_adjust_oneshot(cpustate->timer_timers[tmr], attotime_never, tmr);
+ timer_adjust_oneshot(cpustate->timer_timers[tmr], attotime::never, tmr);
}
// clear all interrupt groups
diff --git a/src/emu/cpu/nec/v25.c b/src/emu/cpu/nec/v25.c
index c4ce9aaade7..bd19a4919fb 100644
--- a/src/emu/cpu/nec/v25.c
+++ b/src/emu/cpu/nec/v25.c
@@ -194,9 +194,9 @@ static CPU_RESET( v25 )
time = attotime::from_hz(nec_state->device->unscaled_clock()) * tmp;
timer_adjust_periodic(nec_state->timers[3], time, INTTB, time);
- timer_adjust_oneshot(nec_state->timers[0], attotime_never, 0);
- timer_adjust_oneshot(nec_state->timers[1], attotime_never, 0);
- timer_adjust_oneshot(nec_state->timers[2], attotime_never, 0);
+ timer_adjust_oneshot(nec_state->timers[0], attotime::never, 0);
+ timer_adjust_oneshot(nec_state->timers[1], attotime::never, 0);
+ timer_adjust_oneshot(nec_state->timers[2], attotime::never, 0);
SetRB(7);
Sreg(PS) = 0xffff;
diff --git a/src/emu/cpu/nec/v25sfr.c b/src/emu/cpu/nec/v25sfr.c
index 9da85ad5ced..50e990094f1 100644
--- a/src/emu/cpu/nec/v25sfr.c
+++ b/src/emu/cpu/nec/v25sfr.c
@@ -197,7 +197,7 @@ static void write_sfr(v25_state_t *nec_state, unsigned o, UINT8 d)
timer_adjust_oneshot(nec_state->timers[0], time, INTTU0);
}
else
- timer_adjust_oneshot(nec_state->timers[0], attotime_never, 0);
+ timer_adjust_oneshot(nec_state->timers[0], attotime::never, 0);
if(d & 0x20)
{
@@ -206,7 +206,7 @@ static void write_sfr(v25_state_t *nec_state, unsigned o, UINT8 d)
timer_adjust_oneshot(nec_state->timers[1], time, INTTU1);
}
else
- timer_adjust_oneshot(nec_state->timers[1], attotime_never, 0);
+ timer_adjust_oneshot(nec_state->timers[1], attotime::never, 0);
}
else /* interval mode */
{
@@ -215,13 +215,13 @@ static void write_sfr(v25_state_t *nec_state, unsigned o, UINT8 d)
tmp = nec_state->MD0 * nec_state->PCK * ((d & 0x40) ? 128 : 6 );
time = attotime::from_hz(nec_state->device->unscaled_clock()) * tmp;
timer_adjust_periodic(nec_state->timers[0], time, INTTU0, time);
- timer_adjust_oneshot(nec_state->timers[1], attotime_never, 0);
+ timer_adjust_oneshot(nec_state->timers[1], attotime::never, 0);
nec_state->TM0 = nec_state->MD0;
}
else
{
- timer_adjust_oneshot(nec_state->timers[0], attotime_never, 0);
- timer_adjust_oneshot(nec_state->timers[1], attotime_never, 0);
+ timer_adjust_oneshot(nec_state->timers[0], attotime::never, 0);
+ timer_adjust_oneshot(nec_state->timers[1], attotime::never, 0);
}
}
break;
@@ -235,7 +235,7 @@ static void write_sfr(v25_state_t *nec_state, unsigned o, UINT8 d)
nec_state->TM1 = nec_state->MD1;
}
else
- timer_adjust_oneshot(nec_state->timers[2], attotime_never, 0);
+ timer_adjust_oneshot(nec_state->timers[2], attotime::never, 0);
break;
case 0x9C: /* TMIC0 */
write_irqcontrol(nec_state, INTTU0, d);
diff --git a/src/emu/cpu/powerpc/ppccom.c b/src/emu/cpu/powerpc/ppccom.c
index 1404acb8099..b7d764cca18 100644
--- a/src/emu/cpu/powerpc/ppccom.c
+++ b/src/emu/cpu/powerpc/ppccom.c
@@ -1809,7 +1809,7 @@ static TIMER_CALLBACK( ppc4xx_fit_callback )
/* otherwise, turn ourself off */
else
- timer_adjust_oneshot(ppc->fit_timer, attotime_never, FALSE);
+ timer_adjust_oneshot(ppc->fit_timer, attotime::never, FALSE);
}
@@ -1840,7 +1840,7 @@ static TIMER_CALLBACK( ppc4xx_pit_callback )
/* otherwise, turn ourself off */
else
- timer_adjust_oneshot(ppc->pit_timer, attotime_never, FALSE);
+ timer_adjust_oneshot(ppc->pit_timer, attotime::never, FALSE);
}
@@ -1908,7 +1908,7 @@ static void ppc4xx_spu_timer_reset(powerpc_state *ppc)
/* if we're enabled, reset at the current baud rate */
if (enabled)
{
- attotime clockperiod = ATTOTIME_IN_HZ((ppc->dcr[DCR4XX_IOCR] & 0x02) ? 3686400 : 33333333);
+ attotime clockperiod = attotime::from_hz((ppc->dcr[DCR4XX_IOCR] & 0x02) ? 3686400 : 33333333);
int divisor = ((ppc->spu.regs[SPU4XX_BAUD_DIVISOR_H] * 256 + ppc->spu.regs[SPU4XX_BAUD_DIVISOR_L]) & 0xfff) + 1;
int bpc = 7 + ((ppc->spu.regs[SPU4XX_CONTROL] & 8) >> 3) + 1 + (ppc->spu.regs[SPU4XX_CONTROL] & 1);
attotime charperiod = clockperiod * (divisor * 16 * bpc);
@@ -1919,7 +1919,7 @@ static void ppc4xx_spu_timer_reset(powerpc_state *ppc)
/* otherwise, disable the timer */
else
- timer_adjust_oneshot(ppc->spu.timer, attotime_never, 0);
+ timer_adjust_oneshot(ppc->spu.timer, attotime::never, 0);
}
diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c
index cebc27039af..f11c54e0f18 100644
--- a/src/emu/cpu/sc61860/sc61860.c
+++ b/src/emu/cpu/sc61860/sc61860.c
@@ -104,7 +104,7 @@ static CPU_INIT( sc61860 )
{
sc61860_state *cpustate = get_safe_token(device);
cpustate->config = (sc61860_cpu_core *) device->baseconfig().static_config();
- timer_pulse(device->machine, ATTOTIME_IN_HZ(500), cpustate, 0, sc61860_2ms_tick);
+ timer_pulse(device->machine, attotime::from_hz(500), cpustate, 0, sc61860_2ms_tick);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
diff --git a/src/emu/cpu/sh2/sh2comn.c b/src/emu/cpu/sh2/sh2comn.c
index 278dcc1cd3a..f89e5d13012 100644
--- a/src/emu/cpu/sh2/sh2comn.c
+++ b/src/emu/cpu/sh2/sh2comn.c
@@ -73,7 +73,7 @@ static void sh2_timer_activate(sh2_state *sh2)
int max_delta = 0xfffff;
UINT16 frc;
- timer_adjust_oneshot(sh2->timer, attotime_never, 0);
+ timer_adjust_oneshot(sh2->timer, attotime::never, 0);
frc = sh2->frc;
if(!(sh2->m[4] & OCFA)) {
@@ -172,7 +172,7 @@ void sh2_notify_dma_data_available(device_t *device)
{
// printf("resuming stalled dma\n");
sh2->dma_timer_active[dma]=1;
- timer_adjust_oneshot(sh2->dma_current_active_timer[dma], attotime_zero, dma);
+ timer_adjust_oneshot(sh2->dma_current_active_timer[dma], attotime::zero, dma);
}
}
@@ -493,8 +493,8 @@ static void sh2_dmac_check(sh2_state *sh2, int dma)
if(sh2->dma_timer_active[dma])
{
logerror("SH2: DMA %d cancelled in-flight\n", dma);
- //timer_adjust_oneshot(sh2->dma_complete_timer[dma], attotime_never, 0);
- timer_adjust_oneshot(sh2->dma_current_active_timer[dma], attotime_never, 0);
+ //timer_adjust_oneshot(sh2->dma_complete_timer[dma], attotime::never, 0);
+ timer_adjust_oneshot(sh2->dma_current_active_timer[dma], attotime::never, 0);
sh2->dma_timer_active[dma] = 0;
}
@@ -924,13 +924,13 @@ void sh2_common_init(sh2_state *sh2, legacy_cpu_device *device, device_irq_callb
int i;
sh2->timer = timer_alloc(device->machine, sh2_timer_callback, sh2);
- timer_adjust_oneshot(sh2->timer, attotime_never, 0);
+ timer_adjust_oneshot(sh2->timer, attotime::never, 0);
sh2->dma_current_active_timer[0] = timer_alloc(device->machine, sh2_dma_current_active_callback, sh2);
- timer_adjust_oneshot(sh2->dma_current_active_timer[0], attotime_never, 0);
+ timer_adjust_oneshot(sh2->dma_current_active_timer[0], attotime::never, 0);
sh2->dma_current_active_timer[1] = timer_alloc(device->machine, sh2_dma_current_active_callback, sh2);
- timer_adjust_oneshot(sh2->dma_current_active_timer[1], attotime_never, 0);
+ timer_adjust_oneshot(sh2->dma_current_active_timer[1], attotime::never, 0);
sh2->m = auto_alloc_array(device->machine, UINT32, 0x200/4);
diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c
index 9c479a87bfb..175ea913baa 100644
--- a/src/emu/cpu/sh4/sh4.c
+++ b/src/emu/cpu/sh4/sh4.c
@@ -3280,7 +3280,7 @@ static CPU_RESET( sh4 )
sh4_default_exception_priorities(sh4);
memset(sh4->exception_requesting, 0, sizeof(sh4->exception_requesting));
- timer_adjust_oneshot(sh4->rtc_timer, ATTOTIME_IN_HZ(128), 0);
+ timer_adjust_oneshot(sh4->rtc_timer, attotime::from_hz(128), 0);
sh4->m[RCR2] = 0x09;
sh4->m[TCOR0] = 0xffffffff;
sh4->m[TCNT0] = 0xffffffff;
diff --git a/src/emu/cpu/sh4/sh4comn.c b/src/emu/cpu/sh4/sh4comn.c
index 6deae7852d9..7675c24d757 100644
--- a/src/emu/cpu/sh4/sh4comn.c
+++ b/src/emu/cpu/sh4/sh4comn.c
@@ -369,7 +369,7 @@ static TIMER_CALLBACK( sh4_rtc_timer_callback )
{
sh4_state *sh4 = (sh4_state *)ptr;
- timer_adjust_oneshot(sh4->rtc_timer, ATTOTIME_IN_HZ(128), 0);
+ timer_adjust_oneshot(sh4->rtc_timer, attotime::from_hz(128), 0);
sh4->m[R64CNT] = (sh4->m[R64CNT]+1) & 0x7f;
if (sh4->m[R64CNT] == 64)
{
@@ -458,7 +458,7 @@ static int sh4_dma_transfer(sh4_state *sh4, int channel, int timermode, UINT32 c
else if (timermode == 2)
{
sh4->dma_timer_active[channel] = 1;
- timer_adjust_oneshot(sh4->dma_timer[channel], attotime_zero, channel);
+ timer_adjust_oneshot(sh4->dma_timer[channel], attotime::zero, channel);
}
src &= AM;
@@ -601,7 +601,7 @@ UINT32 dmatcr,chcr,sar,dar;
if (sh4->dma_timer_active[channel])
{
logerror("SH4: DMA %d cancelled in-flight but all data transferred", channel);
- timer_adjust_oneshot(sh4->dma_timer[channel], attotime_never, channel);
+ timer_adjust_oneshot(sh4->dma_timer[channel], attotime::never, channel);
sh4->dma_timer_active[channel] = 0;
}
}
@@ -617,7 +617,7 @@ int s;
if (sh4->dma_timer_active[s])
{
logerror("SH4: DMA %d cancelled due to NMI but all data transferred", s);
- timer_adjust_oneshot(sh4->dma_timer[s], attotime_never, s);
+ timer_adjust_oneshot(sh4->dma_timer[s], attotime::never, s);
sh4->dma_timer_active[s] = 0;
}
}
@@ -671,7 +671,7 @@ WRITE32_HANDLER( sh4_internal_w )
}
else
{
- timer_adjust_oneshot(sh4->refresh_timer, attotime_never, 0);
+ timer_adjust_oneshot(sh4->refresh_timer, attotime::never, 0);
}
break;
@@ -717,11 +717,11 @@ WRITE32_HANDLER( sh4_internal_w )
}
if ((sh4->m[RCR2] & 8) && (~old & 8))
{ // 0 -> 1
- timer_adjust_oneshot(sh4->rtc_timer, ATTOTIME_IN_HZ(128), 0);
+ timer_adjust_oneshot(sh4->rtc_timer, attotime::from_hz(128), 0);
}
else if (~(sh4->m[RCR2]) & 8)
{ // 0
- timer_adjust_oneshot(sh4->rtc_timer, attotime_never, 0);
+ timer_adjust_oneshot(sh4->rtc_timer, attotime::never, 0);
}
break;
@@ -730,21 +730,21 @@ WRITE32_HANDLER( sh4_internal_w )
if (old & 1)
sh4->m[TCNT0] = compute_ticks_timer(sh4->timer[0], sh4->pm_clock, tcnt_div[sh4->m[TCR0] & 7]);
if ((sh4->m[TSTR] & 1) == 0) {
- timer_adjust_oneshot(sh4->timer[0], attotime_never, 0);
+ timer_adjust_oneshot(sh4->timer[0], attotime::never, 0);
} else
sh4_timer_recompute(sh4, 0);
if (old & 2)
sh4->m[TCNT1] = compute_ticks_timer(sh4->timer[1], sh4->pm_clock, tcnt_div[sh4->m[TCR1] & 7]);
if ((sh4->m[TSTR] & 2) == 0) {
- timer_adjust_oneshot(sh4->timer[1], attotime_never, 0);
+ timer_adjust_oneshot(sh4->timer[1], attotime::never, 0);
} else
sh4_timer_recompute(sh4, 1);
if (old & 4)
sh4->m[TCNT2] = compute_ticks_timer(sh4->timer[2], sh4->pm_clock, tcnt_div[sh4->m[TCR2] & 7]);
if ((sh4->m[TSTR] & 4) == 0) {
- timer_adjust_oneshot(sh4->timer[2], attotime_never, 0);
+ timer_adjust_oneshot(sh4->timer[2], attotime::never, 0);
} else
sh4_timer_recompute(sh4, 2);
break;
@@ -1161,21 +1161,21 @@ void sh4_common_init(device_t *device)
for (i=0; i<3; i++)
{
sh4->timer[i] = timer_alloc(device->machine, sh4_timer_callback, sh4);
- timer_adjust_oneshot(sh4->timer[i], attotime_never, i);
+ timer_adjust_oneshot(sh4->timer[i], attotime::never, i);
}
for (i=0; i<4; i++)
{
sh4->dma_timer[i] = timer_alloc(device->machine, sh4_dmac_callback, sh4);
- timer_adjust_oneshot(sh4->dma_timer[i], attotime_never, i);
+ timer_adjust_oneshot(sh4->dma_timer[i], attotime::never, i);
}
sh4->refresh_timer = timer_alloc(device->machine, sh4_refresh_timer_callback, sh4);
- timer_adjust_oneshot(sh4->refresh_timer, attotime_never, 0);
+ timer_adjust_oneshot(sh4->refresh_timer, attotime::never, 0);
sh4->refresh_timer_base = 0;
sh4->rtc_timer = timer_alloc(device->machine, sh4_rtc_timer_callback, sh4);
- timer_adjust_oneshot(sh4->rtc_timer, attotime_never, 0);
+ timer_adjust_oneshot(sh4->rtc_timer, attotime::never, 0);
sh4->m = auto_alloc_array(device->machine, UINT32, 16384);
}
diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c
index 4e424d19378..88e762984d4 100644
--- a/src/emu/cpu/tlcs90/tlcs90.c
+++ b/src/emu/cpu/tlcs90/tlcs90.c
@@ -2384,7 +2384,7 @@ static void t90_start_timer4(t90_Regs *cpustate)
static void t90_stop_timer(t90_Regs *cpustate, int i)
{
- timer_adjust_oneshot(cpustate->timer[i], attotime_never, i);
+ timer_adjust_oneshot(cpustate->timer[i], attotime::never, i);
logerror("%04X: CPU Timer %d stopped\n", cpustate->pc.w.l, i);
}
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index e51b52d1295..f7047d0e886 100644
--- a/src/emu/cpu/tms34010/tms34010.c
+++ b/src/emu/cpu/tms34010/tms34010.c
@@ -653,7 +653,7 @@ static CPU_INIT( tms34010 )
/* allocate a scanline timer and set it to go off at the start */
tms->scantimer = timer_alloc(device->machine, scanline_callback, tms);
- timer_adjust_oneshot(tms->scantimer, attotime_zero, 0);
+ timer_adjust_oneshot(tms->scantimer, attotime::zero, 0);
/* allocate the shiftreg */
tms->shiftreg = auto_alloc_array(device->machine, UINT16, SHIFTREG_SIZE/2);
diff --git a/src/emu/cpu/tms9900/99xxcore.h b/src/emu/cpu/tms9900/99xxcore.h
index 751657e4d1e..5cf4a00a169 100644
--- a/src/emu/cpu/tms9900/99xxcore.h
+++ b/src/emu/cpu/tms9900/99xxcore.h
@@ -1767,7 +1767,7 @@ static TIMER_CALLBACK( decrementer_callback )
*/
static void reset_decrementer(tms99xx_state *cpustate)
{
- timer_adjust_oneshot(cpustate->timer, attotime_never, 0);
+ timer_adjust_oneshot(cpustate->timer, attotime::never, 0);
/* reload count */
cpustate->decrementer_count = cpustate->decrementer_interval;
diff --git a/src/emu/cpu/z8/z8.c b/src/emu/cpu/z8/z8.c
index eb2a3042ba6..42ff8fd9dea 100644
--- a/src/emu/cpu/z8/z8.c
+++ b/src/emu/cpu/z8/z8.c
@@ -353,7 +353,7 @@ INLINE void register_write(z8_state *cpustate, UINT8 offset, UINT8 data)
if (data & Z8_TMR_LOAD_T0)
{
cpustate->t0 = T0;
- timer_adjust_periodic(cpustate->t0_timer, attotime_zero, 0, ATTOTIME_IN_HZ(cpustate->clock / 2 / 4 / ((PRE0 >> 2) + 1)));
+ timer_adjust_periodic(cpustate->t0_timer, attotime::zero, 0, attotime::from_hz(cpustate->clock / 2 / 4 / ((PRE0 >> 2) + 1)));
}
timer_enable(cpustate->t0_timer, data & Z8_TMR_ENABLE_T0);
@@ -361,7 +361,7 @@ INLINE void register_write(z8_state *cpustate, UINT8 offset, UINT8 data)
if (data & Z8_TMR_LOAD_T1)
{
cpustate->t1 = T1;
- timer_adjust_periodic(cpustate->t1_timer, attotime_zero, 0, ATTOTIME_IN_HZ(cpustate->clock / 2 / 4 / ((PRE1 >> 2) + 1)));
+ timer_adjust_periodic(cpustate->t1_timer, attotime::zero, 0, attotime::from_hz(cpustate->clock / 2 / 4 / ((PRE1 >> 2) + 1)));
}
timer_enable(cpustate->t1_timer, data & Z8_TMR_ENABLE_T1);
@@ -613,7 +613,7 @@ static TIMER_CALLBACK( t0_tick )
if (cpustate->t0 == 0)
{
cpustate->t0 = T0;
- timer_adjust_periodic(cpustate->t0_timer, attotime_zero, 0, ATTOTIME_IN_HZ(cpustate->clock / 2 / 4 / ((PRE0 >> 2) + 1)));
+ timer_adjust_periodic(cpustate->t0_timer, attotime::zero, 0, attotime::from_hz(cpustate->clock / 2 / 4 / ((PRE0 >> 2) + 1)));
timer_enable(cpustate->t0_timer, PRE0 & Z8_PRE0_COUNT_MODULO_N);
cpustate->irq[4] = ASSERT_LINE;
}
@@ -628,7 +628,7 @@ static TIMER_CALLBACK( t1_tick )
if (cpustate->t1 == 0)
{
cpustate->t1 = T1;
- timer_adjust_periodic(cpustate->t1_timer, attotime_zero, 0, ATTOTIME_IN_HZ(cpustate->clock / 2 / 4 / ((PRE1 >> 2) + 1)));
+ timer_adjust_periodic(cpustate->t1_timer, attotime::zero, 0, attotime::from_hz(cpustate->clock / 2 / 4 / ((PRE1 >> 2) + 1)));
timer_enable(cpustate->t1_timer, PRE1 & Z8_PRE0_COUNT_MODULO_N);
cpustate->irq[5] = ASSERT_LINE;
}
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index d29230036dd..ffaffe99db3 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -1665,10 +1665,10 @@ device_debug::device_debug(device_t &device)
m_stepaddr(0),
m_stepsleft(0),
m_stopaddr(0),
- m_stoptime(attotime_zero),
+ m_stoptime(attotime::zero),
m_stopirq(0),
m_stopexception(0),
- m_endexectime(attotime_zero),
+ m_endexectime(attotime::zero),
m_pc_history_index(0),
m_bplist(NULL),
m_trace(NULL),
diff --git a/src/emu/diexec.c b/src/emu/diexec.c
index 96a76f4b0ec..3d78cfc9d3d 100644
--- a/src/emu/diexec.c
+++ b/src/emu/diexec.c
@@ -78,7 +78,7 @@ device_config_execute_interface::device_config_execute_interface(const machine_c
m_vblank_interrupts_per_frame(0),
m_vblank_interrupt_screen(NULL),
m_timed_interrupt(NULL),
- m_timed_interrupt_period(attotime_zero)
+ m_timed_interrupt_period(attotime::zero)
{
}
diff --git a/src/emu/diexec.h b/src/emu/diexec.h
index 6effe47ac55..c0904631fb6 100644
--- a/src/emu/diexec.h
+++ b/src/emu/diexec.h
@@ -115,7 +115,7 @@ enum
device_config_execute_interface::static_set_vblank_int(device, _func, _tag); \
#define MCFG_DEVICE_PERIODIC_INT(_func, _rate) \
- device_config_execute_interface::static_set_periodic_int(device, _func, ATTOTIME_IN_HZ(_rate)); \
+ device_config_execute_interface::static_set_periodic_int(device, _func, attotime::from_hz(_rate)); \
diff --git a/src/emu/imagedev/bitbngr.c b/src/emu/imagedev/bitbngr.c
index 0482f73868b..c55c2b9678f 100644
--- a/src/emu/imagedev/bitbngr.c
+++ b/src/emu/imagedev/bitbngr.c
@@ -225,7 +225,7 @@ bool bitbanger_inc_baud(device_t *device, bool test)
if( !test)
{
bi->baud = adjust_baud;
- bi->current_baud = ATTOTIME_IN_HZ(bitbanger_baud_value(device));
+ bi->current_baud = attotime::from_hz(bitbanger_baud_value(device));
}
return TRUE;
@@ -246,7 +246,7 @@ bool bitbanger_dec_baud(device_t *device, bool test)
if( !test)
{
bi->baud = adjust_baud;
- bi->current_baud = ATTOTIME_IN_HZ(bitbanger_baud_value(device));
+ bi->current_baud = attotime::from_hz(bitbanger_baud_value(device));
}
return TRUE;
@@ -267,7 +267,7 @@ bool bitbanger_inc_tune(device_t *device, bool test)
if( !test)
{
bi->tune = adjust_tune;
- bi->current_baud = ATTOTIME_IN_HZ(bitbanger_baud_value(device));
+ bi->current_baud = attotime::from_hz(bitbanger_baud_value(device));
}
return TRUE;
@@ -288,7 +288,7 @@ bool bitbanger_dec_tune(device_t *device, bool test)
if( !test)
{
bi->tune = adjust_tune;
- bi->current_baud = ATTOTIME_IN_HZ(bitbanger_baud_value(device));
+ bi->current_baud = attotime::from_hz(bitbanger_baud_value(device));
}
return TRUE;
@@ -348,14 +348,14 @@ static DEVICE_START(bitbanger)
/* input config */
bi->bitbanger_input_timer = timer_alloc(device->machine, bitbanger_input_timer, (void *) device );
- bi->idle_delay = ATTOTIME_IN_SEC(1);
+ bi->idle_delay = attotime::from_seconds(1);
bi->input_buffer_size = 0;
bi->input_buffer_cursor = 0;
bi->mode = config->default_mode;
bi->baud = config->default_baud;
bi->tune = config->default_tune;
- bi->current_baud = ATTOTIME_IN_HZ(bitbanger_baud_value(device));
+ bi->current_baud = attotime::from_hz(bitbanger_baud_value(device));
/* test callback */
if(!config->input_callback)
@@ -386,7 +386,7 @@ static TIMER_CALLBACK(bitbanger_output_timer)
else
logerror("Bitbanger: Output framing error.\n" );
- timer_reset(bi->bitbanger_output_timer, attotime_never);
+ timer_reset(bi->bitbanger_output_timer, attotime::never);
}
}
@@ -469,7 +469,7 @@ static DEVICE_IMAGE_LOAD( bitbanger )
bi = get_token(device);
timer_enable(bi->bitbanger_input_timer, TRUE);
- timer_adjust_periodic(bi->bitbanger_input_timer, attotime_zero, 0, ATTOTIME_IN_SEC(1));
+ timer_adjust_periodic(bi->bitbanger_input_timer, attotime::zero, 0, attotime::from_seconds(1));
/* we don't need to do anything special */
return IMAGE_INIT_PASS;
diff --git a/src/emu/imagedev/flopdrv.c b/src/emu/imagedev/flopdrv.c
index 6f22d8dea71..786f8b3f134 100644
--- a/src/emu/imagedev/flopdrv.c
+++ b/src/emu/imagedev/flopdrv.c
@@ -674,7 +674,7 @@ DEVICE_IMAGE_LOAD( floppy )
else
next_wpt = CLEAR_LINE;
- timer_set(image.device().machine, ATTOTIME_IN_MSEC(250), flopimg, next_wpt, set_wpt);
+ timer_set(image.device().machine, attotime::from_msec(250), flopimg, next_wpt, set_wpt);
return retVal;
}
@@ -702,7 +702,7 @@ DEVICE_IMAGE_UNLOAD( floppy )
devcb_call_write_line(&flopimg->out_wpt_func, flopimg->wpt);
/* set timer for disk eject */
- timer_set(image.device().machine, ATTOTIME_IN_MSEC(250), flopimg, ASSERT_LINE, set_wpt);
+ timer_set(image.device().machine, attotime::from_msec(250), flopimg, ASSERT_LINE, set_wpt);
}
device_t *floppy_get_device(running_machine *machine,int drive)
@@ -843,7 +843,7 @@ WRITE_LINE_DEVICE_HANDLER( floppy_mon_w )
/* on -> off */
else if (drive->mon == CLEAR_LINE && state)
- timer_adjust_oneshot((emu_timer*)drive->index_timer, attotime_zero, 0);
+ timer_adjust_oneshot((emu_timer*)drive->index_timer, attotime::zero, 0);
drive->mon = state;
}
diff --git a/src/emu/machine.c b/src/emu/machine.c
index a849db02b87..a92cff83bfd 100644
--- a/src/emu/machine.c
+++ b/src/emu/machine.c
@@ -184,7 +184,7 @@ running_machine::running_machine(const machine_config &_config, osd_interface &o
m_soft_reset_timer(NULL),
m_logfile(NULL),
m_saveload_schedule(SLS_NONE),
- m_saveload_schedule_time(attotime_zero),
+ m_saveload_schedule_time(attotime::zero),
m_saveload_searchpath(NULL),
m_rand_seed(0x9d14abd7),
m_driver_device(NULL),
@@ -492,7 +492,7 @@ void running_machine::schedule_hard_reset()
void running_machine::schedule_soft_reset()
{
- timer_adjust_oneshot(m_soft_reset_timer, attotime_zero, 0);
+ timer_adjust_oneshot(m_soft_reset_timer, attotime::zero, 0);
// we can't be paused since the timer needs to fire
resume();
diff --git a/src/emu/machine/6526cia.c b/src/emu/machine/6526cia.c
index 3b328a26419..10300b4b1d9 100644
--- a/src/emu/machine/6526cia.c
+++ b/src/emu/machine/6526cia.c
@@ -208,7 +208,7 @@ void mos6526_device::device_start()
/* setup TOD timer, if appropriate */
if (m_config.m_tod_clock != 0)
{
- timer_pulse(&m_machine, ATTOTIME_IN_HZ(m_config.m_tod_clock), (void *)this, 0, clock_tod_callback);
+ timer_pulse(&m_machine, attotime::from_hz(m_config.m_tod_clock), (void *)this, 0, clock_tod_callback);
}
/* state save support */
@@ -893,7 +893,7 @@ void mos6526_device::cia_timer::update(int which, INT32 new_count)
else
{
/* timer is off or not connected to clock */
- timer_adjust_oneshot(m_timer, attotime_never, which);
+ timer_adjust_oneshot(m_timer, attotime::never, which);
}
}
diff --git a/src/emu/machine/6532riot.c b/src/emu/machine/6532riot.c
index d8e8c2862a6..f159bf057f0 100644
--- a/src/emu/machine/6532riot.c
+++ b/src/emu/machine/6532riot.c
@@ -580,5 +580,5 @@ void riot6532_device::device_reset()
/* reset timer states */
m_timershift = 0;
m_timerstate = TIMER_IDLE;
- timer_adjust_oneshot(m_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_timer, attotime::never, 0);
}
diff --git a/src/emu/machine/6850acia.c b/src/emu/machine/6850acia.c
index 110787a720b..5bbe021d3a5 100644
--- a/src/emu/machine/6850acia.c
+++ b/src/emu/machine/6850acia.c
@@ -122,8 +122,8 @@ void acia6850_device::device_start()
m_status_read = 0;
m_brk = 0;
- timer_reset(m_rx_timer, attotime_never);
- timer_reset(m_tx_timer, attotime_never);
+ timer_reset(m_rx_timer, attotime::never);
+ timer_reset(m_tx_timer, attotime::never);
state_save_register_device_item(this, 0, m_ctrl);
state_save_register_device_item(this, 0, m_status);
diff --git a/src/emu/machine/68681.c b/src/emu/machine/68681.c
index 88f8abe7d44..3d0adbcc068 100644
--- a/src/emu/machine/68681.c
+++ b/src/emu/machine/68681.c
@@ -335,7 +335,7 @@ static void duart68681_write_CR(duart68681_state *duart68681, int ch, UINT8 data
duart68681->ISR &= ~INT_TXRDYA;
else
duart68681->ISR &= ~INT_TXRDYB;
- timer_adjust_oneshot(duart68681->channel[ch].tx_timer, attotime_never, ch);
+ timer_adjust_oneshot(duart68681->channel[ch].tx_timer, attotime::never, ch);
break;
case 4: /* Reset Error Status */
duart68681->channel[ch].SR &= ~(STATUS_RECEIVED_BREAK | STATUS_FRAMING_ERROR | STATUS_PARITY_ERROR | STATUS_OVERRUN_ERROR);
@@ -428,7 +428,7 @@ static TIMER_CALLBACK( tx_timer_callback )
duart68681->ISR |= INT_TXRDYB;
duart68681_update_interrupts(duart68681);
- timer_adjust_oneshot(duart68681->channel[ch].tx_timer, attotime_never, ch);
+ timer_adjust_oneshot(duart68681->channel[ch].tx_timer, attotime::never, ch);
};
static void duart68681_write_TX(duart68681_state* duart68681, int ch, UINT8 data)
@@ -450,7 +450,7 @@ static void duart68681_write_TX(duart68681_state* duart68681, int ch, UINT8 data
duart68681_update_interrupts(duart68681);
- period = ATTOTIME_IN_HZ(duart68681->channel[ch].baud_rate / 10 );
+ period = attotime::from_hz(duart68681->channel[ch].baud_rate / 10 );
timer_adjust_oneshot(duart68681->channel[ch].tx_timer, period, ch);
// if local loopback is on, write the transmitted data as if a byte had been recieved
@@ -558,13 +558,13 @@ READ8_DEVICE_HANDLER(duart68681_r)
/* TODO: implement modes 0,1,2,4,5 */
case 0x03: /* Counter, CLK/16 */
{
- attotime rate = ATTOTIME_IN_HZ(2*device->clock()/(2*16*16*duart68681->CTR.w.l));
+ attotime rate = attotime::from_hz(2*device->clock()/(2*16*16*duart68681->CTR.w.l));
timer_adjust_periodic(duart68681->duart_timer, rate, 0, rate);
}
break;
case 0x06: /* Timer, CLK/1 */
{
- attotime rate = ATTOTIME_IN_HZ(2*device->clock()/(2*16*duart68681->CTR.w.l));
+ attotime rate = attotime::from_hz(2*device->clock()/(2*16*duart68681->CTR.w.l));
timer_adjust_periodic(duart68681->duart_timer, rate, 0, rate);
}
break;
@@ -572,7 +572,7 @@ READ8_DEVICE_HANDLER(duart68681_r)
{
//double hz;
//attotime rate = attotime::from_hz(duart68681->clock) * (16*duart68681->CTR.w.l);
- attotime rate = ATTOTIME_IN_HZ(2*device->clock()/(2*16*16*duart68681->CTR.w.l));
+ attotime rate = attotime::from_hz(2*device->clock()/(2*16*16*duart68681->CTR.w.l));
//hz = ATTOSECONDS_TO_HZ(rate.attoseconds);
timer_adjust_periodic(duart68681->duart_timer, rate, 0, rate);
}
@@ -582,7 +582,7 @@ READ8_DEVICE_HANDLER(duart68681_r)
case 0x0f: /* Stop counter command */
duart68681->ISR &= ~INT_COUNTER_READY;
if (((duart68681->ACR >>4)& 0x07) < 4) // if in counter mode...
- timer_adjust_oneshot(duart68681->duart_timer, attotime_never, 0); // shut down timer
+ timer_adjust_oneshot(duart68681->duart_timer, attotime::never, 0); // shut down timer
duart68681_update_interrupts(duart68681);
break;
default:
@@ -783,8 +783,8 @@ static DEVICE_RESET(duart68681)
duart68681->duart_config->output_port_write(duart68681->device, duart68681->OPR ^ 0xff);
// reset timers
- timer_adjust_oneshot(duart68681->channel[0].tx_timer, attotime_never, 0);
- timer_adjust_oneshot(duart68681->channel[1].tx_timer, attotime_never, 1);
+ timer_adjust_oneshot(duart68681->channel[0].tx_timer, attotime::never, 0);
+ timer_adjust_oneshot(duart68681->channel[1].tx_timer, attotime::never, 1);
}
/*-------------------------------------------------
diff --git a/src/emu/machine/74123.c b/src/emu/machine/74123.c
index 9f72e7b3845..d10a29a29b1 100644
--- a/src/emu/machine/74123.c
+++ b/src/emu/machine/74123.c
@@ -202,7 +202,7 @@ void ttl74123_device::set_output()
{
int output = timer_running();
- timer_set( &m_machine, attotime_zero, (void *)this, output, output_callback );
+ timer_set( &m_machine, attotime::zero, (void *)this, output, output_callback );
if (LOG) logerror("74123 %s: Output: %d\n", tag(), output);
}
@@ -325,7 +325,7 @@ void ttl74123_device::clear_w(UINT8 data)
}
else if (!data) /* clear the output */
{
- timer_adjust_oneshot(m_timer, attotime_zero, 0);
+ timer_adjust_oneshot(m_timer, attotime::zero, 0);
if (LOG) logerror("74123 #%s: Cleared\n", tag() );
}
diff --git a/src/emu/machine/8042kbdc.c b/src/emu/machine/8042kbdc.c
index d7bfbd1723c..6e66911f248 100644
--- a/src/emu/machine/8042kbdc.c
+++ b/src/emu/machine/8042kbdc.c
@@ -279,7 +279,7 @@ void kbdc8042_init(running_machine *machine, const struct kbdc8042_interface *in
kbdc8042.inport = 0xa0;
at_8042_set_outport(machine, 0xfe, 1);
- timer_pulse(machine, ATTOTIME_IN_HZ(60), NULL, 0, kbdc8042_time);
+ timer_pulse(machine, attotime::from_hz(60), NULL, 0, kbdc8042_time);
}
static void at_8042_receive(running_machine *machine, UINT8 data)
diff --git a/src/emu/machine/8237dma.c b/src/emu/machine/8237dma.c
index f58a4f0ad35..822a2f8ab2c 100644
--- a/src/emu/machine/8237dma.c
+++ b/src/emu/machine/8237dma.c
@@ -150,7 +150,7 @@ void i8237_device::device_reset()
m_chan[2].m_mode = 0;
m_chan[3].m_mode = 0;
- timer_adjust_periodic(m_timer, ATTOTIME_IN_HZ(clock()), 0, ATTOTIME_IN_HZ(clock()));
+ timer_adjust_periodic(m_timer, attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
}
diff --git a/src/emu/machine/8257dma.c b/src/emu/machine/8257dma.c
index 962c660949b..cdc24d1bad6 100644
--- a/src/emu/machine/8257dma.c
+++ b/src/emu/machine/8257dma.c
@@ -329,9 +329,9 @@ void i8257_device::i8257_update_status()
if (pending_transfer)
{
- next = ATTOTIME_IN_HZ(clock() / 4 );
+ next = attotime::from_hz(clock() / 4 );
timer_adjust_periodic(m_timer,
- attotime_zero,
+ attotime::zero,
0,
/* 1 byte transferred in 4 clock cycles */
next);
@@ -339,7 +339,7 @@ void i8257_device::i8257_update_status()
else
{
/* no transfers active right now */
- timer_reset(m_timer, attotime_never);
+ timer_reset(m_timer, attotime::never);
}
/* set the halt line */
@@ -349,7 +349,7 @@ void i8257_device::i8257_update_status()
void i8257_device::i8257_prepare_msb_flip()
{
- timer_adjust_oneshot(m_msbflip_timer, attotime_zero, 0);
+ timer_adjust_oneshot(m_msbflip_timer, attotime::zero, 0);
}
diff --git a/src/emu/machine/am53cf96.c b/src/emu/machine/am53cf96.c
index ed9d1001c99..aea8ed38799 100644
--- a/src/emu/machine/am53cf96.c
+++ b/src/emu/machine/am53cf96.c
@@ -159,10 +159,10 @@ WRITE32_HANDLER( am53cf96_w )
case 3: // reset SCSI bus
scsi_regs[REG_INTSTATE] = 4; // command sent OK
xfer_state = 0;
- timer_set( space->machine, ATTOTIME_IN_HZ( 16384 ), NULL, 0, am53cf96_irq );
+ timer_set( space->machine, attotime::from_hz( 16384 ), NULL, 0, am53cf96_irq );
break;
case 0x42: // select with ATN steps
- timer_set( space->machine, ATTOTIME_IN_HZ( 16384 ), NULL, 0, am53cf96_irq );
+ timer_set( space->machine, attotime::from_hz( 16384 ), NULL, 0, am53cf96_irq );
if ((fifo[1] == 0) || (fifo[1] == 0x48) || (fifo[1] == 0x4b))
{
scsi_regs[REG_INTSTATE] = 6;
@@ -192,7 +192,7 @@ WRITE32_HANDLER( am53cf96_w )
case 0x10: // information transfer (must not change xfer_state)
case 0x11: // second phase of information transfer
case 0x12: // message accepted
- timer_set( space->machine, ATTOTIME_IN_HZ( 16384 ), NULL, 0, am53cf96_irq );
+ timer_set( space->machine, attotime::from_hz( 16384 ), NULL, 0, am53cf96_irq );
scsi_regs[REG_INTSTATE] = 6; // command sent OK
break;
default:
diff --git a/src/emu/machine/at28c16.c b/src/emu/machine/at28c16.c
index 991188667fd..268747199b1 100644
--- a/src/emu/machine/at28c16.c
+++ b/src/emu/machine/at28c16.c
@@ -246,7 +246,7 @@ void at28c16_device::write( offs_t offset, UINT8 data )
}
m_last_write = 0xff;
- timer_adjust_oneshot( m_write_timer, ATTOTIME_IN_USEC( 200 ), 0 );
+ timer_adjust_oneshot( m_write_timer, attotime::from_usec( 200 ), 0 );
}
}
else
@@ -261,7 +261,7 @@ void at28c16_device::write( offs_t offset, UINT8 data )
{
m_addrspace[ 0 ]->write_byte( offset, data );
m_last_write = data;
- timer_adjust_oneshot( m_write_timer, ATTOTIME_IN_USEC( 200 ), 0 );
+ timer_adjust_oneshot( m_write_timer, attotime::from_usec( 200 ), 0 );
}
}
}
diff --git a/src/emu/machine/cdp1852.c b/src/emu/machine/cdp1852.c
index c6df1a9792a..4cd891a7891 100644
--- a/src/emu/machine/cdp1852.c
+++ b/src/emu/machine/cdp1852.c
@@ -166,7 +166,7 @@ static DEVICE_START( cdp1852 )
{
/* create the scan timer */
cdp1852->scan_timer = timer_alloc(device->machine, cdp1852_scan_tick, (void *)device);
- timer_adjust_periodic(cdp1852->scan_timer, attotime_zero, 0, ATTOTIME_IN_HZ(device->clock()));
+ timer_adjust_periodic(cdp1852->scan_timer, attotime::zero, 0, attotime::from_hz(device->clock()));
}
/* register for state saving */
diff --git a/src/emu/machine/ds2401.c b/src/emu/machine/ds2401.c
index f20d5b2c63d..c27738b4679 100644
--- a/src/emu/machine/ds2401.c
+++ b/src/emu/machine/ds2401.c
@@ -63,7 +63,7 @@ static TIMER_CALLBACK( ds2401_reset )
verboselog( machine, 1, "ds2401_reset(%d)\n", which );
c->state = STATE_RESET;
- timer_adjust_oneshot( c->timer, attotime_never, which );
+ timer_adjust_oneshot( c->timer, attotime::never, which );
}
static TIMER_CALLBACK( ds2401_tick )
@@ -140,11 +140,11 @@ void ds2401_init( running_machine *machine, int which, const UINT8 *data )
c->rx = 1;
c->tx = 1;
c->data = data;
- c->t_samp = ATTOTIME_IN_USEC( 15 );
- c->t_rdv = ATTOTIME_IN_USEC( 15 );
- c->t_rstl = ATTOTIME_IN_USEC( 480 );
- c->t_pdh = ATTOTIME_IN_USEC( 15 );
- c->t_pdl = ATTOTIME_IN_USEC( 60 );
+ c->t_samp = attotime::from_usec( 15 );
+ c->t_rdv = attotime::from_usec( 15 );
+ c->t_rstl = attotime::from_usec( 480 );
+ c->t_pdh = attotime::from_usec( 15 );
+ c->t_pdl = attotime::from_usec( 60 );
state_save_register_item(machine, "ds2401", NULL, which, c->state );
state_save_register_item(machine, "ds2401", NULL, which, c->bit );
@@ -205,7 +205,7 @@ void ds2401_write( running_machine *machine, int which, int data )
timer_adjust_oneshot( c->timer, c->t_pdh, which );
break;
}
- timer_adjust_oneshot( c->reset_timer, attotime_never, which );
+ timer_adjust_oneshot( c->reset_timer, attotime::never, which );
}
c->rx = data;
}
diff --git a/src/emu/machine/ds2404.c b/src/emu/machine/ds2404.c
index ded7071e5b5..eb8e4692f63 100644
--- a/src/emu/machine/ds2404.c
+++ b/src/emu/machine/ds2404.c
@@ -130,7 +130,7 @@ void ds2404_device::device_start()
m_rtc[4] = (current_time >> 24) & 0xff;
emu_timer *timer = timer_alloc(&m_machine, ds2404_tick_callback, (void *)this);
- timer_adjust_periodic(timer, ATTOTIME_IN_HZ(256), 0, ATTOTIME_IN_HZ(256));
+ timer_adjust_periodic(timer, attotime::from_hz(256), 0, attotime::from_hz(256));
}
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c
index 71a931cac7d..ceeb86c1567 100644
--- a/src/emu/machine/idectrl.c
+++ b/src/emu/machine/idectrl.c
@@ -29,14 +29,14 @@
#define IDE_DISK_SECTOR_SIZE 512
-#define MINIMUM_COMMAND_TIME (ATTOTIME_IN_USEC(10))
+#define MINIMUM_COMMAND_TIME (attotime::from_usec(10))
-#define TIME_PER_SECTOR (ATTOTIME_IN_USEC(100))
-#define TIME_PER_ROTATION (ATTOTIME_IN_HZ(5400/60))
-#define TIME_SECURITY_ERROR (ATTOTIME_IN_MSEC(1000))
+#define TIME_PER_SECTOR (attotime::from_usec(100))
+#define TIME_PER_ROTATION (attotime::from_hz(5400/60))
+#define TIME_SECURITY_ERROR (attotime::from_msec(1000))
-#define TIME_SEEK_MULTISECTOR (ATTOTIME_IN_MSEC(13))
-#define TIME_NO_SEEK_MULTISECTOR (ATTOTIME_IN_NSEC(16300))
+#define TIME_SEEK_MULTISECTOR (attotime::from_msec(13))
+#define TIME_NO_SEEK_MULTISECTOR (attotime::from_nsec(16300))
#define IDE_STATUS_ERROR 0x01
#define IDE_STATUS_HIT_INDEX 0x02
@@ -825,7 +825,7 @@ static void read_next_sector(ide_state *ide)
read_sector_done(ide);
else
/* just set a timer */
- timer_set(ide->device->machine, ATTOTIME_IN_USEC(1), ide, 0, read_sector_done_callback);
+ timer_set(ide->device->machine, attotime::from_usec(1), ide, 0, read_sector_done_callback);
}
else
/* just set a timer */
@@ -1317,7 +1317,7 @@ static UINT32 ide_controller_read(device_t *device, int bank, offs_t offset, int
if (timer_timeelapsed(ide->last_status_timer) > TIME_PER_ROTATION)
{
result |= IDE_STATUS_HIT_INDEX;
- timer_adjust_oneshot(ide->last_status_timer, attotime_never, 0);
+ timer_adjust_oneshot(ide->last_status_timer, attotime::never, 0);
}
/* clear interrutps only when reading the real status */
@@ -1500,7 +1500,7 @@ static void ide_controller_write(device_t *device, int bank, offs_t offset, int
{
ide->status |= IDE_STATUS_BUSY;
ide->status &= ~IDE_STATUS_DRIVE_READY;
- timer_adjust_oneshot(ide->reset_timer, ATTOTIME_IN_MSEC(5), 0);
+ timer_adjust_oneshot(ide->reset_timer, attotime::from_msec(5), 0);
}
break;
}
diff --git a/src/emu/machine/intelfsh.c b/src/emu/machine/intelfsh.c
index 8ebd8bde20f..6a17f9d3594 100644
--- a/src/emu/machine/intelfsh.c
+++ b/src/emu/machine/intelfsh.c
@@ -600,11 +600,11 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
if (m_config.m_sector_is_4k)
{
- timer_adjust_oneshot( m_timer, ATTOTIME_IN_SEC( 1 ), 0 );
+ timer_adjust_oneshot( m_timer, attotime::from_seconds( 1 ), 0 );
}
else
{
- timer_adjust_oneshot( m_timer, ATTOTIME_IN_SEC( 16 ), 0 );
+ timer_adjust_oneshot( m_timer, attotime::from_seconds( 16 ), 0 );
}
}
else if( ( data & 0xff ) == 0x30 )
@@ -617,14 +617,14 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
for (offs_t offs = 0; offs < 4 * 1024; offs++)
m_addrspace[0]->write_byte((base & ~0xfff) + offs, 0xff);
m_erase_sector = address & ((m_config.m_bits == 16) ? ~0x7ff : ~0xfff);
- timer_adjust_oneshot( m_timer, ATTOTIME_IN_MSEC( 125 ), 0 );
+ timer_adjust_oneshot( m_timer, attotime::from_msec( 125 ), 0 );
}
else
{
for (offs_t offs = 0; offs < 64 * 1024; offs++)
m_addrspace[0]->write_byte((base & ~0xffff) + offs, 0xff);
m_erase_sector = address & ((m_config.m_bits == 16) ? ~0x7fff : ~0xffff);
- timer_adjust_oneshot( m_timer, ATTOTIME_IN_SEC( 1 ), 0 );
+ timer_adjust_oneshot( m_timer, attotime::from_seconds( 1 ), 0 );
}
m_status = 1 << 3;
@@ -680,7 +680,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data)
m_status = 0x00;
m_flash_mode = FM_READSTATUS;
- timer_adjust_oneshot( m_timer, ATTOTIME_IN_SEC( 1 ), 0 );
+ timer_adjust_oneshot( m_timer, attotime::from_seconds( 1 ), 0 );
break;
}
else
diff --git a/src/emu/machine/k056230.c b/src/emu/machine/k056230.c
index fd0ad1ea6b5..71c0735f397 100644
--- a/src/emu/machine/k056230.c
+++ b/src/emu/machine/k056230.c
@@ -128,7 +128,7 @@ WRITE8_DEVICE_HANDLER_TRAMPOLINE(k056230, k056230_w)
{
cpu_set_input_line(m_cpu, INPUT_LINE_IRQ2, ASSERT_LINE);
}
- timer_set(&m_machine, ATTOTIME_IN_USEC(10), (void*)this, 0, network_irq_clear_callback);
+ timer_set(&m_machine, attotime::from_usec(10), (void*)this, 0, network_irq_clear_callback);
}
}
// else
diff --git a/src/emu/machine/ldcore.h b/src/emu/machine/ldcore.h
index 6879b0d78cf..9573841a0fd 100644
--- a/src/emu/machine/ldcore.h
+++ b/src/emu/machine/ldcore.h
@@ -83,9 +83,9 @@ typedef enum _slider_position slider_position;
#define GENERIC_SEARCH_SPEED (5000) /* 5000x normal speed */
/* generic timings; use player-specific information where appropriate */
-#define GENERIC_EJECT_TIME (ATTOTIME_IN_SEC(5))
-#define GENERIC_SPINUP_TIME (ATTOTIME_IN_SEC(2))
-#define GENERIC_LOAD_TIME (ATTOTIME_IN_SEC(5))
+#define GENERIC_EJECT_TIME (attotime::from_seconds(5))
+#define GENERIC_SPINUP_TIME (attotime::from_seconds(2))
+#define GENERIC_LOAD_TIME (attotime::from_seconds(5))
diff --git a/src/emu/machine/ldpr8210.c b/src/emu/machine/ldpr8210.c
index c61db6f28b7..2ba5b27af16 100644
--- a/src/emu/machine/ldpr8210.c
+++ b/src/emu/machine/ldpr8210.c
@@ -55,12 +55,12 @@
/* serial timing, mostly from the service manual, derived from the XTAL */
#define SERIAL_CLOCK XTAL_455kHz
-#define SERIAL_0_BIT_TIME ATTOTIME_IN_HZ((double)SERIAL_CLOCK / 512)
-#define SERIAL_1_BIT_TIME ATTOTIME_IN_HZ((double)SERIAL_CLOCK / 1024)
-#define SERIAL_MIDPOINT_TIME ATTOTIME_IN_HZ((double)SERIAL_CLOCK / 600)
-#define SERIAL_MAX_BIT_TIME ATTOTIME_IN_HZ((double)SERIAL_CLOCK / 4096)
-#define SERIAL_MAX_WORD_TIME ATTOTIME_IN_HZ((double)SERIAL_CLOCK / 11520)
-#define SERIAL_REJECT_DUPLICATE_TIME ATTOTIME_IN_HZ((double)SERIAL_CLOCK / 11520 / 4)
+#define SERIAL_0_BIT_TIME attotime::from_hz((double)SERIAL_CLOCK / 512)
+#define SERIAL_1_BIT_TIME attotime::from_hz((double)SERIAL_CLOCK / 1024)
+#define SERIAL_MIDPOINT_TIME attotime::from_hz((double)SERIAL_CLOCK / 600)
+#define SERIAL_MAX_BIT_TIME attotime::from_hz((double)SERIAL_CLOCK / 4096)
+#define SERIAL_MAX_WORD_TIME attotime::from_hz((double)SERIAL_CLOCK / 11520)
+#define SERIAL_REJECT_DUPLICATE_TIME attotime::from_hz((double)SERIAL_CLOCK / 11520 / 4)
diff --git a/src/emu/machine/ldv1000.c b/src/emu/machine/ldv1000.c
index ffbdb8fc91f..4cc28707de2 100644
--- a/src/emu/machine/ldv1000.c
+++ b/src/emu/machine/ldv1000.c
@@ -43,7 +43,7 @@
#define SCAN_SPEED (2000 / 30) /* 2000 frames/second */
#define SEEK_FAST_SPEED (4000 / 30) /* 4000 frames/second */
-#define MULTIJUMP_TRACK_TIME ATTOTIME_IN_USEC(50)
+#define MULTIJUMP_TRACK_TIME attotime::from_usec(50)
@@ -263,7 +263,7 @@ static void ldv1000_vsync(laserdisc_state *ld, const vbi_metadata *vbi, int fiel
timer_set(ld->device->machine, ld->screen->time_until_pos(19*2), ld, 0, vbi_data_fetch);
/* boost interleave for the first 1ms to improve communications */
- cpuexec_boost_interleave(ld->device->machine, attotime_zero, ATTOTIME_IN_MSEC(1));
+ cpuexec_boost_interleave(ld->device->machine, attotime::zero, attotime::from_msec(1));
}
diff --git a/src/emu/machine/ldvp931.c b/src/emu/machine/ldvp931.c
index 77dc586e838..c52011baf64 100644
--- a/src/emu/machine/ldvp931.c
+++ b/src/emu/machine/ldvp931.c
@@ -282,7 +282,7 @@ static UINT8 vp931_data_r(laserdisc_state *ld)
}
/* also boost interleave for 4 scanlines to ensure proper communications */
- cpuexec_boost_interleave(ld->device->machine, attotime_zero, ld->screen->scan_period() * 4);
+ cpuexec_boost_interleave(ld->device->machine, attotime::zero, ld->screen->scan_period() * 4);
return player->tocontroller;
}
@@ -335,7 +335,7 @@ static TIMER_CALLBACK( vbi_data_fetch )
if (which == 0)
{
cpu_set_input_line(player->cpu, MCS48_INPUT_IRQ, ASSERT_LINE);
- timer_set(machine, ATTOTIME_IN_NSEC(5580), ld, 0, irq_off);
+ timer_set(machine, attotime::from_nsec(5580), ld, 0, irq_off);
}
/* clock the data strobe on each subsequent callback */
@@ -343,7 +343,7 @@ static TIMER_CALLBACK( vbi_data_fetch )
{
player->daticval = code >> (8 * (3 - which));
player->datastrobe = 1;
- timer_set(machine, ATTOTIME_IN_NSEC(5000), ld, 0, datastrobe_off);
+ timer_set(machine, attotime::from_nsec(5000), ld, 0, datastrobe_off);
}
/* determine the next bit to fetch and reprime ourself */
@@ -616,7 +616,7 @@ static WRITE8_HANDLER( to_controller_w )
(*player->data_ready_cb)(ld->device, TRUE);
/* also boost interleave for 4 scanlines to ensure proper communications */
- cpuexec_boost_interleave(ld->device->machine, attotime_zero, ld->screen->scan_period() * 4);
+ cpuexec_boost_interleave(ld->device->machine, attotime::zero, ld->screen->scan_period() * 4);
}
@@ -706,10 +706,10 @@ static WRITE8_HANDLER( port1_w )
else if (((player->port1 ^ data) & 0x11) != 0)
{
/* speeds here are just guesses, but work with the player logic; this is the time per half-track */
- attotime speed = (data & 0x10) ? ATTOTIME_IN_USEC(60) : ATTOTIME_IN_USEC(10);
+ attotime speed = (data & 0x10) ? attotime::from_usec(60) : attotime::from_usec(10);
/* always start with an initial long delay; the code expects this */
- player->tracktimer->adjust(ATTOTIME_IN_USEC(100), 0, speed);
+ player->tracktimer->adjust(attotime::from_usec(100), 0, speed);
}
}
diff --git a/src/emu/machine/mb3773.c b/src/emu/machine/mb3773.c
index 8bc37ea441d..166a8f7c7ab 100644
--- a/src/emu/machine/mb3773.c
+++ b/src/emu/machine/mb3773.c
@@ -151,7 +151,7 @@ void mb3773_device::set_ck( int state )
void mb3773_device::reset_timer()
{
- timer_adjust_oneshot( m_watchdog_timer, ATTOTIME_IN_SEC( 5 ), 0 );
+ timer_adjust_oneshot( m_watchdog_timer, attotime::from_seconds( 5 ), 0 );
}
TIMER_CALLBACK( mb3773_device::watchdog_timeout )
diff --git a/src/emu/machine/mc146818.c b/src/emu/machine/mc146818.c
index 3b638286300..4e7a7bbdcfb 100644
--- a/src/emu/machine/mc146818.c
+++ b/src/emu/machine/mc146818.c
@@ -172,7 +172,7 @@ mc146818_device::mc146818_device(running_machine &_machine, const mc146818_devic
m_index(0),
m_eindex(0),
m_updated(false),
- m_last_refresh(attotime_zero)
+ m_last_refresh(attotime::zero)
{
}
@@ -187,9 +187,9 @@ void mc146818_device::device_start()
emu_timer *timer = device_timer_alloc(*this);
if (m_config.m_type == mc146818_device_config::MC146818_UTC) {
// hack: for apollo we increase the update frequency to stay in sync with real time
- timer_adjust_periodic(timer, ATTOTIME_IN_HZ(2), 0, ATTOTIME_IN_HZ(2));
+ timer_adjust_periodic(timer, attotime::from_hz(2), 0, attotime::from_hz(2));
} else {
- timer_adjust_periodic(timer, ATTOTIME_IN_HZ(1), 0, ATTOTIME_IN_HZ(1));
+ timer_adjust_periodic(timer, attotime::from_hz(1), 0, attotime::from_hz(1));
}
set_base_datetime();
}
@@ -436,7 +436,7 @@ READ8_MEMBER( mc146818_device::read )
switch (m_index % MC146818_DATA_SIZE) {
case 0xa:
data = m_data[m_index % MC146818_DATA_SIZE];
- if ((timer_get_time(space.machine) - m_last_refresh) < ATTOTIME_IN_HZ(32768))
+ if ((timer_get_time(space.machine) - m_last_refresh) < attotime::from_hz(32768))
data |= 0x80;
#if 0
/* for pc1512 bios realtime clock test */
diff --git a/src/emu/machine/mc68901.c b/src/emu/machine/mc68901.c
index 620bcf82f39..8787e27ee27 100644
--- a/src/emu/machine/mc68901.c
+++ b/src/emu/machine/mc68901.c
@@ -809,13 +809,13 @@ void mc68901_device::device_start()
if (m_config.rx_clock > 0)
{
m_rx_timer = device_timer_alloc(*this, TIMER_RX);
- timer_adjust_periodic(m_rx_timer, attotime_zero, 0, ATTOTIME_IN_HZ(m_config.rx_clock));
+ timer_adjust_periodic(m_rx_timer, attotime::zero, 0, attotime::from_hz(m_config.rx_clock));
}
if (m_config.tx_clock > 0)
{
m_tx_timer = device_timer_alloc(*this, TIMER_TX);
- timer_adjust_periodic(m_tx_timer, attotime_zero, 0, ATTOTIME_IN_HZ(m_config.tx_clock));
+ timer_adjust_periodic(m_tx_timer, attotime::zero, 0, attotime::from_hz(m_config.tx_clock));
}
/* register for state saving */
@@ -1079,7 +1079,7 @@ void mc68901_device::register_w(offs_t offset, UINT8 data)
{
int divisor = PRESCALER[m_tacr & 0x07];
if (LOG) logerror("MC68901 '%s' Timer A Delay Mode : %u Prescale\n", tag(), divisor);
- timer_adjust_periodic(m_timer[TIMER_A], ATTOTIME_IN_HZ(m_timer_clock / divisor), 0, ATTOTIME_IN_HZ(m_timer_clock / divisor));
+ timer_adjust_periodic(m_timer[TIMER_A], attotime::from_hz(m_timer_clock / divisor), 0, attotime::from_hz(m_timer_clock / divisor));
}
break;
@@ -1098,7 +1098,7 @@ void mc68901_device::register_w(offs_t offset, UINT8 data)
{
int divisor = PRESCALER[m_tacr & 0x07];
if (LOG) logerror("MC68901 '%s' Timer A Pulse Width Mode : %u Prescale\n", tag(), divisor);
- timer_adjust_periodic(m_timer[TIMER_A], attotime_never, 0, ATTOTIME_IN_HZ(m_timer_clock / divisor));
+ timer_adjust_periodic(m_timer[TIMER_A], attotime::never, 0, attotime::from_hz(m_timer_clock / divisor));
timer_enable(m_timer[TIMER_A], 0);
}
break;
@@ -1134,7 +1134,7 @@ void mc68901_device::register_w(offs_t offset, UINT8 data)
{
int divisor = PRESCALER[m_tbcr & 0x07];
if (LOG) logerror("MC68901 '%s' Timer B Delay Mode : %u Prescale\n", tag(), divisor);
- timer_adjust_periodic(m_timer[TIMER_B], ATTOTIME_IN_HZ(m_timer_clock / divisor), 0, ATTOTIME_IN_HZ(m_timer_clock / divisor));
+ timer_adjust_periodic(m_timer[TIMER_B], attotime::from_hz(m_timer_clock / divisor), 0, attotime::from_hz(m_timer_clock / divisor));
}
break;
@@ -1153,7 +1153,7 @@ void mc68901_device::register_w(offs_t offset, UINT8 data)
{
int divisor = PRESCALER[m_tbcr & 0x07];
if (LOG) logerror("MC68901 '%s' Timer B Pulse Width Mode : %u Prescale\n", tag(), DIVISOR);
- timer_adjust_periodic(m_timer[TIMER_B], attotime_never, 0, ATTOTIME_IN_HZ(m_timer_clock / divisor));
+ timer_adjust_periodic(m_timer[TIMER_B], attotime::never, 0, attotime::from_hz(m_timer_clock / divisor));
timer_enable(m_timer[TIMER_B], 0);
}
break;
@@ -1189,7 +1189,7 @@ void mc68901_device::register_w(offs_t offset, UINT8 data)
{
int divisor = PRESCALER[m_tcdcr & 0x07];
if (LOG) logerror("MC68901 '%s' Timer D Delay Mode : %u Prescale\n", tag(), divisor);
- timer_adjust_periodic(m_timer[TIMER_D], ATTOTIME_IN_HZ(m_timer_clock / divisor), 0, ATTOTIME_IN_HZ(m_timer_clock / divisor));
+ timer_adjust_periodic(m_timer[TIMER_D], attotime::from_hz(m_timer_clock / divisor), 0, attotime::from_hz(m_timer_clock / divisor));
}
break;
}
@@ -1211,7 +1211,7 @@ void mc68901_device::register_w(offs_t offset, UINT8 data)
{
int divisor = PRESCALER[(m_tcdcr >> 4) & 0x07];
if (LOG) logerror("MC68901 '%s' Timer C Delay Mode : %u Prescale\n", tag(), divisor);
- timer_adjust_periodic(m_timer[TIMER_C], ATTOTIME_IN_HZ(m_timer_clock / divisor), 0, ATTOTIME_IN_HZ(m_timer_clock / divisor));
+ timer_adjust_periodic(m_timer[TIMER_C], attotime::from_hz(m_timer_clock / divisor), 0, attotime::from_hz(m_timer_clock / divisor));
}
break;
}
diff --git a/src/emu/machine/microtch.c b/src/emu/machine/microtch.c
index f8aa20474bf..122d40e7c4a 100644
--- a/src/emu/machine/microtch.c
+++ b/src/emu/machine/microtch.c
@@ -160,7 +160,7 @@ void microtouch_init(running_machine *machine, microtouch_tx_func tx_cb, microto
microtouch.touch_callback = touch_cb;
microtouch.timer = timer_alloc(machine, microtouch_timer_callback, NULL);
- timer_adjust_periodic(microtouch.timer, ATTOTIME_IN_HZ(167*5), 0, ATTOTIME_IN_HZ(167*5));
+ timer_adjust_periodic(microtouch.timer, attotime::from_hz(167*5), 0, attotime::from_hz(167*5));
state_save_register_item(machine, "microtouch", NULL, 0, microtouch.reset_done);
state_save_register_item(machine, "microtouch", NULL, 0, microtouch.format_tablet);
diff --git a/src/emu/machine/pc16552d.c b/src/emu/machine/pc16552d.c
index 6d93fe215d2..cae0a6ed791 100644
--- a/src/emu/machine/pc16552d.c
+++ b/src/emu/machine/pc16552d.c
@@ -159,7 +159,7 @@ static TIMER_CALLBACK( tx_fifo_timer_callback )
ch->pending_interrupt |= IRQ_TX_HOLDING_REG_EMPTY;
check_interrupts(machine, chip, channel);
- timer_adjust_oneshot(duart[chip].ch[channel].tx_fifo_timer, attotime_never, (chip * 2) + channel);
+ timer_adjust_oneshot(duart[chip].ch[channel].tx_fifo_timer, attotime::never, (chip * 2) + channel);
}
static void duart_push_tx_fifo(int chip, int channel, UINT8 data)
@@ -401,10 +401,10 @@ void pc16552d_init(running_machine *machine, int chip, int frequency, void (* ir
// allocate transmit timers
duart[chip].ch[0].tx_fifo_timer = timer_alloc(machine, tx_fifo_timer_callback, NULL);
- timer_adjust_oneshot(duart[chip].ch[0].tx_fifo_timer, attotime_never, (chip * 2) + 0);
+ timer_adjust_oneshot(duart[chip].ch[0].tx_fifo_timer, attotime::never, (chip * 2) + 0);
duart[chip].ch[1].tx_fifo_timer = timer_alloc(machine, tx_fifo_timer_callback, NULL);
- timer_adjust_oneshot(duart[chip].ch[1].tx_fifo_timer, attotime_never, (chip * 2) + 1);
+ timer_adjust_oneshot(duart[chip].ch[1].tx_fifo_timer, attotime::never, (chip * 2) + 1);
}
void pc16552d_rx_data(running_machine *machine, int chip, int channel, UINT8 data)
diff --git a/src/emu/machine/pic8259.c b/src/emu/machine/pic8259.c
index 3f8cd8edfce..0b9cad3b283 100644
--- a/src/emu/machine/pic8259.c
+++ b/src/emu/machine/pic8259.c
@@ -114,7 +114,7 @@ static TIMER_CALLBACK( pic8259_timerproc )
INLINE void pic8259_set_timer(pic8259_t *pic8259)
{
- timer_adjust_oneshot(pic8259->timer, attotime_zero, 0);
+ timer_adjust_oneshot(pic8259->timer, attotime::zero, 0);
}
diff --git a/src/emu/machine/pit8253.c b/src/emu/machine/pit8253.c
index befe85fa28f..6dc2d8cd46c 100644
--- a/src/emu/machine/pit8253.c
+++ b/src/emu/machine/pit8253.c
@@ -608,7 +608,7 @@ static void simulate2(device_t *device, struct pit8253_timer *timer, INT64 elaps
timer->cycles_to_output = cycles_to_output;
if (cycles_to_output == CYCLES_NEVER || timer->clockin == 0)
{
- timer_adjust_oneshot(timer->updatetimer, attotime_never, timer->index);
+ timer_adjust_oneshot(timer->updatetimer, attotime::never, timer->index);
}
else
{
@@ -1082,7 +1082,7 @@ static void common_start( device_t *device, int device_type ) {
/* initialize timer */
timer->clockin = pit8253->config->timer[timerno].clockin;
timer->updatetimer = timer_alloc(device->machine, update_timer_cb, (void *)device);
- timer_adjust_oneshot(timer->updatetimer, attotime_never, timerno);
+ timer_adjust_oneshot(timer->updatetimer, attotime::never, timerno);
/* resolve callbacks */
devcb_resolve_read_line(&timer->in_gate_func, &pit8253->config->timer[timerno].in_gate_func, device);
diff --git a/src/emu/machine/rtc65271.c b/src/emu/machine/rtc65271.c
index 642efa3d117..91016b64152 100644
--- a/src/emu/machine/rtc65271.c
+++ b/src/emu/machine/rtc65271.c
@@ -25,10 +25,10 @@ static TIMER_CALLBACK( rtc_end_update_callback );
/* Delay between the beginning (UIP asserted) and the end (UIP cleared and
update interrupt asserted) of the update cycle */
-#define UPDATE_CYCLE_TIME ATTOTIME_IN_USEC(1984)
+#define UPDATE_CYCLE_TIME attotime::from_usec(1984)
/* Delay between the assertion of UIP and the effective start of the update
cycle */
-/*#define UPDATE_CYCLE_DELAY ATTOTIME_IN_USEC(244)*/
+/*#define UPDATE_CYCLE_DELAY attotime::from_usec(244)*/
typedef struct _rtc65271_state rtc65271_state;
struct _rtc65271_state
@@ -408,7 +408,7 @@ void rtc65271_w(device_t *device, int xramsel, offs_t offset, UINT8 data)
{
if (data & reg_A_RS)
{
- attotime period = ATTOTIME_IN_HZ(SQW_freq_table[data & reg_A_RS]);
+ attotime period = attotime::from_hz(SQW_freq_table[data & reg_A_RS]);
attotime half_period = period / 2;
attotime elapsed = timer_timeelapsed(state->update_timer);
@@ -422,7 +422,7 @@ void rtc65271_w(device_t *device, int xramsel, offs_t offset, UINT8 data)
state->SQW_internal_state = 0; /* right??? */
/* Stop the divider used for SQW and periodic interrupts. */
- timer_adjust_oneshot(state->SQW_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->SQW_timer, attotime::never, 0);
}
}
/* The UIP bit is read-only */
@@ -689,7 +689,7 @@ static DEVICE_START( rtc65271 )
rtc65271_state *state = get_safe_token(device);
state->update_timer = timer_alloc(device->machine, rtc_begin_update_callback, (void *)device);
- timer_adjust_periodic(state->update_timer, ATTOTIME_IN_SEC(1), 0, ATTOTIME_IN_SEC(1));
+ timer_adjust_periodic(state->update_timer, attotime::from_seconds(1), 0, attotime::from_seconds(1));
state->SQW_timer = timer_alloc(device->machine, rtc_SQW_callback, (void *)device);
state->interrupt_callback = config->interrupt_callback;
diff --git a/src/emu/machine/s3c24xx.c b/src/emu/machine/s3c24xx.c
index b0a160eaecf..9925cfaced9 100644
--- a/src/emu/machine/s3c24xx.c
+++ b/src/emu/machine/s3c24xx.c
@@ -924,7 +924,7 @@ static void s3c24xx_lcd_stop( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
verboselog( device->machine, 1, "LCD stop\n");
- timer_adjust_oneshot( s3c24xx->lcd.timer, attotime_never, 0);
+ timer_adjust_oneshot( s3c24xx->lcd.timer, attotime::never, 0);
}
static void s3c24xx_lcd_recalc( device_t *device)
@@ -1357,11 +1357,11 @@ static void s3c24xx_pwm_start( device_t *device, int timer)
s3c24xx->pwm.freq[timer] = freq;
if (auto_reload)
{
- timer_adjust_periodic( s3c24xx->pwm.timer[timer], ATTOTIME_IN_HZ( hz), timer, ATTOTIME_IN_HZ( hz));
+ timer_adjust_periodic( s3c24xx->pwm.timer[timer], attotime::from_hz( hz), timer, attotime::from_hz( hz));
}
else
{
- timer_adjust_oneshot( s3c24xx->pwm.timer[timer], ATTOTIME_IN_HZ( hz), timer);
+ timer_adjust_oneshot( s3c24xx->pwm.timer[timer], attotime::from_hz( hz), timer);
}
}
@@ -1369,7 +1369,7 @@ static void s3c24xx_pwm_stop( device_t *device, int timer)
{
s3c24xx_t *s3c24xx = get_token( device);
verboselog( device->machine, 1, "PWM %d stop\n", timer);
- timer_adjust_oneshot( s3c24xx->pwm.timer[timer], attotime_never, 0);
+ timer_adjust_oneshot( s3c24xx->pwm.timer[timer], attotime::never, 0);
}
static void s3c24xx_pwm_recalc( device_t *device, int timer)
@@ -2055,7 +2055,7 @@ static void s3c24xx_wdt_start( device_t *device)
freq = (double)pclk / (prescaler + 1) / clock;
hz = freq / s3c24xx->wdt.regs.wtcnt;
verboselog( device->machine, 5, "WDT pclk %d prescaler %d clock %d freq %f hz %f\n", pclk, prescaler, clock, freq, hz);
- timer_adjust_periodic( s3c24xx->wdt.timer, ATTOTIME_IN_HZ( hz), 0, ATTOTIME_IN_HZ( hz));
+ timer_adjust_periodic( s3c24xx->wdt.timer, attotime::from_hz( hz), 0, attotime::from_hz( hz));
#if defined(DEVICE_S3C2410)
s3c24xx->wdt.freq = freq;
s3c24xx->wdt.cnt = s3c24xx->wdt.regs.wtcnt;
@@ -2067,7 +2067,7 @@ static void s3c24xx_wdt_stop( device_t *device)
s3c24xx_t *s3c24xx = get_token( device);
verboselog( device->machine, 1, "WDT stop\n");
s3c24xx->wdt.regs.wtcnt = s3c24xx_wdt_calc_current_count( device);
- timer_adjust_oneshot( s3c24xx->wdt.timer, attotime_never, 0);
+ timer_adjust_oneshot( s3c24xx->wdt.timer, attotime::never, 0);
}
static void s3c24xx_wdt_recalc( device_t *device)
@@ -2223,7 +2223,7 @@ static void iic_start( device_t *device)
case 2 : i2c_send_byte( device, s3c24xx->iic.regs.iicds | 0x01); break;
case 3 : i2c_send_byte( device, s3c24xx->iic.regs.iicds & 0xFE); break;
}
- timer_adjust_oneshot( s3c24xx->iic.timer, ATTOTIME_IN_USEC( 1), 0);
+ timer_adjust_oneshot( s3c24xx->iic.timer, attotime::from_usec( 1), 0);
}
static void iic_stop( device_t *device)
@@ -2231,7 +2231,7 @@ static void iic_stop( device_t *device)
s3c24xx_t *s3c24xx = get_token( device);
verboselog( device->machine, 1, "IIC stop\n");
i2c_send_stop( device);
- timer_adjust_oneshot( s3c24xx->iic.timer, attotime_never, 0);
+ timer_adjust_oneshot( s3c24xx->iic.timer, attotime::never, 0);
}
static void iic_resume( device_t *device)
@@ -2245,7 +2245,7 @@ static void iic_resume( device_t *device)
case 2 : s3c24xx->iic.regs.iicds = i2c_receive_byte( device, BIT( s3c24xx->iic.regs.iiccon, 7)); break;
case 3 : i2c_send_byte( device, s3c24xx->iic.regs.iicds & 0xFF); break;
}
- timer_adjust_oneshot( s3c24xx->iic.timer, ATTOTIME_IN_USEC( 1), 0);
+ timer_adjust_oneshot( s3c24xx->iic.timer, attotime::from_usec( 1), 0);
}
static READ32_DEVICE_HANDLER( s3c24xx_iic_r )
@@ -2383,14 +2383,14 @@ static void s3c24xx_iis_start( device_t *device)
pclk = s3c24xx_get_pclk( device);
freq = ((double)pclk / (prescaler_control_a + 1) / codeclk_table[codeclk]) * 2; // why do I have to multiply by two?
verboselog( device->machine, 5, "IIS - pclk %d psc_enable %d psc_a %d psc_b %d codeclk %d freq %f\n", pclk, prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk_table[codeclk], freq);
- timer_adjust_periodic( s3c24xx->iis.timer, ATTOTIME_IN_HZ( freq), 0, ATTOTIME_IN_HZ( freq));
+ timer_adjust_periodic( s3c24xx->iis.timer, attotime::from_hz( freq), 0, attotime::from_hz( freq));
}
static void s3c24xx_iis_stop( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
verboselog( device->machine, 1, "IIS stop\n");
- timer_adjust_oneshot( s3c24xx->iis.timer, attotime_never, 0);
+ timer_adjust_oneshot( s3c24xx->iis.timer, attotime::never, 0);
}
static void s3c24xx_iis_recalc( device_t *device)
@@ -2500,11 +2500,11 @@ static void s3c24xx_rtc_recalc( device_t *device)
ttc = BITS( s3c24xx->rtc.regs.ticnt, 6, 0);
freq = 128 / (ttc + 1);
// printf( "ttc %d freq %f\n", ttc, freq);
- timer_adjust_periodic( s3c24xx->rtc.timer_tick_count, ATTOTIME_IN_HZ( freq), 0, ATTOTIME_IN_HZ( freq));
+ timer_adjust_periodic( s3c24xx->rtc.timer_tick_count, attotime::from_hz( freq), 0, attotime::from_hz( freq));
}
else
{
- timer_adjust_oneshot( s3c24xx->rtc.timer_tick_count, attotime_never, 0);
+ timer_adjust_oneshot( s3c24xx->rtc.timer_tick_count, attotime::never, 0);
}
}
@@ -3176,7 +3176,7 @@ static DEVICE_START( s3c24xx )
s3c24xx->rtc.timer_tick_count = timer_alloc( device->machine, s3c24xx_rtc_timer_tick_count_exp, (void*)device);
s3c24xx->rtc.timer_update = timer_alloc( device->machine, s3c24xx_rtc_timer_update_exp, (void*)device);
s3c24xx->wdt.timer = timer_alloc( device->machine, s3c24xx_wdt_timer_exp, (void*)device);
- timer_adjust_periodic( s3c24xx->rtc.timer_update, ATTOTIME_IN_MSEC( 1000), 0, ATTOTIME_IN_MSEC( 1000));
+ timer_adjust_periodic( s3c24xx->rtc.timer_update, attotime::from_msec( 1000), 0, attotime::from_msec( 1000));
s3c24xx_rtc_init( device);
}
diff --git a/src/emu/machine/timekpr.c b/src/emu/machine/timekpr.c
index f5bb8960723..a0afe878723 100644
--- a/src/emu/machine/timekpr.c
+++ b/src/emu/machine/timekpr.c
@@ -228,7 +228,7 @@ void timekeeper_device::device_start()
state_save_register_device_item_pointer( this, 0, m_data, m_size );
timer = timer_alloc( &m_machine, timekeeper_tick_callback, (void *)this );
- duration = ATTOTIME_IN_SEC(1);
+ duration = attotime::from_seconds(1);
timer_adjust_periodic( timer, duration, 0, duration );
}
diff --git a/src/emu/machine/tmp68301.c b/src/emu/machine/tmp68301.c
index 8376ada4ce7..18c69c3223f 100644
--- a/src/emu/machine/tmp68301.c
+++ b/src/emu/machine/tmp68301.c
@@ -68,9 +68,9 @@ static void tmp68301_update_timer( running_machine *machine, int i )
UINT16 MAX2 = tmp68301_regs[(0x206 + i * 0x20)/2];
int max = 0;
- attotime duration = attotime_zero;
+ attotime duration = attotime::zero;
- timer_adjust_oneshot(tmp68301_timer[i],attotime_never,i);
+ timer_adjust_oneshot(tmp68301_timer[i],attotime::never,i);
// timers 1&2 only
switch( (TCR & 0x0030)>>4 ) // MR2..1
diff --git a/src/emu/machine/wd33c93.c b/src/emu/machine/wd33c93.c
index 194b4ed11e1..073e0a97726 100644
--- a/src/emu/machine/wd33c93.c
+++ b/src/emu/machine/wd33c93.c
@@ -238,7 +238,7 @@ static void wd33c93_read_data(int bytes, UINT8 *pData)
static void wd33c93_complete_immediate( running_machine *machine, int status )
{
/* reset our timer */
- timer_reset( scsi_data.cmd_timer, attotime_never );
+ timer_reset( scsi_data.cmd_timer, attotime::never );
/* set the new status */
scsi_data.regs[WD_SCSI_STATUS] = status & 0xff;
@@ -287,7 +287,7 @@ static TIMER_CALLBACK(wd33c93_deassert_cip)
static void wd33c93_complete_cmd( UINT8 status )
{
/* fire off a timer to complete the command */
- timer_adjust_oneshot( scsi_data.cmd_timer, ATTOTIME_IN_USEC(1), status );
+ timer_adjust_oneshot( scsi_data.cmd_timer, attotime::from_usec(1), status );
}
/* command handlers */
@@ -352,7 +352,7 @@ static CMD_HANDLER( wd33c93_select_cmd )
}
/* queue up a service request out in the future */
- timer_set( machine, ATTOTIME_IN_USEC(50), NULL, 0, wd33c93_service_request );
+ timer_set( machine, attotime::from_usec(50), NULL, 0, wd33c93_service_request );
}
else
{
@@ -424,7 +424,7 @@ static CMD_HANDLER( wd33c93_selectxfer_cmd )
scsi_data.busphase = PHS_MESS_IN;
/* queue up a service request out in the future */
- timer_set( machine, ATTOTIME_IN_MSEC(50), NULL, 0, wd33c93_service_request );
+ timer_set( machine, attotime::from_msec(50), NULL, 0, wd33c93_service_request );
}
}
else
@@ -454,7 +454,7 @@ static CMD_HANDLER( wd33c93_xferinfo_cmd )
scsi_data.regs[WD_AUXILIARY_STATUS] |= ASR_CIP;
/* the command will be completed once the data is transferred */
- timer_set( machine, ATTOTIME_IN_MSEC(1), NULL, 0, wd33c93_deassert_cip );
+ timer_set( machine, attotime::from_msec(1), NULL, 0, wd33c93_deassert_cip );
}
/* Command handlers */
diff --git a/src/emu/machine/z80ctc.c b/src/emu/machine/z80ctc.c
index 22d9f91a6c3..f66ea35eebe 100644
--- a/src/emu/machine/z80ctc.c
+++ b/src/emu/machine/z80ctc.c
@@ -355,7 +355,7 @@ void z80ctc_device::ctc_channel::reset()
{
m_mode = RESET_ACTIVE;
m_tconst = 0x100;
- timer_adjust_oneshot(m_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_timer, attotime::never, 0);
m_int_state = 0;
}
@@ -368,13 +368,13 @@ attotime z80ctc_device::ctc_channel::period() const
{
// if reset active, no period
if ((m_mode & RESET) == RESET_ACTIVE)
- return attotime_zero;
+ return attotime::zero;
// if counter mode, no real period
if ((m_mode & MODE) == MODE_COUNTER)
{
logerror("CTC %d is CounterMode : Can't calculate period\n", m_index);
- return attotime_zero;
+ return attotime::zero;
}
// compute the period
@@ -440,7 +440,7 @@ void z80ctc_device::ctc_channel::write(UINT8 data)
timer_adjust_periodic(m_timer, curperiod, m_index, curperiod);
}
else
- timer_adjust_oneshot(m_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_timer, attotime::never, 0);
}
// else set the bit indicating that we're waiting for the appropriate trigger
@@ -475,7 +475,7 @@ void z80ctc_device::ctc_channel::write(UINT8 data)
// if we're being reset, clear out any pending timers for this channel
if ((data & RESET) == RESET_ACTIVE)
{
- timer_adjust_oneshot(m_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_timer, attotime::never, 0);
// note that we don't clear the interrupt state here!
}
}
@@ -512,7 +512,7 @@ void z80ctc_device::ctc_channel::trigger(UINT8 data)
else
{
VPRINTF(("CTC disabled\n"));
- timer_adjust_oneshot(m_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_timer, attotime::never, 0);
}
}
diff --git a/src/emu/machine/z80dart.c b/src/emu/machine/z80dart.c
index 36b52a6cd59..63f6d595474 100644
--- a/src/emu/machine/z80dart.c
+++ b/src/emu/machine/z80dart.c
@@ -294,28 +294,28 @@ void z80dart_device::device_start()
{
// allocate channel A receive timer
m_rxca_timer = timer_alloc(&m_machine, dart_channel::static_rxc_tick, (void *)&m_channel[CHANNEL_A]);
- timer_adjust_periodic(m_rxca_timer, attotime_zero, 0, ATTOTIME_IN_HZ(m_config.m_rx_clock_a));
+ timer_adjust_periodic(m_rxca_timer, attotime::zero, 0, attotime::from_hz(m_config.m_rx_clock_a));
}
if (m_config.m_tx_clock_a != 0)
{
// allocate channel A transmit timer
m_txca_timer = timer_alloc(&m_machine, dart_channel::static_txc_tick, (void *)&m_channel[CHANNEL_A]);
- timer_adjust_periodic(m_txca_timer, attotime_zero, 0, ATTOTIME_IN_HZ(m_config.m_tx_clock_a));
+ timer_adjust_periodic(m_txca_timer, attotime::zero, 0, attotime::from_hz(m_config.m_tx_clock_a));
}
if (m_config.m_rx_clock_b != 0)
{
// allocate channel B receive timer
m_rxcb_timer = timer_alloc(&m_machine, dart_channel::static_rxc_tick, (void *)&m_channel[CHANNEL_B]);
- timer_adjust_periodic(m_rxcb_timer, attotime_zero, 0, ATTOTIME_IN_HZ(m_config.m_rx_clock_b));
+ timer_adjust_periodic(m_rxcb_timer, attotime::zero, 0, attotime::from_hz(m_config.m_rx_clock_b));
}
if (m_config.m_tx_clock_b != 0)
{
// allocate channel B transmit timer
m_txcb_timer = timer_alloc(&m_machine, dart_channel::static_txc_tick, (void *)&m_channel[CHANNEL_B]);
- timer_adjust_periodic(m_txcb_timer, attotime_zero, 0, ATTOTIME_IN_HZ(m_config.m_tx_clock_b));
+ timer_adjust_periodic(m_txcb_timer, attotime::zero, 0, attotime::from_hz(m_config.m_tx_clock_b));
}
state_save_register_device_item_array(this, 0, m_int_state);
diff --git a/src/emu/machine/z80dma.c b/src/emu/machine/z80dma.c
index 44e49bc854c..92f5dd61a1d 100644
--- a/src/emu/machine/z80dma.c
+++ b/src/emu/machine/z80dma.c
@@ -606,9 +606,9 @@ void z80dma_device::update_status()
{
m_is_read = true;
m_cur_cycle = (PORTA_IS_SOURCE ? PORTA_CYCLE_LEN : PORTB_CYCLE_LEN);
- next = ATTOTIME_IN_HZ(clock());
+ next = attotime::from_hz(clock());
timer_adjust_periodic(m_timer,
- attotime_zero,
+ attotime::zero,
0,
// 1 byte transferred in 4 clock cycles
next);
@@ -618,7 +618,7 @@ void z80dma_device::update_status()
if (m_is_read)
{
// no transfers active right now
- timer_reset(m_timer, attotime_never);
+ timer_reset(m_timer, attotime::never);
}
}
diff --git a/src/emu/machine/z80sti.c b/src/emu/machine/z80sti.c
index 8ab228b8c6c..3c6f8a59b93 100644
--- a/src/emu/machine/z80sti.c
+++ b/src/emu/machine/z80sti.c
@@ -253,14 +253,14 @@ void z80sti_device::device_start()
if (m_config.m_rx_clock > 0)
{
m_rx_timer = timer_alloc(&m_machine, static_rx_tick, (void *)this);
- timer_adjust_periodic(m_rx_timer, attotime_zero, 0, ATTOTIME_IN_HZ(m_config.m_rx_clock));
+ timer_adjust_periodic(m_rx_timer, attotime::zero, 0, attotime::from_hz(m_config.m_rx_clock));
}
// create serial transmit clock timer
if (m_config.m_tx_clock > 0)
{
m_tx_timer = timer_alloc(&m_machine, static_tx_tick, (void *)this);
- timer_adjust_periodic(m_tx_timer, attotime_zero, 0, ATTOTIME_IN_HZ(m_config.m_tx_clock));
+ timer_adjust_periodic(m_tx_timer, attotime::zero, 0, attotime::from_hz(m_config.m_tx_clock));
}
// register for state saving
@@ -560,12 +560,12 @@ void z80sti_device::write(offs_t offset, UINT8 data)
LOG(("Z80STI '%s' Timer D Prescaler: %u\n", tag(), tdc));
if (tcc)
- timer_adjust_periodic(m_timer[TIMER_C], ATTOTIME_IN_HZ(clock() / tcc), TIMER_C, ATTOTIME_IN_HZ(clock() / tcc));
+ timer_adjust_periodic(m_timer[TIMER_C], attotime::from_hz(clock() / tcc), TIMER_C, attotime::from_hz(clock() / tcc));
else
timer_enable(m_timer[TIMER_C], 0);
if (tdc)
- timer_adjust_periodic(m_timer[TIMER_D], ATTOTIME_IN_HZ(clock() / tdc), TIMER_D, ATTOTIME_IN_HZ(clock() / tdc));
+ timer_adjust_periodic(m_timer[TIMER_D], attotime::from_hz(clock() / tdc), TIMER_D, attotime::from_hz(clock() / tdc));
else
timer_enable(m_timer[TIMER_D], 0);
@@ -666,12 +666,12 @@ void z80sti_device::write(offs_t offset, UINT8 data)
LOG(("Z80STI '%s' Timer B Prescaler: %u\n", tag(), tbc));
if (tac)
- timer_adjust_periodic(m_timer[TIMER_A], ATTOTIME_IN_HZ(clock() / tac), TIMER_A, ATTOTIME_IN_HZ(clock() / tac));
+ timer_adjust_periodic(m_timer[TIMER_A], attotime::from_hz(clock() / tac), TIMER_A, attotime::from_hz(clock() / tac));
else
timer_enable(m_timer[TIMER_A], 0);
if (tbc)
- timer_adjust_periodic(m_timer[TIMER_B], ATTOTIME_IN_HZ(clock() / tbc), TIMER_B, ATTOTIME_IN_HZ(clock() / tbc));
+ timer_adjust_periodic(m_timer[TIMER_B], attotime::from_hz(clock() / tbc), TIMER_B, attotime::from_hz(clock() / tbc));
else
timer_enable(m_timer[TIMER_B], 0);
}
diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c
index a218f7e630b..dac69f06f64 100644
--- a/src/emu/mconfig.c
+++ b/src/emu/mconfig.c
@@ -50,10 +50,10 @@
//-------------------------------------------------
machine_config::machine_config(const game_driver &gamedrv)
- : m_minimum_quantum(attotime_zero),
+ : m_minimum_quantum(attotime::zero),
m_perfect_cpu_quantum(NULL),
m_watchdog_vblank_count(0),
- m_watchdog_time(attotime_zero),
+ m_watchdog_time(attotime::zero),
m_nvram_handler(NULL),
m_memcard_handler(NULL),
m_video_attributes(0),
diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h
index 2ef4f8dd6ee..bac647a4889 100644
--- a/src/emu/mconfig.h
+++ b/src/emu/mconfig.h
@@ -217,7 +217,7 @@ device_config *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_config
// core parameters
#define MCFG_QUANTUM_TIME(_time) \
- config.m_minimum_quantum = ATTOTIME_IN_##_time; \
+ config.m_minimum_quantum = _time; \
#define MCFG_QUANTUM_PERFECT_CPU(_cputag) \
config.m_perfect_cpu_quantum = _cputag; \
@@ -226,7 +226,7 @@ device_config *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_config
config.m_watchdog_vblank_count = _count; \
#define MCFG_WATCHDOG_TIME_INIT(_time) \
- config.m_watchdog_time = ATTOTIME_IN_##_time; \
+ config.m_watchdog_time = _time; \
// core functions
diff --git a/src/emu/schedule.c b/src/emu/schedule.c
index 98c1541e16a..21edcea390a 100644
--- a/src/emu/schedule.c
+++ b/src/emu/schedule.c
@@ -377,7 +377,7 @@ void device_scheduler::rebuild_execute_list()
// if none specified default to 60Hz
if (min_quantum == attotime::zero)
- min_quantum = ATTOTIME_IN_HZ(60);
+ min_quantum = attotime::from_hz(60);
// if the configuration specifies a device to make perfect, pick that as the minimum
if (m_machine.config->m_perfect_cpu_quantum != NULL)
@@ -395,7 +395,7 @@ void device_scheduler::rebuild_execute_list()
// inform the timer system of our decision
assert(min_quantum.seconds == 0);
- timer_add_scheduling_quantum(&m_machine, min_quantum.attoseconds, attotime_never);
+ timer_add_scheduling_quantum(&m_machine, min_quantum.attoseconds, attotime::never);
if (TEMPLOG) printf("Setting quantum: %08X%08X\n", (UINT32)(min_quantum.attoseconds >> 32), (UINT32)min_quantum.attoseconds);
m_quantum_set = true;
}
diff --git a/src/emu/schedule.h b/src/emu/schedule.h
index bfd0f4acc42..6e0aaccfdbf 100644
--- a/src/emu/schedule.h
+++ b/src/emu/schedule.h
@@ -75,7 +75,7 @@ public:
void timeslice();
- void trigger(int trigid, attotime after = attotime_zero);
+ void trigger(int trigid, attotime after = attotime::zero);
void boost_interleave(attotime timeslice_time, attotime boost_duration);
void abort_timeslice();
diff --git a/src/emu/screen.c b/src/emu/screen.c
index d61fe083acf..6596331d5ec 100644
--- a/src/emu/screen.c
+++ b/src/emu/screen.c
@@ -296,8 +296,8 @@ screen_device::screen_device(running_machine &_machine, const screen_device_conf
m_scantime(1),
m_pixeltime(1),
m_vblank_period(0),
- m_vblank_start_time(attotime_zero),
- m_vblank_end_time(attotime_zero),
+ m_vblank_start_time(attotime::zero),
+ m_vblank_end_time(attotime::zero),
m_vblank_begin_timer(NULL),
m_vblank_end_timer(NULL),
m_scanline0_timer(NULL),
@@ -447,7 +447,7 @@ void screen_device::configure(int width, int height, const rectangle &visarea, a
// if we are on scanline 0 already, reset the update timer immediately
// otherwise, defer until the next scanline 0
if (vpos() == 0)
- timer_adjust_oneshot(m_scanline0_timer, attotime_zero, 0);
+ timer_adjust_oneshot(m_scanline0_timer, attotime::zero, 0);
else
timer_adjust_oneshot(m_scanline0_timer, time_until_pos(0), 0);
diff --git a/src/emu/sound.c b/src/emu/sound.c
index 685a335da8d..d297d96d595 100644
--- a/src/emu/sound.c
+++ b/src/emu/sound.c
@@ -66,7 +66,7 @@
// GLOBAL VARIABLES
//**************************************************************************
-const attotime sound_manager::STREAMS_UPDATE_ATTOTIME = ATTOTIME_IN_HZ(STREAMS_UPDATE_FREQUENCY);
+const attotime sound_manager::STREAMS_UPDATE_ATTOTIME = attotime::from_hz(STREAMS_UPDATE_FREQUENCY);
@@ -777,7 +777,7 @@ sound_manager::sound_manager(running_machine &machine)
m_wavfile(NULL),
m_stream_list(machine.m_respool),
m_update_attoseconds(STREAMS_UPDATE_ATTOTIME.attoseconds),
- m_last_update(attotime_zero)
+ m_last_update(attotime::zero)
{
// get filename for WAV file or AVI file if specified
const char *wavfile = options_get_string(machine.options(), OPTION_WAVWRITE);
diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c
index b8fd907b58e..16fa5668116 100644
--- a/src/emu/sound/aica.c
+++ b/src/emu/sound/aica.c
@@ -722,7 +722,7 @@ static void AICA_UpdateReg(aica_state *AICA, int reg)
time = (44100 / AICA->TimPris[0]) / (255-(AICA->udata.data[0x90/2]&0xff));
if (time)
{
- timer_adjust_oneshot(AICA->timerA, ATTOTIME_IN_HZ(time), 0);
+ timer_adjust_oneshot(AICA->timerA, attotime::from_hz(time), 0);
}
}
}
@@ -741,7 +741,7 @@ static void AICA_UpdateReg(aica_state *AICA, int reg)
time = (44100 / AICA->TimPris[1]) / (255-(AICA->udata.data[0x94/2]&0xff));
if (time)
{
- timer_adjust_oneshot(AICA->timerB, ATTOTIME_IN_HZ(time), 0);
+ timer_adjust_oneshot(AICA->timerB, attotime::from_hz(time), 0);
}
}
}
@@ -760,7 +760,7 @@ static void AICA_UpdateReg(aica_state *AICA, int reg)
time = (44100 / AICA->TimPris[2]) / (255-(AICA->udata.data[0x98/2]&0xff));
if (time)
{
- timer_adjust_oneshot(AICA->timerC, ATTOTIME_IN_HZ(time), 0);
+ timer_adjust_oneshot(AICA->timerC, attotime::from_hz(time), 0);
}
}
}
diff --git a/src/emu/sound/asc.c b/src/emu/sound/asc.c
index 1ba0c8af8ad..0835801f4c8 100644
--- a/src/emu/sound/asc.c
+++ b/src/emu/sound/asc.c
@@ -506,11 +506,11 @@ WRITE8_MEMBER( asc_device::write )
if (data != 0)
{
- timer_adjust_periodic(m_sync_timer, attotime_zero, 0, ATTOTIME_IN_HZ(22257/4));
+ timer_adjust_periodic(m_sync_timer, attotime::zero, 0, attotime::from_hz(22257/4));
}
else
{
- timer_adjust_oneshot(m_sync_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_sync_timer, attotime::never, 0);
}
}
break;
diff --git a/src/emu/sound/bsmt2000.c b/src/emu/sound/bsmt2000.c
index e72a5857522..830282e2318 100644
--- a/src/emu/sound/bsmt2000.c
+++ b/src/emu/sound/bsmt2000.c
@@ -326,7 +326,7 @@ void bsmt2000_device::write_data(UINT16 data)
device_timer_call_after_resynch(*this, TIMER_ID_DATA_WRITE, data);
// boost the interleave on a write so that the caller detects the status more accurately
- m_machine.scheduler().boost_interleave(ATTOTIME_IN_USEC(1), ATTOTIME_IN_USEC(10));
+ m_machine.scheduler().boost_interleave(attotime::from_usec(1), attotime::from_usec(10));
}
diff --git a/src/emu/sound/es5503.c b/src/emu/sound/es5503.c
index 913fedce84e..76270f4798b 100644
--- a/src/emu/sound/es5503.c
+++ b/src/emu/sound/es5503.c
@@ -452,7 +452,7 @@ WRITE8_DEVICE_HANDLER( es5503_w )
else if (!(chip->oscillators[osc].control & 1) && (data&1))
{
// key off
- timer_adjust_oneshot(chip->oscillators[osc].timer, attotime_never, 0);
+ timer_adjust_oneshot(chip->oscillators[osc].timer, attotime::never, 0);
}
chip->oscillators[osc].control = data;
diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c
index 72ed69e229f..bc2baf3a37a 100644
--- a/src/emu/sound/fm.c
+++ b/src/emu/sound/fm.c
@@ -850,7 +850,7 @@ INLINE UINT8 FM_STATUS_FLAG(FM_ST *ST)
}
INLINE void FM_BUSY_SET(FM_ST *ST,int busyclock )
{
- TIME_TYPE expiry_period = MULTIPLY_TIME_BY_INT(ATTOTIME_IN_HZ(ST->clock), busyclock * ST->timer_prescaler);
+ TIME_TYPE expiry_period = MULTIPLY_TIME_BY_INT(attotime::from_hz(ST->clock), busyclock * ST->timer_prescaler);
ST->busy_expiry_time = ADD_TIMES(FM_GET_TIME_NOW(ST->device->machine), expiry_period);
}
#else
diff --git a/src/emu/sound/fm.h b/src/emu/sound/fm.h
index 0a3101f74c2..6588b8eab3f 100644
--- a/src/emu/sound/fm.h
+++ b/src/emu/sound/fm.h
@@ -41,7 +41,7 @@ struct _ssg_callbacks
#if FM_BUSY_FLAG_SUPPORT
#define TIME_TYPE attotime
-#define UNDEFINED_TIME attotime_zero
+#define UNDEFINED_TIME attotime::zero
#define FM_GET_TIME_NOW(machine) timer_get_time(machine)
#define ADD_TIMES(t1, t2) ((t1) + (t2))
#define COMPARE_TIMES(t1, t2) (((t1) == (t2)) ? 0 : ((t1) < (t2)) ? -1 : 1)
diff --git a/src/emu/sound/fm2612.c b/src/emu/sound/fm2612.c
index a9bea1221bf..19eb58b2296 100644
--- a/src/emu/sound/fm2612.c
+++ b/src/emu/sound/fm2612.c
@@ -1013,7 +1013,7 @@ INLINE UINT8 FM_STATUS_FLAG(FM_ST *ST)
}
INLINE void FM_BUSY_SET(FM_ST *ST,int busyclock )
{
- TIME_TYPE expiry_period = MULTIPLY_TIME_BY_INT(ATTOTIME_IN_HZ(ST->clock), busyclock * ST->timer_prescaler);
+ TIME_TYPE expiry_period = MULTIPLY_TIME_BY_INT(attotime::from_hz(ST->clock), busyclock * ST->timer_prescaler);
ST->busy_expiry_time = ADD_TIMES(FM_GET_TIME_NOW(ST->device->machine), expiry_period);
}
#else
diff --git a/src/emu/sound/fmopl.c b/src/emu/sound/fmopl.c
index 5375c870627..02e410727b9 100644
--- a/src/emu/sound/fmopl.c
+++ b/src/emu/sound/fmopl.c
@@ -1744,7 +1744,7 @@ static int OPL_LockTable(device_t *device)
{
cymfile = fopen("3812_.cym","wb");
if (cymfile)
- timer_pulse ( device->machine, ATTOTIME_IN_HZ(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
+ timer_pulse ( device->machine, attotime::from_hz(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
else
logerror("Could not create file 3812_.cym\n");
}
diff --git a/src/emu/sound/ics2115.c b/src/emu/sound/ics2115.c
index 0e11e35251c..ae60548a1ad 100644
--- a/src/emu/sound/ics2115.c
+++ b/src/emu/sound/ics2115.c
@@ -125,8 +125,8 @@ void ics2115_device::device_reset()
m_reg_select = 0;
m_vmode = 0;
memset(m_voice, 0, sizeof(m_voice));
- timer_adjust_oneshot(m_timer[0].timer, attotime_never, 0);
- timer_adjust_oneshot(m_timer[1].timer, attotime_never, 0);
+ timer_adjust_oneshot(m_timer[0].timer, attotime::never, 0);
+ timer_adjust_oneshot(m_timer[1].timer, attotime::never, 0);
m_timer[0].period = 0;
m_timer[1].period = 0;
for(int i = 0; i < 32; i++) {
@@ -903,8 +903,8 @@ void ics2115_device::recalc_timer(int timer)
m_timer[timer].period = period;
// Adjust the timer lengths
if(period) // Reset the length
- timer_adjust_periodic(m_timer[timer].timer, ATTOTIME_IN_NSEC(period), 0, ATTOTIME_IN_NSEC(period));
+ timer_adjust_periodic(m_timer[timer].timer, attotime::from_nsec(period), 0, attotime::from_nsec(period));
else // Kill the timer if length == 0
- timer_adjust_oneshot(m_timer[timer].timer, attotime_never, 0);
+ timer_adjust_oneshot(m_timer[timer].timer, attotime::never, 0);
}
}
diff --git a/src/emu/sound/k054539.c b/src/emu/sound/k054539.c
index 55e753c86bf..b745cd081f9 100644
--- a/src/emu/sound/k054539.c
+++ b/src/emu/sound/k054539.c
@@ -470,7 +470,7 @@ static void k054539_init_chip(device_t *device, k054539_state *info)
// One or more of the registers must be the timer period
// And anyway, this particular frequency is probably wrong
// 480 hz is TRUSTED by gokuparo disco stage - the looping sample doesn't line up otherwise
- timer_pulse(device->machine, ATTOTIME_IN_HZ(480), info, 0, k054539_irq);
+ timer_pulse(device->machine, attotime::from_hz(480), info, 0, k054539_irq);
info->stream = device->machine->sound().stream_alloc(*device, 0, 2, device->clock(), info, k054539_update);
diff --git a/src/emu/sound/msm5205.c b/src/emu/sound/msm5205.c
index 7a2630b7675..749a23836f3 100644
--- a/src/emu/sound/msm5205.c
+++ b/src/emu/sound/msm5205.c
@@ -278,7 +278,7 @@ static void msm5205_playmode(msm5205_state *voice,int select)
timer_adjust_periodic(voice->timer, period, 0, period);
}
else
- timer_adjust_oneshot(voice->timer, attotime_never, 0);
+ timer_adjust_oneshot(voice->timer, attotime::never, 0);
}
if( voice->bitwidth != bitwidth )
diff --git a/src/emu/sound/pokey.c b/src/emu/sound/pokey.c
index 8be62d40198..f623b3a79b1 100644
--- a/src/emu/sound/pokey.c
+++ b/src/emu/sound/pokey.c
@@ -465,7 +465,7 @@ static TIMER_CALLBACK( pokey_pot_trigger );
PROCESS_SAMPLE(chip); \
} \
} \
- timer_adjust_oneshot(chip->rtimer, attotime_never, 0)
+ timer_adjust_oneshot(chip->rtimer, attotime::never, 0)
#else /* no HEAVY_MACRO_USAGE */
/*
@@ -516,7 +516,7 @@ static TIMER_CALLBACK( pokey_pot_trigger );
PROCESS_CHANNEL(chip,channel); \
} \
} \
- timer_adjust_oneshot(chip->rtimer, attotime_never, 0)
+ timer_adjust_oneshot(chip->rtimer, attotime::never, 0)
#endif
@@ -621,7 +621,7 @@ static DEVICE_START( pokey )
if (device->baseconfig().static_config())
memcpy(&chip->intf, device->baseconfig().static_config(), sizeof(pokey_interface));
chip->device = device;
- chip->clock_period = ATTOTIME_IN_HZ(device->clock());
+ chip->clock_period = attotime::from_hz(device->clock());
/* calculate the A/D times
* In normal, slow mode (SKCTL bit SK_PADDLE is clear) the conversion
@@ -908,7 +908,7 @@ READ8_DEVICE_HANDLER( pokey_r )
LOG_RAND(("POKEY '%s' adjust %u rand17[$%05x]: $%02x\n", p->device->tag(), adjust, p->r17, p->RANDOM));
}
if (adjust > 0)
- timer_adjust_oneshot(p->rtimer, attotime_never, 0);
+ timer_adjust_oneshot(p->rtimer, attotime::never, 0);
data = p->RANDOM ^ 0xff;
break;
@@ -1043,9 +1043,9 @@ WRITE8_DEVICE_HANDLER( pokey_w )
/* first remove any existing timers */
LOG_TIMER(("POKEY '%s' STIMER $%02x\n", p->device->tag(), data));
- timer_adjust_oneshot(p->timer[TIMER1], attotime_never, p->timer_param[TIMER1]);
- timer_adjust_oneshot(p->timer[TIMER2], attotime_never, p->timer_param[TIMER2]);
- timer_adjust_oneshot(p->timer[TIMER4], attotime_never, p->timer_param[TIMER4]);
+ timer_adjust_oneshot(p->timer[TIMER1], attotime::never, p->timer_param[TIMER1]);
+ timer_adjust_oneshot(p->timer[TIMER2], attotime::never, p->timer_param[TIMER2]);
+ timer_adjust_oneshot(p->timer[TIMER4], attotime::never, p->timer_param[TIMER4]);
/* reset all counters to zero (side effect) */
p->polyadjust = 0;
@@ -1141,9 +1141,9 @@ WRITE8_DEVICE_HANDLER( pokey_w )
* loaders from Ballblazer and Escape from Fractalus
* The real times are unknown
*/
- timer_set(device->machine, ATTOTIME_IN_USEC(200), p, 0, pokey_serout_ready_cb);
+ timer_set(device->machine, attotime::from_usec(200), p, 0, pokey_serout_ready_cb);
/* 10 bits (assumption 1 start, 8 data and 1 stop bit) take how long? */
- timer_set(device->machine, ATTOTIME_IN_USEC(2000), p, 0, pokey_serout_complete);
+ timer_set(device->machine, attotime::from_usec(2000), p, 0, pokey_serout_complete);
break;
case IRQEN_C:
diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c
index c5f68bc33ee..9efe9c06aae 100644
--- a/src/emu/sound/scsp.c
+++ b/src/emu/sound/scsp.c
@@ -739,7 +739,7 @@ static void SCSP_UpdateReg(scsp_state *scsp, int reg)
time = (44100 / scsp->TimPris[0]) / (255-(scsp->udata.data[0x18/2]&0xff));
if (time)
{
- timer_adjust_oneshot(scsp->timerA, ATTOTIME_IN_HZ(time), 0);
+ timer_adjust_oneshot(scsp->timerA, attotime::from_hz(time), 0);
}
}
}
@@ -758,7 +758,7 @@ static void SCSP_UpdateReg(scsp_state *scsp, int reg)
time = (44100 / scsp->TimPris[1]) / (255-(scsp->udata.data[0x1A/2]&0xff));
if (time)
{
- timer_adjust_oneshot(scsp->timerB, ATTOTIME_IN_HZ(time), 0);
+ timer_adjust_oneshot(scsp->timerB, attotime::from_hz(time), 0);
}
}
}
@@ -777,7 +777,7 @@ static void SCSP_UpdateReg(scsp_state *scsp, int reg)
time = (44100 / scsp->TimPris[2]) / (255-(scsp->udata.data[0x1C/2]&0xff));
if (time)
{
- timer_adjust_oneshot(scsp->timerC, ATTOTIME_IN_HZ(time), 0);
+ timer_adjust_oneshot(scsp->timerC, attotime::from_hz(time), 0);
}
}
}
diff --git a/src/emu/sound/speaker.c b/src/emu/sound/speaker.c
index cc4d331055c..d18e7f64e59 100644
--- a/src/emu/sound/speaker.c
+++ b/src/emu/sound/speaker.c
@@ -219,7 +219,7 @@ static STREAM_UPDATE( speaker_sound_update )
stream_sample_t *buffer = outputs[0];
int volume = sp->levels[sp->level];
double filtered_volume;
- attotime sampled_time = attotime_zero;
+ attotime sampled_time = attotime::zero;
if (samples > 0)
{
diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c
index 3067c8ab351..aba0f52b51a 100644
--- a/src/emu/sound/tms5110.c
+++ b/src/emu/sound/tms5110.c
@@ -1239,7 +1239,7 @@ READ8_DEVICE_HANDLER( tms5110_romclk_hack_r )
if (!tms->romclk_hack_timer_started)
{
tms->romclk_hack_timer_started = TRUE;
- timer_adjust_periodic(tms->romclk_hack_timer, ATTOTIME_IN_HZ(device->clock() / 40), 0, ATTOTIME_IN_HZ(device->clock() / 40));
+ timer_adjust_periodic(tms->romclk_hack_timer, attotime::from_hz(device->clock() / 40), 0, attotime::from_hz(device->clock() / 40));
}
return tms->romclk_hack_state;
}
@@ -1422,7 +1422,7 @@ static DEVICE_START( tmsprom )
tms->clock = device->clock();
tms->romclk_timer = timer_alloc(device->machine, tmsprom_step, device);
- timer_adjust_periodic(tms->romclk_timer, attotime_zero, 0, ATTOTIME_IN_HZ(tms->clock));
+ timer_adjust_periodic(tms->romclk_timer, attotime::zero, 0, attotime::from_hz(tms->clock));
tms->bit = 0;
tms->base_address = 0;
diff --git a/src/emu/sound/tms5220.c b/src/emu/sound/tms5220.c
index ddd55dd6cad..0a67d879379 100644
--- a/src/emu/sound/tms5220.c
+++ b/src/emu/sound/tms5220.c
@@ -1696,7 +1696,7 @@ WRITE_LINE_DEVICE_HANDLER( tms5220_rsq_w )
tms->io_ready = 0;
update_ready_state(tms);
/* How long does /READY stay inactive, when /RS is pulled low? I believe its almost always ~16 clocks (25 usec at 800khz as shown on the datasheet) */
- timer_set(tms->device->machine, ATTOTIME_IN_HZ(device->clock()/16), tms, 1, io_ready_cb); // this should take around 10-16 (closer to ~11?) cycles to complete
+ timer_set(tms->device->machine, attotime::from_hz(device->clock()/16), tms, 1, io_ready_cb); // this should take around 10-16 (closer to ~11?) cycles to complete
}
}
}
@@ -1759,7 +1759,7 @@ WRITE_LINE_DEVICE_HANDLER( tms5220_wsq_w )
SET RATE (5220C only): ? cycles (probably ~16)
*/
// TODO: actually HANDLE the timing differences! currently just assuming always 16 cycles
- timer_set(tms->device->machine, ATTOTIME_IN_HZ(device->clock()/16), tms, 1, io_ready_cb); // this should take around 10-16 (closer to ~15) cycles to complete for fifo writes, TODO: but actually depends on what command is written if in command mode
+ timer_set(tms->device->machine, attotime::from_hz(device->clock()/16), tms, 1, io_ready_cb); // this should take around 10-16 (closer to ~15) cycles to complete for fifo writes, TODO: but actually depends on what command is written if in command mode
}
}
}
diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c
index a20d3dbdcf4..d8642a4ad4d 100644
--- a/src/emu/sound/upd7759.c
+++ b/src/emu/sound/upd7759.c
@@ -582,7 +582,7 @@ static void upd7759_reset(upd7759_state *chip)
/* turn off any timer */
if (chip->timer)
- timer_adjust_oneshot(chip->timer, attotime_never, 0);
+ timer_adjust_oneshot(chip->timer, attotime::never, 0);
}
@@ -647,7 +647,7 @@ static DEVICE_START( upd7759 )
chip->step = 4 * FRAC_ONE;
/* compute the clock period */
- chip->clock_period = ATTOTIME_IN_HZ(device->clock());
+ chip->clock_period = attotime::from_hz(device->clock());
/* set the intial state */
chip->state = STATE_IDLE;
@@ -712,7 +712,7 @@ void upd7759_start_w(device_t *device, UINT8 data)
/* for slave mode, start the timer going */
if (chip->timer)
- timer_adjust_oneshot(chip->timer, attotime_zero, 0);
+ timer_adjust_oneshot(chip->timer, attotime::zero, 0);
}
}
diff --git a/src/emu/sound/ym2151.c b/src/emu/sound/ym2151.c
index c6be72bfeef..34c5218a86e 100644
--- a/src/emu/sound/ym2151.c
+++ b/src/emu/sound/ym2151.c
@@ -824,7 +824,7 @@ static TIMER_CALLBACK( timer_callback_a )
if (chip->irq_enable & 0x04)
{
chip->status |= 1;
- timer_set(machine, attotime_zero,chip,0,irqAon_callback);
+ timer_set(machine, attotime::zero,chip,0,irqAon_callback);
}
if (chip->irq_enable & 0x80)
chip->csm_req = 2; /* request KEY ON / KEY OFF sequence */
@@ -837,7 +837,7 @@ static TIMER_CALLBACK( timer_callback_b )
if (chip->irq_enable & 0x08)
{
chip->status |= 2;
- timer_set(machine, attotime_zero,chip,0,irqBon_callback);
+ timer_set(machine, attotime::zero,chip,0,irqBon_callback);
}
}
#if 0
@@ -1098,7 +1098,7 @@ void ym2151_write_reg(void *_chip, int r, int v)
{
#ifdef USE_MAME_TIMERS
chip->status &= ~1;
- timer_set(chip->device->machine, attotime_zero,chip,0,irqAoff_callback);
+ timer_set(chip->device->machine, attotime::zero,chip,0,irqAoff_callback);
#else
int oldstate = chip->status & 3;
chip->status &= ~1;
@@ -1110,7 +1110,7 @@ void ym2151_write_reg(void *_chip, int r, int v)
{
#ifdef USE_MAME_TIMERS
chip->status &= ~2;
- timer_set(chip->device->machine, attotime_zero,chip,0,irqBoff_callback);
+ timer_set(chip->device->machine, attotime::zero,chip,0,irqBoff_callback);
#else
int oldstate = chip->status & 3;
chip->status &= ~2;
@@ -1546,7 +1546,7 @@ void * ym2151_init(device_t *device, int clock, int rate)
{
cymfile = fopen("2151_.cym","wb");
if (cymfile)
- timer_pulse ( device->machine, ATTOTIME_IN_HZ(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
+ timer_pulse ( device->machine, attotime::from_hz(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
else
logerror("Could not create file 2151_.cym\n");
}
diff --git a/src/emu/sound/ym2413.c b/src/emu/sound/ym2413.c
index 5e05cc77bd8..8c706e47f85 100644
--- a/src/emu/sound/ym2413.c
+++ b/src/emu/sound/ym2413.c
@@ -1940,7 +1940,7 @@ static int OPLL_LockTable(device_t *device)
{
cymfile = fopen("2413_.cym","wb");
if (cymfile)
- timer_pulse ( device->machine, ATTOTIME_IN_HZ(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
+ timer_pulse ( device->machine, attotime::from_hz(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
else
logerror("Could not create file 2413_.cym\n");
}
diff --git a/src/emu/sound/ymf262.c b/src/emu/sound/ymf262.c
index 3c57e047168..790bb192af0 100644
--- a/src/emu/sound/ymf262.c
+++ b/src/emu/sound/ymf262.c
@@ -2268,7 +2268,7 @@ static int OPL3_LockTable(device_t *device)
{
cymfile = fopen("ymf262_.cym","wb");
if (cymfile)
- timer_pulse ( device->machine, ATTOTIME_IN_HZ(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
+ timer_pulse ( device->machine, attotime::from_hz(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
else
logerror("Could not create ymf262_.cym file\n");
}
diff --git a/src/emu/sound/ymf278b.c b/src/emu/sound/ymf278b.c
index 456861820e9..8ab7de0cc0c 100644
--- a/src/emu/sound/ymf278b.c
+++ b/src/emu/sound/ymf278b.c
@@ -372,7 +372,7 @@ static void ymf278b_timer_a_reset(YMF278BChip *chip)
{
if(chip->enable & 1)
{
- attotime period = ATTOTIME_IN_NSEC((256-chip->timer_a_count) * 80800);
+ attotime period = attotime::from_nsec((256-chip->timer_a_count) * 80800);
if (chip->clock != YMF278B_STD_CLOCK)
period = (period * chip->clock) / YMF278B_STD_CLOCK;
@@ -380,14 +380,14 @@ static void ymf278b_timer_a_reset(YMF278BChip *chip)
timer_adjust_periodic(chip->timer_a, period, 0, period);
}
else
- timer_adjust_oneshot(chip->timer_a, attotime_never, 0);
+ timer_adjust_oneshot(chip->timer_a, attotime::never, 0);
}
static void ymf278b_timer_b_reset(YMF278BChip *chip)
{
if(chip->enable & 2)
{
- attotime period = ATTOTIME_IN_NSEC((256-chip->timer_b_count) * 323100);
+ attotime period = attotime::from_nsec((256-chip->timer_b_count) * 323100);
if (chip->clock != YMF278B_STD_CLOCK)
period = (period * chip->clock) / YMF278B_STD_CLOCK;
@@ -395,7 +395,7 @@ static void ymf278b_timer_b_reset(YMF278BChip *chip)
timer_adjust_periodic(chip->timer_b, period, 0, period);
}
else
- timer_adjust_oneshot(chip->timer_b, attotime_never, 0);
+ timer_adjust_oneshot(chip->timer_b, attotime::never, 0);
}
static void ymf278b_A_w(running_machine *machine, YMF278BChip *chip, UINT8 reg, UINT8 data)
diff --git a/src/emu/sound/ymz280b.c b/src/emu/sound/ymz280b.c
index 86703776642..ba874ef01ae 100644
--- a/src/emu/sound/ymz280b.c
+++ b/src/emu/sound/ymz280b.c
@@ -205,7 +205,7 @@ static STATE_POSTLOAD( YMZ280B_state_save_update_step )
struct YMZ280BVoice *voice = &chip->voice[j];
update_step(chip, voice);
if(voice->irq_schedule)
- timer_set(machine, attotime_zero, chip, 0, update_irq_state_cb[j]);
+ timer_set(machine, attotime::zero, chip, 0, update_irq_state_cb[j]);
}
}
@@ -581,7 +581,7 @@ static STREAM_UPDATE( ymz280b_update )
voice->playing = 0;
/* set update_irq_state_timer. IRQ is signaled on next CPU execution. */
- timer_set(chip->device->machine, attotime_zero, chip, 0, update_irq_state_cb[v]);
+ timer_set(chip->device->machine, attotime::zero, chip, 0, update_irq_state_cb[v]);
voice->irq_schedule = 1;
}
}
diff --git a/src/emu/timer.c b/src/emu/timer.c
index 0c82b1d8a43..e93a85fbd87 100644
--- a/src/emu/timer.c
+++ b/src/emu/timer.c
@@ -173,7 +173,7 @@ INLINE emu_timer *timer_new(running_machine *machine)
INLINE void timer_list_insert(emu_timer *timer)
{
- attotime expire = timer->enabled ? timer->expire : attotime_never;
+ attotime expire = timer->enabled ? timer->expire : attotime::never;
timer_private *global = timer->machine->timer_data;
emu_timer *t, *lt = NULL;
@@ -281,8 +281,8 @@ void timer_init(running_machine *machine)
global = machine->timer_data = auto_alloc_clear(machine, timer_private);
/* we need to wait until the first call to timer_cyclestorun before using real CPU times */
- global->exec.basetime = attotime_zero;
- global->exec.nextfire = attotime_never;
+ global->exec.basetime = attotime::zero;
+ global->exec.nextfire = attotime::never;
global->exec.curquantum = DEFAULT_MINIMUM_QUANTUM;
global->callback_timer = NULL;
global->callback_timer_modified = FALSE;
@@ -303,7 +303,7 @@ void timer_init(running_machine *machine)
/* reset the quanta */
global->quantum_list[0].requested = DEFAULT_MINIMUM_QUANTUM;
global->quantum_list[0].actual = DEFAULT_MINIMUM_QUANTUM;
- global->quantum_list[0].expire = attotime_never;
+ global->quantum_list[0].expire = attotime::never;
global->quantum_current = &global->quantum_list[0];
global->quantum_minimum = ATTOSECONDS_IN_NSEC(1) / 1000;
}
@@ -616,7 +616,7 @@ INLINE emu_timer *_timer_alloc_common(running_machine *machine, device_t *device
timer->param = 0;
timer->enabled = FALSE;
timer->temporary = temp;
- timer->period = attotime_zero;
+ timer->period = attotime::zero;
timer->file = file;
timer->line = line;
timer->func = func;
@@ -625,7 +625,7 @@ INLINE emu_timer *_timer_alloc_common(running_machine *machine, device_t *device
/* compute the time of the next firing and insert into the list */
timer->start = time;
- timer->expire = attotime_never;
+ timer->expire = attotime::never;
timer_list_insert(timer);
/* if we're not temporary, register ourselves with the save state system */
@@ -689,7 +689,7 @@ static void timer_remove(emu_timer *which)
void timer_adjust_oneshot(emu_timer *which, attotime duration, INT32 param)
{
- timer_adjust_periodic(which, duration, param, attotime_never);
+ timer_adjust_periodic(which, duration, param, attotime::never);
}
@@ -714,7 +714,7 @@ void timer_adjust_periodic(emu_timer *which, attotime start_delay, INT32 param,
/* clamp negative times to 0 */
if (start_delay.seconds < 0)
- start_delay = attotime_zero;
+ start_delay = attotime::zero;
/* set the start and expire times */
which->start = time;
@@ -740,7 +740,7 @@ void timer_adjust_periodic(emu_timer *which, attotime start_delay, INT32 param,
void device_timer_call_after_resynch(device_t &device, device_timer_id id, INT32 param, void *ptr)
{
emu_timer *timer = _timer_alloc_common(device.machine, &device, id, NULL, ptr, __FILE__, __LINE__, device.tag(), TRUE);
- timer_adjust_oneshot(timer, attotime_zero, param);
+ timer_adjust_oneshot(timer, attotime::zero, param);
}
@@ -977,8 +977,8 @@ timer_device_config::timer_device_config(const machine_config &mconfig, const ch
m_type(TIMER_TYPE_GENERIC),
m_callback(NULL),
m_ptr(NULL),
- m_start_delay(attotime_zero),
- m_period(attotime_zero),
+ m_start_delay(attotime::zero),
+ m_period(attotime::zero),
m_param(0),
m_screen(NULL),
m_first_vpos(0),
@@ -1207,14 +1207,14 @@ void timer_device::device_reset()
case timer_device_config::TIMER_TYPE_PERIODIC:
{
// convert the period into attotime
- attotime period = attotime_never;
+ attotime period = attotime::never;
if (m_config.m_period > attotime::zero)
{
period = m_config.m_period;
// convert the start_delay into attotime
- attotime start_delay = attotime_zero;
- if (m_config.m_start_delay > attotime_zero)
+ attotime start_delay = attotime::zero;
+ if (m_config.m_start_delay > attotime::zero)
start_delay = m_config.m_start_delay;
// allocate and start the backing timer
@@ -1229,7 +1229,7 @@ void timer_device::device_reset()
// set the timer to to fire immediately
m_first_time = true;
- timer_adjust_oneshot(m_timer, attotime_zero, m_config.m_param);
+ timer_adjust_oneshot(m_timer, attotime::zero, m_config.m_param);
break;
}
}
diff --git a/src/emu/timer.h b/src/emu/timer.h
index b78a8a7074f..6cd806645c5 100644
--- a/src/emu/timer.h
+++ b/src/emu/timer.h
@@ -34,14 +34,14 @@
/* R is in ohms, C is in farads */
#define PERIOD_OF_555_MONOSTABLE_NSEC(r,c) ((attoseconds_t)(1100000000 * (double)(r) * (double)(c)))
#define PERIOD_OF_555_ASTABLE_NSEC(r1,r2,c) ((attoseconds_t)( 693000000 * ((double)(r1) + 2.0 * (double)(r2)) * (double)(c)))
-#define PERIOD_OF_555_MONOSTABLE(r,c) ATTOTIME_IN_NSEC(PERIOD_OF_555_MONOSTABLE_NSEC(r,c))
-#define PERIOD_OF_555_ASTABLE(r1,r2,c) ATTOTIME_IN_NSEC(PERIOD_OF_555_ASTABLE_NSEC(r1,r2,c))
+#define PERIOD_OF_555_MONOSTABLE(r,c) attotime::from_nsec(PERIOD_OF_555_MONOSTABLE_NSEC(r,c))
+#define PERIOD_OF_555_ASTABLE(r1,r2,c) attotime::from_nsec(PERIOD_OF_555_ASTABLE_NSEC(r1,r2,c))
/* macros that map all allocations to provide file/line/functions to the callee */
#define timer_alloc(m,c,ptr) _timer_alloc_internal(m, c, ptr, __FILE__, __LINE__, #c)
#define timer_pulse(m,e,ptr,p,c) _timer_pulse_internal(m, e, ptr, p, c, __FILE__, __LINE__, #c)
#define timer_set(m,d,ptr,p,c) _timer_set_internal(m, d, ptr, p, c, __FILE__, __LINE__, #c)
-#define timer_call_after_resynch(m,ptr,p,c) _timer_set_internal(m, attotime_zero, ptr, p, c, __FILE__, __LINE__, #c)
+#define timer_call_after_resynch(m,ptr,p,c) _timer_set_internal(m, attotime::zero, ptr, p, c, __FILE__, __LINE__, #c)
/* macros for a timer callback functions */
#define TIMER_CALLBACK(name) void name(running_machine *machine, void *ptr, int param)
@@ -82,7 +82,7 @@ struct timer_execution_state
#define MCFG_TIMER_ADD_PERIODIC(_tag, _callback, _period) \
MCFG_DEVICE_ADD(_tag, TIMER, 0) \
- timer_device_config::static_configure_periodic(device, _callback, ATTOTIME_IN_##_period); \
+ timer_device_config::static_configure_periodic(device, _callback, _period); \
#define MCFG_TIMER_ADD_SCANLINE(_tag, _callback, _screen, _first_vpos, _increment) \
MCFG_DEVICE_ADD(_tag, TIMER, 0) \
@@ -95,7 +95,7 @@ struct timer_execution_state
timer_device_config::static_set_callback(device, _callback); \
#define MCFG_TIMER_START_DELAY(_start_delay) \
- timer_device_config::static_set_start_delay(device, ATTOTIME_IN_##_start_delay); \
+ timer_device_config::static_set_start_delay(device, _start_delay); \
#define MCFG_TIMER_PARAM(_param) \
timer_device_config::static_set_param(device, _param); \
@@ -290,8 +290,8 @@ public:
void enable(bool enable = true) { timer_enable(m_timer, enable); }
// adjustments
- void reset() { adjust(attotime_never, 0, attotime_never); }
- void adjust(attotime duration, INT32 param = 0, attotime period = attotime_never) { assert(m_config.m_type == timer_device_config::TIMER_TYPE_GENERIC); timer_adjust_periodic(m_timer, duration, param, period); }
+ void reset() { adjust(attotime::never, 0, attotime::never); }
+ void adjust(attotime duration, INT32 param = 0, attotime period = attotime::never) { assert(m_config.m_type == timer_device_config::TIMER_TYPE_GENERIC); timer_adjust_periodic(m_timer, duration, param, period); }
// timing information
attotime time_elapsed() const { return timer_timeelapsed(m_timer); }
diff --git a/src/emu/video.c b/src/emu/video.c
index a066fadae11..e066fb8949c 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -102,15 +102,15 @@ video_manager::video_manager(running_machine &machine)
: m_machine(machine),
m_screenless_frame_timer(NULL),
m_throttle_last_ticks(0),
- m_throttle_realtime(attotime_zero),
- m_throttle_emutime(attotime_zero),
+ m_throttle_realtime(attotime::zero),
+ m_throttle_emutime(attotime::zero),
m_throttle_history(0),
m_speed_last_realtime(0),
- m_speed_last_emutime(attotime_zero),
+ m_speed_last_emutime(attotime::zero),
m_speed_percent(1.0),
m_overall_real_seconds(0),
m_overall_real_ticks(0),
- m_overall_emutime(attotime_zero),
+ m_overall_emutime(attotime::zero),
m_overall_valid_counter(0),
m_throttle(options_get_bool(machine.options(), OPTION_THROTTLE)),
m_fastforward(false),
@@ -130,8 +130,8 @@ video_manager::video_manager(running_machine &machine)
m_snap_height(0),
m_mngfile(NULL),
m_avifile(NULL),
- m_movie_frame_period(attotime_zero),
- m_movie_next_frame_time(attotime_zero),
+ m_movie_frame_period(attotime::zero),
+ m_movie_next_frame_time(attotime::zero),
m_movie_frame(0)
{
// request a callback upon exiting
@@ -467,7 +467,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
return end_recording();
// compute the frame time
- m_movie_frame_period = ATTOTIME_IN_HZ(rate);
+ m_movie_frame_period = attotime::from_hz(rate);
}
}
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index e32c1cc95f9..49478bc7529 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -208,7 +208,7 @@ INLINE void call_on_update_address(device_t *device, int strobe)
mc6845_t *mc6845 = get_safe_token(device);
if (mc6845->intf->on_update_addr_changed)
- timer_set(device->machine, attotime_zero, (void *) device, (mc6845->update_addr << 8) | strobe, on_update_address_cb);
+ timer_set(device->machine, attotime::zero, (void *) device, (mc6845->update_addr << 8) | strobe, on_update_address_cb);
else
fatalerror("M6845: transparent memory mode without handler\n");
}
@@ -465,7 +465,7 @@ INLINE void mc6845_set_de(mc6845_t *mc6845, int state)
if ( mc6845->de )
{
/* If the upd_adr_timer was running, cancel it */
- timer_adjust_oneshot(mc6845->upd_adr_timer, attotime_never, 0);
+ timer_adjust_oneshot(mc6845->upd_adr_timer, attotime::never, 0);
}
else
{
diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c
index 22af28f0462..4abc6f7bcc8 100644
--- a/src/emu/video/pc_vga.c
+++ b/src/emu/video/pc_vga.c
@@ -1325,7 +1325,7 @@ static VIDEO_START( ega )
vga.monitor.get_columns = ega_get_crtc_columns;
vga.monitor.get_sync_lines = vga_get_crtc_sync_lines;
vga.monitor.get_sync_columns = vga_get_crtc_sync_columns;
- timer_pulse(machine, ATTOTIME_IN_HZ(60), NULL, 0, vga_timer);
+ timer_pulse(machine, attotime::from_hz(60), NULL, 0, vga_timer);
pc_video_start(machine, pc_ega_choosevideomode, 0);
}
@@ -1340,7 +1340,7 @@ static VIDEO_START( vga )
vga.monitor.get_columns=vga_get_crtc_columns;
vga.monitor.get_sync_lines=vga_get_crtc_sync_lines;
vga.monitor.get_sync_columns=vga_get_crtc_sync_columns;
- timer_pulse(machine, ATTOTIME_IN_HZ(60), NULL, 0, vga_timer);
+ timer_pulse(machine, attotime::from_hz(60), NULL, 0, vga_timer);
pc_video_start(machine, pc_vga_choosevideomode, 0);
}
diff --git a/src/emu/watchdog.c b/src/emu/watchdog.c
index c5a6f498fb1..340813dab5f 100644
--- a/src/emu/watchdog.c
+++ b/src/emu/watchdog.c
@@ -109,7 +109,7 @@ void watchdog_reset(running_machine *machine)
{
/* if we're not enabled, skip it */
if (!watchdog_enabled)
- timer_adjust_oneshot(watchdog_timer, attotime_never, 0);
+ timer_adjust_oneshot(watchdog_timer, attotime::never, 0);
/* VBLANK-based watchdog? */
else if (machine->config->m_watchdog_vblank_count != 0)
@@ -127,7 +127,7 @@ void watchdog_reset(running_machine *machine)
/* default to an obscene amount of time (3 seconds) */
else
- timer_adjust_oneshot(watchdog_timer, ATTOTIME_IN_SEC(3), 0);
+ timer_adjust_oneshot(watchdog_timer, attotime::from_seconds(3), 0);
}
diff --git a/src/ldplayer/ldplayer.c b/src/ldplayer/ldplayer.c
index f2c960f8b98..6964598e332 100644
--- a/src/ldplayer/ldplayer.c
+++ b/src/ldplayer/ldplayer.c
@@ -261,7 +261,7 @@ static TIMER_CALLBACK( autoplay )
static MACHINE_RESET( ldplayer )
{
/* set up a timer to start playing immediately */
- timer_set(machine, attotime_zero, NULL, 0, autoplay);
+ timer_set(machine, attotime::zero, NULL, 0, autoplay);
/* indicate the name of the file we opened */
popmessage("Opened %s\n", filename.cstr());
@@ -293,7 +293,7 @@ static TIMER_CALLBACK( pr8210_bit_off_callback )
static TIMER_CALLBACK( pr8210_bit_callback )
{
- attotime duration = ATTOTIME_IN_MSEC(30);
+ attotime duration = attotime::from_msec(30);
device_t *laserdisc = (device_t *)ptr;
UINT8 bitsleft = param >> 16;
UINT8 data = param;
@@ -303,7 +303,7 @@ static TIMER_CALLBACK( pr8210_bit_callback )
{
/* assert the line and set a timer for deassertion */
laserdisc_line_w(laserdisc, LASERDISC_LINE_CONTROL, ASSERT_LINE);
- timer_set(machine, ATTOTIME_IN_USEC(250), ptr, 0, pr8210_bit_off_callback);
+ timer_set(machine, attotime::from_usec(250), ptr, 0, pr8210_bit_off_callback);
/* space 0 bits apart by 1msec, and 1 bits by 2msec */
duration = attotime::from_msec((data & 0x80) ? 2 : 1);
@@ -332,7 +332,7 @@ static MACHINE_START( pr8210 )
static MACHINE_RESET( pr8210 )
{
MACHINE_RESET_CALL(ldplayer);
- timer_adjust_oneshot(pr8210_bit_timer, attotime_zero, 0);
+ timer_adjust_oneshot(pr8210_bit_timer, attotime::zero, 0);
}
diff --git a/src/mame/audio/8080bw.c b/src/mame/audio/8080bw.c
index 74e970d6086..dc576a17894 100644
--- a/src/mame/audio/8080bw.c
+++ b/src/mame/audio/8080bw.c
@@ -831,7 +831,7 @@ WRITE8_HANDLER( schaser_sh_port_1_w )
{
state->schaser_effect_555_time_remain = timer_timeleft(state->schaser_effect_555_timer);
state->schaser_effect_555_time_remain_savable = state->schaser_effect_555_time_remain.as_double();
- timer_adjust_oneshot(state->schaser_effect_555_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->schaser_effect_555_timer, attotime::never, 0);
}
}
state->schaser_last_effect = effect;
@@ -887,7 +887,7 @@ static TIMER_CALLBACK( schaser_effect_555_cb )
attotime new_time;
/* Toggle 555 output */
state->schaser_effect_555_is_low = !state->schaser_effect_555_is_low;
- state->schaser_effect_555_time_remain = attotime_zero;
+ state->schaser_effect_555_time_remain = attotime::zero;
state->schaser_effect_555_time_remain_savable = state->schaser_effect_555_time_remain.as_double();
if (state->schaser_effect_555_is_low)
@@ -934,10 +934,10 @@ MACHINE_RESET( schaser_sh )
address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
state->schaser_effect_555_is_low = 0;
- timer_adjust_oneshot(state->schaser_effect_555_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->schaser_effect_555_timer, attotime::never, 0);
schaser_sh_port_1_w(space, 0, 0);
schaser_sh_port_2_w(space, 0, 0);
- state->schaser_effect_555_time_remain = attotime_zero;
+ state->schaser_effect_555_time_remain = attotime::zero;
state->schaser_effect_555_time_remain_savable = state->schaser_effect_555_time_remain.as_double();
}
diff --git a/src/mame/audio/amiga.c b/src/mame/audio/amiga.c
index 19c761bc0bc..a2d0115b778 100644
--- a/src/mame/audio/amiga.c
+++ b/src/mame/audio/amiga.c
@@ -86,7 +86,7 @@ static void dma_reload(amiga_state *state, audio_channel *chan)
{
chan->curlocation = CUSTOM_REG_LONG(REG_AUD0LCH + chan->index * 8);
chan->curlength = CUSTOM_REG(REG_AUD0LEN + chan->index * 8);
- timer_adjust_oneshot(chan->irq_timer, ATTOTIME_IN_HZ(15750), chan->index);
+ timer_adjust_oneshot(chan->irq_timer, attotime::from_hz(15750), chan->index);
LOG(("dma_reload(%d): offs=%05X len=%04X\n", chan->index, chan->curlocation, chan->curlength));
}
diff --git a/src/mame/audio/cage.c b/src/mame/audio/cage.c
index 7f790a8e43a..865149be50d 100644
--- a/src/mame/audio/cage.c
+++ b/src/mame/audio/cage.c
@@ -164,7 +164,7 @@ void cage_init(running_machine *machine, offs_t speedup)
memory_set_bankptr(machine, "bank11", machine->region("cage")->base());
cage_cpu = machine->device<cpu_device>("cage");
- cage_cpu_clock_period = ATTOTIME_IN_HZ(cage_cpu->clock());
+ cage_cpu_clock_period = attotime::from_hz(cage_cpu->clock());
cage_cpu_h1_clock_period = cage_cpu_clock_period * 2;
dma_timer = machine->device<timer_device>("cage_dma_timer");
@@ -221,7 +221,7 @@ static TIMER_DEVICE_CALLBACK( dma_timer_callback )
{
if (dma_timer_enabled)
{
- timer.adjust(attotime_never);
+ timer.adjust(attotime::never);
dma_timer_enabled = 0;
}
return;
@@ -328,7 +328,7 @@ static void update_timer(int which)
/* see if we turned off */
else if (!enabled && cage_timer_enabled[which])
{
- timer[which]->adjust(attotime_never, which);
+ timer[which]->adjust(attotime::never, which);
}
/* set the new state */
diff --git a/src/mame/audio/carnival.c b/src/mame/audio/carnival.c
index 02fa2ad8a6d..ecef00144e9 100644
--- a/src/mame/audio/carnival.c
+++ b/src/mame/audio/carnival.c
@@ -301,7 +301,7 @@ MACHINE_CONFIG_FRAGMENT( carnival_audio )
MCFG_CPU_PROGRAM_MAP(carnival_audio_map)
MCFG_CPU_IO_MAP(carnival_audio_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_SOUND_ADD("psg", AY8910, PSG_CLOCK)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
diff --git a/src/mame/audio/dcs.c b/src/mame/audio/dcs.c
index de5baefe133..f9f4ea1cd73 100644
--- a/src/mame/audio/dcs.c
+++ b/src/mame/audio/dcs.c
@@ -865,7 +865,7 @@ static TIMER_CALLBACK( dcs_reset )
/* start the SPORT0 timer */
if (dcs.sport_timer != NULL)
- dcs.sport_timer->adjust(ATTOTIME_IN_HZ(1000), 0, ATTOTIME_IN_HZ(1000));
+ dcs.sport_timer->adjust(attotime::from_hz(1000), 0, attotime::from_hz(1000));
/* reset the HLE transfer states */
transfer.dcs_state = transfer.state = 0;
@@ -1502,7 +1502,7 @@ int dcs_control_r(void)
{
/* only boost for DCS2 boards */
if (!dcs.auto_ack && !transfer.hle_enabled)
- cpuexec_boost_interleave(dcs.cpu->machine, ATTOTIME_IN_NSEC(500), ATTOTIME_IN_USEC(5));
+ cpuexec_boost_interleave(dcs.cpu->machine, attotime::from_nsec(500), attotime::from_usec(5));
return dcs.latch_control;
}
@@ -1560,7 +1560,7 @@ static void dcs_delayed_data_w(running_machine *machine, int data)
logerror("%s:dcs_data_w(%04X)\n", cpuexec_describe_context(machine), data);
/* boost the interleave temporarily */
- cpuexec_boost_interleave(machine, ATTOTIME_IN_NSEC(500), ATTOTIME_IN_USEC(5));
+ cpuexec_boost_interleave(machine, attotime::from_nsec(500), attotime::from_usec(5));
/* set the IRQ line on the ADSP */
cpu_set_input_line(dcs.cpu, ADSP2105_IRQ2, ASSERT_LINE);
@@ -2113,7 +2113,7 @@ static TIMER_DEVICE_CALLBACK( transfer_watchdog_callback )
preprocess_write(timer.machine, (*dcs.fifo_data_r)(dcs.cpu));
}
if (transfer.watchdog != NULL)
- transfer.watchdog->adjust(ATTOTIME_IN_MSEC(1), transfer.writes_left);
+ transfer.watchdog->adjust(attotime::from_msec(1), transfer.writes_left);
}
@@ -2122,7 +2122,7 @@ static TIMER_CALLBACK( s1_ack_callback2 )
/* if the output is full, stall for a usec */
if (IS_OUTPUT_FULL())
{
- timer_set(machine, ATTOTIME_IN_USEC(1), NULL, param, s1_ack_callback2);
+ timer_set(machine, attotime::from_usec(1), NULL, param, s1_ack_callback2);
return;
}
output_latch_w(cpu_get_address_space(dcs.cpu, ADDRESS_SPACE_PROGRAM), 0, 0x000a, 0xffff);
@@ -2134,13 +2134,13 @@ static TIMER_CALLBACK( s1_ack_callback1 )
/* if the output is full, stall for a usec */
if (IS_OUTPUT_FULL())
{
- timer_set(machine, ATTOTIME_IN_USEC(1), NULL, param, s1_ack_callback1);
+ timer_set(machine, attotime::from_usec(1), NULL, param, s1_ack_callback1);
return;
}
output_latch_w(cpu_get_address_space(dcs.cpu, ADDRESS_SPACE_PROGRAM), 0, param, 0xffff);
/* chain to the next word we need to write back */
- timer_set(machine, ATTOTIME_IN_USEC(1), NULL, 0, s1_ack_callback2);
+ timer_set(machine, attotime::from_usec(1), NULL, 0, s1_ack_callback2);
}
@@ -2256,7 +2256,7 @@ static int preprocess_stage_1(running_machine *machine, UINT16 data)
/* if we're done, start a timer to send the response words */
if (transfer.state == 0)
- timer_set(machine, ATTOTIME_IN_USEC(1), NULL, transfer.sum, s1_ack_callback1);
+ timer_set(machine, attotime::from_usec(1), NULL, transfer.sum, s1_ack_callback1);
return 1;
}
break;
@@ -2272,7 +2272,7 @@ static TIMER_CALLBACK( s2_ack_callback )
/* if the output is full, stall for a usec */
if (IS_OUTPUT_FULL())
{
- timer_set(machine, ATTOTIME_IN_USEC(1), NULL, param, s2_ack_callback);
+ timer_set(machine, attotime::from_usec(1), NULL, param, s2_ack_callback);
return;
}
output_latch_w(space, 0, param, 0xffff);
@@ -2343,7 +2343,7 @@ static int preprocess_stage_2(running_machine *machine, UINT16 data)
transfer.sum = 0;
if (transfer.hle_enabled)
{
- transfer.watchdog->adjust(ATTOTIME_IN_MSEC(1), transfer.writes_left);
+ transfer.watchdog->adjust(attotime::from_msec(1), transfer.writes_left);
return 1;
}
break;
@@ -2369,7 +2369,7 @@ static int preprocess_stage_2(running_machine *machine, UINT16 data)
/* if we're done, start a timer to send the response words */
if (transfer.state == 0)
{
- timer_set(machine, ATTOTIME_IN_USEC(1), NULL, transfer.sum, s2_ack_callback);
+ timer_set(machine, attotime::from_usec(1), NULL, transfer.sum, s2_ack_callback);
transfer.watchdog->reset();
}
return 1;
diff --git a/src/mame/audio/gottlieb.c b/src/mame/audio/gottlieb.c
index 6eb55a9734c..b74c5824dd2 100644
--- a/src/mame/audio/gottlieb.c
+++ b/src/mame/audio/gottlieb.c
@@ -272,7 +272,7 @@ logerror("Votrax: intonation %d, phoneme %02x %s\n",data >> 6,data & 0x3f,Phonem
}
/* generate a NMI after a while to make the CPU continue to send data */
- timer_set(space->machine, ATTOTIME_IN_USEC(50), NULL, 0, gottlieb_nmi_generate);
+ timer_set(space->machine, attotime::from_usec(50), NULL, 0, gottlieb_nmi_generate);
}
static WRITE8_HANDLER( speech_clock_dac_w )
@@ -446,7 +446,7 @@ static TIMER_CALLBACK( nmi_callback )
nmi_state_update(machine);
/* set a timer to turn it off again on hte next SOUND_CLOCK/16 */
- timer_set(machine, ATTOTIME_IN_HZ(SOUND2_CLOCK/16), NULL, 0, nmi_clear);
+ timer_set(machine, attotime::from_hz(SOUND2_CLOCK/16), NULL, 0, nmi_clear);
/* adjust the NMI timer for the next time */
nmi_timer_adjust();
diff --git a/src/mame/audio/leland.c b/src/mame/audio/leland.c
index ee9bfb4493e..9597429f387 100644
--- a/src/mame/audio/leland.c
+++ b/src/mame/audio/leland.c
@@ -910,7 +910,7 @@ static TIMER_CALLBACK( internal_timer_int )
if (LOG_TIMER) logerror(" Repriming interrupt\n");
}
else
- timer_adjust_oneshot(t->int_timer, attotime_never, which);
+ timer_adjust_oneshot(t->int_timer, attotime::never, which);
}
@@ -1024,7 +1024,7 @@ static void internal_timer_update(leland_sound_state *state, int which, int new_
internal_timer_sync(state, which);
/* nuke the timer and force the interrupt timer to be recomputed */
- timer_adjust_oneshot(t->time_timer, attotime_never, which);
+ timer_adjust_oneshot(t->time_timer, attotime::never, which);
t->time_timer_active = 0;
update_int_timer = 1;
}
@@ -1033,7 +1033,7 @@ static void internal_timer_update(leland_sound_state *state, int which, int new_
else if ((diff & 0x8000) && (new_control & 0x8000))
{
/* start the timing */
- timer_adjust_oneshot(t->time_timer, attotime_never, which);
+ timer_adjust_oneshot(t->time_timer, attotime::never, which);
t->time_timer_active = 1;
update_int_timer = 1;
}
@@ -1066,7 +1066,7 @@ static void internal_timer_update(leland_sound_state *state, int which, int new_
if (LOG_TIMER) logerror("Set interrupt timer for %d\n", which);
}
else
- timer_adjust_oneshot(t->int_timer, attotime_never, which);
+ timer_adjust_oneshot(t->int_timer, attotime::never, which);
}
}
@@ -1696,7 +1696,7 @@ static WRITE16_DEVICE_HANDLER( pit8254_w )
if (ctr->count == 0) ctr->count = 0x10000;
/* reset/start the timer */
- timer_adjust_oneshot(ctr->timer, attotime_never, 0);
+ timer_adjust_oneshot(ctr->timer, attotime::never, 0);
if (LOG_PIT) logerror("PIT counter %d set to %d (%d Hz)\n", which, ctr->count, 4000000 / ctr->count);
diff --git a/src/mame/audio/mcr.c b/src/mame/audio/mcr.c
index b8f3e250225..915a310679f 100644
--- a/src/mame/audio/mcr.c
+++ b/src/mame/audio/mcr.c
@@ -521,7 +521,7 @@ static TIMER_CALLBACK( csdeluxe_delayed_data_w )
/* oftentimes games will write one nibble at a time; the sync on this is very */
/* important, so we boost the interleave briefly while this happens */
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(100));
}
static READ16_DEVICE_HANDLER( csdeluxe_pia_r )
@@ -659,7 +659,7 @@ static TIMER_CALLBACK( soundsgood_delayed_data_w )
/* oftentimes games will write one nibble at a time; the sync on this is very */
/* important, so we boost the interleave briefly while this happens */
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(250));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(250));
}
@@ -763,7 +763,7 @@ static TIMER_CALLBACK( turbocs_delayed_data_w )
/* oftentimes games will write one nibble at a time; the sync on this is very */
/* important, so we boost the interleave briefly while this happens */
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(100));
}
diff --git a/src/mame/audio/n8080.c b/src/mame/audio/n8080.c
index bf4c9038fa3..5cc615fcf26 100644
--- a/src/mame/audio/n8080.c
+++ b/src/mame/audio/n8080.c
@@ -153,7 +153,7 @@ static void stop_mono_flop( device_t *sn, int n )
update_SN76477_status(sn);
- timer_adjust_oneshot(state->sound_timer[n], attotime_never, n);
+ timer_adjust_oneshot(state->sound_timer[n], attotime::never, n);
}
@@ -179,15 +179,15 @@ static void spacefev_sound_pins_changed( running_machine *machine )
}
if (changes & (1 << 0x3))
{
- start_mono_flop(sn, 0, ATTOTIME_IN_USEC(550 * 36 * 100));
+ start_mono_flop(sn, 0, attotime::from_usec(550 * 36 * 100));
}
if (changes & (1 << 0x6))
{
- start_mono_flop(sn, 1, ATTOTIME_IN_USEC(550 * 22 * 33));
+ start_mono_flop(sn, 1, attotime::from_usec(550 * 22 * 33));
}
if (changes & (1 << 0x4))
{
- start_mono_flop(sn, 2, ATTOTIME_IN_USEC(550 * 22 * 33));
+ start_mono_flop(sn, 2, attotime::from_usec(550 * 22 * 33));
}
if (changes & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5)))
{
@@ -208,11 +208,11 @@ static void sheriff_sound_pins_changed( running_machine *machine )
}
if (changes & (1 << 0x6))
{
- start_mono_flop(sn, 0, ATTOTIME_IN_USEC(550 * 33 * 33));
+ start_mono_flop(sn, 0, attotime::from_usec(550 * 33 * 33));
}
if (changes & (1 << 0x4))
{
- start_mono_flop(sn, 1, ATTOTIME_IN_USEC(550 * 33 * 33));
+ start_mono_flop(sn, 1, attotime::from_usec(550 * 33 * 33));
}
if (changes & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5)))
{
@@ -592,7 +592,7 @@ MACHINE_CONFIG_FRAGMENT( spacefev_sound )
MCFG_CPU_PROGRAM_MAP(n8080_sound_cpu_map)
MCFG_CPU_IO_MAP(n8080_sound_io_map)
- MCFG_TIMER_ADD_PERIODIC("vco_timer", spacefev_vco_voltage_timer, HZ(1000))
+ MCFG_TIMER_ADD_PERIODIC("vco_timer", spacefev_vco_voltage_timer, attotime::from_hz(1000))
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -632,7 +632,7 @@ MACHINE_CONFIG_FRAGMENT( helifire_sound )
MCFG_CPU_PROGRAM_MAP(n8080_sound_cpu_map)
MCFG_CPU_IO_MAP(helifire_sound_io_map)
- MCFG_TIMER_ADD_PERIODIC("helifire_dac", helifire_dac_volume_timer, HZ(1000) )
+ MCFG_TIMER_ADD_PERIODIC("helifire_dac", helifire_dac_volume_timer, attotime::from_hz(1000) )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/audio/namco52.c b/src/mame/audio/namco52.c
index 53d5bf79715..2522b3ecdde 100644
--- a/src/mame/audio/namco52.c
+++ b/src/mame/audio/namco52.c
@@ -154,7 +154,7 @@ WRITE8_DEVICE_HANDLER( namco_52xx_write )
/* the 52xx uses TSTI to check for an interrupt; it also may be handling
a timer interrupt, so we need to ensure the IRQ line is held long enough */
- timer_set(device->machine, ATTOTIME_IN_USEC(5*21), (void *)device, 0, namco_52xx_irq_clear);
+ timer_set(device->machine, attotime::from_usec(5*21), (void *)device, 0, namco_52xx_irq_clear);
}
diff --git a/src/mame/audio/namco54.c b/src/mame/audio/namco54.c
index 59d7dc004fc..7bb681e5bc4 100644
--- a/src/mame/audio/namco54.c
+++ b/src/mame/audio/namco54.c
@@ -129,7 +129,7 @@ WRITE8_DEVICE_HANDLER( namco_54xx_write )
// The input clock to the 06XX interface chip is 64H, that is
// 18432000/6/64 = 48kHz, so it makes sense for the irq line to be
// asserted for one clock cycle ~= 21us.
- timer_set(device->machine, ATTOTIME_IN_USEC(21), (void *)device, 0, namco_54xx_irq_clear);
+ timer_set(device->machine, attotime::from_usec(21), (void *)device, 0, namco_54xx_irq_clear);
}
diff --git a/src/mame/audio/segag80r.c b/src/mame/audio/segag80r.c
index 1e090543764..ed23f0495e3 100644
--- a/src/mame/audio/segag80r.c
+++ b/src/mame/audio/segag80r.c
@@ -520,14 +520,14 @@ INLINE void sega005_update_sound_data(running_machine *machine)
if ((diff & 0x20) && !(newval & 0x20))
{
//mame_printf_debug("Stopping timer\n");
- timer_adjust_oneshot(sega005_sound_timer, attotime_never, 0);
+ timer_adjust_oneshot(sega005_sound_timer, attotime::never, 0);
}
/* if bit 5 goes low, we start the timer again */
if ((diff & 0x20) && (newval & 0x20))
{
//mame_printf_debug("Starting timer\n");
- timer_adjust_periodic(sega005_sound_timer, ATTOTIME_IN_HZ(SEGA005_555_TIMER_FREQ), 0, ATTOTIME_IN_HZ(SEGA005_555_TIMER_FREQ));
+ timer_adjust_periodic(sega005_sound_timer, attotime::from_hz(SEGA005_555_TIMER_FREQ), 0, attotime::from_hz(SEGA005_555_TIMER_FREQ));
}
}
@@ -948,7 +948,7 @@ static WRITE8_DEVICE_HANDLER( n7751_command_w )
*/
n7751_command = data & 0x07;
cputag_set_input_line(device->machine, "audiocpu", 0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE);
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(100));
}
diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c
index 6fff0dfabe7..8909d8f34bc 100644
--- a/src/mame/audio/segasnd.c
+++ b/src/mame/audio/segasnd.c
@@ -359,7 +359,7 @@ WRITE8_HANDLER( sega_usb_data_w )
timer_call_after_resynch(space->machine, NULL, data, delayed_usb_data_w);
/* boost the interleave so that sequences can be sent */
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(250));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(250));
}
@@ -921,7 +921,7 @@ MACHINE_CONFIG_FRAGMENT( sega_universal_sound_board )
MCFG_CPU_PROGRAM_MAP(usb_map)
MCFG_CPU_IO_MAP(usb_portmap)
- MCFG_TIMER_ADD_PERIODIC("usb_timer", increment_t1_clock, HZ(USB_2MHZ_CLOCK / 256))
+ MCFG_TIMER_ADD_PERIODIC("usb_timer", increment_t1_clock, attotime::from_hz(USB_2MHZ_CLOCK / 256))
/* sound hardware */
MCFG_SOUND_ADD("usbsnd", USB, 0)
diff --git a/src/mame/audio/snes_snd.c b/src/mame/audio/snes_snd.c
index 8a60074342f..55458e1f3d2 100644
--- a/src/mame/audio/snes_snd.c
+++ b/src/mame/audio/snes_snd.c
@@ -1186,7 +1186,7 @@ WRITE8_DEVICE_HANDLER( spc_io_w )
case 0x7: /* Port 3 */
// mame_printf_debug("SPC: %02x to APU @ %d (PC=%x)\n", data, offset & 3, cpu_get_pc(space->cpu));
spc700->port_out[offset - 4] = data;
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(20));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(20));
break;
case 0xa: /* Timer 0 */
case 0xb: /* Timer 1 */
@@ -1321,13 +1321,13 @@ static DEVICE_START( snes_sound )
/* Initialize the timers */
spc700->timer[0] = timer_alloc(machine, snes_spc_timer, spc700);
- timer_adjust_periodic(spc700->timer[0], ATTOTIME_IN_HZ(8000), 0, ATTOTIME_IN_HZ(8000));
+ timer_adjust_periodic(spc700->timer[0], attotime::from_hz(8000), 0, attotime::from_hz(8000));
timer_enable(spc700->timer[0], 0);
spc700->timer[1] = timer_alloc(machine, snes_spc_timer, spc700);
- timer_adjust_periodic(spc700->timer[1], ATTOTIME_IN_HZ(8000), 1, ATTOTIME_IN_HZ(8000));
+ timer_adjust_periodic(spc700->timer[1], attotime::from_hz(8000), 1, attotime::from_hz(8000));
timer_enable(spc700->timer[1], 0);
spc700->timer[2] = timer_alloc(machine, snes_spc_timer, spc700);
- timer_adjust_periodic(spc700->timer[2], ATTOTIME_IN_HZ(64000), 2, ATTOTIME_IN_HZ(64000));
+ timer_adjust_periodic(spc700->timer[2], attotime::from_hz(64000), 2, attotime::from_hz(64000));
timer_enable(spc700->timer[2], 0);
state_register(device);
diff --git a/src/mame/audio/starwars.c b/src/mame/audio/starwars.c
index b8b83ac24b5..5efe8958e0a 100644
--- a/src/mame/audio/starwars.c
+++ b/src/mame/audio/starwars.c
@@ -86,7 +86,7 @@ static TIMER_CALLBACK( sound_callback )
starwars_state *state = machine->driver_data<starwars_state>();
riot6532_porta_in_set(state->riot, 0x40, 0x40);
state->main_data = param;
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(100));
}
@@ -133,7 +133,7 @@ static TIMER_CALLBACK( main_callback )
riot6532_porta_in_set(state->riot, 0x80, 0x80);
state->sound_data = param;
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(100));
}
WRITE8_HANDLER( starwars_main_wr_w )
diff --git a/src/mame/audio/turbo.c b/src/mame/audio/turbo.c
index dfdef156ca6..c1c6018661f 100644
--- a/src/mame/audio/turbo.c
+++ b/src/mame/audio/turbo.c
@@ -111,7 +111,7 @@ WRITE8_DEVICE_HANDLER( turbo_sound_a_w )
#else
if (((data ^ last_sound_a) & 0x1e) && (last_sound_a & 0x1e) != 0x1e)
- timer_set(space->machine, ATTOTIME_IN_HZ(20000), NULL, data, update_sound_a);
+ timer_set(space->machine, attotime::from_hz(20000), NULL, data, update_sound_a);
else
update_sound_a(data);
diff --git a/src/mame/audio/williams.c b/src/mame/audio/williams.c
index bea0585f3dd..6a2297ae067 100644
--- a/src/mame/audio/williams.c
+++ b/src/mame/audio/williams.c
@@ -649,7 +649,7 @@ static READ8_HANDLER( adpcm_command_r )
/* don't clear the external IRQ state for a short while; this allows the
self-tests to pass */
- timer_set(space->machine, ATTOTIME_IN_USEC(10), NULL, 0, clear_irq_state);
+ timer_set(space->machine, attotime::from_usec(10), NULL, 0, clear_irq_state);
return soundlatch_r(space, 0);
}
@@ -674,7 +674,7 @@ void williams_adpcm_data_w(int data)
{
cpu_set_input_line(sound_cpu, M6809_IRQ_LINE, ASSERT_LINE);
williams_sound_int_state = 1;
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(100));
}
}
diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c
index 122aa2918c4..51c77d3b23e 100644
--- a/src/mame/drivers/2mindril.c
+++ b/src/mame/drivers/2mindril.c
@@ -213,23 +213,23 @@ static WRITE16_HANDLER( sensors_w )
/*---- ---- ---- -x-- lamp*/
if (data & 1)
{
- //timer_set(space->machine, ATTOTIME_IN_SEC(2), NULL, 0x100, shutter_req );
+ //timer_set(space->machine, attotime::from_seconds(2), NULL, 0x100, shutter_req );
state->shutter_sensor = 0x100;
}
else if (data & 2)
{
- //timer_set( space->machine, ATTOTIME_IN_SEC(2), NULL, 0x200, shutter_req );
+ //timer_set( space->machine, attotime::from_seconds(2), NULL, 0x200, shutter_req );
state->shutter_sensor = 0x200;
}
if (data & 0x1000 || data & 0x4000)
{
- //timer_set( space->machine, ATTOTIME_IN_SEC(2), NULL, 0x800, defender_req );
+ //timer_set( space->machine, attotime::from_seconds(2), NULL, 0x800, defender_req );
state->defender_sensor = 0x800;
}
else if (data & 0x2000 || data & 0x8000)
{
- //timer_set( space->machine, ATTOTIME_IN_SEC(2), NULL, 0x400, defender_req );
+ //timer_set( space->machine, attotime::from_seconds(2), NULL, 0x400, defender_req );
state->defender_sensor = 0x400;
}
}
diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c
index cc62bd6cb55..a00ad642f57 100644
--- a/src/mame/drivers/39in1.c
+++ b/src/mame/drivers/39in1.c
@@ -255,7 +255,7 @@ static void pxa255_dma_load_descriptor_and_start(running_machine* machine, int c
// transfer is running before starting another one on the same channel.
if (timer_enabled(dma_regs->timer[channel]))
{
- timer_adjust_oneshot(dma_regs->timer[channel], attotime_never, 0);
+ timer_adjust_oneshot(dma_regs->timer[channel], attotime::never, 0);
}
// Load the next descriptor
diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c
index 6cb81eefb18..6a343ae5972 100644
--- a/src/mame/drivers/40love.c
+++ b/src/mame/drivers/40love.c
@@ -1083,7 +1083,7 @@ static MACHINE_CONFIG_START( 40love, fortyl_state )
MCFG_CPU_PROGRAM_MAP(buggychl_mcu_map)
MCFG_DEVICE_ADD("bmcu", BUGGYCHL_MCU, 0)
- MCFG_QUANTUM_TIME(HZ(6000)) /* high interleave to ensure proper synchronization of CPUs */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* high interleave to ensure proper synchronization of CPUs */
MCFG_MACHINE_START(40love)
MCFG_MACHINE_RESET(40love)
diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c
index 683e6e983a7..871db294785 100644
--- a/src/mame/drivers/8080bw.c
+++ b/src/mame/drivers/8080bw.c
@@ -2146,7 +2146,7 @@ MACHINE_CONFIG_DERIVED( vortex, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(vortex_io_map)
MCFG_MACHINE_START(extra_8080bw)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* video hardware */
// TODO: replace with modified invaders color renderer code allowing midscanline color writes
diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c
index accdb59d815..074b427cf7c 100644
--- a/src/mame/drivers/acefruit.c
+++ b/src/mame/drivers/acefruit.c
@@ -58,7 +58,7 @@ static VIDEO_START( acefruit )
static INTERRUPT_GEN( acefruit_vblank )
{
cpu_set_input_line(device, 0, HOLD_LINE );
- timer_adjust_oneshot( acefruit_refresh_timer, attotime_zero, 0 );
+ timer_adjust_oneshot( acefruit_refresh_timer, attotime::zero, 0 );
}
static VIDEO_UPDATE( acefruit )
diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c
index 42e30d6e05d..94b0eb602e2 100644
--- a/src/mame/drivers/airbustr.c
+++ b/src/mame/drivers/airbustr.c
@@ -648,11 +648,11 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
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_QUANTUM_TIME(HZ(6000)) // Palette RAM is filled by sub cpu with data supplied by main cpu
+ 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
MCFG_MACHINE_START(airbustr)
MCFG_MACHINE_RESET(airbustr)
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -685,7 +685,7 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( airbustrb, airbustr )
- MCFG_WATCHDOG_TIME_INIT(SEC(0)) // no protection device or watchdog
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(0)) // no protection device or watchdog
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c
index c6c55cde96e..0f773db97c9 100644
--- a/src/mame/drivers/ajax.c
+++ b/src/mame/drivers/ajax.c
@@ -218,7 +218,7 @@ static MACHINE_CONFIG_START( ajax, ajax_state )
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.58 MHz */
MCFG_CPU_PROGRAM_MAP(ajax_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(ajax)
MCFG_MACHINE_START(ajax)
diff --git a/src/mame/drivers/ampoker2.c b/src/mame/drivers/ampoker2.c
index db5230766b7..6248167ab1c 100644
--- a/src/mame/drivers/ampoker2.c
+++ b/src/mame/drivers/ampoker2.c
@@ -1170,7 +1170,7 @@ static MACHINE_CONFIG_START( ampoker2, ampoker2_state )
MCFG_CPU_PROGRAM_MAP(ampoker2_map)
MCFG_CPU_IO_MAP(ampoker2_io_map)
MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 1536)
- MCFG_WATCHDOG_TIME_INIT(MSEC(200)) /* 200 ms, measured */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(200)) /* 200 ms, measured */
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c
index 9e086b9fe47..c00153ea95c 100644
--- a/src/mame/drivers/angelkds.c
+++ b/src/mame/drivers/angelkds.c
@@ -618,7 +618,7 @@ static MACHINE_CONFIG_START( angelkds, angelkds_state )
MCFG_MACHINE_START(angelkds)
MCFG_MACHINE_RESET(angelkds)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/arabian.c b/src/mame/drivers/arabian.c
index 03552384005..c9fb9d7c54b 100644
--- a/src/mame/drivers/arabian.c
+++ b/src/mame/drivers/arabian.c
@@ -373,7 +373,7 @@ static MACHINE_CONFIG_START( arabian, arabian_state )
MCFG_CPU_ADD("mcu", MB8841, MAIN_OSC/3/2)
MCFG_CPU_IO_MAP(mcu_io_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(arabian)
MCFG_MACHINE_RESET(arabian)
diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c
index 99282edda45..6255e488b3f 100644
--- a/src/mame/drivers/argus.c
+++ b/src/mame/drivers/argus.c
@@ -544,7 +544,7 @@ static MACHINE_CONFIG_START( argus, driver_device )
MCFG_CPU_IO_MAP(sound_portmap_2)
#endif
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -598,7 +598,7 @@ static MACHINE_CONFIG_START( valtric, driver_device )
MCFG_CPU_PROGRAM_MAP(sound_map_a)
MCFG_CPU_IO_MAP(sound_portmap_2)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -643,7 +643,7 @@ static MACHINE_CONFIG_START( butasan, driver_device )
MCFG_CPU_PROGRAM_MAP(sound_map_b)
MCFG_CPU_IO_MAP(sound_portmap_2)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c
index 7a22d5aa388..96db82e708f 100644
--- a/src/mame/drivers/aristmk4.c
+++ b/src/mame/drivers/aristmk4.c
@@ -446,7 +446,7 @@ static READ8_DEVICE_HANDLER(via_b_r)
case 0x02:
ret=ret^0x20;
inscrd++;
- timer_set(device->machine, ATTOTIME_IN_MSEC(150), NULL, 0, coin_input_reset);
+ timer_set(device->machine, attotime::from_msec(150), NULL, 0, coin_input_reset);
break;
default:
@@ -460,7 +460,7 @@ static READ8_DEVICE_HANDLER(via_b_r)
{
case 0x00:
ret=ret^0x40;
- timer_set(device->machine, ATTOTIME_IN_MSEC(175), NULL, 0, hopper_reset);
+ timer_set(device->machine, attotime::from_msec(175), NULL, 0, hopper_reset);
hopper_motor=0x02;
break;
case 0x01:
diff --git a/src/mame/drivers/aristmk5.c b/src/mame/drivers/aristmk5.c
index d1b8fd17a7b..7bd9491fb2f 100644
--- a/src/mame/drivers/aristmk5.c
+++ b/src/mame/drivers/aristmk5.c
@@ -76,7 +76,7 @@ static READ32_HANDLER( ext_timer_latch_r )
{
/* reset 2KHz timer */
ioc_regs[IRQ_STATUS_A] &= 0xfe;
- timer_adjust_oneshot(mk5_2KHz_timer, ATTOTIME_IN_HZ(2000), 0);
+ timer_adjust_oneshot(mk5_2KHz_timer, attotime::from_hz(2000), 0);
return 0xffffffff; //value doesn't matter apparently
}
@@ -221,7 +221,7 @@ static TIMER_CALLBACK( mk5_2KHz_callback )
{
ioc_regs[4] |= 1;
- timer_adjust_oneshot(mk5_2KHz_timer, attotime_never, 0);
+ timer_adjust_oneshot(mk5_2KHz_timer, attotime::never, 0);
}
static MACHINE_START( aristmk5 )
@@ -237,7 +237,7 @@ static MACHINE_START( aristmk5 )
static MACHINE_RESET( aristmk5 )
{
archimedes_reset(machine);
- timer_adjust_oneshot(mk5_2KHz_timer, ATTOTIME_IN_HZ(2000), 0);
+ timer_adjust_oneshot(mk5_2KHz_timer, attotime::from_hz(2000), 0);
ioc_regs[IRQ_STATUS_B] |= 0x40; //hack, set keyboard irq empty to be ON
diff --git a/src/mame/drivers/arkanoid.c b/src/mame/drivers/arkanoid.c
index e87d64484b6..a0d072f3bd6 100644
--- a/src/mame/drivers/arkanoid.c
+++ b/src/mame/drivers/arkanoid.c
@@ -967,7 +967,7 @@ static MACHINE_CONFIG_START( arkanoid, arkanoid_state )
MCFG_CPU_ADD("mcu", M68705, XTAL_12MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(mcu_map)
- MCFG_QUANTUM_TIME(HZ(6000)) // 100 CPU slices per second to synchronize between the MCU and the main CPU
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per second to synchronize between the MCU and the main CPU
MCFG_MACHINE_START(arkanoid)
MCFG_MACHINE_RESET(arkanoid)
diff --git a/src/mame/drivers/artmagic.c b/src/mame/drivers/artmagic.c
index 7a46e15b809..56a29432ecd 100644
--- a/src/mame/drivers/artmagic.c
+++ b/src/mame/drivers/artmagic.c
@@ -161,7 +161,7 @@ static READ16_HANDLER( ultennis_hack_r )
{
hack_irq = 1;
update_irq_state(space->machine);
- timer_set(space->machine, ATTOTIME_IN_USEC(1), NULL, 0, irq_off);
+ timer_set(space->machine, attotime::from_usec(1), NULL, 0, irq_off);
}
return input_port_read(space->machine, "300000");
}
@@ -852,7 +852,7 @@ static MACHINE_CONFIG_START( artmagic, driver_device )
MCFG_MACHINE_START(artmagic)
MCFG_MACHINE_RESET(artmagic)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_NVRAM_ADD_1FILL("nvram")
/* video hardware */
diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c
index 20bcd9620f2..c83e6f70ce6 100644
--- a/src/mame/drivers/asterix.c
+++ b/src/mame/drivers/asterix.c
@@ -82,7 +82,7 @@ static WRITE8_HANDLER( sound_arm_nmi_w )
asterix_state *state = space->machine->driver_data<asterix_state>();
cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(space->machine, ATTOTIME_IN_USEC(5), NULL, 0, nmi_callback);
+ timer_set(space->machine, attotime::from_usec(5), NULL, 0, nmi_callback);
}
static WRITE16_HANDLER( sound_irq_w )
diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c
index 1a3bef172c9..37ff0ad5bfc 100644
--- a/src/mame/drivers/asuka.c
+++ b/src/mame/drivers/asuka.c
@@ -905,7 +905,7 @@ static MACHINE_CONFIG_START( bonzeadv, asuka_state )
MCFG_MACHINE_START(asuka)
MCFG_MACHINE_RESET(asuka)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -949,7 +949,7 @@ static MACHINE_CONFIG_START( asuka, asuka_state )
MCFG_MACHINE_START(asuka)
MCFG_MACHINE_RESET(asuka)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", asuka_io_intf)
@@ -1002,7 +1002,7 @@ static MACHINE_CONFIG_START( cadash, asuka_state )
MCFG_MACHINE_START(asuka)
MCFG_MACHINE_RESET(asuka)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", asuka_io_intf)
@@ -1047,7 +1047,7 @@ static MACHINE_CONFIG_START( mofflott, asuka_state )
MCFG_MACHINE_START(asuka)
MCFG_MACHINE_RESET(asuka)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", asuka_io_intf)
@@ -1096,7 +1096,7 @@ static MACHINE_CONFIG_START( galmedes, asuka_state )
MCFG_MACHINE_START(asuka)
MCFG_MACHINE_RESET(asuka)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", asuka_io_intf)
@@ -1141,7 +1141,7 @@ static MACHINE_CONFIG_START( eto, asuka_state )
MCFG_MACHINE_START(asuka)
MCFG_MACHINE_RESET(asuka)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", asuka_io_intf)
diff --git a/src/mame/drivers/atarisy1.c b/src/mame/drivers/atarisy1.c
index 97bae4198cf..668059c47f8 100644
--- a/src/mame/drivers/atarisy1.c
+++ b/src/mame/drivers/atarisy1.c
@@ -283,7 +283,7 @@ static READ16_HANDLER( joystick_r )
/* clear any existing interrupt and set a timer for a new one */
state->joystick_int = 0;
- state->joystick_timer->adjust(ATTOTIME_IN_USEC(50), newval);
+ state->joystick_timer->adjust(attotime::from_usec(50), newval);
atarigen_update_interrupts(space->machine);
return state->joystick_value;
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c
index e1090e6ff13..2309d0b341b 100644
--- a/src/mame/drivers/backfire.c
+++ b/src/mame/drivers/backfire.c
@@ -675,8 +675,8 @@ static READ32_HANDLER( backfire_speedup_r )
//mame_printf_debug( "%08x\n",cpu_get_pc(space->cpu));
- if (cpu_get_pc(space->cpu )== 0xce44) cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400)); // backfire
- if (cpu_get_pc(space->cpu) == 0xcee4) cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400)); // backfirea
+ if (cpu_get_pc(space->cpu )== 0xce44) cpu_spinuntil_time(space->cpu, attotime::from_usec(400)); // backfire
+ if (cpu_get_pc(space->cpu) == 0xcee4) cpu_spinuntil_time(space->cpu, attotime::from_usec(400)); // backfirea
return state->mainram[0x18/4];
}
diff --git a/src/mame/drivers/balsente.c b/src/mame/drivers/balsente.c
index e6c671d8b19..dbaeefc1754 100644
--- a/src/mame/drivers/balsente.c
+++ b/src/mame/drivers/balsente.c
@@ -1201,7 +1201,7 @@ static MACHINE_CONFIG_START( balsente, balsente_state )
MCFG_CPU_PROGRAM_MAP(cpu2_map)
MCFG_CPU_IO_MAP(cpu2_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(balsente)
MCFG_MACHINE_RESET(balsente)
@@ -1259,7 +1259,7 @@ static MACHINE_CONFIG_DERIVED( shrike, balsente )
MCFG_CPU_ADD("68k", M68000, 8000000)
MCFG_CPU_PROGRAM_MAP(shrike68k_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/baraduke.c b/src/mame/drivers/baraduke.c
index d084037d0e0..f6b5b2c5bc9 100644
--- a/src/mame/drivers/baraduke.c
+++ b/src/mame/drivers/baraduke.c
@@ -387,7 +387,7 @@ static MACHINE_CONFIG_START( baraduke, driver_device )
MCFG_CPU_IO_MAP(mcu_port_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* we need heavy synch */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/battlane.c b/src/mame/drivers/battlane.c
index 72f8e96100c..b09e2b3c9a5 100644
--- a/src/mame/drivers/battlane.c
+++ b/src/mame/drivers/battlane.c
@@ -303,7 +303,7 @@ static MACHINE_CONFIG_START( battlane, battlane_state )
MCFG_CPU_ADD("sub", M6809, 1500000) /* 1.5 MHz ? */
MCFG_CPU_PROGRAM_MAP(battlane_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(battlane)
MCFG_MACHINE_RESET(battlane)
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index 572e4704d15..364716bc97a 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -692,7 +692,7 @@ static void RunBlit(address_space *space)
} while (blitter.command & CMD_RUN);
/* Burn Z80 cycles while blitter is in operation */
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_NSEC( (1000000000 / Z80_XTAL)*cycles_used * 2 ) );
+ cpu_spinuntil_time(space->cpu, attotime::from_nsec( (1000000000 / Z80_XTAL)*cycles_used * 2 ) );
}
diff --git a/src/mame/drivers/bfm_sc2.c b/src/mame/drivers/bfm_sc2.c
index b24e11678a7..6034d6ae085 100644
--- a/src/mame/drivers/bfm_sc2.c
+++ b/src/mame/drivers/bfm_sc2.c
@@ -2184,7 +2184,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( scorpion2_vid, driver_device )
MCFG_MACHINE_RESET( init ) // main scorpion2 board initialisation
- MCFG_QUANTUM_TIME(HZ(960)) // needed for serial communication !!
+ 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
@@ -3965,7 +3965,7 @@ MACHINE_CONFIG_END
/* machine driver for scorpion2 board + matrix board */
static MACHINE_CONFIG_START( scorpion2_dm01, driver_device )
MCFG_MACHINE_RESET(dm01_init)
- MCFG_QUANTUM_TIME(HZ(960)) // needed for serial communication !!
+ MCFG_QUANTUM_TIME(attotime::from_hz(960)) // needed for serial communication !!
MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 )
MCFG_CPU_PROGRAM_MAP(memmap_sc2_dm01)
MCFG_CPU_PERIODIC_INT(timer_irq, 1000 )
diff --git a/src/mame/drivers/bigevglf.c b/src/mame/drivers/bigevglf.c
index 9d19def0f80..44aa0b8c19f 100644
--- a/src/mame/drivers/bigevglf.c
+++ b/src/mame/drivers/bigevglf.c
@@ -525,7 +525,7 @@ static MACHINE_CONFIG_START( bigevglf, bigevglf_state )
MCFG_CPU_ADD("mcu", M68705,2000000) /* ??? */
MCFG_CPU_PROGRAM_MAP(m68705_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - interleaving is forced on the fly */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - interleaving is forced on the fly */
MCFG_MACHINE_START(bigevglf)
MCFG_MACHINE_RESET(bigevglf)
diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c
index ea9c04d9355..c6767d6fa88 100644
--- a/src/mame/drivers/bking.c
+++ b/src/mame/drivers/bking.c
@@ -536,7 +536,7 @@ static MACHINE_CONFIG_DERIVED( bking3, bking )
MCFG_MACHINE_START(bking3)
MCFG_MACHINE_RESET(bking3)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c
index fed7c2cc518..7b8fec4da50 100644
--- a/src/mame/drivers/bladestl.c
+++ b/src/mame/drivers/bladestl.c
@@ -343,7 +343,7 @@ static MACHINE_CONFIG_START( bladestl, bladestl_state )
MCFG_CPU_ADD("audiocpu", M6809, 2000000)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(bladestl)
MCFG_MACHINE_RESET(bladestl)
diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c
index e8ace183b50..de5e5ca6cf1 100644
--- a/src/mame/drivers/blitz68k.c
+++ b/src/mame/drivers/blitz68k.c
@@ -1737,7 +1737,7 @@ static MACHINE_CONFIG_DERIVED( steaser, ilpag )
MCFG_CPU_PROGRAM_MAP(steaser_map)
MCFG_CPU_VBLANK_INT_HACK(steaser_irq,4)
- MCFG_TIMER_ADD_PERIODIC("coinsim", steaser_mcu_sim, HZ(10000)) // not real, but for simulating the MCU
+ MCFG_TIMER_ADD_PERIODIC("coinsim", steaser_mcu_sim, attotime::from_hz(10000)) // not real, but for simulating the MCU
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( cjffruit, blitz68k_state )
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index 629a13e0097..e6a665176fc 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -1334,7 +1334,7 @@ static MACHINE_CONFIG_START( bnstars, driver_device )
// MCFG_CPU_ADD("audiocpu", Z80, 4000000)
// MCFG_CPU_PROGRAM_MAP(bnstars_z80_map)
- MCFG_QUANTUM_TIME(HZ(60000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000))
MCFG_MACHINE_RESET(ms32)
diff --git a/src/mame/drivers/btoads.c b/src/mame/drivers/btoads.c
index 9a5481d2473..95274e89e2b 100644
--- a/src/mame/drivers/btoads.c
+++ b/src/mame/drivers/btoads.c
@@ -66,7 +66,7 @@ static TIMER_CALLBACK( delayed_sound_w )
cpu_triggerint(machine->device("audiocpu"));
/* use a timer to make long transfers faster */
- timer_set(machine, ATTOTIME_IN_USEC(50), NULL, 0, 0);
+ timer_set(machine, attotime::from_usec(50), NULL, 0, 0);
}
diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c
index 3f7187d5d0d..f8615233b0b 100644
--- a/src/mame/drivers/bublbobl.c
+++ b/src/mame/drivers/bublbobl.c
@@ -778,7 +778,7 @@ static MACHINE_CONFIG_START( tokio, bublbobl_state )
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
- MCFG_QUANTUM_TIME(HZ(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
MCFG_MACHINE_START(tokio)
MCFG_MACHINE_RESET(tokio)
@@ -863,7 +863,7 @@ static MACHINE_CONFIG_START( bublbobl, bublbobl_state )
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_QUANTUM_TIME(HZ(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
MCFG_MACHINE_START(bublbobl)
MCFG_MACHINE_RESET(bublbobl)
diff --git a/src/mame/drivers/bwing.c b/src/mame/drivers/bwing.c
index b0ea2243119..f4fe1d2c60c 100644
--- a/src/mame/drivers/bwing.c
+++ b/src/mame/drivers/bwing.c
@@ -430,7 +430,7 @@ static MACHINE_CONFIG_START( bwing, bwing_state )
MCFG_CPU_IO_MAP(bwp3_io_map)
MCFG_CPU_PERIODIC_INT(bwp3_interrupt, 1000)
- MCFG_QUANTUM_TIME(HZ(18000)) // high enough?
+ MCFG_QUANTUM_TIME(attotime::from_hz(18000)) // high enough?
MCFG_MACHINE_START(bwing)
MCFG_MACHINE_RESET(bwing)
diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c
index 3d9e1150aac..c7725599d4c 100644
--- a/src/mame/drivers/cabal.c
+++ b/src/mame/drivers/cabal.c
@@ -109,7 +109,7 @@ static WRITE16_HANDLER( cabal_sound_irq_trigger_word_w )
seibu_main_word_w(space,4,data,mem_mask);
/* spin for a while to let the Z80 read the command, otherwise coins "stick" */
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(50));
}
static WRITE16_HANDLER( cabalbl_sound_irq_trigger_word_w )
@@ -547,7 +547,7 @@ static MACHINE_CONFIG_START( cabalbl, cabal_state )
MCFG_CPU_IO_MAP(cabalbl_talk2_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_hold,8000)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(cabalbl)
diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c
index bacf639a2e5..63e50abff43 100644
--- a/src/mame/drivers/cave.c
+++ b/src/mame/drivers/cave.c
@@ -126,8 +126,8 @@ static TIMER_CALLBACK( cave_vblank_end )
static INTERRUPT_GEN( cave_interrupt )
{
cave_state *state = device->machine->driver_data<cave_state>();
- timer_set(device->machine, ATTOTIME_IN_USEC(17376 - state->time_vblank_irq), NULL, 0, cave_vblank_start);
- timer_set(device->machine, ATTOTIME_IN_USEC(17376 - state->time_vblank_irq + 2000), NULL, 0, cave_vblank_end);
+ timer_set(device->machine, attotime::from_usec(17376 - state->time_vblank_irq), NULL, 0, cave_vblank_start);
+ timer_set(device->machine, attotime::from_usec(17376 - state->time_vblank_irq + 2000), NULL, 0, cave_vblank_end);
}
/* Called by the YMZ280B to set the IRQ state */
@@ -227,7 +227,7 @@ static WRITE16_HANDLER( sound_cmd_w )
// state->sound_flag2 = 1;
soundlatch_word_w(space, offset, data, mem_mask);
cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, PULSE_LINE);
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50)); // Allow the other cpu to reply
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(50)); // Allow the other cpu to reply
}
/* Sound CPU: read the low 8 bits of the 16 bit sound latch */
@@ -2209,7 +2209,7 @@ static MACHINE_CONFIG_START( mazinger, cave_state )
MCFG_CPU_PROGRAM_MAP(mazinger_sound_map)
MCFG_CPU_IO_MAP(mazinger_sound_portmap)
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START(cave)
MCFG_MACHINE_RESET(cave)
@@ -2265,7 +2265,7 @@ static MACHINE_CONFIG_START( metmqstr, cave_state )
MCFG_CPU_PROGRAM_MAP(metmqstr_sound_map)
MCFG_CPU_IO_MAP(metmqstr_sound_portmap)
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START(cave)
MCFG_MACHINE_RESET(cave) /* start with the watchdog armed */
@@ -2317,7 +2317,7 @@ static MACHINE_CONFIG_START( pacslot, cave_state )
MCFG_CPU_PROGRAM_MAP(pacslot_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START(cave)
MCFG_MACHINE_RESET(cave)
@@ -2435,7 +2435,7 @@ static MACHINE_CONFIG_START( sailormn, cave_state )
MCFG_CPU_PROGRAM_MAP(sailormn_sound_map)
MCFG_CPU_IO_MAP(sailormn_sound_portmap)
-// MCFG_QUANTUM_TIME(HZ(600))
+// MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(cave)
MCFG_MACHINE_RESET(cave)
@@ -2486,7 +2486,7 @@ static MACHINE_CONFIG_START( tjumpman, cave_state )
MCFG_CPU_PROGRAM_MAP(tjumpman_map)
MCFG_CPU_VBLANK_INT("screen", cave_interrupt)
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START(cave)
MCFG_MACHINE_RESET(cave)
diff --git a/src/mame/drivers/champbas.c b/src/mame/drivers/champbas.c
index f3d308e2dcb..41bd2161d49 100644
--- a/src/mame/drivers/champbas.c
+++ b/src/mame/drivers/champbas.c
@@ -582,7 +582,7 @@ static MACHINE_START( exctsccr )
state->audiocpu = machine->device("audiocpu");
// FIXME
- timer_pulse(machine, ATTOTIME_IN_HZ(75), NULL, 0, exctsccr_fm_callback); /* updates fm */
+ timer_pulse(machine, attotime::from_hz(75), NULL, 0, exctsccr_fm_callback); /* updates fm */
MACHINE_START_CALL(champbas);
}
@@ -682,7 +682,7 @@ static MACHINE_CONFIG_DERIVED( champmcu, champbas )
MCFG_CPU_PROGRAM_MAP(mcu_map)
/* to MCU timeout champbbj */
- MCFG_QUANTUM_TIME(HZ(3000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(3000))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/chihiro.c b/src/mame/drivers/chihiro.c
index a8fdbb5c2cb..a2d6ed62de4 100644
--- a/src/mame/drivers/chihiro.c
+++ b/src/mame/drivers/chihiro.c
@@ -305,7 +305,7 @@ static MACHINE_CONFIG_START( chihiro_base, driver_device )
MCFG_CPU_PROGRAM_MAP(xbox_map)
MCFG_CPU_IO_MAP(xbox_map_io)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_PCI_BUS_ADD("pcibus", 0)
MCFG_PCI_BUS_DEVICE(0, "PCI Bridge Device - Host Bridge", dummy_pci_r, dummy_pci_w)
diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c
index 7358eb6c498..f688a68becd 100644
--- a/src/mame/drivers/chinagat.c
+++ b/src/mame/drivers/chinagat.c
@@ -581,7 +581,7 @@ static MACHINE_CONFIG_START( chinagat, ddragon_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* heavy interleaving to sync up sprite<->main cpu's */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* heavy interleaving to sync up sprite<->main cpu's */
MCFG_MACHINE_START(chinagat)
MCFG_MACHINE_RESET(chinagat)
@@ -626,7 +626,7 @@ static MACHINE_CONFIG_START( saiyugoub1, ddragon_state )
MCFG_CPU_PROGRAM_MAP(i8748_map)
MCFG_CPU_IO_MAP(i8748_portmap)
- MCFG_QUANTUM_TIME(HZ(6000)) /* heavy interleaving to sync up sprite<->main cpu's */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* heavy interleaving to sync up sprite<->main cpu's */
MCFG_MACHINE_START(chinagat)
MCFG_MACHINE_RESET(chinagat)
@@ -668,7 +668,7 @@ static MACHINE_CONFIG_START( saiyugoub2, ddragon_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* 3.579545 MHz oscillator */
MCFG_CPU_PROGRAM_MAP(ym2203c_sound_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* heavy interleaving to sync up sprite<->main cpu's */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* heavy interleaving to sync up sprite<->main cpu's */
MCFG_MACHINE_START(chinagat)
MCFG_MACHINE_RESET(chinagat)
diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c
index 08b9305bd0f..509678c04d2 100644
--- a/src/mame/drivers/chqflag.c
+++ b/src/mame/drivers/chqflag.c
@@ -395,7 +395,7 @@ static MACHINE_CONFIG_START( chqflag, chqflag_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(chqflag_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(chqflag)
MCFG_MACHINE_RESET(chqflag)
diff --git a/src/mame/drivers/cidelsa.c b/src/mame/drivers/cidelsa.c
index 6b8f69bcc0a..db7100e3d17 100644
--- a/src/mame/drivers/cidelsa.c
+++ b/src/mame/drivers/cidelsa.c
@@ -471,7 +471,7 @@ void cidelsa_state::machine_reset()
{
/* reset the CPU */
m_reset = 0;
- timer_set(&m_machine, ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
+ timer_set(&m_machine, attotime::from_msec(200), NULL, 0, set_cpu_mode);
}
/* Machine Drivers */
diff --git a/src/mame/drivers/cischeat.c b/src/mame/drivers/cischeat.c
index 5ec830ff6c9..389e78a0ff9 100644
--- a/src/mame/drivers/cischeat.c
+++ b/src/mame/drivers/cischeat.c
@@ -1584,7 +1584,7 @@ static MACHINE_CONFIG_START( bigrun, driver_device )
MCFG_CPU_PROGRAM_MAP(bigrun_sound_map)
MCFG_CPU_VBLANK_INT_HACK(irq4_line_hold,CISCHEAT_SOUND_INTERRUPT_NUM)
- MCFG_QUANTUM_TIME(HZ(1200))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1200))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK | VIDEO_HAS_SHADOWS)
diff --git a/src/mame/drivers/cloak.c b/src/mame/drivers/cloak.c
index de882ec7ca2..dbb4a25eb54 100644
--- a/src/mame/drivers/cloak.c
+++ b/src/mame/drivers/cloak.c
@@ -341,7 +341,7 @@ static MACHINE_CONFIG_START( cloak, cloak_state )
MCFG_CPU_PROGRAM_MAP(slave_map)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 2)
- MCFG_QUANTUM_TIME(HZ(1000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1000))
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c
index 72bde586dbd..85bb2e601da 100644
--- a/src/mame/drivers/cntsteer.c
+++ b/src/mame/drivers/cntsteer.c
@@ -890,7 +890,7 @@ static MACHINE_CONFIG_START( cntsteer, cntsteer_state )
MCFG_SCREEN_SIZE(256, 256)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_GFXDECODE(cntsteer)
MCFG_PALETTE_LENGTH(256)
@@ -927,7 +927,7 @@ static MACHINE_CONFIG_START( zerotrgt, cntsteer_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_PERIODIC_INT(sound_interrupt, 480)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(zerotrgt)
MCFG_MACHINE_RESET(zerotrgt)
diff --git a/src/mame/drivers/cojag.c b/src/mame/drivers/cojag.c
index c82dea4944c..0132ba4c956 100644
--- a/src/mame/drivers/cojag.c
+++ b/src/mame/drivers/cojag.c
@@ -595,7 +595,7 @@ static TIMER_CALLBACK( gpu_sync_timer )
cojag_state *state = machine->driver_data<cojag_state>();
/* if a command is still pending, and we haven't maxed out our timer, set a new one */
if (state->gpu_command_pending && param < 1000)
- timer_set(machine, ATTOTIME_IN_USEC(50), NULL, ++param, gpu_sync_timer);
+ timer_set(machine, attotime::from_usec(50), NULL, ++param, gpu_sync_timer);
}
diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c
index 554d3d48e73..47f74217374 100644
--- a/src/mame/drivers/combatsc.c
+++ b/src/mame/drivers/combatsc.c
@@ -366,12 +366,12 @@ static READ8_DEVICE_HANDLER ( combatsc_ym2203_r )
if (state->boost)
{
state->boost = 0;
- timer_adjust_periodic(state->interleave_timer, attotime_zero, 0, state->audiocpu->cycles_to_attotime(80));
+ timer_adjust_periodic(state->interleave_timer, attotime::zero, 0, state->audiocpu->cycles_to_attotime(80));
}
else if (status & 2)
{
state->boost = 1;
- timer_adjust_oneshot(state->interleave_timer, attotime_zero, 0);
+ timer_adjust_oneshot(state->interleave_timer, attotime::zero, 0);
}
}
@@ -744,7 +744,7 @@ static MACHINE_CONFIG_START( combatsc, combatsc_state )
MCFG_CPU_ADD("audiocpu", Z80,3579545) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(combatsc_sound_map)
- MCFG_QUANTUM_TIME(HZ(1200))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1200))
MCFG_MACHINE_START(combatsc)
MCFG_MACHINE_RESET(combatsc)
@@ -789,7 +789,7 @@ static MACHINE_CONFIG_START( combatscb, combatsc_state )
MCFG_CPU_ADD("audiocpu", Z80,3579545) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(combatsc_sound_map) /* FAKE */
- MCFG_QUANTUM_TIME(HZ(1200))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1200))
MCFG_MACHINE_START(combatsc)
MCFG_MACHINE_RESET(combatsc)
diff --git a/src/mame/drivers/contra.c b/src/mame/drivers/contra.c
index 941e9b74c5d..6b35df9d1f4 100644
--- a/src/mame/drivers/contra.c
+++ b/src/mame/drivers/contra.c
@@ -191,7 +191,7 @@ static MACHINE_CONFIG_START( contra, contra_state )
MCFG_CPU_ADD("audiocpu", M6809, XTAL_24MHz/12) /* 2000000? */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(contra)
diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c
index d254b75a549..c7bc107b968 100644
--- a/src/mame/drivers/coolpool.c
+++ b/src/mame/drivers/coolpool.c
@@ -177,7 +177,7 @@ static WRITE16_HANDLER( nvram_thrash_w )
{
nvram_write_enable = 1;
timer_device *nvram_timer = space->machine->device<timer_device>("nvram_timer");
- nvram_timer->adjust(ATTOTIME_IN_MSEC(1000));
+ nvram_timer->adjust(attotime::from_msec(1000));
}
}
@@ -477,7 +477,7 @@ static TIMER_CALLBACK( deferred_iop_w )
cputag_set_input_line(machine, "dsp", 0, HOLD_LINE); /* ??? I have no idea who should generate this! */
/* the DSP polls the status bit so it isn't strictly */
/* necessary to also have an IRQ */
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(50));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(50));
}
diff --git a/src/mame/drivers/crgolf.c b/src/mame/drivers/crgolf.c
index 4b450a0b418..3134a17f58c 100644
--- a/src/mame/drivers/crgolf.c
+++ b/src/mame/drivers/crgolf.c
@@ -395,7 +395,7 @@ static MACHINE_CONFIG_START( crgolf, crgolf_state )
MCFG_MACHINE_START(crgolf)
MCFG_MACHINE_RESET(crgolf)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_FRAGMENT_ADD(crgolf_video)
diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c
index 3a172ae788f..fbb56cb2a6c 100644
--- a/src/mame/drivers/crystal.c
+++ b/src/mame/drivers/crystal.c
@@ -609,7 +609,7 @@ static MACHINE_RESET( crystal )
for (i = 0; i < 4; i++)
{
state->Timerctrl[i] = 0;
- timer_adjust_oneshot(state->Timer[i], attotime_never, 0);
+ timer_adjust_oneshot(state->Timer[i], attotime::never, 0);
}
vr0_snd_set_areas(machine->device("vrender"), state->textureram, state->frameram);
diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c
index 1f06d671e2d..5bd939cdd43 100644
--- a/src/mame/drivers/cubeqst.c
+++ b/src/mame/drivers/cubeqst.c
@@ -510,7 +510,7 @@ static MACHINE_CONFIG_START( cubeqst, driver_device )
MCFG_CPU_PROGRAM_MAP(line_sound_map)
MCFG_CPU_CONFIG(snd_config)
- MCFG_QUANTUM_TIME(HZ(48000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(48000))
MCFG_MACHINE_START(cubeqst)
MCFG_MACHINE_RESET(cubeqst)
diff --git a/src/mame/drivers/cvs.c b/src/mame/drivers/cvs.c
index 75a0f354db1..65cd74cb846 100644
--- a/src/mame/drivers/cvs.c
+++ b/src/mame/drivers/cvs.c
@@ -322,7 +322,7 @@ static void start_393hz_timer(running_machine *machine)
{
cvs_state *state = machine->driver_data<cvs_state>();
state->cvs_393hz_timer = timer_alloc(machine, cvs_393hz_timer_cb, NULL);
- timer_adjust_periodic(state->cvs_393hz_timer, ATTOTIME_IN_HZ(30*393), 0, ATTOTIME_IN_HZ(30*393));
+ timer_adjust_periodic(state->cvs_393hz_timer, attotime::from_hz(30*393), 0, attotime::from_hz(30*393));
}
diff --git a/src/mame/drivers/cyberbal.c b/src/mame/drivers/cyberbal.c
index 00ce8ac03e4..8cda2416d42 100644
--- a/src/mame/drivers/cyberbal.c
+++ b/src/mame/drivers/cyberbal.c
@@ -447,7 +447,7 @@ static MACHINE_CONFIG_START( cyberbal, cyberbal_state )
MCFG_CPU_PROGRAM_MAP(sound_68k_map)
MCFG_CPU_PERIODIC_INT(cyberbal_sound_68k_irq_gen, 10000)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(cyberbal)
MCFG_MACHINE_RESET(cyberbal)
diff --git a/src/mame/drivers/cybertnk.c b/src/mame/drivers/cybertnk.c
index 497dff2bd9b..48fe5ebe4ef 100644
--- a/src/mame/drivers/cybertnk.c
+++ b/src/mame/drivers/cybertnk.c
@@ -848,7 +848,7 @@ static MACHINE_CONFIG_START( cybertnk, driver_device )
MCFG_CPU_ADD("audiocpu", Z80,3579500)
MCFG_CPU_PROGRAM_MAP(sound_mem)
- MCFG_QUANTUM_TIME(HZ(6000))//arbitrary value,needed to get the communication to work
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))//arbitrary value,needed to get the communication to work
/* video hardware */
MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c
index c3806c912c4..b4e35bf175b 100644
--- a/src/mame/drivers/darius.c
+++ b/src/mame/drivers/darius.c
@@ -948,7 +948,7 @@ static MACHINE_CONFIG_START( darius, darius_state )
MCFG_CPU_PROGRAM_MAP(darius_sound2_map)
MCFG_CPU_IO_MAP(darius_sound2_io_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame ? */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame ? */
MCFG_MACHINE_START(darius)
MCFG_MACHINE_RESET(darius)
diff --git a/src/mame/drivers/dassault.c b/src/mame/drivers/dassault.c
index 6568f91e669..0bf4ef0568f 100644
--- a/src/mame/drivers/dassault.c
+++ b/src/mame/drivers/dassault.c
@@ -565,7 +565,7 @@ static MACHINE_CONFIG_START( dassault, dassault_state )
MCFG_CPU_ADD("audiocpu", H6280,32220000/8) /* Accurate */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(8400)) /* 140 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(8400)) /* 140 CPU slices per frame */
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM)
diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c
index a7b44a63c95..47cc8930c8f 100644
--- a/src/mame/drivers/dblewing.c
+++ b/src/mame/drivers/dblewing.c
@@ -741,7 +741,7 @@ static MACHINE_CONFIG_START( dblewing, dblewing_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_IO_MAP(sound_io)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(dblewing)
MCFG_MACHINE_RESET(dblewing)
diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c
index 36a05927449..817ae0c443f 100644
--- a/src/mame/drivers/ddayjlc.c
+++ b/src/mame/drivers/ddayjlc.c
@@ -517,7 +517,7 @@ static MACHINE_CONFIG_START( ddayjlc, ddayjlc_state )
MCFG_CPU_PROGRAM_MAP(sound_cpu)
MCFG_CPU_VBLANK_INT("screen", ddayjlc_snd_interrupt)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(ddayjlc)
MCFG_MACHINE_RESET(ddayjlc)
diff --git a/src/mame/drivers/ddealer.c b/src/mame/drivers/ddealer.c
index bee29a61fe9..fdb6c37e6d0 100644
--- a/src/mame/drivers/ddealer.c
+++ b/src/mame/drivers/ddealer.c
@@ -639,7 +639,7 @@ static MACHINE_CONFIG_START( ddealer, ddealer_state )
MCFG_VIDEO_START(ddealer)
MCFG_VIDEO_UPDATE(ddealer)
- MCFG_TIMER_ADD_PERIODIC("coinsim", ddealer_mcu_sim, HZ(10000)) // not real, but for simulating the MCU
+ MCFG_TIMER_ADD_PERIODIC("coinsim", ddealer_mcu_sim, attotime::from_hz(10000)) // not real, but for simulating the MCU
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 6000000 / 4)//guess
diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c
index 1ed13daba6e..0f0228eee17 100644
--- a/src/mame/drivers/ddragon.c
+++ b/src/mame/drivers/ddragon.c
@@ -987,7 +987,7 @@ static MACHINE_CONFIG_START( ddragon, ddragon_state )
MCFG_CPU_ADD("soundcpu", M6809, MAIN_CLOCK / 8) /* 1.5 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(60000)) /* heavy interleaving to sync up sprite<->main cpu's */
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000)) /* heavy interleaving to sync up sprite<->main cpu's */
MCFG_MACHINE_START(ddragon)
MCFG_MACHINE_RESET(ddragon)
@@ -1051,7 +1051,7 @@ static MACHINE_CONFIG_START( ddragon6809, ddragon_state )
MCFG_CPU_ADD("soundcpu", M6809, MAIN_CLOCK / 8) /* 1.5 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(60000)) /* heavy interleaving to sync up sprite<->main cpu's */
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000)) /* heavy interleaving to sync up sprite<->main cpu's */
MCFG_MACHINE_START(ddragon)
MCFG_MACHINE_RESET(ddragon)
@@ -1098,7 +1098,7 @@ static MACHINE_CONFIG_START( ddragon2, ddragon_state )
MCFG_CPU_ADD("soundcpu", Z80, 3579545)
MCFG_CPU_PROGRAM_MAP(dd2_sound_map)
- MCFG_QUANTUM_TIME(HZ(60000)) /* heavy interleaving to sync up sprite<->main cpu's */
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000)) /* heavy interleaving to sync up sprite<->main cpu's */
MCFG_MACHINE_START(ddragon)
MCFG_MACHINE_RESET(ddragon)
diff --git a/src/mame/drivers/ddribble.c b/src/mame/drivers/ddribble.c
index 587e737383e..d494f67d20f 100644
--- a/src/mame/drivers/ddribble.c
+++ b/src/mame/drivers/ddribble.c
@@ -296,7 +296,7 @@ static MACHINE_CONFIG_START( ddribble, ddribble_state )
MCFG_CPU_ADD("cpu2", M6809, XTAL_18_432MHz/12) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(cpu2_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* we need heavy synch */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */
MCFG_MACHINE_START(ddribble)
MCFG_MACHINE_RESET(ddribble)
diff --git a/src/mame/drivers/deadang.c b/src/mame/drivers/deadang.c
index a7fc096f67f..6ee84d44734 100644
--- a/src/mame/drivers/deadang.c
+++ b/src/mame/drivers/deadang.c
@@ -230,7 +230,7 @@ static MACHINE_CONFIG_START( deadang, deadang_state )
SEIBU3A_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4)
- MCFG_QUANTUM_TIME(HZ(60)) // the game stops working with higher interleave rates..
+ MCFG_QUANTUM_TIME(attotime::from_hz(60)) // the game stops working with higher interleave rates..
MCFG_MACHINE_RESET(seibu_sound)
diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c
index 51afdd30337..572ff043e24 100644
--- a/src/mame/drivers/dec0.c
+++ b/src/mame/drivers/dec0.c
@@ -1325,7 +1325,7 @@ static MACHINE_CONFIG_START( robocop, driver_device )
MCFG_CPU_ADD("sub", H6280, XTAL_21_4772MHz / 16)
MCFG_CPU_PROGRAM_MAP(robocop_sub_map)
- MCFG_QUANTUM_TIME(HZ(3000)) /* Interleave between HuC6280 & 68000 */
+ MCFG_QUANTUM_TIME(attotime::from_hz(3000)) /* Interleave between HuC6280 & 68000 */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1412,7 +1412,7 @@ static MACHINE_CONFIG_START( hippodrm, driver_device )
MCFG_CPU_ADD("sub", H6280, XTAL_21_4772MHz / 16)
MCFG_CPU_PROGRAM_MAP(hippodrm_sub_map)
- MCFG_QUANTUM_TIME(HZ(300)) /* Interleave between H6280 & 68000 */
+ MCFG_QUANTUM_TIME(attotime::from_hz(300)) /* Interleave between H6280 & 68000 */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/dec8.c b/src/mame/drivers/dec8.c
index 23c9f415273..f7ad74c61ff 100644
--- a/src/mame/drivers/dec8.c
+++ b/src/mame/drivers/dec8.c
@@ -2172,7 +2172,7 @@ static MACHINE_CONFIG_START( oscar, dec8_state )
MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz/8)
MCFG_CPU_PROGRAM_MAP(oscar_s_map)
/* NMIs are caused by the main CPU */
- MCFG_QUANTUM_TIME(HZ(2400)) /* 40 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(2400)) /* 40 CPU slices per frame */
MCFG_MACHINE_START(dec8)
MCFG_MACHINE_RESET(dec8)
@@ -2219,7 +2219,7 @@ static MACHINE_CONFIG_START( lastmisn, dec8_state )
MCFG_CPU_ADD("audiocpu", M6502, 1500000)
MCFG_CPU_PROGRAM_MAP(ym3526_s_map)
/* NMIs are caused by the main CPU */
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_START(dec8)
MCFG_MACHINE_RESET(dec8)
@@ -2266,7 +2266,7 @@ static MACHINE_CONFIG_START( shackled, dec8_state )
MCFG_CPU_ADD("audiocpu", M6502, 1500000)
MCFG_CPU_PROGRAM_MAP(ym3526_s_map)
/* NMIs are caused by the main CPU */
- MCFG_QUANTUM_TIME(HZ(4800))
+ MCFG_QUANTUM_TIME(attotime::from_hz(4800))
MCFG_MACHINE_START(dec8)
MCFG_MACHINE_RESET(dec8)
@@ -2314,7 +2314,7 @@ static MACHINE_CONFIG_START( csilver, dec8_state )
MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz/8) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(csilver_s_map)
/* NMIs are caused by the main CPU */
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(dec8)
MCFG_MACHINE_RESET(dec8)
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index 23a78dad5a9..f8a95ed1935 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -1950,7 +1950,7 @@ static MACHINE_CONFIG_START( nslasher, driver_device )
MCFG_CPU_PROGRAM_MAP(nslasher_sound)
MCFG_CPU_IO_MAP(nslasher_io_sound)
- MCFG_QUANTUM_TIME(HZ(6000)) /* to improve main<->audio comms */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* to improve main<->audio comms */
MCFG_EEPROM_93C46_ADD("eeprom")
diff --git a/src/mame/drivers/decocass.c b/src/mame/drivers/decocass.c
index 35d1021796b..46812aa886d 100644
--- a/src/mame/drivers/decocass.c
+++ b/src/mame/drivers/decocass.c
@@ -639,7 +639,7 @@ static MACHINE_CONFIG_START( decocass, decocass_state )
MCFG_CPU_ADD("mcu", I8041, HCLK)
MCFG_CPU_IO_MAP(decocass_mcu_portmap)
- MCFG_QUANTUM_TIME(HZ(4200)) /* interleave CPUs */
+ MCFG_QUANTUM_TIME(attotime::from_hz(4200)) /* interleave CPUs */
MCFG_MACHINE_START(decocass)
MCFG_MACHINE_RESET(decocass)
diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c
index d2723b6602b..3683f667061 100644
--- a/src/mame/drivers/djboy.c
+++ b/src/mame/drivers/djboy.c
@@ -603,7 +603,7 @@ static MACHINE_CONFIG_START( djboy, djboy_state )
MCFG_CPU_ADD("beast", I80C51, 6000000)
MCFG_CPU_IO_MAP(djboy_mcu_io_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(djboy)
MCFG_MACHINE_RESET(djboy)
diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c
index bba93dfc256..2290282c147 100644
--- a/src/mame/drivers/dlair.c
+++ b/src/mame/drivers/dlair.c
@@ -731,7 +731,7 @@ static MACHINE_CONFIG_START( dleuro, dlair_state )
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)
- MCFG_WATCHDOG_TIME_INIT(HZ(MASTER_CLOCK_EURO/(16*16*16*16*16*8)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(MASTER_CLOCK_EURO/(16*16*16*16*16*8)))
MCFG_MACHINE_START(dlair)
MCFG_MACHINE_RESET(dlair)
diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c
index 1b512916e71..f5a3ae73df0 100644
--- a/src/mame/drivers/dmndrby.c
+++ b/src/mame/drivers/dmndrby.c
@@ -497,7 +497,7 @@ static MACHINE_CONFIG_START( dderby, driver_device )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* verified on schematics */
MCFG_CPU_PROGRAM_MAP(dderby_sound_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_NVRAM_ADD_0FILL("nvram")
/* video hardware */
diff --git a/src/mame/drivers/dogfgt.c b/src/mame/drivers/dogfgt.c
index 2e35ea092a4..9b34c3f136f 100644
--- a/src/mame/drivers/dogfgt.c
+++ b/src/mame/drivers/dogfgt.c
@@ -256,7 +256,7 @@ static MACHINE_CONFIG_START( dogfgt, dogfgt_state )
MCFG_CPU_ADD("sub", M6502, 1500000) /* 1.5 MHz ???? */
MCFG_CPU_PROGRAM_MAP(sub_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(dogfgt)
MCFG_MACHINE_RESET(dogfgt)
diff --git a/src/mame/drivers/dragrace.c b/src/mame/drivers/dragrace.c
index 353c3b4180e..f57522ffbb2 100644
--- a/src/mame/drivers/dragrace.c
+++ b/src/mame/drivers/dragrace.c
@@ -344,7 +344,7 @@ static MACHINE_CONFIG_START( dragrace, dragrace_state )
MCFG_MACHINE_START(dragrace)
MCFG_MACHINE_RESET(dragrace)
- MCFG_TIMER_ADD_PERIODIC("frame_timer", dragrace_frame_callback, HZ(60))
+ MCFG_TIMER_ADD_PERIODIC("frame_timer", dragrace_frame_callback, attotime::from_hz(60))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/drmicro.c b/src/mame/drivers/drmicro.c
index 6ee8d85df02..990676c544d 100644
--- a/src/mame/drivers/drmicro.c
+++ b/src/mame/drivers/drmicro.c
@@ -255,7 +255,7 @@ static MACHINE_CONFIG_START( drmicro, drmicro_state )
MCFG_CPU_IO_MAP(io_map)
MCFG_CPU_VBLANK_INT("screen", drmicro_interrupt)
- MCFG_QUANTUM_TIME(HZ(60))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_START(drmicro)
MCFG_MACHINE_RESET(drmicro)
diff --git a/src/mame/drivers/dunhuang.c b/src/mame/drivers/dunhuang.c
index cc094d0e27a..ee877519ef5 100644
--- a/src/mame/drivers/dunhuang.c
+++ b/src/mame/drivers/dunhuang.c
@@ -823,7 +823,7 @@ static MACHINE_CONFIG_START( dunhuang, dunhuang_state )
MCFG_MACHINE_START(dunhuang)
MCFG_MACHINE_RESET(dunhuang)
- MCFG_WATCHDOG_TIME_INIT(SEC(5))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(5))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/dynduke.c b/src/mame/drivers/dynduke.c
index d7a45864c96..44ec0787795 100644
--- a/src/mame/drivers/dynduke.c
+++ b/src/mame/drivers/dynduke.c
@@ -282,7 +282,7 @@ static MACHINE_CONFIG_START( dynduke, dynduke_state )
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
- MCFG_QUANTUM_TIME(HZ(3600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(3600))
MCFG_MACHINE_RESET(seibu_sound)
diff --git a/src/mame/drivers/eprom.c b/src/mame/drivers/eprom.c
index 27353d68849..5322aef8635 100644
--- a/src/mame/drivers/eprom.c
+++ b/src/mame/drivers/eprom.c
@@ -416,7 +416,7 @@ static MACHINE_CONFIG_START( eprom, eprom_state )
MCFG_CPU_ADD("extra", M68000, ATARI_CLOCK_14MHz/2)
MCFG_CPU_PROGRAM_MAP(extra_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(eprom)
MCFG_MACHINE_RESET(eprom)
@@ -448,7 +448,7 @@ static MACHINE_CONFIG_START( klaxp, eprom_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(eprom)
MCFG_MACHINE_RESET(eprom)
@@ -480,7 +480,7 @@ static MACHINE_CONFIG_START( guts, eprom_state )
MCFG_CPU_PROGRAM_MAP(guts_map)
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(eprom)
MCFG_MACHINE_RESET(eprom)
diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c
index 9d455e9c85a..97aed99c1d8 100644
--- a/src/mame/drivers/equites.c
+++ b/src/mame/drivers/equites.c
@@ -417,7 +417,7 @@ static SOUND_START(equites)
state->nmi_timer = timer_alloc(machine, equites_nmi_callback, NULL);
state->adjuster_timer = timer_alloc(machine, equites_frq_adjuster_callback, NULL);
- timer_adjust_periodic(state->adjuster_timer, ATTOTIME_IN_HZ(60), 0, ATTOTIME_IN_HZ(60));
+ timer_adjust_periodic(state->adjuster_timer, attotime::from_hz(60), 0, attotime::from_hz(60));
}
static WRITE8_HANDLER(equites_c0f8_w)
@@ -592,7 +592,7 @@ static WRITE8_HANDLER(equites_8155_w)
{
case 0: //logerror( "8155 Command register write %x, timer command = %x, interrupt enable = %x, ports = %x\n", data, (data >> 6) & 3, (data >> 4) & 3, data & 0xf );
if (((data >> 6) & 3) == 3)
- timer_adjust_periodic(state->nmi_timer, ATTOTIME_IN_HZ(XTAL_6_144MHz/2 / state->timer_count), 0, ATTOTIME_IN_HZ(XTAL_6_144MHz/2 / state->timer_count));
+ timer_adjust_periodic(state->nmi_timer, attotime::from_hz(XTAL_6_144MHz/2 / state->timer_count), 0, attotime::from_hz(XTAL_6_144MHz/2 / state->timer_count));
break;
case 1: //logerror( "8155 I/O Port A write %x\n", data );
state->eq8155_port_a = data;
diff --git a/src/mame/drivers/esd16.c b/src/mame/drivers/esd16.c
index d1450d0a3e7..510b65641f1 100644
--- a/src/mame/drivers/esd16.c
+++ b/src/mame/drivers/esd16.c
@@ -72,7 +72,7 @@ static WRITE16_HANDLER( esd16_sound_command_w )
{
soundlatch_w(space, 0, data & 0xff);
cpu_set_input_line(state->audio_cpu, 0, ASSERT_LINE); // Generate an IRQ
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50)); // Allow the other CPU to reply
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(50)); // Allow the other CPU to reply
}
}
diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c
index 83e9d83a0b1..670680bcb94 100644
--- a/src/mame/drivers/esh.c
+++ b/src/mame/drivers/esh.c
@@ -268,7 +268,7 @@ static INTERRUPT_GEN( vblank_callback_esh )
{
// IRQ
cpu_set_input_line(device, 0, ASSERT_LINE);
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, irq_stop);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, irq_stop);
}
static MACHINE_START( esh )
diff --git a/src/mame/drivers/exidy.c b/src/mame/drivers/exidy.c
index 0cf92d4d6cd..4331cef85a7 100644
--- a/src/mame/drivers/exidy.c
+++ b/src/mame/drivers/exidy.c
@@ -872,7 +872,7 @@ static MACHINE_CONFIG_DERIVED( venture, base )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(venture_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* audio hardware */
MCFG_FRAGMENT_ADD(venture_audio)
@@ -894,7 +894,7 @@ static MACHINE_CONFIG_DERIVED( mtrap, venture )
/* basic machine hardware */
- MCFG_QUANTUM_TIME(HZ(1920))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1920))
/* audio hardware */
MCFG_FRAGMENT_ADD(mtrap_cvsd_audio)
diff --git a/src/mame/drivers/expro02.c b/src/mame/drivers/expro02.c
index 5c24bb99889..fc95f746852 100644
--- a/src/mame/drivers/expro02.c
+++ b/src/mame/drivers/expro02.c
@@ -501,7 +501,7 @@ static MACHINE_CONFIG_START( galsnew, driver_device )
MCFG_PALETTE_INIT(berlwall)
/* arm watchdog */
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -518,7 +518,7 @@ static MACHINE_CONFIG_DERIVED( fantasia, galsnew )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(fantasia_map)
- MCFG_WATCHDOG_TIME_INIT(SEC(0)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(0)) /* a guess, and certainly wrong */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/exterm.c b/src/mame/drivers/exterm.c
index b944e83bd53..db8fbfbfc35 100644
--- a/src/mame/drivers/exterm.c
+++ b/src/mame/drivers/exterm.c
@@ -464,7 +464,7 @@ static MACHINE_CONFIG_START( exterm, driver_device )
MCFG_CPU_ADD("audioslave", M6502, 2000000)
MCFG_CPU_PROGRAM_MAP(sound_slave_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/exzisus.c b/src/mame/drivers/exzisus.c
index cea6cb82fe5..f0e938e2d69 100644
--- a/src/mame/drivers/exzisus.c
+++ b/src/mame/drivers/exzisus.c
@@ -298,7 +298,7 @@ static MACHINE_CONFIG_START( exzisus, driver_device )
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c
index f27dd057e6c..a1ae236dbca 100644
--- a/src/mame/drivers/f1gp.c
+++ b/src/mame/drivers/f1gp.c
@@ -482,7 +482,7 @@ static MACHINE_CONFIG_START( f1gp, f1gp_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_IO_MAP(sound_io_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
MCFG_MACHINE_START(f1gp)
MCFG_MACHINE_RESET(f1gp)
@@ -526,7 +526,7 @@ static MACHINE_CONFIG_START( f1gpb, f1gp_state )
MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)
/* NO sound CPU */
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
MCFG_MACHINE_START(f1gpb)
MCFG_MACHINE_RESET(f1gp)
diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c
index 17e514ce3bb..15b2780f4b4 100644
--- a/src/mame/drivers/fantland.c
+++ b/src/mame/drivers/fantland.c
@@ -868,7 +868,7 @@ static MACHINE_CONFIG_START( fantland, fantland_state )
MCFG_MACHINE_START(fantland)
MCFG_MACHINE_RESET(fantland)
- MCFG_QUANTUM_TIME(HZ(8000)) // sound irq must feed the DAC at 8kHz
+ MCFG_QUANTUM_TIME(attotime::from_hz(8000)) // sound irq must feed the DAC at 8kHz
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c
index 26c57a80752..1d32365a069 100644
--- a/src/mame/drivers/firebeat.c
+++ b/src/mame/drivers/firebeat.c
@@ -2216,7 +2216,7 @@ static void init_keyboard(running_machine *machine)
{
// set keyboard timer
keyboard_timer = timer_alloc(machine, keyboard_timer_callback, NULL);
- timer_adjust_periodic(keyboard_timer, ATTOTIME_IN_MSEC(10), 0, ATTOTIME_IN_MSEC(10));
+ timer_adjust_periodic(keyboard_timer, attotime::from_msec(10), 0, attotime::from_msec(10));
}
static DRIVER_INIT(kbm)
diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c
index 4deba6ea567..312e16b930c 100644
--- a/src/mame/drivers/firefox.c
+++ b/src/mame/drivers/firefox.c
@@ -691,10 +691,10 @@ static MACHINE_CONFIG_START( firefox, firefox_state )
MCFG_CPU_ADD("audiocpu", M6502, MASTER_XTAL/8)
MCFG_CPU_PROGRAM_MAP(audio_map)
- MCFG_QUANTUM_TIME(HZ(60000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000))
MCFG_MACHINE_START(firefox)
- MCFG_WATCHDOG_TIME_INIT(HZ((double)MASTER_XTAL/8/16/16/16/16))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_hz((double)MASTER_XTAL/8/16/16/16/16))
/* video hardware */
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", BITMAP_FORMAT_RGB32)
diff --git a/src/mame/drivers/flkatck.c b/src/mame/drivers/flkatck.c
index 80038e5dcd0..27129904f30 100644
--- a/src/mame/drivers/flkatck.c
+++ b/src/mame/drivers/flkatck.c
@@ -232,7 +232,7 @@ static MACHINE_CONFIG_START( flkatck, flkatck_state )
MCFG_CPU_ADD("audiocpu", Z80,3579545) /* NEC D780C-1, 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(flkatck_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(flkatck)
MCFG_MACHINE_RESET(flkatck)
diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c
index 4dab9d6e132..3633ef5e643 100644
--- a/src/mame/drivers/flstory.c
+++ b/src/mame/drivers/flstory.c
@@ -1105,7 +1105,7 @@ static MACHINE_CONFIG_START( flstory, flstory_state )
MCFG_CPU_ADD("mcu", M68705,XTAL_18_432MHz/6) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(flstory_m68705_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(flstory)
MCFG_MACHINE_RESET(flstory)
@@ -1163,7 +1163,7 @@ static MACHINE_CONFIG_START( onna34ro, flstory_state )
// MCFG_CPU_ADD("mcu", M68705,4000000) /* ??? */
// MCFG_CPU_PROGRAM_MAP(m68705_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(flstory)
MCFG_MACHINE_RESET(flstory)
@@ -1221,7 +1221,7 @@ static MACHINE_CONFIG_START( victnine, flstory_state )
// MCFG_CPU_ADD("mcu", M68705,4000000) /* ??? */
// MCFG_CPU_PROGRAM_MAP(m68705_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(flstory)
MCFG_MACHINE_RESET(flstory)
@@ -1286,7 +1286,7 @@ static MACHINE_CONFIG_START( rumba, flstory_state )
// MCFG_CPU_PROGRAM_MAP(m68705_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(flstory)
MCFG_MACHINE_RESET(rumba)
diff --git a/src/mame/drivers/fuukifg2.c b/src/mame/drivers/fuukifg2.c
index dfbe34962b4..b991a455dfd 100644
--- a/src/mame/drivers/fuukifg2.c
+++ b/src/mame/drivers/fuukifg2.c
@@ -71,8 +71,8 @@ static WRITE16_HANDLER( fuuki16_sound_command_w )
{
soundlatch_w(space,0,data & 0xff);
cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, PULSE_LINE);
-// cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50)); // Allow the other CPU to reply
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(50)); // Fixes glitching in rasters
+// cpu_spinuntil_time(space->cpu, attotime::from_usec(50)); // Allow the other CPU to reply
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(50)); // Fixes glitching in rasters
}
}
diff --git a/src/mame/drivers/gaelco.c b/src/mame/drivers/gaelco.c
index 7133d850bce..48b89769a9e 100644
--- a/src/mame/drivers/gaelco.c
+++ b/src/mame/drivers/gaelco.c
@@ -507,7 +507,7 @@ static MACHINE_CONFIG_START( bigkarnk, gaelco_state )
MCFG_CPU_ADD("audiocpu", M6809, 8867000/4) /* 68B09, 2.21675 MHz? */
MCFG_CPU_PROGRAM_MAP(bigkarnk_snd_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(gaelco)
@@ -572,7 +572,7 @@ static MACHINE_CONFIG_START( squash, gaelco_state )
MCFG_CPU_PROGRAM_MAP(squash_map)
MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(gaelco)
@@ -604,7 +604,7 @@ static MACHINE_CONFIG_START( thoop, gaelco_state )
MCFG_CPU_PROGRAM_MAP(thoop_map)
MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(gaelco)
diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c
index f938cc61690..4dbc9e5bf0e 100644
--- a/src/mame/drivers/gaelco3d.c
+++ b/src/mame/drivers/gaelco3d.c
@@ -1008,7 +1008,7 @@ static MACHINE_CONFIG_START( gaelco3d, driver_device )
MCFG_EEPROM_93C66B_ADD("eeprom")
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_TIMER_ADD("adsp_timer", adsp_autobuffer_irq)
MCFG_GAELCO_SERIAL_ADD("serial", 0, serial_interface)
diff --git a/src/mame/drivers/gal3.c b/src/mame/drivers/gal3.c
index 6c4d9b32e8a..a55602e9206 100644
--- a/src/mame/drivers/gal3.c
+++ b/src/mame/drivers/gal3.c
@@ -655,7 +655,7 @@ static MACHINE_CONFIG_START( gal3, driver_device )
MCFG_CPU_ADD("psn_b3_cpu", M68000, 12000000) // ??
MCFG_CPU_PROGRAM_MAP(psn_b1_cpu_map,0)
*/
- MCFG_QUANTUM_TIME(HZ(60*8000)) /* 8000 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(60*8000)) /* 8000 CPU slices per frame */
MCFG_NVRAM_HANDLER(gal3)
diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c
index 307557daade..e5e9d3b5253 100644
--- a/src/mame/drivers/galaga.c
+++ b/src/mame/drivers/galaga.c
@@ -1605,7 +1605,7 @@ static MACHINE_CONFIG_START( bosco, _galaga_state )
MCFG_NAMCO_06XX_ADD("06xx_1", MASTER_CLOCK/6/64, "sub", "50xx_2", "52xx", NULL, NULL)
MCFG_WATCHDOG_VBLANK_INIT(8)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(galaga)
MCFG_MACHINE_RESET(galaga)
@@ -1657,7 +1657,7 @@ static MACHINE_CONFIG_START( galaga, _galaga_state )
MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, "maincpu", "51xx", NULL, NULL, "54xx")
MCFG_WATCHDOG_VBLANK_INIT(8)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(galaga)
MCFG_MACHINE_RESET(galaga)
@@ -1727,7 +1727,7 @@ static MACHINE_CONFIG_START( xevious, _galaga_state )
MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, "maincpu", "51xx", NULL, "50xx", "54xx")
MCFG_WATCHDOG_VBLANK_INIT(8)
- MCFG_QUANTUM_TIME(HZ(60000)) /* 1000 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000)) /* 1000 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(galaga)
MCFG_MACHINE_RESET(galaga)
@@ -1807,7 +1807,7 @@ static MACHINE_CONFIG_START( digdug, _galaga_state )
MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, "maincpu", "51xx", "53xx", NULL, NULL)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(galaga)
MCFG_MACHINE_RESET(galaga)
diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c
index 7e895269453..e7dddf332bd 100644
--- a/src/mame/drivers/galaxian.c
+++ b/src/mame/drivers/galaxian.c
@@ -1978,7 +1978,7 @@ static MACHINE_CONFIG_START( galaxian_base, galaxian_state )
MCFG_VIDEO_UPDATE(galaxian)
/* blinking frequency is determined by 555 counter with Ra=100k, Rb=10k, C=10uF */
- MCFG_TIMER_ADD_PERIODIC("stars", galaxian_stars_blink_timer, NSEC(PERIOD_OF_555_ASTABLE_NSEC(100000, 10000, 0.00001)))
+ MCFG_TIMER_ADD_PERIODIC("stars", galaxian_stars_blink_timer, attotime::from_nsec(PERIOD_OF_555_ASTABLE_NSEC(100000, 10000, 0.00001)))
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/galpani2.c b/src/mame/drivers/galpani2.c
index 5b60f55f5c7..a328b3118be 100644
--- a/src/mame/drivers/galpani2.c
+++ b/src/mame/drivers/galpani2.c
@@ -77,7 +77,7 @@ static MACHINE_RESET( galpani2 )
kaneko16_sprite_xoffs = 0x10000 - 0x16c0 + 0xc00;
kaneko16_sprite_yoffs = 0x000;
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(50)); //initial mcu xchk
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(50)); //initial mcu xchk
}
static void galpani2_write_kaneko(device_t *device)
diff --git a/src/mame/drivers/galpanic.c b/src/mame/drivers/galpanic.c
index b38fa97b973..9039c53e9a8 100644
--- a/src/mame/drivers/galpanic.c
+++ b/src/mame/drivers/galpanic.c
@@ -909,7 +909,7 @@ static MACHINE_CONFIG_DERIVED( galpanica, galpanic )
/* basic machine hardware */
/* arm watchdog */
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( comad, galpanic )
diff --git a/src/mame/drivers/gameplan.c b/src/mame/drivers/gameplan.c
index 729ef3194ad..e4d949ea952 100644
--- a/src/mame/drivers/gameplan.c
+++ b/src/mame/drivers/gameplan.c
@@ -146,7 +146,7 @@ static WRITE8_DEVICE_HANDLER( audio_reset_w )
if (data == 0)
{
state->riot->reset();
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(10));
}
}
@@ -188,7 +188,7 @@ static WRITE_LINE_DEVICE_HANDLER( r6532_irq )
cpu_set_input_line(gameplan->audiocpu, 0, state);
if (state == ASSERT_LINE)
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(10));
}
diff --git a/src/mame/drivers/gaplus.c b/src/mame/drivers/gaplus.c
index 0b1d733fdc6..5a78da67248 100644
--- a/src/mame/drivers/gaplus.c
+++ b/src/mame/drivers/gaplus.c
@@ -259,10 +259,10 @@ static INTERRUPT_GEN( gaplus_interrupt_1 )
// so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
if (!namcoio_read_reset_line(io58xx)) /* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, namcoio_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, namcoio_run);
if (!namcoio_read_reset_line(io56xx)) /* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 1, namcoio_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 1, namcoio_run);
}
@@ -553,7 +553,7 @@ static MACHINE_CONFIG_START( gaplus, driver_device )
MCFG_CPU_PROGRAM_MAP(cpu3_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_assert)
- MCFG_QUANTUM_TIME(HZ(6000)) /* a high value to ensure proper synchronization of the CPUs */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* a high value to ensure proper synchronization of the CPUs */
MCFG_MACHINE_RESET(gaplus)
MCFG_NAMCO56XX_ADD("56xx", intf0_lamps)
diff --git a/src/mame/drivers/ggconnie.c b/src/mame/drivers/ggconnie.c
index 0af1fcac15e..be4b19a56a4 100644
--- a/src/mame/drivers/ggconnie.c
+++ b/src/mame/drivers/ggconnie.c
@@ -150,7 +150,7 @@ static MACHINE_CONFIG_START( ggconnie, driver_device )
MCFG_CPU_IO_MAP(sgx_io)
MCFG_CPU_VBLANK_INT_HACK(sgx_interrupt, VDC_LPF)
- MCFG_QUANTUM_TIME(HZ(60))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
/* video hardware */
diff --git a/src/mame/drivers/ghosteo.c b/src/mame/drivers/ghosteo.c
index 9fa49316d24..9115f50fdc5 100644
--- a/src/mame/drivers/ghosteo.c
+++ b/src/mame/drivers/ghosteo.c
@@ -404,12 +404,12 @@ static READ32_HANDLER( bballoon_speedup_r )
if (pc == 0x3001c0e4 || pc == 0x3001c0d8)
{
// BnB Arcade
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(20));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(20));
}
else if (pc == 0x3002b580 || pc == 0x3002b550)
{
// Happy Tour
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(20));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(20));
}
//else
// printf("speedup %08x %08x\n", pc, ret);
diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c
index 76eea263629..daa7b1c86d8 100644
--- a/src/mame/drivers/gladiatr.c
+++ b/src/mame/drivers/gladiatr.c
@@ -676,7 +676,7 @@ static MACHINE_CONFIG_START( ppking, gladiatr_state )
MCFG_CPU_ADD("audiocpu", M6809, XTAL_12MHz/16) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(ppking_cpu3_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(ppking)
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -725,7 +725,7 @@ static MACHINE_CONFIG_START( gladiatr, gladiatr_state )
MCFG_CPU_ADD("audiocpu", M6809, XTAL_12MHz/16) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(gladiatr_cpu3_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(gladiator)
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c
index 91bd2707e06..354a9927234 100644
--- a/src/mame/drivers/gottlieb.c
+++ b/src/mame/drivers/gottlieb.c
@@ -615,7 +615,7 @@ static void audio_handle_zero_crossing(attotime zerotime, int logit)
static void laserdisc_audio_process(device_t *device, int samplerate, int samples, const INT16 *ch0, const INT16 *ch1)
{
int logit = LOG_AUDIO_DECODE && input_code_pressed(device->machine, KEYCODE_L);
- attotime time_per_sample = ATTOTIME_IN_HZ(samplerate);
+ attotime time_per_sample = attotime::from_hz(samplerate);
attotime curtime = laserdisc_last_time;
int cursamp;
diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c
index be89a595281..ec83655170e 100644
--- a/src/mame/drivers/gpworld.c
+++ b/src/mame/drivers/gpworld.c
@@ -422,7 +422,7 @@ static INTERRUPT_GEN( vblank_callback_gpworld )
/* The time the IRQ line stays high is set just long enough to happen after the NMI - hacky? */
cpu_set_input_line(device, 0, ASSERT_LINE);
- timer_set(device->machine, ATTOTIME_IN_USEC(100), NULL, 0, irq_stop);
+ timer_set(device->machine, attotime::from_usec(100), NULL, 0, irq_stop);
}
static const gfx_layout gpworld_tile_layout =
diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c
index e5fe414e016..fdeeb1ba287 100644
--- a/src/mame/drivers/gradius3.c
+++ b/src/mame/drivers/gradius3.c
@@ -342,7 +342,7 @@ static MACHINE_CONFIG_START( gradius3, gradius3_state )
MCFG_CPU_ADD("audiocpu", Z80, 3579545)
MCFG_CPU_PROGRAM_MAP(gradius3_s_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(gradius3)
MCFG_MACHINE_RESET(gradius3)
diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c
index 63b8f6f1d20..9528bf4bcb6 100644
--- a/src/mame/drivers/grchamp.c
+++ b/src/mame/drivers/grchamp.c
@@ -693,7 +693,7 @@ static MACHINE_CONFIG_START( grchamp, grchamp_state )
MCFG_MACHINE_RESET(grchamp)
MCFG_WATCHDOG_VBLANK_INIT(8)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c
index 6817f094bbd..d395276b30d 100644
--- a/src/mame/drivers/gsword.c
+++ b/src/mame/drivers/gsword.c
@@ -692,13 +692,13 @@ static MACHINE_CONFIG_START( gsword, gsword_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_18MHz/6) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(cpu3_map)
- MCFG_QUANTUM_TIME(HZ(12000)) /* Allow time for 2nd cpu to interleave*/
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000)) /* Allow time for 2nd cpu to interleave*/
MCFG_MACHINE_RESET(gsword)
#if 1
/* to MCU timeout champbbj */
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
#endif
/* video hardware */
diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c
index c47c68d382a..14e0073c75a 100644
--- a/src/mame/drivers/gticlub.c
+++ b/src/mame/drivers/gticlub.c
@@ -730,7 +730,7 @@ static void sound_irq_callback( running_machine *machine, int irq )
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
cputag_set_input_line(machine, "audiocpu", line, ASSERT_LINE);
- timer_set(machine, ATTOTIME_IN_USEC(1), NULL, line, irq_off);
+ timer_set(machine, attotime::from_usec(1), NULL, line, irq_off);
}
static const k056800_interface gticlub_k056800_interface =
@@ -829,7 +829,7 @@ static MACHINE_CONFIG_START( gticlub, driver_device )
MCFG_CPU_CONFIG(sharc_cfg)
MCFG_CPU_DATA_MAP(sharc_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_EEPROM_ADD("eeprom", eeprom_intf)
@@ -915,7 +915,7 @@ static MACHINE_CONFIG_START( hangplt, driver_device )
MCFG_CPU_CONFIG(sharc_cfg)
MCFG_CPU_DATA_MAP(hangplt_sharc1_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_EEPROM_ADD("eeprom", eeprom_intf)
diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c
index fcbf24bf878..13a0aecc44d 100644
--- a/src/mame/drivers/guab.c
+++ b/src/mame/drivers/guab.c
@@ -341,7 +341,7 @@ static TIMER_CALLBACK( fdc_data_callback )
if (more_data)
{
- timer_adjust_oneshot(fdc_timer, ATTOTIME_IN_USEC(USEC_DELAY), 0);
+ timer_adjust_oneshot(fdc_timer, attotime::from_usec(USEC_DELAY), 0);
}
else
{
@@ -426,7 +426,7 @@ static WRITE16_HANDLER( wd1770_w )
fdc.sector));
/* Set the data read timer */
- timer_adjust_oneshot(fdc_timer, ATTOTIME_IN_USEC(USEC_DELAY), 0);
+ timer_adjust_oneshot(fdc_timer, attotime::from_usec(USEC_DELAY), 0);
break;
}
@@ -463,7 +463,7 @@ static WRITE16_HANDLER( wd1770_w )
case 13:
{
/* Stop any operation in progress */
- timer_reset(fdc_timer, attotime_never);
+ timer_reset(fdc_timer, attotime::never);
fdc.status &= ~BUSY;
FDC_LOG(("Force Interrupt\n"));
break;
@@ -494,7 +494,7 @@ static WRITE16_HANDLER( wd1770_w )
/* Queue an event to write the data if write command was specified */
if (fdc.cmd & 0x20)
- timer_adjust_oneshot(fdc_timer, ATTOTIME_IN_USEC(USEC_DELAY), 0);
+ timer_adjust_oneshot(fdc_timer, attotime::from_usec(USEC_DELAY), 0);
break;
}
diff --git a/src/mame/drivers/gyruss.c b/src/mame/drivers/gyruss.c
index ca25bcec5f0..2e3291e883c 100644
--- a/src/mame/drivers/gyruss.c
+++ b/src/mame/drivers/gyruss.c
@@ -524,7 +524,7 @@ static MACHINE_CONFIG_START( gyruss, gyruss_state )
MCFG_CPU_PROGRAM_MAP(audio_cpu2_map)
MCFG_CPU_IO_MAP(audio_cpu2_io_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(gyruss)
diff --git a/src/mame/drivers/harddriv.c b/src/mame/drivers/harddriv.c
index 8d0462ab6dd..f46d406f2d2 100644
--- a/src/mame/drivers/harddriv.c
+++ b/src/mame/drivers/harddriv.c
@@ -1123,7 +1123,7 @@ static MACHINE_CONFIG_START( driver_nomsp, harddriv_state )
MCFG_CPU_PROGRAM_MAP(driver_gsp_map)
MCFG_CPU_CONFIG(gsp_config_driver)
- MCFG_QUANTUM_TIME(HZ(30000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_MACHINE_START(harddriv)
MCFG_MACHINE_RESET(harddriv)
@@ -1218,7 +1218,7 @@ static MACHINE_CONFIG_FRAGMENT( ds3 )
MCFG_CPU_PROGRAM_MAP(ds3_program_map)
MCFG_CPU_DATA_MAP(ds3_data_map)
- MCFG_QUANTUM_TIME(HZ(60000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hitme.c b/src/mame/drivers/hitme.c
index c31b45be315..7827069e9a2 100644
--- a/src/mame/drivers/hitme.c
+++ b/src/mame/drivers/hitme.c
@@ -313,7 +313,7 @@ static MACHINE_RESET( hitme )
{
hitme_state *state = machine->driver_data<hitme_state>();
- state->timeout_time = attotime_zero;
+ state->timeout_time = attotime::zero;
}
static MACHINE_CONFIG_START( hitme, hitme_state )
diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c
index babaf4fe738..f0e250019a0 100644
--- a/src/mame/drivers/hng64.c
+++ b/src/mame/drivers/hng64.c
@@ -1661,7 +1661,7 @@ static INTERRUPT_GEN( irq_start )
}
cpu_set_input_line(device, 0, ASSERT_LINE);
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, irq_stop);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, irq_stop);
}
diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c
index d702c7d1f07..b033d229708 100644
--- a/src/mame/drivers/homedata.c
+++ b/src/mame/drivers/homedata.c
@@ -1331,7 +1331,7 @@ static MACHINE_CONFIG_START( reikaids, homedata_state )
MCFG_CPU_IO_MAP(reikaids_upd7807_io_map)
MCFG_CPU_VBLANK_INT("screen", upd7807_irq)
- MCFG_QUANTUM_TIME(HZ(30000)) // very high interleave required to sync for startup tests
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000)) // very high interleave required to sync for startup tests
MCFG_MACHINE_START(reikaids)
MCFG_MACHINE_RESET(reikaids)
@@ -1382,7 +1382,7 @@ static MACHINE_CONFIG_START( pteacher, homedata_state )
MCFG_CPU_IO_MAP(pteacher_upd7807_io_map)
MCFG_CPU_VBLANK_INT("screen", upd7807_irq)
- MCFG_QUANTUM_TIME(HZ(6000)) // should be enough
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // should be enough
MCFG_MACHINE_START(pteacher)
MCFG_MACHINE_RESET(pteacher)
@@ -1551,7 +1551,7 @@ static MACHINE_CONFIG_START( mirderby, homedata_state )
//MCFG_CPU_VBLANK_INT("screen", mirderby_irq)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c
index 93c1815392f..8456dc9eee7 100644
--- a/src/mame/drivers/hornet.c
+++ b/src/mame/drivers/hornet.c
@@ -886,7 +886,7 @@ static void sound_irq_callback( running_machine *machine, int irq )
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
cputag_set_input_line(machine, "audiocpu", line, ASSERT_LINE);
- timer_adjust_oneshot(sound_irq_timer, ATTOTIME_IN_USEC(1), line);
+ timer_adjust_oneshot(sound_irq_timer, attotime::from_usec(1), line);
}
static const k056800_interface hornet_k056800_interface =
@@ -932,7 +932,7 @@ static MACHINE_CONFIG_START( hornet, driver_device )
MCFG_CPU_CONFIG(sharc_cfg)
MCFG_CPU_DATA_MAP(sharc0_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START( hornet )
MCFG_MACHINE_RESET( hornet )
diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c
index 82f3fc52fe8..a17993b4e05 100644
--- a/src/mame/drivers/hvyunit.c
+++ b/src/mame/drivers/hvyunit.c
@@ -660,7 +660,7 @@ static MACHINE_CONFIG_START( hvyunit, hvyunit_state )
MCFG_CPU_ADD("mermaid", I80C51, 6000000)
MCFG_CPU_IO_MAP(mcu_io)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(hvyunit)
MCFG_MACHINE_RESET(hvyunit)
diff --git a/src/mame/drivers/hyprduel.c b/src/mame/drivers/hyprduel.c
index 2ca991d531f..22d5ce73d62 100644
--- a/src/mame/drivers/hyprduel.c
+++ b/src/mame/drivers/hyprduel.c
@@ -71,7 +71,7 @@ static INTERRUPT_GEN( hyprduel_interrupt )
state->requested_int |= 0x20;
cpu_set_input_line(device, 2, HOLD_LINE);
/* the duration is a guess */
- timer_set(device->machine, ATTOTIME_IN_USEC(2500), NULL, 0x20, vblank_end_callback);
+ timer_set(device->machine, attotime::from_usec(2500), NULL, 0x20, vblank_end_callback);
}
else
state->requested_int |= 0x12; /* hsync */
@@ -342,7 +342,7 @@ static WRITE16_HANDLER( hyprduel_blitter_w )
another blit. */
if (b1 == 0)
{
- timer_set(space->machine, ATTOTIME_IN_USEC(500), NULL, 0, hyprduel_blit_done);
+ timer_set(space->machine, attotime::from_usec(500), NULL, 0, hyprduel_blit_done);
return;
}
@@ -668,7 +668,7 @@ static MACHINE_START( magerror )
hyprduel_state *state = machine->driver_data<hyprduel_state>();
MACHINE_START_CALL(hyprduel);
- timer_adjust_periodic(state->magerror_irq_timer, attotime_zero, 0, ATTOTIME_IN_HZ(968)); /* tempo? */
+ timer_adjust_periodic(state->magerror_irq_timer, attotime::zero, 0, attotime::from_hz(968)); /* tempo? */
}
static MACHINE_CONFIG_START( hyprduel, hyprduel_state )
diff --git a/src/mame/drivers/ikki.c b/src/mame/drivers/ikki.c
index 5afe349d2f1..9ac1c53d430 100644
--- a/src/mame/drivers/ikki.c
+++ b/src/mame/drivers/ikki.c
@@ -232,7 +232,7 @@ static MACHINE_CONFIG_START( ikki, ikki_state )
MCFG_CPU_PROGRAM_MAP(ikki_cpu2)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(ikki)
MCFG_MACHINE_RESET(ikki)
diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c
index 220471a11ce..0b6a4336063 100644
--- a/src/mame/drivers/imolagp.c
+++ b/src/mame/drivers/imolagp.c
@@ -562,7 +562,7 @@ static MACHINE_CONFIG_START( imolagp, imolagp_state )
MCFG_CPU_IO_MAP(readport_slave)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(imolagp)
MCFG_MACHINE_RESET(imolagp)
diff --git a/src/mame/drivers/itech32.c b/src/mame/drivers/itech32.c
index 80c2cabe5e1..7814ecdd473 100644
--- a/src/mame/drivers/itech32.c
+++ b/src/mame/drivers/itech32.c
@@ -836,7 +836,7 @@ static WRITE32_HANDLER( tms1_68k_ram_w )
if (offset == 0) COMBINE_DATA(tms1_boot);
if (offset == 0x382 && tms_spinning[0]) STOP_TMS_SPINNING(space->machine, 0);
if (!tms_spinning[0])
- cpuexec_boost_interleave(space->machine, ATTOTIME_IN_HZ(CPU020_CLOCK/256), ATTOTIME_IN_USEC(20));
+ cpuexec_boost_interleave(space->machine, attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
}
@@ -845,21 +845,21 @@ static WRITE32_HANDLER( tms2_68k_ram_w )
COMBINE_DATA(&tms2_ram[offset]);
if (offset == 0x382 && tms_spinning[1]) STOP_TMS_SPINNING(space->machine, 1);
if (!tms_spinning[1])
- cpuexec_boost_interleave(space->machine, ATTOTIME_IN_HZ(CPU020_CLOCK/256), ATTOTIME_IN_USEC(20));
+ cpuexec_boost_interleave(space->machine, attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
}
static WRITE32_HANDLER( tms1_trigger_w )
{
COMBINE_DATA(&tms1_ram[offset]);
- cpuexec_boost_interleave(space->machine, ATTOTIME_IN_HZ(CPU020_CLOCK/256), ATTOTIME_IN_USEC(20));
+ cpuexec_boost_interleave(space->machine, attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
}
static WRITE32_HANDLER( tms2_trigger_w )
{
COMBINE_DATA(&tms2_ram[offset]);
- cpuexec_boost_interleave(space->machine, ATTOTIME_IN_HZ(CPU020_CLOCK/256), ATTOTIME_IN_USEC(20));
+ cpuexec_boost_interleave(space->machine, attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
}
@@ -1769,7 +1769,7 @@ static MACHINE_CONFIG_DERIVED( drivedge, bloodstm )
// MCFG_CPU_ADD("comm", M6803, 8000000/4) -- network CPU
MCFG_MACHINE_RESET(drivedge)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c
index 402fb0bb282..3b46edebe10 100644
--- a/src/mame/drivers/itech8.c
+++ b/src/mame/drivers/itech8.c
@@ -632,7 +632,7 @@ static INTERRUPT_GEN( generate_nmi )
{
/* signal the NMI */
itech8_update_interrupts(device->machine, 1, -1, -1);
- timer_set(device->machine, ATTOTIME_IN_USEC(1), NULL, 0, irq_off);
+ timer_set(device->machine, attotime::from_usec(1), NULL, 0, irq_off);
if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", device->machine->primary_screen->vpos());
}
diff --git a/src/mame/drivers/jackal.c b/src/mame/drivers/jackal.c
index 4e587504c4e..c92767c964d 100644
--- a/src/mame/drivers/jackal.c
+++ b/src/mame/drivers/jackal.c
@@ -373,7 +373,7 @@ static MACHINE_CONFIG_START( jackal, jackal_state )
MCFG_CPU_ADD("slave", M6809, MASTER_CLOCK/12) // verified on pcb
MCFG_CPU_PROGRAM_MAP(slave_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(jackal)
MCFG_MACHINE_RESET(jackal)
diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c
index 4889fe87455..e2ed6cca5bf 100644
--- a/src/mame/drivers/jalmah.c
+++ b/src/mame/drivers/jalmah.c
@@ -1324,7 +1324,7 @@ static MACHINE_CONFIG_START( jalmah, driver_device )
MCFG_VIDEO_START(jalmah)
MCFG_VIDEO_UPDATE(jalmah)
- MCFG_TIMER_ADD_PERIODIC("mcusim", jalmah_mcu_sim, HZ(10000)) // not real, but for simulating the MCU
+ MCFG_TIMER_ADD_PERIODIC("mcusim", jalmah_mcu_sim, attotime::from_hz(10000)) // not real, but for simulating the MCU
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", 4000000, OKIM6295_PIN7_LOW)
diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c
index a7702aa95f0..960c3055129 100644
--- a/src/mame/drivers/jangou.c
+++ b/src/mame/drivers/jangou.c
@@ -895,7 +895,7 @@ static SOUND_START( jangou )
/* Create a timer to feed the CVSD DAC with sample bits */
state->cvsd_bit_timer = timer_alloc(machine, cvsd_bit_timer_callback, NULL);
- timer_adjust_periodic(state->cvsd_bit_timer, ATTOTIME_IN_HZ(MASTER_CLOCK / 1024), 0, ATTOTIME_IN_HZ(MASTER_CLOCK / 1024));
+ timer_adjust_periodic(state->cvsd_bit_timer, attotime::from_hz(MASTER_CLOCK / 1024), 0, attotime::from_hz(MASTER_CLOCK / 1024));
}
diff --git a/src/mame/drivers/jedi.c b/src/mame/drivers/jedi.c
index 2fa818078b6..30e5dac0b47 100644
--- a/src/mame/drivers/jedi.c
+++ b/src/mame/drivers/jedi.c
@@ -348,7 +348,7 @@ static MACHINE_CONFIG_START( jedi, jedi_state )
MCFG_CPU_ADD("maincpu", M6502, JEDI_MAIN_CPU_CLOCK)
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_QUANTUM_TIME(HZ(240))
+ MCFG_QUANTUM_TIME(attotime::from_hz(240))
MCFG_MACHINE_START(jedi)
MCFG_MACHINE_RESET(jedi)
diff --git a/src/mame/drivers/jpmimpct.c b/src/mame/drivers/jpmimpct.c
index 9794e06e1fe..04d0cefe26c 100644
--- a/src/mame/drivers/jpmimpct.c
+++ b/src/mame/drivers/jpmimpct.c
@@ -854,7 +854,7 @@ static MACHINE_CONFIG_START( jpmimpct, driver_device )
MCFG_CPU_CONFIG(tms_config)
MCFG_CPU_PROGRAM_MAP(tms_program_map)
- MCFG_QUANTUM_TIME(HZ(30000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_MACHINE_START(jpmimpct)
MCFG_MACHINE_RESET(jpmimpct)
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1326,7 +1326,7 @@ static MACHINE_CONFIG_START( impctawp, driver_device )
MCFG_CPU_ADD("maincpu",M68000, 8000000)
MCFG_CPU_PROGRAM_MAP(awp68k_program_map)
- MCFG_QUANTUM_TIME(HZ(30000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_MACHINE_START(impctawp)
MCFG_MACHINE_RESET(impctawp)
diff --git a/src/mame/drivers/jpmsys5.c b/src/mame/drivers/jpmsys5.c
index b81889e4c68..7b51a33566b 100644
--- a/src/mame/drivers/jpmsys5.c
+++ b/src/mame/drivers/jpmsys5.c
@@ -351,7 +351,7 @@ static TIMER_CALLBACK( touch_cb )
if (++touch_data_count == 3)
{
- timer_reset(touch_timer, attotime_never);
+ timer_reset(touch_timer, attotime::never);
touch_state = IDLE;
}
else
@@ -582,7 +582,7 @@ static MACHINE_START( jpmsys5v )
static MACHINE_RESET( jpmsys5v )
{
- timer_reset(touch_timer, attotime_never);
+ timer_reset(touch_timer, attotime::never);
touch_state = IDLE;
a2_data_in = 1;
a2_acia_dcd = 0;
diff --git a/src/mame/drivers/kingobox.c b/src/mame/drivers/kingobox.c
index bc1ae9c2f0d..f1d06bec3b1 100644
--- a/src/mame/drivers/kingobox.c
+++ b/src/mame/drivers/kingobox.c
@@ -494,7 +494,7 @@ static MACHINE_CONFIG_START( kingofb, kingofb_state )
MCFG_CPU_IO_MAP(kingobox_sound_io_map)
MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 6000) /* Hz */
- MCFG_QUANTUM_TIME(HZ(6000)) /* We really need heavy synching among the processors */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* We really need heavy synching among the processors */
MCFG_MACHINE_START(kingofb)
MCFG_MACHINE_RESET(kingofb)
@@ -547,7 +547,7 @@ static MACHINE_CONFIG_START( ringking, kingofb_state )
MCFG_CPU_IO_MAP(ringking_sound_io_map)
MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 6000) /* Hz */
- MCFG_QUANTUM_TIME(HZ(6000)) /* We really need heavy synching among the processors */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* We really need heavy synching among the processors */
MCFG_MACHINE_START(kingofb)
MCFG_MACHINE_RESET(kingofb)
diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c
index 77fca94616f..9a64fda674d 100644
--- a/src/mame/drivers/kinst.c
+++ b/src/mame/drivers/kinst.c
@@ -261,7 +261,7 @@ static TIMER_CALLBACK( irq0_stop )
static INTERRUPT_GEN( irq0_start )
{
cpu_set_input_line(device, 0, ASSERT_LINE);
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, irq0_stop);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, irq0_stop);
}
diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c
index ee9beae30b8..688e93f4512 100644
--- a/src/mame/drivers/konamigx.c
+++ b/src/mame/drivers/konamigx.c
@@ -635,7 +635,7 @@ static void dmastart_callback(int data)
}
// simulate DMA delay
- timer_adjust_oneshot(dmadelay_timer, ATTOTIME_IN_USEC(120), 0);
+ timer_adjust_oneshot(dmadelay_timer, attotime::from_usec(120), 0);
}
@@ -1799,7 +1799,7 @@ static MACHINE_CONFIG_START( konamigx, driver_device )
MCFG_CPU_DATA_MAP(gxtmsmap)
MCFG_CPU_PERIODIC_INT(tms_sync, 48000)
- MCFG_QUANTUM_TIME(HZ(1920))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1920))
MCFG_MACHINE_START(konamigx)
MCFG_MACHINE_RESET(konamigx)
diff --git a/src/mame/drivers/ksayakyu.c b/src/mame/drivers/ksayakyu.c
index b822c68bf13..fc8d02b1b81 100644
--- a/src/mame/drivers/ksayakyu.c
+++ b/src/mame/drivers/ksayakyu.c
@@ -282,7 +282,7 @@ static MACHINE_CONFIG_START( ksayakyu, ksayakyu_state )
MCFG_CPU_PROGRAM_MAP(soundcpu_map)
MCFG_CPU_PERIODIC_INT(irq0_line_hold,60) //guess, controls music tempo
- MCFG_QUANTUM_TIME(HZ(60000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000))
MCFG_MACHINE_START(ksayakyu)
MCFG_MACHINE_RESET(ksayakyu)
diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c
index 354b327ae01..86369f71a34 100644
--- a/src/mame/drivers/ksys573.c
+++ b/src/mame/drivers/ksys573.c
@@ -599,7 +599,7 @@ static TIMER_CALLBACK( atapi_xfer_end )
int i, n_this;
UINT8 sector_buffer[ 4096 ];
- timer_adjust_oneshot(state->atapi_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->atapi_timer, attotime::never, 0);
// verboselog( machine, 2, "atapi_xfer_end( %d ) atapi_xferlen = %d, atapi_xfermod=%d\n", x, atapi_xfermod, atapi_xferlen );
@@ -1052,7 +1052,7 @@ static void atapi_init(running_machine *machine)
state->atapi_cdata_wait = 0;
state->atapi_timer = timer_alloc(machine, atapi_xfer_end, NULL);
- timer_adjust_oneshot(state->atapi_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->atapi_timer, attotime::never, 0);
for( i = 0; i < 2; i++ )
{
@@ -1324,7 +1324,7 @@ static void root_timer_adjust( running_machine *machine, int n_counter )
if( ( state->m_p_n_root_mode[ n_counter ] & PSX_RC_STOP ) != 0 )
{
- timer_adjust_oneshot( state->m_p_timer_root[ n_counter ], attotime_never, n_counter);
+ timer_adjust_oneshot( state->m_p_timer_root[ n_counter ], attotime::never, n_counter);
}
else
{
diff --git a/src/mame/drivers/kyugo.c b/src/mame/drivers/kyugo.c
index 6161d8c31ef..0f5ab1366fc 100644
--- a/src/mame/drivers/kyugo.c
+++ b/src/mame/drivers/kyugo.c
@@ -492,7 +492,7 @@ static MACHINE_CONFIG_START( gyrodine, kyugo_state )
MCFG_CPU_IO_MAP(gyrodine_sub_portmap)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(kyugo)
MCFG_MACHINE_RESET(kyugo)
diff --git a/src/mame/drivers/ladyfrog.c b/src/mame/drivers/ladyfrog.c
index 1337d563f6b..730108bfa5e 100644
--- a/src/mame/drivers/ladyfrog.c
+++ b/src/mame/drivers/ladyfrog.c
@@ -323,7 +323,7 @@ static MACHINE_CONFIG_START( ladyfrog, ladyfrog_state )
MCFG_MACHINE_START(ladyfrog)
MCFG_MACHINE_RESET(ladyfrog)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/lasso.c b/src/mame/drivers/lasso.c
index 99351fc09ce..a5f8b43d64f 100644
--- a/src/mame/drivers/lasso.c
+++ b/src/mame/drivers/lasso.c
@@ -509,7 +509,7 @@ static MACHINE_CONFIG_START( base, lasso_state )
MCFG_CPU_ADD("audiocpu", M6502, 600000)
MCFG_CPU_PROGRAM_MAP(lasso_audio_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(lasso)
MCFG_MACHINE_RESET(lasso)
diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c
index 30c8b97bf2e..0fdf919cd6d 100644
--- a/src/mame/drivers/lgp.c
+++ b/src/mame/drivers/lgp.c
@@ -329,7 +329,7 @@ static INTERRUPT_GEN( vblank_callback_lgp )
// IRQ
cpu_set_input_line(device, 0, ASSERT_LINE);
- timer_adjust_oneshot(irq_timer, ATTOTIME_IN_USEC(50), 0);
+ timer_adjust_oneshot(irq_timer, attotime::from_usec(50), 0);
}
diff --git a/src/mame/drivers/liberate.c b/src/mame/drivers/liberate.c
index 4a1f4c85b42..9fc931f584a 100644
--- a/src/mame/drivers/liberate.c
+++ b/src/mame/drivers/liberate.c
@@ -838,7 +838,7 @@ static MACHINE_CONFIG_START( liberate, liberate_state )
MCFG_CPU_PROGRAM_MAP(liberate_sound_map)
MCFG_CPU_PERIODIC_INT(nmi_line_pulse,16*60) /* ??? */
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_START(liberate)
MCFG_MACHINE_RESET(liberate)
@@ -894,7 +894,7 @@ static MACHINE_CONFIG_DERIVED( prosoccr, liberate )
MCFG_CPU_CLOCK(10000000/8) //xtal is 12 Mhz, divider is unknown
MCFG_CPU_PROGRAM_MAP(prosoccr_sound_map)
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 0*8, 32*8-1)
@@ -917,7 +917,7 @@ static MACHINE_CONFIG_START( prosport, liberate_state )
MCFG_CPU_PROGRAM_MAP(liberate_sound_map)
MCFG_CPU_PERIODIC_INT(nmi_line_pulse,16*60) /* ??? */
-// MCFG_QUANTUM_TIME(HZ(12000))
+// MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_START(liberate)
MCFG_MACHINE_RESET(liberate)
diff --git a/src/mame/drivers/lockon.c b/src/mame/drivers/lockon.c
index b87c1d2bd1b..f5a0a69cfa6 100644
--- a/src/mame/drivers/lockon.c
+++ b/src/mame/drivers/lockon.c
@@ -532,8 +532,8 @@ static MACHINE_CONFIG_START( lockon, lockon_state )
MCFG_CPU_PROGRAM_MAP(sound_prg)
MCFG_CPU_IO_MAP(sound_io)
- MCFG_WATCHDOG_TIME_INIT(NSEC(PERIOD_OF_555_ASTABLE_NSEC(10000, 4700, 10000e-12) * 4096))
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_nsec(PERIOD_OF_555_ASTABLE_NSEC(10000, 4700, 10000e-12) * 4096))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(lockon)
MCFG_MACHINE_RESET(lockon)
diff --git a/src/mame/drivers/lsasquad.c b/src/mame/drivers/lsasquad.c
index e7be4fefa55..ea920485875 100644
--- a/src/mame/drivers/lsasquad.c
+++ b/src/mame/drivers/lsasquad.c
@@ -629,7 +629,7 @@ static MACHINE_CONFIG_START( lsasquad, lsasquad_state )
MCFG_CPU_ADD("mcu", M68705, MASTER_CLOCK / 8)
MCFG_CPU_PROGRAM_MAP(lsasquad_m68705_map)
- MCFG_QUANTUM_TIME(HZ(30000)) /* 500 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000)) /* 500 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
/* main<->sound synchronization depends on this */
@@ -686,7 +686,7 @@ static MACHINE_CONFIG_START( daikaiju, lsasquad_state )
MCFG_CPU_ADD("mcu", M68705, MASTER_CLOCK / 8)
MCFG_CPU_PROGRAM_MAP(lsasquad_m68705_map)
- MCFG_QUANTUM_TIME(HZ(30000)) /* 500 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000)) /* 500 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
/* main<->sound synchronization depends on this */
diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c
index 8f6cdc11400..e4ac84792ab 100644
--- a/src/mame/drivers/m72.c
+++ b/src/mame/drivers/m72.c
@@ -127,8 +127,8 @@ static MACHINE_START( kengo )
static TIMER_CALLBACK( synch_callback )
{
- //cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(8000000));
- cpuexec_boost_interleave(machine, ATTOTIME_IN_HZ(MASTER_CLOCK/4/12), ATTOTIME_IN_SEC(25));
+ //cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(8000000));
+ cpuexec_boost_interleave(machine, attotime::from_hz(MASTER_CLOCK/4/12), attotime::from_seconds(25));
}
static MACHINE_RESET( m72 )
diff --git a/src/mame/drivers/macrossp.c b/src/mame/drivers/macrossp.c
index 8c149ce95a4..1a1eff15d2e 100644
--- a/src/mame/drivers/macrossp.c
+++ b/src/mame/drivers/macrossp.c
@@ -343,7 +343,7 @@ static WRITE32_HANDLER( macrossp_soundcmd_w )
state->sndpending = 1;
cpu_set_input_line(state->audiocpu, 2, HOLD_LINE);
/* spin for a while to let the sound CPU read the command */
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(50));
}
}
diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c
index ce2a8d492ab..2b17b8e9a25 100644
--- a/src/mame/drivers/magmax.c
+++ b/src/mame/drivers/magmax.c
@@ -359,7 +359,7 @@ static MACHINE_CONFIG_START( magmax, magmax_state )
MCFG_CPU_PROGRAM_MAP(magmax_sound_map)
MCFG_CPU_IO_MAP(magmax_sound_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(magmax)
MCFG_MACHINE_RESET(magmax)
diff --git a/src/mame/drivers/mappy.c b/src/mame/drivers/mappy.c
index 03a6319014a..17a279bab8d 100644
--- a/src/mame/drivers/mappy.c
+++ b/src/mame/drivers/mappy.c
@@ -772,10 +772,10 @@ static INTERRUPT_GEN( superpac_interrupt_1 )
// so don't replace with cputag_set_input_line(machine, "maincpu", 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 */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, superpac_io_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, 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 */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 1, superpac_io_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 1, superpac_io_run);
}
static TIMER_CALLBACK( pacnpal_io_run )
@@ -803,10 +803,10 @@ static INTERRUPT_GEN( pacnpal_interrupt_1 )
// so don't replace with cputag_set_input_line(machine, "maincpu", 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 */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, pacnpal_io_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, 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 */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 1, pacnpal_io_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 1, pacnpal_io_run);
}
static TIMER_CALLBACK( phozon_io_run )
@@ -834,10 +834,10 @@ static INTERRUPT_GEN( phozon_interrupt_1 )
// so don't replace with cputag_set_input_line(machine, "maincpu", 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 */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, phozon_io_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, 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 */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 1, phozon_io_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 1, phozon_io_run);
}
static TIMER_CALLBACK( mappy_io_run )
@@ -865,10 +865,10 @@ static INTERRUPT_GEN( mappy_interrupt_1 )
// so don't replace with cputag_set_input_line(machine, "maincpu", 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 */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, mappy_io_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, 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 */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 1, mappy_io_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 1, mappy_io_run);
}
@@ -1614,7 +1614,7 @@ static MACHINE_CONFIG_START( superpac, mappy_state )
MCFG_CPU_VBLANK_INT("screen", irq0_line_assert)
MCFG_WATCHDOG_VBLANK_INIT(8)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_RESET(superpac)
@@ -1687,7 +1687,7 @@ static MACHINE_CONFIG_START( phozon, mappy_state )
MCFG_CPU_VBLANK_INT("screen", irq0_line_assert)
MCFG_WATCHDOG_VBLANK_INIT(8)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_RESET(phozon)
@@ -1727,7 +1727,7 @@ static MACHINE_CONFIG_START( mappy, mappy_state )
MCFG_CPU_VBLANK_INT("screen", irq0_line_assert)
MCFG_WATCHDOG_VBLANK_INIT(8)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_RESET(mappy)
diff --git a/src/mame/drivers/markham.c b/src/mame/drivers/markham.c
index 42a287a5502..53e97e70adc 100644
--- a/src/mame/drivers/markham.c
+++ b/src/mame/drivers/markham.c
@@ -183,7 +183,7 @@ static MACHINE_CONFIG_START( markham, markham_state )
MCFG_CPU_PROGRAM_MAP(markham_slave_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/matmania.c b/src/mame/drivers/matmania.c
index c1bbf071cf4..1b5be6ed5f2 100644
--- a/src/mame/drivers/matmania.c
+++ b/src/mame/drivers/matmania.c
@@ -319,7 +319,7 @@ static MACHINE_CONFIG_START( matmania, matmania_state )
MCFG_CPU_PROGRAM_MAP(matmania_sound_map)
MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,15) /* ???? */
/* IRQs are caused by the main CPU */
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(matmania)
@@ -420,7 +420,7 @@ static MACHINE_CONFIG_START( maniach, matmania_state )
MCFG_CPU_ADD("mcu", M68705, 1500000*2) /* (don't know really how fast, but it doesn't need to even be this fast) */
MCFG_CPU_PROGRAM_MAP(maniach_mcu_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slice per frame - high interleaving to sync main and mcu */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slice per frame - high interleaving to sync main and mcu */
MCFG_MACHINE_START(maniach)
MCFG_MACHINE_RESET(maniach)
diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c
index 18977ff41cf..1f441901819 100644
--- a/src/mame/drivers/mcatadv.c
+++ b/src/mame/drivers/mcatadv.c
@@ -465,7 +465,7 @@ static MACHINE_CONFIG_START( mcatadv, mcatadv_state )
MCFG_GFXDECODE(mcatadv)
MCFG_PALETTE_LENGTH(0x2000/2)
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_VIDEO_START(mcatadv)
MCFG_VIDEO_EOF(mcatadv) // Buffer Spriteram
diff --git a/src/mame/drivers/meadows.c b/src/mame/drivers/meadows.c
index 7590887b763..3da2ad60b21 100644
--- a/src/mame/drivers/meadows.c
+++ b/src/mame/drivers/meadows.c
@@ -659,7 +659,7 @@ static MACHINE_CONFIG_START( meadows, meadows_state )
MCFG_CPU_PROGRAM_MAP(audio_map)
MCFG_CPU_PERIODIC_INT(audio_interrupt, (double)5000000/131072)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -723,7 +723,7 @@ static MACHINE_CONFIG_START( bowl3d, meadows_state )
MCFG_CPU_PROGRAM_MAP(audio_map)
MCFG_CPU_PERIODIC_INT(audio_interrupt, (double)5000000/131072)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c
index 52e86990692..4d5b95fd064 100644
--- a/src/mame/drivers/mediagx.c
+++ b/src/mame/drivers/mediagx.c
@@ -687,7 +687,7 @@ static TIMER_DEVICE_CALLBACK( sound_timer_callback )
mediagx_state *state = timer.machine->driver_data<mediagx_state>();
state->ad1847_sample_counter = 0;
- timer.adjust(ATTOTIME_IN_MSEC(10));
+ timer.adjust(attotime::from_msec(10));
dmadac_transfer(&state->dmadac[0], 1, 0, 1, state->dacl_ptr, state->dacl);
dmadac_transfer(&state->dmadac[1], 1, 0, 1, state->dacr_ptr, state->dacr);
@@ -1042,7 +1042,7 @@ static MACHINE_RESET(mediagx)
machine->device("maincpu")->reset();
timer_device *sound_timer = machine->device<timer_device>("sound_timer");
- sound_timer->adjust(ATTOTIME_IN_MSEC(10));
+ sound_timer->adjust(attotime::from_msec(10));
state->dmadac[0] = machine->device<dmadac_sound_device>("dac1");
state->dmadac[1] = machine->device<dmadac_sound_device>("dac2");
diff --git a/src/mame/drivers/megaplay.c b/src/mame/drivers/megaplay.c
index cc07c31b418..828833459df 100644
--- a/src/mame/drivers/megaplay.c
+++ b/src/mame/drivers/megaplay.c
@@ -661,7 +661,7 @@ static MACHINE_CONFIG_DERIVED( mpnew, megadriv )
MCFG_MACHINE_RESET( mpnew )
MCFG_VIDEO_EOF( mpnew )
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_SOUND_ADD("sn2", SN76496, MASTER_CLOCK/15)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) /* 3.58 MHz */
diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c
index 4f83ec0feb8..905a4db59e2 100644
--- a/src/mame/drivers/megasys1.c
+++ b/src/mame/drivers/megasys1.c
@@ -1464,7 +1464,7 @@ static MACHINE_CONFIG_START( system_A, driver_device )
MCFG_CPU_ADD("soundcpu", M68000, SOUND_CPU_CLOCK) /* 7MHz verified */
MCFG_CPU_PROGRAM_MAP(megasys1A_sound_map)
- MCFG_QUANTUM_TIME(HZ(120000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(120000))
MCFG_MACHINE_RESET(megasys1)
diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c
index e91b6643a92..5f4d8759d29 100644
--- a/src/mame/drivers/megatech.c
+++ b/src/mame/drivers/megatech.c
@@ -272,7 +272,7 @@ static TIMER_CALLBACK( megatech_z80_stop_state )
if (game_region)
{
{
- timer_set( machine, attotime_zero, NULL, param, megatech_z80_run_state );
+ timer_set( machine, attotime::zero, NULL, param, megatech_z80_run_state );
}
}
else
@@ -287,7 +287,7 @@ static TIMER_CALLBACK( megatech_z80_stop_state )
static void megatech_select_game(running_machine *machine, int gameno)
{
- timer_set( machine, attotime_zero, NULL, gameno, megatech_z80_stop_state );
+ timer_set( machine, attotime::zero, NULL, gameno, megatech_z80_stop_state );
}
static WRITE8_HANDLER( megatech_cart_select_w )
@@ -437,7 +437,7 @@ static VIDEO_START(mtnew)
init_for_megadrive(machine); // create an sms vdp too, for comptibility mode
VIDEO_START_CALL(megadriv);
}
-//attotime_never
+//attotime::never
static VIDEO_UPDATE(mtnew)
{
device_t *megadriv_screen = screen->machine->device("megadriv");
diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c
index bbf006cffac..93c0b32acc7 100644
--- a/src/mame/drivers/megazone.c
+++ b/src/mame/drivers/megazone.c
@@ -260,7 +260,7 @@ static MACHINE_CONFIG_START( megazone, megazone_state )
MCFG_CPU_PROGRAM_MAP(megazone_i8039_map)
MCFG_CPU_IO_MAP(megazone_i8039_io_map)
- MCFG_QUANTUM_TIME(HZ(900))
+ MCFG_QUANTUM_TIME(attotime::from_hz(900))
MCFG_MACHINE_START(megazone)
MCFG_MACHINE_RESET(megazone)
diff --git a/src/mame/drivers/meritm.c b/src/mame/drivers/meritm.c
index c89330601df..107ddb1de6d 100644
--- a/src/mame/drivers/meritm.c
+++ b/src/mame/drivers/meritm.c
@@ -1098,7 +1098,7 @@ static MACHINE_CONFIG_DERIVED( meritm_crt260, meritm_crt250 )
MCFG_PPI8255_RECONFIG( "ppi8255", crt260_ppi8255_intf )
- MCFG_WATCHDOG_TIME_INIT(MSEC(1200)) // DS1232, TD connected to VCC
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1200)) // DS1232, TD connected to VCC
MCFG_MACHINE_START(meritm_crt260)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c
index c8fdc4ccb36..22a4ec5e43d 100644
--- a/src/mame/drivers/metro.c
+++ b/src/mame/drivers/metro.c
@@ -256,7 +256,7 @@ static INTERRUPT_GEN( karatour_interrupt )
state->requested_int[0] = 1;
state->requested_int[5] = 1; // write the scroll registers
/* the duration is a guess */
- timer_set(device->machine, ATTOTIME_IN_USEC(2500), NULL, 0, vblank_end_callback);
+ timer_set(device->machine, attotime::from_usec(2500), NULL, 0, vblank_end_callback);
update_irq_state(device->machine);
break;
@@ -281,7 +281,7 @@ static WRITE16_HANDLER( mouja_irq_timer_ctrl_w )
metro_state *state = space->machine->driver_data<metro_state>();
double freq = 58.0 + (0xff - (data & 0xff)) / 2.2; /* 0xff=58Hz, 0x80=116Hz? */
- timer_adjust_periodic(state->mouja_irq_timer, attotime_zero, 0, ATTOTIME_IN_HZ(freq));
+ timer_adjust_periodic(state->mouja_irq_timer, attotime::zero, 0, attotime::from_hz(freq));
}
static INTERRUPT_GEN( mouja_interrupt )
@@ -729,7 +729,7 @@ static WRITE16_HANDLER( metro_blitter_w )
another blit. */
if (b1 == 0)
{
- timer_set(space->machine, ATTOTIME_IN_USEC(500), NULL, 0, metro_blit_done);
+ timer_set(space->machine, attotime::from_usec(500), NULL, 0, metro_blit_done);
return;
}
diff --git a/src/mame/drivers/mexico86.c b/src/mame/drivers/mexico86.c
index beada844a74..88d4a3353df 100644
--- a/src/mame/drivers/mexico86.c
+++ b/src/mame/drivers/mexico86.c
@@ -489,7 +489,7 @@ static MACHINE_CONFIG_START( mexico86, mexico86_state )
MCFG_CPU_PROGRAM_MAP(mexico86_sub_cpu_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs */
MCFG_MACHINE_START(mexico86)
MCFG_MACHINE_RESET(mexico86)
diff --git a/src/mame/drivers/mhavoc.c b/src/mame/drivers/mhavoc.c
index e35b3173f5b..16c6b2450b2 100644
--- a/src/mame/drivers/mhavoc.c
+++ b/src/mame/drivers/mhavoc.c
@@ -485,7 +485,7 @@ static MACHINE_CONFIG_START( mhavoc, mhavoc_state )
MCFG_MACHINE_RESET(mhavoc)
MCFG_NVRAM_ADD_1FILL("nvram")
- MCFG_TIMER_ADD_PERIODIC("5k_timer", mhavoc_cpu_irq_clock, HZ(MHAVOC_CLOCK_5K))
+ MCFG_TIMER_ADD_PERIODIC("5k_timer", mhavoc_cpu_irq_clock, attotime::from_hz(MHAVOC_CLOCK_5K))
/* video hardware */
MCFG_SCREEN_ADD("screen", VECTOR)
diff --git a/src/mame/drivers/micro3d.c b/src/mame/drivers/micro3d.c
index 27f92e0785b..74445105e5e 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_MACHINE_RESET(micro3d)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_QUANTUM_TIME(HZ(3000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(3000))
MCFG_PALETTE_LENGTH(4096)
diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c
index 3a7ecd6f664..487ba38d0d9 100644
--- a/src/mame/drivers/midvunit.c
+++ b/src/mame/drivers/midvunit.c
@@ -161,7 +161,7 @@ static WRITE32_HANDLER( midvunit_adc_w )
if (which < 0 || which > 2)
logerror("adc_w: unexpected which = %02X\n", which + 4);
adc_data = input_port_read_safe(space->machine, adcnames[which], 0);
- timer_set(space->machine, ATTOTIME_IN_MSEC(1), NULL, 0, adc_ready);
+ timer_set(space->machine, attotime::from_msec(1), NULL, 0, adc_ready);
}
else
logerror("adc_w without enabling writes!\n");
diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c
index 066b144a77a..e5874249cd1 100644
--- a/src/mame/drivers/midzeus.c
+++ b/src/mame/drivers/midzeus.c
@@ -118,7 +118,7 @@ static TIMER_CALLBACK( display_irq_off )
static INTERRUPT_GEN( display_irq )
{
cpu_set_input_line(device, 0, ASSERT_LINE);
- timer_set(device->machine, ATTOTIME_IN_HZ(30000000), NULL, 0, display_irq_off);
+ timer_set(device->machine, attotime::from_hz(30000000), NULL, 0, display_irq_off);
}
@@ -413,7 +413,7 @@ static WRITE32_HANDLER( tms32031_control_w )
{
int which = (offset >> 4) & 1;
if (data & 0x40)
- timer_adjust_oneshot(timer[which], attotime_never, 0);
+ timer_adjust_oneshot(timer[which], attotime::never, 0);
}
else
logerror("%06X:tms32031_control_w(%02X) = %08X\n", cpu_get_pc(space->cpu), offset, data);
diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c
index 81a5c5ef47e..aad38ff3f9a 100644
--- a/src/mame/drivers/missb2.c
+++ b/src/mame/drivers/missb2.c
@@ -395,7 +395,7 @@ static MACHINE_CONFIG_START( missb2, bublbobl_state )
// MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
MCFG_CPU_VBLANK_INT("screen", missb2_interrupt)
- MCFG_QUANTUM_TIME(HZ(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
MCFG_MACHINE_START(missb2)
MCFG_MACHINE_RESET(missb2)
diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c
index e9ada0ae1fa..1e9af93d138 100644
--- a/src/mame/drivers/mlanding.c
+++ b/src/mame/drivers/mlanding.c
@@ -284,7 +284,7 @@ static WRITE16_HANDLER( ml_sub_reset_w )
if (pixels)
{
dma_active = 1;
- timer_set(space->machine, ATTOTIME_IN_MSEC(20), NULL, 0, dma_complete);
+ timer_set(space->machine, attotime::from_msec(20), NULL, 0, dma_complete);
}
if(!(data & 0x40)) // unknown line used
@@ -740,7 +740,7 @@ static MACHINE_CONFIG_START( mlanding, driver_device )
MCFG_CPU_DATA_MAP(DSP_map_data)
MCFG_CPU_IO_MAP(DSP_map_io)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/model1.c b/src/mame/drivers/model1.c
index a1b05fc9b77..0b501d9802f 100644
--- a/src/mame/drivers/model1.c
+++ b/src/mame/drivers/model1.c
@@ -843,7 +843,7 @@ static READ16_HANDLER( snd_68k_ready_r )
if ((sr & 0x0700) > 0x0100)
{
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
return 0; // not ready yet, interrupts disabled
}
@@ -859,7 +859,7 @@ static WRITE16_HANDLER( snd_latch_to_68k_w )
// signal the 68000 that there's data waiting
cputag_set_input_line(space->machine, "audiocpu", 2, HOLD_LINE);
// give the 68k time to reply
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
}
static ADDRESS_MAP_START( model1_mem, ADDRESS_SPACE_PROGRAM, 16 )
diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c
index 4bc1ca7eb79..ef7a4ca1cfa 100644
--- a/src/mame/drivers/model2.c
+++ b/src/mame/drivers/model2.c
@@ -210,7 +210,7 @@ static UINT32 copro_fifoout_pop(address_space *space)
i960_stall(space->cpu);
/* spin the main cpu and let the TGP catch up */
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(100));
return 0;
}
@@ -759,7 +759,7 @@ static WRITE32_HANDLER( geo_sharc_ctl1_w )
{
logerror("Boot geo, %d dwords\n", model2_geocnt);
cputag_set_input_line(space->machine, "dsp2", INPUT_LINE_HALT, CLEAR_LINE);
- //cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(1000)); // Give the SHARC enough time to boot itself
+ //cpu_spinuntil_time(space->cpu, attotime::from_usec(1000)); // Give the SHARC enough time to boot itself
}
}
@@ -991,7 +991,7 @@ static int snd_68k_ready_r(address_space *space)
if ((sr & 0x0700) > 0x0100)
{
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
return 0; // not ready yet, interrupts disabled
}
@@ -1002,7 +1002,7 @@ static void snd_latch_to_68k_w(address_space *space, int data)
{
if (!snd_68k_ready_r(space))
{
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
}
to_68k = data;
@@ -1010,7 +1010,7 @@ static void snd_latch_to_68k_w(address_space *space, int data)
cputag_set_input_line(space->machine, "audiocpu", 2, HOLD_LINE);
// give the 68k time to notice
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
}
static READ32_HANDLER( model2_serial_r )
@@ -1038,7 +1038,7 @@ static WRITE32_HANDLER( model2_serial_w )
scsp_midi_in(space->machine->device("scsp"), 0, data&0xff, 0);
// give the 68k time to notice
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
}
}
@@ -2150,7 +2150,7 @@ static MACHINE_CONFIG_START( model2b, driver_device )
//MCFG_CPU_CONFIG(sharc_cfg)
//MCFG_CPU_DATA_MAP(geo_sharc_map)
- MCFG_QUANTUM_TIME(HZ(18000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(18000))
MCFG_MACHINE_RESET(model2b)
diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c
index df9191f0511..f744c1afde5 100644
--- a/src/mame/drivers/model3.c
+++ b/src/mame/drivers/model3.c
@@ -1608,7 +1608,7 @@ static WRITE64_HANDLER(model3_sound_w)
scsp_midi_in(space->machine->device("scsp1"), 0, (data>>56)&0xff, 0);
// give the 68k time to notice
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
}
}
@@ -4978,7 +4978,7 @@ static MACHINE_CONFIG_START( model3_10, driver_device )
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
MCFG_CPU_PROGRAM_MAP(model3_snd)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(model3_10)
MCFG_MACHINE_RESET(model3_10)
diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c
index a67888de83f..f583912a945 100644
--- a/src/mame/drivers/moo.c
+++ b/src/mame/drivers/moo.c
@@ -134,7 +134,7 @@ static INTERRUPT_GEN( moo_interrupt )
moo_objdma(device->machine, state->game_type);
// schedule DMA end interrupt (delay shortened to catch up with V-blank)
- timer_adjust_oneshot(state->dmaend_timer, ATTOTIME_IN_USEC(MOO_DMADELAY), 0);
+ timer_adjust_oneshot(state->dmaend_timer, attotime::from_usec(MOO_DMADELAY), 0);
}
// trigger V-blank interrupt
@@ -148,7 +148,7 @@ static INTERRUPT_GEN( moobl_interrupt )
moo_objdma(device->machine, state->game_type);
// schedule DMA end interrupt (delay shortened to catch up with V-blank)
- timer_adjust_oneshot(state->dmaend_timer, ATTOTIME_IN_USEC(MOO_DMADELAY), 0);
+ timer_adjust_oneshot(state->dmaend_timer, attotime::from_usec(MOO_DMADELAY), 0);
// trigger V-blank interrupt
cpu_set_input_line(device, 5, HOLD_LINE);
diff --git a/src/mame/drivers/mpu4.c b/src/mame/drivers/mpu4.c
index 6dd2d27f97f..e2d4d3a5c72 100644
--- a/src/mame/drivers/mpu4.c
+++ b/src/mame/drivers/mpu4.c
@@ -1826,7 +1826,7 @@ static MACHINE_CONFIG_START( mpu4mod2, driver_device )
MCFG_CPU_ADD("maincpu", M6809, MPU4_MASTER_CLOCK/4)
MCFG_CPU_PROGRAM_MAP(mod2_memmap)
- MCFG_TIMER_ADD_PERIODIC("50hz",gen_50hz, HZ(100))
+ MCFG_TIMER_ADD_PERIODIC("50hz",gen_50hz, attotime::from_hz(100))
/* 6840 PTM */
MCFG_PTM6840_ADD("ptm_ic2", ptm_ic2_intf)
diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c
index c976b716cbb..4db031925df 100644
--- a/src/mame/drivers/mpu4drvr.c
+++ b/src/mame/drivers/mpu4drvr.c
@@ -2235,7 +2235,7 @@ static TIMER_DEVICE_CALLBACK( scanline_timer_callback )
static MACHINE_CONFIG_START( mpu4_vid, driver_device )
MCFG_CPU_ADD("maincpu", M6809, MPU4_MASTER_CLOCK/4 )
MCFG_CPU_PROGRAM_MAP(mpu4_6809_map)
- MCFG_TIMER_ADD_PERIODIC("50hz",gen_50hz, HZ(100))
+ MCFG_TIMER_ADD_PERIODIC("50hz",gen_50hz, attotime::from_hz(100))
MCFG_NVRAM_ADD_0FILL("nvram") /* confirm */
@@ -2259,7 +2259,7 @@ static MACHINE_CONFIG_START( mpu4_vid, driver_device )
MCFG_CPU_ADD("video", M68000, VIDEO_MASTER_CLOCK )
MCFG_CPU_PROGRAM_MAP(mpu4_68k_map)
- MCFG_QUANTUM_TIME(HZ(960))
+ MCFG_QUANTUM_TIME(attotime::from_hz(960))
MCFG_MACHINE_START(mpu4_vid)
MCFG_MACHINE_RESET(mpu4_vid)
@@ -2312,7 +2312,7 @@ static MACHINE_CONFIG_START( dealem, driver_device )
MCFG_CPU_ADD("maincpu", M6809, MPU4_MASTER_CLOCK/4)
MCFG_CPU_PROGRAM_MAP(dealem_memmap)
- MCFG_TIMER_ADD_PERIODIC("50hz",gen_50hz, HZ(100))
+ MCFG_TIMER_ADD_PERIODIC("50hz",gen_50hz, attotime::from_hz(100))
MCFG_PTM6840_ADD("ptm_ic2", ptm_ic2_intf)
diff --git a/src/mame/drivers/mrflea.c b/src/mame/drivers/mrflea.c
index aec86e7c337..be5f891e990 100644
--- a/src/mame/drivers/mrflea.c
+++ b/src/mame/drivers/mrflea.c
@@ -370,7 +370,7 @@ static MACHINE_CONFIG_START( mrflea, mrflea_state )
MCFG_CPU_IO_MAP(mrflea_slave_io_map)
MCFG_CPU_VBLANK_INT_HACK(mrflea_slave_interrupt,2)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(mrflea)
MCFG_MACHINE_RESET(mrflea)
diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c
index ffdde7b4474..f074371ba19 100644
--- a/src/mame/drivers/ms32.c
+++ b/src/mame/drivers/ms32.c
@@ -225,7 +225,7 @@ static WRITE32_HANDLER( ms32_sound_w )
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, ASSERT_LINE);
// give the Z80 time to respond
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
}
static READ32_HANDLER( ms32_sound_r )
@@ -1322,7 +1322,7 @@ static MACHINE_CONFIG_START( ms32, driver_device )
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
MCFG_CPU_PROGRAM_MAP(ms32_sound_map)
- MCFG_QUANTUM_TIME(HZ(60000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000))
MCFG_MACHINE_RESET(ms32)
diff --git a/src/mame/drivers/mw8080bw.c b/src/mame/drivers/mw8080bw.c
index 9121572fbba..dafd270dde7 100644
--- a/src/mame/drivers/mw8080bw.c
+++ b/src/mame/drivers/mw8080bw.c
@@ -852,7 +852,7 @@ static MACHINE_CONFIG_DERIVED( zzzap, mw8080bw_root )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(zzzap_io_map)
- MCFG_WATCHDOG_TIME_INIT(NSEC(PERIOD_OF_555_MONOSTABLE_NSEC(RES_M(1), CAP_U(1)))) /* 1.1s */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_nsec(PERIOD_OF_555_MONOSTABLE_NSEC(RES_M(1), CAP_U(1)))) /* 1.1s */
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -966,7 +966,7 @@ static MACHINE_CONFIG_DERIVED( maze, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(maze_io_map)
MCFG_MACHINE_START(maze)
- MCFG_WATCHDOG_TIME_INIT(NSEC(PERIOD_OF_555_MONOSTABLE_NSEC(RES_K(270), CAP_U(10)))) /* 2.97s */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_nsec(PERIOD_OF_555_MONOSTABLE_NSEC(RES_K(270), CAP_U(10)))) /* 2.97s */
/* audio hardware */
MCFG_FRAGMENT_ADD(maze_audio)
@@ -1058,7 +1058,7 @@ static MACHINE_CONFIG_DERIVED( boothill, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(boothill_io_map)
MCFG_MACHINE_START(boothill)
- MCFG_WATCHDOG_TIME_INIT(NSEC(PERIOD_OF_555_MONOSTABLE_NSEC(RES_K(270), CAP_U(10)))) /* 2.97s */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_nsec(PERIOD_OF_555_MONOSTABLE_NSEC(RES_K(270), CAP_U(10)))) /* 2.97s */
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1164,7 +1164,7 @@ static MACHINE_CONFIG_DERIVED( checkmat, mw8080bw_root )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(checkmat_io_map)
- MCFG_WATCHDOG_TIME_INIT(NSEC(PERIOD_OF_555_MONOSTABLE_NSEC(RES_K(270), CAP_U(10)))) /* 2.97s */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_nsec(PERIOD_OF_555_MONOSTABLE_NSEC(RES_K(270), CAP_U(10)))) /* 2.97s */
/* audio hardware */
MCFG_FRAGMENT_ADD(checkmat_audio)
@@ -1294,7 +1294,7 @@ static MACHINE_CONFIG_DERIVED( desertgu, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(desertgu_io_map)
MCFG_MACHINE_START(desertgu)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1493,7 +1493,7 @@ static MACHINE_CONFIG_DERIVED( dplay, mw8080bw_root )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(dplay_io_map)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1683,7 +1683,7 @@ static MACHINE_CONFIG_DERIVED( m4, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(m4_io_map)
MCFG_MACHINE_START(m4)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1853,7 +1853,7 @@ static MACHINE_CONFIG_DERIVED( clowns, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(clowns_io_map)
MCFG_MACHINE_START(clowns)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -1947,7 +1947,7 @@ static MACHINE_CONFIG_DERIVED( spacwalk, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(spacwalk_io_map)
MCFG_MACHINE_START(clowns)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -2027,7 +2027,7 @@ static MACHINE_CONFIG_DERIVED( shuffle, mw8080bw_root )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(shuffle_io_map)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -2114,7 +2114,7 @@ static MACHINE_CONFIG_DERIVED( dogpatch, mw8080bw_root )
MCFG_CPU_IO_MAP(dogpatch_io_map)
/* the watch dog time is unknown, but all other */
/* Midway boards of the era used the same circuit */
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -2278,14 +2278,14 @@ static MACHINE_CONFIG_DERIVED( spcenctr, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(spcenctr_io_map)
MCFG_MACHINE_START(spcenctr)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* timers */
- MCFG_TIMER_ADD_PERIODIC("strobeon", spcenctr_strobe_timer_callback, HZ(SPCENCTR_STROBE_FREQ))
+ MCFG_TIMER_ADD_PERIODIC("strobeon", spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ))
MCFG_TIMER_PARAM(TRUE) /* indicates strobe ON */
- MCFG_TIMER_ADD_PERIODIC("strobeoff", spcenctr_strobe_timer_callback, HZ(SPCENCTR_STROBE_FREQ))
- MCFG_TIMER_START_DELAY(HZ(SPCENCTR_STROBE_FREQ * 100 / SPCENCTR_STROBE_DUTY_CYCLE))
+ MCFG_TIMER_ADD_PERIODIC("strobeoff", spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ))
+ MCFG_TIMER_START_DELAY(attotime::from_hz(SPCENCTR_STROBE_FREQ * 100 / SPCENCTR_STROBE_DUTY_CYCLE))
MCFG_TIMER_PARAM(FALSE) /* indicates strobe OFF */
/* video hardware */
@@ -2373,7 +2373,7 @@ static MACHINE_CONFIG_DERIVED( phantom2, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(phantom2_io_map)
MCFG_MACHINE_START(phantom2)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* video hardware */
MCFG_VIDEO_UPDATE(phantom2)
@@ -2511,7 +2511,7 @@ static MACHINE_CONFIG_DERIVED( bowler, mw8080bw_root )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(bowler_io_map)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -2728,7 +2728,7 @@ MACHINE_CONFIG_DERIVED( invaders, mw8080bw_root )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(invaders_io_map)
MCFG_MACHINE_START(invaders)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* video hardware */
MCFG_VIDEO_UPDATE(invaders)
@@ -2809,7 +2809,7 @@ static MACHINE_CONFIG_DERIVED( blueshrk, mw8080bw_root )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(blueshrk_io_map)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
@@ -2909,7 +2909,7 @@ static MACHINE_CONFIG_DERIVED( invad2ct, mw8080bw_root )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(invad2ct_io_map)
- MCFG_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MCFG_MB14241_ADD("mb14241")
diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c
index 5c212b603cc..bf8fe28165e 100644
--- a/src/mame/drivers/mystwarr.c
+++ b/src/mame/drivers/mystwarr.c
@@ -950,7 +950,7 @@ static MACHINE_CONFIG_START( mystwarr, driver_device )
MCFG_CPU_PROGRAM_MAP(mystwarr_sound_map)
MCFG_CPU_PERIODIC_INT(nmi_line_pulse, 480)
- MCFG_QUANTUM_TIME(HZ(1920))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1920))
MCFG_EEPROM_ADD("eeprom", eeprom_intf)
diff --git a/src/mame/drivers/namcona1.c b/src/mame/drivers/namcona1.c
index cec536c1716..31c1b8af8a9 100644
--- a/src/mame/drivers/namcona1.c
+++ b/src/mame/drivers/namcona1.c
@@ -1018,7 +1018,7 @@ static MACHINE_CONFIG_START( namcona1, namcona1_state )
MCFG_NVRAM_HANDLER(namcosna1)
MCFG_MACHINE_START(namcona1)
MCFG_MACHINE_RESET(namcona1_mcu)
- MCFG_QUANTUM_TIME(HZ(2400))
+ MCFG_QUANTUM_TIME(attotime::from_hz(2400))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
diff --git a/src/mame/drivers/namcond1.c b/src/mame/drivers/namcond1.c
index 1cc5e42cf3b..d440800c8c8 100644
--- a/src/mame/drivers/namcond1.c
+++ b/src/mame/drivers/namcond1.c
@@ -300,7 +300,7 @@ static MACHINE_CONFIG_START( namcond1, driver_device )
MCFG_CPU_IO_MAP( nd1h8iomap)
MCFG_CPU_VBLANK_INT("screen", mcu_interrupt)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(namcond1)
MCFG_MACHINE_RESET(namcond1)
diff --git a/src/mame/drivers/namcos1.c b/src/mame/drivers/namcos1.c
index a8059b329ec..fb4cd65b1a3 100644
--- a/src/mame/drivers/namcos1.c
+++ b/src/mame/drivers/namcos1.c
@@ -1099,7 +1099,7 @@ static MACHINE_CONFIG_START( ns1, driver_device )
MCFG_CPU_VBLANK_INT("screen", irq0_line_assert)
// heavy sync required to prevent CPUs from fighting for video RAM access and going into deadlocks
- MCFG_QUANTUM_TIME(HZ(38400))
+ MCFG_QUANTUM_TIME(attotime::from_hz(38400))
MCFG_MACHINE_RESET(namcos1)
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/namcos2.c b/src/mame/drivers/namcos2.c
index e925f1acd26..e9c7238ae7a 100644
--- a/src/mame/drivers/namcos2.c
+++ b/src/mame/drivers/namcos2.c
@@ -1624,7 +1624,7 @@ static MACHINE_CONFIG_START( default, driver_device )
MCFG_CPU_PROGRAM_MAP(mcu_default_am)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(12000)) /* CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000)) /* CPU slices per frame */
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
@@ -1668,7 +1668,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( assaultp, default2 )
- MCFG_QUANTUM_TIME(HZ(12000*8)) /* CPU slices per frame - boosted (along with MCU speed) so that the Mode Select works */
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000*8)) /* CPU slices per frame - boosted (along with MCU speed) so that the Mode Select works */
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( default3, default )
@@ -1701,7 +1701,7 @@ static MACHINE_CONFIG_START( gollygho, driver_device )
MCFG_CPU_PROGRAM_MAP(mcu_default_am)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
@@ -1751,7 +1751,7 @@ static MACHINE_CONFIG_START( finallap, driver_device )
MCFG_CPU_PROGRAM_MAP(mcu_default_am)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
@@ -1801,7 +1801,7 @@ static MACHINE_CONFIG_START( sgunner, driver_device )
MCFG_CPU_PROGRAM_MAP(mcu_default_am)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
@@ -1851,7 +1851,7 @@ static MACHINE_CONFIG_START( luckywld, driver_device )
MCFG_CPU_PROGRAM_MAP(mcu_default_am)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
@@ -1901,7 +1901,7 @@ static MACHINE_CONFIG_START( metlhawk, driver_device )
MCFG_CPU_PROGRAM_MAP(mcu_default_am)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
diff --git a/src/mame/drivers/namcos21.c b/src/mame/drivers/namcos21.c
index f196302ef2e..1cccb0c8505 100644
--- a/src/mame/drivers/namcos21.c
+++ b/src/mame/drivers/namcos21.c
@@ -1551,7 +1551,7 @@ static MACHINE_CONFIG_START( s21base, namcos21_state )
MCFG_CPU_DATA_MAP(slave_dsp_data)
MCFG_CPU_IO_MAP(slave_dsp_io)
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
@@ -1623,7 +1623,7 @@ static MACHINE_CONFIG_START( driveyes, namcos21_state )
MCFG_CPU_DATA_MAP(winrun_dsp_data)
MCFG_CPU_IO_MAP(winrun_dsp_io)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
@@ -1682,7 +1682,7 @@ static MACHINE_CONFIG_START( winrun_c140_typeB, namcos21_state )
MCFG_CPU_PROGRAM_MAP(am_gpu_winrun)
MCFG_CPU_VBLANK_INT("screen", namcos2_68k_gpu_vblank)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
MCFG_MACHINE_START(namcos2)
MCFG_MACHINE_RESET(namcos2)
diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c
index 2c4a15342ed..439740f5425 100644
--- a/src/mame/drivers/namcos22.c
+++ b/src/mame/drivers/namcos22.c
@@ -2188,7 +2188,7 @@ static WRITE32_HANDLER( namcos22_system_controller_w )
{ /* SUBCPU enable on System 22 (guessed, but too early crashes Rave Racer so it's a good test) */
if (data == 0xff00)
{
- timer_set(space->machine, ATTOTIME_IN_MSEC(50), NULL, 0, start_subcpu);
+ timer_set(space->machine, attotime::from_msec(50), NULL, 0, start_subcpu);
}
}
}
@@ -2889,7 +2889,7 @@ static MACHINE_CONFIG_START( namcos22s, driver_device )
MCFG_CPU_IO_MAP( mcu_io)
MCFG_CPU_VBLANK_INT_HACK(mcu_interrupt, 3)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_NVRAM_HANDLER(namcos22)
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c
index 86c978e1cfa..8686f12bb30 100644
--- a/src/mame/drivers/namcos23.c
+++ b/src/mame/drivers/namcos23.c
@@ -1330,7 +1330,7 @@ static TIMER_CALLBACK( c361_timer_cb )
if (c361_scanline != 511)
{
cputag_set_input_line(machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE);
- timer_adjust_oneshot(c361_timer, attotime_never, 0);
+ timer_adjust_oneshot(c361_timer, attotime::never, 0);
}
}
@@ -1350,7 +1350,7 @@ static WRITE16_HANDLER(s23_c361_w)
if (data == 0x1ff)
{
cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ1, CLEAR_LINE);
- timer_adjust_oneshot(c361_timer, attotime_never, 0);
+ timer_adjust_oneshot(c361_timer, attotime::never, 0);
}
else
{
@@ -1808,7 +1808,7 @@ static WRITE32_HANDLER( p3d_w)
return;
case 0x17:
cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ1, CLEAR_LINE);
- timer_adjust_oneshot(c361_timer, attotime_never, 0);
+ timer_adjust_oneshot(c361_timer, attotime::never, 0);
return;
}
logerror("p3d_w %02x, %08x @ %08x (%08x, %08x)\n", offset, data, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31));
@@ -2041,7 +2041,7 @@ static INTERRUPT_GEN(s23_interrupt)
static MACHINE_START( s23 )
{
c361_timer = timer_alloc(machine, c361_timer_cb, 0);
- timer_adjust_oneshot(c361_timer, attotime_never, 0);
+ timer_adjust_oneshot(c361_timer, attotime::never, 0);
}
static ADDRESS_MAP_START( gorgon_map, ADDRESS_SPACE_PROGRAM, 32 )
@@ -2714,7 +2714,7 @@ static MACHINE_CONFIG_START( gorgon, driver_device )
MCFG_CPU_PROGRAM_MAP( gorgoniobrdmap )
MCFG_CPU_IO_MAP( s23iobrdiomap )
- MCFG_QUANTUM_TIME(HZ(60000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000))
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(S23_VSYNC1)
@@ -2760,7 +2760,7 @@ static MACHINE_CONFIG_START( s23, driver_device )
MCFG_CPU_PROGRAM_MAP( s23iobrdmap )
MCFG_CPU_IO_MAP( s23iobrdiomap )
- MCFG_QUANTUM_TIME(HZ(60*18000)) // higher than 60*20000 causes timecrs2 crash after power-on test $1e
+ MCFG_QUANTUM_TIME(attotime::from_hz(60*18000)) // higher than 60*20000 causes timecrs2 crash after power-on test $1e
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(S23_VSYNC1)
@@ -2802,7 +2802,7 @@ static MACHINE_CONFIG_START( ss23, driver_device )
MCFG_CPU_IO_MAP( s23h8noiobmap )
MCFG_CPU_VBLANK_INT("screen", irq1_line_pulse)
- MCFG_QUANTUM_TIME(HZ(60*18000)) // higher than 60*20000 causes timecrs2 crash after power-on test $1e
+ MCFG_QUANTUM_TIME(attotime::from_hz(60*18000)) // higher than 60*20000 causes timecrs2 crash after power-on test $1e
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(S23_VSYNC1)
diff --git a/src/mame/drivers/namcos86.c b/src/mame/drivers/namcos86.c
index b023290c86d..dfdbe5b645a 100644
--- a/src/mame/drivers/namcos86.c
+++ b/src/mame/drivers/namcos86.c
@@ -1010,7 +1010,7 @@ static MACHINE_CONFIG_START( hopmappy, driver_device )
MCFG_CPU_IO_MAP(mcu_port_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* ??? */
- MCFG_QUANTUM_TIME(HZ(48000)) /* heavy interleaving needed to avoid hangs in rthunder */
+ MCFG_QUANTUM_TIME(attotime::from_hz(48000)) /* heavy interleaving needed to avoid hangs in rthunder */
MCFG_MACHINE_RESET(namco86)
diff --git a/src/mame/drivers/neodrvr.c b/src/mame/drivers/neodrvr.c
index bd6a8ccb1ae..816fc9d3e7d 100644
--- a/src/mame/drivers/neodrvr.c
+++ b/src/mame/drivers/neodrvr.c
@@ -7968,8 +7968,8 @@ static DRIVER_INIT( ms5pcb )
DRIVER_INIT_CALL(neogeo);
/* start a timer that will check the BIOS select DIP every second */
- timer_set(machine, attotime_zero, NULL, 0, ms5pcb_bios_timer_callback);
- timer_pulse(machine, ATTOTIME_IN_MSEC(1000), NULL, 0, ms5pcb_bios_timer_callback);
+ timer_set(machine, attotime::zero, NULL, 0, ms5pcb_bios_timer_callback);
+ timer_pulse(machine, attotime::from_msec(1000), NULL, 0, ms5pcb_bios_timer_callback);
mslug5_decrypt_68k(machine);
svcpcb_gfx_decrypt(machine);
@@ -8005,8 +8005,8 @@ static DRIVER_INIT( svcpcb )
DRIVER_INIT_CALL(neogeo);
/* start a timer that will check the BIOS select DIP every second */
- timer_set(machine, attotime_zero, NULL, 0, svcpcb_bios_timer_callback);
- timer_pulse(machine, ATTOTIME_IN_MSEC(1000), NULL, 0, svcpcb_bios_timer_callback);
+ timer_set(machine, attotime::zero, NULL, 0, svcpcb_bios_timer_callback);
+ timer_pulse(machine, attotime::from_msec(1000), NULL, 0, svcpcb_bios_timer_callback);
svc_px_decrypt(machine);
svcpcb_gfx_decrypt(machine);
diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c
index c8dd024a838..e9d3776a221 100644
--- a/src/mame/drivers/neogeo.c
+++ b/src/mame/drivers/neogeo.c
@@ -646,7 +646,7 @@ static WRITE16_HANDLER( audio_command_w )
audio_cpu_assert_nmi(space->machine);
/* boost the interleave to let the audio CPU read the command */
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(50));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(50));
if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_command_w %04x - %04x\n", cpu_get_pc(space->cpu), data, mem_mask);
}
@@ -1351,7 +1351,7 @@ static MACHINE_CONFIG_START( neogeo, neogeo_state )
MCFG_CPU_PROGRAM_MAP(audio_map)
MCFG_CPU_IO_MAP(audio_io_map)
- MCFG_WATCHDOG_TIME_INIT(USEC(128762))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(128762))
MCFG_MACHINE_START(neogeo)
MCFG_MACHINE_RESET(neogeo)
diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c
index 6ea638a6386..7a3ec3d1fe8 100644
--- a/src/mame/drivers/neoprint.c
+++ b/src/mame/drivers/neoprint.c
@@ -141,7 +141,7 @@ static WRITE16_HANDLER( audio_command_w )
audio_cpu_assert_nmi(space->machine);
/* boost the interleave to let the audio CPU read the command */
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(50));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(50));
//if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_command_w %04x - %04x\n", cpu_get_pc(space->cpu), data, mem_mask);
}
diff --git a/src/mame/drivers/ninjaw.c b/src/mame/drivers/ninjaw.c
index 70d7bf444c3..90dfe56c760 100644
--- a/src/mame/drivers/ninjaw.c
+++ b/src/mame/drivers/ninjaw.c
@@ -811,7 +811,7 @@ static MACHINE_CONFIG_START( ninjaw, ninjaw_state )
MCFG_CPU_PROGRAM_MAP(ninjaw_slave_map)
MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* CPU slices */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices */
MCFG_MACHINE_START(ninjaw)
MCFG_MACHINE_RESET(ninjaw)
@@ -895,7 +895,7 @@ static MACHINE_CONFIG_START( darius2, ninjaw_state )
MCFG_CPU_PROGRAM_MAP(darius2_slave_map)
MCFG_CPU_VBLANK_INT("lscreen", irq4_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000)) /* CPU slices */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices */
MCFG_MACHINE_START(ninjaw)
MCFG_MACHINE_RESET(ninjaw)
diff --git a/src/mame/drivers/nitedrvr.c b/src/mame/drivers/nitedrvr.c
index e37258fa376..c7ad43aa396 100644
--- a/src/mame/drivers/nitedrvr.c
+++ b/src/mame/drivers/nitedrvr.c
@@ -145,7 +145,7 @@ static MACHINE_CONFIG_START( nitedrvr, nitedrvr_state )
MCFG_MACHINE_START(nitedrvr)
MCFG_MACHINE_RESET(nitedrvr)
- MCFG_TIMER_ADD_PERIODIC("crash_timer", nitedrvr_crash_toggle_callback, NSEC(PERIOD_OF_555_ASTABLE_NSEC(RES_K(180), 330, CAP_U(1))))
+ MCFG_TIMER_ADD_PERIODIC("crash_timer", nitedrvr_crash_toggle_callback, attotime::from_nsec(PERIOD_OF_555_ASTABLE_NSEC(RES_K(180), 330, CAP_U(1))))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c
index 30b81edffd7..7365600b0b8 100644
--- a/src/mame/drivers/nmk16.c
+++ b/src/mame/drivers/nmk16.c
@@ -3936,7 +3936,7 @@ static MACHINE_CONFIG_START( tdragon, driver_device )
MCFG_VIDEO_START(macross)
MCFG_VIDEO_EOF(nmk)
MCFG_VIDEO_UPDATE(tdragon)
- MCFG_TIMER_ADD_PERIODIC("coinsim", tdragon_mcu_sim, HZ(10000)) // not real, but for simulating the MCU
+ MCFG_TIMER_ADD_PERIODIC("coinsim", tdragon_mcu_sim, attotime::from_hz(10000)) // not real, but for simulating the MCU
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -4056,7 +4056,7 @@ static MACHINE_CONFIG_START( hachamf, driver_device )
MCFG_VIDEO_START(macross)
MCFG_VIDEO_EOF(nmk)
MCFG_VIDEO_UPDATE(hachamf)
- MCFG_TIMER_ADD_PERIODIC("coinsim", hachamf_mcu_sim, HZ(10000)) // not real, but for simulating the MCU
+ MCFG_TIMER_ADD_PERIODIC("coinsim", hachamf_mcu_sim, attotime::from_hz(10000)) // not real, but for simulating the MCU
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/nova2001.c b/src/mame/drivers/nova2001.c
index 298be8632ba..cea8d161d7b 100644
--- a/src/mame/drivers/nova2001.c
+++ b/src/mame/drivers/nova2001.c
@@ -724,7 +724,7 @@ static MACHINE_CONFIG_START( ninjakun, driver_device )
MCFG_CPU_PROGRAM_MAP(ninjakun_cpu2_map)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4) /* ? */
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
MCFG_MACHINE_START(ninjakun)
@@ -800,7 +800,7 @@ static MACHINE_CONFIG_START( raiders5, driver_device )
MCFG_CPU_PROGRAM_MAP(raiders5_cpu2_map)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4) /* ? */
- MCFG_QUANTUM_TIME(HZ(24000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(24000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/nss.c b/src/mame/drivers/nss.c
index 09543e14405..f94832af745 100644
--- a/src/mame/drivers/nss.c
+++ b/src/mame/drivers/nss.c
@@ -648,7 +648,7 @@ static MACHINE_CONFIG_START( snes, snes_state )
MCFG_CPU_ADD("soundcpu", SPC700, 2048000/2) /* 2.048 Mhz, but internal divider */
MCFG_CPU_PROGRAM_MAP(spc_mem)
-// MCFG_QUANTUM_TIME(HZ(24000))
+// MCFG_QUANTUM_TIME(attotime::from_hz(24000))
MCFG_QUANTUM_PERFECT_CPU("maincpu")
MCFG_MACHINE_START( snes )
diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c
index dc81cb25405..e3fad144b85 100644
--- a/src/mame/drivers/nwk-tr.c
+++ b/src/mame/drivers/nwk-tr.c
@@ -665,7 +665,7 @@ static MACHINE_CONFIG_START( nwktr, driver_device )
MCFG_CPU_CONFIG(sharc_cfg)
MCFG_CPU_DATA_MAP(sharc_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(nwktr)
MCFG_MACHINE_RESET(nwktr)
diff --git a/src/mame/drivers/nycaptor.c b/src/mame/drivers/nycaptor.c
index 9657cc54b42..7bca7677859 100644
--- a/src/mame/drivers/nycaptor.c
+++ b/src/mame/drivers/nycaptor.c
@@ -859,7 +859,7 @@ static MACHINE_CONFIG_START( nycaptor, nycaptor_state )
MCFG_CPU_ADD("mcu", M68705,2000000)
MCFG_CPU_PROGRAM_MAP(nycaptor_m68705_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs */
MCFG_MACHINE_START(nycaptor)
MCFG_MACHINE_RESET(nycaptor)
@@ -923,7 +923,7 @@ static MACHINE_CONFIG_START( cyclshtg, nycaptor_state )
MCFG_CPU_PROGRAM_MAP(nycaptor_m68705_map)
#endif
- MCFG_QUANTUM_TIME(HZ(60))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_START(nycaptor)
MCFG_MACHINE_RESET(nycaptor)
@@ -981,7 +981,7 @@ static MACHINE_CONFIG_START( bronx, nycaptor_state )
MCFG_CPU_PROGRAM_MAP(nycaptor_sound_map)
MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
- MCFG_QUANTUM_TIME(HZ(120))
+ MCFG_QUANTUM_TIME(attotime::from_hz(120))
MCFG_MACHINE_START(nycaptor)
MCFG_MACHINE_RESET(nycaptor)
diff --git a/src/mame/drivers/ohmygod.c b/src/mame/drivers/ohmygod.c
index 08033d72296..a4b425b3dbd 100644
--- a/src/mame/drivers/ohmygod.c
+++ b/src/mame/drivers/ohmygod.c
@@ -324,7 +324,7 @@ static MACHINE_CONFIG_START( ohmygod, ohmygod_state )
MCFG_CPU_PROGRAM_MAP(ohmygod_map)
MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START(ohmygod)
MCFG_MACHINE_RESET(ohmygod)
diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c
index c4aa4f43329..ae4cb3d623d 100644
--- a/src/mame/drivers/opwolf.c
+++ b/src/mame/drivers/opwolf.c
@@ -746,7 +746,7 @@ static MACHINE_CONFIG_START( opwolf, opwolf_state )
MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK ) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(opwolf_sound_z80_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(opwolf)
MCFG_MACHINE_RESET(opwolf)
@@ -803,7 +803,7 @@ static MACHINE_CONFIG_START( opwolfb, opwolf_state ) /* OSC clocks unknown for t
MCFG_CPU_PROGRAM_MAP(opwolfb_sub_z80_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(opwolf)
diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c
index cf48f68b758..21d75ab24fd 100644
--- a/src/mame/drivers/othello.c
+++ b/src/mame/drivers/othello.c
@@ -145,7 +145,7 @@ static WRITE8_HANDLER( unk_8a_w )
state->n7751_command = (data & 0x07);
cpu_set_input_line(state->n7751, 0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE);
//cpu_set_input_line(state->n7751, 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(100));
*/
logerror("8a -> %x\n", data);
diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c
index bc97b7c88d9..80054ec90f1 100644
--- a/src/mame/drivers/othunder.c
+++ b/src/mame/drivers/othunder.c
@@ -385,7 +385,7 @@ static WRITE16_HANDLER( othunder_lightgun_w )
The ADC60808 clock is 512kHz. Conversion takes between 0 and 8 clock
cycles, so would end in a maximum of 15.625us. We'll use 10. */
- timer_set(space->machine, ATTOTIME_IN_USEC(10), NULL,0, ad_interrupt);
+ timer_set(space->machine, attotime::from_usec(10), NULL,0, ad_interrupt);
}
diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c
index 179a7001a6e..b025f2e130c 100644
--- a/src/mame/drivers/overdriv.c
+++ b/src/mame/drivers/overdriv.c
@@ -346,7 +346,7 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state )
/* 60 fps, that's how I fixed it for now. */
MCFG_CPU_PROGRAM_MAP(overdriv_sound_map)
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_START(overdriv)
MCFG_MACHINE_RESET(overdriv)
diff --git a/src/mame/drivers/pacland.c b/src/mame/drivers/pacland.c
index 5b5ba61cd53..682d802bbda 100644
--- a/src/mame/drivers/pacland.c
+++ b/src/mame/drivers/pacland.c
@@ -410,7 +410,7 @@ static MACHINE_CONFIG_START( pacland, driver_device )
MCFG_CPU_IO_MAP(mcu_port_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_assert)
- MCFG_QUANTUM_TIME(HZ(6000)) /* we need heavy synching between the MCU and the CPU */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synching between the MCU and the CPU */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/pandoras.c b/src/mame/drivers/pandoras.c
index cbb8075ce28..ce9b227cb2c 100644
--- a/src/mame/drivers/pandoras.c
+++ b/src/mame/drivers/pandoras.c
@@ -367,7 +367,7 @@ static MACHINE_CONFIG_START( pandoras, pandoras_state )
MCFG_CPU_PROGRAM_MAP(pandoras_i8039_map)
MCFG_CPU_IO_MAP(pandoras_i8039_io_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - needed for correct synchronization of the sound CPUs */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - needed for correct synchronization of the sound CPUs */
MCFG_MACHINE_START(pandoras)
MCFG_MACHINE_RESET(pandoras)
diff --git a/src/mame/drivers/paranoia.c b/src/mame/drivers/paranoia.c
index 1a23309f833..438ad73a09a 100644
--- a/src/mame/drivers/paranoia.c
+++ b/src/mame/drivers/paranoia.c
@@ -142,7 +142,7 @@ static MACHINE_CONFIG_START( paranoia, driver_device )
MCFG_CPU_IO_MAP(pce_io)
MCFG_CPU_VBLANK_INT_HACK(pce_interrupt, VDC_LPF)
- MCFG_QUANTUM_TIME(HZ(60))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_CPU_ADD("sub", I8085A, 18000000/3)
MCFG_CPU_PROGRAM_MAP(paranoia_8085_map)
diff --git a/src/mame/drivers/parodius.c b/src/mame/drivers/parodius.c
index dc014987b77..0e76e5cc018 100644
--- a/src/mame/drivers/parodius.c
+++ b/src/mame/drivers/parodius.c
@@ -139,7 +139,7 @@ static WRITE8_HANDLER( sound_arm_nmi_w )
parodius_state *state = space->machine->driver_data<parodius_state>();
cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(space->machine, ATTOTIME_IN_USEC(50), NULL, 0, nmi_callback); /* kludge until the K053260 is emulated correctly */
+ timer_set(space->machine, attotime::from_usec(50), NULL, 0, nmi_callback); /* kludge until the K053260 is emulated correctly */
}
/********************************************/
diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c
index dbb9d7968c4..69b135383cd 100644
--- a/src/mame/drivers/pgm.c
+++ b/src/mame/drivers/pgm.c
@@ -390,7 +390,7 @@ static WRITE16_HANDLER( arm7_latch_68k_w )
COMBINE_DATA(&state->kov2_latchdata_68k_w);
generic_pulse_irq_line(state->prot, ARM7_FIRQ_LINE);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(200));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(200));
cpu_spinuntil_time(space->cpu, state->prot->cycles_to_attotime(200)); // give the arm time to respond (just boosting the interleave doesn't help)
}
@@ -930,7 +930,7 @@ static WRITE16_HANDLER( svg_68k_nmi_w )
{
pgm_state *state = space->machine->driver_data<pgm_state>();
generic_pulse_irq_line(state->prot, ARM7_FIRQ_LINE);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(200));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(200));
cpu_spinuntil_time(space->cpu, state->prot->cycles_to_attotime(200)); // give the arm time to respond (just boosting the interleave doesn't help)
}
diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c
index 039b05bbed4..ccc928f1973 100644
--- a/src/mame/drivers/photon2.c
+++ b/src/mame/drivers/photon2.c
@@ -302,7 +302,7 @@ static MACHINE_CONFIG_START( photon2, driver_device )
MCFG_CPU_PROGRAM_MAP(spectrum_mem)
MCFG_CPU_IO_MAP(spectrum_io)
MCFG_CPU_VBLANK_INT_HACK(spec_interrupt_hack, 2)
- MCFG_QUANTUM_TIME(HZ(60))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_RESET( photon2 )
diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c
index 5ede7752bda..35d724407bd 100644
--- a/src/mame/drivers/pipeline.c
+++ b/src/mame/drivers/pipeline.c
@@ -162,7 +162,7 @@ static TIMER_CALLBACK( protection_deferred_w )
static WRITE8_DEVICE_HANDLER(protection_w)
{
timer_call_after_resynch(device->machine, NULL, data, protection_deferred_w);
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(100));
}
static ADDRESS_MAP_START( cpu0_mem, ADDRESS_SPACE_PROGRAM, 8 )
diff --git a/src/mame/drivers/pitnrun.c b/src/mame/drivers/pitnrun.c
index c041aa1b216..bc2aa27d051 100644
--- a/src/mame/drivers/pitnrun.c
+++ b/src/mame/drivers/pitnrun.c
@@ -243,7 +243,7 @@ static MACHINE_CONFIG_START( pitnrun, pitnrun_state )
MCFG_MACHINE_RESET(pitnrun)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c
index 34d34b0ea80..795806f3d52 100644
--- a/src/mame/drivers/plygonet.c
+++ b/src/mame/drivers/plygonet.c
@@ -657,7 +657,7 @@ static MACHINE_CONFIG_START( plygonet, polygonet_state )
MCFG_EEPROM_ADD("eeprom", eeprom_intf)
/* TODO: TEMPORARY! UNTIL A MORE LOCALIZED SYNC CAN BE MADE */
- MCFG_QUANTUM_TIME(HZ(1200000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1200000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/polepos.c b/src/mame/drivers/polepos.c
index bc1ca31f999..203ccb4a844 100644
--- a/src/mame/drivers/polepos.c
+++ b/src/mame/drivers/polepos.c
@@ -889,7 +889,7 @@ static MACHINE_CONFIG_START( polepos, driver_device )
MCFG_WATCHDOG_VBLANK_INIT(16) // 128V clocks the same as VBLANK
- MCFG_QUANTUM_TIME(HZ(6000)) /* some interleaving */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* some interleaving */
MCFG_MACHINE_RESET(polepos)
MCFG_NVRAM_ADD_1FILL("nvram")
@@ -972,7 +972,7 @@ static MACHINE_CONFIG_START( topracern, driver_device )
MCFG_WATCHDOG_VBLANK_INIT(16) // 128V clocks the same as VBLANK
- MCFG_QUANTUM_TIME(HZ(6000)) /* some interleaving */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* some interleaving */
MCFG_MACHINE_RESET(polepos)
MCFG_NVRAM_ADD_1FILL("nvram")
diff --git a/src/mame/drivers/polyplay.c b/src/mame/drivers/polyplay.c
index 08cf3fd6064..23bb227e9d4 100644
--- a/src/mame/drivers/polyplay.c
+++ b/src/mame/drivers/polyplay.c
@@ -237,7 +237,7 @@ static WRITE8_HANDLER( polyplay_start_timer2 )
polyplay_timer->reset();
if (data == 0xb5)
- polyplay_timer->adjust(ATTOTIME_IN_HZ(40), 0, ATTOTIME_IN_HZ(40));
+ polyplay_timer->adjust(attotime::from_hz(40), 0, attotime::from_hz(40));
}
static READ8_HANDLER( polyplay_random_read )
diff --git a/src/mame/drivers/popper.c b/src/mame/drivers/popper.c
index f56202190d9..ac341937ecd 100644
--- a/src/mame/drivers/popper.c
+++ b/src/mame/drivers/popper.c
@@ -336,7 +336,7 @@ static MACHINE_CONFIG_START( popper, popper_state )
MCFG_CPU_PROGRAM_MAP(popper_sound_map)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4) //NMIs caused by the main CPU
- MCFG_QUANTUM_TIME(HZ(1800))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1800))
MCFG_MACHINE_START(popper)
MCFG_MACHINE_RESET(popper)
diff --git a/src/mame/drivers/psychic5.c b/src/mame/drivers/psychic5.c
index bc0eb95ac37..ddc9fb83662 100644
--- a/src/mame/drivers/psychic5.c
+++ b/src/mame/drivers/psychic5.c
@@ -667,7 +667,7 @@ static MACHINE_CONFIG_START( psychic5, driver_device )
MCFG_CPU_PROGRAM_MAP(psychic5_sound_map)
MCFG_CPU_IO_MAP(psychic5_soundport_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* Allow time for 2nd cpu to interleave */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* Allow time for 2nd cpu to interleave */
MCFG_MACHINE_RESET(psychic5)
/* video hardware */
@@ -714,7 +714,7 @@ static MACHINE_CONFIG_START( bombsa, driver_device )
MCFG_CPU_PROGRAM_MAP(bombsa_sound_map)
MCFG_CPU_IO_MAP(bombsa_soundport_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(psychic5)
/* video hardware */
diff --git a/src/mame/drivers/pushman.c b/src/mame/drivers/pushman.c
index abdba73219b..50ace081a91 100644
--- a/src/mame/drivers/pushman.c
+++ b/src/mame/drivers/pushman.c
@@ -447,7 +447,7 @@ static MACHINE_CONFIG_START( pushman, pushman_state )
MCFG_CPU_ADD("mcu", M68705, 4000000) /* No idea */
MCFG_CPU_PROGRAM_MAP(mcu_map)
- MCFG_QUANTUM_TIME(HZ(3600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(3600))
MCFG_MACHINE_START(pushman)
MCFG_MACHINE_RESET(pushman)
@@ -497,7 +497,7 @@ static MACHINE_CONFIG_START( bballs, pushman_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_IO_MAP(sound_io_map)
- MCFG_QUANTUM_TIME(HZ(3600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(3600))
MCFG_MACHINE_START(pushman)
MCFG_MACHINE_RESET(bballs)
diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c
index be98079647c..4c25679bac6 100644
--- a/src/mame/drivers/qdrmfgp.c
+++ b/src/mame/drivers/qdrmfgp.c
@@ -616,7 +616,7 @@ static MACHINE_START( qdrmfgp )
static MACHINE_START( qdrmfgp2 )
{
/* sound irq (CCU? 240Hz) */
- timer_pulse(machine, ATTOTIME_IN_HZ(18432000/76800), NULL, 0, gp2_timer_callback);
+ timer_pulse(machine, attotime::from_hz(18432000/76800), NULL, 0, gp2_timer_callback);
MACHINE_START_CALL( qdrmfgp );
}
diff --git a/src/mame/drivers/quasar.c b/src/mame/drivers/quasar.c
index 6f8297b2d0c..294ffa47868 100644
--- a/src/mame/drivers/quasar.c
+++ b/src/mame/drivers/quasar.c
@@ -374,7 +374,7 @@ static MACHINE_CONFIG_START( quasar, cvs_state )
MCFG_MACHINE_START(quasar)
MCFG_MACHINE_RESET(quasar)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c
index 6904c6afa12..b36802f65a8 100644
--- a/src/mame/drivers/rabbit.c
+++ b/src/mame/drivers/rabbit.c
@@ -633,7 +633,7 @@ static void rabbit_do_blit(running_machine *machine)
if (!blt_amount)
{
if(BLITLOG) mame_printf_debug("end of blit list\n");
- timer_set(machine, ATTOTIME_IN_USEC(500), NULL,0,rabbit_blit_done);
+ timer_set(machine, attotime::from_usec(500), NULL,0,rabbit_blit_done);
return;
}
diff --git a/src/mame/drivers/raiden.c b/src/mame/drivers/raiden.c
index be7954f161a..81f55f663d6 100644
--- a/src/mame/drivers/raiden.c
+++ b/src/mame/drivers/raiden.c
@@ -262,7 +262,7 @@ static MACHINE_CONFIG_START( raiden, raiden_state )
SEIBU_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verified on pcb */
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_RESET(seibu_sound)
diff --git a/src/mame/drivers/rainbow.c b/src/mame/drivers/rainbow.c
index d0fc54de772..50ec4360afe 100644
--- a/src/mame/drivers/rainbow.c
+++ b/src/mame/drivers/rainbow.c
@@ -685,7 +685,7 @@ static MACHINE_CONFIG_START( rainbow, rainbow_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(rainbow_sound_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(rainbow)
@@ -728,7 +728,7 @@ static MACHINE_CONFIG_START( jumping, rainbow_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6) /* not verified but music tempo matches original */
MCFG_CPU_PROGRAM_MAP(jumping_sound_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough ? */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough ? */
MCFG_MACHINE_START(rainbow)
diff --git a/src/mame/drivers/rastan.c b/src/mame/drivers/rastan.c
index d3491fdf02f..b51baa64e60 100644
--- a/src/mame/drivers/rastan.c
+++ b/src/mame/drivers/rastan.c
@@ -419,7 +419,7 @@ static MACHINE_CONFIG_START( rastan, rastan_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(rastan_s_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(rastan)
MCFG_MACHINE_RESET(rastan)
diff --git a/src/mame/drivers/retofinv.c b/src/mame/drivers/retofinv.c
index 53ab306384f..9a5d807f593 100644
--- a/src/mame/drivers/retofinv.c
+++ b/src/mame/drivers/retofinv.c
@@ -354,7 +354,7 @@ static MACHINE_CONFIG_START( retofinv, driver_device )
MCFG_CPU_ADD("68705", M68705,18432000/6) /* 3.072 MHz? */
MCFG_CPU_PROGRAM_MAP(mcu_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - enough for the sound CPU to read all commands */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c
index f78a30d3050..7900f4dce3a 100644
--- a/src/mame/drivers/rollerg.c
+++ b/src/mame/drivers/rollerg.c
@@ -72,7 +72,7 @@ static WRITE8_HANDLER( sound_arm_nmi_w )
{
rollerg_state *state = space->machine->driver_data<rollerg_state>();
cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(space->machine, ATTOTIME_IN_USEC(50), NULL, 0, nmi_callback); /* kludge until the K053260 is emulated correctly */
+ timer_set(space->machine, attotime::from_usec(50), NULL, 0, nmi_callback); /* kludge until the K053260 is emulated correctly */
}
static READ8_HANDLER( pip_r )
diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c
index 0028d4ec5c2..9fc93f8231b 100644
--- a/src/mame/drivers/rungun.c
+++ b/src/mame/drivers/rungun.c
@@ -404,7 +404,7 @@ static MACHINE_CONFIG_START( rng, rungun_state )
MCFG_CPU_PROGRAM_MAP(rungun_sound_map)
MCFG_CPU_PERIODIC_INT(audio_interrupt, 480)
- MCFG_QUANTUM_TIME(HZ(6000)) // higher if sound stutters
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // higher if sound stutters
MCFG_GFXDECODE(rungun)
diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c
index c220355be41..1f0046429fe 100644
--- a/src/mame/drivers/sandscrp.c
+++ b/src/mame/drivers/sandscrp.c
@@ -198,7 +198,7 @@ static WRITE16_HANDLER( sandscrp_soundlatch_word_w )
latch1_full = 1;
soundlatch_w(space, 0, data & 0xff);
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100)); // Allow the other cpu to reply
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(100)); // Allow the other cpu to reply
}
}
@@ -449,7 +449,7 @@ static MACHINE_CONFIG_START( sandscrp, driver_device )
MCFG_CPU_PROGRAM_MAP(sandscrp_soundmem)
MCFG_CPU_IO_MAP(sandscrp_soundport)
- MCFG_WATCHDOG_TIME_INIT(SEC(3)) /* a guess, and certainly wrong */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_RESET(sandscrp)
diff --git a/src/mame/drivers/sbrkout.c b/src/mame/drivers/sbrkout.c
index 3d0be888f41..4ceddb34d57 100644
--- a/src/mame/drivers/sbrkout.c
+++ b/src/mame/drivers/sbrkout.c
@@ -62,7 +62,7 @@ public:
*************************************/
#define MAIN_CLOCK XTAL_12_096MHz
-#define TIME_4V ATTOTIME_IN_HZ(MAIN_CLOCK/2/256/2/4)
+#define TIME_4V attotime::from_hz(MAIN_CLOCK/2/256/2/4)
diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c
index 378fc01104a..300271e0c72 100644
--- a/src/mame/drivers/seattle.c
+++ b/src/mame/drivers/seattle.c
@@ -227,7 +227,7 @@ public:
*************************************/
#define SYSTEM_CLOCK 50000000
-#define TIMER_PERIOD ATTOTIME_IN_HZ(SYSTEM_CLOCK)
+#define TIMER_PERIOD attotime::from_hz(SYSTEM_CLOCK)
/* various board configurations */
#define PHOENIX_CONFIG (0)
@@ -1240,7 +1240,7 @@ static WRITE32_HANDLER( galileo_w )
UINT32 elapsed = (timer_timeelapsed(timer->timer) * SYSTEM_CLOCK).as_double();
timer->active = 0;
timer->count = (timer->count > elapsed) ? (timer->count - elapsed) : 0;
- timer_adjust_oneshot(timer->timer, attotime_never, which);
+ timer_adjust_oneshot(timer->timer, attotime::never, which);
if (LOG_TIMERS)
logerror("Disabled timer\n");
}
diff --git a/src/mame/drivers/segag80r.c b/src/mame/drivers/segag80r.c
index 324311d8969..cc4605b2d99 100644
--- a/src/mame/drivers/segag80r.c
+++ b/src/mame/drivers/segag80r.c
@@ -298,7 +298,7 @@ static WRITE8_DEVICE_HANDLER( sindbadm_soundport_w )
address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
soundlatch_w(space, 0, data);
cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(50));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(50));
}
diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c
index a6bb33bbbd5..796d475eeac 100644
--- a/src/mame/drivers/segahang.c
+++ b/src/mame/drivers/segahang.c
@@ -924,7 +924,7 @@ static MACHINE_CONFIG_START( hangon_base, segas1x_state )
MCFG_CPU_PROGRAM_MAP(sub_map)
MCFG_MACHINE_RESET(hangon)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_PPI8255_ADD( "ppi8255_1", hangon_ppi_intf[0] )
MCFG_PPI8255_ADD( "ppi8255_2", hangon_ppi_intf[1] )
diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c
index cf35776dc18..1c3382ccc53 100644
--- a/src/mame/drivers/segaorun.c
+++ b/src/mame/drivers/segaorun.c
@@ -447,7 +447,7 @@ static void update_main_irqs(running_machine *machine)
cpu_set_input_line(state->maincpu, 6, state->vblank_irq_state && state->irq2_state ? ASSERT_LINE : CLEAR_LINE);
if (state->vblank_irq_state || state->irq2_state)
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(100));
}
@@ -1116,7 +1116,7 @@ static MACHINE_CONFIG_START( outrun_base, segas1x_state )
MCFG_CPU_IO_MAP(sound_portmap)
MCFG_MACHINE_RESET(outrun)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_PPI8255_ADD( "ppi8255", single_ppi_intf )
diff --git a/src/mame/drivers/segas16a.c b/src/mame/drivers/segas16a.c
index 097d6c8dd98..f6a60259b6c 100644
--- a/src/mame/drivers/segas16a.c
+++ b/src/mame/drivers/segas16a.c
@@ -473,7 +473,7 @@ static WRITE8_DEVICE_HANDLER( n7751_control_w )
cpu_set_input_line(state->n7751, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
cpu_set_input_line(state->n7751, 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(100));
}
@@ -887,7 +887,7 @@ static WRITE8_HANDLER( mcu_control_w )
segaic16_set_display_enable(space->machine, 1);
if ((state->mcu_control ^ data) & 0x40)
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(10));
state->mcu_control = data;
}
@@ -991,7 +991,7 @@ static INTERRUPT_GEN( mcu_irq_assert )
cpu_set_input_line(device, MCS51_INT0_LINE, CLEAR_LINE);
/* boost interleave to ensure that the MCU can break the M68000 out of a STOP */
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(100));
}
diff --git a/src/mame/drivers/segas16b.c b/src/mame/drivers/segas16b.c
index 6a03bd77475..2f28e8e565d 100644
--- a/src/mame/drivers/segas16b.c
+++ b/src/mame/drivers/segas16b.c
@@ -1110,7 +1110,7 @@ static TIMER_CALLBACK( suspend_i8751 )
static TIMER_CALLBACK( boost_interleave )
{
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_MSEC(10));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_msec(10));
}
@@ -3351,7 +3351,7 @@ static MACHINE_CONFIG_DERIVED( atomicp, system16b ) /* 10MHz CPU Clock verified
MCFG_DEVICE_REMOVE("soundcpu")
MCFG_MACHINE_START(atomicp)
- MCFG_TIMER_ADD_PERIODIC("atomicp_timer", atomicp_sound_irq, HZ(10000))
+ MCFG_TIMER_ADD_PERIODIC("atomicp_timer", atomicp_sound_irq, attotime::from_hz(10000))
/* sound hardware */
MCFG_SOUND_REPLACE("ymsnd", YM2413, XTAL_20MHz/4) /* 20MHz OSC divided by 4 (verified) */
diff --git a/src/mame/drivers/segas18.c b/src/mame/drivers/segas18.c
index ee3a11246ba..864167c38d2 100644
--- a/src/mame/drivers/segas18.c
+++ b/src/mame/drivers/segas18.c
@@ -205,7 +205,7 @@ static void system18_generic_init(running_machine *machine, int _rom_board)
static TIMER_CALLBACK( boost_interleave )
{
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_MSEC(10));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_msec(10));
}
diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c
index aa2bc1ba6eb..8052a36e75e 100644
--- a/src/mame/drivers/segas24.c
+++ b/src/mame/drivers/segas24.c
@@ -828,7 +828,7 @@ static void irq_timer_reset(void)
int freq = (irq_timerb << 12) | irq_timera;
freq &= 0x1fff;
- irq_timer->adjust(ATTOTIME_IN_HZ(freq), 0, ATTOTIME_IN_HZ(freq));
+ irq_timer->adjust(attotime::from_hz(freq), 0, attotime::from_hz(freq));
logerror("New timer frequency: %0d [%02x %04x]\n", freq, irq_timerb, irq_timera);
}
@@ -915,7 +915,7 @@ static INTERRUPT_GEN(irq_vbl)
irq_vblank = 1;
}
- irq_timer_clear->adjust(ATTOTIME_IN_HZ(VIDEO_CLOCK/2/656.0));
+ irq_timer_clear->adjust(attotime::from_hz(VIDEO_CLOCK/2/656.0));
mask = 1 << irq;
@@ -1781,7 +1781,7 @@ static MACHINE_CONFIG_START( system24, driver_device )
MCFG_CPU_ADD("sub", M68000, MASTER_CLOCK/2)
MCFG_CPU_PROGRAM_MAP(system24_cpu2_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(system24)
MCFG_MACHINE_RESET(system24)
diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c
index 117a98a1db4..b6359c53d78 100644
--- a/src/mame/drivers/segaxbd.c
+++ b/src/mame/drivers/segaxbd.c
@@ -313,7 +313,7 @@ static void update_main_irqs(running_machine *machine)
if (irq)
{
cpu_set_input_line(state->maincpu, irq, ASSERT_LINE);
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(100));
}
}
@@ -418,7 +418,7 @@ static void xboard_reset(device_t *device)
segas1x_state *state = device->machine->driver_data<segas1x_state>();
cpu_set_input_line(state->subcpu, INPUT_LINE_RESET, PULSE_LINE);
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(100));
}
@@ -677,7 +677,7 @@ static WRITE16_HANDLER( loffire_sync0_w )
segas1x_state *state = space->machine->driver_data<segas1x_state>();
COMBINE_DATA(&state->loffire_sync[offset]);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(10));
}
@@ -1347,7 +1347,7 @@ static MACHINE_CONFIG_START( xboard, segas1x_state )
MCFG_MACHINE_RESET(xboard)
MCFG_NVRAM_ADD_0FILL("backup1")
MCFG_NVRAM_ADD_0FILL("backup2")
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_315_5248_ADD("5248_main")
MCFG_315_5248_ADD("5248_subx")
diff --git a/src/mame/drivers/segaybd.c b/src/mame/drivers/segaybd.c
index febd9dae1e0..ab6f33d87ea 100644
--- a/src/mame/drivers/segaybd.c
+++ b/src/mame/drivers/segaybd.c
@@ -96,7 +96,7 @@ static void update_main_irqs(running_machine *machine)
cpu_set_input_line(state->suby, 6, state->timer_irq_state && state->vblank_irq_state ? ASSERT_LINE : CLEAR_LINE);
if (state->timer_irq_state || state->vblank_irq_state)
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(50));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(50));
}
@@ -1005,7 +1005,7 @@ static MACHINE_CONFIG_START( yboard, segas1x_state )
MCFG_MACHINE_START(yboard)
MCFG_MACHINE_RESET(yboard)
MCFG_NVRAM_ADD_0FILL("backupram")
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_TIMER_ADD("int_timer", scanline_callback)
diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c
index 5c7bc3c5598..a581bb6e3ef 100644
--- a/src/mame/drivers/seibuspi.c
+++ b/src/mame/drivers/seibuspi.c
@@ -1864,7 +1864,7 @@ static MACHINE_CONFIG_START( spi, driver_device )
MCFG_CPU_ADD("soundcpu", Z80, 28636360/4)
MCFG_CPU_PROGRAM_MAP(spisound_map)
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_START(spi)
MCFG_MACHINE_RESET(spi)
diff --git a/src/mame/drivers/seicross.c b/src/mame/drivers/seicross.c
index 5e5092a4f55..fa0265e6f87 100644
--- a/src/mame/drivers/seicross.c
+++ b/src/mame/drivers/seicross.c
@@ -402,7 +402,7 @@ static MACHINE_CONFIG_START( nvram, seicross_state )
MCFG_CPU_ADD("mcu", NSC8105, 6000000) /* ??? */
MCFG_CPU_PROGRAM_MAP(mcu_nvram_map)
- MCFG_QUANTUM_TIME(HZ(1200)) /* 20 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(1200)) /* 20 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_RESET(friskyt)
MCFG_NVRAM_HANDLER(seicross)
diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c
index 1b2c1bb68a9..4361c22265c 100644
--- a/src/mame/drivers/seta.c
+++ b/src/mame/drivers/seta.c
@@ -1336,7 +1336,7 @@ static void uPD71054_update_timer( running_machine *machine, device_t *cpu, int
attotime period = attotime::from_hz(cputag_get_clock(machine, "maincpu")) * (16 * max);
timer_adjust_oneshot( uPD71054->timer[no], period, no );
} else {
- timer_adjust_oneshot( uPD71054->timer[no], attotime_never, no);
+ timer_adjust_oneshot( uPD71054->timer[no], attotime::never, no);
logerror( "CPU #0 PC %06X: uPD71054 error, timer %d duration is 0\n",
(cpu != NULL) ? cpu_get_pc(cpu) : -1, no );
}
@@ -1663,7 +1663,7 @@ static WRITE16_HANDLER( calibr50_soundlatch_w )
{
soundlatch_word_w(space, 0, data, mem_mask);
cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, PULSE_LINE);
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50)); // Allow the other cpu to reply
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(50)); // Allow the other cpu to reply
}
}
@@ -2064,7 +2064,7 @@ static WRITE16_HANDLER( keroppi_prize_w )
if ((data & 0x0010) && !state->keroppi_prize_hop)
{
state->keroppi_prize_hop = 1;
- timer_set(space->machine, ATTOTIME_IN_SEC(3), NULL, 0x20, keroppi_prize_hop_callback); /* 3 seconds */
+ timer_set(space->machine, attotime::from_seconds(3), NULL, 0x20, keroppi_prize_hop_callback); /* 3 seconds */
}
}
@@ -3030,7 +3030,7 @@ static MACHINE_RESET(calibr50)
static WRITE8_HANDLER( calibr50_soundlatch2_w )
{
soundlatch2_w(space,0,data);
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50)); // Allow the other cpu to reply
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(50)); // Allow the other cpu to reply
}
static ADDRESS_MAP_START( calibr50_sub_map, ADDRESS_SPACE_PROGRAM, 8 )
diff --git a/src/mame/drivers/sfcbox.c b/src/mame/drivers/sfcbox.c
index 25101584092..3803b05445f 100644
--- a/src/mame/drivers/sfcbox.c
+++ b/src/mame/drivers/sfcbox.c
@@ -215,7 +215,7 @@ static MACHINE_CONFIG_START( snes, snes_state )
MCFG_CPU_ADD("soundcpu", SPC700, 2048000/2) /* 2.048 Mhz, but internal divider */
MCFG_CPU_PROGRAM_MAP(spc_mem)
- MCFG_QUANTUM_TIME(HZ(24000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(24000))
MCFG_MACHINE_START( snes )
MCFG_MACHINE_RESET( snes )
diff --git a/src/mame/drivers/sfkick.c b/src/mame/drivers/sfkick.c
index 0108abe150a..ca29e9b8199 100644
--- a/src/mame/drivers/sfkick.c
+++ b/src/mame/drivers/sfkick.c
@@ -464,7 +464,7 @@ static MACHINE_CONFIG_START( sfkick, driver_device )
MCFG_CPU_IO_MAP(sfkick_io_map)
MCFG_CPU_VBLANK_INT_HACK(sfkick_interrupt,262)
- MCFG_QUANTUM_TIME(HZ(60000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000))
MCFG_CPU_ADD("soundcpu",Z80,MASTER_CLOCK/6)
MCFG_CPU_PROGRAM_MAP(sfkick_sound_map)
diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c
index 735e7b1fbf2..fa1cccdcd9a 100644
--- a/src/mame/drivers/shanghai.c
+++ b/src/mame/drivers/shanghai.c
@@ -502,7 +502,7 @@ static MACHINE_CONFIG_START( kothello, driver_device )
SEIBU3A_SOUND_SYSTEM_CPU(14318180/4)
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_RESET(seibu_sound)
diff --git a/src/mame/drivers/shangkid.c b/src/mame/drivers/shangkid.c
index 393e76f3bfa..b43266534fe 100644
--- a/src/mame/drivers/shangkid.c
+++ b/src/mame/drivers/shangkid.c
@@ -381,7 +381,7 @@ static MACHINE_CONFIG_START( chinhero, shangkid_state )
MCFG_MACHINE_RESET(chinhero)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c
index 268e9adf6ac..7c6bf982753 100644
--- a/src/mame/drivers/shougi.c
+++ b/src/mame/drivers/shougi.c
@@ -405,7 +405,7 @@ static MACHINE_CONFIG_START( shougi, shougi_state )
MCFG_CPU_ADD("mcu", ALPHA8201, 10000000/4/8)
MCFG_CPU_PROGRAM_MAP(mcu_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_WATCHDOG_VBLANK_INIT(16) // assuming it's the same as champbas
/* video hardware */
diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c
index 4b0e84f13b8..5b39c18ec3f 100644
--- a/src/mame/drivers/sidearms.c
+++ b/src/mame/drivers/sidearms.c
@@ -753,7 +753,7 @@ static MACHINE_CONFIG_START( whizz, sidearms_state )
MCFG_CPU_IO_MAP(whizz_io_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(60000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM)
diff --git a/src/mame/drivers/simpl156.c b/src/mame/drivers/simpl156.c
index f96a94dcef0..8c894b3e48f 100644
--- a/src/mame/drivers/simpl156.c
+++ b/src/mame/drivers/simpl156.c
@@ -1049,7 +1049,7 @@ static READ32_HANDLER( joemacr_speedup_r )
{
simpl156_state *state = space->machine->driver_data<simpl156_state>();
if (cpu_get_pc(space->cpu) == 0x284)
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(400));
return state->systemram[0x18/4];
}
@@ -1064,7 +1064,7 @@ static READ32_HANDLER( chainrec_speedup_r )
{
simpl156_state *state = space->machine->driver_data<simpl156_state>();
if (cpu_get_pc(space->cpu) == 0x2d4)
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(400));
return state->systemram[0x18/4];
}
@@ -1078,7 +1078,7 @@ static READ32_HANDLER( prtytime_speedup_r )
{
simpl156_state *state = space->machine->driver_data<simpl156_state>();
if (cpu_get_pc(space->cpu) == 0x4f0)
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(400));
return state->systemram[0xae0/4];
}
@@ -1093,7 +1093,7 @@ static READ32_HANDLER( charlien_speedup_r )
{
simpl156_state *state = space->machine->driver_data<simpl156_state>();
if (cpu_get_pc(space->cpu) == 0xc8c8)
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(400));
return state->systemram[0x10/4];
}
@@ -1107,7 +1107,7 @@ static READ32_HANDLER( osman_speedup_r )
{
simpl156_state *state = space->machine->driver_data<simpl156_state>();
if (cpu_get_pc(space->cpu) == 0x5974)
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(400));
return state->systemram[0x10/4];
}
diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c
index 7dc036b6c5a..0148b9adc01 100644
--- a/src/mame/drivers/simpsons.c
+++ b/src/mame/drivers/simpsons.c
@@ -130,7 +130,7 @@ static WRITE8_HANDLER( z80_arm_nmi_w )
{
simpsons_state *state = space->machine->driver_data<simpsons_state>();
cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(space->machine, ATTOTIME_IN_USEC(25), NULL, 0, nmi_callback); /* kludge until the K053260 is emulated correctly */
+ timer_set(space->machine, attotime::from_usec(25), NULL, 0, nmi_callback); /* kludge until the K053260 is emulated correctly */
}
static ADDRESS_MAP_START( z80_map, ADDRESS_SPACE_PROGRAM, 8 )
@@ -269,7 +269,7 @@ static INTERRUPT_GEN( simpsons_irq )
{
simpsons_objdma(device->machine);
// 32+256us delay at 8MHz dotclock; artificially shortened since actual V-blank length is unknown
- timer_set(device->machine, ATTOTIME_IN_USEC(30), NULL, 0, dmaend_callback);
+ timer_set(device->machine, attotime::from_usec(30), NULL, 0, dmaend_callback);
}
if (k052109_is_irq_enabled(state->k052109))
diff --git a/src/mame/drivers/skykid.c b/src/mame/drivers/skykid.c
index 43f38a331b3..8d1a2080861 100644
--- a/src/mame/drivers/skykid.c
+++ b/src/mame/drivers/skykid.c
@@ -437,7 +437,7 @@ static MACHINE_CONFIG_START( skykid, driver_device )
MCFG_CPU_IO_MAP(mcu_port_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_assert)
- MCFG_QUANTUM_TIME(HZ(6000)) /* we need heavy synch */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */
MCFG_MACHINE_START(skykid)
diff --git a/src/mame/drivers/slapfght.c b/src/mame/drivers/slapfght.c
index ea8b78772c5..d17bae8caf8 100644
--- a/src/mame/drivers/slapfght.c
+++ b/src/mame/drivers/slapfght.c
@@ -755,7 +755,7 @@ static MACHINE_CONFIG_START( perfrman, driver_device )
MCFG_CPU_PROGRAM_MAP(perfrman_sound_map)
MCFG_CPU_VBLANK_INT_HACK(getstar_interrupt,4) /* music speed, verified */
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_RESET(slapfight)
@@ -802,7 +802,7 @@ static MACHINE_CONFIG_START( tigerhb, driver_device )
MCFG_CPU_PROGRAM_MAP(slapfght_sound_map)
MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,6) /* ??? */
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_RESET(slapfight)
@@ -851,7 +851,7 @@ static MACHINE_CONFIG_START( tigerh, driver_device )
MCFG_CPU_ADD("mcu", M68705,XTAL_36MHz/12) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(tigerh_m68705_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_RESET(slapfight)
@@ -901,7 +901,7 @@ static MACHINE_CONFIG_START( slapfigh, driver_device )
MCFG_CPU_ADD("mcu", M68705, XTAL_36MHz/12) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(slapfight_m68705_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_RESET(slapfight)
diff --git a/src/mame/drivers/slapshot.c b/src/mame/drivers/slapshot.c
index d15ec47fa15..690eaa0d037 100644
--- a/src/mame/drivers/slapshot.c
+++ b/src/mame/drivers/slapshot.c
@@ -561,7 +561,7 @@ static MACHINE_CONFIG_START( slapshot, slapshot_state )
MCFG_CPU_ADD("audiocpu", Z80,32000000/8) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(opwolf3_z80_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(slapshot)
@@ -610,7 +610,7 @@ static MACHINE_CONFIG_START( opwolf3, slapshot_state )
MCFG_CPU_ADD("audiocpu", Z80,32000000/8) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(opwolf3_z80_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(slapshot)
diff --git a/src/mame/drivers/sms.c b/src/mame/drivers/sms.c
index 2780b6dbe46..582326df68c 100644
--- a/src/mame/drivers/sms.c
+++ b/src/mame/drivers/sms.c
@@ -540,7 +540,7 @@ static MACHINE_CONFIG_START( sms, driver_device )
MCFG_CPU_ADD("soundcpu", Z80, XTAL_16MHz/8)
MCFG_CPU_PROGRAM_MAP(sub_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(sms)
MCFG_MACHINE_RESET(sms)
diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c
index 4a993798002..2e4a382f13d 100644
--- a/src/mame/drivers/snk.c
+++ b/src/mame/drivers/snk.c
@@ -3647,7 +3647,7 @@ static MACHINE_CONFIG_START( marvins, snk_state )
MCFG_CPU_IO_MAP(marvins_sound_portmap)
MCFG_CPU_PERIODIC_INT(nmi_line_assert, 244) // schematics show a separate 244Hz timer
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
@@ -3717,7 +3717,7 @@ static MACHINE_CONFIG_START( jcross, snk_state )
MCFG_CPU_IO_MAP(jcross_sound_portmap)
MCFG_CPU_PERIODIC_INT(irq0_line_assert, 244) // Marvin's frequency, sounds ok
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
@@ -3796,7 +3796,7 @@ static MACHINE_CONFIG_START( tnk3, snk_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(tnk3_YM3526_sound_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
@@ -3881,7 +3881,7 @@ static MACHINE_CONFIG_START( ikari, snk_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(YM3526_YM3526_sound_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
@@ -3939,7 +3939,7 @@ static MACHINE_CONFIG_START( bermudat, snk_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(YM3526_Y8950_sound_map)
- MCFG_QUANTUM_TIME(HZ(24000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(24000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -4043,7 +4043,7 @@ static MACHINE_CONFIG_START( tdfever, snk_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
MCFG_CPU_PROGRAM_MAP(YM3526_Y8950_sound_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
diff --git a/src/mame/drivers/snk6502.c b/src/mame/drivers/snk6502.c
index 1cf25d995b2..8737c6f1eba 100644
--- a/src/mame/drivers/snk6502.c
+++ b/src/mame/drivers/snk6502.c
@@ -848,7 +848,7 @@ static MACHINE_CONFIG_START( sasuke, snk6502_state )
MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / 16, mc6845_intf)
- MCFG_TIMER_ADD_PERIODIC("sasuke_timer", sasuke_update_counter, HZ(MASTER_CLOCK / 8)) // 1.4 MHz
+ MCFG_TIMER_ADD_PERIODIC("sasuke_timer", sasuke_update_counter, attotime::from_hz(MASTER_CLOCK / 8)) // 1.4 MHz
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c
index 79c4e0e9842..cf5533237bb 100644
--- a/src/mame/drivers/sothello.c
+++ b/src/mame/drivers/sothello.c
@@ -360,7 +360,7 @@ static MACHINE_CONFIG_START( sothello, driver_device )
MCFG_CPU_ADD("sub",M6809, SUBCPU_CLOCK)
MCFG_CPU_PROGRAM_MAP(subcpu_mem_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(sothello)
diff --git a/src/mame/drivers/spacefb.c b/src/mame/drivers/spacefb.c
index 4c099081856..2b713d7056a 100644
--- a/src/mame/drivers/spacefb.c
+++ b/src/mame/drivers/spacefb.c
@@ -344,7 +344,7 @@ static MACHINE_CONFIG_START( spacefb, driver_device )
MCFG_CPU_PROGRAM_MAP(spacefb_audio_map)
MCFG_CPU_IO_MAP(spacefb_audio_io_map)
- MCFG_QUANTUM_TIME(HZ(180))
+ MCFG_QUANTUM_TIME(attotime::from_hz(180))
MCFG_MACHINE_START(spacefb)
MCFG_MACHINE_RESET(spacefb)
diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c
index 8472b5b9797..f0ed2c8bf61 100644
--- a/src/mame/drivers/speglsht.c
+++ b/src/mame/drivers/speglsht.c
@@ -331,7 +331,7 @@ static MACHINE_CONFIG_START( speglsht, driver_device )
MCFG_CPU_PROGRAM_MAP(speglsht_mem)
MCFG_CPU_VBLANK_INT("screen", irq4_line_assert)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(speglsht)
/* video hardware */
diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c
index 92a550ed0ca..13cad981348 100644
--- a/src/mame/drivers/splash.c
+++ b/src/mame/drivers/splash.c
@@ -67,7 +67,7 @@ static WRITE16_HANDLER( roldf_sh_irqtrigger_w )
}
// give the z80 time to see it
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(40));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(40));
}
static WRITE16_HANDLER( splash_coin_w )
diff --git a/src/mame/drivers/sprint8.c b/src/mame/drivers/sprint8.c
index afc8838d806..38d1d16a04d 100644
--- a/src/mame/drivers/sprint8.c
+++ b/src/mame/drivers/sprint8.c
@@ -461,7 +461,7 @@ static MACHINE_CONFIG_START( sprint8, sprint8_state )
MCFG_MACHINE_RESET(sprint8)
- MCFG_TIMER_ADD_PERIODIC("input_timer", input_callback, HZ(60))
+ MCFG_TIMER_ADD_PERIODIC("input_timer", input_callback, attotime::from_hz(60))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c
index 1891661e766..4082f6bdcf4 100644
--- a/src/mame/drivers/srmp5.c
+++ b/src/mame/drivers/srmp5.c
@@ -565,7 +565,7 @@ static MACHINE_CONFIG_START( srmp5, srmp5_state )
MCFG_CPU_PROGRAM_MAP(srmp5_mem)
MCFG_CPU_VBLANK_INT("screen", irq4_line_assert)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c
index dcb23cdae1a..36ee4dda8a0 100644
--- a/src/mame/drivers/ssfindo.c
+++ b/src/mame/drivers/ssfindo.c
@@ -266,9 +266,9 @@ static void PS7500_startTimer0(void)
int val=((PS7500_IO[T0low]&0xff)|((PS7500_IO[T0high]&0xff)<<8))>>1;
if(val==0)
- timer_adjust_oneshot(PS7500timer0, attotime_never, 0);
+ timer_adjust_oneshot(PS7500timer0, attotime::never, 0);
else
- timer_adjust_periodic(PS7500timer0, ATTOTIME_IN_USEC(val ), 0, ATTOTIME_IN_USEC(val ));
+ timer_adjust_periodic(PS7500timer0, attotime::from_usec(val ), 0, attotime::from_usec(val ));
}
static TIMER_CALLBACK( PS7500_Timer1_callback )
@@ -284,9 +284,9 @@ static void PS7500_startTimer1(void)
{
int val=((PS7500_IO[T1low]&0xff)|((PS7500_IO[T1high]&0xff)<<8))>>1;
if(val==0)
- timer_adjust_oneshot(PS7500timer1, attotime_never, 0);
+ timer_adjust_oneshot(PS7500timer1, attotime::never, 0);
else
- timer_adjust_periodic(PS7500timer1, ATTOTIME_IN_USEC(val ), 0, ATTOTIME_IN_USEC(val ));
+ timer_adjust_periodic(PS7500timer1, attotime::from_usec(val ), 0, attotime::from_usec(val ));
}
static INTERRUPT_GEN( ssfindo_interrupt )
@@ -303,8 +303,8 @@ static void PS7500_reset(void)
PS7500_IO[IOCR] = 0x3f;
PS7500_IO[VIDCR] = 0;
- timer_adjust_oneshot( PS7500timer0, attotime_never, 0);
- timer_adjust_oneshot( PS7500timer1, attotime_never, 0);
+ timer_adjust_oneshot( PS7500timer0, attotime::never, 0);
+ timer_adjust_oneshot( PS7500timer1, attotime::never, 0);
}
static READ32_HANDLER(PS7500_IO_r)
diff --git a/src/mame/drivers/sshangha.c b/src/mame/drivers/sshangha.c
index d6c71bb8667..3d8a31833df 100644
--- a/src/mame/drivers/sshangha.c
+++ b/src/mame/drivers/sshangha.c
@@ -352,7 +352,7 @@ static MACHINE_CONFIG_START( sshangha, driver_device )
MCFG_CPU_ADD("audiocpu", Z80, 16000000/4)
MCFG_CPU_PROGRAM_MAP(sshangha_sound_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(sshangha) /* init machine */
diff --git a/src/mame/drivers/sslam.c b/src/mame/drivers/sslam.c
index f2bdb170c76..ad797d01c64 100644
--- a/src/mame/drivers/sslam.c
+++ b/src/mame/drivers/sslam.c
@@ -270,7 +270,7 @@ static void sslam_play(device_t *device, int track, int data)
oki->write_command(0x40);
oki->write_command((0x80 | data));
oki->write_command(0x81);
- timer_adjust_periodic(state->music_timer, ATTOTIME_IN_MSEC(4), 0, ATTOTIME_IN_HZ(250)); /* 250Hz for smooth sequencing */
+ timer_adjust_periodic(state->music_timer, attotime::from_msec(4), 0, attotime::from_hz(250)); /* 250Hz for smooth sequencing */
}
}
else {
diff --git a/src/mame/drivers/st0016.c b/src/mame/drivers/st0016.c
index 4eda4188573..b7c2e6e9533 100644
--- a/src/mame/drivers/st0016.c
+++ b/src/mame/drivers/st0016.c
@@ -465,7 +465,7 @@ static MACHINE_CONFIG_DERIVED( mayjinsn, st0016 )
MCFG_CPU_IO_MAP(st0016_m2_io)
MCFG_CPU_ADD("sub", V810, 10000000)//25 Mhz ?
MCFG_CPU_PROGRAM_MAP(v810_mem)
- MCFG_QUANTUM_TIME(HZ(60))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
MACHINE_CONFIG_END
/*************************************
diff --git a/src/mame/drivers/starwars.c b/src/mame/drivers/starwars.c
index 43e4303c94f..3937a232851 100644
--- a/src/mame/drivers/starwars.c
+++ b/src/mame/drivers/starwars.c
@@ -322,7 +322,7 @@ static MACHINE_CONFIG_START( starwars, starwars_state )
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_WATCHDOG_TIME_INIT(HZ(CLOCK_3KHZ / 128))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(CLOCK_3KHZ / 128))
MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK / 8)
MCFG_CPU_PROGRAM_MAP(sound_map)
diff --git a/src/mame/drivers/stfight.c b/src/mame/drivers/stfight.c
index a09d1ef18a5..0167d062d27 100644
--- a/src/mame/drivers/stfight.c
+++ b/src/mame/drivers/stfight.c
@@ -442,7 +442,7 @@ static MACHINE_CONFIG_START( stfight, driver_device )
MCFG_CPU_PROGRAM_MAP(cpu2_map)
MCFG_CPU_PERIODIC_INT(irq0_line_hold,120)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(stfight)
diff --git a/src/mame/drivers/strnskil.c b/src/mame/drivers/strnskil.c
index 113f219b6e5..0d25cf4ffca 100644
--- a/src/mame/drivers/strnskil.c
+++ b/src/mame/drivers/strnskil.c
@@ -326,7 +326,7 @@ static MACHINE_CONFIG_START( strnskil, strnskil_state )
MCFG_CPU_PROGRAM_MAP(strnskil_map2)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c
index 8e0afa5df3f..5a697d08f55 100644
--- a/src/mame/drivers/stv.c
+++ b/src/mame/drivers/stv.c
@@ -1531,7 +1531,7 @@ static void dma_direct_lv0(address_space *space)
if(LOG_SCU) logerror("DMA transfer END\n");
/*TODO: timing of this*/
- timer_set(space->machine, ATTOTIME_IN_USEC(300), NULL, 0, dma_lv0_ended);
+ timer_set(space->machine, attotime::from_usec(300), NULL, 0, dma_lv0_ended);
if(scu_add_tmp & 0x80000000)
{
@@ -1632,7 +1632,7 @@ static void dma_direct_lv1(address_space *space)
if(LOG_SCU) logerror("DMA transfer END\n");
- timer_set(space->machine, ATTOTIME_IN_USEC(300), NULL, 0, dma_lv1_ended);
+ timer_set(space->machine, attotime::from_usec(300), NULL, 0, dma_lv1_ended);
if(scu_add_tmp & 0x80000000)
{
@@ -1733,7 +1733,7 @@ static void dma_direct_lv2(address_space *space)
if(LOG_SCU) logerror("DMA transfer END\n");
- timer_set(space->machine, ATTOTIME_IN_USEC(300), NULL, 0, dma_lv2_ended);
+ timer_set(space->machine, attotime::from_usec(300), NULL, 0, dma_lv2_ended);
if(scu_add_tmp & 0x80000000)
{
@@ -1808,7 +1808,7 @@ static void dma_indirect_lv0(address_space *space)
}while(job_done == 0);
- timer_set(space->machine, ATTOTIME_IN_USEC(300), NULL, 0, dma_lv0_ended);
+ timer_set(space->machine, attotime::from_usec(300), NULL, 0, dma_lv0_ended);
}
static void dma_indirect_lv1(address_space *space)
@@ -1877,7 +1877,7 @@ static void dma_indirect_lv1(address_space *space)
}while(job_done == 0);
- timer_set(space->machine, ATTOTIME_IN_USEC(300), NULL, 0, dma_lv1_ended);
+ timer_set(space->machine, attotime::from_usec(300), NULL, 0, dma_lv1_ended);
}
static void dma_indirect_lv2(address_space *space)
@@ -1945,7 +1945,7 @@ static void dma_indirect_lv2(address_space *space)
}while(job_done == 0);
- timer_set(space->machine, ATTOTIME_IN_USEC(300), NULL, 0, dma_lv2_ended);
+ timer_set(space->machine, attotime::from_usec(300), NULL, 0, dma_lv2_ended);
}
@@ -1969,7 +1969,7 @@ static READ32_HANDLER( stv_sh2_soundram_r )
static WRITE32_HANDLER( minit_w )
{
logerror("cpu %s (PC=%08X) MINIT write = %08x\n", space->cpu->tag(), cpu_get_pc(space->cpu),data);
- cpuexec_boost_interleave(space->machine, minit_boost_timeslice, ATTOTIME_IN_USEC(minit_boost));
+ cpuexec_boost_interleave(space->machine, minit_boost_timeslice, attotime::from_usec(minit_boost));
cpuexec_trigger(space->machine, 1000);
sh2_set_frt_input(space->machine->device("slave"), PULSE_LINE);
}
@@ -1977,7 +1977,7 @@ static WRITE32_HANDLER( minit_w )
static WRITE32_HANDLER( sinit_w )
{
logerror("cpu %s (PC=%08X) SINIT write = %08x\n", space->cpu->tag(), cpu_get_pc(space->cpu),data);
- cpuexec_boost_interleave(space->machine, sinit_boost_timeslice, ATTOTIME_IN_USEC(sinit_boost));
+ cpuexec_boost_interleave(space->machine, sinit_boost_timeslice, attotime::from_usec(sinit_boost));
sh2_set_frt_input(space->machine->device("maincpu"), PULSE_LINE);
}
@@ -2343,8 +2343,8 @@ DRIVER_INIT ( stv )
/* amount of time to boost interleave for on MINIT / SINIT, needed for communication to work */
minit_boost = 400;
sinit_boost = 400;
- minit_boost_timeslice = attotime_zero;
- sinit_boost_timeslice = attotime_zero;
+ minit_boost_timeslice = attotime::zero;
+ sinit_boost_timeslice = attotime::zero;
smpc_ram = auto_alloc_array(machine, UINT8, 0x80);
stv_scu = auto_alloc_array(machine, UINT32, 0x100/4);
@@ -2848,7 +2848,7 @@ static MACHINE_RESET( stv )
vblank_out_timer->adjust(machine->primary_screen->time_until_pos(0));
scan_timer->adjust(machine->primary_screen->time_until_pos(224, 352));
- timer_adjust_periodic(stv_rtc_timer, attotime_zero, 0, ATTOTIME_IN_SEC(1));
+ timer_adjust_periodic(stv_rtc_timer, attotime::zero, 0, attotime::from_seconds(1));
}
diff --git a/src/mame/drivers/stvinit.c b/src/mame/drivers/stvinit.c
index 55a375ed20b..a44e617fe40 100644
--- a/src/mame/drivers/stvinit.c
+++ b/src/mame/drivers/stvinit.c
@@ -113,7 +113,7 @@ DRIVER_INIT(prikura)
DRIVER_INIT_CALL(stv);
minit_boost = sinit_boost = 0;
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
@@ -169,7 +169,7 @@ DRIVER_INIT(puyosun)
DRIVER_INIT_CALL(stv);
minit_boost = sinit_boost = 0;
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
/* mausuke
@@ -189,7 +189,7 @@ DRIVER_INIT(mausuke)
DRIVER_INIT_CALL(stv);
minit_boost = sinit_boost = 0;
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT(cottonbm)
@@ -199,7 +199,7 @@ DRIVER_INIT(cottonbm)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(10);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(10);
}
DRIVER_INIT(cotton2)
@@ -209,7 +209,7 @@ DRIVER_INIT(cotton2)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT(dnmtdeka)
@@ -260,7 +260,7 @@ DRIVER_INIT( groovef )
DRIVER_INIT_CALL(stv);
minit_boost = sinit_boost = 0;
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT( danchih )
@@ -271,7 +271,7 @@ DRIVER_INIT( danchih )
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(5);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(5);
}
@@ -325,7 +325,7 @@ DRIVER_INIT(thunt)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(1);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(1);
}
DRIVER_INIT(sandor)
@@ -335,7 +335,7 @@ DRIVER_INIT(sandor)
sh2drc_add_pcflush(machine->device("slave"), 0x602abcc);
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(1);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(1);
}
@@ -346,7 +346,7 @@ DRIVER_INIT(grdforce)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT(batmanfr)
@@ -357,7 +357,7 @@ DRIVER_INIT(batmanfr)
DRIVER_INIT_CALL(stv);
minit_boost = sinit_boost = 0;
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT(colmns97)
@@ -377,7 +377,7 @@ DRIVER_INIT(winterht)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(2);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(2);
}
DRIVER_INIT(seabass)
@@ -387,7 +387,7 @@ DRIVER_INIT(seabass)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(5);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(5);
}
DRIVER_INIT(vfremix)
@@ -397,7 +397,7 @@ DRIVER_INIT(vfremix)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(20);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(20);
}
DRIVER_INIT(sss)
@@ -409,7 +409,7 @@ DRIVER_INIT(sss)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT(othellos)
@@ -419,7 +419,7 @@ DRIVER_INIT(othellos)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
@@ -429,7 +429,7 @@ DRIVER_INIT(sasissu)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(2);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(2);
}
DRIVER_INIT(gaxeduel)
@@ -451,7 +451,7 @@ DRIVER_INIT(sokyugrt)
{
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT(znpwfv)
@@ -460,7 +460,7 @@ DRIVER_INIT(znpwfv)
sh2drc_add_pcflush(machine->device("slave"), 0x60175a6);
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_NSEC(500);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_nsec(500);
}
DRIVER_INIT(twcup98)
@@ -471,7 +471,7 @@ DRIVER_INIT(twcup98)
DRIVER_INIT_CALL(stv);
install_twcup98_protection(machine);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(5);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(5);
}
DRIVER_INIT(smleague)
@@ -481,7 +481,7 @@ DRIVER_INIT(smleague)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT(finlarch)
@@ -499,7 +499,7 @@ DRIVER_INIT(maruchan)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(50);
}
DRIVER_INIT(pblbeach)
@@ -524,7 +524,7 @@ DRIVER_INIT(elandore)
install_elandore_protection(machine);
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(0);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(0);
}
@@ -537,7 +537,7 @@ DRIVER_INIT(rsgun)
DRIVER_INIT_CALL(stv);
- minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(20);
+ minit_boost_timeslice = sinit_boost_timeslice = attotime::from_usec(20);
}
diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c
index 32a2237011f..54307ca8db5 100644
--- a/src/mame/drivers/subsino2.c
+++ b/src/mame/drivers/subsino2.c
@@ -1851,7 +1851,7 @@ static MACHINE_CONFIG_START( bishjan, driver_device )
MCFG_CPU_ADD("maincpu", H83044, XTAL_44_1MHz / 3)
MCFG_CPU_PROGRAM_MAP( bishjan_map )
MCFG_CPU_VBLANK_INT( "screen", irq0_line_hold )
- MCFG_TIMER_ADD_PERIODIC("timer", h8_timer_irq, HZ(60)) // timer, ?? Hz
+ MCFG_TIMER_ADD_PERIODIC("timer", h8_timer_irq, attotime::from_hz(60)) // timer, ?? Hz
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_TICKET_DISPENSER_ADD("hopper", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
@@ -1913,7 +1913,7 @@ static MACHINE_CONFIG_START( saklove, driver_device )
MCFG_CPU_ADD("maincpu", I80188, XTAL_20MHz ) // !! AMD AM188-EM !!
MCFG_CPU_PROGRAM_MAP( saklove_map )
MCFG_CPU_IO_MAP( saklove_io )
- MCFG_TIMER_ADD_PERIODIC("timer2", am188em_timer2_irq, HZ(60)) // timer 2, ?? Hz
+ MCFG_TIMER_ADD_PERIODIC("timer2", am188em_timer2_irq, attotime::from_hz(60)) // timer 2, ?? Hz
MCFG_MACHINE_RESET(am188em)
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1951,7 +1951,7 @@ static MACHINE_CONFIG_START( xplan, driver_device )
MCFG_CPU_PROGRAM_MAP( xplan_map )
MCFG_CPU_IO_MAP( xplan_io )
MCFG_CPU_VBLANK_INT( "screen", am188em_int0_irq )
- MCFG_TIMER_ADD_PERIODIC("timer2", am188em_timer2_irq, HZ(60)) // timer 2, ?? Hz
+ MCFG_TIMER_ADD_PERIODIC("timer2", am188em_timer2_irq, attotime::from_hz(60)) // timer 2, ?? Hz
MCFG_MACHINE_RESET(am188em)
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c
index 3883c286424..915f3e7e279 100644
--- a/src/mame/drivers/suna16.c
+++ b/src/mame/drivers/suna16.c
@@ -767,7 +767,7 @@ static MACHINE_CONFIG_START( bssoccer, suna16_state )
MCFG_CPU_PROGRAM_MAP(bssoccer_pcm_2_map)
MCFG_CPU_IO_MAP(bssoccer_pcm_2_io_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -825,7 +825,7 @@ static MACHINE_CONFIG_START( uballoon, suna16_state )
/* 2nd PCM Z80 missing */
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(uballoon)
@@ -877,7 +877,7 @@ static MACHINE_CONFIG_START( sunaq, suna16_state )
/* 2nd PCM Z80 missing */
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -950,7 +950,7 @@ static MACHINE_CONFIG_START( bestbest, suna16_state )
/* 2nd PCM Z80 missing */
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c
index 9a97ed0d4ea..dddc6e95736 100644
--- a/src/mame/drivers/superchs.c
+++ b/src/mame/drivers/superchs.c
@@ -379,7 +379,7 @@ static MACHINE_CONFIG_START( superchs, driver_device )
MCFG_CPU_PROGRAM_MAP(superchs_cpub_map)
MCFG_CPU_VBLANK_INT("screen", irq4_line_hold)/* VBL */
- MCFG_QUANTUM_TIME(HZ(480)) /* CPU slices - Need to interleave Cpu's 1 & 3 */
+ MCFG_QUANTUM_TIME(attotime::from_hz(480)) /* CPU slices - Need to interleave Cpu's 1 & 3 */
MCFG_EEPROM_ADD("eeprom", superchs_eeprom_interface)
diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c
index 46b68b2f1d9..c6ef2ee89fc 100644
--- a/src/mame/drivers/superqix.c
+++ b/src/mame/drivers/superqix.c
@@ -377,7 +377,7 @@ logerror("Z80 sends command %02x\n",param);
from_z80 = param;
from_mcu_pending = 0;
cputag_set_input_line(machine, "mcu", 0, HOLD_LINE);
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(200));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(200));
}
static TIMER_CALLBACK( delayed_mcu_z80_w )
@@ -1091,7 +1091,7 @@ static MACHINE_CONFIG_START( sqix, driver_device )
MCFG_CPU_ADD("mcu", I8751, 12000000/3) /* ??? */
MCFG_CPU_IO_MAP(bootleg_mcu_io_map)
- MCFG_QUANTUM_TIME(HZ(30000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_MACHINE_START(superqix)
diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c
index 2a4da2d1a4b..3782a2a7190 100644
--- a/src/mame/drivers/suprloco.c
+++ b/src/mame/drivers/suprloco.c
@@ -23,7 +23,7 @@ static WRITE8_HANDLER( suprloco_soundport_w )
soundlatch_w(space, 0, data);
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
/* spin for a while to let the Z80 read the command (fixes hanging sound in Regulus) */
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(50));
}
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c
index f4bda1a9068..119fe1877ee 100644
--- a/src/mame/drivers/suprnova.c
+++ b/src/mame/drivers/suprnova.c
@@ -841,11 +841,11 @@ static MACHINE_CONFIG_START( skns, driver_device )
MCFG_MACHINE_RESET(skns)
MCFG_NVRAM_ADD_1FILL("nvram")
- MCFG_TIMER_ADD_PERIODIC("int15_timer", interrupt_callback, MSEC(2))
+ MCFG_TIMER_ADD_PERIODIC("int15_timer", interrupt_callback, attotime::from_msec(2))
MCFG_TIMER_PARAM(15)
- MCFG_TIMER_ADD_PERIODIC("int11_timer", interrupt_callback, MSEC(8))
+ MCFG_TIMER_ADD_PERIODIC("int11_timer", interrupt_callback, attotime::from_msec(8))
MCFG_TIMER_PARAM(11)
- MCFG_TIMER_ADD_PERIODIC("int9_timer", interrupt_callback, HZ(28638000/1824))
+ MCFG_TIMER_ADD_PERIODIC("int9_timer", interrupt_callback, attotime::from_hz(28638000/1824))
MCFG_TIMER_PARAM(9)
MCFG_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c
index 15d7b9958c7..b339fb01a8d 100644
--- a/src/mame/drivers/system1.c
+++ b/src/mame/drivers/system1.c
@@ -514,7 +514,7 @@ static WRITE8_HANDLER( soundport_w )
{
/* boost interleave when communicating with the sound CPU */
soundlatch_w(space, 0, data);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(100));
}
@@ -598,7 +598,7 @@ static INTERRUPT_GEN( mcu_irq_assert )
cpu_set_input_line(device, MCS51_INT0_LINE, CLEAR_LINE);
/* boost interleave to ensure that the MCU can break the Z80 out of a HALT */
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(10));
}
@@ -655,7 +655,7 @@ static WRITE8_HANDLER( nob_maincpu_latch_w )
{
nob_maincpu_latch = data;
cputag_set_input_line(space->machine, "mcu", MCS51_INT0_LINE, ASSERT_LINE);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(100));
}
@@ -2180,7 +2180,7 @@ static MACHINE_CONFIG_FRAGMENT( mcu )
MCFG_CPU_IO_MAP(mcu_io_map)
MCFG_CPU_VBLANK_INT("screen", mcu_irq_assert)
- MCFG_TIMER_ADD_PERIODIC("mcu_t0", mcu_t0_callback, MSEC(20)) /* ??? actual clock unknown */
+ MCFG_TIMER_ADD_PERIODIC("mcu_t0", mcu_t0_callback, attotime::from_msec(20)) /* ??? actual clock unknown */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c
index f74220ff8b9..eef01d19bcc 100644
--- a/src/mame/drivers/taito_b.c
+++ b/src/mame/drivers/taito_b.c
@@ -2226,7 +2226,7 @@ static MACHINE_CONFIG_START( rastsag2, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2273,7 +2273,7 @@ static MACHINE_CONFIG_START( ashura, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2320,7 +2320,7 @@ static MACHINE_CONFIG_START( crimec, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2367,7 +2367,7 @@ static MACHINE_CONFIG_START( tetrist, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2413,7 +2413,7 @@ static MACHINE_CONFIG_START( tetrista, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(masterw_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2460,7 +2460,7 @@ static MACHINE_CONFIG_START( hitice, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(viofight_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2512,7 +2512,7 @@ static MACHINE_CONFIG_START( rambo3, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/6) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2559,7 +2559,7 @@ static MACHINE_CONFIG_START( rambo3a, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/6) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2608,7 +2608,7 @@ static MACHINE_CONFIG_START( pbobble, taitob_state )
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_EEPROM_ADD("eeprom", taitob_eeprom_intf)
@@ -2656,7 +2656,7 @@ static MACHINE_CONFIG_START( spacedx, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2707,7 +2707,7 @@ static MACHINE_CONFIG_START( spacedxo, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2754,7 +2754,7 @@ static MACHINE_CONFIG_START( qzshowby, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2805,7 +2805,7 @@ static MACHINE_CONFIG_START( viofight, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 6000000) /* 6 MHz verified */
MCFG_CPU_PROGRAM_MAP(viofight_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2855,7 +2855,7 @@ static MACHINE_CONFIG_START( masterw, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(masterw_sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2903,7 +2903,7 @@ static MACHINE_CONFIG_START( silentd, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -2950,7 +2950,7 @@ static MACHINE_CONFIG_START( selfeena, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -3006,7 +3006,7 @@ static MACHINE_CONFIG_START( ryujin, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
@@ -3060,7 +3060,7 @@ static MACHINE_CONFIG_START( sbm, taitob_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitob)
MCFG_MACHINE_RESET(taitob)
diff --git a/src/mame/drivers/taito_h.c b/src/mame/drivers/taito_h.c
index 85f16c5cceb..18c030519b5 100644
--- a/src/mame/drivers/taito_h.c
+++ b/src/mame/drivers/taito_h.c
@@ -576,7 +576,7 @@ static MACHINE_CONFIG_START( syvalion, taitoh_state )
MCFG_MACHINE_START(taitoh)
MCFG_MACHINE_RESET(taitoh)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", taitoh_io_intf)
@@ -621,7 +621,7 @@ static MACHINE_CONFIG_START( recordbr, taitoh_state )
MCFG_MACHINE_START(taitoh)
MCFG_MACHINE_RESET(taitoh)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", taitoh_io_intf)
@@ -666,7 +666,7 @@ static MACHINE_CONFIG_START( dleague, taitoh_state )
MCFG_MACHINE_START(taitoh)
MCFG_MACHINE_RESET(taitoh)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", taitoh_io_intf)
diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c
index 5c52273b644..a0bc6578dfe 100644
--- a/src/mame/drivers/taito_l.c
+++ b/src/mame/drivers/taito_l.c
@@ -2036,7 +2036,7 @@ static MACHINE_CONFIG_START( fhawk, taitol_state )
MCFG_CPU_PROGRAM_MAP(fhawk_2_map)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,3) /* fixes slow down problems */
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(taito_l)
MCFG_MACHINE_RESET(fhawk)
@@ -2133,7 +2133,7 @@ static MACHINE_CONFIG_START( kurikint, taitol_state )
MCFG_CPU_PROGRAM_MAP(kurikint_2_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(taito_l)
MCFG_MACHINE_RESET(kurikint)
@@ -2273,7 +2273,7 @@ static MACHINE_CONFIG_START( evilston, taitol_state )
MCFG_CPU_PROGRAM_MAP(evilston_2_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(taito_l)
MCFG_MACHINE_RESET(evilston)
diff --git a/src/mame/drivers/taito_x.c b/src/mame/drivers/taito_x.c
index 21b9f871aa8..d92e707b122 100644
--- a/src/mame/drivers/taito_x.c
+++ b/src/mame/drivers/taito_x.c
@@ -919,7 +919,7 @@ static MACHINE_CONFIG_START( superman, seta_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(taitox)
MCFG_MACHINE_RESET(cchip1)
@@ -961,7 +961,7 @@ static MACHINE_CONFIG_START( daisenpu, seta_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(daisenpu_sound_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(taitox)
@@ -1000,7 +1000,7 @@ static MACHINE_CONFIG_START( gigandes, seta_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(taitox)
@@ -1041,7 +1041,7 @@ static MACHINE_CONFIG_START( ballbros, seta_state )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START(taitox)
diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c
index 613e1f5c806..9c34ddfa316 100644
--- a/src/mame/drivers/taito_z.c
+++ b/src/mame/drivers/taito_z.c
@@ -3157,7 +3157,7 @@ static MACHINE_CONFIG_START( enforce, taitoz_state )
MCFG_MACHINE_START(taitoz)
MCFG_MACHINE_RESET(taitoz)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0220IOC_ADD("tc0220ioc", taitoz_io220_intf)
@@ -3220,7 +3220,7 @@ static MACHINE_CONFIG_START( bshark, taitoz_state )
MCFG_MACHINE_START(bshark)
MCFG_MACHINE_RESET(taitoz)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_TC0220IOC_ADD("tc0220ioc", taitoz_io220_intf)
@@ -3283,7 +3283,7 @@ static MACHINE_CONFIG_START( sci, taitoz_state )
MCFG_MACHINE_START(taitoz)
MCFG_MACHINE_RESET(taitoz)
- MCFG_QUANTUM_TIME(HZ(3000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(3000))
MCFG_TC0220IOC_ADD("tc0220ioc", taitoz_io220_intf)
@@ -3346,7 +3346,7 @@ static MACHINE_CONFIG_START( nightstr, taitoz_state )
MCFG_MACHINE_START(taitoz)
MCFG_MACHINE_RESET(taitoz)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_TC0220IOC_ADD("tc0220ioc", taitoz_io220_intf)
@@ -3411,7 +3411,7 @@ static MACHINE_CONFIG_START( aquajack, taitoz_state )
MCFG_MACHINE_START(taitoz)
MCFG_MACHINE_RESET(taitoz)
- MCFG_QUANTUM_TIME(HZ(30000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_TC0220IOC_ADD("tc0220ioc", taitoz_io220_intf)
@@ -3535,7 +3535,7 @@ static MACHINE_CONFIG_START( dblaxle, taitoz_state )
MCFG_MACHINE_START(taitoz)
MCFG_MACHINE_RESET(taitoz)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_TC0510NIO_ADD("tc0510nio", taitoz_io510_intf)
@@ -3598,7 +3598,7 @@ static MACHINE_CONFIG_START( racingb, taitoz_state )
MCFG_MACHINE_START(taitoz)
MCFG_MACHINE_RESET(taitoz)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_TC0510NIO_ADD("tc0510nio", taitoz_io510_intf)
diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c
index be8241b6b9e..e86dff3fd60 100644
--- a/src/mame/drivers/taitoair.c
+++ b/src/mame/drivers/taitoair.c
@@ -663,7 +663,7 @@ static MACHINE_CONFIG_START( airsys, taitoair_state )
MCFG_CPU_DATA_MAP(DSP_map_data)
MCFG_CPU_IO_MAP(DSP_map_io)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(taitoair)
MCFG_MACHINE_RESET(taitoair)
diff --git a/src/mame/drivers/taitojc.c b/src/mame/drivers/taitojc.c
index 331d36e4f82..b6aa55fd7f1 100644
--- a/src/mame/drivers/taitojc.c
+++ b/src/mame/drivers/taitojc.c
@@ -1328,7 +1328,7 @@ static MACHINE_CONFIG_START( taitojc, taitojc_state )
MCFG_CPU_PROGRAM_MAP(tms_program_map)
MCFG_CPU_DATA_MAP(tms_data_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(taitojc)
MCFG_EEPROM_93C46_ADD("eeprom")
diff --git a/src/mame/drivers/taitosj.c b/src/mame/drivers/taitosj.c
index 1b9e6e49afc..49910477eea 100644
--- a/src/mame/drivers/taitosj.c
+++ b/src/mame/drivers/taitosj.c
@@ -1856,7 +1856,7 @@ static MACHINE_CONFIG_DERIVED( mcu, nomcu )
MCFG_CPU_ADD("mcu", M68705,3000000) /* xtal is 3MHz, divided by 4 internally */
MCFG_CPU_PROGRAM_MAP(taitosj_mcu_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c
index 46ec86f58a9..5c1497f46ab 100644
--- a/src/mame/drivers/tankbust.c
+++ b/src/mame/drivers/tankbust.c
@@ -335,7 +335,7 @@ static MACHINE_CONFIG_START( tankbust, driver_device )
MCFG_CPU_PROGRAM_MAP(map_cpu2)
MCFG_CPU_IO_MAP(port_map_cpu2)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET( tankbust )
diff --git a/src/mame/drivers/tatsumi.c b/src/mame/drivers/tatsumi.c
index 005b5e18967..aa40ca721ee 100644
--- a/src/mame/drivers/tatsumi.c
+++ b/src/mame/drivers/tatsumi.c
@@ -874,7 +874,7 @@ static MACHINE_CONFIG_START( apache3, tatsumi_state )
MCFG_CPU_PROGRAM_MAP(apache3_z80_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_MACHINE_RESET(apache3)
@@ -915,7 +915,7 @@ static MACHINE_CONFIG_START( roundup5, tatsumi_state )
MCFG_CPU_ADD("audiocpu", Z80, CLOCK_1 / 4)
MCFG_CPU_PROGRAM_MAP(roundup5_z80_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -958,7 +958,7 @@ static MACHINE_CONFIG_START( cyclwarr, tatsumi_state )
MCFG_CPU_ADD("audiocpu", Z80, CLOCK_1 / 4)
MCFG_CPU_PROGRAM_MAP(cyclwarr_z80_map)
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1001,7 +1001,7 @@ static MACHINE_CONFIG_START( bigfight, tatsumi_state )
MCFG_CPU_ADD("audiocpu", Z80, CLOCK_1 / 4)
MCFG_CPU_PROGRAM_MAP(cyclwarr_z80_map)
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/taxidrvr.c b/src/mame/drivers/taxidrvr.c
index 90dde663ac0..ce7aa6d2bcf 100644
--- a/src/mame/drivers/taxidrvr.c
+++ b/src/mame/drivers/taxidrvr.c
@@ -374,7 +374,7 @@ static MACHINE_CONFIG_START( taxidrvr, driver_device )
MCFG_CPU_IO_MAP(cpu3_port_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* ??? */
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] )
diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c
index 7cba42c66ae..4c12de27c46 100644
--- a/src/mame/drivers/tbowl.c
+++ b/src/mame/drivers/tbowl.c
@@ -478,7 +478,7 @@ static MACHINE_CONFIG_START( tbowl, driver_device )
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* Actual Z80 */
MCFG_CPU_PROGRAM_MAP(6206A_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_GFXDECODE(tbowl)
diff --git a/src/mame/drivers/tceptor.c b/src/mame/drivers/tceptor.c
index 4c5bbbae859..24bfacb9589 100644
--- a/src/mame/drivers/tceptor.c
+++ b/src/mame/drivers/tceptor.c
@@ -385,7 +385,7 @@ static MACHINE_CONFIG_START( tceptor, driver_device )
MCFG_CPU_IO_MAP(mcu_io_map)
MCFG_CPU_VBLANK_INT("2dscreen", mcu_vb_interrupt)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_NVRAM_ADD_1FILL("nvram")
diff --git a/src/mame/drivers/tecmo16.c b/src/mame/drivers/tecmo16.c
index dd1589b8813..c70bc391ddd 100644
--- a/src/mame/drivers/tecmo16.c
+++ b/src/mame/drivers/tecmo16.c
@@ -383,7 +383,7 @@ static MACHINE_CONFIG_START( fstarfrc, driver_device )
MCFG_CPU_ADD("audiocpu", Z80,8000000/2) /* 4MHz */
MCFG_CPU_PROGRAM_MAP(sound_map)
/* NMIs are triggered by the main CPU */
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c
index b366a5a0e7e..d5594e9a224 100644
--- a/src/mame/drivers/tehkanwc.c
+++ b/src/mame/drivers/tehkanwc.c
@@ -158,7 +158,7 @@ static WRITE8_HANDLER( sound_answer_w )
/* in Gridiron, the sound CPU goes in a tight loop after the self test, */
/* probably waiting to be reset by a watchdog */
- if (cpu_get_pc(space->cpu) == 0x08bc) timer_set(space->machine, ATTOTIME_IN_SEC(1), NULL, 0, reset_callback);
+ if (cpu_get_pc(space->cpu) == 0x08bc) timer_set(space->machine, attotime::from_seconds(1), NULL, 0, reset_callback);
}
@@ -656,7 +656,7 @@ static MACHINE_CONFIG_START( tehkanwc, driver_device )
MCFG_CPU_IO_MAP(sound_port)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - seems enough to keep the CPUs in sync */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - seems enough to keep the CPUs in sync */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/tempest.c b/src/mame/drivers/tempest.c
index feb16c7df55..eccd4af8e73 100644
--- a/src/mame/drivers/tempest.c
+++ b/src/mame/drivers/tempest.c
@@ -590,7 +590,7 @@ static MACHINE_CONFIG_START( tempest, tempest_state )
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_WATCHDOG_TIME_INIT(HZ(CLOCK_3KHZ / 256))
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(CLOCK_3KHZ / 256))
MCFG_ATARIVGEAROM_ADD("earom")
diff --git a/src/mame/drivers/tetrisp2.c b/src/mame/drivers/tetrisp2.c
index 1389eb2e52c..51e1be5f190 100644
--- a/src/mame/drivers/tetrisp2.c
+++ b/src/mame/drivers/tetrisp2.c
@@ -67,7 +67,7 @@ static WRITE16_HANDLER( tetrisp2_systemregs_w )
}
}
-#define ROCKN_TIMER_BASE ATTOTIME_IN_NSEC(500000)
+#define ROCKN_TIMER_BASE attotime::from_nsec(500000)
static WRITE16_HANDLER( rockn_systemregs_w )
{
@@ -1044,7 +1044,7 @@ static TIMER_CALLBACK( rockn_timer_sub_level1_callback )
static void init_rockn_timer(running_machine *machine)
{
- timer_pulse(machine, ATTOTIME_IN_MSEC(32), NULL, 0, rockn_timer_level1_callback);
+ timer_pulse(machine, attotime::from_msec(32), NULL, 0, rockn_timer_level1_callback);
rockn_timer_l4 = timer_alloc(machine, rockn_timer_level4_callback, NULL);
state_save_register_global_array(machine, tetrisp2_systemregs);
@@ -1076,7 +1076,7 @@ static DRIVER_INIT( rocknms )
{
init_rockn_timer(machine);
- timer_pulse(machine, ATTOTIME_IN_MSEC(32), NULL, 0, rockn_timer_sub_level1_callback);
+ timer_pulse(machine, attotime::from_msec(32), NULL, 0, rockn_timer_sub_level1_callback);
rockn_timer_sub_l4 = timer_alloc(machine, rockn_timer_sub_level4_callback, NULL);
rockn_protectdata = 3;
diff --git a/src/mame/drivers/thayers.c b/src/mame/drivers/thayers.c
index ef1c0d43f3b..c50e6fa1067 100644
--- a/src/mame/drivers/thayers.c
+++ b/src/mame/drivers/thayers.c
@@ -64,7 +64,7 @@ static WRITE8_HANDLER( intrq_w )
cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_IRQ0, HOLD_LINE);
- timer_set(space->machine, ATTOTIME_IN_USEC(8250), NULL, 0, intrq_tick);
+ timer_set(space->machine, attotime::from_usec(8250), NULL, 0, intrq_tick);
}
static READ8_HANDLER( irqstate_r )
@@ -459,11 +459,11 @@ static WRITE8_HANDLER( ssi263_register_w )
case 0:
case 1:
// phoneme timing response
- timer_set(space->machine, ATTOTIME_IN_USEC(phoneme_time), NULL, 0, ssi263_phoneme_tick);
+ timer_set(space->machine, attotime::from_usec(phoneme_time), NULL, 0, ssi263_phoneme_tick);
break;
case 2:
// frame timing response
- timer_set(space->machine, ATTOTIME_IN_USEC(frame_time), NULL, 0, ssi263_phoneme_tick);
+ timer_set(space->machine, attotime::from_usec(frame_time), NULL, 0, ssi263_phoneme_tick);
break;
case 3:
// disable A/_R output
diff --git a/src/mame/drivers/timelimt.c b/src/mame/drivers/timelimt.c
index 4d44f7bd735..6e67e283fb7 100644
--- a/src/mame/drivers/timelimt.c
+++ b/src/mame/drivers/timelimt.c
@@ -241,7 +241,7 @@ static MACHINE_CONFIG_START( timelimt, timelimt_state )
MCFG_CPU_IO_MAP(sound_io_map)
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) /* ? */
- MCFG_QUANTUM_TIME(HZ(3000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(3000))
MCFG_MACHINE_START(timelimt)
MCFG_MACHINE_RESET(timelimt)
diff --git a/src/mame/drivers/tmmjprd.c b/src/mame/drivers/tmmjprd.c
index 2ff5b6bef3d..a0388148294 100644
--- a/src/mame/drivers/tmmjprd.c
+++ b/src/mame/drivers/tmmjprd.c
@@ -396,7 +396,7 @@ static void tmmjprd_do_blit(running_machine *machine)
if (!blt_amount)
{
if(BLITLOG) mame_printf_debug("end of blit list\n");
- timer_set(machine, ATTOTIME_IN_USEC(500), NULL,0,tmmjprd_blit_done);
+ timer_set(machine, attotime::from_usec(500), NULL,0,tmmjprd_blit_done);
return;
}
diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c
index 03e2a0bb6a4..dcb9ebda5ba 100644
--- a/src/mame/drivers/tmnt.c
+++ b/src/mame/drivers/tmnt.c
@@ -348,7 +348,7 @@ static WRITE8_HANDLER( sound_arm_nmi_w )
tmnt_state *state = space->machine->driver_data<tmnt_state>();
// sound_nmi_enabled = 1;
cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(space->machine, ATTOTIME_IN_USEC(50), NULL, 0, nmi_callback); /* kludge until the K053260 is emulated correctly */
+ timer_set(space->machine, attotime::from_usec(50), NULL, 0, nmi_callback); /* kludge until the K053260 is emulated correctly */
}
diff --git a/src/mame/drivers/toaplan1.c b/src/mame/drivers/toaplan1.c
index 790295a7d53..c9a3d03c04d 100644
--- a/src/mame/drivers/toaplan1.c
+++ b/src/mame/drivers/toaplan1.c
@@ -1521,7 +1521,7 @@ static MACHINE_CONFIG_START( rallybik, toaplan1_state )
MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map)
MCFG_CPU_IO_MAP(rallybik_sound_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(toaplan1)
@@ -1561,7 +1561,7 @@ static MACHINE_CONFIG_START( truxton, toaplan1_state )
MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map)
MCFG_CPU_IO_MAP(truxton_sound_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(toaplan1)
@@ -1601,7 +1601,7 @@ static MACHINE_CONFIG_START( hellfire, toaplan1_state )
MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map)
MCFG_CPU_IO_MAP(hellfire_sound_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(toaplan1)
@@ -1641,7 +1641,7 @@ static MACHINE_CONFIG_START( zerowing, toaplan1_state )
MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map)
MCFG_CPU_IO_MAP(zerowing_sound_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(zerowing)
@@ -1685,7 +1685,7 @@ static MACHINE_CONFIG_START( demonwld, toaplan1_state )
MCFG_CPU_PROGRAM_MAP(DSP_program_map)
MCFG_CPU_IO_MAP(DSP_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(demonwld)
@@ -1763,7 +1763,7 @@ static MACHINE_CONFIG_START( outzone, toaplan1_state )
MCFG_CPU_PROGRAM_MAP(toaplan1_sound_map)
MCFG_CPU_IO_MAP(outzone_sound_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(zerowing)
diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c
index 614459c7f45..9f877ae9d57 100644
--- a/src/mame/drivers/toaplan2.c
+++ b/src/mame/drivers/toaplan2.c
@@ -3454,7 +3454,7 @@ static MACHINE_CONFIG_START( pipibibs, toaplan2_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_27MHz/8) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(pipibibs_sound_z80_mem)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(toaplan2)
@@ -3536,7 +3536,7 @@ static MACHINE_CONFIG_START( pipibibi_bootleg, toaplan2_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_27MHz/8) /* ??? 3.37MHz */
MCFG_CPU_PROGRAM_MAP(pipibibs_sound_z80_mem)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(toaplan2)
@@ -3748,7 +3748,7 @@ static MACHINE_CONFIG_START( batsugun, toaplan2_state )
MCFG_CPU_PROGRAM_MAP(V25_rambased_mem)
MCFG_CPU_IO_MAP(V25_port)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(batsugun)
@@ -3830,7 +3830,7 @@ static MACHINE_CONFIG_START( mahoudai, toaplan2_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) /* 4MHz , 32MHz Oscillator */
MCFG_CPU_PROGRAM_MAP(raizing_sound_z80_mem)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(toaplan2)
@@ -3873,7 +3873,7 @@ static MACHINE_CONFIG_START( shippumd, toaplan2_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) /* 4MHz , 32MHz Oscillator */
MCFG_CPU_PROGRAM_MAP(raizing_sound_z80_mem)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(toaplan2)
@@ -3927,7 +3927,7 @@ static MACHINE_CONFIG_START( bgaregga, toaplan2_state )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/8) /* 4MHz , 32MHz Oscillator */
MCFG_CPU_PROGRAM_MAP(bgaregga_sound_z80_mem)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(bgaregga)
@@ -3973,7 +3973,7 @@ static MACHINE_CONFIG_START( batrider, toaplan2_state )
MCFG_CPU_PROGRAM_MAP(batrider_sound_z80_mem)
MCFG_CPU_IO_MAP(batrider_sound_z80_port)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(bgaregga)
@@ -4021,7 +4021,7 @@ static MACHINE_CONFIG_START( bbakraid, toaplan2_state )
MCFG_CPU_IO_MAP(bbakraid_sound_z80_port)
MCFG_CPU_PERIODIC_INT(bbakraid_snd_interrupt, 448)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(toaplan2)
MCFG_EEPROM_ADD("eeprom", bbakraid_93C66_intf)
diff --git a/src/mame/drivers/tomcat.c b/src/mame/drivers/tomcat.c
index 3d41b4daf26..ee3bee5c25a 100644
--- a/src/mame/drivers/tomcat.c
+++ b/src/mame/drivers/tomcat.c
@@ -402,7 +402,7 @@ static MACHINE_CONFIG_START( tomcat, tomcat_state )
MCFG_RIOT6532_ADD("riot", XTAL_14_31818MHz / 8, tomcat_riot6532_intf)
- MCFG_QUANTUM_TIME(HZ(4000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(4000))
MCFG_MACHINE_START(tomcat)
diff --git a/src/mame/drivers/toypop.c b/src/mame/drivers/toypop.c
index 1fb5d651416..75f5cd44876 100644
--- a/src/mame/drivers/toypop.c
+++ b/src/mame/drivers/toypop.c
@@ -110,13 +110,13 @@ static INTERRUPT_GEN( toypop_main_interrupt )
// so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
if (!namcoio_read_reset_line(namcoio_0)) /* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, namcoio_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 0, namcoio_run);
if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 1, namcoio_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 1, namcoio_run);
if (!namcoio_read_reset_line(namcoio_2)) /* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 2, namcoio_run);
+ timer_set(device->machine, attotime::from_usec(50), NULL, 2, namcoio_run);
}
@@ -558,7 +558,7 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state )
MCFG_CPU_PROGRAM_MAP(m68k_map)
MCFG_CPU_VBLANK_INT("screen", toypop_m68000_interrupt)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_RESET(toypop)
diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c
index a7f4f40896f..753413c7426 100644
--- a/src/mame/drivers/tp84.c
+++ b/src/mame/drivers/tp84.c
@@ -288,7 +288,7 @@ static MACHINE_CONFIG_START( tp84, driver_device )
MCFG_CPU_ADD("audiocpu", Z80,XTAL_14_31818MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(audio_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START(tp84)
diff --git a/src/mame/drivers/triforce.c b/src/mame/drivers/triforce.c
index 5db6b68217c..781301a57d1 100644
--- a/src/mame/drivers/triforce.c
+++ b/src/mame/drivers/triforce.c
@@ -424,7 +424,7 @@ static MACHINE_CONFIG_START( triforce_base, driver_device )
MCFG_CPU_ADD("maincpu", PPC403GA, 64000000) /* Wrong! */
MCFG_CPU_PROGRAM_MAP(gc_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/trucocl.c b/src/mame/drivers/trucocl.c
index 5786d5ffec6..6ec64428635 100644
--- a/src/mame/drivers/trucocl.c
+++ b/src/mame/drivers/trucocl.c
@@ -76,7 +76,7 @@ static WRITE8_DEVICE_HANDLER( audio_dac_w )
dac_data_w( device, rom[dac_address+cur_dac_address_index] );
- timer_set( device->machine, ATTOTIME_IN_HZ( 16000 ), NULL, 0, dac_irq );
+ timer_set( device->machine, attotime::from_hz( 16000 ), NULL, 0, dac_irq );
}
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
diff --git a/src/mame/drivers/trvquest.c b/src/mame/drivers/trvquest.c
index 3f0c41142d8..85e774ccfa2 100644
--- a/src/mame/drivers/trvquest.c
+++ b/src/mame/drivers/trvquest.c
@@ -160,7 +160,7 @@ static void via_irq( device_t *device, int state )
/* Kaos sits in a tight loop polling the VIA irq flags register, but that register is
cleared by the irq handler. Therefore, I wait a bit before triggering the irq to
leave time for the program to see the flag change. */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, state, via_irq_delayed);
+ timer_set(device->machine, attotime::from_usec(50), NULL, state, via_irq_delayed);
}
diff --git a/src/mame/drivers/tubep.c b/src/mame/drivers/tubep.c
index c8f43a5d82a..89e238dd026 100644
--- a/src/mame/drivers/tubep.c
+++ b/src/mame/drivers/tubep.c
@@ -910,7 +910,7 @@ static MACHINE_CONFIG_START( tubep, driver_device )
MCFG_CPU_ADD("mcu",NSC8105,6000000) /* 6 MHz Xtal - divided internally ??? */
MCFG_CPU_PROGRAM_MAP(nsc_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(tubep)
MCFG_MACHINE_RESET(tubep)
diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c
index 6696fb30004..805ca483a1e 100644
--- a/src/mame/drivers/tumbleb.c
+++ b/src/mame/drivers/tumbleb.c
@@ -784,8 +784,8 @@ static WRITE16_HANDLER( semicom_soundcmd_w )
{
soundlatch_w(space, 0, data & 0xff);
// needed for Super Trio which reads the sound with polling
- // cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100));
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(20));
+ // cpu_spinuntil_time(space->cpu, attotime::from_usec(100));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(20));
}
}
diff --git a/src/mame/drivers/turbo.c b/src/mame/drivers/turbo.c
index 0fd9a326c13..53804841484 100644
--- a/src/mame/drivers/turbo.c
+++ b/src/mame/drivers/turbo.c
@@ -1143,7 +1143,7 @@ static MACHINE_CONFIG_START( buckrog, turbo_state )
MCFG_CPU_PROGRAM_MAP(buckrog_cpu2_map)
MCFG_CPU_IO_MAP(buckrog_cpu2_portmap)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET(buckrog)
MCFG_PPI8255_ADD( "ppi8255_0", buckrog_8255_intf[0] )
diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c
index 3b4bd278a77..d159559ef19 100644
--- a/src/mame/drivers/twin16.c
+++ b/src/mame/drivers/twin16.c
@@ -732,7 +732,7 @@ static MACHINE_CONFIG_START( twin16, twin16_state )
MCFG_CPU_ADD("audiocpu", Z80, 3579545)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(twin16)
MCFG_MACHINE_RESET(twin16)
@@ -774,7 +774,7 @@ static MACHINE_CONFIG_START( twin16, twin16_state )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( devilw, twin16 )
- MCFG_QUANTUM_TIME(HZ(60000)) // watchdog reset otherwise
+ MCFG_QUANTUM_TIME(attotime::from_hz(60000)) // watchdog reset otherwise
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( fround, twin16_state )
@@ -786,7 +786,7 @@ static MACHINE_CONFIG_START( fround, twin16_state )
MCFG_CPU_ADD("audiocpu", Z80, 3579545)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(twin16)
MCFG_MACHINE_RESET(twin16)
diff --git a/src/mame/drivers/twincobr.c b/src/mame/drivers/twincobr.c
index a8bd219c6f2..3dfcea7d307 100644
--- a/src/mame/drivers/twincobr.c
+++ b/src/mame/drivers/twincobr.c
@@ -572,7 +572,7 @@ static MACHINE_CONFIG_START( twincobr, driver_device )
/* Data Map is internal to the CPU */
MCFG_CPU_IO_MAP(DSP_io_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(twincobr)
diff --git a/src/mame/drivers/twinkle.c b/src/mame/drivers/twinkle.c
index 75a6e832613..bca1cc2e10b 100644
--- a/src/mame/drivers/twinkle.c
+++ b/src/mame/drivers/twinkle.c
@@ -930,7 +930,7 @@ static MACHINE_CONFIG_START( twinkle, twinkle_state )
MCFG_CPU_ADD("audiocpu", M68000, 32000000/2) /* 16.000 MHz */
MCFG_CPU_PROGRAM_MAP( sound_map )
- MCFG_WATCHDOG_TIME_INIT(MSEC(1200)) /* check TD pin on LTC1232 */
+ MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1200)) /* check TD pin on LTC1232 */
MCFG_MACHINE_RESET( twinkle )
MCFG_I2CMEM_ADD("security",i2cmem_interface)
diff --git a/src/mame/drivers/uapce.c b/src/mame/drivers/uapce.c
index 2a1acb78eda..e4954932f8f 100644
--- a/src/mame/drivers/uapce.c
+++ b/src/mame/drivers/uapce.c
@@ -193,7 +193,7 @@ static MACHINE_CONFIG_START( uapce, driver_device )
MCFG_CPU_ADD("sub", Z80, 1400000)
MCFG_CPU_PROGRAM_MAP(z80_map)
- MCFG_QUANTUM_TIME(HZ(60))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_RESET( uapce )
diff --git a/src/mame/drivers/ultraman.c b/src/mame/drivers/ultraman.c
index 22fcc63bd33..edba7ee8116 100644
--- a/src/mame/drivers/ultraman.c
+++ b/src/mame/drivers/ultraman.c
@@ -227,7 +227,7 @@ static MACHINE_CONFIG_START( ultraman, ultraman_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_IO_MAP(sound_io_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(ultraman)
MCFG_MACHINE_RESET(ultraman)
diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c
index 78cb56bb4bd..715aae21b45 100644
--- a/src/mame/drivers/ultrsprt.c
+++ b/src/mame/drivers/ultrsprt.c
@@ -211,7 +211,7 @@ static MACHINE_CONFIG_START( ultrsprt, driver_device )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_CPU_PERIODIC_INT(irq5_line_hold, 1) // ???
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_MACHINE_START(ultrsprt)
diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c
index 7111860497f..a1fb914fcd9 100644
--- a/src/mame/drivers/undrfire.c
+++ b/src/mame/drivers/undrfire.c
@@ -756,7 +756,7 @@ static MACHINE_CONFIG_START( cbombers, driver_device )
MCFG_CPU_PROGRAM_MAP(cbombers_cpub_map)
MCFG_CPU_VBLANK_INT("screen", irq4_line_hold)
- MCFG_QUANTUM_TIME(HZ(480)) /* CPU slices - Need to interleave Cpu's 1 & 3 */
+ MCFG_QUANTUM_TIME(attotime::from_hz(480)) /* CPU slices - Need to interleave Cpu's 1 & 3 */
MCFG_EEPROM_ADD("eeprom", undrfire_eeprom_interface)
diff --git a/src/mame/drivers/vastar.c b/src/mame/drivers/vastar.c
index 3aacd9031c1..c8ec8c7b16e 100644
--- a/src/mame/drivers/vastar.c
+++ b/src/mame/drivers/vastar.c
@@ -305,7 +305,7 @@ static MACHINE_CONFIG_START( vastar, vastar_state )
MCFG_CPU_IO_MAP(cpu2_port_map)
MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4) /* ??? */
- MCFG_QUANTUM_TIME(HZ(600)) /* 10 CPU slices per frame - seems enough to ensure proper */
+ MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - seems enough to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_RESET(vastar)
diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c
index 771eeaecbc7..b5f211429a1 100644
--- a/src/mame/drivers/vcombat.c
+++ b/src/mame/drivers/vcombat.c
@@ -570,7 +570,7 @@ static MACHINE_CONFIG_START( vcombat, driver_device )
/* Temporary hack for experimenting with timing. */
#if 0
- //MCFG_QUANTUM_TIME(HZ(1200))
+ //MCFG_QUANTUM_TIME(attotime::from_hz(1200))
MCFG_QUANTUM_PERFECT_CPU("maincpu")
#endif
diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c
index a40d4b9f14b..a87e2172e64 100644
--- a/src/mame/drivers/vegas.c
+++ b/src/mame/drivers/vegas.c
@@ -306,7 +306,7 @@
*************************************/
#define SYSTEM_CLOCK 100000000
-#define TIMER_PERIOD ATTOTIME_IN_HZ(SYSTEM_CLOCK)
+#define TIMER_PERIOD attotime::from_hz(SYSTEM_CLOCK)
#define MAX_DYNAMIC_ADDRESSES 32
@@ -1171,7 +1171,7 @@ static WRITE32_HANDLER( nile_w )
if (nile_regs[offset] & 2)
logerror("Unexpected value: timer %d is prescaled\n", which);
nile_regs[offset + 1] = timer_timeleft(timer[which]).as_double() * SYSTEM_CLOCK;
- timer_adjust_oneshot(timer[which], attotime_never, which);
+ timer_adjust_oneshot(timer[which], attotime::never, which);
}
break;
diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c
index 35a0748ba50..23d08571eaa 100644
--- a/src/mame/drivers/vendetta.c
+++ b/src/mame/drivers/vendetta.c
@@ -212,7 +212,7 @@ static WRITE8_HANDLER( z80_arm_nmi_w )
vendetta_state *state = space->machine->driver_data<vendetta_state>();
cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(space->machine, ATTOTIME_IN_USEC(25), NULL, 0, z80_nmi_callback);
+ timer_set(space->machine, attotime::from_usec(25), NULL, 0, z80_nmi_callback);
}
static WRITE8_HANDLER( z80_irq_w )
diff --git a/src/mame/drivers/videopkr.c b/src/mame/drivers/videopkr.c
index 8e7dbd1992c..41f4484ccf1 100644
--- a/src/mame/drivers/videopkr.c
+++ b/src/mame/drivers/videopkr.c
@@ -1190,7 +1190,7 @@ static MACHINE_CONFIG_START( videopkr, driver_device )
MCFG_MACHINE_START(videopkr)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_TIMER_ADD_PERIODIC("t1_timer", sound_t1_callback, HZ(50))
+ MCFG_TIMER_ADD_PERIODIC("t1_timer", sound_t1_callback, attotime::from_hz(50))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/volfied.c b/src/mame/drivers/volfied.c
index 1e49280394e..89e1fb0038a 100644
--- a/src/mame/drivers/volfied.c
+++ b/src/mame/drivers/volfied.c
@@ -267,7 +267,7 @@ static MACHINE_CONFIG_START( volfied, volfied_state )
MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) /* 4MHz sound CPU, required to run the game */
MCFG_CPU_PROGRAM_MAP(z80_map)
- MCFG_QUANTUM_TIME(HZ(1200))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1200))
MCFG_MACHINE_START(volfied)
MCFG_MACHINE_RESET(volfied)
diff --git a/src/mame/drivers/wardner.c b/src/mame/drivers/wardner.c
index 8c1b7fcb25c..0995b4ea7fd 100644
--- a/src/mame/drivers/wardner.c
+++ b/src/mame/drivers/wardner.c
@@ -409,7 +409,7 @@ static MACHINE_CONFIG_START( wardner, driver_device )
/* Data Map is internal to the CPU */
MCFG_CPU_IO_MAP(DSP_io_map)
- MCFG_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame */
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
MCFG_MACHINE_RESET(wardner)
diff --git a/src/mame/drivers/wecleman.c b/src/mame/drivers/wecleman.c
index e75736181ed..4c77a5bca42 100644
--- a/src/mame/drivers/wecleman.c
+++ b/src/mame/drivers/wecleman.c
@@ -1047,7 +1047,7 @@ static MACHINE_CONFIG_START( wecleman, driver_device )
MCFG_CPU_ADD("audiocpu", Z80, 3579545)
MCFG_CPU_PROGRAM_MAP(wecleman_sound_map)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_RESET(wecleman)
@@ -1120,7 +1120,7 @@ static MACHINE_CONFIG_START( hotchase, driver_device )
/* Amuse: every 2 ms */
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c
index ff4eaa6783c..d7e1d5f55a6 100644
--- a/src/mame/drivers/wgp.c
+++ b/src/mame/drivers/wgp.c
@@ -1015,7 +1015,7 @@ static MACHINE_CONFIG_START( wgp, wgp_state )
MCFG_MACHINE_START(wgp)
MCFG_MACHINE_RESET(wgp)
- MCFG_QUANTUM_TIME(HZ(30000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_TC0220IOC_ADD("tc0220ioc", wgp_io_intf)
@@ -1051,7 +1051,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( wgp2, wgp )
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
/* video hardware */
MCFG_VIDEO_START(wgp2)
diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c
index ff22aa5555d..5548fc0996f 100644
--- a/src/mame/drivers/wheelfir.c
+++ b/src/mame/drivers/wheelfir.c
@@ -813,7 +813,7 @@ static MACHINE_CONFIG_START( wheelfir, wheelfir_state )
MCFG_CPU_PROGRAM_MAP(wheelfir_sub)
//MCFG_CPU_VBLANK_INT_HACK(irq1_line_hold,256)
- MCFG_QUANTUM_TIME(HZ(12000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_MACHINE_RESET (wheelfir)
diff --git a/src/mame/drivers/wrally.c b/src/mame/drivers/wrally.c
index 6fcac599d52..52adc1cf4f8 100644
--- a/src/mame/drivers/wrally.c
+++ b/src/mame/drivers/wrally.c
@@ -256,7 +256,7 @@ static MACHINE_CONFIG_START( wrally, driver_device )
MCFG_CPU_PROGRAM_MAP(dallas_rom)
MCFG_CPU_IO_MAP(dallas_ram)
- MCFG_QUANTUM_TIME(HZ(38400)) /* heavy sync */
+ MCFG_QUANTUM_TIME(attotime::from_hz(38400)) /* heavy sync */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c
index 78d339a9ba6..567c4c16311 100644
--- a/src/mame/drivers/xexex.c
+++ b/src/mame/drivers/xexex.c
@@ -71,7 +71,7 @@ Unresolved Issues:
#define XE_DEBUG 0
#define XE_SKIPIDLE 1
-#define XE_DMADELAY ATTOTIME_IN_USEC(256)
+#define XE_DMADELAY attotime::from_usec(256)
static const eeprom_interface eeprom_intf =
{
@@ -531,7 +531,7 @@ static MACHINE_CONFIG_START( xexex, xexex_state )
MCFG_CPU_ADD("audiocpu", Z80, 8000000)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(1920))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1920))
MCFG_MACHINE_START(xexex)
MCFG_MACHINE_RESET(xexex)
diff --git a/src/mame/drivers/xorworld.c b/src/mame/drivers/xorworld.c
index 92617ef5285..fb49cbe0ee3 100644
--- a/src/mame/drivers/xorworld.c
+++ b/src/mame/drivers/xorworld.c
@@ -179,7 +179,7 @@ static MACHINE_CONFIG_START( xorworld, xorworld_state )
MCFG_CPU_PROGRAM_MAP(xorworld_map)
MCFG_CPU_VBLANK_INT_HACK(xorworld_interrupt, 4) // 1 IRQ2 + 1 IRQ4 + 1 IRQ6
- MCFG_QUANTUM_TIME(HZ(60))
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_EEPROM_93C46_ADD("eeprom")
diff --git a/src/mame/drivers/xxmissio.c b/src/mame/drivers/xxmissio.c
index 24397e9c432..640fc94f1f2 100644
--- a/src/mame/drivers/xxmissio.c
+++ b/src/mame/drivers/xxmissio.c
@@ -298,7 +298,7 @@ static MACHINE_CONFIG_START( xxmissio, driver_device )
MCFG_CPU_PROGRAM_MAP(map2)
MCFG_CPU_VBLANK_INT_HACK(xxmissio_interrupt_s,2)
- MCFG_QUANTUM_TIME(HZ(6000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_MACHINE_START(xxmissio)
diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c
index 45bc1d03754..d3b45371156 100644
--- a/src/mame/drivers/zaccaria.c
+++ b/src/mame/drivers/zaccaria.c
@@ -582,16 +582,16 @@ static MACHINE_CONFIG_START( zaccaria, driver_device )
MCFG_CPU_ADD("maincpu", Z80,XTAL_18_432MHz/6) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse)
- MCFG_QUANTUM_TIME(HZ(1000000))
+ 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_QUANTUM_TIME(HZ(1000000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
MCFG_CPU_ADD("audio2", M6802,XTAL_3_579545MHz) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(sound_map_2)
- MCFG_QUANTUM_TIME(HZ(1000000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
MCFG_PPI8255_ADD( "ppi8255", ppi8255_config )
MCFG_PIA6821_ADD( "pia0", pia_0_config )
diff --git a/src/mame/drivers/zerozone.c b/src/mame/drivers/zerozone.c
index 998f1c6df83..d7612c288a7 100644
--- a/src/mame/drivers/zerozone.c
+++ b/src/mame/drivers/zerozone.c
@@ -194,7 +194,7 @@ static MACHINE_CONFIG_START( zerozone, zerozone_state )
MCFG_CPU_ADD("audiocpu", Z80, 1000000) /* 1 MHz ??? */
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_QUANTUM_TIME(HZ(600))
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START(zerozone)
MCFG_MACHINE_RESET(zerozone)
diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c
index ae9a1bba055..ae33fc94c1d 100644
--- a/src/mame/drivers/zr107.c
+++ b/src/mame/drivers/zr107.c
@@ -677,7 +677,7 @@ static void sound_irq_callback( running_machine *machine, int irq )
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
cputag_set_input_line(machine, "audiocpu", line, ASSERT_LINE);
- timer_set(machine, ATTOTIME_IN_USEC(1), NULL, line, irq_off);
+ timer_set(machine, attotime::from_usec(1), NULL, line, irq_off);
}
static const k056800_interface zr107_k056800_interface =
@@ -731,7 +731,7 @@ static MACHINE_CONFIG_START( zr107, driver_device )
MCFG_CPU_CONFIG(sharc_cfg)
MCFG_CPU_DATA_MAP(sharc_map)
- MCFG_QUANTUM_TIME(HZ(30000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_MACHINE_START(zr107)
@@ -792,7 +792,7 @@ static MACHINE_CONFIG_START( jetwave, driver_device )
MCFG_CPU_CONFIG(sharc_cfg)
MCFG_CPU_DATA_MAP(sharc_map)
- MCFG_QUANTUM_TIME(HZ(30000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_EEPROM_93C46_ADD("eeprom")
MCFG_MACHINE_START(zr107)
diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c
index 6f530763696..805057fd113 100644
--- a/src/mame/machine/amiga.c
+++ b/src/mame/machine/amiga.c
@@ -400,7 +400,7 @@ static TIMER_CALLBACK( amiga_irq_proc )
amiga_state *state = machine->driver_data<amiga_state>();
update_irqs(machine);
- timer_reset( state->irq_timer, attotime_never);
+ timer_reset( state->irq_timer, attotime::never);
}
@@ -937,7 +937,7 @@ static TIMER_CALLBACK( amiga_blitter_proc )
amiga_custom_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_BLIT, 0xffff);
/* reset the blitter timer */
- timer_reset( state->blitter_timer, attotime_never);
+ timer_reset( state->blitter_timer, attotime::never);
}
diff --git a/src/mame/machine/archimds.c b/src/mame/machine/archimds.c
index 14f8f3577f2..eccbef49321 100644
--- a/src/mame/machine/archimds.c
+++ b/src/mame/machine/archimds.c
@@ -130,7 +130,7 @@ static TIMER_CALLBACK( vidc_video_tick )
if(video_dma_on)
timer_adjust_oneshot(vid_timer, space->machine->primary_screen->time_until_pos(vidc_regs[0xb4]), 0);
else
- timer_adjust_oneshot(vid_timer, attotime_never, 0);
+ timer_adjust_oneshot(vid_timer, attotime::never, 0);
}
/* audio DMA */
@@ -162,7 +162,7 @@ static TIMER_CALLBACK( vidc_audio_tick )
if(!audio_dma_on)
{
- timer_adjust_oneshot(snd_timer, attotime_never, 0);
+ timer_adjust_oneshot(snd_timer, attotime::never, 0);
for(ch=0;ch<8;ch++)
dac_signed_data_16_w(space->machine->device(dac_port[ch & 7]), 0x8000);
}
@@ -177,15 +177,15 @@ static void a310_set_timer(int tmr)
{
case 0:
case 1:
- timer_adjust_oneshot(timer[tmr], ATTOTIME_IN_USEC(ioc_timercnt[tmr]/8), tmr); // TODO: ARM timings are quite off there, it should be latch and not latch/8
+ timer_adjust_oneshot(timer[tmr], attotime::from_usec(ioc_timercnt[tmr]/8), tmr); // TODO: ARM timings are quite off there, it should be latch and not latch/8
break;
case 2:
freq = 1000000.0 / (double)(ioc_timercnt[tmr]+1);
- timer_adjust_oneshot(timer[tmr], ATTOTIME_IN_HZ(freq), tmr);
+ timer_adjust_oneshot(timer[tmr], attotime::from_hz(freq), tmr);
break;
case 3:
freq = 1000000.0 / (double)((ioc_timercnt[tmr]+1)*16);
- timer_adjust_oneshot(timer[tmr], ATTOTIME_IN_HZ(freq), tmr);
+ timer_adjust_oneshot(timer[tmr], attotime::from_hz(freq), tmr);
break;
}
}
@@ -232,20 +232,20 @@ void archimedes_init(running_machine *machine)
memc_pagesize = 0;
vbl_timer = timer_alloc(machine, vidc_vblank, NULL);
- timer_adjust_oneshot(vbl_timer, attotime_never, 0);
+ timer_adjust_oneshot(vbl_timer, attotime::never, 0);
timer[0] = timer_alloc(machine, ioc_timer, NULL);
timer[1] = timer_alloc(machine, ioc_timer, NULL);
timer[2] = timer_alloc(machine, ioc_timer, NULL);
timer[3] = timer_alloc(machine, ioc_timer, NULL);
- timer_adjust_oneshot(timer[0], attotime_never, 0);
- timer_adjust_oneshot(timer[1], attotime_never, 0);
- timer_adjust_oneshot(timer[2], attotime_never, 0);
- timer_adjust_oneshot(timer[3], attotime_never, 0);
+ timer_adjust_oneshot(timer[0], attotime::never, 0);
+ timer_adjust_oneshot(timer[1], attotime::never, 0);
+ timer_adjust_oneshot(timer[2], attotime::never, 0);
+ timer_adjust_oneshot(timer[3], attotime::never, 0);
vid_timer = timer_alloc(machine, vidc_video_tick, NULL);
snd_timer = timer_alloc(machine, vidc_audio_tick, NULL);
- timer_adjust_oneshot(snd_timer, attotime_never, 0);
+ timer_adjust_oneshot(snd_timer, attotime::never, 0);
}
READ32_HANDLER(archimedes_memc_logical_r)
@@ -923,7 +923,7 @@ WRITE32_HANDLER(archimedes_memc_w)
printf("MEMC: Starting audio DMA at %f Hz, buffer from %x to %x\n", sndhz, vidc_sndstart, vidc_sndend);
- timer_adjust_periodic(snd_timer, attotime_zero, 0, ATTOTIME_IN_HZ(sndhz));
+ timer_adjust_periodic(snd_timer, attotime::zero, 0, attotime::from_hz(sndhz));
}
break;
diff --git a/src/mame/machine/arkanoid.c b/src/mame/machine/arkanoid.c
index a751f064b1d..b0a63292c25 100644
--- a/src/mame/machine/arkanoid.c
+++ b/src/mame/machine/arkanoid.c
@@ -36,7 +36,7 @@ WRITE8_HANDLER( arkanoid_Z80_mcu_w )
{
timer_call_after_resynch(space->machine, NULL, data, test);
/* boost the interleave for a few usecs to make sure it is read successfully */
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(10));
}
READ8_HANDLER( arkanoid_68705_port_a_r )
diff --git a/src/mame/machine/asic65.c b/src/mame/machine/asic65.c
index bc5fe0440da..843379470bd 100644
--- a/src/mame/machine/asic65.c
+++ b/src/mame/machine/asic65.c
@@ -193,7 +193,7 @@ WRITE16_HANDLER( asic65_data_w )
if (asic65.type == ASIC65_ROMBASED)
{
timer_call_after_resynch(space->machine, NULL, data | (offset << 16), m68k_asic65_deferred_w);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(20));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(20));
return;
}
@@ -231,7 +231,7 @@ READ16_HANDLER( asic65_r )
if (asic65.type == ASIC65_ROMBASED)
{
asic65._68full = 0;
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(5));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(5));
return asic65._68data;
}
@@ -449,7 +449,7 @@ READ16_HANDLER( asic65_io_r )
/* bit 14 = 68FULL */
/* bit 13 = XFLG */
/* bit 12 = controlled by jumper */
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(5));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(5));
return (asic65.tfull << 15) | (asic65._68full << 14) | (asic65.xflg << 13) | 0x0000;
}
else
diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c
index 3bc858f42ef..0945cd7cdad 100644
--- a/src/mame/machine/atarigen.c
+++ b/src/mame/machine/atarigen.c
@@ -54,8 +54,8 @@
CONSTANTS
***************************************************************************/
-#define SOUND_TIMER_RATE ATTOTIME_IN_USEC(5)
-#define SOUND_TIMER_BOOST ATTOTIME_IN_USEC(100)
+#define SOUND_TIMER_RATE attotime::from_usec(5)
+#define SOUND_TIMER_BOOST attotime::from_usec(100)
diff --git a/src/mame/machine/balsente.c b/src/mame/machine/balsente.c
index 52a3a6559c7..d3e038bd1ea 100644
--- a/src/mame/machine/balsente.c
+++ b/src/mame/machine/balsente.c
@@ -482,7 +482,7 @@ static TIMER_CALLBACK( m6850_w_callback )
/* set a timer for 500usec later to actually transmit the data */
/* (this is very important for several games, esp Snacks'n Jaxson) */
- timer_set(machine, ATTOTIME_IN_USEC(500), NULL, param, m6850_data_ready_callback);
+ timer_set(machine, attotime::from_usec(500), NULL, param, m6850_data_ready_callback);
}
@@ -628,7 +628,7 @@ WRITE8_HANDLER( balsente_adc_select_w )
/* set a timer to go off and read the value after 50us */
/* it's important that we do this for Mini Golf */
logerror("adc_select %d\n", offset & 7);
- timer_set(space->machine, ATTOTIME_IN_USEC(50), NULL, offset & 7, adc_finished);
+ timer_set(space->machine, attotime::from_usec(50), NULL, offset & 7, adc_finished);
}
@@ -935,7 +935,7 @@ static void update_counter_0_timer(balsente_state *state)
if (maxfreq > 0.0)
{
state->counter_0_timer_active = 1;
- state->counter_0_timer->adjust(ATTOTIME_IN_HZ(maxfreq), 0, ATTOTIME_IN_HZ(maxfreq));
+ state->counter_0_timer->adjust(attotime::from_hz(maxfreq), 0, attotime::from_hz(maxfreq));
}
}
diff --git a/src/mame/machine/cdi070.c b/src/mame/machine/cdi070.c
index 9588a98f02f..caf3e329d5f 100644
--- a/src/mame/machine/cdi070.c
+++ b/src/mame/machine/cdi070.c
@@ -96,12 +96,12 @@ static void scc68070_uart_rx_check(running_machine *machine, scc68070_regs_t *sc
if((scc68070->uart.command_register & 3) == 1)
{
UINT32 div = 0x10000 >> ((scc68070->uart.clock_select >> 4) & 7);
- timer_adjust_oneshot(scc68070->uart.rx_timer, ATTOTIME_IN_HZ((49152000 / div) / 8), 0);
+ timer_adjust_oneshot(scc68070->uart.rx_timer, attotime::from_hz((49152000 / div) / 8), 0);
}
else
{
scc68070->uart.status_register &= ~USR_RXRDY;
- timer_adjust_oneshot(scc68070->uart.rx_timer, attotime_never, 0);
+ timer_adjust_oneshot(scc68070->uart.rx_timer, attotime::never, 0);
}
}
@@ -121,12 +121,12 @@ static void scc68070_uart_tx_check(running_machine *machine, scc68070_regs_t *sc
if(timer_timeleft(scc68070->uart.tx_timer) == attotime::never)
{
UINT32 div = 0x10000 >> (scc68070->uart.clock_select & 7);
- timer_adjust_oneshot(scc68070->uart.tx_timer, ATTOTIME_IN_HZ((49152000 / div) / 8), 0);
+ timer_adjust_oneshot(scc68070->uart.tx_timer, attotime::from_hz((49152000 / div) / 8), 0);
}
}
else
{
- timer_adjust_oneshot(scc68070->uart.tx_timer, attotime_never, 0);
+ timer_adjust_oneshot(scc68070->uart.tx_timer, attotime::never, 0);
}
}
@@ -176,7 +176,7 @@ TIMER_CALLBACK( scc68070_rx_callback )
scc68070->uart.status_register |= USR_RXRDY;
UINT32 div = 0x10000 >> ((scc68070->uart.clock_select >> 4) & 7);
- timer_adjust_oneshot(scc68070->uart.rx_timer, ATTOTIME_IN_HZ((49152000 / div) / 8), 0);
+ timer_adjust_oneshot(scc68070->uart.rx_timer, attotime::from_hz((49152000 / div) / 8), 0);
}
else
{
@@ -389,16 +389,16 @@ TIMER_CALLBACK( scc68070_tx_callback )
scc68070->uart.transmit_pointer--;
UINT32 div = 0x10000 >> (scc68070->uart.clock_select & 7);
- timer_adjust_oneshot(scc68070->uart.tx_timer, ATTOTIME_IN_HZ((49152000 / div) / 8), 0);
+ timer_adjust_oneshot(scc68070->uart.tx_timer, attotime::from_hz((49152000 / div) / 8), 0);
}
else
{
- timer_adjust_oneshot(scc68070->uart.tx_timer, attotime_never, 0);
+ timer_adjust_oneshot(scc68070->uart.tx_timer, attotime::never, 0);
}
}
else
{
- timer_adjust_oneshot(scc68070->uart.tx_timer, attotime_never, 0);
+ timer_adjust_oneshot(scc68070->uart.tx_timer, attotime::never, 0);
}
scc68070_uart_tx_check(machine, scc68070);
@@ -1144,13 +1144,13 @@ void scc68070_register_globals(running_machine *machine, scc68070_regs_t *scc680
state_save_register_global(machine, scc68070->mmu.desc[7].base);
scc68070->timers.timer0_timer = timer_alloc(machine, scc68070_timer0_callback, 0);
- timer_adjust_oneshot(scc68070->timers.timer0_timer, attotime_never, 0);
+ timer_adjust_oneshot(scc68070->timers.timer0_timer, attotime::never, 0);
scc68070->uart.rx_timer = timer_alloc(machine, scc68070_rx_callback, 0);
- timer_adjust_oneshot(scc68070->uart.rx_timer, attotime_never, 0);
+ timer_adjust_oneshot(scc68070->uart.rx_timer, attotime::never, 0);
scc68070->uart.tx_timer = timer_alloc(machine, scc68070_tx_callback, 0);
- timer_adjust_oneshot(scc68070->uart.tx_timer, attotime_never, 0);
+ timer_adjust_oneshot(scc68070->uart.tx_timer, attotime::never, 0);
}
#if ENABLE_UART_PRINTING
diff --git a/src/mame/machine/cdicdic.c b/src/mame/machine/cdicdic.c
index 34e51cbece4..2eebe793fd5 100644
--- a/src/mame/machine/cdicdic.c
+++ b/src/mame/machine/cdicdic.c
@@ -573,7 +573,7 @@ void cdicdic_device::sample_trigger()
if(m_decode_addr == 0xffff)
{
verboselog(&m_machine, 0, "Decode stop requested, stopping playback\n" );
- timer_adjust_oneshot(m_audio_sample_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_audio_sample_timer, attotime::never, 0);
return;
}
@@ -784,13 +784,13 @@ void cdicdic_device::process_delayed_command()
if((buffer[CDIC_SECTOR_SUBMODE2] & CDIC_SUBMODE_EOF) == 0 && m_command != 0x23)
{
- timer_adjust_oneshot(m_interrupt_timer, ATTOTIME_IN_HZ(75), 0); // 75Hz = 1x CD-ROM speed
+ timer_adjust_oneshot(m_interrupt_timer, attotime::from_hz(75), 0); // 75Hz = 1x CD-ROM speed
}
else
{
if(m_command == 0x23) // Mode 1 Reset
{
- timer_adjust_oneshot(m_interrupt_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::never, 0);
}
}
}
@@ -799,7 +799,7 @@ void cdicdic_device::process_delayed_command()
}
case 0x2e: // Abort
- timer_adjust_oneshot(m_interrupt_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::never, 0);
//m_data_buffer &= ~4;
break;
@@ -861,7 +861,7 @@ void cdicdic_device::process_delayed_command()
m_time = next_msf << 8;
- timer_adjust_oneshot(m_interrupt_timer, ATTOTIME_IN_HZ(75), 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::from_hz(75), 0);
m_x_buffer |= 0x8000;
//m_data_buffer |= 0x4000;
@@ -894,7 +894,7 @@ void cdicdic_device::process_delayed_command()
};
lba = nybbles[0] + nybbles[1]*10 + ((nybbles[2] + nybbles[3]*10)*75) + ((nybbles[4] + nybbles[5]*10)*75*60);
- timer_adjust_oneshot(m_interrupt_timer, ATTOTIME_IN_HZ(75), 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::from_hz(75), 0);
cdrom_read_data(m_cd, lba, buffer, CD_TRACK_RAW_DONTCARE);
@@ -1123,13 +1123,13 @@ void cdicdic_device::register_write(const UINT32 offset, const UINT16 data, cons
{
m_decode_addr = m_z_buffer & 0x3a00;
m_decode_delay = 1;
- timer_adjust_oneshot(m_audio_sample_timer, ATTOTIME_IN_HZ(75), 0);
+ timer_adjust_oneshot(m_audio_sample_timer, attotime::from_hz(75), 0);
}
}
else
{
m_decode_addr = 0xffff;
- timer_adjust_oneshot(m_audio_sample_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_audio_sample_timer, attotime::never, 0);
}
break;
}
@@ -1148,14 +1148,14 @@ void cdicdic_device::register_write(const UINT32 offset, const UINT16 data, cons
//case 0x24: // Reset Mode 2
case 0x2e: // Abort
{
- timer_adjust_oneshot(m_interrupt_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::never, 0);
dmadac_enable(&state->dmadac[0], 2, 0);
//m_data_buffer &= 0xbfff;
break;
}
case 0x2b: // Stop CDDA
cdda_stop_audio(m_machine.device("cdda"));
- timer_adjust_oneshot(m_interrupt_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::never, 0);
break;
case 0x23: // Reset Mode 1
case 0x29: // Read Mode 1
@@ -1172,7 +1172,7 @@ void cdicdic_device::register_write(const UINT32 offset, const UINT16 data, cons
{
if(m_command != 0x23 && m_command != 0x24)
{
- timer_adjust_oneshot(m_interrupt_timer, ATTOTIME_IN_HZ(75), 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::from_hz(75), 0);
}
}
break;
@@ -1215,10 +1215,10 @@ void cdicdic_device::device_start()
register_globals();
m_interrupt_timer = timer_alloc(&m_machine, trigger_readback_int, 0);
- timer_adjust_oneshot(m_interrupt_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::never, 0);
m_audio_sample_timer = timer_alloc(&m_machine, audio_sample_trigger, 0);
- timer_adjust_oneshot(m_audio_sample_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_audio_sample_timer, attotime::never, 0);
m_ram = auto_alloc_array(&m_machine, UINT16, 0x3c00/2);
}
diff --git a/src/mame/machine/cdislave.c b/src/mame/machine/cdislave.c
index 70192284e18..f604b2212b0 100644
--- a/src/mame/machine/cdislave.c
+++ b/src/mame/machine/cdislave.c
@@ -93,7 +93,7 @@ void cdislave_device::readback_trigger()
verboselog(&m_machine, 0, "Asserting IRQ2\n" );
cpu_set_input_line_vector(m_machine.device("maincpu"), M68K_IRQ_2, 26);
cputag_set_input_line(&m_machine, "maincpu", M68K_IRQ_2, ASSERT_LINE);
- timer_adjust_oneshot(m_interrupt_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::never, 0);
}
void cdislave_device::prepare_readback(attotime delay, UINT8 channel, UINT8 count, UINT8 data0, UINT8 data1, UINT8 data2, UINT8 data3, UINT8 cmd)
@@ -145,7 +145,7 @@ void cdislave_device::perform_mouse_update()
if(m_polling_active)
{
- prepare_readback(attotime_zero, 0, 4, ((x & 0x380) >> 7) | (buttons << 4), x & 0x7f, (y & 0x380) >> 7, y & 0x7f, 0xf7);
+ prepare_readback(attotime::zero, 0, 4, ((x & 0x380) >> 7) | (buttons << 4), x & 0x7f, (y & 0x380) >> 7, y & 0x7f, 0xf7);
}
}
@@ -209,7 +209,7 @@ void cdislave_device::set_mouse_position()
if(m_polling_active)
{
- //prepare_readback(attotime_zero, 0, 4, (x & 0x380) >> 7, x & 0x7f, (y & 0x380) >> 7, y & 0x7f, 0xf7);
+ //prepare_readback(attotime::zero, 0, 4, (x & 0x380) >> 7, x & 0x7f, (y & 0x380) >> 7, y & 0x7f, 0xf7);
}
}
@@ -344,7 +344,7 @@ void cdislave_device::register_write(const UINT32 offset, const UINT16 data, con
dmadac_enable(&state->dmadac[0], 2, 0);
m_in_index = 0;
m_in_count = 0;
- //timer_adjust_oneshot(cdic->audio_sample_timer, attotime_never, 0);
+ //timer_adjust_oneshot(cdic->audio_sample_timer, attotime::never, 0);
break;
case 0x83: // Unmute Audio
verboselog(&m_machine, 0, "slave_w: Channel %d: Unmute Audio (0x83)\n", offset );
@@ -379,13 +379,13 @@ void cdislave_device::register_write(const UINT32 offset, const UINT16 data, con
memset(m_in_buf, 0, 17);
m_in_index = 0;
m_in_count = 0;
- prepare_readback(ATTOTIME_IN_HZ(4), 3, 4, 0xb0, 0x00, 0x02, 0x15, 0xb0);
+ prepare_readback(attotime::from_hz(4), 3, 4, 0xb0, 0x00, 0x02, 0x15, 0xb0);
break;
//case 0xb1: // Request Disc Base
//memset(m_in_buf, 0, 17);
//m_in_index = 0;
//m_in_count = 0;
- //prepare_readback(ATTOTIME_IN_HZ(10000), 3, 4, 0xb1, 0x00, 0x00, 0x00, 0xb1);
+ //prepare_readback(attotime::from_hz(10000), 3, 4, 0xb1, 0x00, 0x00, 0x00, 0xb1);
//break;
default:
memset(m_in_buf, 0, 17);
@@ -411,22 +411,22 @@ void cdislave_device::register_write(const UINT32 offset, const UINT16 data, con
break;
case 0xf0: // Request SLAVE Revision
verboselog(&m_machine, 0, "slave_w: Channel %d: Request SLAVE Revision (0xf0)\n", offset );
- prepare_readback(ATTOTIME_IN_HZ(10000), 2, 2, 0xf0, 0x32, 0x31, 0, 0xf0);
+ prepare_readback(attotime::from_hz(10000), 2, 2, 0xf0, 0x32, 0x31, 0, 0xf0);
m_in_index = 0;
break;
case 0xf3: // Request Pointer Type
verboselog(&m_machine, 0, "slave_w: Channel %d: Request Pointer Type (0xf3)\n", offset );
m_in_index = 0;
- prepare_readback(ATTOTIME_IN_HZ(10000), 2, 2, 0xf3, 1, 0, 0, 0xf3);
+ prepare_readback(attotime::from_hz(10000), 2, 2, 0xf3, 1, 0, 0, 0xf3);
break;
case 0xf4: // Request Test Plug Status
verboselog(&m_machine, 0, "slave_w: Channel %d: Request Test Plug Status (0xf4)\n", offset );
m_in_index = 0;
- prepare_readback(ATTOTIME_IN_HZ(10000), 2, 2, 0xf4, 0, 0, 0, 0xf4);
+ prepare_readback(attotime::from_hz(10000), 2, 2, 0xf4, 0, 0, 0, 0xf4);
break;
case 0xf6: // Request NTSC/PAL Status
verboselog(&m_machine, 0, "slave_w: Channel %d: Request NTSC/PAL Status (0xf6)\n", offset );
- prepare_readback(attotime_never, 2, 2, 0xf6, 2, 0, 0, 0xf6);
+ prepare_readback(attotime::never, 2, 2, 0xf6, 2, 0, 0, 0xf6);
m_in_index = 0;
break;
case 0xf7: // Enable Input Polling
@@ -475,7 +475,7 @@ void cdislave_device::device_start()
register_globals();
m_interrupt_timer = timer_alloc(&m_machine, trigger_readback_int, 0);
- timer_adjust_oneshot(m_interrupt_timer, attotime_never, 0);
+ timer_adjust_oneshot(m_interrupt_timer, attotime::never, 0);
}
//-------------------------------------------------
diff --git a/src/mame/machine/cubocd32.c b/src/mame/machine/cubocd32.c
index 026bb0b74f5..ec5064167fc 100644
--- a/src/mame/machine/cubocd32.c
+++ b/src/mame/machine/cubocd32.c
@@ -325,7 +325,7 @@ static void akiko_cdda_stop(akiko_state *state)
if (cdda != NULL)
{
cdda_stop_audio(cdda);
- timer_reset( state->frame_timer, attotime_never );
+ timer_reset( state->frame_timer, attotime::never );
}
}
@@ -335,7 +335,7 @@ static void akiko_cdda_play(akiko_state *state, UINT32 lba, UINT32 num_blocks)
if (cdda != NULL)
{
cdda_start_audio(cdda, lba, num_blocks);
- timer_adjust_oneshot( state->frame_timer, ATTOTIME_IN_HZ( 75 ), 0 );
+ timer_adjust_oneshot( state->frame_timer, attotime::from_hz( 75 ), 0 );
}
}
@@ -350,11 +350,11 @@ static void akiko_cdda_pause(akiko_state *state, int pause)
if ( pause )
{
- timer_reset( state->frame_timer, attotime_never );
+ timer_reset( state->frame_timer, attotime::never );
}
else
{
- timer_adjust_oneshot( state->frame_timer, ATTOTIME_IN_HZ( 75 ), 0 );
+ timer_adjust_oneshot( state->frame_timer, attotime::from_hz( 75 ), 0 );
}
}
}
@@ -417,7 +417,7 @@ static TIMER_CALLBACK(akiko_frame_proc)
akiko_set_cd_status(state, 0x80000000); /* subcode ready */
}
- timer_adjust_oneshot( state->frame_timer, ATTOTIME_IN_HZ( 75 ), 0 );
+ timer_adjust_oneshot( state->frame_timer, attotime::from_hz( 75 ), 0 );
}
}
@@ -502,7 +502,7 @@ static TIMER_CALLBACK(akiko_dma_proc)
if ( state->cdrom_readreqmask == 0 )
akiko_set_cd_status(state, 0x04000000);
else
- timer_adjust_oneshot( state->dma_timer, ATTOTIME_IN_USEC( CD_SECTOR_TIME / state->cdrom_speed ), 0 );
+ timer_adjust_oneshot( state->dma_timer, attotime::from_usec( CD_SECTOR_TIME / state->cdrom_speed ), 0 );
}
static void akiko_start_dma(akiko_state *state)
@@ -518,7 +518,7 @@ static void akiko_start_dma(akiko_state *state)
state->cdrom_lba_cur = state->cdrom_lba_start;
- timer_adjust_oneshot( state->dma_timer, ATTOTIME_IN_USEC( CD_SECTOR_TIME / state->cdrom_speed ), 0 );
+ timer_adjust_oneshot( state->dma_timer, attotime::from_usec( CD_SECTOR_TIME / state->cdrom_speed ), 0 );
}
static void akiko_setup_response( akiko_state *state, int len, UINT8 *r1 )
@@ -702,7 +702,7 @@ static void akiko_update_cdrom(akiko_state *state)
{
state->cdrom_cmd_start = (state->cdrom_cmd_start+3) & 0xff;
- timer_set( state->machine, ATTOTIME_IN_MSEC(1), state, resp[0], akiko_cd_delayed_cmd );
+ timer_set( state->machine, attotime::from_msec(1), state, resp[0], akiko_cd_delayed_cmd );
break;
}
diff --git a/src/mame/machine/dc.c b/src/mame/machine/dc.c
index 898f5fddc47..8bda8b8fadc 100644
--- a/src/mame/machine/dc.c
+++ b/src/mame/machine/dc.c
@@ -265,7 +265,7 @@ static void wave_dma_execute(address_space *space)
wave_dma.flag = (wave_dma.indirect & 1) ? 1 : 0;
/* Note: if you trigger an instant DMA IRQ trigger, sfz3upper doesn't play any bgm. */
/* TODO: timing of this */
- timer_set(space->machine, ATTOTIME_IN_USEC(300), NULL, 0, aica_dma_irq);
+ timer_set(space->machine, attotime::from_usec(300), NULL, 0, aica_dma_irq);
}
static void pvr_dma_execute(address_space *space)
@@ -303,7 +303,7 @@ static void pvr_dma_execute(address_space *space)
}
/* Note: do not update the params, since this DMA type doesn't support it. */
/* TODO: timing of this */
- timer_set(space->machine, ATTOTIME_IN_USEC(250), NULL, 0, pvr_dma_irq);
+ timer_set(space->machine, attotime::from_usec(250), NULL, 0, pvr_dma_irq);
}
// register decode helpers
@@ -689,10 +689,10 @@ WRITE64_HANDLER( dc_sysctrl_w )
dc_sysctrl_regs[SB_C2DSTAT]=address+ddtdata.length;
/* 200 usecs breaks sfz3upper */
- timer_set(space->machine, ATTOTIME_IN_USEC(50), NULL, 0, ch2_dma_irq);
+ timer_set(space->machine, attotime::from_usec(50), NULL, 0, ch2_dma_irq);
/* simulate YUV FIFO processing here */
if((address & 0x1800000) == 0x0800000)
- timer_set(space->machine, ATTOTIME_IN_USEC(500), NULL, 0, yuv_fifo_irq);
+ timer_set(space->machine, attotime::from_usec(500), NULL, 0, yuv_fifo_irq);
}
break;
@@ -1066,7 +1066,7 @@ WRITE64_HANDLER( naomi_maple_w )
if (endflag)
{
- timer_set(space->machine, ATTOTIME_IN_USEC(200), NULL, 0, maple_dma_irq);
+ timer_set(space->machine, attotime::from_usec(200), NULL, 0, maple_dma_irq);
break;
}
// skip fixed packet header
@@ -1215,7 +1215,7 @@ WRITE64_HANDLER( dc_maple_w )
if (endflag)
{
- timer_set(space->machine, ATTOTIME_IN_USEC(200), NULL, 0, maple_dma_irq);
+ timer_set(space->machine, attotime::from_usec(200), NULL, 0, maple_dma_irq);
break;
}
// skip fixed packet header
@@ -1333,7 +1333,7 @@ WRITE64_HANDLER( dc_g1_ctrl_w )
sh4_dma_ddt(space->machine->device("maincpu"), &ddtdata);
/* Note: KOF Neowave definitely wants this to be delayed (!) */
/* FIXME: timing of this */
- timer_set(space->machine, ATTOTIME_IN_USEC(500), NULL, 0, gdrom_dma_irq);
+ timer_set(space->machine, attotime::from_usec(500), NULL, 0, gdrom_dma_irq);
}
break;
}
@@ -1556,7 +1556,7 @@ WRITE64_HANDLER( dc_rtc_w )
if (dc_rtcregister[RTC3] == 0)
dc_rtcregister[reg] = old;
else
- timer_adjust_periodic(dc_rtc_timer, attotime_zero, 0, ATTOTIME_IN_SEC(1));
+ timer_adjust_periodic(dc_rtc_timer, attotime::zero, 0, attotime::from_seconds(1));
break;
case RTC3:
dc_rtcregister[RTC3] &= 1;
@@ -1626,7 +1626,7 @@ MACHINE_RESET( dc )
memset(maple_regs, 0, sizeof(maple_regs));
memset(dc_coin_counts, 0, sizeof(dc_coin_counts));
- timer_adjust_periodic(dc_rtc_timer, attotime_zero, 0, ATTOTIME_IN_SEC(1));
+ timer_adjust_periodic(dc_rtc_timer, attotime::zero, 0, attotime::from_seconds(1));
dc_sysctrl_regs[SB_SBREV] = 0x0b;
diff --git a/src/mame/machine/decocass.c b/src/mame/machine/decocass.c
index 212530e3f65..f304a9fdb91 100644
--- a/src/mame/machine/decocass.c
+++ b/src/mame/machine/decocass.c
@@ -2151,9 +2151,9 @@ static void tape_change_speed(device_t *device, INT8 newspeed)
/* compute how fast to run the tape timer */
absnewspeed = (newspeed < 0) ? -newspeed : newspeed;
if (newspeed == 0)
- newperiod = attotime_never;
+ newperiod = attotime::never;
else
- newperiod = ATTOTIME_IN_HZ(TAPE_CLOCKRATE * absnewspeed);
+ newperiod = attotime::from_hz(TAPE_CLOCKRATE * absnewspeed);
/* set the new speed */
timer_adjust_periodic(tape->timer, newperiod, 0, newperiod);
diff --git a/src/mame/machine/gaelco3d.c b/src/mame/machine/gaelco3d.c
index c6da62c5ba7..2b9bc7d68fc 100644
--- a/src/mame/machine/gaelco3d.c
+++ b/src/mame/machine/gaelco3d.c
@@ -275,7 +275,7 @@ static TIMER_CALLBACK( set_status_cb )
static void set_status(gaelco_serial_state *state, UINT8 mask, UINT8 set, int wait)
{
- timer_set(state->device->machine, ATTOTIME_IN_HZ(wait),
+ timer_set(state->device->machine, attotime::from_hz(wait),
state, (mask << 8)|set, set_status_cb);
}
@@ -472,7 +472,7 @@ static DEVICE_START( gaelco_serial )
//state_save_register_device_item(device, 0, earom->data);
#ifdef SHARED_MEM_DRIVER
- timer_adjust_periodic(state->sync_timer, attotime_zero,0,ATTOTIME_IN_HZ(SYNC_FREQ));
+ timer_adjust_periodic(state->sync_timer, attotime::zero,0,attotime::from_hz(SYNC_FREQ));
#endif
state->os_shmem = osd_sharedmem_alloc(PATH_NAME, 0, sizeof(shmem_t));
diff --git a/src/mame/machine/harddriv.c b/src/mame/machine/harddriv.c
index 3d6e7abb9f6..ec9df4537a1 100644
--- a/src/mame/machine/harddriv.c
+++ b/src/mame/machine/harddriv.c
@@ -519,7 +519,7 @@ INLINE int duart_clock(harddriv_state *state)
INLINE attotime duart_clock_period(harddriv_state *state)
{
- return ATTOTIME_IN_HZ(duart_clock(state));
+ return attotime::from_hz(duart_clock(state));
}
@@ -1181,7 +1181,7 @@ READ16_HANDLER( hd68k_ds3_gdata_r )
/* it is important that all the CPUs be in sync before we continue, so spin a little */
/* while to let everyone else catch up */
cpu_spinuntil_trigger(space->cpu, DS3_TRIGGER);
- cpuexec_triggertime(space->machine, DS3_TRIGGER, ATTOTIME_IN_USEC(5));
+ cpuexec_triggertime(space->machine, DS3_TRIGGER, attotime::from_usec(5));
return state->ds3_gdata;
}
diff --git a/src/mame/machine/irobot.c b/src/mame/machine/irobot.c
index 8c9700b5ea0..cb647d4f418 100644
--- a/src/mame/machine/irobot.c
+++ b/src/mame/machine/irobot.c
@@ -94,7 +94,7 @@ WRITE8_HANDLER( irobot_statwr_w )
else
logerror("vg start [busy!] ");
IR_CPU_STATE(space->machine);
- state->irvg_timer->adjust(ATTOTIME_IN_MSEC(10));
+ state->irvg_timer->adjust(attotime::from_msec(10));
#endif
state->irvg_running=1;
}
diff --git a/src/mame/machine/mcr.c b/src/mame/machine/mcr.c
index a22946069ab..5614c6cac86 100644
--- a/src/mame/machine/mcr.c
+++ b/src/mame/machine/mcr.c
@@ -335,7 +335,7 @@ READ8_HANDLER( mcr_ipu_watchdog_r )
{
/* watchdog counter is clocked by 7.3728MHz crystal / 16 */
/* watchdog is tripped when 14-bit counter overflows => / 32768 = 14.0625Hz*/
- timer_adjust_oneshot(ipu_watchdog_timer, ATTOTIME_IN_HZ(7372800 / 16 / 32768), 0);
+ timer_adjust_oneshot(ipu_watchdog_timer, attotime::from_hz(7372800 / 16 / 32768), 0);
return 0xff;
}
diff --git a/src/mame/machine/mcr68.c b/src/mame/machine/mcr68.c
index 15a9f93ad40..2b3c81ef329 100644
--- a/src/mame/machine/mcr68.c
+++ b/src/mame/machine/mcr68.c
@@ -192,9 +192,9 @@ static void mcr68_common_init(running_machine *machine)
int i;
/* reset the 6840's */
- m6840_counter_periods[0] = ATTOTIME_IN_HZ(30); /* clocked by /VBLANK */
- m6840_counter_periods[1] = attotime_never; /* grounded */
- m6840_counter_periods[2] = ATTOTIME_IN_HZ(512 * 30); /* clocked by /HSYNC */
+ m6840_counter_periods[0] = attotime::from_hz(30); /* clocked by /VBLANK */
+ m6840_counter_periods[1] = attotime::never; /* grounded */
+ m6840_counter_periods[2] = attotime::from_hz(512 * 30); /* clocked by /HSYNC */
m6840_status = 0x00;
m6840_status_read_since_int = 0x00;
@@ -212,7 +212,7 @@ static void mcr68_common_init(running_machine *machine)
}
/* initialize the clock */
- m6840_internal_counter_period = ATTOTIME_IN_HZ(cputag_get_clock(machine, "maincpu") / 10);
+ m6840_internal_counter_period = attotime::from_hz(cputag_get_clock(machine, "maincpu") / 10);
/* initialize the sound */
mcr_sound_reset(machine);
@@ -460,7 +460,7 @@ static void reload_count(int counter)
/* counter 0 is self-updating if clocked externally */
if (counter == 0 && !(m6840_state[counter].control & 0x02))
{
- timer_adjust_oneshot(m6840_state[counter].timer, attotime_never, 0);
+ timer_adjust_oneshot(m6840_state[counter].timer, attotime::never, 0);
m6840_state[counter].timer_active = 0;
return;
}
@@ -544,7 +544,7 @@ static WRITE8_HANDLER( mcr68_6840_w_common )
{
for (i = 0; i < 3; i++)
{
- timer_adjust_oneshot(m6840_state[i].timer, attotime_never, 0);
+ timer_adjust_oneshot(m6840_state[i].timer, attotime::never, 0);
m6840_state[i].timer_active = 0;
}
}
diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c
index 0914c8764ff..f8090060577 100644
--- a/src/mame/machine/megadriv.c
+++ b/src/mame/machine/megadriv.c
@@ -927,7 +927,7 @@ static void megadrive_do_insta_68k_to_vram_dma(running_machine *machine, UINT32
if (length==0x00) length = 0xffff;
/* This is a hack until real DMA timings are implemented */
- cpu_spinuntil_time(machine->device("maincpu"), ATTOTIME_IN_NSEC(length * 1000 / 3500));
+ cpu_spinuntil_time(machine->device("maincpu"), attotime::from_nsec(length * 1000 / 3500));
for (count = 0;count<(length>>1);count++)
{
@@ -2269,7 +2269,7 @@ static WRITE16_HANDLER( megadriv_68k_req_z80_bus )
/* If the z80 is running, sync the z80 execution state */
if ( ! genz80.z80_is_reset )
- timer_set( space->machine, attotime_zero, NULL, 0, megadriv_z80_run_state );
+ timer_set( space->machine, attotime::zero, NULL, 0, megadriv_z80_run_state );
}
static WRITE16_HANDLER ( megadriv_68k_req_z80_reset )
@@ -2313,7 +2313,7 @@ static WRITE16_HANDLER ( megadriv_68k_req_z80_reset )
genz80.z80_is_reset = 1;
}
}
- timer_set( space->machine, attotime_zero, NULL, 0, megadriv_z80_run_state );
+ timer_set( space->machine, attotime::zero, NULL, 0, megadriv_z80_run_state );
}
@@ -3019,14 +3019,14 @@ static void calculate_pwm_timer(void)
/* if both RMD and LMD are set to OFF or pwm cycle register is one, then PWM timer ticks doesn't occur */
if(pwm_cycle == 1 || ((pwm_ctrl & 0xf) == 0))
- timer_adjust_oneshot(_32x_pwm_timer, attotime_never, 0);
+ timer_adjust_oneshot(_32x_pwm_timer, attotime::never, 0);
else
{
pwm_timer_tick = 0;
lch_fifo_state = rch_fifo_state = 0x4000;
lch_index_r = rch_index_r = 0;
lch_index_w = rch_index_w = 0;
- timer_adjust_oneshot(_32x_pwm_timer, ATTOTIME_IN_HZ((PWM_CLOCK) / (pwm_cycle - 1)), 0);
+ timer_adjust_oneshot(_32x_pwm_timer, attotime::from_hz((PWM_CLOCK) / (pwm_cycle - 1)), 0);
}
}
@@ -3071,7 +3071,7 @@ static TIMER_CALLBACK( _32x_pwm_callback )
if(sh2_slave_pwmint_enable) { cpu_set_input_line(_32x_slave_cpu, SH2_PINT_IRQ_LEVEL,ASSERT_LINE); }
}
- timer_adjust_oneshot(_32x_pwm_timer, ATTOTIME_IN_HZ((PWM_CLOCK) / (pwm_cycle - 1)), 0);
+ timer_adjust_oneshot(_32x_pwm_timer, attotime::from_hz((PWM_CLOCK) / (pwm_cycle - 1)), 0);
}
static READ16_HANDLER( _32x_pwm_r )
@@ -3989,7 +3989,7 @@ static WRITE16_HANDLER( scd_a12002_memory_mode_w )
{
//printf("main dmna\n");
segacd_dmna = 1;
- timer_adjust_oneshot(segacd_dmna_ret_timer, ATTOTIME_IN_USEC(100), 0);
+ timer_adjust_oneshot(segacd_dmna_ret_timer, attotime::from_usec(100), 0);
}
}
}
@@ -4058,7 +4058,7 @@ static WRITE16_HANDLER( segacd_sub_memory_mode_w )
// printf("sub ret\n");
// segacd_ret = 1;
// segacd_dmna = 0;
- timer_adjust_oneshot(segacd_dmna_ret_timer, ATTOTIME_IN_USEC(100), 0);
+ timer_adjust_oneshot(segacd_dmna_ret_timer, attotime::from_usec(100), 0);
}
}
}
@@ -4098,7 +4098,7 @@ static WRITE16_HANDLER( segacd_sub_memory_mode_w )
// reset it flags etc.?
segacd_ret = 0;
segacd_dmna = 0;
- timer_adjust_oneshot(segacd_dmna_ret_timer, ATTOTIME_IN_USEC(100), 0);
+ timer_adjust_oneshot(segacd_dmna_ret_timer, attotime::from_usec(100), 0);
}
else
{
@@ -4983,7 +4983,7 @@ static TIMER_CALLBACK( segacd_hock_callback )
hock_cmd = 0;
}
- timer_adjust_oneshot(segacd_hock_timer, ATTOTIME_IN_HZ(75), 0);
+ timer_adjust_oneshot(segacd_hock_timer, attotime::from_hz(75), 0);
}
@@ -5022,16 +5022,16 @@ void segacd_init_main_cpu( running_machine* machine )
memory_install_read16_handler (space, 0x0000070, 0x0000073, 0, 0, scd_hint_vector_r );
segacd_gfx_conversion_timer = timer_alloc(machine, segacd_gfx_conversion_timer_callback, 0);
- timer_adjust_oneshot(segacd_gfx_conversion_timer, attotime_never, 0);
+ timer_adjust_oneshot(segacd_gfx_conversion_timer, attotime::never, 0);
segacd_dmna_ret_timer = timer_alloc(machine, segacd_dmna_ret_timer_callback, 0);
- timer_adjust_oneshot(segacd_gfx_conversion_timer, attotime_never, 0);
+ timer_adjust_oneshot(segacd_gfx_conversion_timer, attotime::never, 0);
segacd_hock_timer = timer_alloc(machine, segacd_hock_callback, 0);
- timer_adjust_oneshot(segacd_hock_timer, attotime_never, 0);
+ timer_adjust_oneshot(segacd_hock_timer, attotime::never, 0);
segacd_irq3_timer = timer_alloc(machine, segacd_irq3_timer_callback, 0);
- timer_adjust_oneshot(segacd_irq3_timer, attotime_never, 0);
+ timer_adjust_oneshot(segacd_irq3_timer, attotime::never, 0);
@@ -5112,8 +5112,8 @@ static MACHINE_RESET( segacd )
segacd_ram_mode = 0;
segacd_ram_mode_old = 0;
- timer_adjust_oneshot(segacd_dmna_ret_timer, attotime_zero, 0);
- timer_adjust_oneshot(segacd_hock_timer, attotime_zero, 0);
+ timer_adjust_oneshot(segacd_dmna_ret_timer, attotime::zero, 0);
+ timer_adjust_oneshot(segacd_hock_timer, attotime::zero, 0);
hock_cmd = 0;
}
@@ -5259,7 +5259,7 @@ static void cdd_hock_irq(running_machine *machine,UINT8 dir)
if((segacd_cdd.ctrl & 4 || dir) && segacd_irq_mask & 0x10) // export status, check if bit 2 (HOst ClocK) and irq is enabled
{
segacd_cdd.ctrl |= 4; // enable Hock bit if it isn't already active
- timer_set(machine, ATTOTIME_IN_HZ(75), NULL,0, execute_hock_irq); // 1 / 75th of a second
+ timer_set(machine, attotime::from_hz(75), NULL,0, execute_hock_irq); // 1 / 75th of a second
}
}
#endif
@@ -5288,9 +5288,9 @@ static WRITE16_HANDLER( segacd_cdd_ctrl_w )
hock_cmd = (data & 4) >> 2;
if(data & 4) // enable Hock timer
- timer_adjust_oneshot(segacd_hock_timer, ATTOTIME_IN_HZ(75), 0);
+ timer_adjust_oneshot(segacd_hock_timer, attotime::from_hz(75), 0);
else
- timer_adjust_oneshot(segacd_hock_timer, attotime_never, 0);
+ timer_adjust_oneshot(segacd_hock_timer, attotime::never, 0);
}
/* 68k <- CDD communication comms are 4-bit wide */
@@ -5724,7 +5724,7 @@ WRITE16_HANDLER( segacd_trace_vector_base_address_w )
segacd_conversion_active = 1;
// todo: proper time calculation
- timer_adjust_oneshot(segacd_gfx_conversion_timer, ATTOTIME_IN_HZ(500), 0);
+ timer_adjust_oneshot(segacd_gfx_conversion_timer, attotime::from_hz(500), 0);
int line;
@@ -5862,7 +5862,7 @@ static READ16_HANDLER( segacd_irq3timer_r )
return segacd_irq3_timer_reg; // always returns value written, not current counter!
}
-#define SEGACD_IRQ3_TIMER_SPEED (ATTOTIME_IN_NSEC(segacd_irq3_timer_reg*30720))
+#define SEGACD_IRQ3_TIMER_SPEED (attotime::from_nsec(segacd_irq3_timer_reg*30720))
static WRITE16_HANDLER( segacd_irq3timer_w )
{
@@ -5875,7 +5875,7 @@ static WRITE16_HANDLER( segacd_irq3timer_w )
if (segacd_irq3_timer_reg)
timer_adjust_oneshot(segacd_irq3_timer, SEGACD_IRQ3_TIMER_SPEED, 0);
else
- timer_adjust_oneshot(segacd_irq3_timer, attotime_never, 0);
+ timer_adjust_oneshot(segacd_irq3_timer, attotime::never, 0);
printf("segacd_irq3timer_w %02x\n", segacd_irq3_timer_reg);
}
@@ -6269,7 +6269,7 @@ static UINT8 megadrive_io_read_data_port_svp(running_machine *machine, int portn
static READ16_HANDLER( svp_speedup_r )
{
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(100));
return 0x0425;
}
@@ -8259,12 +8259,12 @@ static TIMER_DEVICE_CALLBACK( scanline_timer_callback )
genesis_scanline_counter++;
// mame_printf_debug("scanline %d\n",genesis_scanline_counter);
scanline_timer->adjust(attotime::from_hz(megadriv_framerate) / megadrive_total_scanlines);
- render_timer->adjust(ATTOTIME_IN_USEC(1));
+ render_timer->adjust(attotime::from_usec(1));
if (genesis_scanline_counter==megadrive_irq6_scanline )
{
// mame_printf_debug("x %d",genesis_scanline_counter);
- irq6_on_timer->adjust(ATTOTIME_IN_USEC(6));
+ irq6_on_timer->adjust(attotime::from_usec(6));
megadrive_irq6_pending = 1;
megadrive_vblank_flag = 1;
@@ -8299,7 +8299,7 @@ static TIMER_DEVICE_CALLBACK( scanline_timer_callback )
if (MEGADRIVE_REG0_IRQ4_ENABLE)
{
- irq4_on_timer->adjust(ATTOTIME_IN_USEC(1));
+ irq4_on_timer->adjust(attotime::from_usec(1));
//mame_printf_debug("irq4 on scanline %d reload %d\n",genesis_scanline_counter,MEGADRIVE_REG0A_HINT_VALUE);
}
}
@@ -8310,7 +8310,7 @@ static TIMER_DEVICE_CALLBACK( scanline_timer_callback )
else irq4counter=MEGADRIVE_REG0A_HINT_VALUE;
}
- //if (genesis_scanline_counter==0) irq4_on_timer->adjust(ATTOTIME_IN_USEC(2));
+ //if (genesis_scanline_counter==0) irq4_on_timer->adjust(attotime::from_usec(2));
if(_32x_is_connected)
{
@@ -8424,7 +8424,7 @@ MACHINE_RESET( megadriv )
genz80.z80_has_bus = 1;
genz80.z80_bank_addr = 0;
genesis_scanline_counter = -1;
- timer_set( machine, attotime_zero, NULL, 0, megadriv_z80_run_state );
+ timer_set( machine, attotime::zero, NULL, 0, megadriv_z80_run_state );
}
megadrive_imode = 0;
@@ -8438,8 +8438,8 @@ MACHINE_RESET( megadriv )
irq6_on_timer = machine->device<timer_device>("irq6_timer");
irq4_on_timer = machine->device<timer_device>("irq4_timer");
- frame_timer->adjust(attotime_zero);
- scanline_timer->adjust(attotime_zero);
+ frame_timer->adjust(attotime::zero);
+ scanline_timer->adjust(attotime::zero);
if (genesis_other_hacks)
{
@@ -8605,10 +8605,10 @@ int megadrive_z80irq_hpos = 320;
//xxx = machine->device<cpudevice>("maincpu")->attotime_to_cycles(time_elapsed_since_crap);
//mame_printf_debug("---------- cycles %d, %08x %08x\n",xxx, (UINT32)(time_elapsed_since_crap.attoseconds>>32),(UINT32)(time_elapsed_since_crap.attoseconds&0xffffffff));
//mame_printf_debug("---------- framet %d, %08x %08x\n",xxx, (UINT32)(frametime>>32),(UINT32)(frametime&0xffffffff));
- frame_timer->adjust(attotime_zero);
+ frame_timer->adjust(attotime::zero);
}
- scanline_timer->adjust(attotime_zero);
+ scanline_timer->adjust(attotime::zero);
if(_32x_is_connected)
_32x_hcount_compare_val = -1;
@@ -8789,7 +8789,7 @@ MACHINE_CONFIG_DERIVED( genesis_32x, megadriv )
//
// boosting the interleave here actually makes Kolibri run incorrectly however, that
// one works best just boosting the interleave on communications?!
- MCFG_QUANTUM_TIME(HZ(1800000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1800000))
// we need to remove and re-add the sound system because the balance is different
// due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is slient?!)
@@ -8837,7 +8837,7 @@ MACHINE_CONFIG_DERIVED( genesis_32x_pal, megadpal )
//
// boosting the interleave here actually makes Kolibri run incorrectly however, that
// one works best just boosting the interleave on communications?!
- MCFG_QUANTUM_TIME(HZ(1800000))
+ MCFG_QUANTUM_TIME(attotime::from_hz(1800000))
// we need to remove and re-add the sound system because the balance is different
// due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is slient?!)
@@ -8960,7 +8960,7 @@ static void megadriv_init_common(running_machine *machine)
if(_32x_is_connected)
{
_32x_pwm_timer = timer_alloc(machine, _32x_pwm_callback, 0);
- timer_adjust_oneshot(_32x_pwm_timer, attotime_never, 0);
+ timer_adjust_oneshot(_32x_pwm_timer, attotime::never, 0);
}
sega_cd_connected = 0;
diff --git a/src/mame/machine/mhavoc.c b/src/mame/machine/mhavoc.c
index a296c6bca47..c2cc938229f 100644
--- a/src/mame/machine/mhavoc.c
+++ b/src/mame/machine/mhavoc.c
@@ -136,7 +136,7 @@ static TIMER_CALLBACK( delayed_gamma_w )
cputag_set_input_line(machine, "gamma", INPUT_LINE_NMI, PULSE_LINE);
/* the sound CPU needs to reply in 250microseconds (according to Neil Bradley) */
- timer_set(machine, ATTOTIME_IN_USEC(250), NULL, 0, 0);
+ timer_set(machine, attotime::from_usec(250), NULL, 0, 0);
}
diff --git a/src/mame/machine/micro3d.c b/src/mame/machine/micro3d.c
index dc5a6dae66b..7838cd000be 100644
--- a/src/mame/machine/micro3d.c
+++ b/src/mame/machine/micro3d.c
@@ -658,7 +658,7 @@ WRITE16_HANDLER( micro3d_adc_w )
return;
}
- timer_set(space->machine, ATTOTIME_IN_USEC(40), NULL, data & ~4, adc_done_callback);
+ timer_set(space->machine, attotime::from_usec(40), NULL, data & ~4, adc_done_callback);
}
CUSTOM_INPUT( botssa_hwchk_r )
@@ -701,7 +701,7 @@ WRITE16_HANDLER( micro3d_reset_w )
WRITE16_HANDLER( host_drmath_int_w )
{
cputag_set_input_line(space->machine, "drmath", AM29000_INTR2, ASSERT_LINE);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(10));
}
diff --git a/src/mame/machine/midwayic.c b/src/mame/machine/midwayic.c
index 7f16e3fdf25..d1807d6aa31 100644
--- a/src/mame/machine/midwayic.c
+++ b/src/mame/machine/midwayic.c
@@ -436,7 +436,7 @@ void midway_serial_pic2_w(address_space *space, UINT8 data)
/* otherwise, flag the time as having just been written for 1/2 second */
else
{
- timer_adjust_oneshot(pic.time_write_timer, ATTOTIME_IN_MSEC(500), 0);
+ timer_adjust_oneshot(pic.time_write_timer, attotime::from_msec(500), 0);
pic.time_just_written = 1;
pic.state = 0;
}
diff --git a/src/mame/machine/model1.c b/src/mame/machine/model1.c
index 386040e2a21..fa34278eb0d 100644
--- a/src/mame/machine/model1.c
+++ b/src/mame/machine/model1.c
@@ -2087,7 +2087,7 @@ READ16_HANDLER( model1_tgp_vr_adr_r )
if ( ram_adr == 0 && copro_fifoin_num != 0 )
{
/* spin the main cpu and let the TGP catch up */
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(100));
}
return ram_adr;
@@ -2113,7 +2113,7 @@ READ16_HANDLER( model1_vr_tgp_ram_r )
if ( ram_adr == 0 && r == 0xffff )
{
/* if the TGP is busy, spin some more */
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(100));
}
if ( ram_adr & 0x8000 )
diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c
index a75a4b1aa45..f967a7ba392 100644
--- a/src/mame/machine/n64.c
+++ b/src/mame/machine/n64.c
@@ -2077,7 +2077,7 @@ MACHINE_RESET( n64 )
cic_status = 0;
- timer_adjust_oneshot(audio_timer, attotime_never, 0);
+ timer_adjust_oneshot(audio_timer, attotime::never, 0);
cputag_set_input_line(machine, "rsp", INPUT_LINE_HALT, ASSERT_LINE);
diff --git a/src/mame/machine/namco06.c b/src/mame/machine/namco06.c
index 57bbfbb574f..c82dc9aee51 100644
--- a/src/mame/machine/namco06.c
+++ b/src/mame/machine/namco06.c
@@ -190,7 +190,7 @@ WRITE8_DEVICE_HANDLER( namco_06xx_ctrl_w )
if ((state->control & 0x0f) == 0)
{
LOG(("disabling nmi generate timer\n"));
- timer_adjust_oneshot(state->nmi_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->nmi_timer, attotime::never, 0);
}
else
{
@@ -200,7 +200,7 @@ WRITE8_DEVICE_HANDLER( namco_06xx_ctrl_w )
// inputs if a transfer terminates at the wrong time.
// On the other hand, the time cannot be too short otherwise the 54XX will
// not have enough time to process the incoming controls.
- timer_adjust_periodic(state->nmi_timer, ATTOTIME_IN_USEC(200), 0, ATTOTIME_IN_USEC(200));
+ timer_adjust_periodic(state->nmi_timer, attotime::from_usec(200), 0, attotime::from_usec(200));
if (state->control & 0x10)
for (devnum = 0; devnum < 4; devnum++)
diff --git a/src/mame/machine/namco50.c b/src/mame/machine/namco50.c
index 9c402caa822..16a34557f50 100644
--- a/src/mame/machine/namco50.c
+++ b/src/mame/machine/namco50.c
@@ -219,7 +219,7 @@ static void namco_50xx_irq_set(device_t *device)
// The input clock to the 06XX interface chip is 64H, that is
// 18432000/6/64 = 48kHz, so it makes sense for the irq line to be
// asserted for one clock cycle ~= 21us.
- timer_set(device->machine, ATTOTIME_IN_USEC(21), (void *)device, 0, namco_50xx_irq_clear);
+ timer_set(device->machine, attotime::from_usec(21), (void *)device, 0, namco_50xx_irq_clear);
}
WRITE8_DEVICE_HANDLER( namco_50xx_write )
diff --git a/src/mame/machine/namco53.c b/src/mame/machine/namco53.c
index 97c2265b0b7..2f58c35c9a4 100644
--- a/src/mame/machine/namco53.c
+++ b/src/mame/machine/namco53.c
@@ -126,7 +126,7 @@ void namco_53xx_read_request(device_t *device)
// The input clock to the 06XX interface chip is 64H, that is
// 18432000/6/64 = 48kHz, so it makes sense for the irq line to be
// asserted for one clock cycle ~= 21us.
- timer_set(device->machine, ATTOTIME_IN_USEC(21), (void *)device, 0, namco_53xx_irq_clear);
+ timer_set(device->machine, attotime::from_usec(21), (void *)device, 0, namco_53xx_irq_clear);
}
READ8_DEVICE_HANDLER( namco_53xx_read )
diff --git a/src/mame/machine/namcos2.c b/src/mame/machine/namcos2.c
index 9937e769c32..e9b94dbe3a8 100644
--- a/src/mame/machine/namcos2.c
+++ b/src/mame/machine/namcos2.c
@@ -131,7 +131,7 @@ MACHINE_RESET( namcos2 )
InitC148();
/* reset POSIRQ timer */
- timer_adjust_oneshot(namcos2_posirq_timer, attotime_never, 0);
+ timer_adjust_oneshot(namcos2_posirq_timer, attotime::never, 0);
}
/*************************************************************/
diff --git a/src/mame/machine/naomi.c b/src/mame/machine/naomi.c
index 2aae6edbff6..53d3e95d696 100644
--- a/src/mame/machine/naomi.c
+++ b/src/mame/machine/naomi.c
@@ -28,7 +28,7 @@ UINT16 actel_id;
static READ64_HANDLER( naomi_bios_idle_skip_r )
{
if (cpu_get_pc(space->cpu)==0xc04173c)
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(500));
//cpu_spinuntil_int(space->cpu);
// else
// printf("%08x\n", cpu_get_pc(space->cpu));
@@ -198,7 +198,7 @@ DRIVER_INIT(naomi_mp)
static READ64_HANDLER( naomigd_ggxxsla_idle_skip_r )
{
if (cpu_get_pc(space->cpu)==0x0c0c9adc)
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(500));
return naomi_ram64[0x1aae18/8];
}
@@ -212,7 +212,7 @@ DRIVER_INIT( ggxxsla )
static READ64_HANDLER( naomigd_ggxx_idle_skip_r )
{
if (cpu_get_pc(space->cpu)==0xc0b5c3c) // or 0xc0bab0c
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(500));
return naomi_ram64[0x1837b8/8];
}
@@ -227,7 +227,7 @@ DRIVER_INIT( ggxx )
static READ64_HANDLER( naomigd_ggxxrl_idle_skip_r )
{
if (cpu_get_pc(space->cpu)==0xc0b84bc) // or 0xc0bab0c
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(500));
//printf("%08x\n", cpu_get_pc(space->cpu));
@@ -244,7 +244,7 @@ DRIVER_INIT( ggxxrl )
static READ64_HANDLER( naomigd_sfz3ugd_idle_skip_r )
{
if (cpu_get_pc(space->cpu)==0xc36a2dc)
- cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));
+ cpu_spinuntil_time(space->cpu, attotime::from_usec(500));
return naomi_ram64[0x5dc900/8];
}
diff --git a/src/mame/machine/opwolf.c b/src/mame/machine/opwolf.c
index 10ad5c2fba9..a8979e16f0b 100644
--- a/src/mame/machine/opwolf.c
+++ b/src/mame/machine/opwolf.c
@@ -752,5 +752,5 @@ void opwolf_cchip_init( running_machine *machine )
state->cchip_coins_for_credit[1] = 1;
state->cchip_credits_for_coin[1] = 1;
- timer_pulse(machine, ATTOTIME_IN_HZ(60), NULL, 0, cchip_timer);
+ timer_pulse(machine, attotime::from_hz(60), NULL, 0, cchip_timer);
}
diff --git a/src/mame/machine/pcshare.c b/src/mame/machine/pcshare.c
index 4afa09354d2..9de67bc11b2 100644
--- a/src/mame/machine/pcshare.c
+++ b/src/mame/machine/pcshare.c
@@ -99,14 +99,14 @@ void pc_keyb_set_clock(int on)
if (pc_keyb.on != on)
{
if (!on)
- timer_adjust_oneshot(pc_keyb.timer, ATTOTIME_IN_MSEC(5), 0);
+ timer_adjust_oneshot(pc_keyb.timer, attotime::from_msec(5), 0);
else {
if ( pc_keyb.self_test ) {
/* The self test of the keyboard takes some time. 2 msec seems to work. */
/* This still needs to verified against a real keyboard. */
- timer_adjust_oneshot(pc_keyb.timer, ATTOTIME_IN_MSEC( 2 ), 0);
+ timer_adjust_oneshot(pc_keyb.timer, attotime::from_msec( 2 ), 0);
} else {
- timer_reset(pc_keyb.timer, attotime_never);
+ timer_reset(pc_keyb.timer, attotime::never);
pc_keyb.self_test = 0;
}
}
diff --git a/src/mame/machine/pitnrun.c b/src/mame/machine/pitnrun.c
index f3f045620c9..6889a163448 100644
--- a/src/mame/machine/pitnrun.c
+++ b/src/mame/machine/pitnrun.c
@@ -43,7 +43,7 @@ static TIMER_CALLBACK( pitnrun_mcu_real_data_w )
WRITE8_HANDLER( pitnrun_mcu_data_w )
{
timer_call_after_resynch(space->machine, NULL, data,pitnrun_mcu_real_data_w);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(5));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(5));
}
READ8_HANDLER( pitnrun_mcu_status_r )
diff --git a/src/mame/machine/psx.c b/src/mame/machine/psx.c
index 5478ac53000..8bb25e0f6fe 100644
--- a/src/mame/machine/psx.c
+++ b/src/mame/machine/psx.c
@@ -254,7 +254,7 @@ static void dma_stop_timer( psx_machine *p_psx, int n_channel )
{
psx_dma_channel *dma = &p_psx->channel[ n_channel ];
- timer_adjust_oneshot( dma->timer, attotime_never, 0);
+ timer_adjust_oneshot( dma->timer, attotime::never, 0);
dma->b_running = 0;
}
@@ -656,7 +656,7 @@ static void root_timer_adjust( psx_machine *p_psx, int n_counter )
if( ( root->n_mode & PSX_RC_STOP ) != 0 )
{
- timer_adjust_oneshot( root->timer, attotime_never, n_counter);
+ timer_adjust_oneshot( root->timer, attotime::never, n_counter);
}
else
{
@@ -818,13 +818,13 @@ static void sio_timer_adjust( psx_machine *p_psx, int n_port )
}
else
{
- n_time = attotime_never;
+ n_time = attotime::never;
verboselog( p_psx, 0, "sio_timer_adjust( %d ) invalid baud rate ( %d x %d )\n", n_port, n_prescaler, sio->n_baud );
}
}
else
{
- n_time = attotime_never;
+ n_time = attotime::never;
verboselog( p_psx, 2, "sio_timer_adjust( %d ) finished\n", n_port );
}
timer_adjust_oneshot( sio->timer, n_time, n_port);
diff --git a/src/mame/machine/qix.c b/src/mame/machine/qix.c
index d97edaa7fdc..c54fc648690 100644
--- a/src/mame/machine/qix.c
+++ b/src/mame/machine/qix.c
@@ -375,7 +375,7 @@ static WRITE8_DEVICE_HANDLER( qixmcu_coinctrl_w )
cputag_set_input_line(device->machine, "mcu", M68705_IRQ_LINE, ASSERT_LINE);
/* temporarily boost the interleave to sync things up */
/* note: I'm using 50 because 30 is not enough for space dungeon at game over */
- cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(50));
+ cpuexec_boost_interleave(device->machine, attotime::zero, attotime::from_usec(50));
}
else
cputag_set_input_line(device->machine, "mcu", M68705_IRQ_LINE, CLEAR_LINE);
diff --git a/src/mame/machine/rainbow.c b/src/mame/machine/rainbow.c
index b810e79c00d..a617fdec20f 100644
--- a/src/mame/machine/rainbow.c
+++ b/src/mame/machine/rainbow.c
@@ -833,5 +833,5 @@ void rainbow_cchip_init( running_machine *machine, int version )
state_save_register_item(machine, "cchip", NULL, 0, state->current_bank);
- timer_pulse(machine, ATTOTIME_IN_HZ(60), NULL, 0, cchip_timer);
+ timer_pulse(machine, attotime::from_hz(60), NULL, 0, cchip_timer);
}
diff --git a/src/mame/machine/segamsys.c b/src/mame/machine/segamsys.c
index ed814471e0e..2ffdfb453b5 100644
--- a/src/mame/machine/segamsys.c
+++ b/src/mame/machine/segamsys.c
@@ -446,7 +446,7 @@ static void *start_vdp(running_machine *machine, int type)
/* stop timer and clear ram.. used on megatech when we switch between genesis and sms mode */
void segae_md_sms_stop_scanline_timer(void)
{
- timer_adjust_oneshot(md_sms_vdp->sms_scanline_timer, attotime_never, 0);
+ timer_adjust_oneshot(md_sms_vdp->sms_scanline_timer, attotime::never, 0);
memset(md_sms_vdp->vram,0x00,0x4000);
}
@@ -1008,7 +1008,7 @@ static TIMER_CALLBACK( sms_scanline_timer_callback )
if (chip->sms_scanline_counter<(chip->sms_total_scanlines-1))
{
chip->sms_scanline_counter++;
- timer_adjust_oneshot(chip->sms_scanline_timer, ATTOTIME_IN_HZ(chip->sms_framerate * chip->sms_total_scanlines), 0);
+ timer_adjust_oneshot(chip->sms_scanline_timer, attotime::from_hz(chip->sms_framerate * chip->sms_total_scanlines), 0);
if (chip->sms_scanline_counter>sms_mode_table[chip->screen_mode].sms2_height)
{
@@ -1175,7 +1175,7 @@ static void end_of_frame(running_machine *machine, struct sms_vdp *chip)
chip->sms_scanline_counter = -1;
chip->yscroll = chip->regs[0x9]; // this can't change mid-frame
- timer_adjust_oneshot(chip->sms_scanline_timer, attotime_zero, 0);
+ timer_adjust_oneshot(chip->sms_scanline_timer, attotime::zero, 0);
}
@@ -1198,7 +1198,7 @@ VIDEO_START(sms)
MACHINE_RESET(sms)
{
- timer_adjust_oneshot(md_sms_vdp->sms_scanline_timer, attotime_zero, 0);
+ timer_adjust_oneshot(md_sms_vdp->sms_scanline_timer, attotime::zero, 0);
}
@@ -1234,18 +1234,18 @@ void segae_set_vram_banks(UINT8 data)
MACHINE_RESET(systeme)
{
- timer_adjust_oneshot(vdp1->sms_scanline_timer, attotime_zero, 0);
- timer_adjust_oneshot(vdp2->sms_scanline_timer, attotime_zero, 0);
+ timer_adjust_oneshot(vdp1->sms_scanline_timer, attotime::zero, 0);
+ timer_adjust_oneshot(vdp2->sms_scanline_timer, attotime::zero, 0);
}
MACHINE_RESET(megatech_md_sms)
{
- timer_adjust_oneshot(md_sms_vdp->sms_scanline_timer, attotime_zero, 0);
+ timer_adjust_oneshot(md_sms_vdp->sms_scanline_timer, attotime::zero, 0);
}
MACHINE_RESET(megatech_bios)
{
- timer_adjust_oneshot(vdp1->sms_scanline_timer, attotime_zero, 0);
+ timer_adjust_oneshot(vdp1->sms_scanline_timer, attotime::zero, 0);
}
VIDEO_EOF(systeme)
diff --git a/src/mame/machine/slikshot.c b/src/mame/machine/slikshot.c
index 4f7b5913584..f7fb4e8171b 100644
--- a/src/mame/machine/slikshot.c
+++ b/src/mame/machine/slikshot.c
@@ -516,7 +516,7 @@ static TIMER_CALLBACK( delayed_z80_control_w )
}
/* boost the interleave whenever this is written to */
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(100));
/* stash the new value */
z80_ctrl = data;
diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c
index bbf6280d5c8..39c77d7d96d 100644
--- a/src/mame/machine/snes.c
+++ b/src/mame/machine/snes.c
@@ -107,7 +107,7 @@ static TIMER_CALLBACK( snes_nmi_tick )
cpu_set_input_line(state->maincpu, G65816_LINE_NMI, ASSERT_LINE);
// don't happen again
- timer_adjust_oneshot(state->nmi_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->nmi_timer, attotime::never, 0);
}
static void snes_hirq_tick( running_machine *machine )
@@ -121,7 +121,7 @@ static void snes_hirq_tick( running_machine *machine )
cpu_set_input_line(state->maincpu, G65816_LINE_IRQ, ASSERT_LINE);
// don't happen again
- timer_adjust_oneshot(state->hirq_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->hirq_timer, attotime::never, 0);
}
static TIMER_CALLBACK( snes_hirq_tick_callback )
@@ -157,7 +157,7 @@ static TIMER_CALLBACK( snes_update_io )
state->io_read(cpu0space->machine);
snes_ram[HVBJOY] &= 0xfe; /* Clear busy bit */
- timer_adjust_oneshot(state->io_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->io_timer, attotime::never, 0);
}
static TIMER_CALLBACK( snes_scanline_tick )
@@ -245,7 +245,7 @@ static TIMER_CALLBACK( snes_scanline_tick )
cpu_set_input_line(state->maincpu, G65816_LINE_NMI, CLEAR_LINE );
}
- timer_adjust_oneshot(state->scanline_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->scanline_timer, attotime::never, 0);
timer_adjust_oneshot(state->hblank_timer, machine->primary_screen->time_until_pos(snes_ppu.beam.current_vert, state->hblank_offset * state->htmult), 0);
// printf("%02x %d\n",snes_ram[HVBJOY],snes_ppu.beam.current_vert);
@@ -261,7 +261,7 @@ static TIMER_CALLBACK( snes_hblank_tick )
snes_ppu.beam.current_vert = machine->primary_screen->vpos();
/* make sure we halt */
- timer_adjust_oneshot(state->hblank_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->hblank_timer, attotime::never, 0);
/* draw a scanline */
if (snes_ppu.beam.current_vert <= snes_ppu.beam.last_visible_line)
@@ -616,7 +616,7 @@ WRITE8_HANDLER( snes_w_io )
{
// printf("816: %02x to APU @ %d (PC=%06x)\n", data, offset & 3,cpu_get_pc(space->cpu));
spc_port_in(state->spc700, offset & 0x3, data);
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(20));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(20));
return;
}
@@ -1709,19 +1709,19 @@ static void snes_init_timers( running_machine *machine )
/* init timers and stop them */
state->scanline_timer = timer_alloc(machine, snes_scanline_tick, NULL);
- timer_adjust_oneshot(state->scanline_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->scanline_timer, attotime::never, 0);
state->hblank_timer = timer_alloc(machine, snes_hblank_tick, NULL);
- timer_adjust_oneshot(state->hblank_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->hblank_timer, attotime::never, 0);
state->nmi_timer = timer_alloc(machine, snes_nmi_tick, NULL);
- timer_adjust_oneshot(state->nmi_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->nmi_timer, attotime::never, 0);
state->hirq_timer = timer_alloc(machine, snes_hirq_tick_callback, NULL);
- timer_adjust_oneshot(state->hirq_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->hirq_timer, attotime::never, 0);
state->div_timer = timer_alloc(machine, snes_div_callback, NULL);
- timer_adjust_oneshot(state->div_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->div_timer, attotime::never, 0);
state->mult_timer = timer_alloc(machine, snes_mult_callback, NULL);
- timer_adjust_oneshot(state->mult_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->mult_timer, attotime::never, 0);
state->io_timer = timer_alloc(machine, snes_update_io, NULL);
- timer_adjust_oneshot(state->io_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->io_timer, attotime::never, 0);
// SNES hcounter has a 0-339 range. hblank starts at counter 260.
// clayfighter sets an HIRQ at 260, apparently it wants it to be before hdma kicks off, so we'll delay 2 pixels.
diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c
index 36c96470114..b198c0af9b1 100644
--- a/src/mame/machine/stfight.c
+++ b/src/mame/machine/stfight.c
@@ -130,7 +130,7 @@ INTERRUPT_GEN( stfight_vb_interrupt )
{
// Do a RST10
cpu_set_input_line_and_vector(device, 0, HOLD_LINE, 0xd7);
- timer_set(device->machine, ATTOTIME_IN_HZ(120), NULL, 0, stfight_interrupt_1);
+ timer_set(device->machine, attotime::from_hz(120), NULL, 0, stfight_interrupt_1);
}
/*
diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c
index f2ea27cf7eb..d4b5b1f3a0a 100644
--- a/src/mame/machine/stvcd.c
+++ b/src/mame/machine/stvcd.c
@@ -196,7 +196,7 @@ TIMER_DEVICE_CALLBACK( stv_sector_cb )
cr3 = (cd_curfad>>16)&0xff;
cr4 = cd_curfad;
- timer.adjust(ATTOTIME_IN_HZ(150));
+ timer.adjust(attotime::from_hz(150));
}
// global functions
@@ -272,7 +272,7 @@ void stvcd_reset(running_machine *machine)
}
sector_timer = machine->device<timer_device>("sector_timer");
- sector_timer->adjust(ATTOTIME_IN_HZ(150)); // 150 sectors / second = 300kBytes/second
+ sector_timer->adjust(attotime::from_hz(150)); // 150 sectors / second = 300kBytes/second
}
static blockT *cd_alloc_block(UINT8 *blknum)
@@ -764,7 +764,7 @@ static void cd_writeWord(running_machine *machine, UINT32 addr, UINT16 data)
// and do the disc I/O
// make sure it doesn't come in too early
sector_timer->reset();
- sector_timer->adjust(ATTOTIME_IN_HZ(150)); // 150 sectors / second = 300kBytes/second
+ sector_timer->adjust(attotime::from_hz(150)); // 150 sectors / second = 300kBytes/second
break;
case 0x1100: // disk seek
@@ -1272,7 +1272,7 @@ static void cd_writeWord(running_machine *machine, UINT32 addr, UINT16 data)
playtype = 1;
// and do the disc I/O
-// sector_timer->adjust(ATTOTIME_IN_HZ(150)); // 150 sectors / second = 300kBytes/second
+// sector_timer->adjust(attotime::from_hz(150)); // 150 sectors / second = 300kBytes/second
break;
case 0x7500:
diff --git a/src/mame/machine/tait8741.c b/src/mame/machine/tait8741.c
index e0367526804..bb073891cec 100644
--- a/src/mame/machine/tait8741.c
+++ b/src/mame/machine/tait8741.c
@@ -440,7 +440,7 @@ static void josvolly_8741_do(running_machine *machine, int num)
if( (i8741[num].sts & 0x02) )
{
/* transmit data */
- timer_set (machine, ATTOTIME_IN_USEC(1), NULL, num, josvolly_8741_tx);
+ timer_set (machine, attotime::from_usec(1), NULL, num, josvolly_8741_tx);
}
}
diff --git a/src/mame/machine/taitosj.c b/src/mame/machine/taitosj.c
index 7528c1da0c8..361f84255c4 100644
--- a/src/mame/machine/taitosj.c
+++ b/src/mame/machine/taitosj.c
@@ -122,13 +122,13 @@ WRITE8_HANDLER( taitosj_mcu_data_w )
LOG(("%04x: protection write %02x\n",cpu_get_pc(space->cpu),data));
timer_call_after_resynch(space->machine, NULL, data,taitosj_mcu_real_data_w);
/* temporarily boost the interleave to sync things up */
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(10));
}
READ8_HANDLER( taitosj_mcu_status_r )
{
/* temporarily boost the interleave to sync things up */
- cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(10));
+ cpuexec_boost_interleave(space->machine, attotime::zero, attotime::from_usec(10));
/* bit 0 = the 68705 has read data from the Z80 */
/* bit 1 = the 68705 has written data for the Z80 */
diff --git a/src/mame/machine/ticket.c b/src/mame/machine/ticket.c
index bb69caf6a21..5060260b450 100644
--- a/src/mame/machine/ticket.c
+++ b/src/mame/machine/ticket.c
@@ -49,7 +49,7 @@ static TIMER_CALLBACK( ticket_dispenser_toggle )
{
state->status ^= state->active_bit;
LOG(("Ticket Status Changed to %02X\n", state->status));
- timer_adjust_oneshot(state->timer, ATTOTIME_IN_MSEC(state->time_msec), 0);
+ timer_adjust_oneshot(state->timer, attotime::from_msec(state->time_msec), 0);
}
if (state->status == state->ticketdispensed)
@@ -91,7 +91,7 @@ WRITE8_DEVICE_HANDLER( ticket_dispenser_w )
if (!state->power)
{
LOG(("%s: Ticket Power On\n", cpuexec_describe_context(device->machine)));
- timer_adjust_oneshot(state->timer, ATTOTIME_IN_MSEC(state->time_msec), 0);
+ timer_adjust_oneshot(state->timer, attotime::from_msec(state->time_msec), 0);
state->power = 1;
state->status = state->ticketnotdispensed;
@@ -102,7 +102,7 @@ WRITE8_DEVICE_HANDLER( ticket_dispenser_w )
if (state->power)
{
LOG(("%s: Ticket Power Off\n", cpuexec_describe_context(device->machine)));
- timer_adjust_oneshot(state->timer, attotime_never, 0);
+ timer_adjust_oneshot(state->timer, attotime::never, 0);
set_led_status(device->machine, 2,0);
state->power = 0;
}
diff --git a/src/mame/machine/vertigo.c b/src/mame/machine/vertigo.c
index ee23bd245f5..65bfb3e31fe 100644
--- a/src/mame/machine/vertigo.c
+++ b/src/mame/machine/vertigo.c
@@ -179,7 +179,7 @@ static TIMER_CALLBACK( sound_command_w )
quickly. Otherwise the main CPU gives up with sound. Boosting
the interleave for a while helps. */
- cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100));
+ cpuexec_boost_interleave(machine, attotime::zero, attotime::from_usec(100));
}
diff --git a/src/mame/machine/xevious.c b/src/mame/machine/xevious.c
index 946927891a4..5e9fdf03f67 100644
--- a/src/mame/machine/xevious.c
+++ b/src/mame/machine/xevious.c
@@ -102,7 +102,7 @@ WRITE8_HANDLER( battles_customio0_w )
timer->reset();
return; /* nop */
}
- timer->adjust(ATTOTIME_IN_USEC(166), 0, ATTOTIME_IN_USEC(166));
+ timer->adjust(attotime::from_usec(166), 0, attotime::from_usec(166));
}
diff --git a/src/mame/video/avgdvg.c b/src/mame/video/avgdvg.c
index 2d0dfc0340f..0391723770d 100644
--- a/src/mame/video/avgdvg.c
+++ b/src/mame/video/avgdvg.c
@@ -1260,7 +1260,7 @@ WRITE8_HANDLER( avgdvg_go_w )
vg_flush(space->machine);
vg_set_halt(0);
- timer_adjust_oneshot(vg_run_timer, attotime_zero, 0);
+ timer_adjust_oneshot(vg_run_timer, attotime::zero, 0);
}
WRITE16_HANDLER( avgdvg_go_word_w )
diff --git a/src/mame/video/dc.c b/src/mame/video/dc.c
index 5bc189e67ba..40e83416689 100644
--- a/src/mame/video/dc.c
+++ b/src/mame/video/dc.c
@@ -1092,7 +1092,7 @@ WRITE64_HANDLER( pvr_ta_w )
// this should really be done for each tile!
render_to_accumulation_buffer(space->machine,fake_accumulationbuffer_bitmap,&clip);
- timer_adjust_oneshot(endofrender_timer_isp, ATTOTIME_IN_USEC(4000) , 0); // hack, make sure render takes some amount of time
+ timer_adjust_oneshot(endofrender_timer_isp, attotime::from_usec(4000) , 0); // hack, make sure render takes some amount of time
/* copy the tiles to the framebuffer (really the rendering should be in this loop too) */
if (pvrta_regs[FPU_PARAM_CFG] & 0x200000)
@@ -1241,8 +1241,8 @@ WRITE64_HANDLER( pvr_ta_w )
case SPG_VBLANK_INT:
/* clear pending irqs and modify them with the updated ones */
- timer_adjust_oneshot(vbin_timer, attotime_never, 0);
- timer_adjust_oneshot(vbout_timer, attotime_never, 0);
+ timer_adjust_oneshot(vbin_timer, attotime::never, 0);
+ timer_adjust_oneshot(vbout_timer, attotime::never, 0);
timer_adjust_oneshot(vbin_timer, space->machine->primary_screen->time_until_pos(spg_vblank_in_irq_line_num), 0);
timer_adjust_oneshot(vbout_timer, space->machine->primary_screen->time_until_pos(spg_vblank_out_irq_line_num), 0);
@@ -1399,11 +1399,11 @@ static void process_ta_fifo(running_machine* machine)
/* FIXME: timing of these */
switch (state_ta.tafifo_listtype)
{
- case 0: timer_set(machine, ATTOTIME_IN_USEC(100), NULL, 0, transfer_opaque_list_irq); break;
- case 1: timer_set(machine, ATTOTIME_IN_USEC(100), NULL, 0, transfer_opaque_modifier_volume_list_irq); break;
- case 2: timer_set(machine, ATTOTIME_IN_USEC(100), NULL, 0, transfer_translucent_list_irq); break;
- case 3: timer_set(machine, ATTOTIME_IN_USEC(100), NULL, 0, transfer_translucent_modifier_volume_list_irq); break;
- case 4: timer_set(machine, ATTOTIME_IN_USEC(100), NULL, 0, transfer_punch_through_list_irq); break;
+ case 0: timer_set(machine, attotime::from_usec(100), NULL, 0, transfer_opaque_list_irq); break;
+ case 1: timer_set(machine, attotime::from_usec(100), NULL, 0, transfer_opaque_modifier_volume_list_irq); break;
+ case 2: timer_set(machine, attotime::from_usec(100), NULL, 0, transfer_translucent_list_irq); break;
+ case 3: timer_set(machine, attotime::from_usec(100), NULL, 0, transfer_translucent_modifier_volume_list_irq); break;
+ case 4: timer_set(machine, attotime::from_usec(100), NULL, 0, transfer_punch_through_list_irq); break;
}
state_ta.tafifo_listtype= -1; // no list being received
state_ta.listtype_used |= (2+8);
@@ -2498,7 +2498,7 @@ static TIMER_CALLBACK(endofrender_video)
{
dc_sysctrl_regs[SB_ISTNRM] |= IST_EOR_VIDEO;// VIDEO end of render
dc_update_interrupt_status(machine);
- timer_adjust_oneshot(endofrender_timer_video, attotime_never, 0);
+ timer_adjust_oneshot(endofrender_timer_video, attotime::never, 0);
}
static TIMER_CALLBACK(endofrender_tsp)
@@ -2506,8 +2506,8 @@ static TIMER_CALLBACK(endofrender_tsp)
dc_sysctrl_regs[SB_ISTNRM] |= IST_EOR_TSP; // TSP end of render
dc_update_interrupt_status(machine);
- timer_adjust_oneshot(endofrender_timer_tsp, attotime_never, 0);
- timer_adjust_oneshot(endofrender_timer_video, ATTOTIME_IN_USEC(500) , 0);
+ timer_adjust_oneshot(endofrender_timer_tsp, attotime::never, 0);
+ timer_adjust_oneshot(endofrender_timer_video, attotime::from_usec(500) , 0);
}
static TIMER_CALLBACK(endofrender_isp)
@@ -2515,8 +2515,8 @@ static TIMER_CALLBACK(endofrender_isp)
dc_sysctrl_regs[SB_ISTNRM] |= IST_EOR_ISP; // ISP end of render
dc_update_interrupt_status(machine);
- timer_adjust_oneshot(endofrender_timer_isp, attotime_never, 0);
- timer_adjust_oneshot(endofrender_timer_tsp, ATTOTIME_IN_USEC(500) , 0);
+ timer_adjust_oneshot(endofrender_timer_isp, attotime::never, 0);
+ timer_adjust_oneshot(endofrender_timer_tsp, attotime::from_usec(500) , 0);
}
@@ -2567,9 +2567,9 @@ VIDEO_START(dc)
endofrender_timer_tsp = timer_alloc(machine, endofrender_tsp, 0);
endofrender_timer_video = timer_alloc(machine, endofrender_video, 0);
- timer_adjust_oneshot(endofrender_timer_isp, attotime_never, 0);
- timer_adjust_oneshot(endofrender_timer_tsp, attotime_never, 0);
- timer_adjust_oneshot(endofrender_timer_video, attotime_never, 0);
+ timer_adjust_oneshot(endofrender_timer_isp, attotime::never, 0);
+ timer_adjust_oneshot(endofrender_timer_tsp, attotime::never, 0);
+ timer_adjust_oneshot(endofrender_timer_video, attotime::never, 0);
fake_accumulationbuffer_bitmap = auto_bitmap_alloc(machine,1024,1024,BITMAP_FORMAT_RGB32);
diff --git a/src/mame/video/dday.c b/src/mame/video/dday.c
index e4a119fcb20..f47af2e8ea4 100644
--- a/src/mame/video/dday.c
+++ b/src/mame/video/dday.c
@@ -39,7 +39,7 @@ static void start_countdown_timer(running_machine *machine)
state->timer_value = 0;
- timer_pulse(machine, ATTOTIME_IN_SEC(1), NULL, 0, countdown_timer_callback);
+ timer_pulse(machine, attotime::from_seconds(1), NULL, 0, countdown_timer_callback);
}
diff --git a/src/mame/video/galaxold.c b/src/mame/video/galaxold.c
index 1049292b2eb..1ac3c0e03d4 100644
--- a/src/mame/video/galaxold.c
+++ b/src/mame/video/galaxold.c
@@ -1740,7 +1740,7 @@ static void start_stars_blink_timer(double ra, double rb, double c)
int period_in_ms = 693 * (ra + 2.0 * rb) * c;
- timer_adjust_periodic(stars_blink_timer, ATTOTIME_IN_MSEC(period_in_ms), 0, ATTOTIME_IN_MSEC(period_in_ms));
+ timer_adjust_periodic(stars_blink_timer, attotime::from_msec(period_in_ms), 0, attotime::from_msec(period_in_ms));
}
diff --git a/src/mame/video/gameplan.c b/src/mame/video/gameplan.c
index 4072d0f2d85..db9c085cb75 100644
--- a/src/mame/video/gameplan.c
+++ b/src/mame/video/gameplan.c
@@ -223,7 +223,7 @@ static void via_irq(device_t *device, int state)
/* Kaos sits in a tight loop polling the VIA irq flags register, but that register is
cleared by the irq handler. Therefore, I wait a bit before triggering the irq to
leave time for the program to see the flag change. */
- timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, state, via_irq_delayed);
+ timer_set(device->machine, attotime::from_usec(50), NULL, state, via_irq_delayed);
}
diff --git a/src/mame/video/jaguar.c b/src/mame/video/jaguar.c
index 7f749ab28f6..0cd5e0a9265 100644
--- a/src/mame/video/jaguar.c
+++ b/src/mame/video/jaguar.c
@@ -628,7 +628,7 @@ WRITE32_HANDLER( jaguar_blitter_w )
if (offset == B_CMD)
{
blitter_status = 0;
- timer_set(space->machine, ATTOTIME_IN_USEC(100), NULL, 0, blitter_done);
+ timer_set(space->machine, attotime::from_usec(100), NULL, 0, blitter_done);
blitter_run(space->machine);
}
@@ -687,7 +687,7 @@ static TIMER_CALLBACK( jaguar_pit )
if (gpu_regs[PIT0])
{
- sample_period = ATTOTIME_IN_NSEC(((machine->device("gpu")->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+gpu_regs[PIT0])) / (1+gpu_regs[PIT1]));
+ sample_period = attotime::from_nsec(((machine->device("gpu")->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+gpu_regs[PIT0])) / (1+gpu_regs[PIT1]));
timer_set(machine, sample_period, NULL, 0, jaguar_pit);
}
}
@@ -712,7 +712,7 @@ WRITE16_HANDLER( jaguar_tom_regs_w )
case PIT1:
if (gpu_regs[PIT0] && gpu_regs[PIT0] != 0xffff) //FIXME: avoid too much small timers for now
{
- sample_period = ATTOTIME_IN_NSEC(((space->machine->device("gpu")->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+gpu_regs[PIT0])) / (1+gpu_regs[PIT1]));
+ sample_period = attotime::from_nsec(((space->machine->device("gpu")->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+gpu_regs[PIT0])) / (1+gpu_regs[PIT1]));
timer_set(space->machine, sample_period, NULL, 0, jaguar_pit);
}
break;
diff --git a/src/mame/video/midtunit.c b/src/mame/video/midtunit.c
index a408358d41f..01ea0fabfa9 100644
--- a/src/mame/video/midtunit.c
+++ b/src/mame/video/midtunit.c
@@ -787,7 +787,7 @@ if (LOG_DMA)
/* signal we're done */
skipdma:
- timer_set(space->machine, ATTOTIME_IN_NSEC(41 * pixels), NULL, 0, dma_callback);
+ timer_set(space->machine, attotime::from_nsec(41 * pixels), NULL, 0, dma_callback);
g_profiler.stop();
}
diff --git a/src/mame/video/midvunit.c b/src/mame/video/midvunit.c
index be5291eb81d..83334fbf4dd 100644
--- a/src/mame/video/midvunit.c
+++ b/src/mame/video/midvunit.c
@@ -61,7 +61,7 @@ static TIMER_CALLBACK( scanline_timer_cb )
{
cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
timer_adjust_oneshot(scanline_timer, machine->primary_screen->time_until_pos(scanline + 1), scanline);
- timer_set(machine, ATTOTIME_IN_HZ(25000000), NULL, -1, scanline_timer_cb);
+ timer_set(machine, attotime::from_hz(25000000), NULL, -1, scanline_timer_cb);
}
else
cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
diff --git a/src/mame/video/midyunit.c b/src/mame/video/midyunit.c
index bfaaf4fc3ba..0d5ae825a95 100644
--- a/src/mame/video/midyunit.c
+++ b/src/mame/video/midyunit.c
@@ -541,7 +541,7 @@ if (LOG_DMA)
}
/* signal we're done */
- timer_set(space->machine, ATTOTIME_IN_NSEC(41 * dma_state.width * dma_state.height), NULL, 0, dma_callback);
+ timer_set(space->machine, attotime::from_nsec(41 * dma_state.width * dma_state.height), NULL, 0, dma_callback);
g_profiler.stop();
}
diff --git a/src/mame/video/midzeus2.c b/src/mame/video/midzeus2.c
index 032d6c005c7..3fef8c3bc34 100644
--- a/src/mame/video/midzeus2.c
+++ b/src/mame/video/midzeus2.c
@@ -541,7 +541,7 @@ static void zeus_register_update(running_machine *machine, offs_t offset, UINT32
zeus_fifo_words = 0;
/* set the interrupt signal to indicate we can handle more */
- timer_adjust_oneshot(int_timer, ATTOTIME_IN_NSEC(500), 0);
+ timer_adjust_oneshot(int_timer, attotime::from_nsec(500), 0);
break;
case 0x20:
diff --git a/src/mame/video/n8080.c b/src/mame/video/n8080.c
index 39c682a94f9..6cbcebab982 100644
--- a/src/mame/video/n8080.c
+++ b/src/mame/video/n8080.c
@@ -51,7 +51,7 @@ void spacefev_start_red_cannon( running_machine *machine )
n8080_state *state = machine->driver_data<n8080_state>();
state->spacefev_red_cannon = 1;
- timer_adjust_oneshot(state->cannon_timer, ATTOTIME_IN_USEC(550 * 68 * 10), 0);
+ timer_adjust_oneshot(state->cannon_timer, attotime::from_usec(550 * 68 * 10), 0);
}
@@ -60,7 +60,7 @@ static TIMER_CALLBACK( spacefev_stop_red_cannon )
n8080_state *state = machine->driver_data<n8080_state>();
state->spacefev_red_cannon = 0;
- timer_adjust_oneshot(state->cannon_timer, attotime_never, 0);
+ timer_adjust_oneshot(state->cannon_timer, attotime::never, 0);
}
diff --git a/src/mame/video/nbmj9195.c b/src/mame/video/nbmj9195.c
index 90bf71a387e..b7c0403722b 100644
--- a/src/mame/video/nbmj9195.c
+++ b/src/mame/video/nbmj9195.c
@@ -387,7 +387,7 @@ static void nbmj9195_gfxdraw(running_machine *machine, int vram)
nb19010_busyflag = 0;
/* 1650ns per count */
- timer_set(machine, ATTOTIME_IN_NSEC(nb19010_busyctr * 1650), NULL, 0, blitter_timer_callback);
+ timer_set(machine, attotime::from_nsec(nb19010_busyctr * 1650), NULL, 0, blitter_timer_callback);
}
/******************************************************************************
diff --git a/src/mame/video/niyanpai.c b/src/mame/video/niyanpai.c
index 5deeb48cd85..014de98fd4a 100644
--- a/src/mame/video/niyanpai.c
+++ b/src/mame/video/niyanpai.c
@@ -347,7 +347,7 @@ static void niyanpai_gfxdraw(running_machine *machine, int vram)
}
nb19010_busyflag = 0;
- timer_set(machine, ATTOTIME_IN_NSEC(1650 * nb19010_busyctr), NULL, 0, blitter_timer_callback);
+ timer_set(machine, attotime::from_nsec(1650 * nb19010_busyctr), NULL, 0, blitter_timer_callback);
}
/******************************************************************************
diff --git a/src/mame/video/ppu2c0x.c b/src/mame/video/ppu2c0x.c
index b0dadcfa4f1..d9d9cca4f5a 100644
--- a/src/mame/video/ppu2c0x.c
+++ b/src/mame/video/ppu2c0x.c
@@ -341,7 +341,7 @@ static TIMER_CALLBACK( hblank_callback )
if (ppu2c0x->hblank_callback_proc)
(*ppu2c0x->hblank_callback_proc) (device, ppu2c0x->scanline, vblank, blanked);
- timer_adjust_oneshot(ppu2c0x->hblank_timer, attotime_never, 0);
+ timer_adjust_oneshot(ppu2c0x->hblank_timer, attotime::never, 0);
}
static TIMER_CALLBACK( nmi_callback )
@@ -354,7 +354,7 @@ static TIMER_CALLBACK( nmi_callback )
if (ppu2c0x->nmi_callback_proc != NULL)
(*ppu2c0x->nmi_callback_proc) (device, ppu_regs);
- timer_adjust_oneshot(ppu2c0x->nmi_timer, attotime_never, 0);
+ timer_adjust_oneshot(ppu2c0x->nmi_timer, attotime::never, 0);
}
static void draw_background( device_t *device, UINT8 *line_priority )
@@ -1308,7 +1308,7 @@ static DEVICE_START( ppu2c0x )
timer_adjust_oneshot(ppu2c0x->hblank_timer, device->machine->device<cpu_device>("maincpu")->cycles_to_attotime(86.67), 0); // ??? FIXME - hardcoding NTSC, need better calculation
ppu2c0x->nmi_timer = timer_alloc(device->machine, nmi_callback, (void *) device);
- timer_adjust_oneshot(ppu2c0x->nmi_timer, attotime_never, 0);
+ timer_adjust_oneshot(ppu2c0x->nmi_timer, attotime::never, 0);
ppu2c0x->nmi_callback_proc = intf->nmi_handler;
ppu2c0x->color_base = intf->color_base;
diff --git a/src/mame/video/segas32.c b/src/mame/video/segas32.c
index 5ea832bcce1..d80e7434d28 100644
--- a/src/mame/video/segas32.c
+++ b/src/mame/video/segas32.c
@@ -373,7 +373,7 @@ void system32_set_vblank(running_machine *machine, int state)
{
/* at the end of VBLANK is when automatic sprite rendering happens */
if (!state)
- timer_set(machine, ATTOTIME_IN_USEC(50), NULL, 1, update_sprites);
+ timer_set(machine, attotime::from_usec(50), NULL, 1, update_sprites);
}
diff --git a/src/mame/video/twin16.c b/src/mame/video/twin16.c
index 63c2e9f8863..26cfa7bc7e4 100644
--- a/src/mame/video/twin16.c
+++ b/src/mame/video/twin16.c
@@ -505,7 +505,7 @@ VIDEO_START( twin16 )
memset(twin16_sprite_buffer,0xff,0x800*sizeof(UINT16));
twin16_sprite_busy = 0;
twin16_sprite_timer = timer_alloc(machine, twin16_sprite_tick, NULL);
- timer_adjust_oneshot(twin16_sprite_timer, attotime_never, 0);
+ timer_adjust_oneshot(twin16_sprite_timer, attotime::never, 0);
/* register for savestates */
state_save_register_global_array(machine, twin16_sprite_buffer);
diff --git a/src/mame/video/victory.c b/src/mame/video/victory.c
index 5c2682efc1b..8ceb7fe936d 100644
--- a/src/mame/video/victory.c
+++ b/src/mame/video/victory.c
@@ -44,7 +44,7 @@ static struct
/* but the interrupt test does some precise timing, and fails */
/* if it's not 8 */
#define VICTORY_MICRO_STATE_CLOCK (XTAL_11_289MHz)
-#define MICRO_STATE_CLOCK_PERIOD ATTOTIME_IN_HZ(VICTORY_MICRO_STATE_CLOCK / 8)
+#define MICRO_STATE_CLOCK_PERIOD attotime::from_hz(VICTORY_MICRO_STATE_CLOCK / 8)
/* debugging constants */
@@ -530,13 +530,13 @@ INLINE void count_states(int states)
if (!micro.timer)
{
- timer_adjust_oneshot(micro.timer, attotime_never, 0);
+ timer_adjust_oneshot(micro.timer, attotime::never, 0);
micro.timer_active = 1;
micro.endtime = state_time;
}
else if (timer_timeelapsed(micro.timer) > micro.endtime)
{
- timer_adjust_oneshot(micro.timer, attotime_never, 0);
+ timer_adjust_oneshot(micro.timer, attotime::never, 0);
micro.timer_active = 1;
micro.endtime = state_time;
}