summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2007-12-17 16:37:57 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2007-12-17 16:37:57 +0000
commitc82a966b3b72d79ac3ce394980d6b5806e752160 (patch)
treef46dd63acdd83498db10a0563bb4e874df26d903
parent8a8ccc594989d85f2277c48d3c158f7cee41d06b (diff)
Changes for MAME 0.121u2.mame0121u2
-rw-r--r--.gitattributes19
-rw-r--r--makefile123
-rw-r--r--src/emu/attotime.c34
-rw-r--r--src/emu/attotime.h6
-rw-r--r--src/emu/audio/generic.c2
-rw-r--r--src/emu/audit.h56
-rw-r--r--src/emu/cheat.c2
-rw-r--r--src/emu/config.h13
-rw-r--r--src/emu/cpu/apexc/apexc.c2
-rw-r--r--src/emu/cpu/apexc/apexc.h2
-rw-r--r--src/emu/cpu/cp1610/cp1610.c2
-rw-r--r--src/emu/cpu/cp1610/cp1610.h2
-rw-r--r--src/emu/cpu/e132xs/e132xs.c4
-rw-r--r--src/emu/cpu/f8/f3853.c2
-rw-r--r--src/emu/cpu/h83002/h8periph.c10
-rw-r--r--src/emu/cpu/hd6309/hd6309.c2
-rw-r--r--src/emu/cpu/i8051/i8051.c2
-rw-r--r--src/emu/cpu/i8051/i8051.h4
-rw-r--r--src/emu/cpu/i8051/i8051ops.c4
-rw-r--r--src/emu/cpu/i8085/i8085.c2
-rw-r--r--src/emu/cpu/m37710/m37710.c16
-rw-r--r--src/emu/cpu/m6502/m6502.c4
-rw-r--r--src/emu/cpu/m6800/m6800.c14
-rw-r--r--src/emu/cpu/m6800/m6800.h2
-rw-r--r--src/emu/cpu/m68000/m68000.h17
-rw-r--r--src/emu/cpu/m68000/m68kmame.c16
-rw-r--r--src/emu/cpu/m68000/m68kmame.h10
-rw-r--r--src/emu/cpu/m6805/m6805.c2
-rw-r--r--src/emu/cpu/mips/dismips.c2
-rw-r--r--src/emu/cpu/mips/mips3com.c2
-rw-r--r--src/emu/cpu/powerpc/ppc.c8
-rw-r--r--src/emu/cpu/powerpc/ppc403.c2
-rw-r--r--src/emu/cpu/powerpc/ppcdrc.c4
-rw-r--r--src/emu/cpu/rsp/rsp.c119
-rw-r--r--src/emu/cpu/rsp/rsp.h10
-rw-r--r--src/emu/cpu/s2650/s2650.c2
-rw-r--r--src/emu/cpu/sc61860/sc61860.c2
-rw-r--r--src/emu/cpu/sh2/sh2.c6
-rw-r--r--src/emu/cpu/sh4/sh4.c18
-rw-r--r--src/emu/cpu/sm8500/sm8500.c2
-rw-r--r--src/emu/cpu/sm8500/sm8500.h2
-rw-r--r--src/emu/cpu/spc700/spc700.c2
-rw-r--r--src/emu/cpu/spc700/spc700.h2
-rw-r--r--src/emu/cpu/tlcs90/tlcs90.c8
-rw-r--r--src/emu/cpu/tms34010/tms34010.c12
-rw-r--r--src/emu/cpu/tms9900/99xxcore.h4
-rw-r--r--src/emu/cpu/v810/v810.c2
-rw-r--r--src/emu/cpu/v810/v810.h2
-rw-r--r--src/emu/cpu/z80gb/z80gb.c2
-rw-r--r--src/emu/cpu/z80gb/z80gb.h2
-rw-r--r--src/emu/cpuexec.c72
-rw-r--r--src/emu/cpuexec.h9
-rw-r--r--src/emu/cpuint.c4
-rw-r--r--src/emu/debug/debugcpu.c2
-rw-r--r--src/emu/driver.h23
-rw-r--r--src/emu/eigccppc.h123
-rw-r--r--src/emu/eigccx86.h125
-rw-r--r--src/emu/machine/6522via.c10
-rw-r--r--src/emu/machine/6526cia.c14
-rw-r--r--src/emu/machine/6532riot.c2
-rw-r--r--src/emu/machine/6840ptm.c6
-rw-r--r--src/emu/machine/6850acia.c4
-rw-r--r--src/emu/machine/74123.c12
-rw-r--r--src/emu/machine/8042kbdc.c2
-rw-r--r--src/emu/machine/8237dma.c6
-rw-r--r--src/emu/machine/am53cf96.c6
-rw-r--r--src/emu/machine/ds2401.c4
-rw-r--r--src/emu/machine/ds2404.c2
-rw-r--r--src/emu/machine/generic.c2
-rw-r--r--src/emu/machine/idectrl.c54
-rw-r--r--src/emu/machine/intelfsh.c12
-rw-r--r--src/emu/machine/mb3773.c2
-rw-r--r--src/emu/machine/mc146818.c2
-rw-r--r--src/emu/machine/pc16552d.c4
-rw-r--r--src/emu/machine/pic8259.c2
-rw-r--r--src/emu/machine/pit8253.c4
-rw-r--r--src/emu/machine/rtc65271.c6
-rw-r--r--src/emu/machine/timekpr.c10
-rw-r--r--src/emu/machine/tmp68301.c2
-rw-r--r--src/emu/machine/upd4701.c2
-rw-r--r--src/emu/machine/wd33c93.c8
-rw-r--r--src/emu/machine/x76f041.c2
-rw-r--r--src/emu/machine/x76f100.c2
-rw-r--r--src/emu/machine/z80ctc.c10
-rw-r--r--src/emu/machine/z80sio.c8
-rw-r--r--src/emu/mame.c6
-rw-r--r--src/emu/mame.h2
-rw-r--r--src/emu/memory.c6
-rw-r--r--src/emu/memory.h96
-rw-r--r--src/emu/render.h28
-rw-r--r--src/emu/romload.h24
-rw-r--r--src/emu/sound.c2
-rw-r--r--src/emu/sound/2203intf.c14
-rw-r--r--src/emu/sound/2608intf.c14
-rw-r--r--src/emu/sound/2610intf.c18
-rw-r--r--src/emu/sound/2612intf.c14
-rw-r--r--src/emu/sound/262intf.c14
-rw-r--r--src/emu/sound/3812intf.c42
-rw-r--r--src/emu/sound/es5503.c10
-rw-r--r--src/emu/sound/ics2115.c20
-rw-r--r--src/emu/sound/k053260.c2
-rw-r--r--src/emu/sound/k053260.h2
-rw-r--r--src/emu/sound/k054539.c6
-rw-r--r--src/emu/sound/msm5205.c12
-rw-r--r--src/emu/sound/pokey.c119
-rw-r--r--src/emu/sound/scsp.c24
-rw-r--r--src/emu/sound/sp0250.c6
-rw-r--r--src/emu/sound/upd7759.c12
-rw-r--r--src/emu/sound/ym2151.c50
-rw-r--r--src/emu/sound/ymf271.c16
-rw-r--r--src/emu/sound/ymf278b.c20
-rw-r--r--src/emu/sound/ymz280b.c40
-rw-r--r--src/emu/timer.c111
-rw-r--r--src/emu/timer.h52
-rw-r--r--src/emu/ui.c6
-rw-r--r--src/emu/uimenu.c4
-rw-r--r--src/emu/video.c22
-rw-r--r--src/emu/video.h2
-rw-r--r--src/emu/video/crtc6845.c10
-rw-r--r--src/emu/video/rgbvmx.h2
-rw-r--r--src/emu/video/tms34061.c2
-rw-r--r--src/emu/video/voodoo.c28
-rw-r--r--src/mame/audio/8080bw.c2
-rw-r--r--src/mame/audio/amiga.c4
-rw-r--r--src/mame/audio/cage.c12
-rw-r--r--src/mame/audio/cchasm.c2
-rw-r--r--src/mame/audio/cinemat.c2
-rw-r--r--src/mame/audio/dcs.c38
-rw-r--r--src/mame/audio/dkong.c5
-rw-r--r--src/mame/audio/exidy.c2
-rw-r--r--src/mame/audio/galaxian.c6
-rw-r--r--src/mame/audio/geebee.c2
-rw-r--r--src/mame/audio/gottlieb.c4
-rw-r--r--src/mame/audio/harddriv.c2
-rw-r--r--src/mame/audio/irem.c8
-rw-r--r--src/mame/audio/jaguar.c4
-rw-r--r--src/mame/audio/leland.c22
-rw-r--r--src/mame/audio/m72.c12
-rw-r--r--src/mame/audio/mcr.c14
-rw-r--r--src/mame/audio/n8080.c22
-rw-r--r--src/mame/audio/namco54.c4
-rw-r--r--src/mame/audio/segag80r.c2
-rw-r--r--src/mame/audio/segasnd.c6
-rw-r--r--src/mame/audio/senjyo.c2
-rw-r--r--src/mame/audio/snes.c6
-rw-r--r--src/mame/audio/starwars.c6
-rw-r--r--src/mame/audio/system16.c2
-rw-r--r--src/mame/audio/t5182.c10
-rw-r--r--src/mame/audio/taito_en.c4
-rw-r--r--src/mame/audio/tank8.c2
-rw-r--r--src/mame/audio/turbo.c2
-rw-r--r--src/mame/audio/vicdual.c2
-rw-r--r--src/mame/audio/warpwarp.c4
-rw-r--r--src/mame/audio/williams.c2
-rw-r--r--src/mame/drivers/40love.c2
-rw-r--r--src/mame/drivers/acefruit.c2
-rw-r--r--src/mame/drivers/aleck64.c2
-rw-r--r--src/mame/drivers/alg.c2
-rw-r--r--src/mame/drivers/aquarium.c3
-rw-r--r--src/mame/drivers/asterix.c2
-rw-r--r--src/mame/drivers/astrocde.c4
-rw-r--r--src/mame/drivers/astrof.c2
-rw-r--r--src/mame/drivers/asuka.c2
-rw-r--r--src/mame/drivers/atarisy1.c2
-rw-r--r--src/mame/drivers/atarisy2.c2
-rw-r--r--src/mame/drivers/atetris.c4
-rw-r--r--src/mame/drivers/beaminv.c2
-rw-r--r--src/mame/drivers/beathead.c4
-rw-r--r--src/mame/drivers/berzerk.c4
-rw-r--r--src/mame/drivers/bfcobra.c2
-rw-r--r--src/mame/drivers/bigevglf.c20
-rw-r--r--src/mame/drivers/bombjack.c2
-rw-r--r--src/mame/drivers/boxer.c6
-rw-r--r--src/mame/drivers/btoads.c4
-rw-r--r--src/mame/drivers/buggychl.c2
-rw-r--r--src/mame/drivers/capbowl.c4
-rw-r--r--src/mame/drivers/cave.c4
-rw-r--r--src/mame/drivers/cball.c4
-rw-r--r--src/mame/drivers/ccastles.c2
-rw-r--r--src/mame/drivers/cclimber.c2
-rw-r--r--src/mame/drivers/centiped.c186
-rw-r--r--src/mame/drivers/cidelsa.c4
-rw-r--r--src/mame/drivers/clayshoo.c4
-rw-r--r--src/mame/drivers/cliffhgr.c2
-rw-r--r--src/mame/drivers/cloud9.c2
-rw-r--r--src/mame/drivers/cninja.c2
-rw-r--r--src/mame/drivers/cojag.c4
-rw-r--r--src/mame/drivers/combatsc.c2
-rw-r--r--src/mame/drivers/coolpool.c8
-rw-r--r--src/mame/drivers/cps3.c8
-rw-r--r--src/mame/drivers/crgolf.c4
-rw-r--r--src/mame/drivers/crystal.c8
-rw-r--r--src/mame/drivers/deco32.c2
-rw-r--r--src/mame/drivers/deco_mlc.c2
-rw-r--r--src/mame/drivers/destroyr.c6
-rw-r--r--src/mame/drivers/dlair.c2
-rw-r--r--src/mame/drivers/dragrace.c2
-rw-r--r--src/mame/drivers/enigma2.c4
-rw-r--r--src/mame/drivers/eprom.c176
-rw-r--r--src/mame/drivers/ertictac.c2
-rw-r--r--src/mame/drivers/esh.c2
-rw-r--r--src/mame/drivers/espial.c2
-rw-r--r--src/mame/drivers/exidy440.c2
-rw-r--r--src/mame/drivers/exterm.c4
-rw-r--r--src/mame/drivers/f-32.c12
-rw-r--r--src/mame/drivers/fgoal.c4
-rw-r--r--src/mame/drivers/firebeat.c2
-rw-r--r--src/mame/drivers/firetrk.c6
-rw-r--r--src/mame/drivers/flstory.c2
-rw-r--r--src/mame/drivers/flyball.c6
-rw-r--r--src/mame/drivers/foodf.c2
-rw-r--r--src/mame/drivers/fromance.c4
-rw-r--r--src/mame/drivers/fuukifg2.c10
-rw-r--r--src/mame/drivers/fuukifg3.c10
-rw-r--r--src/mame/drivers/gaelco3d.c4
-rw-r--r--src/mame/drivers/galaga.c2
-rw-r--r--src/mame/drivers/gamecstl.c25
-rw-r--r--src/mame/drivers/gameplan.c6
-rw-r--r--src/mame/drivers/gcpinbal.c4
-rw-r--r--src/mame/drivers/genesis.c6
-rw-r--r--src/mame/drivers/gijoe.c2
-rw-r--r--src/mame/drivers/gpworld.c2
-rw-r--r--src/mame/drivers/grchamp.c2
-rw-r--r--src/mame/drivers/gridlee.c14
-rw-r--r--src/mame/drivers/groundfx.c2
-rw-r--r--src/mame/drivers/gunbustr.c4
-rw-r--r--src/mame/drivers/halleys.c2
-rw-r--r--src/mame/drivers/hng64.c2
-rw-r--r--src/mame/drivers/hyperspt.c2
-rw-r--r--src/mame/drivers/hyprduel.c4
-rw-r--r--src/mame/drivers/itech32.c4
-rw-r--r--src/mame/drivers/itech8.c8
-rw-r--r--src/mame/drivers/jedi.c4
-rw-r--r--src/mame/drivers/jpmimpct.c2
-rw-r--r--src/mame/drivers/kinst.c4
-rw-r--r--src/mame/drivers/konamigx.c6
-rw-r--r--src/mame/drivers/ksys573.c4
-rw-r--r--src/mame/drivers/ladyfrog.c2
-rw-r--r--src/mame/drivers/lgp.c2
-rw-r--r--src/mame/drivers/lkage.c2
-rw-r--r--src/mame/drivers/m107.c10
-rw-r--r--src/mame/drivers/m92.c12
-rw-r--r--src/mame/drivers/magmax.c2
-rw-r--r--src/mame/drivers/maxaflex.c2
-rw-r--r--src/mame/drivers/mazerbla.c10
-rw-r--r--src/mame/drivers/mcatadv.c2
-rw-r--r--src/mame/drivers/mcr.c2
-rw-r--r--src/mame/drivers/mediagx.c2
-rw-r--r--src/mame/drivers/megadriv.c48
-rw-r--r--src/mame/drivers/megatech.c23
-rw-r--r--src/mame/drivers/merit.c2
-rw-r--r--src/mame/drivers/metro.c8
-rw-r--r--src/mame/drivers/mgolf.c4
-rw-r--r--src/mame/drivers/micro3d.c8
-rw-r--r--src/mame/drivers/midvunit.c10
-rw-r--r--src/mame/drivers/midzeus.c8
-rw-r--r--src/mame/drivers/missile.c4
-rw-r--r--src/mame/drivers/mjsister.c4
-rw-r--r--src/mame/drivers/model2.c10
-rw-r--r--src/mame/drivers/moo.c4
-rw-r--r--src/mame/drivers/mpu4.c2
-rw-r--r--src/mame/drivers/msisaac.c2
-rw-r--r--src/mame/drivers/mustache.c2
-rw-r--r--src/mame/drivers/mw8080bw.c6
-rw-r--r--src/mame/drivers/namcofl.c10
-rw-r--r--src/mame/drivers/namconb1.c4
-rw-r--r--src/mame/drivers/namcos11.c2
-rw-r--r--src/mame/drivers/namcos22.c2
-rw-r--r--src/mame/drivers/naomi.c2
-rw-r--r--src/mame/drivers/neodrvr.c4
-rw-r--r--src/mame/drivers/neogeo.c6
-rw-r--r--src/mame/drivers/nitedrvr.c2
-rw-r--r--src/mame/drivers/nycaptor.c2
-rw-r--r--src/mame/drivers/othunder.c2
-rw-r--r--src/mame/drivers/panicr.c37
-rw-r--r--src/mame/drivers/parodius.c2
-rw-r--r--src/mame/drivers/peplus.c759
-rw-r--r--src/mame/drivers/pgm.c2
-rw-r--r--src/mame/drivers/phoenix.c93
-rw-r--r--src/mame/drivers/pipedrm.c4
-rw-r--r--src/mame/drivers/pipeline.c2
-rw-r--r--src/mame/drivers/pkscram.c2
-rw-r--r--src/mame/drivers/policetr.c4
-rw-r--r--src/mame/drivers/polyplay.c6
-rw-r--r--src/mame/drivers/psikyo.c10
-rw-r--r--src/mame/drivers/qdrmfgp.c2
-rw-r--r--src/mame/drivers/rabbit.c2
-rw-r--r--src/mame/drivers/rockola.c2
-rw-r--r--src/mame/drivers/rollerg.c2
-rw-r--r--src/mame/drivers/rpunch.c2
-rw-r--r--src/mame/drivers/runaway.c4
-rw-r--r--src/mame/drivers/sbasketb.c2
-rw-r--r--src/mame/drivers/sbrkout.c2
-rw-r--r--src/mame/drivers/scobra.c2
-rw-r--r--src/mame/drivers/scramble.c10
-rw-r--r--src/mame/drivers/seattle.c8
-rw-r--r--src/mame/drivers/segae.c24
-rw-r--r--src/mame/drivers/segahang.c82
-rw-r--r--src/mame/drivers/segaorun.c8
-rw-r--r--src/mame/drivers/segas16a.c4
-rw-r--r--src/mame/drivers/segas16b.c4
-rw-r--r--src/mame/drivers/segas18.c2
-rw-r--r--src/mame/drivers/segas24.c (renamed from src/mame/drivers/system24.c)1058
-rw-r--r--src/mame/drivers/segas32.c6
-rw-r--r--src/mame/drivers/segaxbd.c6
-rw-r--r--src/mame/drivers/segaybd.c4
-rw-r--r--src/mame/drivers/seta.c2
-rw-r--r--src/mame/drivers/simpsons.c4
-rw-r--r--src/mame/drivers/skullxbo.c2
-rw-r--r--src/mame/drivers/skykid.c115
-rw-r--r--src/mame/drivers/slapshot.c2
-rw-r--r--src/mame/drivers/snk.c4
-rw-r--r--src/mame/drivers/spacefb.c2
-rw-r--r--src/mame/drivers/sprint4.c4
-rw-r--r--src/mame/drivers/sprint8.c2
-rw-r--r--src/mame/drivers/ssfindo.c8
-rw-r--r--src/mame/drivers/sslam.c2
-rw-r--r--src/mame/drivers/ssv.c4
-rw-r--r--src/mame/drivers/st0016.c4
-rw-r--r--src/mame/drivers/starfire.c4
-rw-r--r--src/mame/drivers/stv.c4
-rw-r--r--src/mame/drivers/supbtime.c23
-rw-r--r--src/mame/drivers/superqix.c6
-rw-r--r--src/mame/drivers/suprnova.c6
-rw-r--r--src/mame/drivers/suprridr.c2
-rw-r--r--src/mame/drivers/system1.c233
-rw-r--r--src/mame/drivers/system16.c2
-rw-r--r--src/mame/drivers/system18.c2
-rw-r--r--src/mame/drivers/taito_b.c20
-rw-r--r--src/mame/drivers/taito_f2.c2
-rw-r--r--src/mame/drivers/taito_f3.c2
-rw-r--r--src/mame/drivers/taito_z.c10
-rw-r--r--src/mame/drivers/tankbust.c4
-rw-r--r--src/mame/drivers/tceptor.c48
-rw-r--r--src/mame/drivers/tecmosys.c4
-rw-r--r--src/mame/drivers/tehkanwc.c2
-rw-r--r--src/mame/drivers/tetrisp2.c8
-rw-r--r--src/mame/drivers/thunderj.c4
-rw-r--r--src/mame/drivers/thunderx.c2
-rw-r--r--src/mame/drivers/tmnt.c2
-rw-r--r--src/mame/drivers/toaplan2.c2
-rw-r--r--src/mame/drivers/topspeed.c4
-rw-r--r--src/mame/drivers/tourtabl.c4
-rw-r--r--src/mame/drivers/toypop.c2
-rw-r--r--src/mame/drivers/trackfld.c2
-rw-r--r--src/mame/drivers/trucocl.c2
-rw-r--r--src/mame/drivers/trvquest.c2
-rw-r--r--src/mame/drivers/tubep.c4
-rw-r--r--src/mame/drivers/tugboat.c4
-rw-r--r--src/mame/drivers/turbo.c2
-rw-r--r--src/mame/drivers/ultratnk.c4
-rw-r--r--src/mame/drivers/undrfire.c2
-rw-r--r--src/mame/drivers/unico.c2
-rw-r--r--src/mame/drivers/vaportra.c2
-rw-r--r--src/mame/drivers/vegas.c12
-rw-r--r--src/mame/drivers/vendetta.c2
-rw-r--r--src/mame/drivers/vicdual.c4
-rw-r--r--src/mame/drivers/victory.c2
-rw-r--r--src/mame/drivers/videopin.c4
-rw-r--r--src/mame/drivers/wgp.c4
-rw-r--r--src/mame/drivers/wheelfir.c6
-rw-r--r--src/mame/drivers/wink.c2
-rw-r--r--src/mame/drivers/witch.c2
-rw-r--r--src/mame/drivers/wolfpack.c4
-rw-r--r--src/mame/drivers/xexex.c2
-rw-r--r--src/mame/drivers/zaccaria.c2
-rw-r--r--src/mame/includes/centiped.h2
-rw-r--r--src/mame/includes/eprom.h3
-rw-r--r--src/mame/includes/n64.h4
-rw-r--r--src/mame/includes/segas24.h (renamed from src/mame/includes/system24.h)0
-rw-r--r--src/mame/layout/pe_bjack.lay267
-rw-r--r--src/mame/layout/pe_keno.lay195
-rw-r--r--src/mame/layout/pe_poker.lay219
-rw-r--r--src/mame/layout/pe_schip.lay31
-rw-r--r--src/mame/layout/pe_slots.lay180
-rw-r--r--src/mame/layout/peplus.lay130
-rw-r--r--src/mame/layout/pepp0158.lay119
-rw-r--r--src/mame/layout/pepp0188.lay119
-rw-r--r--src/mame/layout/peset038.lay119
-rw-r--r--src/mame/layout/tceptor2.lay21
-rw-r--r--src/mame/machine/amiga.c6
-rw-r--r--src/mame/machine/arkanoid.c2
-rw-r--r--src/mame/machine/asic65.c2
-rw-r--r--src/mame/machine/atarigen.c20
-rw-r--r--src/mame/machine/balsente.c18
-rw-r--r--src/mame/machine/bublbobl.c2
-rw-r--r--src/mame/machine/cubocd32.c6
-rw-r--r--src/mame/machine/dec0.c2
-rw-r--r--src/mame/machine/decocass.c4
-rw-r--r--src/mame/machine/equites.c2
-rw-r--r--src/mame/machine/galaxian.c2
-rw-r--r--src/mame/machine/harddriv.c12
-rw-r--r--src/mame/machine/irobot.c8
-rw-r--r--src/mame/machine/jackal.c4
-rw-r--r--src/mame/machine/konamiic.c2
-rw-r--r--src/mame/machine/leland.c4
-rw-r--r--src/mame/machine/lsasquad.c2
-rw-r--r--src/mame/machine/mcr.c12
-rw-r--r--src/mame/machine/mhavoc.c6
-rw-r--r--src/mame/machine/midwayic.c2
-rw-r--r--src/mame/machine/midwunit.c4
-rw-r--r--src/mame/machine/model1.c2
-rw-r--r--src/mame/machine/mw8080bw.c2
-rw-r--r--src/mame/machine/n64.c39
-rw-r--r--src/mame/machine/namco50.c10
-rw-r--r--src/mame/machine/namcoio.c4
-rw-r--r--src/mame/machine/namcos2.c6
-rw-r--r--src/mame/machine/nb1413m3.c4
-rw-r--r--src/mame/machine/nmk004.c4
-rw-r--r--src/mame/machine/opwolf.c6
-rw-r--r--src/mame/machine/pcshare.c2
-rw-r--r--src/mame/machine/pitnrun.c10
-rw-r--r--src/mame/machine/psx.c6
-rw-r--r--src/mame/machine/qix.c6
-rw-r--r--src/mame/machine/rainbow.c2
-rw-r--r--src/mame/machine/sbrkout.c2
-rw-r--r--src/mame/machine/segas24.c (renamed from src/mame/machine/system24.c)2
-rw-r--r--src/mame/machine/slikshot.c2
-rw-r--r--src/mame/machine/snes.c8
-rw-r--r--src/mame/machine/stfight.c2
-rw-r--r--src/mame/machine/stvcd.c2
-rw-r--r--src/mame/machine/tait8741.c4
-rw-r--r--src/mame/machine/taitosj.c6
-rw-r--r--src/mame/machine/ticket.c18
-rw-r--r--src/mame/machine/tnzs.c2
-rw-r--r--src/mame/machine/vertigo.c2
-rw-r--r--src/mame/machine/volfied.c6
-rw-r--r--src/mame/machine/williams.c20
-rw-r--r--src/mame/machine/xevious.c2
-rw-r--r--src/mame/mame.mak14
-rw-r--r--src/mame/mamedriv.c13
-rw-r--r--src/mame/video/astrocde.c8
-rw-r--r--src/mame/video/atari.c4
-rw-r--r--src/mame/video/atarimo.c2
-rw-r--r--src/mame/video/atarirle.c2
-rw-r--r--src/mame/video/atarisy1.c6
-rw-r--r--src/mame/video/atarisy2.c2
-rw-r--r--src/mame/video/avgdvg.c4
-rw-r--r--src/mame/video/blstroid.c4
-rw-r--r--src/mame/video/cchasm.c2
-rw-r--r--src/mame/video/centiped.c30
-rw-r--r--src/mame/video/changela.c2
-rw-r--r--src/mame/video/cps1.c14
-rw-r--r--src/mame/video/dcheese.c6
-rw-r--r--src/mame/video/dday.c2
-rw-r--r--src/mame/video/dkong.c4
-rw-r--r--src/mame/video/eprom.c127
-rw-r--r--src/mame/video/exctsccr.c2
-rw-r--r--src/mame/video/exidy.c4
-rw-r--r--src/mame/video/exidy440.c6
-rw-r--r--src/mame/video/fromance.c4
-rw-r--r--src/mame/video/galaxian.c4
-rw-r--r--src/mame/video/gticlub.c2
-rw-r--r--src/mame/video/hyhoo.c2
-rw-r--r--src/mame/video/itech32.c2
-rw-r--r--src/mame/video/itech8.c2
-rw-r--r--src/mame/video/jaguar.c2
-rw-r--r--src/mame/video/kaneko16.c4
-rw-r--r--src/mame/video/konamiic.c38
-rw-r--r--src/mame/video/leland.c6
-rw-r--r--src/mame/video/lethalj.c2
-rw-r--r--src/mame/video/m92.c2
-rw-r--r--src/mame/video/malzak.c3
-rw-r--r--src/mame/video/midtunit.c16
-rw-r--r--src/mame/video/midvunit.c2
-rw-r--r--src/mame/video/midyunit.c6
-rw-r--r--src/mame/video/midzeus.c1365
-rw-r--r--src/mame/video/n8080.c2
-rw-r--r--src/mame/video/nbmj8688.c4
-rw-r--r--src/mame/video/nbmj8891.c2
-rw-r--r--src/mame/video/nbmj8991.c2
-rw-r--r--src/mame/video/nbmj9195.c2
-rw-r--r--src/mame/video/neogeo.c4
-rw-r--r--src/mame/video/niyanpai.c2
-rw-r--r--src/mame/video/nycaptor.c2
-rw-r--r--src/mame/video/pastelg.c2
-rw-r--r--src/mame/video/ppu2c0x.c6
-rw-r--r--src/mame/video/qix.c2
-rw-r--r--src/mame/video/rpunch.c2
-rw-r--r--src/mame/video/segag80r.c2
-rw-r--r--src/mame/video/segaic16.c4
-rw-r--r--src/mame/video/segas24.c (renamed from src/mame/video/system24.c)2
-rw-r--r--src/mame/video/segas32.c2
-rw-r--r--src/mame/video/slapshot.c2
-rw-r--r--src/mame/video/sprint8.c2
-rw-r--r--src/mame/video/starcrus.c8
-rw-r--r--src/mame/video/taito_f2.c4
-rw-r--r--src/mame/video/tank8.c2
-rw-r--r--src/mame/video/tceptor.c38
-rw-r--r--src/mame/video/tickee.c10
-rw-r--r--src/mame/video/triplhnt.c2
-rw-r--r--src/mame/video/tubep.c2
-rw-r--r--src/mame/video/vball.c4
-rw-r--r--src/mame/video/victory.c6
-rw-r--r--src/osd/windows/mamex64.man10
-rw-r--r--src/osd/windows/mamex64.rc14
-rw-r--r--src/osd/windows/vconv.c1
-rw-r--r--src/osd/windows/winalloc.c29
-rw-r--r--src/osd/windows/windows.mak9
-rw-r--r--src/osd/windows/winprefix.h3
-rw-r--r--src/osd/windows/winsync.c1
-rw-r--r--src/version.c2
502 files changed, 5938 insertions, 3626 deletions
diff --git a/.gitattributes b/.gitattributes
index db3dd15a020..1be719539ee 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1829,6 +1829,7 @@ src/mame/drivers/segaorun.c svneol=native#text/plain
src/mame/drivers/segas16a.c svneol=native#text/plain
src/mame/drivers/segas16b.c svneol=native#text/plain
src/mame/drivers/segas18.c svneol=native#text/plain
+src/mame/drivers/segas24.c svneol=native#text/plain
src/mame/drivers/segas32.c svneol=native#text/plain
src/mame/drivers/segaxbd.c svneol=native#text/plain
src/mame/drivers/segaybd.c svneol=native#text/plain
@@ -1936,7 +1937,6 @@ src/mame/drivers/surpratk.c svneol=native#text/plain
src/mame/drivers/system1.c svneol=native#text/plain
src/mame/drivers/system16.c svneol=native#text/plain
src/mame/drivers/system18.c svneol=native#text/plain
-src/mame/drivers/system24.c svneol=native#text/plain
src/mame/drivers/tagteam.c svneol=native#text/plain
src/mame/drivers/tail2nos.c svneol=native#text/plain
src/mame/drivers/taito_b.c svneol=native#text/plain
@@ -2245,6 +2245,7 @@ src/mame/includes/rescap.h svneol=native#text/plain
src/mame/includes/sbrkout.h svneol=native#text/plain
src/mame/includes/segag80r.h svneol=native#text/plain
src/mame/includes/segag80v.h svneol=native#text/plain
+src/mame/includes/segas24.h svneol=native#text/plain
src/mame/includes/segas32.h svneol=native#text/plain
src/mame/includes/seta.h svneol=native#text/plain
src/mame/includes/shuuz.h svneol=native#text/plain
@@ -2264,7 +2265,6 @@ src/mame/includes/starwars.h svneol=native#text/plain
src/mame/includes/subs.h svneol=native#text/plain
src/mame/includes/suprridr.h svneol=native#text/plain
src/mame/includes/system16.h svneol=native#text/plain
-src/mame/includes/system24.h svneol=native#text/plain
src/mame/includes/taito_f2.h svneol=native#text/plain
src/mame/includes/taito_f3.h svneol=native#text/plain
src/mame/includes/taitoipt.h svneol=native#text/plain
@@ -2323,10 +2323,12 @@ src/mame/layout/maxaflex.lay svneol=native#text/plain
src/mame/layout/mpu4.lay svneol=native#text/plain
src/mame/layout/nbmj8688.lay svneol=native#text/plain
src/mame/layout/paradice.lay svneol=native#text/plain
+src/mame/layout/pe_bjack.lay svneol=native#text/plain
+src/mame/layout/pe_keno.lay svneol=native#text/plain
+src/mame/layout/pe_poker.lay svneol=native#text/plain
+src/mame/layout/pe_schip.lay svneol=native#text/plain
+src/mame/layout/pe_slots.lay svneol=native#text/plain
src/mame/layout/peplus.lay svneol=native#text/plain
-src/mame/layout/pepp0158.lay svneol=native#text/plain
-src/mame/layout/pepp0188.lay svneol=native#text/plain
-src/mame/layout/peset038.lay svneol=native#text/plain
src/mame/layout/pmpoker.lay svneol=native#text/plain
src/mame/layout/pokio.lay svneol=native#text/plain
src/mame/layout/pottnpkr.lay svneol=native#text/plain
@@ -2344,6 +2346,7 @@ src/mame/layout/sos.lay svneol=native#text/plain
src/mame/layout/sspeedr.lay svneol=native#text/plain
src/mame/layout/starcas.lay svneol=native#text/plain
src/mame/layout/subroc3d.lay svneol=native#text/plain
+src/mame/layout/tceptor2.lay svneol=native#text/plain
src/mame/layout/tenpindx.lay svneol=native#text/plain
src/mame/layout/tinv2650.lay svneol=native#text/plain
src/mame/layout/turbo.lay svneol=native#text/plain
@@ -2487,6 +2490,7 @@ src/mame/machine/segacrpt.h svneol=native#text/plain
src/mame/machine/segag80.c svneol=native#text/plain
src/mame/machine/segaic16.c svneol=native#text/plain
src/mame/machine/segaic16.h svneol=native#text/plain
+src/mame/machine/segas24.c svneol=native#text/plain
src/mame/machine/segas32.c svneol=native#text/plain
src/mame/machine/seibuspi.c svneol=native#text/plain
src/mame/machine/simpsons.c svneol=native#text/plain
@@ -2508,7 +2512,6 @@ src/mame/machine/stvprot.c svneol=native#text/plain
src/mame/machine/stvprot.h svneol=native#text/plain
src/mame/machine/subs.c svneol=native#text/plain
src/mame/machine/system16.c svneol=native#text/plain
-src/mame/machine/system24.c svneol=native#text/plain
src/mame/machine/tait8741.c svneol=native#text/plain
src/mame/machine/tait8741.h svneol=native#text/plain
src/mame/machine/taitosj.c svneol=native#text/plain
@@ -3035,6 +3038,7 @@ src/mame/video/segaorun.c svneol=native#text/plain
src/mame/video/segas16a.c svneol=native#text/plain
src/mame/video/segas16b.c svneol=native#text/plain
src/mame/video/segas18.c svneol=native#text/plain
+src/mame/video/segas24.c svneol=native#text/plain
src/mame/video/segas32.c svneol=native#text/plain
src/mame/video/segasyse.c svneol=native#text/plain
src/mame/video/segaxbd.c svneol=native#text/plain
@@ -3118,7 +3122,6 @@ src/mame/video/sys16spr.c svneol=native#text/plain
src/mame/video/system1.c svneol=native#text/plain
src/mame/video/system1.h svneol=native#text/plain
src/mame/video/system16.c svneol=native#text/plain
-src/mame/video/system24.c svneol=native#text/plain
src/mame/video/tagteam.c svneol=native#text/plain
src/mame/video/tail2nos.c svneol=native#text/plain
src/mame/video/taito_b.c svneol=native#text/plain
@@ -3266,8 +3269,6 @@ src/osd/windows/ledutil.c svneol=native#text/plain
src/osd/windows/main.c svneol=native#text/plain
src/osd/windows/mame.man svneol=CRLF#text/plain eol=crlf
src/osd/windows/mame.rc svneol=CRLF#text/plain eol=crlf
-src/osd/windows/mamex64.man svneol=CRLF#text/plain eol=crlf
-src/osd/windows/mamex64.rc svneol=CRLF#text/plain eol=crlf
src/osd/windows/multidef.h svneol=native#text/plain
src/osd/windows/osd_cpu.h svneol=native#text/plain
src/osd/windows/osinline.h svneol=native#text/plain
diff --git a/makefile b/makefile
index 4316a43b588..96f25af4107 100644
--- a/makefile
+++ b/makefile
@@ -62,6 +62,33 @@ endif
#-------------------------------------------------
+# configure name of final executable
+#-------------------------------------------------
+
+# uncomment and specify prefix to be added to the name
+# PREFIX =
+
+# uncomment and specify suffix to be added to the name
+# SUFFIX =
+
+
+
+#-------------------------------------------------
+# specify architecture-specific optimizations
+#-------------------------------------------------
+
+# uncomment and specify architecture-specific optimizations here
+# some examples:
+# optimize for I686: ARCHOPTS = -march=pentiumpro
+# optimize for Core 2: ARCHOPTS = -march=pentium-m -msse3
+# optimize for G4: ARCHOPTS = -mcpu=G4
+# note that we leave this commented by default so that you can
+# configure this in your environment and never have to think about it
+# ARCHOPTS =
+
+
+
+#-------------------------------------------------
# specify program options; see each option below
# for details
#-------------------------------------------------
@@ -88,21 +115,12 @@ X86_PPC_DRC = 1
# for details
#-------------------------------------------------
-# uncomment one of the next lines to build a target-optimized build
-# NATIVE = 1
-# ATHLON = 1
-# AMD64 = 1
-# I686 = 1
-# P4 = 1
-# PM = 1
-# CORE2 = 1
-# G4 = 1
-# G5 = 1
-# CELL = 1
-
# uncomment next line if you are building for a 64-bit target
# PTR64 = 1
+# uncomment next line if you are building for a big-endian target
+# BIGENDIAN = 1
+
# uncomment next line to build expat as part of MAME build
BUILD_EXPAT = 1
@@ -179,78 +197,12 @@ RM = @rm -f
#-------------------------------------------------
-# based on the architecture, determine suffixes
-# and endianness
-#-------------------------------------------------
-
-# by default, don't compile for a specific target CPU
-# and assume little-endian (x86)
-ARCH =
-ENDIAN = little
-
-# architecture-specific builds get extra options
-ifdef NATIVE
-SUFFIX = nat
-ARCH = -march=native
-endif
-
-ifdef ATHLON
-SUFFIX = at
-ARCH = -march=athlon
-endif
-
-ifdef AMD64
-SUFFIX = 64
-ARCH = -march=athlon64
-endif
-
-ifdef I686
-SUFFIX = pp
-ARCH = -march=pentiumpro
-endif
-
-ifdef P4
-SUFFIX = p4
-ARCH = -march=pentium4
-endif
-
-ifdef PM
-SUFFIX = pm
-ARCH = -march=pentium-m
-endif
-
-ifdef CORE2
-SUFFIX = c2
-ARCH = -march=pentium-m -msse3
-endif
-
-ifdef G4
-SUFFIX = g4
-ARCH = -mcpu=G4
-ENDIAN = big
-endif
-
-ifdef G5
-SUFFIX = g5
-ARCH = -mcpu=G5
-ENDIAN = big
-endif
-
-ifdef CELL
-SUFFIX = cbe
-ARCH =
-ENDIAN = big
-endif
-
-
-
-#-------------------------------------------------
# form the name of the executable
#-------------------------------------------------
# debug builds just get the 'd' suffix and nothing more
ifdef DEBUG
-SUFFIX = d
+DEBUGSUFFIX = d
endif
# the name is just 'target' if no subtarget; otherwise it is
@@ -261,8 +213,8 @@ else
NAME = $(TARGET)$(SUBTARGET)
endif
-# fullname is prefix+name+suffix
-FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)
+# fullname is prefix+name+suffix+debugsuffix
+FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)$(DEBUGSUFFIX)
# add an EXE suffix to get the final emulator name
EMULATOR = $(FULLNAME)$(EXE)
@@ -299,7 +251,7 @@ endif
DEFS += -DINLINE="static __inline__"
# define LSB_FIRST if we are a little-endian target
-ifeq ($(ENDIAN),little)
+ifndef BIGENDIAN
DEFS += -DLSB_FIRST
endif
@@ -334,6 +286,9 @@ endif
# we compile to C89 standard with GNU extensions
CFLAGS = -std=gnu89
+# this speeds it up a bit by piping between the preprocessor/compiler/assembler
+CFLAGS += -pipe
+
# add -g if we need symbols
ifdef SYMBOLS
CFLAGS += -g
@@ -366,8 +321,8 @@ CFLAGS += -O$(OPTIMIZE)
# if we are optimizing, include optimization options
# and make all errors into warnings
ifneq ($(OPTIMIZE),0)
-CFLAGS += -Werror $(ARCH) -fno-strict-aliasing
-#CFLAGS += $(ARCH) -fno-strict-aliasing
+CFLAGS += -Werror $(ARCHOPTS) -fno-strict-aliasing
+#CFLAGS += $(ARCHOPTS) -fno-strict-aliasing
endif
# if symbols are on, make sure we have frame pointers
diff --git a/src/emu/attotime.c b/src/emu/attotime.c
index bb24ce57340..87b6961adbd 100644
--- a/src/emu/attotime.c
+++ b/src/emu/attotime.c
@@ -274,6 +274,40 @@ int attotime_compare(attotime _time1, attotime _time2)
}
+/*-------------------------------------------------
+ attotime_min - return the minimum of two
+ attotimes
+-------------------------------------------------*/
+
+attotime attotime_min(attotime _time1, attotime _time2)
+{
+ if (_time1.seconds > _time2.seconds)
+ return _time2;
+ if (_time1.seconds < _time2.seconds)
+ return _time1;
+ if (_time1.attoseconds > _time2.attoseconds)
+ return _time2;
+ return _time1;
+}
+
+
+/*-------------------------------------------------
+ attotime_max - return the maximum of two
+ attotimes
+-------------------------------------------------*/
+
+attotime attotime_max(attotime _time1, attotime _time2)
+{
+ if (_time1.seconds > _time2.seconds)
+ return _time1;
+ if (_time1.seconds < _time2.seconds)
+ return _time2;
+ if (_time1.attoseconds > _time2.attoseconds)
+ return _time1;
+ return _time2;
+}
+
+
/***************************************************************************
MISC UTILITIES
diff --git a/src/emu/attotime.h b/src/emu/attotime.h
index 8d7395b9d42..c4388eb01ca 100644
--- a/src/emu/attotime.h
+++ b/src/emu/attotime.h
@@ -153,6 +153,12 @@ attotime attotime_div(attotime _time1, UINT32 factor);
/* compare two attotimes */
int attotime_compare(attotime _time1, attotime _time2);
+/* return the minimum of two attotimes */
+attotime attotime_min(attotime _time1, attotime _time2);
+
+/* return the maximum of two attotimes */
+attotime attotime_max(attotime _time1, attotime _time2);
+
/* ----- misc utilities ----- */
diff --git a/src/emu/audio/generic.c b/src/emu/audio/generic.c
index 18c17e70e2c..4edd9d4f5c0 100644
--- a/src/emu/audio/generic.c
+++ b/src/emu/audio/generic.c
@@ -85,7 +85,7 @@ static TIMER_CALLBACK( latch_callback )
INLINE void latch_w(int which, UINT16 value)
{
- timer_call_after_resynch(which | (value << 8), latch_callback);
+ timer_call_after_resynch(NULL, which | (value << 8), latch_callback);
}
diff --git a/src/emu/audit.h b/src/emu/audit.h
index b17ddecca68..88557dbf5b1 100644
--- a/src/emu/audit.h
+++ b/src/emu/audit.h
@@ -28,34 +28,46 @@
#define AUDIT_VALIDATE_FULL (HASH_CRC | HASH_SHA)
/* return values from audit_verify_roms and audit_verify_samples */
-#define CORRECT 0
-#define BEST_AVAILABLE 1
-#define INCORRECT 2
-#define NOTFOUND 3
+enum
+{
+ CORRECT = 0,
+ BEST_AVAILABLE,
+ INCORRECT,
+ NOTFOUND
+};
/* image types for audit_record.type */
-#define AUDIT_FILE_ROM 0
-#define AUDIT_FILE_DISK 1
-#define AUDIT_FILE_SAMPLE 2
+enum
+{
+ AUDIT_FILE_ROM = 0,
+ AUDIT_FILE_DISK,
+ AUDIT_FILE_SAMPLE
+};
/* status values for audit_record.status */
-#define AUDIT_STATUS_GOOD 0
-#define AUDIT_STATUS_FOUND_INVALID 1
-#define AUDIT_STATUS_NOT_FOUND 2
-#define AUDIT_STATUS_ERROR 3
+enum
+{
+ AUDIT_STATUS_GOOD = 0,
+ AUDIT_STATUS_FOUND_INVALID,
+ AUDIT_STATUS_NOT_FOUND,
+ AUDIT_STATUS_ERROR
+};
/* substatus values for audit_record.substatus */
-#define SUBSTATUS_GOOD 0
-#define SUBSTATUS_GOOD_NEEDS_REDUMP 1
-#define SUBSTATUS_FOUND_NODUMP 2
-#define SUBSTATUS_FOUND_BAD_CHECKSUM 3
-#define SUBSTATUS_FOUND_WRONG_LENGTH 4
-#define SUBSTATUS_NOT_FOUND 5
-#define SUBSTATUS_NOT_FOUND_NODUMP 6
-#define SUBSTATUS_NOT_FOUND_OPTIONAL 7
-#define SUBSTATUS_NOT_FOUND_PARENT 8
-#define SUBSTATUS_NOT_FOUND_BIOS 9
-#define SUBSTATUS_ERROR 100
+enum
+{
+ SUBSTATUS_GOOD = 0,
+ SUBSTATUS_GOOD_NEEDS_REDUMP,
+ SUBSTATUS_FOUND_NODUMP,
+ SUBSTATUS_FOUND_BAD_CHECKSUM,
+ SUBSTATUS_FOUND_WRONG_LENGTH,
+ SUBSTATUS_NOT_FOUND,
+ SUBSTATUS_NOT_FOUND_NODUMP,
+ SUBSTATUS_NOT_FOUND_OPTIONAL,
+ SUBSTATUS_NOT_FOUND_PARENT,
+ SUBSTATUS_NOT_FOUND_BIOS,
+ SUBSTATUS_ERROR = 100
+};
diff --git a/src/emu/cheat.c b/src/emu/cheat.c
index 9a423bbf480..599f4d2d250 100644
--- a/src/emu/cheat.c
+++ b/src/emu/cheat.c
@@ -1500,7 +1500,7 @@ void cheat_init(running_machine *machine)
/* ----- initialize string table ----- */
InitStringTable();
- periodic_timer = timer_alloc(cheat_periodic);
+ periodic_timer = timer_alloc(cheat_periodic, NULL);
timer_adjust(periodic_timer, attotime_make(0, Machine->screen[0].refresh), 0, attotime_make(0, Machine->screen[0].refresh));
add_exit_callback(machine, cheat_exit);
diff --git a/src/emu/config.h b/src/emu/config.h
index 31411684419..6460e4ae9eb 100644
--- a/src/emu/config.h
+++ b/src/emu/config.h
@@ -26,11 +26,14 @@
*
*************************************/
-#define CONFIG_TYPE_INIT 0 /* opportunity to initialize things first */
-#define CONFIG_TYPE_CONTROLLER 1 /* loading from controller file */
-#define CONFIG_TYPE_DEFAULT 2 /* loading from default.cfg */
-#define CONFIG_TYPE_GAME 3 /* loading from game.cfg */
-#define CONFIG_TYPE_FINAL 4 /* opportunity to finish initialization */
+enum
+{
+ CONFIG_TYPE_INIT = 0, /* opportunity to initialize things first */
+ CONFIG_TYPE_CONTROLLER, /* loading from controller file */
+ CONFIG_TYPE_DEFAULT, /* loading from default.cfg */
+ CONFIG_TYPE_GAME, /* loading from game.cfg */
+ CONFIG_TYPE_FINAL /* opportunity to finish initialization */
+};
diff --git a/src/emu/cpu/apexc/apexc.c b/src/emu/cpu/apexc/apexc.c
index ba683a7c2f1..4808cae2299 100644
--- a/src/emu/cpu/apexc/apexc.c
+++ b/src/emu/cpu/apexc/apexc.c
@@ -343,7 +343,7 @@ typedef struct
static apexc_regs apexc;
-int apexc_ICount;
+static int apexc_ICount;
/* decrement ICount by n */
#define DELAY(n) {apexc_ICount -= (n); apexc.current_word = (apexc.current_word + (n)) & 0x1f;}
diff --git a/src/emu/cpu/apexc/apexc.h b/src/emu/cpu/apexc/apexc.h
index 47bee1f9653..165452b6c6b 100644
--- a/src/emu/cpu/apexc/apexc.h
+++ b/src/emu/cpu/apexc/apexc.h
@@ -13,8 +13,6 @@ enum
from the contents of ML and WS */
};
-extern int apexc_ICount;
-
void apexc_get_info(UINT32 state, cpuinfo *info);
#ifndef SUPPORT_ODD_WORD_SIZES
diff --git a/src/emu/cpu/cp1610/cp1610.c b/src/emu/cpu/cp1610/cp1610.c
index 3463bd7fa9f..b0ed91017f6 100644
--- a/src/emu/cpu/cp1610/cp1610.c
+++ b/src/emu/cpu/cp1610/cp1610.c
@@ -46,7 +46,7 @@ typedef struct {
int mask_interrupts;
} cp1610_Regs;
-int cp1610_icount;
+static int cp1610_icount;
static cp1610_Regs cp1610;
diff --git a/src/emu/cpu/cp1610/cp1610.h b/src/emu/cpu/cp1610/cp1610.h
index e7304dc51c8..69ccab89f2d 100644
--- a/src/emu/cpu/cp1610/cp1610.h
+++ b/src/emu/cpu/cp1610/cp1610.h
@@ -32,8 +32,6 @@ enum {
#define CP1610_RESET 2 /* Non-Maskable */
#define CP1610_INT_INTR INPUT_LINE_NMI /* Non-Maskable */
-extern int cp1610_icount; /* cycle count */
-
void cp1610_get_info(UINT32 state, cpuinfo *info);
diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c
index 3942942e6e6..1d4f807d291 100644
--- a/src/emu/cpu/e132xs/e132xs.c
+++ b/src/emu/cpu/e132xs/e132xs.c
@@ -662,7 +662,7 @@ static void adjust_timer_interrupt(void)
timer_adjust(hyperstone.timer, attotime_never, 0, attotime_never);
}
-static TIMER_CALLBACK( timer_callback )
+static TIMER_CALLBACK( e132xs_timer_callback )
{
int update = param & 1;
int cpunum = param >> 1;
@@ -1576,7 +1576,7 @@ static void hyperstone_init(int index, int clock, const void *config, int (*irqc
state_save_register_item("E132XS", index, hyperstone.tr_clocks_per_tick);
hyperstone.irq_callback = irqcallback;
- hyperstone.timer = timer_alloc(timer_callback);
+ hyperstone.timer = timer_alloc(e132xs_timer_callback, NULL);
hyperstone.clock_scale_mask = scale_mask;
}
diff --git a/src/emu/cpu/f8/f3853.c b/src/emu/cpu/f8/f3853.c
index 4aa0d9dc908..a51040446cf 100644
--- a/src/emu/cpu/f8/f3853.c
+++ b/src/emu/cpu/f8/f3853.c
@@ -90,7 +90,7 @@ void f3853_init(F3853_CONFIG *config)
f3853.priority_line=FALSE;
f3853.external_interrupt_line=TRUE;
- f3853.timer = timer_alloc(f3853_timer_callback);
+ f3853.timer = timer_alloc(f3853_timer_callback, NULL);
}
void f3853_reset(void)
diff --git a/src/emu/cpu/h83002/h8periph.c b/src/emu/cpu/h83002/h8periph.c
index 603434a0ba0..fffd009c273 100644
--- a/src/emu/cpu/h83002/h8periph.c
+++ b/src/emu/cpu/h83002/h8periph.c
@@ -486,11 +486,11 @@ void h8_register_write8(UINT32 address, UINT8 val)
void h8_itu_init(void)
{
- h8.timer[0] = timer_alloc(h8itu_timer_0_cb);
- h8.timer[1] = timer_alloc(h8itu_timer_1_cb);
- h8.timer[2] = timer_alloc(h8itu_timer_2_cb);
- h8.timer[3] = timer_alloc(h8itu_timer_3_cb);
- h8.timer[4] = timer_alloc(h8itu_timer_4_cb);
+ h8.timer[0] = timer_alloc(h8itu_timer_0_cb, NULL);
+ h8.timer[1] = timer_alloc(h8itu_timer_1_cb, NULL);
+ h8.timer[2] = timer_alloc(h8itu_timer_2_cb, NULL);
+ h8.timer[3] = timer_alloc(h8itu_timer_3_cb, NULL);
+ h8.timer[4] = timer_alloc(h8itu_timer_4_cb, NULL);
h8_itu_reset();
diff --git a/src/emu/cpu/hd6309/hd6309.c b/src/emu/cpu/hd6309/hd6309.c
index c6c98a95f15..a9105ff3de9 100644
--- a/src/emu/cpu/hd6309/hd6309.c
+++ b/src/emu/cpu/hd6309/hd6309.c
@@ -171,7 +171,7 @@ typedef struct
/* 6309 registers */
static hd6309_Regs hd6309;
-int hd6309_slapstic = 0;
+//static int hd6309_slapstic = 0;
#define pPPC hd6309.ppc
#define pPC hd6309.pc
diff --git a/src/emu/cpu/i8051/i8051.c b/src/emu/cpu/i8051/i8051.c
index 3231cb69ffc..158da7f2b70 100644
--- a/src/emu/cpu/i8051/i8051.c
+++ b/src/emu/cpu/i8051/i8051.c
@@ -173,7 +173,7 @@ typedef struct {
} I8051;
-int i8051_icount;
+static int i8051_icount;
static I8051 i8051;
static I8051_UART uart;
diff --git a/src/emu/cpu/i8051/i8051.h b/src/emu/cpu/i8051/i8051.h
index 6b5178d3400..49ddce4e42c 100644
--- a/src/emu/cpu/i8051/i8051.h
+++ b/src/emu/cpu/i8051/i8051.h
@@ -93,8 +93,6 @@ enum {
#define TI_FLAG 1
#define RI_FLAG 2
-extern int i8051_icount; /* cycle count */
-
extern void i8051_init (int index, int clock, const void *config, int (*irqcallback)(int)); /* Initialize save states */
extern void i8051_reset (void); /* Reset registers to the initial values */
extern void i8051_exit (void); /* Shut down CPU core */
@@ -125,8 +123,6 @@ extern offs_t i8051_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT
* 8752 Section
****************************************************************************/
#if (HAS_I8752)
-#define i8752_icount i8051_icount
-
extern void i8752_init (int index, int clock, const void *config, int (*irqcallback)(int)); /* Initialize save states */
extern void i8752_reset (void); /* Reset registers to the initial values */
extern void i8752_exit (void); /* Shut down CPU core */
diff --git a/src/emu/cpu/i8051/i8051ops.c b/src/emu/cpu/i8051/i8051ops.c
index ce1d5a76349..250fec3096c 100644
--- a/src/emu/cpu/i8051/i8051ops.c
+++ b/src/emu/cpu/i8051/i8051ops.c
@@ -270,9 +270,9 @@ INLINE void da_a(void)
The carry flag will be set if the result is > 0x99, but not cleared otherwise */
UINT16 new_acc = R_ACC & 0xff;
- if(GET_AC || (R_ACC & 0x0f) > 0x09)
+ if(GET_AC || (new_acc & 0x0f) > 0x09)
new_acc += 0x06;
- if(GET_CY || (R_ACC & 0xf0) > 0x90)
+ if(GET_CY || ((new_acc & 0xf0) > 0x90) || (new_acc & ~0xff))
new_acc += 0x60;
SFR_W(ACC,new_acc&0xff);
if(new_acc & ~0xff)
diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c
index c3983cbefc8..db23ae009ea 100644
--- a/src/emu/cpu/i8085/i8085.c
+++ b/src/emu/cpu/i8085/i8085.c
@@ -150,7 +150,7 @@ typedef struct {
void (*sod_callback)(int state);
} i8085_Regs;
-int i8085_ICount = 0;
+static int i8085_ICount = 0;
static i8085_Regs I;
static UINT8 ZS[256];
diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c
index 1ddad9434c2..c80c474dfea 100644
--- a/src/emu/cpu/m37710/m37710.c
+++ b/src/emu/cpu/m37710/m37710.c
@@ -1054,14 +1054,14 @@ static void m37710_init(int index, int clock, const void *config, int (*irqcallb
{
INT_ACK = irqcallback;
- m37710i_cpu.timers[0] = timer_alloc(m37710_timer_a0_cb);
- m37710i_cpu.timers[1] = timer_alloc(m37710_timer_a1_cb);
- m37710i_cpu.timers[2] = timer_alloc(m37710_timer_a2_cb);
- m37710i_cpu.timers[3] = timer_alloc(m37710_timer_a3_cb);
- m37710i_cpu.timers[4] = timer_alloc(m37710_timer_a4_cb);
- m37710i_cpu.timers[5] = timer_alloc(m37710_timer_b0_cb);
- m37710i_cpu.timers[6] = timer_alloc(m37710_timer_b1_cb);
- m37710i_cpu.timers[7] = timer_alloc(m37710_timer_b2_cb);
+ m37710i_cpu.timers[0] = timer_alloc(m37710_timer_a0_cb, NULL);
+ m37710i_cpu.timers[1] = timer_alloc(m37710_timer_a1_cb, NULL);
+ m37710i_cpu.timers[2] = timer_alloc(m37710_timer_a2_cb, NULL);
+ m37710i_cpu.timers[3] = timer_alloc(m37710_timer_a3_cb, NULL);
+ m37710i_cpu.timers[4] = timer_alloc(m37710_timer_a4_cb, NULL);
+ m37710i_cpu.timers[5] = timer_alloc(m37710_timer_b0_cb, NULL);
+ m37710i_cpu.timers[6] = timer_alloc(m37710_timer_b1_cb, NULL);
+ m37710i_cpu.timers[7] = timer_alloc(m37710_timer_b2_cb, NULL);
state_save_register_item("M377xx", index, m37710i_cpu.a);
state_save_register_item("M377xx", index, m37710i_cpu.b);
diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c
index 89da4704784..ff8d63a7716 100644
--- a/src/emu/cpu/m6502/m6502.c
+++ b/src/emu/cpu/m6502/m6502.c
@@ -87,8 +87,8 @@ typedef struct
} m6502_Regs;
-int m6502_IntOccured = 0;
-int m6502_ICount = 0;
+static int m6502_IntOccured = 0;
+static int m6502_ICount = 0;
static m6502_Regs m6502;
diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c
index 3adbc951a5b..b4a1de2e2d3 100644
--- a/src/emu/cpu/m6800/m6800.c
+++ b/src/emu/cpu/m6800/m6800.c
@@ -610,6 +610,7 @@ static void check_timer_event(void)
/* include the opcode functions */
#include "6800ops.c"
+#if (HAS_M6801||HAS_M6803||HAS_HD63701)
static void m6800_tx(int value)
{
m6800.port2_data = (m6800.port2_data & 0xef) | (value << 4);
@@ -804,6 +805,7 @@ static TIMER_CALLBACK(m6800_rx_tick)
}
}
}
+#endif
/****************************************************************************
* Reset registers to their initial values
@@ -1274,8 +1276,8 @@ static void m6801_init(int index, int clock, const void *config, int (*irqcallba
m6800.irq_callback = irqcallback;
m6800.clock = clock;
- m6800_rx_timer = timer_alloc(m6800_rx_tick);
- m6800_tx_timer = timer_alloc(m6800_tx_tick);
+ m6800_rx_timer = timer_alloc(m6800_rx_tick, NULL);
+ m6800_tx_timer = timer_alloc(m6800_tx_tick, NULL);
state_register("m6801", index);
}
@@ -1307,8 +1309,8 @@ static void m6803_init(int index, int clock, const void *config, int (*irqcallba
m6800.irq_callback = irqcallback;
m6800.clock = clock;
- m6800_rx_timer = timer_alloc(m6800_rx_tick);
- m6800_tx_timer = timer_alloc(m6800_tx_tick);
+ m6800_rx_timer = timer_alloc(m6800_rx_tick, NULL);
+ m6800_tx_timer = timer_alloc(m6800_tx_tick, NULL);
state_register("m6803", index);
}
@@ -1650,8 +1652,8 @@ static void hd63701_init(int index, int clock, const void *config, int (*irqcall
m6800.irq_callback = irqcallback;
m6800.clock = clock;
- m6800_rx_timer = timer_alloc(m6800_rx_tick);
- m6800_tx_timer = timer_alloc(m6800_tx_tick);
+ m6800_rx_timer = timer_alloc(m6800_rx_tick, NULL);
+ m6800_tx_timer = timer_alloc(m6800_tx_tick, NULL);
state_register("hd63701", index);
}
diff --git a/src/emu/cpu/m6800/m6800.h b/src/emu/cpu/m6800/m6800.h
index 7b711d6bc59..c487777c9b8 100644
--- a/src/emu/cpu/m6800/m6800.h
+++ b/src/emu/cpu/m6800/m6800.h
@@ -83,7 +83,7 @@ extern void m6802_get_info(UINT32 state, cpuinfo *info);
extern void m6803_get_info(UINT32 state, cpuinfo *info);
#endif
-#if (HAS_M6803||HAS_HD63701)
+#if (HAS_M6801||HAS_M6803||HAS_HD63701)
/* By default, on a port write port bits which are not set as output in the DDR */
/* are set to the value returned by a read from the same port. If you need to */
/* know the DDR for e.g. port 1, do m6803_internal_registers_r(M6801_DDR1) */
diff --git a/src/emu/cpu/m68000/m68000.h b/src/emu/cpu/m68000/m68000.h
index f90ac95da26..e073c85332b 100644
--- a/src/emu/cpu/m68000/m68000.h
+++ b/src/emu/cpu/m68000/m68000.h
@@ -26,18 +26,19 @@ extern int m68k_ICount;
struct m68k_memory_interface
{
- offs_t opcode_xor; // Address Calculation
- UINT8 (*read8)(offs_t); // Normal read 8 bit
+ offs_t opcode_xor; // Address Calculation
+ UINT16 (*readimm16)(offs_t); // Immediate read 16 bit
+ UINT8 (*read8)(offs_t); // Normal read 8 bit
UINT16 (*read16)(offs_t); // Normal read 16 bit
UINT32 (*read32)(offs_t); // Normal read 32 bit
- void (*write8)(offs_t, UINT8); // Write 8 bit
- void (*write16)(offs_t, UINT16); // Write 16 bit
- void (*write32)(offs_t, UINT32); // Write 32 bit
- void (*changepc)(offs_t); // Change PC
+ void (*write8)(offs_t, UINT8); // Write 8 bit
+ void (*write16)(offs_t, UINT16); // Write 16 bit
+ void (*write32)(offs_t, UINT32); // Write 32 bit
+ void (*changepc)(offs_t); // Change PC
// For Encrypted Stuff
- UINT8 (*read8pc)(offs_t); // PC Relative read 8 bit
+ UINT8 (*read8pc)(offs_t); // PC Relative read 8 bit
UINT16 (*read16pc)(offs_t); // PC Relative read 16 bit
UINT32 (*read32pc)(offs_t); // PC Relative read 32 bit
@@ -47,7 +48,7 @@ struct m68k_memory_interface
struct m68k_encryption_interface
{
- UINT8 (*read8pc)(offs_t); // PC Relative read 8 bit
+ UINT8 (*read8pc)(offs_t); // PC Relative read 8 bit
UINT16 (*read16pc)(offs_t); // PC Relative read 16 bit
UINT32 (*read32pc)(offs_t); // PC Relative read 32 bit
diff --git a/src/emu/cpu/m68000/m68kmame.c b/src/emu/cpu/m68000/m68kmame.c
index 789c821c8a7..b213023ccba 100644
--- a/src/emu/cpu/m68000/m68kmame.c
+++ b/src/emu/cpu/m68000/m68kmame.c
@@ -20,6 +20,12 @@ void m68k_set_encrypted_opcode_range(int cpunum, offs_t start, offs_t end)
* 8-bit data memory interface
****************************************************************************/
+static UINT16 m68008_read_immediate_16(offs_t address)
+{
+ offs_t addr = (address) ^ m68k_memory_intf.opcode_xor;
+ return (cpu_readop(addr) << 8) | (cpu_readop(addr + 1));
+}
+
static UINT16 readword_d8(offs_t address)
{
UINT16 result = program_read_byte_8(address) << 8;
@@ -52,6 +58,7 @@ static void writelong_d8(offs_t address, UINT32 data)
static const struct m68k_memory_interface interface_d8 =
{
0,
+ m68008_read_immediate_16,
program_read_byte_8,
readword_d8,
readlong_d8,
@@ -64,6 +71,11 @@ static const struct m68k_memory_interface interface_d8 =
* 16-bit data memory interface
****************************************************************************/
+static UINT16 read_immediate_16(offs_t address)
+{
+ return cpu_readop16((address) ^ m68k_memory_intf.opcode_xor);
+}
+
static UINT32 readlong_d16(offs_t address)
{
UINT32 result = program_read_word_16be(address) << 16;
@@ -80,6 +92,7 @@ static void writelong_d16(offs_t address, UINT32 data)
static const struct m68k_memory_interface interface_d16 =
{
0,
+ read_immediate_16,
program_read_byte_16be,
program_read_word_16be,
readlong_d16,
@@ -155,6 +168,7 @@ static void writelong_d32(offs_t address, UINT32 data)
static const struct m68k_memory_interface interface_d32 =
{
WORD_XOR_BE(0),
+ read_immediate_16,
program_read_byte_32be,
readword_d32,
readlong_d32,
@@ -291,7 +305,7 @@ static offs_t m68008_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UIN
****************************************************************************/
#if HAS_M68010
-void m68010_init(int index, int clock, const void *config, int (*irqcallback)(int))
+static void m68010_init(int index, int clock, const void *config, int (*irqcallback)(int))
{
m68k_init();
m68k_set_cpu_type(M68K_CPU_TYPE_68010);
diff --git a/src/emu/cpu/m68000/m68kmame.h b/src/emu/cpu/m68000/m68kmame.h
index 046f38eb0ea..f98bee2e33c 100644
--- a/src/emu/cpu/m68000/m68kmame.h
+++ b/src/emu/cpu/m68000/m68kmame.h
@@ -65,13 +65,13 @@ extern offs_t m68k_encrypted_opcode_end[MAX_CPU];
#define m68k_read_memory_16(address) (*m68k_memory_intf.read16)(address)
#define m68k_read_memory_32(address) (*m68k_memory_intf.read32)(address)
-#define m68k_read_immediate_16(address) m68kx_read_immediate_16(address)
+#define m68k_read_immediate_16(address) (*m68k_memory_intf.readimm16)(address)
#define m68k_read_immediate_32(address) m68kx_read_immediate_32(address)
#define m68k_read_pcrelative_8(address) m68kx_read_pcrelative_8(address)
#define m68k_read_pcrelative_16(address) m68kx_read_pcrelative_16(address)
#define m68k_read_pcrelative_32(address) m68kx_read_pcrelative_32(address)
-#define m68k_read_disassembler_16(address) m68kx_read_immediate_16(address)
+#define m68k_read_disassembler_16(address) m68k_read_immediate_16(address)
#define m68k_read_disassembler_32(address) m68kx_read_immediate_32(address)
#define m68k_write_memory_8(address, value) (*m68k_memory_intf.write8)(address, value)
@@ -80,7 +80,6 @@ extern offs_t m68k_encrypted_opcode_end[MAX_CPU];
#define m68k_write_memory_32_pd(address, value) m68kx_write_memory_32_pd(address, value)
-INLINE unsigned int m68k_read_immediate_16(unsigned int address);
INLINE unsigned int m68k_read_immediate_32(unsigned int address);
INLINE unsigned int m68k_read_pcrelative_8(unsigned int address);
INLINE unsigned int m68k_read_pcrelative_16(unsigned int address);
@@ -88,11 +87,6 @@ INLINE unsigned int m68k_read_pcrelative_32(unsigned int address);
INLINE void m68k_write_memory_32_pd(unsigned int address, unsigned int value);
-INLINE unsigned int m68kx_read_immediate_16(unsigned int address)
-{
- return cpu_readop16((address) ^ m68k_memory_intf.opcode_xor);
-}
-
INLINE unsigned int m68kx_read_immediate_32(unsigned int address)
{
return ((m68k_read_immediate_16(address) << 16) | m68k_read_immediate_16((address)+2));
diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c
index eb56a4eecf5..6d4f4efc19b 100644
--- a/src/emu/cpu/m6805/m6805.c
+++ b/src/emu/cpu/m6805/m6805.c
@@ -78,7 +78,7 @@ static PAIR ea; /* effective address */
#define EA ea.w.l
/* public globals */
-int m6805_ICount=50000;
+static int m6805_ICount=50000;
/* DS -- THESE ARE RE-DEFINED IN m6805.h TO RAM, ROM or FUNCTIONS IN cpuintrf.c */
#define RM(Addr) M6805_RDMEM(Addr)
diff --git a/src/emu/cpu/mips/dismips.c b/src/emu/cpu/mips/dismips.c
index 3b7bc61cd8e..10ce5b89963 100644
--- a/src/emu/cpu/mips/dismips.c
+++ b/src/emu/cpu/mips/dismips.c
@@ -10,7 +10,7 @@
extern unsigned dasmr3k(char *,unsigned, UINT32);
extern unsigned dasmmips3(char *,unsigned, UINT32);
-struct
+static struct
{
UINT8 id[ 8 ];
UINT32 text; /* SCE only */
diff --git a/src/emu/cpu/mips/mips3com.c b/src/emu/cpu/mips/mips3com.c
index 55fc05bcacd..f9d22ffc00a 100644
--- a/src/emu/cpu/mips/mips3com.c
+++ b/src/emu/cpu/mips/mips3com.c
@@ -118,7 +118,7 @@ void mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, int in
mips->tlb_table = auto_malloc(sizeof(mips->tlb_table[0]) * (1 << (MIPS3_MAX_PADDR_SHIFT - MIPS3_MIN_PAGE_SHIFT)));
/* allocate a timer for the compare interrupt */
- mips->compare_int_timer = timer_alloc(compare_int_callback);
+ mips->compare_int_timer = timer_alloc(compare_int_callback, NULL);
/* reset the state */
mips3com_reset(mips);
diff --git a/src/emu/cpu/powerpc/ppc.c b/src/emu/cpu/powerpc/ppc.c
index ff371fda52a..a3a4aded42a 100644
--- a/src/emu/cpu/powerpc/ppc.c
+++ b/src/emu/cpu/powerpc/ppc.c
@@ -12,8 +12,8 @@ void ppc602_exception(int exception);
#endif
#if (HAS_PPC403)
void ppc403_exception(int exception);
-UINT8 ppc403_spu_r(UINT32 a);
-void ppc403_spu_w(UINT32 a, UINT8 d);
+static UINT8 ppc403_spu_r(UINT32 a);
+static void ppc403_spu_w(UINT32 a, UINT8 d);
#endif
#define RD ((op >> 21) & 0x1F)
@@ -921,8 +921,8 @@ static void ppc403_init(int index, int clock, const void *_config, int (*irqcall
// !!! why is rfci here !!!
optable19[51] = ppc_rfci;
- ppc.spu.rx_timer = timer_alloc(ppc403_spu_rx_callback);
- ppc.spu.tx_timer = timer_alloc(ppc403_spu_tx_callback);
+ ppc.spu.rx_timer = timer_alloc(ppc403_spu_rx_callback, NULL);
+ ppc.spu.tx_timer = timer_alloc(ppc403_spu_tx_callback, NULL);
ppc.read8 = ppc403_read8;
ppc.read16 = ppc403_read16;
diff --git a/src/emu/cpu/powerpc/ppc403.c b/src/emu/cpu/powerpc/ppc403.c
index 9d1988de86d..aa57f1a2ef6 100644
--- a/src/emu/cpu/powerpc/ppc403.c
+++ b/src/emu/cpu/powerpc/ppc403.c
@@ -678,7 +678,7 @@ static void ppc403_spu_w(UINT32 a, UINT8 d)
case 0x9:
ppc.spu.sptb = d;
- ppc403_spu_tx_callback(Machine, cpu_getactivecpu());
+ ppc403_spu_tx_callback(Machine, NULL, cpu_getactivecpu());
break;
default:
diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c
index 56780178758..77948103c42 100644
--- a/src/emu/cpu/powerpc/ppcdrc.c
+++ b/src/emu/cpu/powerpc/ppcdrc.c
@@ -1074,8 +1074,8 @@ static void ppcdrc403_init(int index, int clock, const void *_config, int (*irqc
optable31[163] = recompile_wrteei;
optable19[51] = recompile_rfci;
- ppc.spu.rx_timer = timer_alloc(ppc403_spu_rx_callback);
- ppc.spu.tx_timer = timer_alloc(ppc403_spu_tx_callback);
+ ppc.spu.rx_timer = timer_alloc(ppc403_spu_rx_callback, NULL);
+ ppc.spu.tx_timer = timer_alloc(ppc403_spu_tx_callback, NULL);
ppc.is603 = 0;
ppc.is602 = 0;
diff --git a/src/emu/cpu/rsp/rsp.c b/src/emu/cpu/rsp/rsp.c
index 2116d65faed..1b0b4d16c91 100644
--- a/src/emu/cpu/rsp/rsp.c
+++ b/src/emu/cpu/rsp/rsp.c
@@ -31,11 +31,7 @@ static FILE *exec_output;
#endif
-extern UINT32 sp_read_reg(UINT32 reg);
-extern void sp_write_reg(UINT32 reg, UINT32 data);
-extern READ32_HANDLER( n64_dp_reg_r );
-extern WRITE32_HANDLER( n64_dp_reg_w );
-extern void sp_set_status(UINT32 status);
+static rsp_config *config;
typedef struct
@@ -52,7 +48,7 @@ typedef struct
UINT32 r[32];
VECTOR_REG v[32];
UINT16 flag[4];
- UINT32 sr;
+ UINT32 sr;
INT64 accum[8];
INT32 square_root_res;
@@ -235,11 +231,11 @@ static UINT32 get_cop0_reg(int reg)
{
if (reg >= 0 && reg < 8)
{
- return sp_read_reg(reg);
+ return (config->sp_reg_r)(reg, 0x00000000);
}
else if (reg >= 8 && reg < 16)
{
- return n64_dp_reg_r(reg - 8, 0x00000000);
+ return (config->dp_reg_r)(reg - 8, 0x00000000);
}
else
{
@@ -251,11 +247,11 @@ static void set_cop0_reg(int reg, UINT32 data)
{
if (reg >= 0 && reg < 8)
{
- sp_write_reg(reg, data);
+ (config->sp_reg_w)(reg, data, 0x00000000);
}
else if (reg >= 8 && reg < 16)
{
- n64_dp_reg_w(reg - 8, data, 0x00000000);
+ (config->dp_reg_w)(reg - 8, data, 0x00000000);
}
else
{
@@ -348,33 +344,35 @@ static const int vector_elements_2[16][8] =
static void rsp_init(int index, int clock, const void *_config, int (*irqcallback)(int))
{
- //int regIdx, accumIdx;
+ //int regIdx, accumIdx;
+ config = (rsp_config *)_config;
+
#if LOG_INSTRUCTION_EXECUTION
exec_output = fopen("rsp_execute.txt", "wt");
#endif
rsp.irq_callback = irqcallback;
- /*
- for(regIdx = 0; regIdx < 32; regIdx++ )
- {
- rsp.r[regIdx] = 0;
- rsp.v[regIdx].d[0] = 0;
- rsp.v[regIdx].d[1] = 0;
- }
- for(accumIdx = 0; accumIdx < 8; accumIdx++ )
- {
- rsp.accum[accumIdx] = 0;
- }
- rsp.flag[0] = 0;
- rsp.flag[1] = 0;
- rsp.flag[2] = 0;
- rsp.flag[3] = 0;
- rsp.square_root_res = 0;
- rsp.square_root_high = 0;
- rsp.reciprocal_res = 0;
- rsp.reciprocal_high = 0;
- */
- rsp.sr = RSP_STATUS_HALT;
+#if 0
+ for(regIdx = 0; regIdx < 32; regIdx++ )
+ {
+ rsp.r[regIdx] = 0;
+ rsp.v[regIdx].d[0] = 0;
+ rsp.v[regIdx].d[1] = 0;
+ }
+ for(accumIdx = 0; accumIdx < 8; accumIdx++ )
+ {
+ rsp.accum[accumIdx] = 0;
+ }
+ rsp.flag[0] = 0;
+ rsp.flag[1] = 0;
+ rsp.flag[2] = 0;
+ rsp.flag[3] = 0;
+ rsp.square_root_res = 0;
+ rsp.square_root_high = 0;
+ rsp.reciprocal_res = 0;
+ rsp.reciprocal_high = 0;
+#endif
+ rsp.sr = RSP_STATUS_HALT;
}
static void rsp_exit(void)
@@ -397,18 +395,17 @@ static void rsp_exit(void)
#endif
#if SAVE_DMEM
{
- /*int i;
- FILE *dmem;
- dmem = fopen("rsp_dmem.txt", "wt");
-
- for (i=0; i < 0x1000; i+=4)
- {
- fprintf(dmem, "%08X: %08X\n", 0x04000000 + i, READ32(0x04000000 + i));
- }
- fclose(dmem);*/
-
int i;
FILE *dmem;
+#if 0
+ dmem = fopen("rsp_dmem.txt", "wt");
+
+ for (i=0; i < 0x1000; i+=4)
+ {
+ fprintf(dmem, "%08X: %08X\n", 0x04000000 + i, READ32(0x04000000 + i));
+ }
+ fclose(dmem);
+#endif
dmem = fopen("rsp_dmem.bin", "wb");
for (i=0; i < 0x1000; i++)
@@ -966,7 +963,7 @@ static void handle_swc2(UINT32 op)
//
// Stores one element from maximum of 8 vectors, while incrementing element index
- int element, eaoffset;
+ int element;
int vs = dest;
int ve = dest + 8;
if (ve > 32)
@@ -2308,7 +2305,7 @@ static void handle_vector_ops(UINT32 op)
i = 0;
}
}
- rec = (INT32)(0x7fffffff / (double)rec);
+ rec = (INT32)(0x7fffffff / (double)rec);
for (i = 31; i > 0; i--)
{
if (rec & (1 << i))
@@ -2554,10 +2551,10 @@ static int rsp_execute(int cycles)
rsp.pc = 0x4001000 | (rsp.pc & 0xfff);
- if( rsp.sr & ( RSP_STATUS_HALT | RSP_STATUS_BROKE ) )
- {
- rsp_icount = 0;
- }
+ if( rsp.sr & ( RSP_STATUS_HALT | RSP_STATUS_BROKE ) )
+ {
+ rsp_icount = 0;
+ }
while (rsp_icount > 0)
{
@@ -2591,7 +2588,7 @@ static int rsp_execute(int cycles)
case 0x09: /* JALR */ JUMP_PC_L(RSVAL, RDREG); break;
case 0x0d: /* BREAK */
{
- sp_set_status(0x3);
+ (config->sp_set_status)(0x3);
rsp_icount = 1;
#if LOG_INSTRUCTION_EXECUTION
@@ -2784,15 +2781,15 @@ static int rsp_execute(int cycles)
--rsp_icount;
- if( rsp.sr & RSP_STATUS_SSTEP )
- {
- rsp.sr |= RSP_STATUS_BROKE;
- }
+ if( rsp.sr & RSP_STATUS_SSTEP )
+ {
+ rsp.sr |= RSP_STATUS_BROKE;
+ }
- if( rsp.sr & ( RSP_STATUS_HALT | RSP_STATUS_BROKE ) )
- {
- rsp_icount = 0;
- }
+ if( rsp.sr & ( RSP_STATUS_HALT | RSP_STATUS_BROKE ) )
+ {
+ rsp_icount = 0;
+ }
}
@@ -2942,8 +2939,8 @@ void rsp_get_info(UINT32 state, cpuinfo *info)
case CPUINFO_INT_REGISTER + RSP_R30: info->i = rsp.r[30]; break;
case CPUINFO_INT_SP:
case CPUINFO_INT_REGISTER + RSP_R31: info->i = rsp.r[31]; break;
- case CPUINFO_INT_REGISTER + RSP_SR: info->i = rsp.sr; break;
- case CPUINFO_INT_REGISTER + RSP_NEXTPC: info->i = rsp.nextpc; break;
+ case CPUINFO_INT_REGISTER + RSP_SR: info->i = rsp.sr; break;
+ case CPUINFO_INT_REGISTER + RSP_NEXTPC: info->i = rsp.nextpc; break;
/* --- the following bits of info are returned as pointers to data or functions --- */
case CPUINFO_PTR_GET_CONTEXT: info->getcontext = rsp_get_context; break;
@@ -3002,7 +2999,7 @@ void rsp_get_info(UINT32 state, cpuinfo *info)
case CPUINFO_STR_REGISTER + RSP_R29: sprintf(info->s, "R29: %08X", rsp.r[29]); break;
case CPUINFO_STR_REGISTER + RSP_R30: sprintf(info->s, "R30: %08X", rsp.r[30]); break;
case CPUINFO_STR_REGISTER + RSP_R31: sprintf(info->s, "R31: %08X", rsp.r[31]); break;
- case CPUINFO_STR_REGISTER + RSP_SR: sprintf(info->s, "SR: %08X", rsp.sr); break;
- case CPUINFO_STR_REGISTER + RSP_NEXTPC: sprintf(info->s, "NPC: %08X", rsp.nextpc);break;
+ case CPUINFO_STR_REGISTER + RSP_SR: sprintf(info->s, "SR: %08X", rsp.sr); break;
+ case CPUINFO_STR_REGISTER + RSP_NEXTPC: sprintf(info->s, "NPC: %08X", rsp.nextpc);break;
}
}
diff --git a/src/emu/cpu/rsp/rsp.h b/src/emu/cpu/rsp/rsp.h
index 345e7ae1543..2dc6ce2d644 100644
--- a/src/emu/cpu/rsp/rsp.h
+++ b/src/emu/cpu/rsp/rsp.h
@@ -1,6 +1,16 @@
#ifndef _RSP_H
#define _RSP_H
+struct _rsp_config
+{
+ read32_handler dp_reg_r;
+ write32_handler dp_reg_w;
+ read32_handler sp_reg_r;
+ write32_handler sp_reg_w;
+ void (*sp_set_status)(UINT32 status);
+};
+typedef struct _rsp_config rsp_config;
+
enum
{
RSP_PC = 1,
diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c
index ef819bb397f..7dd5d4f40ef 100644
--- a/src/emu/cpu/s2650/s2650.c
+++ b/src/emu/cpu/s2650/s2650.c
@@ -28,7 +28,7 @@
/* define this to expand all EA calculations inline */
#define INLINE_EA 1
-int s2650_ICount = 0;
+static int s2650_ICount = 0;
typedef struct {
UINT16 ppc; /* previous program counter (page + iar) */
diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c
index ef62727d1ad..4da083297d9 100644
--- a/src/emu/cpu/sc61860/sc61860.c
+++ b/src/emu/cpu/sc61860/sc61860.c
@@ -94,7 +94,7 @@ static void sc61860_reset(void)
static void sc61860_init(int index, int clock, const void *config, int (*irqcallback)(int))
{
sc61860.config = (SC61860_CONFIG *) config;
- timer_pulse(ATTOTIME_IN_HZ(500), 0, sc61860_2ms_tick);
+ timer_pulse(ATTOTIME_IN_HZ(500), NULL, 0, sc61860_2ms_tick);
}
static void sc61860_get_context (void *dst)
diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c
index ef56912acaa..57ea7e545c3 100644
--- a/src/emu/cpu/sh2/sh2.c
+++ b/src/emu/cpu/sh2/sh2.c
@@ -2933,13 +2933,13 @@ static void sh2_init(int index, int clock, const void *config, int (*irqcallback
{
const struct sh2_config *conf = config;
- sh2.timer = timer_alloc(sh2_timer_callback);
+ sh2.timer = timer_alloc(sh2_timer_callback, NULL);
timer_adjust(sh2.timer, attotime_never, 0, attotime_zero);
- sh2.dma_timer[0] = timer_alloc(sh2_dmac_callback);
+ sh2.dma_timer[0] = timer_alloc(sh2_dmac_callback, NULL);
timer_adjust(sh2.dma_timer[0], attotime_never, 0, attotime_zero);
- sh2.dma_timer[1] = timer_alloc(sh2_dmac_callback);
+ sh2.dma_timer[1] = timer_alloc(sh2_dmac_callback, NULL);
timer_adjust(sh2.dma_timer[1], attotime_never, 0, attotime_zero);
sh2.m = auto_malloc(0x200);
diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c
index 82daf0cc51c..aacc951245e 100644
--- a/src/emu/cpu/sh4/sh4.c
+++ b/src/emu/cpu/sh4/sh4.c
@@ -4121,27 +4121,27 @@ static void sh4_init(int index, int clock, const void *config, int (*irqcallback
{
const struct sh4_config *conf = config;
- sh4.timer0 = timer_alloc(sh4_timer0_callback);
+ sh4.timer0 = timer_alloc(sh4_timer0_callback, NULL);
timer_adjust(sh4.timer0, attotime_never, 0, attotime_zero);
- sh4.timer1 = timer_alloc(sh4_timer1_callback);
+ sh4.timer1 = timer_alloc(sh4_timer1_callback, NULL);
timer_adjust(sh4.timer1, attotime_never, 0, attotime_zero);
- sh4.timer2 = timer_alloc(sh4_timer2_callback);
+ sh4.timer2 = timer_alloc(sh4_timer2_callback, NULL);
timer_adjust(sh4.timer2, attotime_never, 0, attotime_zero);
- sh4.dma_timer[0] = timer_alloc(sh4_dmac_callback);
+ sh4.dma_timer[0] = timer_alloc(sh4_dmac_callback, NULL);
timer_adjust(sh4.dma_timer[0], attotime_never, 0, attotime_zero);
- sh4.dma_timer[1] = timer_alloc(sh4_dmac_callback);
+ sh4.dma_timer[1] = timer_alloc(sh4_dmac_callback, NULL);
timer_adjust(sh4.dma_timer[1], attotime_never, 0, attotime_zero);
- sh4.dma_timer[2] = timer_alloc(sh4_dmac_callback);
+ sh4.dma_timer[2] = timer_alloc(sh4_dmac_callback, NULL);
timer_adjust(sh4.dma_timer[2], attotime_never, 0, attotime_zero);
- sh4.dma_timer[3] = timer_alloc(sh4_dmac_callback);
+ sh4.dma_timer[3] = timer_alloc(sh4_dmac_callback, NULL);
timer_adjust(sh4.dma_timer[3], attotime_never, 0, attotime_zero);
- sh4.refresh_timer = timer_alloc(sh4_refresh_timer_callback);
+ sh4.refresh_timer = timer_alloc(sh4_refresh_timer_callback, NULL);
timer_adjust(sh4.refresh_timer, attotime_never, 0, attotime_zero);
sh4.refresh_timer_base = 0;
- sh4.rtc_timer = timer_alloc(sh4_rtc_timer_callback);
+ sh4.rtc_timer = timer_alloc(sh4_rtc_timer_callback, NULL);
timer_adjust(sh4.rtc_timer, attotime_never, 0, attotime_zero);
sh4.m = auto_malloc(16384*4);
diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c
index 2c12d232f99..eb6526bc1ab 100644
--- a/src/emu/cpu/sm8500/sm8500.c
+++ b/src/emu/cpu/sm8500/sm8500.c
@@ -53,7 +53,7 @@ typedef struct {
static sm8500_regs regs;
/* nr of cycles to run */
-int sm8500_icount;
+static int sm8500_icount;
static UINT8 sm8500_b2w[8] = {
0, 8, 2, 10, 4, 12, 6, 14
diff --git a/src/emu/cpu/sm8500/sm8500.h b/src/emu/cpu/sm8500/sm8500.h
index 4d11727d6c3..89aaab5f4d6 100644
--- a/src/emu/cpu/sm8500/sm8500.h
+++ b/src/emu/cpu/sm8500/sm8500.h
@@ -20,8 +20,6 @@ typedef struct {
#define WDT_INT 9
#define NMI_INT 10
-extern int sm8500_icount;
-
enum {
/* "main" 16 bit register */
SM8500_PC=1, SM8500_SP, SM8500_PS, SM8500_SYS16, SM8500_RR0, SM8500_RR2, SM8500_RR4, SM8500_RR6, SM8500_RR8, SM8500_RR10,
diff --git a/src/emu/cpu/spc700/spc700.c b/src/emu/cpu/spc700/spc700.c
index 8e9c1aca272..78f8a183fb4 100644
--- a/src/emu/cpu/spc700/spc700.c
+++ b/src/emu/cpu/spc700/spc700.c
@@ -134,7 +134,7 @@ typedef struct
/* Our CPU structure */
static spc700i_cpu_struct spc700i_cpu = {0};
-int spc700_ICount = 0;
+static int spc700_ICount = 0;
/* Temporary Variables */
static uint spc700i_source;
diff --git a/src/emu/cpu/spc700/spc700.h b/src/emu/cpu/spc700/spc700.h
index 41407488485..e821bf63e3c 100644
--- a/src/emu/cpu/spc700/spc700.h
+++ b/src/emu/cpu/spc700/spc700.h
@@ -96,8 +96,6 @@ const char *spc700_info(void *context, int regnum);
/* Pulse the SO (Set Overflow) pin on the CPU */
void spc700_pulse_so(void);
-extern int spc700_ICount; /* cycle count */
-
int spc700_execute(int clocks);
diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c
index 3a1576eaa65..dc18b69b020 100644
--- a/src/emu/cpu/tlcs90/tlcs90.c
+++ b/src/emu/cpu/tlcs90/tlcs90.c
@@ -2430,7 +2430,7 @@ static TIMER_CALLBACK( t90_timer_callback )
case 2:
if ( !is16bit )
if ( (T90.internal_registers[ T90_TCLK - T90_IOBASE ] & (0x03 << (i * 2 + 2))) == 0 ) // T0/T1 match signal clocks T1/T3
- t90_timer_callback(machine, i+1);
+ t90_timer_callback(machine, NULL, i+1);
break;
}
}
@@ -2446,7 +2446,7 @@ static TIMER_CALLBACK( t90_timer_callback )
case 0:
case 2:
if ( is16bit ) // T0/T1 overflow signal clocks T1/T3
- t90_timer_callback(machine, i+1);
+ t90_timer_callback(machine, NULL, i+1);
break;
}
}
@@ -2662,9 +2662,9 @@ static void t90_init(int index, int clock, const void *config, int (*irqcallback
// Timers
for (i = 0; i < 4; i++)
- T90.timer[i] = timer_alloc(t90_timer_callback);
+ T90.timer[i] = timer_alloc(t90_timer_callback, NULL);
- T90.timer[4] = timer_alloc(t90_timer4_callback);
+ T90.timer[4] = timer_alloc(t90_timer4_callback, NULL);
}
static ADDRESS_MAP_START(tmp90840_mem, ADDRESS_SPACE_PROGRAM, 8)
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index b2375f4d0b5..eab03d73025 100644
--- a/src/emu/cpu/tms34010/tms34010.c
+++ b/src/emu/cpu/tms34010/tms34010.c
@@ -616,7 +616,7 @@ static void tms34010_init(int index, int clock, const void *_config, int (*irqca
screen_to_cpu[config->scrnum] = index;
/* allocate a scanline timer and set it to go off at the start */
- state.scantimer = timer_alloc(scanline_callback);
+ state.scantimer = timer_alloc(scanline_callback, NULL);
timer_adjust(state.scantimer, attotime_zero, index, attotime_zero);
/* allocate the shiftreg */
@@ -932,7 +932,7 @@ static TIMER_CALLBACK( scanline_callback )
if (enabled && vcount == SMART_IOREG(DPYINT))
{
/* generate the display interrupt signal */
- internal_interrupt_callback(machine, cpunum | (TMS34010_DI << 8));
+ internal_interrupt_callback(machine, NULL, cpunum | (TMS34010_DI << 8));
}
/* at the start of VBLANK, load the starting display address */
@@ -1179,7 +1179,7 @@ WRITE16_HANDLER( tms34010_io_register_w )
/* NMI issued? */
if (data & 0x0100)
- timer_call_after_resynch(cpunum, internal_interrupt_callback);
+ timer_call_after_resynch(NULL, cpunum, internal_interrupt_callback);
break;
case REG_HSTCTLL:
@@ -1214,7 +1214,7 @@ WRITE16_HANDLER( tms34010_io_register_w )
/* input interrupt? (should really be state-based, but the functions don't exist!) */
if (!(oldreg & 0x0008) && (newreg & 0x0008))
- timer_call_after_resynch(cpunum | (TMS34010_HI << 8), internal_interrupt_callback);
+ timer_call_after_resynch(NULL, cpunum | (TMS34010_HI << 8), internal_interrupt_callback);
else if ((oldreg & 0x0008) && !(newreg & 0x0008))
IOREG(REG_INTPEND) &= ~TMS34010_HI;
break;
@@ -1323,7 +1323,7 @@ WRITE16_HANDLER( tms34020_io_register_w )
/* NMI issued? */
if (data & 0x0100)
- timer_call_after_resynch(cpunum, internal_interrupt_callback);
+ timer_call_after_resynch(NULL, cpunum, internal_interrupt_callback);
break;
case REG020_HSTCTLL:
@@ -1358,7 +1358,7 @@ WRITE16_HANDLER( tms34020_io_register_w )
/* input interrupt? (should really be state-based, but the functions don't exist!) */
if (!(oldreg & 0x0008) && (newreg & 0x0008))
- timer_call_after_resynch(cpunum | (TMS34010_HI << 8), internal_interrupt_callback);
+ timer_call_after_resynch(NULL, cpunum | (TMS34010_HI << 8), internal_interrupt_callback);
else if ((oldreg & 0x0008) && !(newreg & 0x0008))
IOREG(REG020_INTPEND) &= ~TMS34010_HI;
break;
diff --git a/src/emu/cpu/tms9900/99xxcore.h b/src/emu/cpu/tms9900/99xxcore.h
index 49c80d734b4..360c92c7aff 100644
--- a/src/emu/cpu/tms9900/99xxcore.h
+++ b/src/emu/cpu/tms9900/99xxcore.h
@@ -1284,7 +1284,7 @@ static void tms99xx_init(int index, int clock, const void *config, int (*irqcall
I.irq_callback = irqcallback;
#if (TMS99XX_MODEL == TMS9995_ID)
- I.timer = timer_alloc(decrementer_callback);
+ I.timer = timer_alloc(decrementer_callback, NULL);
#endif
I.idle_callback = param ? param->idle_callback : NULL;
@@ -1864,7 +1864,7 @@ static void tms99xx_set_irq_line(int irqline, int state)
{ /* decrement, then interrupt if reach 0 */
if ((-- I.decrementer_count) == 0)
{
- decrementer_callback(Machine, 0);
+ decrementer_callback(Machine, NULL, 0);
I.decrementer_count = I.decrementer_interval; /* reload */
}
}
diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c
index 4eabb624492..26d7b7ee708 100644
--- a/src/emu/cpu/v810/v810.c
+++ b/src/emu/cpu/v810/v810.c
@@ -34,7 +34,7 @@ typedef struct
static v810info v810;
-int v810_ICount;
+static int v810_ICount;
#define R0 v810.reg[0]
#define R1 v810.reg[1]
diff --git a/src/emu/cpu/v810/v810.h b/src/emu/cpu/v810/v810.h
index 2b522609f88..4832537a009 100644
--- a/src/emu/cpu/v810/v810.h
+++ b/src/emu/cpu/v810/v810.h
@@ -3,8 +3,6 @@
#include "cpuintrf.h"
-extern int v810_ICount;
-
void v810_get_info(UINT32, cpuinfo*);
#define R_B(addr) (program_read_byte_32le(addr))
diff --git a/src/emu/cpu/z80gb/z80gb.c b/src/emu/cpu/z80gb/z80gb.c
index 99ca7773bdd..61dca398cd4 100644
--- a/src/emu/cpu/z80gb/z80gb.c
+++ b/src/emu/cpu/z80gb/z80gb.c
@@ -129,7 +129,7 @@ INLINE void mem_WriteWord (UINT32 address, UINT16 value)
}
/* Nr of cycles to run */
-int z80gb_ICount;
+static int z80gb_ICount;
static int Cycles[256] =
{
diff --git a/src/emu/cpu/z80gb/z80gb.h b/src/emu/cpu/z80gb/z80gb.h
index aca87845348..5721c4cf8aa 100644
--- a/src/emu/cpu/z80gb/z80gb.h
+++ b/src/emu/cpu/z80gb/z80gb.h
@@ -3,8 +3,6 @@
#include "cpuintrf.h"
-extern int z80gb_ICount;
-
typedef struct {
UINT16 *regs;
UINT8 features;
diff --git a/src/emu/cpuexec.c b/src/emu/cpuexec.c
index 8c7556ef092..2159ddcf230 100644
--- a/src/emu/cpuexec.c
+++ b/src/emu/cpuexec.c
@@ -92,7 +92,7 @@ struct _cpuexec_data
INT32 iloops; /* number of interrupts remaining this frame */
UINT64 totalcycles; /* total CPU cycles executed */
- attotime localtime; /* local time, relative to the timer system's global time */
+ attotime localtime; /* local time, relative to the timer system's global time */
INT32 clock; /* current active clock */
double clockscale; /* current active clock scale factor */
@@ -202,8 +202,8 @@ void cpuexec_init(running_machine *machine)
machine->screen[0].vblank = (machine->screen[0].refresh / machine->screen[0].height) * (machine->screen[0].height - (machine->screen[0].visarea.max_y + 1 - machine->screen[0].visarea.min_y));
/* allocate vblank and refresh timers, and compute the initial timing */
- vblank_timer = timer_alloc(cpu_vblankcallback);
- refresh_timer = timer_alloc(NULL);
+ vblank_timer = timer_alloc(cpu_vblankcallback, NULL);
+ refresh_timer = timer_alloc(NULL, NULL);
cpu_compute_vblank_timing();
/* loop over all our CPUs */
@@ -372,7 +372,7 @@ static void watchdog_setup(int alloc_new)
{
/* Start a time based watchdog. */
if (alloc_new)
- watchdog_timer = timer_alloc(watchdog_callback);
+ watchdog_timer = timer_alloc(watchdog_callback, NULL);
timer_adjust(watchdog_timer, Machine->drv->watchdog_time, 0, attotime_zero);
watchdog_counter = WATCHDOG_IS_TIMER_BASED;
}
@@ -998,7 +998,7 @@ static TIMER_CALLBACK( cpu_triggertime_callback )
void cpu_triggertime(attotime duration, int trigger)
{
- timer_set(duration, trigger, cpu_triggertime_callback);
+ timer_set(duration, NULL, trigger, cpu_triggertime_callback);
}
@@ -1046,19 +1046,6 @@ void cpunum_spinuntil_trigger( int cpunum, int trigger )
cpu[cpunum].trigger = trigger;
}
-void cpu_yielduntil_trigger(int trigger)
-{
- int cpunum = cpu_getexecutingcpu();
-
- VERIFY_EXECUTINGCPU(cpu_yielduntil_trigger);
-
- /* suspend the CPU immediately if it's not already */
- cpunum_suspend(cpunum, SUSPEND_REASON_TRIGGER, 0);
-
- /* set the trigger */
- cpu[cpunum].trigger = trigger;
-}
-
/*************************************
@@ -1075,13 +1062,6 @@ void cpu_spinuntil_int(void)
}
-void cpu_yielduntil_int(void)
-{
- VERIFY_EXECUTINGCPU(cpu_yielduntil_int);
- cpu_yielduntil_trigger(TRIGGER_INT + activecpu);
-}
-
-
/*************************************
*
@@ -1098,7 +1078,15 @@ void cpu_spin(void)
void cpu_yield(void)
{
- cpu_yielduntil_trigger(TRIGGER_TIMESLICE);
+ int cpunum = cpu_getexecutingcpu();
+
+ VERIFY_EXECUTINGCPU(cpu_yielduntil_trigger);
+
+ /* suspend the CPU immediately if it's not already */
+ cpunum_suspend(cpunum, SUSPEND_REASON_TRIGGER, 0);
+
+ /* set the trigger */
+ cpu[cpunum].trigger = TRIGGER_TIMESLICE;
}
@@ -1120,16 +1108,6 @@ void cpu_spinuntil_time(attotime duration)
}
-void cpu_yielduntil_time(attotime duration)
-{
- static int timetrig = 0;
-
- cpu_yielduntil_trigger(TRIGGER_YIELDTIME + timetrig);
- cpu_triggertime(duration, TRIGGER_YIELDTIME + timetrig);
- timetrig = (timetrig + 1) & 255;
-}
-
-
#if 0
#pragma mark -
@@ -1213,7 +1191,7 @@ static TIMER_CALLBACK( cpu_firstvblankcallback )
timer_adjust(vblank_timer, vblank_period, param, vblank_period);
/* but we need to call the standard routine as well */
- cpu_vblankcallback(machine, param);
+ cpu_vblankcallback(machine, NULL, param);
}
@@ -1271,7 +1249,7 @@ static TIMER_CALLBACK( cpu_vblankcallback )
{
/* do we update the screen now? */
if (!(machine->drv->video_attributes & VIDEO_UPDATE_AFTER_VBLANK))
- video_frame_update();
+ video_frame_update(FALSE);
/* Set the timer to update the screen */
timer_adjust(update_timer, attotime_make(0, machine->screen[0].vblank), 0, attotime_zero);
@@ -1301,7 +1279,7 @@ static TIMER_CALLBACK( cpu_updatecallback )
{
/* update the screen if we didn't before */
if (machine->drv->video_attributes & VIDEO_UPDATE_AFTER_VBLANK)
- video_frame_update();
+ video_frame_update(FALSE);
vblank = 0;
/* update IPT_VBLANK input ports */
@@ -1416,12 +1394,12 @@ static void cpu_inittimers(running_machine *machine)
if (ipf <= 0)
ipf = 1;
timeslice_period = attotime_make(0, machine->screen[0].refresh / ipf);
- timeslice_timer = timer_alloc(cpu_timeslicecallback);
+ timeslice_timer = timer_alloc(cpu_timeslicecallback, NULL);
timer_adjust(timeslice_timer, timeslice_period, 0, timeslice_period);
/* allocate timers to handle interleave boosts */
- interleave_boost_timer = timer_alloc(NULL);
- interleave_boost_timer_end = timer_alloc(end_interleave_boost);
+ interleave_boost_timer = timer_alloc(NULL, NULL);
+ interleave_boost_timer_end = timer_alloc(end_interleave_boost, NULL);
/*
* The following code finds all the CPUs that are interrupting in sync with the VBLANK
@@ -1468,7 +1446,7 @@ static void cpu_inittimers(running_machine *machine)
vblank_countdown = vblank_multiplier;
/* allocate an update timer that will be used to time the actual screen updates */
- update_timer = timer_alloc(cpu_updatecallback);
+ update_timer = timer_alloc(cpu_updatecallback, NULL);
/*
* The following code creates individual timers for each CPU whose interrupts are not
@@ -1483,13 +1461,13 @@ static void cpu_inittimers(running_machine *machine)
/* compute the average number of cycles per interrupt */
if (ipf <= 0)
ipf = 1;
- cpu[cpunum].vblankint_timer = timer_alloc(NULL);
+ cpu[cpunum].vblankint_timer = timer_alloc(NULL, NULL);
/* see if we need to allocate a CPU timer */
if (machine->drv->cpu[cpunum].timed_interrupt_period != 0)
{
cpu[cpunum].timedint_period = attotime_make(0, machine->drv->cpu[cpunum].timed_interrupt_period);
- cpu[cpunum].timedint_timer = timer_alloc(cpu_timedintcallback);
+ cpu[cpunum].timedint_timer = timer_alloc(cpu_timedintcallback, NULL);
timer_adjust(cpu[cpunum].timedint_timer, cpu[cpunum].timedint_period, cpunum, cpu[cpunum].timedint_period);
}
}
@@ -1500,10 +1478,10 @@ static void cpu_inittimers(running_machine *machine)
first_time = attotime_sub_attoseconds(vblank_period, machine->screen[0].vblank);
while (attotime_compare(first_time, attotime_zero) < 0)
{
- cpu_vblankcallback(machine, -1);
+ cpu_vblankcallback(machine, NULL, -1);
first_time = attotime_add(first_time, vblank_period);
}
- timer_set(first_time, 0, cpu_firstvblankcallback);
+ timer_set(first_time, NULL, 0, cpu_firstvblankcallback);
/* reset the refresh timer to get ourself back in sync */
timer_adjust(refresh_timer, attotime_never, 0, attotime_never);
diff --git a/src/emu/cpuexec.h b/src/emu/cpuexec.h
index ba966ae6046..cb7d9b2e20c 100644
--- a/src/emu/cpuexec.h
+++ b/src/emu/cpuexec.h
@@ -394,15 +394,9 @@ void cpu_spinuntil_trigger(int trigger);
/* burn specified CPU cycles until a timer trigger */
void cpunum_spinuntil_trigger(int cpunum, int trigger);
-/* yield our timeslice until a timer trigger */
-void cpu_yielduntil_trigger(int trigger);
-
/* burn CPU cycles until the next interrupt */
void cpu_spinuntil_int(void);
-/* yield our timeslice until the next interrupt */
-void cpu_yielduntil_int(void);
-
/* burn CPU cycles until our timeslice is up */
void cpu_spin(void);
@@ -412,9 +406,6 @@ void cpu_yield(void);
/* burn CPU cycles for a specific period of time */
void cpu_spinuntil_time(attotime duration);
-/* yield our timeslice for a specific period of time */
-void cpu_yielduntil_time(attotime duration);
-
/*************************************
diff --git a/src/emu/cpuint.c b/src/emu/cpuint.c
index 256801dafa0..2d9acfb0061 100644
--- a/src/emu/cpuint.c
+++ b/src/emu/cpuint.c
@@ -306,7 +306,7 @@ void cpunum_set_input_line_and_vector(int cpunum, int line, int state, int vecto
if (event_index >= MAX_INPUT_EVENTS)
{
input_event_index[cpunum][line]--;
- cpunum_empty_event_queue(Machine, cpunum | (line << 8));
+ cpunum_empty_event_queue(Machine, NULL, cpunum | (line << 8));
event_index = input_event_index[cpunum][line]++;
logerror("Exceeded pending input line event queue on CPU %d!\n", cpunum);
}
@@ -318,7 +318,7 @@ void cpunum_set_input_line_and_vector(int cpunum, int line, int state, int vecto
/* if this is the first one, set the timer */
if (event_index == 0)
- timer_call_after_resynch(cpunum | (line << 8), cpunum_empty_event_queue);
+ timer_call_after_resynch(NULL, cpunum | (line << 8), cpunum_empty_event_queue);
}
}
}
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index 803443c175d..81099acd348 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -530,7 +530,7 @@ void debug_halt_on_next_instruction(void)
void debug_refresh_display(void)
{
- video_frame_update();
+ video_frame_update(TRUE);
}
diff --git a/src/emu/driver.h b/src/emu/driver.h
index 797a6ca5895..7db71669c22 100644
--- a/src/emu/driver.h
+++ b/src/emu/driver.h
@@ -39,7 +39,6 @@
#define VIDEO_UPDATE(name) UINT32 video_update_##name(running_machine *machine, int screen, mame_bitmap *bitmap, const rectangle *cliprect)
/* NULL versions */
-#define driver_init_NULL NULL
#define nvram_handler_NULL NULL
#define memcard_handler_NULL NULL
#define machine_start_NULL NULL
@@ -162,7 +161,7 @@
#ifdef MESS
#define GAME_COMPUTER 0x8000 /* Driver is a computer (needs full keyboard) */
-#define GAME_COMPUTER_MODIFIED 0x0800 /* Official? Hack */
+#define GAME_COMPUTER_MODIFIED 0x4000 /* Official? Hack */
#endif
@@ -508,24 +507,10 @@ struct _game_driver
***************************************************************************/
#define GAME(YEAR,NAME,PARENT,MACHINE,INPUT,INIT,MONITOR,COMPANY,FULLNAME,FLAGS) \
-game_driver driver_##NAME = \
-{ \
- __FILE__, \
- #PARENT, \
- #NAME, \
- FULLNAME, \
- #YEAR, \
- COMPANY, \
- construct_##MACHINE, \
- ipt_##INPUT, \
- driver_init_##INIT, \
- rom_##NAME, \
- (MONITOR)|(FLAGS), \
- NULL \
-};
+ GAMEL(YEAR,NAME,PARENT,MACHINE,INPUT,INIT,MONITOR,COMPANY,FULLNAME,FLAGS,((const char *)0))
#define GAMEL(YEAR,NAME,PARENT,MACHINE,INPUT,INIT,MONITOR,COMPANY,FULLNAME,FLAGS,LAYOUT) \
-game_driver driver_##NAME = \
+const game_driver driver_##NAME = \
{ \
__FILE__, \
#PARENT, \
@@ -552,7 +537,7 @@ game_driver driver_##NAME = \
extern const game_driver * const drivers[];
-extern game_driver driver_empty;
+extern const game_driver driver_empty;
/***************************************************************************
diff --git a/src/emu/eigccppc.h b/src/emu/eigccppc.h
index 13b4deffe62..9e2e0273b56 100644
--- a/src/emu/eigccppc.h
+++ b/src/emu/eigccppc.h
@@ -23,7 +23,7 @@
multiply and return the full 64 bit result
-------------------------------------------------*/
-/* TBD */
+/* GCC can do a good job of this. */
/*-------------------------------------------------
@@ -32,7 +32,7 @@
result
-------------------------------------------------*/
-/* TBD */
+/* GCC can do a good job of this */
/*-------------------------------------------------
@@ -42,9 +42,10 @@
-------------------------------------------------*/
#define mul_32x32_hi _mul_32x32_hi
-INLINE INT32 _mul_32x32_hi(INT32 val1, INT32 val2)
+INLINE INT32 __attribute__((const, always_inline))
+_mul_32x32_hi(INT32 val1, INT32 val2)
{
- INT32 result;
+ register INT32 result;
__asm__ (
" mulhw %[result], %[val1], %[val2] \n"
@@ -64,9 +65,10 @@ INLINE INT32 _mul_32x32_hi(INT32 val1, INT32 val2)
-------------------------------------------------*/
#define mulu_32x32_hi _mulu_32x32_hi
-INLINE UINT32 _mulu_32x32_hi(UINT32 val1, UINT32 val2)
+INLINE UINT32 __attribute__((const, always_inline))
+_mulu_32x32_hi(UINT32 val1, UINT32 val2)
{
- UINT32 result;
+ register UINT32 result;
__asm__ (
" mulhwu %[result], %[val1], %[val2] \n"
@@ -88,10 +90,12 @@ INLINE UINT32 _mulu_32x32_hi(UINT32 val1, UINT32 val2)
#if !defined(__ppc64__) && !defined(__PPC64__) && !defined(_ARCH_PPC64)
#define mul_32x32_shift _mul_32x32_shift
-INLINE INT32 _mul_32x32_shift(INT32 val1, INT32 val2, UINT8 shift)
+INLINE INT32 __attribute__((const, always_inline))
+_mul_32x32_shift(INT32 val1, INT32 val2, UINT8 shift)
{
- INT32 result;
+ register INT32 result;
+ /* Valid for (0 <= shift <= 32) */
__asm__ (
" mullw %[result], %[val1], %[val2] \n"
" mulhw %[val1], %[val1], %[val2] \n"
@@ -120,10 +124,12 @@ INLINE INT32 _mul_32x32_shift(INT32 val1, INT32 val2, UINT8 shift)
#if !defined(__ppc64__) && !defined(__PPC64__) && !defined(_ARCH_PPC64)
#define mulu_32x32_shift _mulu_32x32_shift
-INLINE UINT32 _mulu_32x32_shift(UINT32 val1, UINT32 val2, UINT8 shift)
+INLINE UINT32 __attribute__((const, always_inline))
+_mulu_32x32_shift(UINT32 val1, UINT32 val2, UINT8 shift)
{
- UINT32 result;
+ register UINT32 result;
+ /* Valid for (0 <= shift <= 32) */
__asm__ (
" mullw %[result], %[val1], %[val2] \n"
" mulhwu %[val1], %[val1], %[val2] \n"
@@ -160,6 +166,24 @@ INLINE UINT32 _mulu_32x32_shift(UINT32 val1, UINT32 val2, UINT8 shift)
/*-------------------------------------------------
+ div_64x32_rem - perform a signed 64 bit x 32
+ bit divide and return the 32 bit quotient and
+ 32 bit remainder
+-------------------------------------------------*/
+
+/* TBD */
+
+
+/*-------------------------------------------------
+ divu_64x32_rem - perform an unsigned 64 bit x
+ 32 bit divide and return the 32 bit quotient
+ and 32 bit remainder
+-------------------------------------------------*/
+
+/* TBD */
+
+
+/*-------------------------------------------------
div_32x32_shift - perform a signed divide of
two 32 bit values, shifting the first before
division, and returning the 32 bit quotient
@@ -199,9 +223,10 @@ INLINE UINT32 _mulu_32x32_shift(UINT32 val1, UINT32 val2, UINT8 shift)
-------------------------------------------------*/
#define recip_approx _recip_approx
-INLINE float _recip_approx(float value)
+INLINE float __attribute__((const, always_inline))
+_recip_approx(float value)
{
- float result;
+ register float result;
__asm__ (
" fres %[result], %[value] \n"
@@ -224,9 +249,10 @@ INLINE float _recip_approx(float value)
-------------------------------------------------*/
#define count_leading_zeros _count_leading_zeros
-INLINE UINT8 _count_leading_zeros(UINT32 value)
+INLINE UINT8 __attribute__((const, always_inline))
+_count_leading_zeros(UINT32 value)
{
- UINT32 result;
+ register UINT32 result;
__asm__ (
" cntlzw %[result], %[value] \n"
@@ -244,9 +270,10 @@ INLINE UINT8 _count_leading_zeros(UINT32 value)
-------------------------------------------------*/
#define count_leading_ones _count_leading_ones
-INLINE UINT8 _count_leading_ones(UINT32 value)
+INLINE UINT8 __attribute__((const, always_inline))
+_count_leading_ones(UINT32 value)
{
- UINT32 result;
+ register UINT32 result;
__asm__ (
" not %[result], %[value] \n"
@@ -272,7 +299,8 @@ INLINE UINT8 _count_leading_ones(UINT32 value)
-------------------------------------------------*/
#define compare_exchange32 _compare_exchange32
-INLINE INT32 _compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 exchange)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 exchange)
{
register INT32 result;
@@ -284,11 +312,12 @@ INLINE INT32 _compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 excha
" stwcx. %[exchange], 0, %[ptr] \n"
" bne- 1b \n"
"2: "
- : [result] "=&r" (result)
- : [ptr] "r" (ptr)
- , [exchange] "r" (exchange)
- , [compare] "r" (compare)
- : "cr0"
+ : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */
+ , [result] "=&r" (result)
+ : [ptr] "r" (ptr)
+ , [exchange] "r" (exchange)
+ , [compare] "r" (compare)
+ : "cr0"
);
return result;
@@ -304,7 +333,8 @@ INLINE INT32 _compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 excha
#if defined(__ppc64__) || defined(__PPC64__)
#define compare_exchange64 _compare_exchange64
-INLINE INT64 _compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 exchange)
+INLINE INT64 __attribute__((nonnull(1), always_inline))
+_compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 exchange)
{
register INT64 result;
@@ -315,11 +345,12 @@ INLINE INT64 _compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 excha
" stdcx. %[exchange], 0, %[ptr] \n"
" bne-- 1b \n"
"2: "
- : [result] "=&r" (result)
- : [ptr] "r" (ptr)
- , [exchange] "r" (exchange)
- , [compare] "r" (compare)
- : "cr0"
+ : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */
+ , [result] "=&r" (result)
+ : [ptr] "r" (ptr)
+ , [exchange] "r" (exchange)
+ , [compare] "r" (compare)
+ : "cr0"
);
return result;
@@ -334,7 +365,8 @@ INLINE INT64 _compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 excha
-------------------------------------------------*/
#define atomic_exchange32 _atomic_exchange32
-INLINE INT32 _atomic_exchange32(INT32 volatile *ptr, INT32 exchange)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_atomic_exchange32(INT32 volatile *ptr, INT32 exchange)
{
register INT32 result;
@@ -343,10 +375,11 @@ INLINE INT32 _atomic_exchange32(INT32 volatile *ptr, INT32 exchange)
" sync \n"
" stwcx. %[exchange], 0, %[ptr] \n"
" bne- 1b \n"
- : [result] "=&r" (result)
- : [ptr] "r" (ptr)
- , [exchange] "r" (exchange)
- : "cr0"
+ : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */
+ , [result] "=&r" (result)
+ : [ptr] "r" (ptr)
+ , [exchange] "r" (exchange)
+ : "cr0"
);
return result;
@@ -360,7 +393,8 @@ INLINE INT32 _atomic_exchange32(INT32 volatile *ptr, INT32 exchange)
-------------------------------------------------*/
#define atomic_add32 _atomic_add32
-INLINE INT32 _atomic_add32(INT32 volatile *ptr, INT32 delta)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_atomic_add32(INT32 volatile *ptr, INT32 delta)
{
register INT32 result;
@@ -370,10 +404,11 @@ INLINE INT32 _atomic_add32(INT32 volatile *ptr, INT32 delta)
" sync \n"
" stwcx. %[result], 0, %[ptr] \n"
" bne- 1b \n"
- : [result] "=&b" (result)
- : [ptr] "r" (ptr)
- , [delta] "r" (delta)
- : "cr0"
+ : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */
+ , [result] "=&b" (result)
+ : [ptr] "r" (ptr)
+ , [delta] "r" (delta)
+ : "cr0"
);
return result;
@@ -387,7 +422,8 @@ INLINE INT32 _atomic_add32(INT32 volatile *ptr, INT32 delta)
-------------------------------------------------*/
#define atomic_increment32 _atomic_increment32
-INLINE INT32 _atomic_increment32(INT32 volatile *ptr)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_atomic_increment32(INT32 volatile *ptr)
{
register INT32 result;
@@ -397,7 +433,8 @@ INLINE INT32 _atomic_increment32(INT32 volatile *ptr)
" sync \n"
" stwcx. %[result], 0, %[ptr] \n"
" bne- 1b \n"
- : [result] "=&b" (result)
+ : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */
+ , [result] "=&b" (result)
: [ptr] "r" (ptr)
: "cr0"
);
@@ -413,7 +450,8 @@ INLINE INT32 _atomic_increment32(INT32 volatile *ptr)
-------------------------------------------------*/
#define atomic_decrement32 _atomic_decrement32
-INLINE INT32 _atomic_decrement32(INT32 volatile *ptr)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_atomic_decrement32(INT32 volatile *ptr)
{
register INT32 result;
@@ -423,7 +461,8 @@ INLINE INT32 _atomic_decrement32(INT32 volatile *ptr)
" sync \n"
" stwcx. %[result], 0, %[ptr] \n"
" bne- 1b \n"
- : [result] "=&b" (result)
+ : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */
+ , [result] "=&b" (result)
: [ptr] "r" (ptr)
: "cr0"
);
diff --git a/src/emu/eigccx86.h b/src/emu/eigccx86.h
index 75d6ed0074d..26c5c7ca2ef 100644
--- a/src/emu/eigccx86.h
+++ b/src/emu/eigccx86.h
@@ -33,9 +33,10 @@
#ifndef __x86_64__
#define mul_32x32 _mul_32x32
-INLINE INT64 _mul_32x32(INT32 a, INT32 b)
+INLINE INT64 __attribute__((const, always_inline))
+_mul_32x32(INT32 a, INT32 b)
{
- INT64 result;
+ register INT64 result;
__asm__ (
" imull %[b] ;"
@@ -58,9 +59,10 @@ INLINE INT64 _mul_32x32(INT32 a, INT32 b)
#ifndef __x86_64__
#define mulu_32x32 _mulu_32x32
-INLINE UINT64 _mulu_32x32(UINT32 a, UINT32 b)
+INLINE UINT64 __attribute__((const, always_inline))
+_mulu_32x32(UINT32 a, UINT32 b)
{
- UINT64 result;
+ register UINT64 result;
__asm__ (
" mull %[b] ;"
@@ -82,9 +84,10 @@ INLINE UINT64 _mulu_32x32(UINT32 a, UINT32 b)
-------------------------------------------------*/
#define mul_32x32_hi _mul_32x32_hi
-INLINE INT32 _mul_32x32_hi(INT32 a, INT32 b)
+INLINE INT32 __attribute__((const, always_inline))
+_mul_32x32_hi(INT32 a, INT32 b)
{
- INT32 result;
+ register INT32 result;
__asm__ (
" imull %[b] ;"
@@ -105,9 +108,10 @@ INLINE INT32 _mul_32x32_hi(INT32 a, INT32 b)
-------------------------------------------------*/
#define mulu_32x32_hi _mulu_32x32_hi
-INLINE UINT32 _mulu_32x32_hi(UINT32 a, UINT32 b)
+INLINE UINT32 __attribute__((const, always_inline))
+_mulu_32x32_hi(UINT32 a, UINT32 b)
{
- UINT32 result;
+ register UINT32 result;
__asm__ (
" mull %[b] ;"
@@ -130,10 +134,12 @@ INLINE UINT32 _mulu_32x32_hi(UINT32 a, UINT32 b)
#ifndef __x86_64__
#define mul_32x32_shift _mul_32x32_shift
-INLINE INT32 _mul_32x32_shift(INT32 a, INT32 b, UINT8 shift)
+INLINE INT32 __attribute__((const, always_inline))
+_mul_32x32_shift(INT32 a, INT32 b, UINT8 shift)
{
- INT32 result;
+ register INT32 result;
+ /* Valid for (0 <= shift <= 31) */
__asm__ (
" imull %[b] ;"
" shrdl %[shift], %%edx, %[result] ;"
@@ -158,10 +164,12 @@ INLINE INT32 _mul_32x32_shift(INT32 a, INT32 b, UINT8 shift)
#ifndef __x86_64__
#define mulu_32x32_shift _mulu_32x32_shift
-INLINE UINT32 _mulu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift)
+INLINE UINT32 __attribute__((const, always_inline))
+_mulu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift)
{
- UINT32 result;
+ register UINT32 result;
+ /* Valid for (0 <= shift <= 31) */
__asm__ (
" mull %[b] ;"
" shrdl %[shift], %%edx, %[result] ;"
@@ -184,10 +192,12 @@ INLINE UINT32 _mulu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift)
#ifndef __x86_64__
#define div_64x32 _div_64x32
-INLINE INT32 _div_64x32(INT64 a, INT32 b)
+INLINE INT32 __attribute__((const, always_inline))
+_div_64x32(INT64 a, INT32 b)
{
- INT32 result, temp;
+ register INT32 result, temp;
+ /* Throws arithmetic exception if result doesn't fit in 32 bits */
__asm__ (
" idivl %[b] ;"
: [result] "=a" (result) /* Result ends up in eax */
@@ -209,10 +219,12 @@ INLINE INT32 _div_64x32(INT64 a, INT32 b)
#ifndef __x86_64__
#define divu_64x32 _divu_64x32
-INLINE UINT32 _divu_64x32(UINT64 a, UINT32 b)
+INLINE UINT32 __attribute__((const, always_inline))
+_divu_64x32(UINT64 a, UINT32 b)
{
- UINT32 result, temp;
+ register UINT32 result, temp;
+ /* Throws arithmetic exception if result doesn't fit in 32 bits */
__asm__ (
" divl %[b] ;"
: [result] "=a" (result) /* Result ends up in eax */
@@ -235,10 +247,12 @@ INLINE UINT32 _divu_64x32(UINT64 a, UINT32 b)
#ifndef __x86_64__
#define div_64x32_rem _div_64x32_rem
-INLINE INT32 _div_64x32_rem(INT64 dividend, INT32 divisor, INT32 *remainder)
+INLINE INT32 __attribute__((always_inline))
+_div_64x32_rem(INT64 dividend, INT32 divisor, INT32 *remainder)
{
- INT32 quotient;
+ register INT32 quotient;
+ /* Throws arithmetic exception if result doesn't fit in 32 bits */
__asm__ (
" idivl %[divisor] ;"
: [result] "=a" (quotient) /* Quotient ends up in eax */
@@ -261,10 +275,12 @@ INLINE INT32 _div_64x32_rem(INT64 dividend, INT32 divisor, INT32 *remainder)
#ifndef __x86_64__
#define divu_64x32_rem _divu_64x32_rem
-INLINE UINT32 _divu_64x32_rem(UINT64 dividend, UINT32 divisor, UINT32 *remainder)
+INLINE UINT32 __attribute__((always_inline))
+_divu_64x32_rem(UINT64 dividend, UINT32 divisor, UINT32 *remainder)
{
- UINT32 quotient;
+ register UINT32 quotient;
+ /* Throws arithmetic exception if result doesn't fit in 32 bits */
__asm__ (
" divl %[divisor] ;"
: [result] "=a" (quotient) /* Quotient ends up in eax */
@@ -287,10 +303,13 @@ INLINE UINT32 _divu_64x32_rem(UINT64 dividend, UINT32 divisor, UINT32 *remainder
#ifndef __x86_64__
#define div_32x32_shift _div_32x32_shift
-INLINE INT32 _div_32x32_shift(INT32 a, INT32 b, UINT8 shift)
+INLINE INT32 __attribute__((const, always_inline))
+_div_32x32_shift(INT32 a, INT32 b, UINT8 shift)
{
- INT32 result;
+ register INT32 result;
+ /* Valid for (0 <= shift <= 31) */
+ /* Throws arithmetic exception if result doesn't fit in 32 bits */
__asm__ (
" cdq ;"
" shldl %[shift], %[a], %%edx ;"
@@ -316,10 +335,13 @@ INLINE INT32 _div_32x32_shift(INT32 a, INT32 b, UINT8 shift)
#ifndef __x86_64__
#define divu_32x32_shift _divu_32x32_shift
-INLINE UINT32 _divu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift)
+INLINE UINT32 __attribute__((const, always_inline))
+_divu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift)
{
- INT32 result;
+ register INT32 result;
+ /* Valid for (0 <= shift <= 31) */
+ /* Throws arithmetic exception if result doesn't fit in 32 bits */
__asm__ (
" clr %%edx ;"
" shldl %[shift], %[a], %%edx ;"
@@ -344,10 +366,12 @@ INLINE UINT32 _divu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift)
#ifndef __x86_64__
#define mod_64x32 _mod_64x32
-INLINE INT32 _mod_64x32(INT64 a, INT32 b)
+INLINE INT32 __attribute__((const, always_inline))
+_mod_64x32(INT64 a, INT32 b)
{
- INT32 result, temp;
+ register INT32 result, temp;
+ /* Throws arithmetic exception if quotient doesn't fit in 32 bits */
__asm__ (
" idivl %[b] ;"
: [result] "=d" (result) /* Result ends up in edx */
@@ -369,10 +393,12 @@ INLINE INT32 _mod_64x32(INT64 a, INT32 b)
#ifndef __x86_64__
#define modu_64x32 _modu_64x32
-INLINE UINT32 _modu_64x32(UINT64 a, UINT32 b)
+INLINE UINT32 __attribute__((const, always_inline))
+_modu_64x32(UINT64 a, UINT32 b)
{
- UINT32 result, temp;
+ register UINT32 result, temp;
+ /* Throws arithmetic exception if quotient doesn't fit in 32 bits */
__asm__ (
" divl %[b] ;"
: [result] "=d" (result) /* Result ends up in edx */
@@ -394,7 +420,8 @@ INLINE UINT32 _modu_64x32(UINT64 a, UINT32 b)
#ifdef __SSE2__
#define recip_approx _recip_approx
-INLINE float _recip_approx(float value)
+INLINE float __attribute__((const))
+_recip_approx(float value)
{
__m128 value_xmm = _mm_set_ss(value);
__m128 result_xmm = _mm_rcp_ss(value_xmm);
@@ -416,9 +443,10 @@ INLINE float _recip_approx(float value)
-------------------------------------------------*/
#define count_leading_zeros _count_leading_zeros
-INLINE UINT8 _count_leading_zeros(UINT32 value)
+INLINE UINT8 __attribute__((const, always_inline))
+_count_leading_zeros(UINT32 value)
{
- UINT32 result;
+ register UINT32 result;
__asm__ (
" bsrl %[value], %[result] ;"
@@ -440,9 +468,10 @@ INLINE UINT8 _count_leading_zeros(UINT32 value)
-------------------------------------------------*/
#define count_leading_ones _count_leading_ones
-INLINE UINT8 _count_leading_ones(UINT32 value)
+INLINE UINT8 __attribute__((const, always_inline))
+_count_leading_ones(UINT32 value)
{
- UINT32 result;
+ register UINT32 result;
__asm__ (
" movl %[value], %[result] ;"
@@ -473,12 +502,13 @@ INLINE UINT8 _count_leading_ones(UINT32 value)
-------------------------------------------------*/
#define compare_exchange32 _compare_exchange32
-INLINE INT32 _compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 exchange)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 exchange)
{
register INT32 result;
__asm__ __volatile__ (
- " lock ; cmpxchg %[exchange], %[ptr] ;"
+ " lock ; cmpxchgl %[exchange], %[ptr] ;"
: [ptr] "+m" (*ptr)
, [result] "=a" (result)
: [compare] "1" (compare)
@@ -499,12 +529,13 @@ INLINE INT32 _compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 excha
#ifdef __x86_64__
#define compare_exchange64 _compare_exchange64
-INLINE INT64 _compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 exchange)
+INLINE INT64 __attribute__((nonnull(1), always_inline))
+_compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 exchange)
{
register INT64 result;
__asm__ __volatile__ (
- " lock ; cmpxchg %[exchange], %[ptr] ;"
+ " lock ; cmpxchgq %[exchange], %[ptr] ;"
: [ptr] "+m" (*ptr)
, [result] "=a" (result)
: [compare] "1" (compare)
@@ -524,12 +555,13 @@ INLINE INT64 _compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 excha
-------------------------------------------------*/
#define atomic_exchange32 _atomic_exchange32
-INLINE INT32 _atomic_exchange32(INT32 volatile *ptr, INT32 exchange)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_atomic_exchange32(INT32 volatile *ptr, INT32 exchange)
{
register INT32 result;
__asm__ __volatile__ (
- " lock ; xchg %[exchange], %[ptr] ;"
+ " lock ; xchgl %[exchange], %[ptr] ;"
: [ptr] "+m" (*ptr)
, [result] "=r" (result)
: [exchange] "1" (exchange)
@@ -546,12 +578,13 @@ INLINE INT32 _atomic_exchange32(INT32 volatile *ptr, INT32 exchange)
-------------------------------------------------*/
#define atomic_add32 _atomic_add32
-INLINE INT32 _atomic_add32(INT32 volatile *ptr, INT32 delta)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_atomic_add32(INT32 volatile *ptr, INT32 delta)
{
register INT32 result = delta;
__asm__ __volatile__ (
- " lock ; xadd %[result], %[ptr] ;"
+ " lock ; xaddl %[result], %[ptr] ;"
: [ptr] "+m" (*ptr)
, [result] "+r" (result)
:
@@ -569,12 +602,13 @@ INLINE INT32 _atomic_add32(INT32 volatile *ptr, INT32 delta)
-------------------------------------------------*/
#define atomic_increment32 _atomic_increment32
-INLINE INT32 _atomic_increment32(INT32 volatile *ptr)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_atomic_increment32(INT32 volatile *ptr)
{
register INT32 result = 1;
__asm__ __volatile__ (
- " lock ; xadd %[result], %[ptr] ;"
+ " lock ; xaddl %[result], %[ptr] ;"
: [ptr] "+m" (*ptr)
, [result] "+r" (result)
:
@@ -592,12 +626,13 @@ INLINE INT32 _atomic_increment32(INT32 volatile *ptr)
-------------------------------------------------*/
#define atomic_decrement32 _atomic_decrement32
-INLINE INT32 _atomic_decrement32(INT32 volatile *ptr)
+INLINE INT32 __attribute__((nonnull(1), always_inline))
+_atomic_decrement32(INT32 volatile *ptr)
{
register INT32 result = -1;
__asm__ __volatile__ (
- " lock ; xadd %[result], %[ptr] ;"
+ " lock ; xaddl %[result], %[ptr] ;"
: [ptr] "+m" (*ptr)
, [result] "+r" (result)
:
diff --git a/src/emu/machine/6522via.c b/src/emu/machine/6522via.c
index 21a067d8d3b..3e7964a62da 100644
--- a/src/emu/machine/6522via.c
+++ b/src/emu/machine/6522via.c
@@ -251,7 +251,7 @@ static void via_shift(int which)
v->shift_counter = (v->shift_counter + 1) % 8;
if (v->shift_counter)
- timer_set(v_cycles_to_time(v, 2), which, via_shift_callback);
+ timer_set(v_cycles_to_time(v, 2), NULL, which, via_shift_callback);
else
{
if (!(v->ifr & INT_SR))
@@ -365,9 +365,9 @@ void via_reset(void)
v.time2 = via[i].time2;
v.clock = via[i].clock;
- v.t1 = timer_alloc(via_t1_timeout);
+ v.t1 = timer_alloc(via_t1_timeout, NULL);
v.t1_active = 0;
- v.t2 = timer_alloc(via_t2_timeout);
+ v.t2 = timer_alloc(via_t2_timeout, NULL);
v.t2_active = 0;
via[i] = v;
@@ -524,7 +524,7 @@ int via_read(int which, int offset)
if (SO_O2_CONTROL(v->acr))
{
v->shift_counter=0;
- timer_set(v_cycles_to_time(v, 2), which,via_shift_callback);
+ timer_set(v_cycles_to_time(v, 2), NULL, which,via_shift_callback);
}
break;
@@ -754,7 +754,7 @@ void via_write(int which, int offset, int data)
via_clear_int(which, INT_SR);
if (SO_O2_CONTROL(v->acr))
{
- timer_set(v_cycles_to_time(v, 2), which,via_shift_callback);
+ timer_set(v_cycles_to_time(v, 2), NULL, which, via_shift_callback);
}
break;
diff --git a/src/emu/machine/6526cia.c b/src/emu/machine/6526cia.c
index 0b3e1af3af2..23729e413a8 100644
--- a/src/emu/machine/6526cia.c
+++ b/src/emu/machine/6526cia.c
@@ -117,7 +117,7 @@ static cia_state cia_array[2];
*
*************************************/
-static TIMER_CALLBACK_PTR( cia_timer_proc );
+static TIMER_CALLBACK( cia_timer_proc );
static void cia_timer_underflow(cia_state *cia, int timer);
static TIMER_CALLBACK( cia_clock_tod_callback );
@@ -171,14 +171,14 @@ void cia_config(int which, const cia6526_interface *intf)
for (t = 0; t < (sizeof(cia->timer) / sizeof(cia->timer[0])); t++)
{
cia_timer *timer = &cia->timer[t];
- timer->timer = timer_alloc_ptr(cia_timer_proc, timer);
+ timer->timer = timer_alloc(cia_timer_proc, timer);
timer->cia = cia;
timer->irq = 0x01 << t;
}
/* setup TOD timer, if appropriate */
if (intf->tod_clock)
- timer_pulse(ATTOTIME_IN_HZ(intf->tod_clock), which, cia_clock_tod_callback);
+ timer_pulse(ATTOTIME_IN_HZ(intf->tod_clock), NULL, which, cia_clock_tod_callback);
/* special case; for the first CIA, set up an exit handler to clear things out */
if (which == 0)
@@ -323,12 +323,12 @@ static void cia_timer_update(cia_timer *timer, INT32 new_count)
{
/* timer is on and is connected to clock */
attotime period = attotime_mul(ATTOTIME_IN_HZ(timer->cia->clock), (timer->count ? timer->count : 0x10000));
- timer_adjust_ptr(timer->timer, period, attotime_zero);
+ timer_adjust(timer->timer, period, 0, attotime_zero);
}
else
{
/* timer is off or not connected to clock */
- timer_adjust_ptr(timer->timer, attotime_never, attotime_zero);
+ timer_adjust(timer->timer, attotime_never, 0, attotime_zero);
}
}
@@ -401,9 +401,9 @@ static void cia_timer_underflow(cia_state *cia, int timer)
}
-static TIMER_CALLBACK_PTR( cia_timer_proc )
+static TIMER_CALLBACK( cia_timer_proc )
{
- cia_timer *timer = param;
+ cia_timer *timer = ptr;
cia_state *cia = timer->cia;
cia_timer_underflow(cia, timer - cia->timer);
diff --git a/src/emu/machine/6532riot.c b/src/emu/machine/6532riot.c
index 42abec15464..855d1f1ec97 100644
--- a/src/emu/machine/6532riot.c
+++ b/src/emu/machine/6532riot.c
@@ -286,7 +286,7 @@ void r6532_reset(int which)
r6532[which].shift = 10;
- r6532[which].counter_timer = timer_alloc(r6532_irq_timer_callback);
+ r6532[which].counter_timer = timer_alloc(r6532_irq_timer_callback, NULL);
r6532_set_timer( which, 0xFF );
diff --git a/src/emu/machine/6840ptm.c b/src/emu/machine/6840ptm.c
index 8fff877fdcf..4a0492afb68 100644
--- a/src/emu/machine/6840ptm.c
+++ b/src/emu/machine/6840ptm.c
@@ -355,9 +355,9 @@ void ptm6840_config(int which, const ptm6840_interface *intf)
}
}
- ptm[which].timer[0] = timer_alloc(ptm6840_t1_timeout);
- ptm[which].timer[1] = timer_alloc(ptm6840_t2_timeout);
- ptm[which].timer[2] = timer_alloc(ptm6840_t3_timeout);
+ ptm[which].timer[0] = timer_alloc(ptm6840_t1_timeout, NULL);
+ ptm[which].timer[1] = timer_alloc(ptm6840_t2_timeout, NULL);
+ ptm[which].timer[2] = timer_alloc(ptm6840_t3_timeout, NULL);
for (i = 0; i < 3; i++)
timer_enable(ptm[which].timer[i], FALSE);
diff --git a/src/emu/machine/6850acia.c b/src/emu/machine/6850acia.c
index 17686e96020..3f3e9b51ea3 100644
--- a/src/emu/machine/6850acia.c
+++ b/src/emu/machine/6850acia.c
@@ -168,8 +168,8 @@ void acia6850_config(int which, const struct acia6850_interface *intf)
acia_p->cts_pin = intf->cts_pin;
acia_p->rts_pin = intf->rts_pin;
acia_p->dcd_pin = intf->dcd_pin;
- acia_p->rx_timer = timer_alloc(receive_event);
- acia_p->tx_timer = timer_alloc(transmit_event);
+ acia_p->rx_timer = timer_alloc(receive_event, NULL);
+ acia_p->tx_timer = timer_alloc(transmit_event, NULL);
acia_p->int_callback = intf->int_callback;
acia_p->first_reset = 1;
acia_p->status_read = 0;
diff --git a/src/emu/machine/74123.c b/src/emu/machine/74123.c
index c6199233665..bc7f1f2cc2d 100644
--- a/src/emu/machine/74123.c
+++ b/src/emu/machine/74123.c
@@ -75,9 +75,9 @@ static void set_output(TTL74123_state *chip)
}
-static TIMER_CALLBACK_PTR( clear_callback )
+static TIMER_CALLBACK( clear_callback )
{
- TTL74123_state *chip = param;
+ TTL74123_state *chip = ptr;
set_output(chip);
}
@@ -96,7 +96,7 @@ void TTL74123_config(int which, const TTL74123_interface *intf)
chip->intf = intf;
chip->which = which;
- chip->timer = timer_alloc_ptr(clear_callback, chip);
+ chip->timer = timer_alloc(clear_callback, chip);
/* start with the defaults */
chip->A = intf->A;
@@ -129,7 +129,7 @@ static void start_pulse(TTL74123_state *chip)
if (attotime_compare(timer_timeelapsed(chip->timer), delay_time) >= 0)
{
- timer_adjust_ptr(chip->timer, duration, attotime_never);
+ timer_adjust(chip->timer, duration, 0, attotime_never);
if (LOG) logerror("74123 #%d: Retriggering pulse. Duration: %f\n", chip->which, attotime_to_double(duration));
}
@@ -141,7 +141,7 @@ static void start_pulse(TTL74123_state *chip)
else
{
/* starting */
- timer_adjust_ptr(chip->timer, duration, attotime_never);
+ timer_adjust(chip->timer, duration, 0, attotime_never);
set_output(chip);
@@ -181,7 +181,7 @@ void TTL74123_clear_w(int which, int data)
/* clear the output if A=LO, B=HI and falling edge on clear */
if (!data && chip->clear && chip->B && !chip->A && !chip->clear)
{
- timer_adjust_ptr(chip->timer, attotime_zero, attotime_never);
+ timer_adjust(chip->timer, attotime_zero, 0, attotime_never);
if (LOG) logerror("74123 #%d: Cleared\n", which);
}
diff --git a/src/emu/machine/8042kbdc.c b/src/emu/machine/8042kbdc.c
index 392acbe7c9a..bb8b3555ab1 100644
--- a/src/emu/machine/8042kbdc.c
+++ b/src/emu/machine/8042kbdc.c
@@ -275,7 +275,7 @@ void kbdc8042_init(const struct kbdc8042_interface *intf)
kbdc8042.inport = 0xa0;
at_8042_set_outport(0xfe, 1);
- timer_pulse(ATTOTIME_IN_HZ(60), 0, kbdc8042_time);
+ timer_pulse(ATTOTIME_IN_HZ(60), NULL, 0, kbdc8042_time);
}
static void at_8042_receive(UINT8 data)
diff --git a/src/emu/machine/8237dma.c b/src/emu/machine/8237dma.c
index 12303219ba9..43b092d3030 100644
--- a/src/emu/machine/8237dma.c
+++ b/src/emu/machine/8237dma.c
@@ -75,8 +75,8 @@ int dma8237_init(int count)
for (which = 0; which < dma_count; which++)
{
dma[which].status = 0x0F;
- dma[which].timer = timer_alloc(dma8237_timerproc);
- dma[which].msbflip_timer = timer_alloc(dma8237_msbflip_timerproc);
+ dma[which].timer = timer_alloc(dma8237_timerproc, NULL);
+ dma[which].msbflip_timer = timer_alloc(dma8237_msbflip_timerproc, NULL);
dma[which].eop = 1;
}
return 0;
@@ -406,7 +406,7 @@ void dma8237_drq_write(int which, int channel, int state)
int param;
param = (which << 3) | (channel << 1) | (state ? 1 : 0);
- //timer_call_after_resynch(param, dma8237_drq_write_callback);
+ //timer_call_after_resynch(NULL, param, dma8237_drq_write_callback);
dma8237_drq_write_callback(param);
}
diff --git a/src/emu/machine/am53cf96.c b/src/emu/machine/am53cf96.c
index a902508eb89..9e5467138f7 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( ATTOTIME_IN_HZ( 16384 ), 0, am53cf96_irq );
+ timer_set( ATTOTIME_IN_HZ( 16384 ), NULL, 0, am53cf96_irq );
break;
case 0x42: // select with ATN steps
- timer_set( ATTOTIME_IN_HZ( 16384 ), 0, am53cf96_irq );
+ timer_set( ATTOTIME_IN_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( ATTOTIME_IN_HZ( 16384 ), 0, am53cf96_irq );
+ timer_set( ATTOTIME_IN_HZ( 16384 ), NULL, 0, am53cf96_irq );
scsi_regs[REG_INTSTATE] = 6; // command sent OK
break;
default:
diff --git a/src/emu/machine/ds2401.c b/src/emu/machine/ds2401.c
index baa987a7e19..cd3ebd52274 100644
--- a/src/emu/machine/ds2401.c
+++ b/src/emu/machine/ds2401.c
@@ -168,8 +168,8 @@ void ds2401_init( int which, UINT8 *data )
state_save_register_item( "ds2401", which, c->tx );
state_save_register_item_pointer( "ds2401", which, data, SIZE_DATA );
- c->timer = timer_alloc( ds2401_tick );
- c->reset_timer = timer_alloc( ds2401_reset );
+ c->timer = timer_alloc( ds2401_tick , NULL);
+ c->reset_timer = timer_alloc( ds2401_reset , NULL);
}
void ds2401_write( int which, int data )
diff --git a/src/emu/machine/ds2404.c b/src/emu/machine/ds2404.c
index fb4fc09696e..bc40ff9d88e 100644
--- a/src/emu/machine/ds2404.c
+++ b/src/emu/machine/ds2404.c
@@ -305,7 +305,7 @@ void DS2404_init(int ref_year, int ref_month, int ref_day)
ds2404.rtc[ 3 ] = ( current_time >> 16 ) & 0xff;
ds2404.rtc[ 4 ] = ( current_time >> 24 ) & 0xff;
- timer = timer_alloc( DS2404_tick );
+ timer = timer_alloc( DS2404_tick , NULL);
timer_adjust( timer, ATTOTIME_IN_HZ( 256 ), 0, ATTOTIME_IN_HZ( 256 ) );
}
diff --git a/src/emu/machine/generic.c b/src/emu/machine/generic.c
index 45643b36b11..3b87a3a9229 100644
--- a/src/emu/machine/generic.c
+++ b/src/emu/machine/generic.c
@@ -578,7 +578,7 @@ void cpu_interrupt_enable(int cpunum, int enabled)
/* make sure there are no queued interrupts */
if (enabled == 0)
- timer_call_after_resynch(cpunum, clear_all_lines);
+ timer_call_after_resynch(NULL, cpunum, clear_all_lines);
}
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c
index e965186b0ab..bd08522cdfc 100644
--- a/src/emu/machine/idectrl.c
+++ b/src/emu/machine/idectrl.c
@@ -186,13 +186,13 @@ static struct ide_state idestate[MAX_IDE_CONTROLLERS];
*
*************************************/
-static TIMER_CALLBACK_PTR( reset_callback );
+static TIMER_CALLBACK( reset_callback );
static void ide_build_features(struct ide_state *ide);
static void continue_read(struct ide_state *ide);
static void read_sector_done(struct ide_state *ide);
-static TIMER_CALLBACK_PTR( read_sector_done_callback );
+static TIMER_CALLBACK( read_sector_done_callback );
static void read_first_sector(struct ide_state *ide);
static void read_next_sector(struct ide_state *ide);
@@ -237,17 +237,17 @@ INLINE void clear_interrupt(struct ide_state *ide)
*
*************************************/
-static TIMER_CALLBACK_PTR( delayed_interrupt )
+static TIMER_CALLBACK( delayed_interrupt )
{
- struct ide_state *ide = param;
+ struct ide_state *ide = ptr;
ide->status &= ~IDE_STATUS_BUSY;
signal_interrupt(ide);
}
-static TIMER_CALLBACK_PTR( delayed_interrupt_buffer_ready )
+static TIMER_CALLBACK( delayed_interrupt_buffer_ready )
{
- struct ide_state *ide = param;
+ struct ide_state *ide = ptr;
ide->status &= ~IDE_STATUS_BUSY;
ide->status |= IDE_STATUS_BUFFER_READY;
signal_interrupt(ide);
@@ -262,9 +262,9 @@ INLINE void signal_delayed_interrupt(struct ide_state *ide, attotime time, int b
/* set a timer */
if (buffer_ready)
- timer_set_ptr(time, ide, delayed_interrupt_buffer_ready);
+ timer_set(time, ide, 0, delayed_interrupt_buffer_ready);
else
- timer_set_ptr(time, ide, delayed_interrupt);
+ timer_set(time, ide, 0, delayed_interrupt);
}
@@ -328,8 +328,8 @@ int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *
ide_build_features(ide);
/* create a timer for timing status */
- ide->last_status_timer = timer_alloc(NULL);
- ide->reset_timer = timer_alloc_ptr(reset_callback, ide);
+ ide->last_status_timer = timer_alloc(NULL, NULL);
+ ide->reset_timer = timer_alloc(reset_callback, ide);
/* register ide status */
state_save_register_item("ide", which, ide->adapter_control);
@@ -432,9 +432,9 @@ void ide_set_user_password(int which, UINT8 *password)
}
-static TIMER_CALLBACK_PTR( reset_callback )
+static TIMER_CALLBACK( reset_callback )
{
- ide_controller_reset_ptr(param);
+ ide_controller_reset_ptr(ptr);
}
@@ -736,9 +736,9 @@ static void ide_build_features(struct ide_state *ide)
*
*************************************/
-static TIMER_CALLBACK_PTR( security_error_done )
+static TIMER_CALLBACK( security_error_done )
{
- struct ide_state *ide = param;
+ struct ide_state *ide = ptr;
/* clear error state */
ide->status &= ~IDE_STATUS_ERROR;
@@ -752,7 +752,7 @@ static void security_error(struct ide_state *ide)
ide->status &= ~IDE_STATUS_DRIVE_READY;
/* just set a timer and mark ourselves error */
- timer_set_ptr(TIME_SECURITY_ERROR, ide, security_error_done);
+ timer_set(TIME_SECURITY_ERROR, ide, 0, security_error_done);
}
@@ -904,9 +904,9 @@ static void read_sector_done(struct ide_state *ide)
}
-static TIMER_CALLBACK_PTR( read_sector_done_callback )
+static TIMER_CALLBACK( read_sector_done_callback )
{
- read_sector_done(param);
+ read_sector_done(ptr);
}
@@ -927,10 +927,10 @@ static void read_first_sector(struct ide_state *ide)
seek_time = TIME_SEEK_MULTISECTOR;
ide->cur_lba = new_lba;
- timer_set_ptr(seek_time, ide, read_sector_done_callback);
+ timer_set(seek_time, ide, 0, read_sector_done_callback);
}
else
- timer_set_ptr(TIME_PER_SECTOR, ide, read_sector_done_callback);
+ timer_set(TIME_PER_SECTOR, ide, 0, read_sector_done_callback);
}
@@ -946,11 +946,11 @@ static void read_next_sector(struct ide_state *ide)
read_sector_done(ide);
else
/* just set a timer */
- timer_set_ptr(ATTOTIME_IN_USEC(1), ide, read_sector_done_callback);
+ timer_set(ATTOTIME_IN_USEC(1), ide, 0, read_sector_done_callback);
}
else
/* just set a timer */
- timer_set_ptr(TIME_PER_SECTOR, ide, read_sector_done_callback);
+ timer_set(TIME_PER_SECTOR, ide, 0, read_sector_done_callback);
}
@@ -962,7 +962,7 @@ static void read_next_sector(struct ide_state *ide)
*************************************/
static void write_sector_done(struct ide_state *ide);
-static TIMER_CALLBACK_PTR( write_sector_done_callback );
+static TIMER_CALLBACK( write_sector_done_callback );
static void continue_write(struct ide_state *ide)
{
@@ -983,13 +983,13 @@ static void continue_write(struct ide_state *ide)
else
{
/* set a timer to do the write */
- timer_set_ptr(TIME_PER_SECTOR, ide, write_sector_done_callback);
+ timer_set(TIME_PER_SECTOR, ide, 0, write_sector_done_callback);
}
}
else
{
/* set a timer to do the write */
- timer_set_ptr(TIME_PER_SECTOR, ide, write_sector_done_callback);
+ timer_set(TIME_PER_SECTOR, ide, 0, write_sector_done_callback);
}
}
@@ -1106,9 +1106,9 @@ static void write_sector_done(struct ide_state *ide)
}
-static TIMER_CALLBACK_PTR( write_sector_done_callback )
+static TIMER_CALLBACK( write_sector_done_callback )
{
- write_sector_done(param);
+ write_sector_done(ptr);
}
@@ -1563,7 +1563,7 @@ static void ide_controller_write(struct ide_state *ide, offs_t offset, int size,
{
ide->status |= IDE_STATUS_BUSY;
ide->status &= ~IDE_STATUS_DRIVE_READY;
- timer_adjust_ptr(ide->reset_timer, ATTOTIME_IN_MSEC(5), attotime_zero);
+ timer_adjust(ide->reset_timer, ATTOTIME_IN_MSEC(5), 0, attotime_zero);
}
break;
}
diff --git a/src/emu/machine/intelfsh.c b/src/emu/machine/intelfsh.c
index 54b894cb5d7..bead65aac67 100644
--- a/src/emu/machine/intelfsh.c
+++ b/src/emu/machine/intelfsh.c
@@ -48,9 +48,9 @@ struct flash_chip
static struct flash_chip chips[FLASH_CHIPS_MAX];
-static TIMER_CALLBACK_PTR( erase_finished )
+static TIMER_CALLBACK( erase_finished )
{
- struct flash_chip *c = param;
+ struct flash_chip *c = ptr;
switch( c->flash_mode )
{
@@ -131,7 +131,7 @@ void intelflash_init(int chip, int type, void *data)
c->status = 0x80;
c->flash_mode = FM_NORMAL;
c->flash_master_lock = 0;
- c->timer = timer_alloc_ptr(erase_finished, c);
+ c->timer = timer_alloc(erase_finished, c);
c->flash_memory = data;
state_save_register_item( "intelfsh", chip, c->status );
@@ -335,7 +335,7 @@ void intelflash_write(int chip, UINT32 address, UINT32 data)
c->status = 1 << 3;
c->flash_mode = FM_ERASEAMD4;
- timer_adjust_ptr( c->timer, ATTOTIME_IN_SEC( 17 ), attotime_zero );
+ timer_adjust( c->timer, ATTOTIME_IN_SEC( 17 ), 0, attotime_zero );
}
else if( ( data & 0xff ) == 0x30 )
{
@@ -360,7 +360,7 @@ void intelflash_write(int chip, UINT32 address, UINT32 data)
c->status = 1 << 3;
c->flash_mode = FM_ERASEAMD4;
- timer_adjust_ptr( c->timer, ATTOTIME_IN_SEC( 1 ), attotime_zero );
+ timer_adjust( c->timer, ATTOTIME_IN_SEC( 1 ), 0, attotime_zero );
}
else
{
@@ -429,7 +429,7 @@ void intelflash_write(int chip, UINT32 address, UINT32 data)
c->status = 0x00;
c->flash_mode = FM_READSTATUS;
- timer_adjust_ptr( c->timer, ATTOTIME_IN_SEC( 1 ), attotime_zero );
+ timer_adjust( c->timer, ATTOTIME_IN_SEC( 1 ), 0, attotime_zero );
break;
}
else
diff --git a/src/emu/machine/mb3773.c b/src/emu/machine/mb3773.c
index be0d5d7e6cd..e94217ad624 100644
--- a/src/emu/machine/mb3773.c
+++ b/src/emu/machine/mb3773.c
@@ -33,7 +33,7 @@ void mb3773_set_ck( UINT8 new_ck )
void mb3773_init( void )
{
- watchdog_timer = timer_alloc( watchdog_timeout );
+ watchdog_timer = timer_alloc( watchdog_timeout , NULL);
reset_timer();
state_save_register_global( ck );
}
diff --git a/src/emu/machine/mc146818.c b/src/emu/machine/mc146818.c
index eaf2cc98773..b8390bbb788 100644
--- a/src/emu/machine/mc146818.c
+++ b/src/emu/machine/mc146818.c
@@ -201,7 +201,7 @@ void mc146818_init(MC146818_TYPE type)
memset(mc146818, 0, sizeof(*mc146818));
mc146818->type = type;
mc146818->last_refresh = timer_get_time();
- timer_pulse(ATTOTIME_IN_HZ(1), 0, mc146818_timer);
+ timer_pulse(ATTOTIME_IN_HZ(1), NULL, 0, mc146818_timer);
mc146818_set_base_datetime();
}
diff --git a/src/emu/machine/pc16552d.c b/src/emu/machine/pc16552d.c
index 85159a51b69..ef3fb180c10 100644
--- a/src/emu/machine/pc16552d.c
+++ b/src/emu/machine/pc16552d.c
@@ -394,10 +394,10 @@ void pc16552d_init(int chip, int frequency, void (* irq_handler)(int channel, in
duart[chip].ch[1].pending_interrupt = 0;
// allocate transmit timers
- duart[chip].ch[0].tx_fifo_timer = timer_alloc(tx_fifo_timer_callback);
+ duart[chip].ch[0].tx_fifo_timer = timer_alloc(tx_fifo_timer_callback, NULL);
timer_adjust(duart[chip].ch[0].tx_fifo_timer, attotime_never, (chip * 2) + 0, attotime_never);
- duart[chip].ch[1].tx_fifo_timer = timer_alloc(tx_fifo_timer_callback);
+ duart[chip].ch[1].tx_fifo_timer = timer_alloc(tx_fifo_timer_callback, NULL);
timer_adjust(duart[chip].ch[1].tx_fifo_timer, attotime_never, (chip * 2) + 1, attotime_never);
}
diff --git a/src/emu/machine/pic8259.c b/src/emu/machine/pic8259.c
index 7630404491a..5b6637548bf 100644
--- a/src/emu/machine/pic8259.c
+++ b/src/emu/machine/pic8259.c
@@ -81,7 +81,7 @@ int pic8259_init(int count, void (*set_int_line)(int which, int interrupt))
for (i = 0; i < count; i++)
{
- pic[i].timer = timer_alloc(pic8259_timerproc);
+ pic[i].timer = timer_alloc(pic8259_timerproc, NULL);
pic[i].set_int_line = set_int_line;
}
diff --git a/src/emu/machine/pit8253.c b/src/emu/machine/pit8253.c
index 4499d66d3c6..dd0967dc626 100644
--- a/src/emu/machine/pit8253.c
+++ b/src/emu/machine/pit8253.c
@@ -781,14 +781,14 @@ int pit8253_init(int count, const struct pit8253_config *config)
timer->outputtimer = NULL;
else
{
- timer->outputtimer = timer_alloc(outputcallback);
+ timer->outputtimer = timer_alloc(outputcallback, NULL);
timer_adjust(timer->outputtimer, attotime_never, i | (timerno<<4), attotime_zero);
}
if (timer->freq_callback == NULL)
timer->freqtimer = NULL;
else
{
- timer->freqtimer = timer_alloc(freqcallback);
+ timer->freqtimer = timer_alloc(freqcallback, NULL);
timer_adjust(timer->freqtimer, attotime_never, i | (timerno<<4), attotime_zero);
}
diff --git a/src/emu/machine/rtc65271.c b/src/emu/machine/rtc65271.c
index 5352a91c6d5..dd5374bd981 100644
--- a/src/emu/machine/rtc65271.c
+++ b/src/emu/machine/rtc65271.c
@@ -316,9 +316,9 @@ void rtc65271_init(UINT8 *xram, void (*interrupt_callback)(int state))
rtc.xram = xram;
- rtc.update_timer = timer_alloc(rtc_begin_update_callback);
+ rtc.update_timer = timer_alloc(rtc_begin_update_callback, NULL);
timer_adjust(rtc.update_timer, ATTOTIME_IN_SEC(1), 0, ATTOTIME_IN_SEC(1));
- rtc.SQW_timer = timer_alloc(rtc_SQW_callback);
+ rtc.SQW_timer = timer_alloc(rtc_SQW_callback, NULL);
rtc.interrupt_callback = interrupt_callback;
}
@@ -501,7 +501,7 @@ static TIMER_CALLBACK( rtc_begin_update_callback )
rtc.regs[reg_A] |= reg_A_UIP;
/* schedule end of update cycle */
- timer_set(UPDATE_CYCLE_TIME, 0, rtc_end_update_callback);
+ timer_set(UPDATE_CYCLE_TIME, NULL, 0, rtc_end_update_callback);
}
}
diff --git a/src/emu/machine/timekpr.c b/src/emu/machine/timekpr.c
index 125ac7308a6..b54b2d22441 100644
--- a/src/emu/machine/timekpr.c
+++ b/src/emu/machine/timekpr.c
@@ -34,7 +34,7 @@ struct timekeeper_chip
int offset_flags;
};
-struct timekeeper_chip timekeeper[ MAX_TIMEKEEPER_CHIPS ];
+static struct timekeeper_chip timekeeper[ MAX_TIMEKEEPER_CHIPS ];
#define MASK_SECONDS ( 0x7f )
#define MASK_MINUTES ( 0x7f )
@@ -139,9 +139,9 @@ static void counters_from_ram( int chip )
c->century = counter_from_ram( c->data, c->offset_century );
}
-static TIMER_CALLBACK_PTR( timekeeper_tick )
+static TIMER_CALLBACK( timekeeper_tick )
{
- struct timekeeper_chip *c = param;
+ struct timekeeper_chip *c = ptr;
int carry;
@@ -300,9 +300,9 @@ void timekeeper_init( int chip, int type, UINT8 *data )
state_save_register_item( "timekeeper", chip, c->century );
state_save_register_item_pointer( "timekeeper", chip, c->data, c->size );
- timer = timer_alloc_ptr( timekeeper_tick, c );
+ timer = timer_alloc( timekeeper_tick, c );
duration = ATTOTIME_IN_SEC(1);
- timer_adjust_ptr( timer, duration, duration );
+ timer_adjust( timer, duration, 0, duration );
}
static void timekeeper_nvram( int chip, mame_file *file, int read_or_write )
diff --git a/src/emu/machine/tmp68301.c b/src/emu/machine/tmp68301.c
index e00a6e30bdb..74633ae8452 100644
--- a/src/emu/machine/tmp68301.c
+++ b/src/emu/machine/tmp68301.c
@@ -110,7 +110,7 @@ MACHINE_RESET( tmp68301 )
{
int i;
for (i = 0; i < 3; i++)
- tmp68301_timer[i] = timer_alloc(tmp68301_timer_callback);
+ tmp68301_timer[i] = timer_alloc(tmp68301_timer_callback, NULL);
for (i = 0; i < 3; i++)
tmp68301_IE[i] = 0;
diff --git a/src/emu/machine/upd4701.c b/src/emu/machine/upd4701.c
index 591561913dc..9acd21e232e 100644
--- a/src/emu/machine/upd4701.c
+++ b/src/emu/machine/upd4701.c
@@ -26,7 +26,7 @@ struct uPD4701_chip
int cf;
};
-struct uPD4701_chip uPD4701[ UPD4701_MAXCHIP ];
+static struct uPD4701_chip uPD4701[ UPD4701_MAXCHIP ];
#define MASK_SWITCHES ( 7 )
#define MASK_COUNTER ( 0xfff )
diff --git a/src/emu/machine/wd33c93.c b/src/emu/machine/wd33c93.c
index 6aab9dcab00..9fa3bb408ae 100644
--- a/src/emu/machine/wd33c93.c
+++ b/src/emu/machine/wd33c93.c
@@ -351,7 +351,7 @@ static void wd33c93_select_cmd( void )
}
/* queue up a service request out in the future */
- timer_set( ATTOTIME_IN_USEC(50), 0, wd33c93_service_request );
+ timer_set( ATTOTIME_IN_USEC(50), NULL, 0, wd33c93_service_request );
}
else
{
@@ -423,7 +423,7 @@ static void wd33c93_selectxfer_cmd( void )
scsi_data.busphase = PHS_MESS_IN;
/* queue up a service request out in the future */
- timer_set( ATTOTIME_IN_MSEC(50), 0, wd33c93_service_request );
+ timer_set( ATTOTIME_IN_MSEC(50), NULL, 0, wd33c93_service_request );
}
}
else
@@ -453,7 +453,7 @@ static void wd33c93_xferinfo_cmd( void )
scsi_data.regs[WD_AUXILIARY_STATUS] |= ASR_CIP;
/* the command will be completed once the data is transferred */
- timer_set( ATTOTIME_IN_MSEC(1), 0, wd33c93_deassert_cip );
+ timer_set( ATTOTIME_IN_MSEC(1), NULL, 0, wd33c93_deassert_cip );
}
/* Command handlers */
@@ -802,7 +802,7 @@ extern void wd33c93_init( struct WD33C93interface *interface )
}
/* allocate a timer for commands */
- scsi_data.cmd_timer = timer_alloc(wd33c93_complete_cb);
+ scsi_data.cmd_timer = timer_alloc(wd33c93_complete_cb, NULL);
scsi_data.temp_input = auto_malloc( TEMP_INPUT_LEN );
diff --git a/src/emu/machine/x76f041.c b/src/emu/machine/x76f041.c
index e277e06f676..62c3921f03e 100644
--- a/src/emu/machine/x76f041.c
+++ b/src/emu/machine/x76f041.c
@@ -78,7 +78,7 @@ struct x76f041_chip
#define BCR_Z ( 2 )
#define BCR_T ( 1 )
-struct x76f041_chip x76f041[ X76F041_MAXCHIP ];
+static struct x76f041_chip x76f041[ X76F041_MAXCHIP ];
#define COMMAND_WRITE ( 0x00 )
#define COMMAND_READ ( 0x20 )
diff --git a/src/emu/machine/x76f100.c b/src/emu/machine/x76f100.c
index d9cca5d33a5..a627d575bfe 100644
--- a/src/emu/machine/x76f100.c
+++ b/src/emu/machine/x76f100.c
@@ -60,7 +60,7 @@ struct x76f100_chip
#define SIZE_READ_PASSWORD ( SIZE_WRITE_BUFFER )
#define SIZE_DATA ( 112 )
-struct x76f100_chip x76f100[ X76F100_MAXCHIP ];
+static struct x76f100_chip x76f100[ X76F100_MAXCHIP ];
#define COMMAND_WRITE ( 0x80 )
#define COMMAND_READ ( 0x81 )
diff --git a/src/emu/machine/z80ctc.c b/src/emu/machine/z80ctc.c
index 8ff9351e821..47af23bf417 100644
--- a/src/emu/machine/z80ctc.c
+++ b/src/emu/machine/z80ctc.c
@@ -162,10 +162,10 @@ void z80ctc_init(int which, z80ctc_interface *intf)
ctc->period256 = attotime_mul(ATTOTIME_IN_HZ(intf->baseclock), 256);
ctc->notimer = intf->notimer;
ctc->intr = intf->intr;
- ctc->timer[0] = timer_alloc(timercallback);
- ctc->timer[1] = timer_alloc(timercallback);
- ctc->timer[2] = timer_alloc(timercallback);
- ctc->timer[3] = timer_alloc(timercallback);
+ ctc->timer[0] = timer_alloc(timercallback, NULL);
+ ctc->timer[1] = timer_alloc(timercallback, NULL);
+ ctc->timer[2] = timer_alloc(timercallback, NULL);
+ ctc->timer[3] = timer_alloc(timercallback, NULL);
ctc->zc[0] = intf->zc0;
ctc->zc[1] = intf->zc1;
ctc->zc[2] = intf->zc2;
@@ -391,7 +391,7 @@ void z80ctc_trg_w(int which, int ch, UINT8 data)
/* if we hit zero, do the same thing as for a timer interrupt */
if (!ctc->down[ch])
- timercallback(Machine, (which << 2) + ch);
+ timercallback(Machine, NULL, (which << 2) + ch);
}
}
}
diff --git a/src/emu/machine/z80sio.c b/src/emu/machine/z80sio.c
index 1da4fa1eb5d..5ea9459f467 100644
--- a/src/emu/machine/z80sio.c
+++ b/src/emu/machine/z80sio.c
@@ -296,8 +296,8 @@ void z80sio_init(int which, z80sio_interface *intf)
memset(sio, 0, sizeof(*sio));
- sio->chan[0].receive_timer = timer_alloc(serial_callback);
- sio->chan[1].receive_timer = timer_alloc(serial_callback);
+ sio->chan[0].receive_timer = timer_alloc(serial_callback, NULL);
+ sio->chan[1].receive_timer = timer_alloc(serial_callback, NULL);
sio->irq_cb = intf->irq_cb;
sio->dtr_changed_cb = intf->dtr_changed_cb;
@@ -587,7 +587,7 @@ static TIMER_CALLBACK( change_input_line )
void z80sio_set_cts(int which, int ch, int state)
{
/* operate deferred */
- timer_call_after_resynch((SIO_RR0_CTS << 8) + (state != 0) * 0x80 + which * 2 + ch, change_input_line);
+ timer_call_after_resynch(NULL, (SIO_RR0_CTS << 8) + (state != 0) * 0x80 + which * 2 + ch, change_input_line);
}
@@ -599,7 +599,7 @@ void z80sio_set_cts(int which, int ch, int state)
void z80sio_set_dcd(int which, int ch, int state)
{
/* operate deferred */
- timer_call_after_resynch((SIO_RR0_DCD << 8) + (state != 0) * 0x80 + which * 2 + ch, change_input_line);
+ timer_call_after_resynch(NULL, (SIO_RR0_DCD << 8) + (state != 0) * 0x80 + which * 2 + ch, change_input_line);
}
diff --git a/src/emu/mame.c b/src/emu/mame.c
index bc50082303a..2d23eaad4e5 100644
--- a/src/emu/mame.c
+++ b/src/emu/mame.c
@@ -378,7 +378,7 @@ int mame_execute(core_options *options)
begin_resource_tracking();
/* perform a soft reset -- this takes us to the running phase */
- soft_reset(machine, 0);
+ soft_reset(machine, NULL, 0);
/* run the CPUs until a reset or exit */
mame->hard_reset_pending = FALSE;
@@ -392,7 +392,7 @@ int mame_execute(core_options *options)
/* otherwise, just pump video updates through */
else
- video_frame_update();
+ video_frame_update(FALSE);
/* handle save/load */
if (mame->saveload_schedule_callback)
@@ -1508,7 +1508,7 @@ static void init_machine(running_machine *machine)
/* initialize the timers and allocate a soft_reset timer */
/* this must be done before cpu_init so that CPU's can allocate timers */
timer_init(machine);
- mame->soft_reset_timer = timer_alloc(soft_reset);
+ mame->soft_reset_timer = timer_alloc(soft_reset, NULL);
/* init the osd layer */
osd_init(machine);
diff --git a/src/emu/mame.h b/src/emu/mame.h
index 63a2edf9981..328ee632c8d 100644
--- a/src/emu/mame.h
+++ b/src/emu/mame.h
@@ -245,7 +245,7 @@ struct _mame_system_time
/***************************************************************************
- GLOBALS
+ GLOBAL VARAIBLES
***************************************************************************/
extern running_machine *Machine;
diff --git a/src/emu/memory.c b/src/emu/memory.c
index d8fdee22a21..826ea4496d4 100644
--- a/src/emu/memory.c
+++ b/src/emu/memory.c
@@ -595,6 +595,12 @@ void memory_set_opbase(offs_t pc)
entry = space->readlookup[LEVEL1_INDEX(pc)];
if (entry >= SUBTABLE_BASE)
entry = space->readlookup[LEVEL2_INDEX(entry,pc)];
+
+ /* if this entry if the current one, no need to go further */
+ if (entry == opcode_entry)
+ return;
+
+ /* keep track of current entry */
opcode_entry = entry;
/* if we don't map to a bank, see if there are any banks we can map to */
diff --git a/src/emu/memory.h b/src/emu/memory.h
index ffe03d46136..61f59a3d654 100644
--- a/src/emu/memory.h
+++ b/src/emu/memory.h
@@ -158,45 +158,48 @@ typedef struct _data_accessors data_accessors;
#define AMEF_UNMAP(x) (((x) << AMEF_UNMAP_SHIFT) | AMEF_SPECIFIES_UNMAP) /* specifies a given unmap value */
/* ----- static data access handler constants ----- */
-#define STATIC_INVALID 0 /* invalid - should never be used */
-#define STATIC_BANK1 1 /* banked memory #1 */
-#define STATIC_BANK2 2 /* banked memory #2 */
-#define STATIC_BANK3 3 /* banked memory #3 */
-#define STATIC_BANK4 4 /* banked memory #4 */
-#define STATIC_BANK5 5 /* banked memory #5 */
-#define STATIC_BANK6 6 /* banked memory #6 */
-#define STATIC_BANK7 7 /* banked memory #7 */
-#define STATIC_BANK8 8 /* banked memory #8 */
-#define STATIC_BANK9 9 /* banked memory #9 */
-#define STATIC_BANK10 10 /* banked memory #10 */
-#define STATIC_BANK11 11 /* banked memory #11 */
-#define STATIC_BANK12 12 /* banked memory #12 */
-#define STATIC_BANK13 13 /* banked memory #13 */
-#define STATIC_BANK14 14 /* banked memory #14 */
-#define STATIC_BANK15 15 /* banked memory #15 */
-#define STATIC_BANK16 16 /* banked memory #16 */
-#define STATIC_BANK17 17 /* banked memory #17 */
-#define STATIC_BANK18 18 /* banked memory #18 */
-#define STATIC_BANK19 19 /* banked memory #19 */
-#define STATIC_BANK20 20 /* banked memory #20 */
-#define STATIC_BANK21 21 /* banked memory #21 */
-#define STATIC_BANK22 22 /* banked memory #22 */
-#define STATIC_BANK23 23 /* banked memory #23 */
-#define STATIC_BANK24 24 /* banked memory #24 */
-#define STATIC_BANK25 25 /* banked memory #25 */
-#define STATIC_BANK26 26 /* banked memory #26 */
-#define STATIC_BANK27 27 /* banked memory #27 */
-#define STATIC_BANK28 28 /* banked memory #28 */
-#define STATIC_BANK29 29 /* banked memory #29 */
-#define STATIC_BANK30 30 /* banked memory #30 */
-#define STATIC_BANK31 31 /* banked memory #31 */
-#define STATIC_BANK32 32 /* banked memory #32 */
+enum
+{
+ STATIC_INVALID = 0, /* invalid - should never be used */
+ STATIC_BANK1, /* banked memory */
+ STATIC_BANK2,
+ STATIC_BANK3,
+ STATIC_BANK4,
+ STATIC_BANK5,
+ STATIC_BANK6,
+ STATIC_BANK7,
+ STATIC_BANK8,
+ STATIC_BANK9,
+ STATIC_BANK10,
+ STATIC_BANK11,
+ STATIC_BANK12,
+ STATIC_BANK13,
+ STATIC_BANK14,
+ STATIC_BANK15,
+ STATIC_BANK16,
+ STATIC_BANK17,
+ STATIC_BANK18,
+ STATIC_BANK19,
+ STATIC_BANK20,
+ STATIC_BANK21,
+ STATIC_BANK22,
+ STATIC_BANK23,
+ STATIC_BANK24,
+ STATIC_BANK25,
+ STATIC_BANK26,
+ STATIC_BANK27,
+ STATIC_BANK28,
+ STATIC_BANK29,
+ STATIC_BANK30,
+ STATIC_BANK31,
+ STATIC_BANK32,
/* entries 33-67 are reserved for dynamically allocated internal banks */
-#define STATIC_RAM 68 /* RAM - standard reads/writes */
-#define STATIC_ROM 69 /* ROM - standard reads, no writes */
-#define STATIC_NOP 70 /* unmapped - all unmapped memory goes here */
-#define STATIC_UNMAP 71 /* unmapped - all unmapped memory goes here */
-#define STATIC_COUNT 72 /* total number of static handlers */
+ STATIC_RAM = 68, /* RAM - standard reads/writes */
+ STATIC_ROM, /* ROM - standard reads, no writes */
+ STATIC_NOP,
+ STATIC_UNMAP, /* unmapped - all unmapped memory goes here */
+ STATIC_COUNT /* total number of static handlers */
+};
/* ----- banking constants ----- */
#define MAX_BANKS 66 /* maximum number of banks */
@@ -717,10 +720,13 @@ address_map *construct_map_##_name(address_map *map) \
***************************************************************************/
/* ----- address spaces ----- */
-#define ADDRESS_SPACES 3 /* maximum number of address spaces */
-#define ADDRESS_SPACE_PROGRAM 0 /* program address space */
-#define ADDRESS_SPACE_DATA 1 /* data address space */
-#define ADDRESS_SPACE_IO 2 /* I/O address space */
+enum
+{
+ ADDRESS_SPACE_PROGRAM = 0, /* program address space */
+ ADDRESS_SPACE_DATA, /* data address space */
+ ADDRESS_SPACE_IO, /* I/O address space */
+ ADDRESS_SPACES /* maximum number of address spaces */
+};
extern const char *address_space_names[ADDRESS_SPACES];
@@ -1153,11 +1159,7 @@ INLINE UINT32 cpu_readop_arg32(offs_t A) { if (address_is_unsafe(A)) { memory_se
INLINE UINT64 cpu_readop_arg64(offs_t A) { if (address_is_unsafe(A)) { memory_set_opbase(A); } return cpu_readop_arg64_unsafe(A); }
/* ----- bank switching for CPU cores ----- */
-#define change_pc(pc) \
-do { \
- if (active_address_space[ADDRESS_SPACE_PROGRAM].readlookup[LEVEL1_INDEX((pc) & active_address_space[ADDRESS_SPACE_PROGRAM].addrmask)] != opcode_entry) \
- memory_set_opbase(pc); \
-} while (0) \
+#define change_pc(pc) memory_set_opbase(pc);
/* ----- forces the next branch to generate a call to the opbase handler ----- */
#define catch_nextBranch() (opcode_entry = 0xff)
diff --git a/src/emu/render.h b/src/emu/render.h
index c86f4c62e14..f017eb69f4a 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -87,19 +87,25 @@ enum
LAYER_CONFIG_ENABLE_SCREEN_OVERLAY)
/* texture formats */
-#define TEXFORMAT_UNDEFINED 0 /* require a format to be specified */
-#define TEXFORMAT_PALETTE16 1 /* 16bpp palettized, alpha ignored */
-#define TEXFORMAT_PALETTEA16 2 /* 16bpp palettized, alpha respected */
-#define TEXFORMAT_RGB15 3 /* 16bpp 5-5-5 RGB */
-#define TEXFORMAT_RGB32 4 /* 32bpp 8-8-8 RGB */
-#define TEXFORMAT_ARGB32 5 /* 32bpp 8-8-8-8 ARGB */
-#define TEXFORMAT_YUY16 6 /* 16bpp 8-8 Y/Cb, Y/Cr in sequence */
+enum
+{
+ TEXFORMAT_UNDEFINED = 0, /* require a format to be specified */
+ TEXFORMAT_PALETTE16, /* 16bpp palettized, alpha ignored */
+ TEXFORMAT_PALETTEA16, /* 16bpp palettized, alpha respected */
+ TEXFORMAT_RGB15, /* 16bpp 5-5-5 RGB */
+ TEXFORMAT_RGB32, /* 32bpp 8-8-8 RGB */
+ TEXFORMAT_ARGB32, /* 32bpp 8-8-8-8 ARGB */
+ TEXFORMAT_YUY16 /* 16bpp 8-8 Y/Cb, Y/Cr in sequence */
+};
/* blending modes */
-#define BLENDMODE_NONE 0 /* no blending */
-#define BLENDMODE_ALPHA 1 /* standard alpha blend */
-#define BLENDMODE_RGB_MULTIPLY 2 /* apply source alpha to source pix, then multiply RGB values */
-#define BLENDMODE_ADD 3 /* apply source alpha to source pix, then add to destination */
+enum
+{
+ BLENDMODE_NONE = 0, /* no blending */
+ BLENDMODE_ALPHA, /* standard alpha blend */
+ BLENDMODE_RGB_MULTIPLY, /* apply source alpha to source pix, then multiply RGB values */
+ BLENDMODE_ADD /* apply source alpha to source pix, then add to destination */
+};
/* flags for primitives */
diff --git a/src/emu/romload.h b/src/emu/romload.h
index 3f1598bd8f6..21b7a83b41f 100644
--- a/src/emu/romload.h
+++ b/src/emu/romload.h
@@ -24,17 +24,19 @@
***************************************************************************/
/* ----- per-entry constants ----- */
-#define ROMENTRYTYPE_REGION 1 /* this entry marks the start of a region */
-#define ROMENTRYTYPE_END 2 /* this entry marks the end of a region */
-#define ROMENTRYTYPE_RELOAD 3 /* this entry reloads the previous ROM */
-#define ROMENTRYTYPE_CONTINUE 4 /* this entry continues loading the previous ROM */
-#define ROMENTRYTYPE_FILL 5 /* this entry fills an area with a constant value */
-#define ROMENTRYTYPE_COPY 6 /* this entry copies data from another region/offset */
-#define ROMENTRYTYPE_CARTRIDGE 7 /* this entry specifies a cartridge (MESS) */
-#define ROMENTRYTYPE_IGNORE 8 /* this entry continues loading the previous ROM but throws the data away */
-#define ROMENTRYTYPE_SYSTEM_BIOS 9 /* this entry specifies a bios */
-#define ROMENTRYTYPE_COUNT 10
-
+enum
+{
+ ROMENTRYTYPE_REGION = 1, /* this entry marks the start of a region */
+ ROMENTRYTYPE_END, /* this entry marks the end of a region */
+ ROMENTRYTYPE_RELOAD, /* this entry reloads the previous ROM */
+ ROMENTRYTYPE_CONTINUE, /* this entry continues loading the previous ROM */
+ ROMENTRYTYPE_FILL, /* this entry fills an area with a constant value */
+ ROMENTRYTYPE_COPY, /* this entry copies data from another region/offset */
+ ROMENTRYTYPE_CARTRIDGE, /* this entry specifies a cartridge (MESS) */
+ ROMENTRYTYPE_IGNORE, /* this entry continues loading the previous ROM but throws the data away */
+ ROMENTRYTYPE_SYSTEM_BIOS, /* this entry specifies a bios */
+ ROMENTRYTYPE_COUNT
+};
/* ----- per-region constants ----- */
#define ROMREGION_WIDTHMASK 0x00000003 /* native width of region, as power of 2 */
diff --git a/src/emu/sound.c b/src/emu/sound.c
index df7c9277cff..8c0ffc5cbca 100644
--- a/src/emu/sound.c
+++ b/src/emu/sound.c
@@ -194,7 +194,7 @@ void sound_init(running_machine *machine)
finalmix = auto_malloc(Machine->sample_rate * sizeof(*finalmix));
/* allocate a global timer for sound timing */
- sound_update_timer = timer_alloc(sound_update);
+ sound_update_timer = timer_alloc(sound_update, NULL);
timer_adjust(sound_update_timer, update_frequency, 0, update_frequency);
/* initialize the streams engine */
diff --git a/src/emu/sound/2203intf.c b/src/emu/sound/2203intf.c
index 839802de6eb..6322b3db356 100644
--- a/src/emu/sound/2203intf.c
+++ b/src/emu/sound/2203intf.c
@@ -55,15 +55,15 @@ static void IRQHandler(void *param,int irq)
}
/* Timer overflow callback from timer.c */
-static TIMER_CALLBACK_PTR( timer_callback_2203_0 )
+static TIMER_CALLBACK( timer_callback_2203_0 )
{
- struct ym2203_info *info = param;
+ struct ym2203_info *info = ptr;
YM2203TimerOver(info->chip,0);
}
-static TIMER_CALLBACK_PTR( timer_callback_2203_1 )
+static TIMER_CALLBACK( timer_callback_2203_1 )
{
- struct ym2203_info *info = param;
+ struct ym2203_info *info = ptr;
YM2203TimerOver(info->chip,1);
}
@@ -86,7 +86,7 @@ static void timer_handler(void *param,int c,int count,int clock)
{ /* Start FM Timer */
attotime period = attotime_mul(ATTOTIME_IN_HZ(clock), count);
if (!timer_enable(info->timer[c], 1))
- timer_adjust_ptr(info->timer[c], period, attotime_zero);
+ timer_adjust(info->timer[c], period, 0, attotime_zero);
}
}
@@ -119,8 +119,8 @@ static void *ym2203_start(int sndindex, int clock, const void *config)
if (!info->psg) return NULL;
/* Timer Handler set */
- info->timer[0] = timer_alloc_ptr(timer_callback_2203_0, info);
- info->timer[1] = timer_alloc_ptr(timer_callback_2203_1, info);
+ info->timer[0] = timer_alloc(timer_callback_2203_0, info);
+ info->timer[1] = timer_alloc(timer_callback_2203_1, info);
/* stream system initialize */
info->stream = stream_create(0,1,rate,info,ym2203_stream_update);
diff --git a/src/emu/sound/2608intf.c b/src/emu/sound/2608intf.c
index 13c3d018809..1ae2cce7514 100644
--- a/src/emu/sound/2608intf.c
+++ b/src/emu/sound/2608intf.c
@@ -69,15 +69,15 @@ static void IRQHandler(void *param,int irq)
}
/* Timer overflow callback from timer.c */
-static TIMER_CALLBACK_PTR( timer_callback_2608_0 )
+static TIMER_CALLBACK( timer_callback_2608_0 )
{
- struct ym2608_info *info = param;
+ struct ym2608_info *info = ptr;
YM2608TimerOver(info->chip,0);
}
-static TIMER_CALLBACK_PTR( timer_callback_2608_1 )
+static TIMER_CALLBACK( timer_callback_2608_1 )
{
- struct ym2608_info *info = param;
+ struct ym2608_info *info = ptr;
YM2608TimerOver(info->chip,1);
}
@@ -92,7 +92,7 @@ static void timer_handler(void *param,int c,int count,int clock)
{ /* Start FM Timer */
attotime period = attotime_mul(ATTOTIME_IN_HZ(clock), count);
if (!timer_enable(info->timer[c], 1))
- timer_adjust_ptr(info->timer[c], period, attotime_zero);
+ timer_adjust(info->timer[c], period, 0, attotime_zero);
}
}
@@ -135,8 +135,8 @@ static void *ym2608_start(int sndindex, int clock, const void *config)
if (!info->psg) return NULL;
/* Timer Handler set */
- info->timer[0] = timer_alloc_ptr(timer_callback_2608_0, info);
- info->timer[1] = timer_alloc_ptr(timer_callback_2608_1, info);
+ info->timer[0] = timer_alloc(timer_callback_2608_0, info);
+ info->timer[1] = timer_alloc(timer_callback_2608_1, info);
/* stream system initialize */
info->stream = stream_create(0,2,rate,info,ym2608_stream_update);
diff --git a/src/emu/sound/2610intf.c b/src/emu/sound/2610intf.c
index d180da6607c..a0a7a839762 100644
--- a/src/emu/sound/2610intf.c
+++ b/src/emu/sound/2610intf.c
@@ -69,15 +69,15 @@ static void IRQHandler(void *param,int irq)
}
/* Timer overflow callback from timer.c */
-static TIMER_CALLBACK_PTR( timer_callback_0 )
+static TIMER_CALLBACK( timer_callback_0 )
{
- struct ym2610_info *info = param;
+ struct ym2610_info *info = ptr;
YM2610TimerOver(info->chip,0);
}
-static TIMER_CALLBACK_PTR( timer_callback_1 )
+static TIMER_CALLBACK( timer_callback_1 )
{
- struct ym2610_info *info = param;
+ struct ym2610_info *info = ptr;
YM2610TimerOver(info->chip,1);
}
@@ -93,7 +93,7 @@ static void timer_handler(void *param,int c,int count,int clock)
attotime period = attotime_mul(ATTOTIME_IN_HZ(clock), count);
if (!timer_enable(info->timer[c], 1))
- timer_adjust_ptr(info->timer[c], period, attotime_zero);
+ timer_adjust(info->timer[c], period, 0, attotime_zero);
}
}
@@ -138,8 +138,8 @@ static void *ym2610_start(int sndindex, int clock, const void *config)
if (!info->psg) return NULL;
/* Timer Handler set */
- info->timer[0] = timer_alloc_ptr(timer_callback_0, info);
- info->timer[1] = timer_alloc_ptr(timer_callback_1, info);
+ info->timer[0] = timer_alloc(timer_callback_0, info);
+ info->timer[1] = timer_alloc(timer_callback_1, info);
/* stream system initialize */
info->stream = stream_create(0,2,rate,info,ym2610_stream_update);
@@ -190,8 +190,8 @@ static void *ym2610b_start(int sndindex, int clock, const void *config)
if (!info->psg) return NULL;
/* Timer Handler set */
- info->timer[0] =timer_alloc_ptr(timer_callback_0, info);
- info->timer[1] =timer_alloc_ptr(timer_callback_1, info);
+ info->timer[0] =timer_alloc(timer_callback_0, info);
+ info->timer[1] =timer_alloc(timer_callback_1, info);
/* stream system initialize */
info->stream = stream_create(0,2,rate,info,ym2610b_stream_update);
diff --git a/src/emu/sound/2612intf.c b/src/emu/sound/2612intf.c
index fbc9275f4ef..95b1a6e5b3e 100644
--- a/src/emu/sound/2612intf.c
+++ b/src/emu/sound/2612intf.c
@@ -34,15 +34,15 @@ static void IRQHandler(void *param,int irq)
}
/* Timer overflow callback from timer.c */
-static TIMER_CALLBACK_PTR( timer_callback_2612_0 )
+static TIMER_CALLBACK( timer_callback_2612_0 )
{
- struct ym2612_info *info = param;
+ struct ym2612_info *info = ptr;
YM2612TimerOver(info->chip,0);
}
-static TIMER_CALLBACK_PTR( timer_callback_2612_1 )
+static TIMER_CALLBACK( timer_callback_2612_1 )
{
- struct ym2612_info *info = param;
+ struct ym2612_info *info = ptr;
YM2612TimerOver(info->chip,1);
}
@@ -57,7 +57,7 @@ static void timer_handler(void *param,int c,int count,int clock)
{ /* Start FM Timer */
attotime period = attotime_mul(ATTOTIME_IN_HZ(clock), count);
if (!timer_enable(info->timer[c], 1))
- timer_adjust_ptr(info->timer[c], period, attotime_zero);
+ timer_adjust(info->timer[c], period, 0, attotime_zero);
}
}
@@ -99,8 +99,8 @@ static void *ym2612_start(int sndindex, int clock, const void *config)
/* FM init */
/* Timer Handler set */
- info->timer[0] = timer_alloc_ptr(timer_callback_2612_0, info);
- info->timer[1] = timer_alloc_ptr(timer_callback_2612_1, info);
+ info->timer[0] = timer_alloc(timer_callback_2612_0, info);
+ info->timer[1] = timer_alloc(timer_callback_2612_1, info);
/* stream system initialize */
info->stream = stream_create(0,2,rate,info,ym2612_stream_update);
diff --git a/src/emu/sound/262intf.c b/src/emu/sound/262intf.c
index cc314703ac0..d8d2b8acfa9 100644
--- a/src/emu/sound/262intf.c
+++ b/src/emu/sound/262intf.c
@@ -28,15 +28,15 @@ static void IRQHandler_262(void *param,int irq)
if (info->intf->handler) (info->intf->handler)(irq);
}
-static TIMER_CALLBACK_PTR( timer_callback_262_0 )
+static TIMER_CALLBACK( timer_callback_262_0 )
{
- struct ymf262_info *info = param;
+ struct ymf262_info *info = ptr;
YMF262TimerOver(info->chip, 0);
}
-static TIMER_CALLBACK_PTR( timer_callback_262_1 )
+static TIMER_CALLBACK( timer_callback_262_1 )
{
- struct ymf262_info *info = param;
+ struct ymf262_info *info = ptr;
YMF262TimerOver(info->chip, 1);
}
@@ -49,7 +49,7 @@ static void timer_handler_262(void *param,int timer, attotime period)
}
else
{ /* Start FM Timer */
- timer_adjust_ptr(info->timer[timer], period, attotime_zero);
+ timer_adjust(info->timer[timer], period, 0, attotime_zero);
}
}
@@ -89,8 +89,8 @@ static void *ymf262_start(int sndindex, int clock, const void *config)
YMF262SetIRQHandler (info->chip, IRQHandler_262, info);
YMF262SetUpdateHandler(info->chip, _stream_update, info);
- info->timer[0] = timer_alloc_ptr(timer_callback_262_0, info);
- info->timer[1] = timer_alloc_ptr(timer_callback_262_1, info);
+ info->timer[0] = timer_alloc(timer_callback_262_0, info);
+ info->timer[1] = timer_alloc(timer_callback_262_1, info);
return info;
}
diff --git a/src/emu/sound/3812intf.c b/src/emu/sound/3812intf.c
index 6ad352864e0..2f18d91fb04 100644
--- a/src/emu/sound/3812intf.c
+++ b/src/emu/sound/3812intf.c
@@ -39,15 +39,15 @@ static void IRQHandler_3812(void *param,int irq)
struct ym3812_info *info = param;
if (info->intf->handler) (info->intf->handler)(irq ? ASSERT_LINE : CLEAR_LINE);
}
-static TIMER_CALLBACK_PTR( timer_callback_3812_0 )
+static TIMER_CALLBACK( timer_callback_3812_0 )
{
- struct ym3812_info *info = param;
+ struct ym3812_info *info = ptr;
YM3812TimerOver(info->chip,0);
}
-static TIMER_CALLBACK_PTR( timer_callback_3812_1 )
+static TIMER_CALLBACK( timer_callback_3812_1 )
{
- struct ym3812_info *info = param;
+ struct ym3812_info *info = ptr;
YM3812TimerOver(info->chip,1);
}
@@ -60,7 +60,7 @@ static void TimerHandler_3812(void *param,int c,attotime period)
}
else
{ /* Start FM Timer */
- timer_adjust_ptr(info->timer[c], period, attotime_zero);
+ timer_adjust(info->timer[c], period, 0, attotime_zero);
}
}
@@ -101,8 +101,8 @@ static void *ym3812_start(int sndindex, int clock, const void *config)
YM3812SetIRQHandler (info->chip, IRQHandler_3812, info);
YM3812SetUpdateHandler(info->chip, _stream_update_3812, info);
- info->timer[0] = timer_alloc_ptr(timer_callback_3812_0, info);
- info->timer[1] = timer_alloc_ptr(timer_callback_3812_1, info);
+ info->timer[0] = timer_alloc(timer_callback_3812_0, info);
+ info->timer[1] = timer_alloc(timer_callback_3812_1, info);
return info;
}
@@ -209,14 +209,14 @@ static void IRQHandler_3526(void *param,int irq)
if (info->intf->handler) (info->intf->handler)(irq ? ASSERT_LINE : CLEAR_LINE);
}
/* Timer overflow callback from timer.c */
-static TIMER_CALLBACK_PTR( timer_callback_3526_0 )
+static TIMER_CALLBACK( timer_callback_3526_0 )
{
- struct ym3526_info *info = param;
+ struct ym3526_info *info = ptr;
YM3526TimerOver(info->chip,0);
}
-static TIMER_CALLBACK_PTR( timer_callback_3526_1 )
+static TIMER_CALLBACK( timer_callback_3526_1 )
{
- struct ym3526_info *info = param;
+ struct ym3526_info *info = ptr;
YM3526TimerOver(info->chip,1);
}
/* TimerHandler from fm.c */
@@ -229,7 +229,7 @@ static void TimerHandler_3526(void *param,int c,attotime period)
}
else
{ /* Start FM Timer */
- timer_adjust_ptr(info->timer[c], period, attotime_zero);
+ timer_adjust(info->timer[c], period, 0, attotime_zero);
}
}
@@ -269,8 +269,8 @@ static void *ym3526_start(int sndindex, int clock, const void *config)
YM3526SetIRQHandler (info->chip, IRQHandler_3526, info);
YM3526SetUpdateHandler(info->chip, _stream_update_3526, info);
- info->timer[0] = timer_alloc_ptr(timer_callback_3526_0, info);
- info->timer[1] = timer_alloc_ptr(timer_callback_3526_1, info);
+ info->timer[0] = timer_alloc(timer_callback_3526_0, info);
+ info->timer[1] = timer_alloc(timer_callback_3526_1, info);
return info;
}
@@ -375,14 +375,14 @@ static void IRQHandler_8950(void *param,int irq)
struct y8950_info *info = param;
if (info->intf->handler) (info->intf->handler)(irq ? ASSERT_LINE : CLEAR_LINE);
}
-static TIMER_CALLBACK_PTR( timer_callback_8950_0 )
+static TIMER_CALLBACK( timer_callback_8950_0 )
{
- struct y8950_info *info = param;
+ struct y8950_info *info = ptr;
Y8950TimerOver(info->chip,0);
}
-static TIMER_CALLBACK_PTR( timer_callback_8950_1 )
+static TIMER_CALLBACK( timer_callback_8950_1 )
{
- struct y8950_info *info = param;
+ struct y8950_info *info = ptr;
Y8950TimerOver(info->chip,1);
}
static void TimerHandler_8950(void *param,int c,attotime period)
@@ -394,7 +394,7 @@ static void TimerHandler_8950(void *param,int c,attotime period)
}
else
{ /* Start FM Timer */
- timer_adjust_ptr(info->timer[c], period, attotime_zero);
+ timer_adjust(info->timer[c], period, 0, attotime_zero);
}
}
@@ -475,8 +475,8 @@ static void *y8950_start(int sndindex, int clock, const void *config)
Y8950SetIRQHandler (info->chip, IRQHandler_8950, info);
Y8950SetUpdateHandler(info->chip, _stream_update_8950, info);
- info->timer[0] = timer_alloc_ptr(timer_callback_8950_0, info);
- info->timer[1] = timer_alloc_ptr(timer_callback_8950_1, info);
+ info->timer[0] = timer_alloc(timer_callback_8950_0, info);
+ info->timer[1] = timer_alloc(timer_callback_8950_1, info);
return info;
}
diff --git a/src/emu/sound/es5503.c b/src/emu/sound/es5503.c
index 8ba61b254c5..86bb1a5a5f2 100644
--- a/src/emu/sound/es5503.c
+++ b/src/emu/sound/es5503.c
@@ -132,9 +132,9 @@ static void es5503_halt_osc(ES5503Chip *chip, int onum, int type, UINT32 *accumu
}
}
-static TIMER_CALLBACK_PTR( es5503_timer_cb )
+static TIMER_CALLBACK( es5503_timer_cb )
{
- ES5503Osc *osc = param;
+ ES5503Osc *osc = ptr;
ES5503Chip *chip = (ES5503Chip *)osc->chip;
stream_update(chip->stream);
@@ -262,7 +262,7 @@ static void *es5503_start(int sndindex, int clock, const void *config)
chip->oscillators[osc].irqpend = 0;
chip->oscillators[osc].accumulator = 0;
- chip->oscillators[osc].timer = timer_alloc_ptr(es5503_timer_cb, &chip->oscillators[osc]);
+ chip->oscillators[osc].timer = timer_alloc(es5503_timer_cb, &chip->oscillators[osc]);
chip->oscillators[osc].chip = (void *)chip;
}
@@ -460,13 +460,13 @@ WRITE8_HANDLER(ES5503_reg_0_w)
// ok, we run for this long
period = attotime_mul(ATTOTIME_IN_HZ(chip->output_rate), length);
- timer_adjust_ptr(chip->oscillators[osc].timer, period, period);
+ timer_adjust(chip->oscillators[osc].timer, period, 0, period);
}
}
else if (!(chip->oscillators[osc].control & 1) && (data&1))
{
// key off
- timer_adjust_ptr(chip->oscillators[osc].timer, attotime_never, attotime_never);
+ timer_adjust(chip->oscillators[osc].timer, attotime_never, 0, attotime_never);
}
chip->oscillators[osc].control = data;
diff --git a/src/emu/sound/ics2115.c b/src/emu/sound/ics2115.c
index aee2e9c20bf..282fec25abc 100644
--- a/src/emu/sound/ics2115.c
+++ b/src/emu/sound/ics2115.c
@@ -164,16 +164,16 @@ static void keyon(struct ics2115 *chip, int osc)
}
-static TIMER_CALLBACK_PTR( timer_cb_0 )
+static TIMER_CALLBACK( timer_cb_0 )
{
- struct ics2115 *chip = param;
+ struct ics2115 *chip = ptr;
chip->irq_pend |= 1<<0;
recalc_irq(chip);
}
-static TIMER_CALLBACK_PTR( timer_cb_1 )
+static TIMER_CALLBACK( timer_cb_1 )
{
- struct ics2115 *chip = param;
+ struct ics2115 *chip = ptr;
chip->irq_pend |= 1<<1;
recalc_irq(chip);
}
@@ -195,9 +195,9 @@ static void recalc_timer(struct ics2115 *chip, int timer)
if(chip->timer[timer].period != period) {
chip->timer[timer].period = period;
if(period)
- timer_adjust_ptr(chip->timer[timer].timer, ATTOTIME_IN_NSEC(period), ATTOTIME_IN_NSEC(period));
+ timer_adjust(chip->timer[timer].timer, ATTOTIME_IN_NSEC(period), 0, ATTOTIME_IN_NSEC(period));
else
- timer_adjust_ptr(chip->timer[timer].timer, attotime_never, attotime_zero);
+ timer_adjust(chip->timer[timer].timer, attotime_never, 0, attotime_zero);
}
}
@@ -458,8 +458,8 @@ static void *ics2115_start(int sndindex, int clock, const void *config)
chip->intf = config;
chip->index = sndindex;
chip->rom = memory_region(chip->intf->region);
- chip->timer[0].timer = timer_alloc_ptr(timer_cb_0, chip);
- chip->timer[1].timer = timer_alloc_ptr(timer_cb_1, chip);
+ chip->timer[0].timer = timer_alloc(timer_cb_0, chip);
+ chip->timer[1].timer = timer_alloc(timer_cb_1, chip);
chip->ulaw = auto_malloc(256*sizeof(INT16));
chip->stream = stream_create(0, 2, 33075, chip, update);
@@ -532,8 +532,8 @@ static void ics2115_reset(void *_chip)
chip->irq_en = 0;
chip->irq_pend = 0;
memset(chip->voice, 0, sizeof(chip->voice));
- timer_adjust_ptr(chip->timer[0].timer, attotime_never, attotime_zero);
- timer_adjust_ptr(chip->timer[1].timer, attotime_never, attotime_zero);
+ timer_adjust(chip->timer[0].timer, attotime_never, 0, attotime_zero);
+ timer_adjust(chip->timer[1].timer, attotime_never, 0, attotime_zero);
chip->timer[0].period = 0;
chip->timer[1].period = 0;
recalc_irq(chip);
diff --git a/src/emu/sound/k053260.c b/src/emu/sound/k053260.c
index 6ab7691314a..6a6b6fc1d1a 100644
--- a/src/emu/sound/k053260.c
+++ b/src/emu/sound/k053260.c
@@ -222,7 +222,7 @@ static void *k053260_start(int sndindex, int clock, const void *config)
/* setup SH1 timer if necessary */
if ( ic->intf->irq )
- timer_pulse( attotime_mul(ATTOTIME_IN_HZ(clock), 32), 0, ic->intf->irq );
+ timer_pulse( attotime_mul(ATTOTIME_IN_HZ(clock), 32), NULL, 0, ic->intf->irq );
return ic;
}
diff --git a/src/emu/sound/k053260.h b/src/emu/sound/k053260.h
index e4f53e5e1fb..1240f0729d8 100644
--- a/src/emu/sound/k053260.h
+++ b/src/emu/sound/k053260.h
@@ -8,7 +8,7 @@
struct K053260_interface {
int region; /* memory region of sample ROM(s) */
- void (*irq)(running_machine *machine, int param ); /* called on SH1 complete cycle ( clock / 32 ) */
+ timer_callback irq; /* called on SH1 complete cycle ( clock / 32 ) */
};
diff --git a/src/emu/sound/k054539.c b/src/emu/sound/k054539.c
index 1944272112f..ac0e28a8dd1 100644
--- a/src/emu/sound/k054539.c
+++ b/src/emu/sound/k054539.c
@@ -439,9 +439,9 @@ else
}
-static TIMER_CALLBACK_PTR( K054539_irq )
+static TIMER_CALLBACK( K054539_irq )
{
- struct k054539_info *info = param;
+ struct k054539_info *info = ptr;
if(info->regs[0x22f] & 0x20)
info->intf->irq ();
}
@@ -473,7 +473,7 @@ static void K054539_init_chip(struct k054539_info *info, int clock, int sndindex
// 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_ptr(ATTOTIME_IN_HZ(480), info, K054539_irq);
+ timer_pulse(ATTOTIME_IN_HZ(480), info, 0, K054539_irq);
info->stream = stream_create(0, 2, clock, info, K054539_update);
diff --git a/src/emu/sound/msm5205.c b/src/emu/sound/msm5205.c
index 678ca78b919..4da5bb899c7 100644
--- a/src/emu/sound/msm5205.c
+++ b/src/emu/sound/msm5205.c
@@ -111,9 +111,9 @@ static void MSM5205_update(void *param,stream_sample_t **inputs, stream_sample_t
}
/* timer callback at VCLK low eddge */
-static TIMER_CALLBACK_PTR( MSM5205_vclk_callback )
+static TIMER_CALLBACK( MSM5205_vclk_callback )
{
- struct MSM5205Voice *voice = param;
+ struct MSM5205Voice *voice = ptr;
int val;
int new_signal;
/* callback user handler and latch next data */
@@ -184,7 +184,7 @@ static void *msm5205_start(int sndindex, int clock, const void *config)
/* stream system initialize */
voice->stream = stream_create(0,1,clock,voice,MSM5205_update);
- voice->timer = timer_alloc_ptr(MSM5205_vclk_callback, voice);
+ voice->timer = timer_alloc(MSM5205_vclk_callback, voice);
/* initialize */
msm5205_reset(voice);
@@ -220,7 +220,7 @@ void MSM5205_vclk_w (int num, int vclk)
if( voice->vclk != vclk)
{
voice->vclk = vclk;
- if( !vclk ) MSM5205_vclk_callback(Machine, voice);
+ if( !vclk ) MSM5205_vclk_callback(Machine, voice, 0);
}
}
}
@@ -269,10 +269,10 @@ void MSM5205_playmode_w(int num,int select)
if( prescaler )
{
attotime period = attotime_mul(ATTOTIME_IN_HZ(voice->clock), prescaler);
- timer_adjust_ptr(voice->timer, period, period);
+ timer_adjust(voice->timer, period, 0, period);
}
else
- timer_adjust_ptr(voice->timer, attotime_never, attotime_zero);
+ timer_adjust(voice->timer, attotime_never, 0, attotime_zero);
}
if( voice->bitwidth != bitwidth )
diff --git a/src/emu/sound/pokey.c b/src/emu/sound/pokey.c
index 4d01cbcdfc7..8a557067edc 100644
--- a/src/emu/sound/pokey.c
+++ b/src/emu/sound/pokey.c
@@ -239,17 +239,8 @@ struct POKEYregisters
#define P9(chip) chip->poly9[chip->p9]
#define P17(chip) chip->poly17[chip->p17]
-static TIMER_CALLBACK_PTR( pokey_timer_expire_1 );
-static TIMER_CALLBACK_PTR( pokey_timer_expire_2 );
-static TIMER_CALLBACK_PTR( pokey_timer_expire_4 );
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_0 );
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_1 );
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_2 );
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_3 );
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_4 );
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_5 );
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_6 );
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_7 );
+static TIMER_CALLBACK( pokey_timer_expire );
+static TIMER_CALLBACK( pokey_pot_trigger );
#define SAMPLE -1
@@ -675,20 +666,20 @@ static void *pokey_start(int sndindex, int clock, const void *config)
chip->clockmult = DIV_64;
chip->KBCODE = 0x09; /* Atari 800 'no key' */
chip->SKCTL = SK_RESET; /* let the RNG run after reset */
- chip->rtimer = timer_alloc(NULL);
+ chip->rtimer = timer_alloc(NULL, NULL);
- chip->timer[0] = timer_alloc_ptr(pokey_timer_expire_1, chip);
- chip->timer[1] = timer_alloc_ptr(pokey_timer_expire_2, chip);
- chip->timer[2] = timer_alloc_ptr(pokey_timer_expire_4, chip);
+ chip->timer[0] = timer_alloc(pokey_timer_expire, chip);
+ chip->timer[1] = timer_alloc(pokey_timer_expire, chip);
+ chip->timer[2] = timer_alloc(pokey_timer_expire, chip);
- chip->ptimer[0] = timer_alloc_ptr(pokey_pot_trigger_0, chip);
- chip->ptimer[1] = timer_alloc_ptr(pokey_pot_trigger_1, chip);
- chip->ptimer[2] = timer_alloc_ptr(pokey_pot_trigger_2, chip);
- chip->ptimer[3] = timer_alloc_ptr(pokey_pot_trigger_3, chip);
- chip->ptimer[4] = timer_alloc_ptr(pokey_pot_trigger_4, chip);
- chip->ptimer[5] = timer_alloc_ptr(pokey_pot_trigger_5, chip);
- chip->ptimer[6] = timer_alloc_ptr(pokey_pot_trigger_6, chip);
- chip->ptimer[7] = timer_alloc_ptr(pokey_pot_trigger_7, chip);
+ chip->ptimer[0] = timer_alloc(pokey_pot_trigger, chip);
+ chip->ptimer[1] = timer_alloc(pokey_pot_trigger, chip);
+ chip->ptimer[2] = timer_alloc(pokey_pot_trigger, chip);
+ chip->ptimer[3] = timer_alloc(pokey_pot_trigger, chip);
+ chip->ptimer[4] = timer_alloc(pokey_pot_trigger, chip);
+ chip->ptimer[5] = timer_alloc(pokey_pot_trigger, chip);
+ chip->ptimer[6] = timer_alloc(pokey_pot_trigger, chip);
+ chip->ptimer[7] = timer_alloc(pokey_pot_trigger, chip);
chip->pot_r[0] = chip->intf.pot_r[0];
chip->pot_r[1] = chip->intf.pot_r[1];
@@ -710,8 +701,11 @@ static void *pokey_start(int sndindex, int clock, const void *config)
return chip;
}
-static void pokey_timer_expire_common(struct POKEYregisters *p, int timers)
+static TIMER_CALLBACK( pokey_timer_expire )
{
+ struct POKEYregisters *p = ptr;
+ int timers = param;
+
LOG_TIMER(("POKEY #%p timer %d with IRQEN $%02x\n", p, timers, p->IRQEN));
/* check if some of the requested timer interrupts are enabled */
@@ -727,22 +721,6 @@ static void pokey_timer_expire_common(struct POKEYregisters *p, int timers)
}
}
-static TIMER_CALLBACK_PTR( pokey_timer_expire_1 )
-{
- struct POKEYregisters *chip = param;
- pokey_timer_expire_common(chip, chip->timer_param[TIMER1]);
-}
-static TIMER_CALLBACK_PTR( pokey_timer_expire_2 )
-{
- struct POKEYregisters *chip = param;
- pokey_timer_expire_common(chip, chip->timer_param[TIMER2]);
-}
-static TIMER_CALLBACK_PTR( pokey_timer_expire_4 )
-{
- struct POKEYregisters *chip = param;
- pokey_timer_expire_common(chip, chip->timer_param[TIMER4]);
-}
-
#if VERBOSE_SOUND
static char *audc2str(int val)
{
@@ -795,9 +773,9 @@ static char *audctl2str(int val)
}
#endif
-static TIMER_CALLBACK_PTR( pokey_serin_ready )
+static TIMER_CALLBACK( pokey_serin_ready )
{
- struct POKEYregisters *p = param;
+ struct POKEYregisters *p = ptr;
if( p->IRQEN & IRQ_SERIN )
{
/* set the enabled timer irq status bits */
@@ -808,9 +786,9 @@ static TIMER_CALLBACK_PTR( pokey_serin_ready )
}
}
-static TIMER_CALLBACK_PTR( pokey_serout_ready )
+static TIMER_CALLBACK( pokey_serout_ready )
{
- struct POKEYregisters *p = param;
+ struct POKEYregisters *p = ptr;
if( p->IRQEN & IRQ_SEROR )
{
p->IRQST |= IRQ_SEROR;
@@ -819,9 +797,9 @@ static TIMER_CALLBACK_PTR( pokey_serout_ready )
}
}
-static TIMER_CALLBACK_PTR( pokey_serout_complete )
+static TIMER_CALLBACK( pokey_serout_complete )
{
- struct POKEYregisters *p = param;
+ struct POKEYregisters *p = ptr;
if( p->IRQEN & IRQ_SEROC )
{
p->IRQST |= IRQ_SEROC;
@@ -830,21 +808,14 @@ static TIMER_CALLBACK_PTR( pokey_serout_complete )
}
}
-static void pokey_pot_trigger_common(struct POKEYregisters *p, int pot)
+static TIMER_CALLBACK( pokey_pot_trigger )
{
+ struct POKEYregisters *p = ptr;
+ int pot = param;
LOG(("POKEY #%p POT%d triggers after %dus\n", p, pot, (int)(1000000 * attotime_to_double(timer_timeelapsed(p->ptimer[pot])))));
p->ALLPOT &= ~(1 << pot); /* set the enabled timer irq status bits */
}
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_0 ) { pokey_pot_trigger_common(param, 0); }
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_1 ) { pokey_pot_trigger_common(param, 1); }
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_2 ) { pokey_pot_trigger_common(param, 2); }
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_3 ) { pokey_pot_trigger_common(param, 3); }
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_4 ) { pokey_pot_trigger_common(param, 4); }
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_5 ) { pokey_pot_trigger_common(param, 5); }
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_6 ) { pokey_pot_trigger_common(param, 6); }
-static TIMER_CALLBACK_PTR( pokey_pot_trigger_7 ) { pokey_pot_trigger_common(param, 7); }
-
#define AD_TIME ((p->SKCTL & SK_PADDLE) ? p->ad_time_fast : p->ad_time_slow)
static void pokey_potgo(struct POKEYregisters *p)
@@ -870,7 +841,7 @@ static void pokey_potgo(struct POKEYregisters *p)
/* final value */
p->POTx[pot] = r;
- timer_adjust_ptr(p->ptimer[pot], attotime_mul(AD_TIME, r), attotime_zero);
+ timer_adjust(p->ptimer[pot], attotime_mul(AD_TIME, r), pot, attotime_zero);
}
}
}
@@ -1137,9 +1108,9 @@ static void pokey_register_w(int chip, int offs, int data)
/* first remove any existing timers */
LOG_TIMER(("POKEY #%d STIMER $%02x\n", chip, data));
- timer_adjust_ptr(p->timer[TIMER1], attotime_never, attotime_zero);
- timer_adjust_ptr(p->timer[TIMER2], attotime_never, attotime_zero);
- timer_adjust_ptr(p->timer[TIMER4], attotime_never, attotime_zero);
+ timer_adjust(p->timer[TIMER1], attotime_never, p->timer_param[TIMER1], attotime_zero);
+ timer_adjust(p->timer[TIMER2], attotime_never, p->timer_param[TIMER2], attotime_zero);
+ timer_adjust(p->timer[TIMER4], attotime_never, p->timer_param[TIMER4], attotime_zero);
/* reset all counters to zero (side effect) */
p->polyadjust = 0;
@@ -1157,7 +1128,7 @@ static void pokey_register_w(int chip, int offs, int data)
/* set timer #1 _and_ #2 event after timer_div clocks of joined CHAN1+CHAN2 */
p->timer_period[TIMER2] = attotime_mul(p->clock_period, p->divisor[CHAN2]);
p->timer_param[TIMER2] = (chip<<3)|IRQ_TIMR2|IRQ_TIMR1;
- timer_adjust_ptr(p->timer[TIMER2], p->timer_period[TIMER2], p->timer_period[TIMER2]);
+ timer_adjust(p->timer[TIMER2], p->timer_period[TIMER2], p->timer_param[TIMER2], p->timer_period[TIMER2]);
}
}
else
@@ -1168,7 +1139,7 @@ static void pokey_register_w(int chip, int offs, int data)
/* set timer #1 event after timer_div clocks of CHAN1 */
p->timer_period[TIMER1] = attotime_mul(p->clock_period, p->divisor[CHAN1]);
p->timer_param[TIMER1] = (chip<<3)|IRQ_TIMR1;
- timer_adjust_ptr(p->timer[TIMER1], p->timer_period[TIMER1], p->timer_period[TIMER1]);
+ timer_adjust(p->timer[TIMER1], p->timer_period[TIMER1], p->timer_param[TIMER1], p->timer_period[TIMER1]);
}
if( p->divisor[CHAN2] > 4 )
@@ -1177,7 +1148,7 @@ static void pokey_register_w(int chip, int offs, int data)
/* set timer #2 event after timer_div clocks of CHAN2 */
p->timer_period[TIMER2] = attotime_mul(p->clock_period, p->divisor[CHAN2]);
p->timer_param[TIMER2] = (chip<<3)|IRQ_TIMR2;
- timer_adjust_ptr(p->timer[TIMER2], p->timer_period[TIMER2], p->timer_period[TIMER2]);
+ timer_adjust(p->timer[TIMER2], p->timer_period[TIMER2], p->timer_param[TIMER2], p->timer_period[TIMER2]);
}
}
@@ -1194,7 +1165,7 @@ static void pokey_register_w(int chip, int offs, int data)
/* set timer #4 event after timer_div clocks of CHAN4 */
p->timer_period[TIMER4] = attotime_mul(p->clock_period, p->divisor[CHAN4]);
p->timer_param[TIMER4] = (chip<<3)|IRQ_TIMR4;
- timer_adjust_ptr(p->timer[TIMER4], p->timer_period[TIMER4], p->timer_period[TIMER4]);
+ timer_adjust(p->timer[TIMER4], p->timer_period[TIMER4], p->timer_param[TIMER4], p->timer_period[TIMER4]);
}
}
}
@@ -1206,7 +1177,7 @@ static void pokey_register_w(int chip, int offs, int data)
/* set timer #4 event after timer_div clocks of CHAN4 */
p->timer_period[TIMER4] = attotime_mul(p->clock_period, p->divisor[CHAN4]);
p->timer_param[TIMER4] = (chip<<3)|IRQ_TIMR4;
- timer_adjust_ptr(p->timer[TIMER4], p->timer_period[TIMER4], p->timer_period[TIMER4]);
+ timer_adjust(p->timer[TIMER4], p->timer_period[TIMER4], p->timer_param[TIMER4], p->timer_period[TIMER4]);
}
}
@@ -1236,9 +1207,9 @@ static void pokey_register_w(int chip, int offs, int data)
* loaders from Ballblazer and Escape from Fractalus
* The real times are unknown
*/
- timer_set_ptr(ATTOTIME_IN_USEC(200), p, pokey_serout_ready);
+ timer_set(ATTOTIME_IN_USEC(200), p, 0, pokey_serout_ready);
/* 10 bits (assumption 1 start, 8 data and 1 stop bit) take how long? */
- timer_set_ptr(ATTOTIME_IN_USEC(2000), p, pokey_serout_complete);
+ timer_set(ATTOTIME_IN_USEC(2000), p, 0, pokey_serout_complete);
break;
case IRQEN_C:
@@ -1303,7 +1274,7 @@ static void pokey_register_w(int chip, int offs, int data)
if( new_val < p->counter[CHAN1] )
p->counter[CHAN1] = new_val;
if( p->interrupt_cb && p->timer[TIMER1] )
- timer_adjust_ptr(p->timer[TIMER1], attotime_mul(p->clock_period, new_val), p->timer_period[TIMER1]);
+ timer_adjust(p->timer[TIMER1], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER1], p->timer_period[TIMER1]);
p->audible[CHAN1] = !(
(p->AUDC[CHAN1] & VOLUME_ONLY) ||
(p->AUDC[CHAN1] & VOLUME_MASK) == 0 ||
@@ -1339,7 +1310,7 @@ static void pokey_register_w(int chip, int offs, int data)
if( new_val < p->counter[CHAN2] )
p->counter[CHAN2] = new_val;
if( p->interrupt_cb && p->timer[TIMER2] )
- timer_adjust_ptr(p->timer[TIMER2], attotime_mul(p->clock_period, new_val), p->timer_period[TIMER2]);
+ timer_adjust(p->timer[TIMER2], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER2], p->timer_period[TIMER2]);
p->audible[CHAN2] = !(
(p->AUDC[CHAN2] & VOLUME_ONLY) ||
(p->AUDC[CHAN2] & VOLUME_MASK) == 0 ||
@@ -1404,7 +1375,7 @@ static void pokey_register_w(int chip, int offs, int data)
if( new_val < p->counter[CHAN4] )
p->counter[CHAN4] = new_val;
if( p->interrupt_cb && p->timer[TIMER4] )
- timer_adjust_ptr(p->timer[TIMER4], attotime_mul(p->clock_period, new_val), p->timer_period[TIMER4]);
+ timer_adjust(p->timer[TIMER4], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER4], p->timer_period[TIMER4]);
p->audible[CHAN4] = !(
(p->AUDC[CHAN4] & VOLUME_ONLY) ||
(p->AUDC[CHAN4] & VOLUME_MASK) == 0 ||
@@ -1452,25 +1423,25 @@ WRITE8_HANDLER( quad_pokey_w )
void pokey1_serin_ready(int after)
{
struct POKEYregisters *p = sndti_token(SOUND_POKEY, 0);
- timer_set_ptr(attotime_mul(p->clock_period, after), p, pokey_serin_ready);
+ timer_set(attotime_mul(p->clock_period, after), p, 0, pokey_serin_ready);
}
void pokey2_serin_ready(int after)
{
struct POKEYregisters *p = sndti_token(SOUND_POKEY, 1);
- timer_set_ptr(attotime_mul(p->clock_period, after), p, pokey_serin_ready);
+ timer_set(attotime_mul(p->clock_period, after), p, 0, pokey_serin_ready);
}
void pokey3_serin_ready(int after)
{
struct POKEYregisters *p = sndti_token(SOUND_POKEY, 2);
- timer_set_ptr(attotime_mul(p->clock_period, after), p, pokey_serin_ready);
+ timer_set(attotime_mul(p->clock_period, after), p, 0, pokey_serin_ready);
}
void pokey4_serin_ready(int after)
{
struct POKEYregisters *p = sndti_token(SOUND_POKEY, 3);
- timer_set_ptr(attotime_mul(p->clock_period, after), p, pokey_serin_ready);
+ timer_set(attotime_mul(p->clock_period, after), p, 0, pokey_serin_ready);
}
static void pokey_break_w(int chip, int shift)
diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c
index 78b788838c4..43b8b465d32 100644
--- a/src/emu/sound/scsp.c
+++ b/src/emu/sound/scsp.c
@@ -308,9 +308,9 @@ static void ResetInterrupts(struct _SCSP *SCSP)
CheckPendingIRQ(SCSP);
}
-static TIMER_CALLBACK_PTR( timerA_cb )
+static TIMER_CALLBACK( timerA_cb )
{
- struct _SCSP *SCSP = (struct _SCSP *)param;
+ struct _SCSP *SCSP = (struct _SCSP *)ptr;
SCSP->TimCnt[0] = 0xFFFF;
SCSP->udata.data[0x20/2]|=0x40;
@@ -320,9 +320,9 @@ static TIMER_CALLBACK_PTR( timerA_cb )
CheckPendingIRQ(SCSP);
}
-static TIMER_CALLBACK_PTR( timerB_cb )
+static TIMER_CALLBACK( timerB_cb )
{
- struct _SCSP *SCSP = (struct _SCSP *)param;
+ struct _SCSP *SCSP = (struct _SCSP *)ptr;
SCSP->TimCnt[1] = 0xFFFF;
SCSP->udata.data[0x20/2]|=0x80;
@@ -332,9 +332,9 @@ static TIMER_CALLBACK_PTR( timerB_cb )
CheckPendingIRQ(SCSP);
}
-static TIMER_CALLBACK_PTR( timerC_cb )
+static TIMER_CALLBACK( timerC_cb )
{
- struct _SCSP *SCSP = (struct _SCSP *)param;
+ struct _SCSP *SCSP = (struct _SCSP *)ptr;
SCSP->TimCnt[2] = 0xFFFF;
SCSP->udata.data[0x20/2]|=0x100;
@@ -524,9 +524,9 @@ static void SCSP_Init(struct _SCSP *SCSP, const struct SCSPinterface *intf, int
}
}
- SCSP->timerA = timer_alloc_ptr(timerA_cb, SCSP);
- SCSP->timerB = timer_alloc_ptr(timerB_cb, SCSP);
- SCSP->timerC = timer_alloc_ptr(timerC_cb, SCSP);
+ SCSP->timerA = timer_alloc(timerA_cb, SCSP);
+ SCSP->timerB = timer_alloc(timerB_cb, SCSP);
+ SCSP->timerC = timer_alloc(timerC_cb, SCSP);
for(i=0;i<0x400;++i)
{
@@ -720,7 +720,7 @@ static void SCSP_UpdateReg(struct _SCSP *SCSP, int reg)
time = (44100 / SCSP->TimPris[0]) / (255-(SCSP->udata.data[0x18/2]&0xff));
if (time)
{
- timer_adjust_ptr(SCSP->timerA, ATTOTIME_IN_HZ(time), attotime_never);
+ timer_adjust(SCSP->timerA, ATTOTIME_IN_HZ(time), 0, attotime_never);
}
}
}
@@ -739,7 +739,7 @@ static void SCSP_UpdateReg(struct _SCSP *SCSP, int reg)
time = (44100 / SCSP->TimPris[1]) / (255-(SCSP->udata.data[0x1A/2]&0xff));
if (time)
{
- timer_adjust_ptr(SCSP->timerB, ATTOTIME_IN_HZ(time), attotime_never);
+ timer_adjust(SCSP->timerB, ATTOTIME_IN_HZ(time), 0, attotime_never);
}
}
}
@@ -758,7 +758,7 @@ static void SCSP_UpdateReg(struct _SCSP *SCSP, int reg)
time = (44100 / SCSP->TimPris[2]) / (255-(SCSP->udata.data[0x1C/2]&0xff));
if (time)
{
- timer_adjust_ptr(SCSP->timerC, ATTOTIME_IN_HZ(time), attotime_never);
+ timer_adjust(SCSP->timerC, ATTOTIME_IN_HZ(time), 0, attotime_never);
}
}
}
diff --git a/src/emu/sound/sp0250.c b/src/emu/sound/sp0250.c
index fc6e00bec00..343f63fb8fb 100644
--- a/src/emu/sound/sp0250.c
+++ b/src/emu/sound/sp0250.c
@@ -117,9 +117,9 @@ static void sp0250_load_values(struct sp0250 *sp)
sp->playing = 1;
}
-static TIMER_CALLBACK_PTR( sp0250_timer_tick )
+static TIMER_CALLBACK( sp0250_timer_tick )
{
- struct sp0250 *sp = param;
+ struct sp0250 *sp = ptr;
stream_update(sp->stream);
}
@@ -200,7 +200,7 @@ static void *sp0250_start(int sndindex, int clock, const void *config)
sp->RNG = 1;
sp->drq = intf->drq_callback;
sp->drq(ASSERT_LINE);
- timer_pulse_ptr(attotime_mul(ATTOTIME_IN_HZ(clock), CLOCK_DIVIDER), sp, sp0250_timer_tick);
+ timer_pulse(attotime_mul(ATTOTIME_IN_HZ(clock), CLOCK_DIVIDER), sp, 0, sp0250_timer_tick);
sp->stream = stream_create(0, 1, clock / CLOCK_DIVIDER, sp, sp0250_update);
diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c
index 2748c647dfa..37b5a40906e 100644
--- a/src/emu/sound/upd7759.c
+++ b/src/emu/sound/upd7759.c
@@ -522,9 +522,9 @@ static void upd7759_update(void *param, stream_sample_t **inputs, stream_sample_
*************************************************************/
-static TIMER_CALLBACK_PTR( upd7759_slave_update )
+static TIMER_CALLBACK( upd7759_slave_update )
{
- struct upd7759_chip *chip = param;
+ struct upd7759_chip *chip = ptr;
UINT8 olddrq = chip->drq;
/* update the stream */
@@ -540,7 +540,7 @@ static TIMER_CALLBACK_PTR( upd7759_slave_update )
/* set a timer to go off when that is done */
if (chip->state != STATE_IDLE)
- timer_adjust_ptr(chip->timer, attotime_mul(chip->clock_period, chip->clocks_left), attotime_zero);
+ timer_adjust(chip->timer, attotime_mul(chip->clock_period, chip->clocks_left), 0, attotime_zero);
}
@@ -575,7 +575,7 @@ static void upd7759_reset(struct upd7759_chip *chip)
/* turn off any timer */
if (chip->timer)
- timer_adjust_ptr(chip->timer, attotime_never, attotime_zero);
+ timer_adjust(chip->timer, attotime_never, 0, attotime_zero);
}
@@ -643,7 +643,7 @@ static void *upd7759_start(int sndindex, int clock, const void *config)
if (intf->region != 0)
chip->rom = chip->rombase = memory_region(intf->region);
else
- chip->timer = timer_alloc_ptr(upd7759_slave_update, chip);
+ chip->timer = timer_alloc(upd7759_slave_update, chip);
/* set the DRQ callback */
chip->drqcallback = intf->drqcallback;
@@ -702,7 +702,7 @@ void upd7759_start_w(int which, UINT8 data)
/* for slave mode, start the timer going */
if (chip->timer)
- timer_adjust_ptr(chip->timer, attotime_zero, attotime_zero);
+ timer_adjust(chip->timer, attotime_zero, 0, attotime_zero);
}
}
diff --git a/src/emu/sound/ym2151.c b/src/emu/sound/ym2151.c
index dd3b0e45b5f..063cfcc7477 100644
--- a/src/emu/sound/ym2151.c
+++ b/src/emu/sound/ym2151.c
@@ -783,9 +783,9 @@ INLINE void envelope_KONKOFF(YM2151Operator * op, int v)
#ifdef USE_MAME_TIMERS
-static TIMER_CALLBACK_PTR( irqAon_callback )
+static TIMER_CALLBACK( irqAon_callback )
{
- YM2151 *chip = param;
+ YM2151 *chip = ptr;
int oldstate = chip->irqlinestate;
chip->irqlinestate |= 1;
@@ -793,9 +793,9 @@ static TIMER_CALLBACK_PTR( irqAon_callback )
if (oldstate == 0 && chip->irqhandler) (*chip->irqhandler)(1);
}
-static TIMER_CALLBACK_PTR( irqBon_callback )
+static TIMER_CALLBACK( irqBon_callback )
{
- YM2151 *chip = param;
+ YM2151 *chip = ptr;
int oldstate = chip->irqlinestate;
chip->irqlinestate |= 2;
@@ -803,9 +803,9 @@ static TIMER_CALLBACK_PTR( irqBon_callback )
if (oldstate == 0 && chip->irqhandler) (*chip->irqhandler)(1);
}
-static TIMER_CALLBACK_PTR( irqAoff_callback )
+static TIMER_CALLBACK( irqAoff_callback )
{
- YM2151 *chip = param;
+ YM2151 *chip = ptr;
int oldstate = chip->irqlinestate;
chip->irqlinestate &= ~1;
@@ -813,9 +813,9 @@ static TIMER_CALLBACK_PTR( irqAoff_callback )
if (oldstate == 1 && chip->irqhandler) (*chip->irqhandler)(0);
}
-static TIMER_CALLBACK_PTR( irqBoff_callback )
+static TIMER_CALLBACK( irqBoff_callback )
{
- YM2151 *chip = param;
+ YM2151 *chip = ptr;
int oldstate = chip->irqlinestate;
chip->irqlinestate &= ~2;
@@ -823,34 +823,34 @@ static TIMER_CALLBACK_PTR( irqBoff_callback )
if (oldstate == 2 && chip->irqhandler) (*chip->irqhandler)(0);
}
-static TIMER_CALLBACK_PTR( timer_callback_a )
+static TIMER_CALLBACK( timer_callback_a )
{
- YM2151 *chip = param;
- timer_adjust_ptr(chip->timer_A, chip->timer_A_time[ chip->timer_A_index ], attotime_zero);
+ YM2151 *chip = ptr;
+ timer_adjust(chip->timer_A, chip->timer_A_time[ chip->timer_A_index ], 0, attotime_zero);
chip->timer_A_index_old = chip->timer_A_index;
if (chip->irq_enable & 0x04)
{
chip->status |= 1;
- timer_set_ptr(attotime_zero,chip,irqAon_callback);
+ timer_set(attotime_zero,chip,0,irqAon_callback);
}
if (chip->irq_enable & 0x80)
chip->csm_req = 2; /* request KEY ON / KEY OFF sequence */
}
-static TIMER_CALLBACK_PTR( timer_callback_b )
+static TIMER_CALLBACK( timer_callback_b )
{
- YM2151 *chip = param;
- timer_adjust_ptr(chip->timer_B, chip->timer_B_time[ chip->timer_B_index ], attotime_zero);
+ YM2151 *chip = ptr;
+ timer_adjust(chip->timer_B, chip->timer_B_time[ chip->timer_B_index ], 0, attotime_zero);
chip->timer_B_index_old = chip->timer_B_index;
if (chip->irq_enable & 0x08)
{
chip->status |= 2;
- timer_set_ptr(attotime_zero,chip,irqBon_callback);
+ timer_set(attotime_zero,chip,0,irqBon_callback);
}
}
#if 0
-static TIMER_CALLBACK_PTR( timer_callback_chip_busy )
+static TIMER_CALLBACK( timer_callback_chip_busy )
{
- YM2151 *chip = param;
+ YM2151 *chip = ptr;
chip->status &= 0x7f; /* reset busy flag */
}
#endif
@@ -1056,7 +1056,7 @@ void YM2151WriteReg(void *_chip, int r, int v)
#if 0
/* There is no info on what YM2151 really does when busy flag is set */
if ( chip->status & 0x80 ) return;
- timer_set_ptr ( attotime_mul(ATTOTIME_IN_HZ(chip->clock), 64), chip, timer_callback_chip_busy);
+ timer_set ( attotime_mul(ATTOTIME_IN_HZ(chip->clock), 64), chip, 0, timer_callback_chip_busy);
chip->status |= 0x80; /* set busy flag for 64 chip clock cycles */
#endif
@@ -1107,7 +1107,7 @@ void YM2151WriteReg(void *_chip, int r, int v)
{
#ifdef USE_MAME_TIMERS
chip->status &= ~1;
- timer_set_ptr(attotime_zero,chip,irqAoff_callback);
+ timer_set(attotime_zero,chip,0,irqAoff_callback);
#else
int oldstate = chip->status & 3;
chip->status &= ~1;
@@ -1119,7 +1119,7 @@ void YM2151WriteReg(void *_chip, int r, int v)
{
#ifdef USE_MAME_TIMERS
chip->status &= ~2;
- timer_set_ptr(attotime_zero,chip,irqBoff_callback);
+ timer_set(attotime_zero,chip,0,irqBoff_callback);
#else
int oldstate = chip->status & 3;
chip->status &= ~2;
@@ -1133,7 +1133,7 @@ void YM2151WriteReg(void *_chip, int r, int v)
/* start timer _only_ if it wasn't already started (it will reload time value next round) */
if (!timer_enable(chip->timer_B, 1))
{
- timer_adjust_ptr(chip->timer_B, chip->timer_B_time[ chip->timer_B_index ], attotime_zero);
+ timer_adjust(chip->timer_B, chip->timer_B_time[ chip->timer_B_index ], 0, attotime_zero);
chip->timer_B_index_old = chip->timer_B_index;
}
#else
@@ -1158,7 +1158,7 @@ void YM2151WriteReg(void *_chip, int r, int v)
/* start timer _only_ if it wasn't already started (it will reload time value next round) */
if (!timer_enable(chip->timer_A, 1))
{
- timer_adjust_ptr(chip->timer_A, chip->timer_A_time[ chip->timer_A_index ], attotime_zero);
+ timer_adjust(chip->timer_A, chip->timer_A_time[ chip->timer_A_index ], 0, attotime_zero);
chip->timer_A_index_old = chip->timer_A_index;
}
#else
@@ -1542,8 +1542,8 @@ void * YM2151Init(int index, int clock, int rate)
#ifdef USE_MAME_TIMERS
/* this must be done _before_ a call to YM2151ResetChip() */
- PSG->timer_A = timer_alloc_ptr(timer_callback_a, PSG);
- PSG->timer_B = timer_alloc_ptr(timer_callback_b, PSG);
+ PSG->timer_A = timer_alloc(timer_callback_a, PSG);
+ PSG->timer_B = timer_alloc(timer_callback_b, PSG);
#else
PSG->tim_A = 0;
PSG->tim_B = 0;
diff --git a/src/emu/sound/ymf271.c b/src/emu/sound/ymf271.c
index 710fdc3b9d6..204db210961 100644
--- a/src/emu/sound/ymf271.c
+++ b/src/emu/sound/ymf271.c
@@ -1338,9 +1338,9 @@ static void ymf271_write_pcm(YMF271Chip *chip, int data)
}
}
-static TIMER_CALLBACK_PTR( ymf271_timer_a_tick )
+static TIMER_CALLBACK( ymf271_timer_a_tick )
{
- YMF271Chip *chip = param;
+ YMF271Chip *chip = ptr;
chip->status |= 1;
@@ -1351,9 +1351,9 @@ static TIMER_CALLBACK_PTR( ymf271_timer_a_tick )
}
}
-static TIMER_CALLBACK_PTR( ymf271_timer_b_tick )
+static TIMER_CALLBACK( ymf271_timer_b_tick )
{
- YMF271Chip *chip = param;
+ YMF271Chip *chip = ptr;
chip->status |= 2;
@@ -1449,7 +1449,7 @@ static void ymf271_write_timer(YMF271Chip *chip, int data)
//period = (double)(256.0 - chip->timerAVal ) * ( 384.0 * 4.0 / (double)CLOCK);
period = attotime_mul(ATTOTIME_IN_HZ(chip->clock), 384 * (1024 - chip->timerAVal));
- timer_adjust_ptr(chip->timA, period, period);
+ timer_adjust(chip->timA, period, 0, period);
}
if (data & 0x20)
{ // timer B reset
@@ -1460,7 +1460,7 @@ static void ymf271_write_timer(YMF271Chip *chip, int data)
period = attotime_mul(ATTOTIME_IN_HZ(chip->clock), 384 * 16 * (256 - chip->timerBVal));
- timer_adjust_ptr(chip->timB, period, period);
+ timer_adjust(chip->timB, period, 0, period);
}
break;
@@ -1719,8 +1719,8 @@ static void init_state(YMF271Chip *chip)
static void ymf271_init(YMF271Chip *chip, UINT8 *rom, void (*cb)(int), read8_handler ext_read, write8_handler ext_write)
{
- chip->timA = timer_alloc_ptr(ymf271_timer_a_tick, chip);
- chip->timB = timer_alloc_ptr(ymf271_timer_b_tick, chip);
+ chip->timA = timer_alloc(ymf271_timer_a_tick, chip);
+ chip->timB = timer_alloc(ymf271_timer_b_tick, chip);
chip->rom = rom;
chip->irq_callback = cb;
diff --git a/src/emu/sound/ymf278b.c b/src/emu/sound/ymf278b.c
index a8ef72015f4..25abb08cbf1 100644
--- a/src/emu/sound/ymf278b.c
+++ b/src/emu/sound/ymf278b.c
@@ -352,9 +352,9 @@ static void ymf278b_irq_check(YMF278BChip *chip)
chip->irq_callback(chip->irq_line);
}
-static TIMER_CALLBACK_PTR( ymf278b_timer_a_tick )
+static TIMER_CALLBACK( ymf278b_timer_a_tick )
{
- YMF278BChip *chip = param;
+ YMF278BChip *chip = ptr;
if(!(chip->enable & 0x40))
{
chip->current_irq |= 0x40;
@@ -362,9 +362,9 @@ static TIMER_CALLBACK_PTR( ymf278b_timer_a_tick )
}
}
-static TIMER_CALLBACK_PTR( ymf278b_timer_b_tick )
+static TIMER_CALLBACK( ymf278b_timer_b_tick )
{
- YMF278BChip *chip = param;
+ YMF278BChip *chip = ptr;
if(!(chip->enable & 0x20))
{
chip->current_irq |= 0x20;
@@ -381,10 +381,10 @@ static void ymf278b_timer_a_reset(YMF278BChip *chip)
if (chip->clock != YMF278B_STD_CLOCK)
period = attotime_div(attotime_mul(period, chip->clock), YMF278B_STD_CLOCK);
- timer_adjust_ptr(chip->timer_a, period, period);
+ timer_adjust(chip->timer_a, period, 0, period);
}
else
- timer_adjust_ptr(chip->timer_a, attotime_never, attotime_zero);
+ timer_adjust(chip->timer_a, attotime_never, 0, attotime_zero);
}
static void ymf278b_timer_b_reset(YMF278BChip *chip)
@@ -396,10 +396,10 @@ static void ymf278b_timer_b_reset(YMF278BChip *chip)
if (chip->clock != YMF278B_STD_CLOCK)
period = attotime_div(attotime_mul(period, chip->clock), YMF278B_STD_CLOCK);
- timer_adjust_ptr(chip->timer_a, period, period);
+ timer_adjust(chip->timer_a, period, 0, period);
}
else
- timer_adjust_ptr(chip->timer_b, attotime_never, attotime_zero);
+ timer_adjust(chip->timer_b, attotime_never, 0, attotime_zero);
}
static void ymf278b_A_w(YMF278BChip *chip, UINT8 reg, UINT8 data)
@@ -670,8 +670,8 @@ static void ymf278b_init(YMF278BChip *chip, UINT8 *rom, void (*cb)(int), int clo
{
chip->rom = rom;
chip->irq_callback = cb;
- chip->timer_a = timer_alloc_ptr(ymf278b_timer_a_tick, chip);
- chip->timer_b = timer_alloc_ptr(ymf278b_timer_b_tick, chip);
+ chip->timer_a = timer_alloc(ymf278b_timer_a_tick, chip);
+ chip->timer_b = timer_alloc(ymf278b_timer_b_tick, chip);
chip->irq_line = CLEAR_LINE;
chip->clock = clock;
diff --git a/src/emu/sound/ymz280b.c b/src/emu/sound/ymz280b.c
index e27edd8ca4e..3af8405b342 100644
--- a/src/emu/sound/ymz280b.c
+++ b/src/emu/sound/ymz280b.c
@@ -108,16 +108,16 @@ static const int index_scale[8] = { 0x0e6, 0x0e6, 0x0e6, 0x0e6, 0x133, 0x199, 0x
static int diff_lookup[16];
/* timer callback */
-static TIMER_CALLBACK_PTR( update_irq_state_timer_0 );
-static TIMER_CALLBACK_PTR( update_irq_state_timer_1 );
-static TIMER_CALLBACK_PTR( update_irq_state_timer_2 );
-static TIMER_CALLBACK_PTR( update_irq_state_timer_3 );
-static TIMER_CALLBACK_PTR( update_irq_state_timer_4 );
-static TIMER_CALLBACK_PTR( update_irq_state_timer_5 );
-static TIMER_CALLBACK_PTR( update_irq_state_timer_6 );
-static TIMER_CALLBACK_PTR( update_irq_state_timer_7 );
-
-static void (*update_irq_state_cb[])(running_machine *, void *) =
+static TIMER_CALLBACK( update_irq_state_timer_0 );
+static TIMER_CALLBACK( update_irq_state_timer_1 );
+static TIMER_CALLBACK( update_irq_state_timer_2 );
+static TIMER_CALLBACK( update_irq_state_timer_3 );
+static TIMER_CALLBACK( update_irq_state_timer_4 );
+static TIMER_CALLBACK( update_irq_state_timer_5 );
+static TIMER_CALLBACK( update_irq_state_timer_6 );
+static TIMER_CALLBACK( update_irq_state_timer_7 );
+
+static timer_callback update_irq_state_cb[] =
{
update_irq_state_timer_0,
update_irq_state_timer_1,
@@ -199,7 +199,7 @@ static void YMZ280B_state_save_update_step(void *param)
struct YMZ280BVoice *voice = &chip->voice[j];
update_step(chip, voice);
if(voice->irq_schedule)
- timer_set_ptr(attotime_zero, chip, update_irq_state_cb[j]);
+ timer_set(attotime_zero, chip, 0, update_irq_state_cb[j]);
}
}
@@ -217,14 +217,14 @@ static void update_irq_state_timer_common(void *param, int voicenum)
voice->irq_schedule = 0;
}
-static TIMER_CALLBACK_PTR( update_irq_state_timer_0 ) { update_irq_state_timer_common(param, 0); }
-static TIMER_CALLBACK_PTR( update_irq_state_timer_1 ) { update_irq_state_timer_common(param, 1); }
-static TIMER_CALLBACK_PTR( update_irq_state_timer_2 ) { update_irq_state_timer_common(param, 2); }
-static TIMER_CALLBACK_PTR( update_irq_state_timer_3 ) { update_irq_state_timer_common(param, 3); }
-static TIMER_CALLBACK_PTR( update_irq_state_timer_4 ) { update_irq_state_timer_common(param, 4); }
-static TIMER_CALLBACK_PTR( update_irq_state_timer_5 ) { update_irq_state_timer_common(param, 5); }
-static TIMER_CALLBACK_PTR( update_irq_state_timer_6 ) { update_irq_state_timer_common(param, 6); }
-static TIMER_CALLBACK_PTR( update_irq_state_timer_7 ) { update_irq_state_timer_common(param, 7); }
+static TIMER_CALLBACK( update_irq_state_timer_0 ) { update_irq_state_timer_common(ptr, 0); }
+static TIMER_CALLBACK( update_irq_state_timer_1 ) { update_irq_state_timer_common(ptr, 1); }
+static TIMER_CALLBACK( update_irq_state_timer_2 ) { update_irq_state_timer_common(ptr, 2); }
+static TIMER_CALLBACK( update_irq_state_timer_3 ) { update_irq_state_timer_common(ptr, 3); }
+static TIMER_CALLBACK( update_irq_state_timer_4 ) { update_irq_state_timer_common(ptr, 4); }
+static TIMER_CALLBACK( update_irq_state_timer_5 ) { update_irq_state_timer_common(ptr, 5); }
+static TIMER_CALLBACK( update_irq_state_timer_6 ) { update_irq_state_timer_common(ptr, 6); }
+static TIMER_CALLBACK( update_irq_state_timer_7 ) { update_irq_state_timer_common(ptr, 7); }
/**********************************************************************************************
@@ -575,7 +575,7 @@ static void ymz280b_update(void *param, stream_sample_t **inputs, stream_sample_
voice->playing = 0;
/* set update_irq_state_timer. IRQ is signaled on next CPU execution. */
- timer_set_ptr(attotime_zero, chip, update_irq_state_cb[v]);
+ timer_set(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 cd1b4fe3eb1..3cd4abb5008 100644
--- a/src/emu/timer.c
+++ b/src/emu/timer.c
@@ -45,18 +45,16 @@
/* in timer.h: typedef struct _emu_timer emu_timer; */
struct _emu_timer
{
- emu_timer * next;
- emu_timer * prev;
- void (*callback)(running_machine *, int);
- void (*callback_ptr)(running_machine *, void *);
- int callback_param;
- void * callback_ptr_param;
+ emu_timer * next;
+ emu_timer * prev;
+ timer_callback callback;
+ INT32 param;
+ void * ptr;
const char * file;
int line;
const char * func;
UINT8 enabled;
UINT8 temporary;
- UINT8 ptr;
attotime period;
attotime start;
attotime expire;
@@ -324,22 +322,12 @@ void timer_set_global_time(attotime newbase)
callback_timer_expire_time = timer->expire;
/* call the callback */
- if (was_enabled)
+ if (was_enabled && timer->callback != NULL)
{
- if (!timer->ptr && timer->callback)
- {
- LOG(("Timer %s:%d[%s] fired (expire=%s)\n", timer->file, timer->line, timer->func, attotime_string(timer->expire, 9)));
- profiler_mark(PROFILER_TIMER_CALLBACK);
- (*timer->callback)(Machine, timer->callback_param);
- profiler_mark(PROFILER_END);
- }
- else if (timer->ptr && timer->callback_ptr)
- {
- LOG(("Timer %s:%d[%s] fired (expire=%s)\n", timer->file, timer->line, timer->func, attotime_string(timer->expire, 9)));
- profiler_mark(PROFILER_TIMER_CALLBACK);
- (*timer->callback_ptr)(Machine, timer->callback_ptr_param);
- profiler_mark(PROFILER_END);
- }
+ LOG(("Timer %s:%d[%s] fired (expire=%s)\n", timer->file, timer->line, timer->func, attotime_string(timer->expire, 9)));
+ profiler_mark(PROFILER_TIMER_CALLBACK);
+ (*timer->callback)(Machine, timer->ptr, timer->param);
+ profiler_mark(PROFILER_END);
}
/* clear the callback timer global */
@@ -392,7 +380,7 @@ static void timer_register_save(emu_timer *timer)
/* use different instances to differentiate the bits */
state_save_push_tag(0);
- state_save_register_item(buf, count, timer->callback_param);
+ state_save_register_item(buf, count, timer->param);
state_save_register_item(buf, count, timer->enabled);
state_save_register_item(buf, count, timer->period.seconds);
state_save_register_item(buf, count, timer->period.attoseconds);
@@ -414,7 +402,7 @@ static void timer_postload(void)
emu_timer *t;
/* remove all timers and make a private list */
- while (timer_head)
+ while (timer_head != NULL)
{
t = timer_head;
@@ -432,7 +420,7 @@ static void timer_postload(void)
}
/* now add them all back in; this effectively re-sorts them by time */
- while (privlist)
+ while (privlist != NULL)
{
t = privlist;
privlist = t->next;
@@ -474,19 +462,17 @@ int timer_count_anonymous(void)
isn't primed yet
-------------------------------------------------*/
-INLINE emu_timer *_timer_alloc_common(void (*callback)(running_machine *, int), void (*callback_ptr)(running_machine *, void *), void *param, const char *file, int line, const char *func, int temp)
+INLINE emu_timer *_timer_alloc_common(timer_callback callback, void *ptr, const char *file, int line, const char *func, int temp)
{
attotime time = get_current_time();
emu_timer *timer = timer_new();
/* fill in the record */
timer->callback = callback;
- timer->callback_ptr = callback_ptr;
- timer->callback_param = 0;
- timer->callback_ptr_param = param;
+ timer->ptr = ptr;
+ timer->param = 0;
timer->enabled = FALSE;
timer->temporary = temp;
- timer->ptr = (callback_ptr != NULL);
timer->period = attotime_zero;
timer->file = file;
timer->line = line;
@@ -508,14 +494,9 @@ INLINE emu_timer *_timer_alloc_common(void (*callback)(running_machine *, int),
return timer;
}
-emu_timer *_timer_alloc(void (*callback)(running_machine *, int), const char *file, int line, const char *func)
-{
- return _timer_alloc_common(callback, NULL, NULL, file, line, func, FALSE);
-}
-
-emu_timer *_timer_alloc_ptr(void (*callback_ptr)(running_machine *, void *), void *param, const char *file, int line, const char *func)
+emu_timer *_timer_alloc_internal(timer_callback callback, void *ptr, const char *file, int line, const char *func)
{
- return _timer_alloc_common(NULL, callback_ptr, param, file, line, func, FALSE);
+ return _timer_alloc_common(callback, ptr, file, line, func, FALSE);
}
@@ -554,7 +535,7 @@ static void timer_remove(emu_timer *which)
fire periodically
-------------------------------------------------*/
-INLINE void timer_adjust_common(emu_timer *which, attotime duration, INT32 param, attotime period)
+void timer_adjust(emu_timer *which, attotime duration, INT32 param, attotime period)
{
attotime time = get_current_time();
@@ -563,7 +544,7 @@ INLINE void timer_adjust_common(emu_timer *which, attotime duration, INT32 param
callback_timer_modified = TRUE;
/* compute the time of the next firing and insert into the list */
- which->callback_param = param;
+ which->param = param;
which->enabled = TRUE;
/* clamp negative times to 0 */
@@ -585,20 +566,6 @@ INLINE void timer_adjust_common(emu_timer *which, attotime duration, INT32 param
activecpu_abort_timeslice();
}
-void timer_adjust(emu_timer *which, attotime duration, INT32 param, attotime period)
-{
- if (which->ptr)
- fatalerror("timer_adjust called on a ptr timer!");
- timer_adjust_common(which, duration, param, period);
-}
-
-void timer_adjust_ptr(emu_timer *which, attotime duration, attotime period)
-{
- if (!which->ptr)
- fatalerror("timer_adjust_ptr called on a non-ptr timer!");
- timer_adjust_common(which, duration, 0, period);
-}
-
/***************************************************************************
@@ -611,44 +578,24 @@ void timer_adjust_ptr(emu_timer *which, attotime duration, attotime period)
period
-------------------------------------------------*/
-void _timer_pulse(attotime period, INT32 param, void (*callback)(running_machine *, int), const char *file, int line, const char *func)
+void _timer_pulse_internal(attotime period, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func)
{
- emu_timer *timer = _timer_alloc_common(callback, NULL, NULL, file, line, func, FALSE);
-
- /* adjust to our liking */
+ emu_timer *timer = _timer_alloc_common(callback, ptr, file, line, func, FALSE);
timer_adjust(timer, period, param, period);
}
-void _timer_pulse_ptr(attotime period, void *param, void (*callback)(running_machine *, void *), const char *file, int line, const char *func)
-{
- emu_timer *timer = _timer_alloc_common(NULL, callback, param, file, line, func, FALSE);
-
- /* adjust to our liking */
- timer_adjust_ptr(timer, period, period);
-}
-
/*-------------------------------------------------
timer_set - allocate a one-shot timer, which
calls the callback after the given duration
-------------------------------------------------*/
-void _timer_set(attotime duration, INT32 param, void (*callback)(running_machine *, int), const char *file, int line, const char *func)
+void _timer_set_internal(attotime duration, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func)
{
- emu_timer *timer = _timer_alloc_common(callback, NULL, NULL, file, line, func, TRUE);
-
- /* adjust to our liking */
+ emu_timer *timer = _timer_alloc_common(callback, ptr, file, line, func, TRUE);
timer_adjust(timer, duration, param, attotime_zero);
}
-void _timer_set_ptr(attotime duration, void *param, void (*callback)(running_machine *, void *), const char *file, int line, const char *func)
-{
- emu_timer *timer = _timer_alloc_common(NULL, callback, param, file, line, func, TRUE);
-
- /* adjust to our liking */
- timer_adjust_ptr(timer, duration, attotime_zero);
-}
-
/***************************************************************************
@@ -661,11 +608,7 @@ void _timer_set_ptr(attotime duration, void *param, void (*callback)(running_mac
void timer_reset(emu_timer *which, attotime duration)
{
- /* adjust the timer */
- if (!which->ptr)
- timer_adjust(which, duration, which->callback_param, which->period);
- else
- timer_adjust_ptr(which, duration, which->period);
+ timer_adjust(which, duration, which->param, which->period);
}
@@ -708,13 +651,13 @@ int timer_enabled(emu_timer *which)
int timer_get_param(emu_timer *which)
{
- return which->callback_param;
+ return which->param;
}
void *timer_get_param_ptr(emu_timer *which)
{
- return which->callback_ptr_param;
+ return which->ptr;
}
diff --git a/src/emu/timer.h b/src/emu/timer.h
index e8193b4b170..afc25da583d 100644
--- a/src/emu/timer.h
+++ b/src/emu/timer.h
@@ -37,16 +37,13 @@
#define PERIOD_OF_555_ASTABLE(r1,r2,c) ATTOTIME_IN_NSEC((attoseconds_t)( 693000000 * ((double)(r1) + 2.0 * (double)(r2)) * (double)(c)))
/* macros that map all allocations to provide file/line/functions to the callee */
-#define timer_alloc(c) _timer_alloc(c, __FILE__, __LINE__, #c)
-#define timer_alloc_ptr(c,p) _timer_alloc_ptr(c, p, __FILE__, __LINE__, #c)
-#define timer_pulse(e,p,c) _timer_pulse(e, p, c, __FILE__, __LINE__, #c)
-#define timer_pulse_ptr(e,p,c) _timer_pulse_ptr(e, p, c, __FILE__, __LINE__, #c)
-#define timer_set(d,p,c) _timer_set(d, p, c, __FILE__, __LINE__, #c)
-#define timer_set_ptr(d,p,c) _timer_set_ptr(d, p, c, __FILE__, __LINE__, #c)
+#define timer_alloc(c,ptr) _timer_alloc_internal(c, ptr, __FILE__, __LINE__, #c)
+#define timer_pulse(e,ptr,p,c) _timer_pulse_internal(e, ptr, p, c, __FILE__, __LINE__, #c)
+#define timer_set(d,ptr,p,c) _timer_set_internal(d, ptr, p, c, __FILE__, __LINE__, #c)
+#define timer_call_after_resynch(ptr,p,c) _timer_set_internal(attotime_zero, ptr, p, c, __FILE__, __LINE__, #c)
/* macros for a timer callback functions */
-#define TIMER_CALLBACK(name) void name(running_machine *machine, int param)
-#define TIMER_CALLBACK_PTR(name) void name(running_machine *machine, void *param)
+#define TIMER_CALLBACK(name) void name(running_machine *machine, void *ptr, int param)
@@ -54,6 +51,9 @@
TYPE DEFINITIONS
***************************************************************************/
+/* a timer callback looks like this */
+typedef void (*timer_callback)(running_machine *machine, void *ptr, INT32 param);
+
/* opaque type for representing a timer */
typedef struct _emu_timer emu_timer;
@@ -104,24 +104,20 @@ int timer_count_anonymous(void);
/* ----- core timer management ----- */
/* allocate a permament timer that isn't primed yet */
-emu_timer *_timer_alloc(void (*callback)(running_machine *, int), const char *file, int line, const char *func);
-emu_timer *_timer_alloc_ptr(void (*callback)(running_machine *, void *), void *param, const char *file, int line, const char *func);
+emu_timer *_timer_alloc_internal(timer_callback callback, void *param, const char *file, int line, const char *func);
/* adjust the time when this timer will fire, and whether or not it will fire periodically */
void timer_adjust(emu_timer *which, attotime duration, INT32 param, attotime period);
-void timer_adjust_ptr(emu_timer *which, attotime duration, attotime period);
/* ----- anonymous timer management ----- */
-/* allocate a pulse timer, which repeatedly calls the callback using the given period */
-void _timer_pulse(attotime period, INT32 param, void (*callback)(running_machine *, int), const char *file, int line, const char *func);
-void _timer_pulse_ptr(attotime period, void *param, void (*callback)(running_machine *, void *), const char *file, int line, const char *func);
-
/* allocate a one-shot timer, which calls the callback after the given duration */
-void _timer_set(attotime duration, INT32 param, void (*callback)(running_machine *, int), const char *file, int line, const char *func);
-void _timer_set_ptr(attotime duration, void *param, void (*callback)(running_machine *, void *), const char *file, int line, const char *func);
+void _timer_set_internal(attotime druation, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func);
+
+/* allocate a pulse timer, which repeatedly calls the callback using the given period */
+void _timer_pulse_internal(attotime period, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func);
@@ -160,26 +156,4 @@ attotime timer_starttime(emu_timer *which);
attotime timer_firetime(emu_timer *which);
-
-
-/***************************************************************************
- INLINE FUNCTIONS
-***************************************************************************/
-
-/*-------------------------------------------------
- timer_call_after_resynch - synchs the CPUs
- and calls the callback immediately
--------------------------------------------------*/
-
-INLINE void timer_call_after_resynch(INT32 param, void (*callback)(running_machine *, int))
-{
- timer_set(attotime_zero, param, callback);
-}
-
-INLINE void timer_call_after_resynch_ptr(void *param, void (*callback)(running_machine *, void *))
-{
- timer_set_ptr(attotime_zero, param, callback);
-}
-
-
#endif /* __TIMER_H__ */
diff --git a/src/emu/ui.c b/src/emu/ui.c
index 4267422f0f7..adbef791c1c 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -367,11 +367,11 @@ int ui_display_startup_screens(int first_time, int show_disclaimer)
/* loop while we have a handler */
while (ui_handler_callback != handler_ingame && !mame_is_scheduled_event_pending(Machine) && !ui_menu_is_force_game_select())
- video_frame_update();
+ video_frame_update(FALSE);
/* clear the handler and force an update */
ui_set_handler(handler_ingame, 0);
- video_frame_update();
+ video_frame_update(FALSE);
}
/* if we're the empty driver, force the menus on */
@@ -400,7 +400,7 @@ void ui_set_startup_text(const char *text, int force)
if (force || (curtime - lastupdatetime) > osd_ticks_per_second() / 4)
{
lastupdatetime = curtime;
- video_frame_update();
+ video_frame_update(FALSE);
}
}
diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c
index b33f3e6eecd..4f1aeaf7e0d 100644
--- a/src/emu/uimenu.c
+++ b/src/emu/uimenu.c
@@ -229,8 +229,8 @@ INLINE int get_num_dips(void)
{
int num = 0;
- while (dip_switch_model[num].dip_name != NULL && num++ < MAX_PHYSICAL_DIPS)
- ;
+ while (dip_switch_model[num].dip_name != NULL && num < MAX_PHYSICAL_DIPS)
+ num++;
return num;
}
diff --git a/src/emu/video.c b/src/emu/video.c
index d7c98cda799..f89b961ed89 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -300,7 +300,7 @@ void video_init(running_machine *machine)
internal_screen_info *info = &viddata->scrinfo[scrnum];
/* allocate a timer to reset partial updates */
- info->scanline0_timer = timer_alloc(scanline0_callback);
+ info->scanline0_timer = timer_alloc(scanline0_callback, NULL);
/* make pointers back to the config and state */
info->config = &machine->drv->screen[scrnum];
@@ -1016,7 +1016,7 @@ static TIMER_CALLBACK( scanline0_callback )
operations
-------------------------------------------------*/
-void video_frame_update(void)
+void video_frame_update(int debug)
{
attotime current_time = timer_get_time();
int skipped_it = global.skipping_this_frame;
@@ -1026,7 +1026,7 @@ void video_frame_update(void)
#ifdef MAME_DEBUG
if (phase == MAME_PHASE_RUNNING)
#else
- if (phase == MAME_PHASE_RUNNING && !mame_is_paused(Machine))
+ if (phase == MAME_PHASE_RUNNING && (debug || !mame_is_paused(Machine)))
#endif
{
int anything_changed = finish_screen_updates(Machine);
@@ -1044,30 +1044,32 @@ void video_frame_update(void)
ui_update_and_render();
/* if we're throttling, synchronize before rendering */
- if (!skipped_it && effective_throttle())
+ if (!debug && !skipped_it && effective_throttle())
update_throttle(current_time);
/* ask the OSD to update */
profiler_mark(PROFILER_BLIT);
- osd_update(skipped_it);
+ osd_update(!debug && skipped_it);
profiler_mark(PROFILER_END);
/* perform tasks for this frame */
- mame_frame_update(Machine);
+ if (!debug)
+ mame_frame_update(Machine);
/* update frameskipping */
- update_frameskip();
+ if (!debug)
+ update_frameskip();
/* update speed computations */
- if (!skipped_it)
+ if (!debug && !skipped_it)
recompute_speed(current_time);
/* call the end-of-frame callback */
if (phase == MAME_PHASE_RUNNING)
{
/* reset partial updates if we're paused or if the debugger is active */
- if (video_screen_exists(0) && (mame_is_paused(Machine) || mame_debug_is_active()))
- scanline0_callback(Machine, 0);
+ if (video_screen_exists(0) && (mame_is_paused(Machine) || debug || mame_debug_is_active()))
+ scanline0_callback(Machine, NULL, 0);
/* otherwise, call the video EOF callback */
else if (Machine->drv->video_eof != NULL)
diff --git a/src/emu/video.h b/src/emu/video.h
index da602318588..7f031bd49ee 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -117,7 +117,7 @@ int video_screen_exists(int scrnum);
/* ----- global rendering ----- */
/* update the screen, handling frame skipping and rendering */
-void video_frame_update(void);
+void video_frame_update(int debug);
/* ----- throttling/frameskipping/performance ----- */
diff --git a/src/emu/video/crtc6845.c b/src/emu/video/crtc6845.c
index 69040b0b892..34eb9bcc78d 100644
--- a/src/emu/video/crtc6845.c
+++ b/src/emu/video/crtc6845.c
@@ -54,7 +54,7 @@ static crtc6845_state crtc6845;
static void crtc6845_state_save_postload(void *param);
static void configure_screen(crtc6845_state *chip, int postload);
static void update_timer(crtc6845_state *chip);
-static TIMER_CALLBACK_PTR( display_enable_changed_timer_cb );
+static TIMER_CALLBACK( display_enable_changed_timer_cb );
void crtc6845_init(void)
@@ -98,7 +98,7 @@ void crtc6845_config(int which, const crtc6845_interface *intf)
/* create the timer if the user is interested in getting display enable
notifications */
if (intf->display_enable_changed)
- chip->display_enable_changed_timer = timer_alloc_ptr(display_enable_changed_timer_cb, chip);
+ chip->display_enable_changed_timer = timer_alloc(display_enable_changed_timer_cb, chip);
}
@@ -334,14 +334,14 @@ static void update_timer(crtc6845_state *chip)
else
duration = attotime_never;
- timer_adjust_ptr(chip->display_enable_changed_timer, duration, attotime_never);
+ timer_adjust(chip->display_enable_changed_timer, duration, 0, attotime_never);
}
}
-static TIMER_CALLBACK_PTR( display_enable_changed_timer_cb )
+static TIMER_CALLBACK( display_enable_changed_timer_cb )
{
- crtc6845_state *chip = param;
+ crtc6845_state *chip = ptr;
/* call the callback function -- we know it exists */
chip->intf->display_enable_changed(is_display_enabled(chip));
diff --git a/src/emu/video/rgbvmx.h b/src/emu/video/rgbvmx.h
index bb215d1966a..cab5ac26034 100644
--- a/src/emu/video/rgbvmx.h
+++ b/src/emu/video/rgbvmx.h
@@ -12,7 +12,9 @@
#ifndef __RGBVMX__
#define __RGBVMX__
+#ifndef __APPLE_ALTIVEC__
#include <altivec.h>
+#endif
/***************************************************************************
diff --git a/src/emu/video/tms34061.c b/src/emu/video/tms34061.c
index 49d20d31da2..f601842cd1d 100644
--- a/src/emu/video/tms34061.c
+++ b/src/emu/video/tms34061.c
@@ -117,7 +117,7 @@ void tms34061_start(struct tms34061_interface *interface)
tms34061.regs[TMS34061_VERCOUNTER] = 0x0000;
/* start vertical interrupt timer */
- tms34061.timer = timer_alloc(tms34061_interrupt);
+ tms34061.timer = timer_alloc(tms34061_interrupt, NULL);
}
diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c
index 4ff1e60257e..342878ca4b7 100644
--- a/src/emu/video/voodoo.c
+++ b/src/emu/video/voodoo.c
@@ -199,9 +199,9 @@ static void init_tmu(voodoo_state *v, tmu_state *t, int type, voodoo_reg *reg, v
static void soft_reset(voodoo_state *v);
static void check_stalled_cpu(voodoo_state *v, attotime current_time);
static void flush_fifos(voodoo_state *v, attotime current_time);
-static TIMER_CALLBACK_PTR( stall_cpu_callback );
+static TIMER_CALLBACK( stall_cpu_callback );
static void stall_cpu(voodoo_state *v, int state, attotime current_time);
-static TIMER_CALLBACK_PTR( vblank_callback );
+static TIMER_CALLBACK( vblank_callback );
static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data);
static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask, int forcefront);
static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data);
@@ -380,7 +380,7 @@ void voodoo_start(int which, int scrnum, int type, int fbmem_in_mb, int tmem0_in
v->pci.fifo.size = 64*2;
v->pci.fifo.in = v->pci.fifo.out = 0;
v->pci.stall_state = NOT_STALLED;
- v->pci.continue_timer = timer_alloc_ptr(stall_cpu_callback, v);
+ v->pci.continue_timer = timer_alloc(stall_cpu_callback, v);
/* allocate memory */
if (type <= VOODOO_2)
@@ -803,7 +803,7 @@ static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem)
}
/* allocate a VBLANK timer */
- f->vblank_timer = timer_alloc_ptr(vblank_callback, v);
+ f->vblank_timer = timer_alloc(vblank_callback, v);
f->vblank = FALSE;
/* initialize the memory FIFO */
@@ -1087,13 +1087,13 @@ static void adjust_vblank_timer(voodoo_state *v)
/* if zero, adjust to next frame, otherwise we may get stuck in an infinite loop */
if (attotime_compare(vblank_period, attotime_zero) == 0)
vblank_period = video_screen_get_frame_period(v->scrnum);
- timer_adjust_ptr(v->fbi.vblank_timer, vblank_period, attotime_never);
+ timer_adjust(v->fbi.vblank_timer, vblank_period, 0, attotime_never);
}
-static TIMER_CALLBACK_PTR( vblank_off_callback )
+static TIMER_CALLBACK( vblank_off_callback )
{
- voodoo_state *v = param;
+ voodoo_state *v = ptr;
if (LOG_VBLANK_SWAP) logerror("--- vblank end\n");
@@ -1107,9 +1107,9 @@ static TIMER_CALLBACK_PTR( vblank_off_callback )
}
-static TIMER_CALLBACK_PTR( vblank_callback )
+static TIMER_CALLBACK( vblank_callback )
{
- voodoo_state *v = param;
+ voodoo_state *v = ptr;
if (LOG_VBLANK_SWAP) logerror("--- vblank start\n");
@@ -1135,7 +1135,7 @@ static TIMER_CALLBACK_PTR( vblank_callback )
swap_buffers(v);
/* set a timer for the next off state */
- timer_set_ptr(video_screen_get_time_until_pos(v->scrnum, 0, 0), v, vblank_off_callback);
+ timer_set(video_screen_get_time_until_pos(v->scrnum, 0, 0), v, 0, vblank_off_callback);
/* set internal state and call the client */
v->fbi.vblank = TRUE;
@@ -2139,9 +2139,9 @@ static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 da
*
*************************************/
-static TIMER_CALLBACK_PTR( stall_cpu_callback )
+static TIMER_CALLBACK( stall_cpu_callback )
{
- check_stalled_cpu(param, timer_get_time());
+ check_stalled_cpu(ptr, timer_get_time());
}
@@ -2194,7 +2194,7 @@ static void check_stalled_cpu(voodoo_state *v, attotime current_time)
/* if not, set a timer for the next one */
else
{
- timer_adjust_ptr(v->pci.continue_timer, attotime_sub(v->pci.op_end_time, current_time), attotime_never);
+ timer_adjust(v->pci.continue_timer, attotime_sub(v->pci.op_end_time, current_time), 0, attotime_never);
}
}
@@ -2215,7 +2215,7 @@ static void stall_cpu(voodoo_state *v, int state, attotime current_time)
cpu_spinuntil_trigger(v->trigger);
/* set a timer to clear the stall */
- timer_adjust_ptr(v->pci.continue_timer, attotime_sub(v->pci.op_end_time, current_time), attotime_never);
+ timer_adjust(v->pci.continue_timer, attotime_sub(v->pci.op_end_time, current_time), 0, attotime_never);
}
diff --git a/src/mame/audio/8080bw.c b/src/mame/audio/8080bw.c
index 929fff1efc2..03e8a764a0c 100644
--- a/src/mame/audio/8080bw.c
+++ b/src/mame/audio/8080bw.c
@@ -882,7 +882,7 @@ static TIMER_CALLBACK( schaser_effect_555_cb )
MACHINE_START( schaser )
{
- schaser_effect_555_timer = timer_alloc(schaser_effect_555_cb);
+ schaser_effect_555_timer = timer_alloc(schaser_effect_555_cb, NULL);
machine_start_mw8080bw(machine);
}
diff --git a/src/mame/audio/amiga.c b/src/mame/audio/amiga.c
index 1fd3e647061..0d257a3e1cf 100644
--- a/src/mame/audio/amiga.c
+++ b/src/mame/audio/amiga.c
@@ -241,7 +241,7 @@ static void amiga_stream_update(void *param, stream_sample_t **inputs, stream_sa
/* if we're in manual mode, signal an interrupt once we latch the low byte */
if (!chan->dmaenabled && chan->manualmode && (chan->curlocation & 1))
{
- signal_irq(Machine, channum);
+ signal_irq(Machine, NULL, channum);
chan->manualmode = FALSE;
}
}
@@ -271,7 +271,7 @@ void *amiga_sh_start(int clock, const struct CustomSound_interface *config)
for (i = 0; i < 4; i++)
{
audio_state->channel[i].index = i;
- audio_state->channel[i].irq_timer = timer_alloc(signal_irq);
+ audio_state->channel[i].irq_timer = timer_alloc(signal_irq, NULL);
}
/* create the stream */
diff --git a/src/mame/audio/cage.c b/src/mame/audio/cage.c
index 0fe66ed9ea1..9c5f6afcec1 100644
--- a/src/mame/audio/cage.c
+++ b/src/mame/audio/cage.c
@@ -139,7 +139,7 @@ static const char *register_names[] =
*************************************/
static TIMER_CALLBACK( dma_timer_callback );
-static TIMER_CALLBACK( timer_callback );
+static TIMER_CALLBACK( cage_timer_callback );
static void update_timer(int which);
static WRITE32_HANDLER( speedup_w );
@@ -164,9 +164,9 @@ void cage_init(int boot_region, offs_t speedup)
cage_cpu_clock_period = ATTOTIME_IN_HZ(Machine->drv->cpu[cage_cpu].clock);
cage_cpu_h1_clock_period = attotime_mul(cage_cpu_clock_period, 2);
- dma_timer = timer_alloc(dma_timer_callback);
- timer[0] = timer_alloc(timer_callback);
- timer[1] = timer_alloc(timer_callback);
+ dma_timer = timer_alloc(dma_timer_callback, NULL);
+ timer[0] = timer_alloc(cage_timer_callback, NULL);
+ timer[1] = timer_alloc(cage_timer_callback, NULL);
if (speedup)
speedup_ram = memory_install_write32_handler(cage_cpu, ADDRESS_SPACE_PROGRAM, speedup, speedup, 0, 0, speedup_w);
@@ -276,7 +276,7 @@ static void update_dma_state(void)
*
*************************************/
-static TIMER_CALLBACK( timer_callback )
+static TIMER_CALLBACK( cage_timer_callback )
{
int which = param;
@@ -521,7 +521,7 @@ void main_to_cage_w(UINT16 data)
{
if (LOG_COMM)
logerror("%06X:Command to CAGE = %04X\n", activecpu_get_pc(), data);
- timer_call_after_resynch(data, deferred_cage_w);
+ timer_call_after_resynch(NULL, data, deferred_cage_w);
}
diff --git a/src/mame/audio/cchasm.c b/src/mame/audio/cchasm.c
index 0bca6fce629..c5d9453d284 100644
--- a/src/mame/audio/cchasm.c
+++ b/src/mame/audio/cchasm.c
@@ -182,7 +182,7 @@ SOUND_START( cchasm )
ctc_intf.baseclock = machine->drv->cpu[1].clock;
z80ctc_init (0, &ctc_intf);
- timer_pulse(attotime_make(0, machine->screen[0].refresh), 0, cchasm_sh_update);
+ timer_pulse(attotime_make(0, machine->screen[0].refresh), NULL, 0, cchasm_sh_update);
}
diff --git a/src/mame/audio/cinemat.c b/src/mame/audio/cinemat.c
index 3e0f1e70783..1a634309bf9 100644
--- a/src/mame/audio/cinemat.c
+++ b/src/mame/audio/cinemat.c
@@ -1426,7 +1426,7 @@ static void demon_sound_w(UINT8 sound_val, UINT8 bits_changed)
/* watch for a 0->1 edge on bit 4 ("shift in") to clock in the new data */
if ((bits_changed & 0x10) && (sound_val & 0x10))
- timer_call_after_resynch(sound_val & 0x0f, synced_sound_w);
+ timer_call_after_resynch(NULL, sound_val & 0x0f, synced_sound_w);
}
diff --git a/src/mame/audio/dcs.c b/src/mame/audio/dcs.c
index fa3dc1087aa..a4b778b0342 100644
--- a/src/mame/audio/dcs.c
+++ b/src/mame/audio/dcs.c
@@ -891,14 +891,14 @@ void dcs_init(void)
dcs.sounddata_words = dcs.bootrom_words;
/* create the timers */
- dcs.internal_timer = timer_alloc(internal_timer_callback);
- dcs.reg_timer = timer_alloc(dcs_irq);
+ dcs.internal_timer = timer_alloc(internal_timer_callback, NULL);
+ dcs.reg_timer = timer_alloc(dcs_irq, NULL);
/* non-RAM based automatically acks */
dcs.auto_ack = TRUE;
/* reset the system */
- dcs_reset(Machine, 0);
+ dcs_reset(Machine, NULL, 0);
}
@@ -942,9 +942,9 @@ void dcs2_init(int dram_in_mb, offs_t polling_offset)
dcs_sram = auto_malloc(0x8000*4);
/* create the timers */
- dcs.internal_timer = timer_alloc(internal_timer_callback);
- dcs.reg_timer = timer_alloc(dcs_irq);
- dcs.sport_timer = timer_alloc(sport0_irq);
+ dcs.internal_timer = timer_alloc(internal_timer_callback, NULL);
+ dcs.reg_timer = timer_alloc(dcs_irq, NULL);
+ dcs.sport_timer = timer_alloc(sport0_irq, NULL);
/* we don't do auto-ack by default */
dcs.auto_ack = FALSE;
@@ -955,10 +955,10 @@ void dcs2_init(int dram_in_mb, offs_t polling_offset)
/* allocate a watchdog timer for HLE transfers */
if (HLE_TRANSFERS)
- transfer.watchdog = timer_alloc(transfer_watchdog_callback);
+ transfer.watchdog = timer_alloc(transfer_watchdog_callback, NULL);
/* reset the system */
- dcs_reset(Machine, 0);
+ dcs_reset(Machine, NULL, 0);
}
@@ -1449,7 +1449,7 @@ void dcs_reset_w(int state)
logerror("%08x: DCS reset = %d\n", safe_activecpu_get_pc(), state);
/* just run through the init code again */
- timer_call_after_resynch(0, dcs_reset);
+ timer_call_after_resynch(NULL, 0, dcs_reset);
cpunum_set_input_line(dcs.cpunum, INPUT_LINE_RESET, ASSERT_LINE);
}
@@ -1523,7 +1523,7 @@ void dcs_data_w(int data)
/* if we are DCS1, set a timer to latch the data */
if (!dcs.sport_timer)
- timer_call_after_resynch(data, dcs_delayed_data_w_callback);
+ timer_call_after_resynch(NULL, data, dcs_delayed_data_w_callback);
else
dcs_delayed_data_w(data);
}
@@ -1566,7 +1566,7 @@ static WRITE16_HANDLER( output_latch_w )
{
if (LOG_DCS_IO)
logerror("%08X:output_latch_w(%04X) (empty=%d)\n", activecpu_get_pc(), data, IS_OUTPUT_EMPTY());
- timer_call_after_resynch(data, latch_delayed_w);
+ timer_call_after_resynch(NULL, data, latch_delayed_w);
}
@@ -1584,7 +1584,7 @@ static TIMER_CALLBACK( delayed_ack_w_callback )
void dcs_ack_w(void)
{
- timer_call_after_resynch(0, delayed_ack_w_callback);
+ timer_call_after_resynch(NULL, 0, delayed_ack_w_callback);
}
@@ -1620,7 +1620,7 @@ static WRITE16_HANDLER( output_control_w )
{
if (LOG_DCS_IO)
logerror("%04X:output_control = %04X\n", activecpu_get_pc(), data);
- timer_call_after_resynch(data, output_control_delayed_w);
+ timer_call_after_resynch(NULL, data, output_control_delayed_w);
}
@@ -2045,7 +2045,7 @@ static TIMER_CALLBACK( s1_ack_callback2 )
/* if the output is full, stall for a usec */
if (IS_OUTPUT_FULL())
{
- timer_set(ATTOTIME_IN_USEC(1), param, s1_ack_callback2);
+ timer_set(ATTOTIME_IN_USEC(1), NULL, param, s1_ack_callback2);
return;
}
output_latch_w(0, 0x000a, 0);
@@ -2057,13 +2057,13 @@ static TIMER_CALLBACK( s1_ack_callback1 )
/* if the output is full, stall for a usec */
if (IS_OUTPUT_FULL())
{
- timer_set(ATTOTIME_IN_USEC(1), param, s1_ack_callback1);
+ timer_set(ATTOTIME_IN_USEC(1), NULL, param, s1_ack_callback1);
return;
}
output_latch_w(0, param, 0);
/* chain to the next word we need to write back */
- timer_set(ATTOTIME_IN_USEC(1), 0, s1_ack_callback2);
+ timer_set(ATTOTIME_IN_USEC(1), NULL, 0, s1_ack_callback2);
}
@@ -2173,7 +2173,7 @@ static int preprocess_stage_1(UINT16 data)
/* if we're done, start a timer to send the response words */
if (transfer.state == 0)
- timer_set(ATTOTIME_IN_USEC(1), transfer.sum, s1_ack_callback1);
+ timer_set(ATTOTIME_IN_USEC(1), NULL, transfer.sum, s1_ack_callback1);
return 1;
}
break;
@@ -2187,7 +2187,7 @@ static TIMER_CALLBACK( s2_ack_callback )
/* if the output is full, stall for a usec */
if (IS_OUTPUT_FULL())
{
- timer_set(ATTOTIME_IN_USEC(1), param, s2_ack_callback);
+ timer_set(ATTOTIME_IN_USEC(1), NULL, param, s2_ack_callback);
return;
}
output_latch_w(0, param, 0);
@@ -2275,7 +2275,7 @@ static int preprocess_stage_2(UINT16 data)
/* if we're done, start a timer to send the response words */
if (transfer.state == 0)
{
- timer_set(ATTOTIME_IN_USEC(1), transfer.sum, s2_ack_callback);
+ timer_set(ATTOTIME_IN_USEC(1), NULL, transfer.sum, s2_ack_callback);
timer_adjust(transfer.watchdog, attotime_never, 0, attotime_never);
}
return 1;
diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c
index bb0bd4dbaf7..66fb86e8eea 100644
--- a/src/mame/audio/dkong.c
+++ b/src/mame/audio/dkong.c
@@ -72,12 +72,13 @@ static double envelope,tt;
static UINT8 decay;
static UINT8 sh1_count = 0;
-enum {
+enum
+{
WAIT_CMD,
WAIT_WRITE,
WAIT_DONE1,
WAIT_DONE2
-} m58817_states;
+};
static UINT8 m58817_state;
static UINT8 m58817_drq;
diff --git a/src/mame/audio/exidy.c b/src/mame/audio/exidy.c
index 2a17da57713..e5f4d4ea26c 100644
--- a/src/mame/audio/exidy.c
+++ b/src/mame/audio/exidy.c
@@ -420,7 +420,7 @@ static void *common_start(void)
sh6840_LFSR_3 = 0xffffffff;
/* Init 6532 */
- riot_timer = timer_alloc(riot_interrupt);
+ riot_timer = timer_alloc(riot_interrupt, NULL);
riot_irq_flag = 0;
riot_timer_irq_enable = 0;
riot_porta_data = 0xff;
diff --git a/src/mame/audio/galaxian.c b/src/mame/audio/galaxian.c
index fca80a2e262..ee1681dbdf8 100644
--- a/src/mame/audio/galaxian.c
+++ b/src/mame/audio/galaxian.c
@@ -363,12 +363,12 @@ static void galaxian_sh_start(void)
sample_set_volume(CHANNEL_LFO+2,0);
sample_start_raw(CHANNEL_LFO+2,backgroundwave,sizeof(backgroundwave)/2,1000,1);
- noisetimer = timer_alloc(noise_timer_cb);
+ noisetimer = timer_alloc(noise_timer_cb, NULL);
timer_adjust(noisetimer, ATTOTIME_IN_NSEC((155000+22000)/100*693*22), 0, ATTOTIME_IN_NSEC((155000+22000)/100*693*22));
- lfotimer = timer_alloc(lfo_timer_cb);
+ lfotimer = timer_alloc(lfo_timer_cb, NULL);
- timer_pulse(attotime_make(0, Machine->screen[0].refresh), 0, galaxian_sh_update);
+ timer_pulse(attotime_make(0, Machine->screen[0].refresh), NULL, 0, galaxian_sh_update);
state_save_register_global(freq);
state_save_register_global(noise_enable);
diff --git a/src/mame/audio/geebee.c b/src/mame/audio/geebee.c
index b6e14dd11e2..9f1e2996820 100644
--- a/src/mame/audio/geebee.c
+++ b/src/mame/audio/geebee.c
@@ -125,6 +125,6 @@ void *geebee_sh_start(int clock, const struct CustomSound_interface *config)
channel = stream_create(0, 1, 18432000 / 3 / 2 / 384, NULL, geebee_sound_update);
vcount = 0;
- volume_timer = timer_alloc(volume_decay);
+ volume_timer = timer_alloc(volume_decay, NULL);
return auto_malloc(1);
}
diff --git a/src/mame/audio/gottlieb.c b/src/mame/audio/gottlieb.c
index 2236a5e9cf8..37b06994e66 100644
--- a/src/mame/audio/gottlieb.c
+++ b/src/mame/audio/gottlieb.c
@@ -150,7 +150,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(ATTOTIME_IN_USEC(50),0,gottlieb_nmi_generate);
+ timer_set(ATTOTIME_IN_USEC(50), NULL,0,gottlieb_nmi_generate);
}
WRITE8_HANDLER( gottlieb_speech_clock_DAC_w )
@@ -209,7 +209,7 @@ static UINT8 sp0250_latch;
static TIMER_CALLBACK( nmi_callback );
void gottlieb_sound_init(void)
{
- nmi_timer = timer_alloc(nmi_callback);
+ nmi_timer = timer_alloc(nmi_callback, NULL);
}
void stooges_sp0250_drq(int level)
diff --git a/src/mame/audio/harddriv.c b/src/mame/audio/harddriv.c
index 3319698e5cf..77492690cc7 100644
--- a/src/mame/audio/harddriv.c
+++ b/src/mame/audio/harddriv.c
@@ -110,7 +110,7 @@ static TIMER_CALLBACK( delayed_68k_w )
WRITE16_HANDLER( hd68k_snd_data_w )
{
- timer_call_after_resynch(data, delayed_68k_w);
+ timer_call_after_resynch(NULL, data, delayed_68k_w);
logerror("%06X:main write to sound=%04X\n", activecpu_get_previouspc(), data);
}
diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c
index 68b7bbc1574..0cf69bad491 100644
--- a/src/mame/audio/irem.c
+++ b/src/mame/audio/irem.c
@@ -98,7 +98,7 @@ if (data&0x0f) popmessage("analog sound %x",data&0x0f);
}
-struct AY8910interface irem_ay8910_interface_1 =
+static struct AY8910interface irem_ay8910_interface_1 =
{
soundlatch_r,
0,
@@ -106,7 +106,7 @@ struct AY8910interface irem_ay8910_interface_1 =
irem_msm5205_w
};
-struct AY8910interface irem_ay8910_interface_2 =
+static struct AY8910interface irem_ay8910_interface_2 =
{
0,
0,
@@ -114,13 +114,13 @@ struct AY8910interface irem_ay8910_interface_2 =
0
};
-struct MSM5205interface irem_msm5205_interface_1 =
+static struct MSM5205interface irem_msm5205_interface_1 =
{
irem_adpcm_int, /* interrupt function */
MSM5205_S96_4B /* default to 4KHz, but can be changed at run time */
};
-struct MSM5205interface irem_msm5205_interface_2 =
+static struct MSM5205interface irem_msm5205_interface_2 =
{
0, /* interrupt function */
MSM5205_SEX_4B /* default to 4KHz, but can be changed at run time, slave */
diff --git a/src/mame/audio/jaguar.c b/src/mame/audio/jaguar.c
index a9ae49e29a6..1f10cb98718 100644
--- a/src/mame/audio/jaguar.c
+++ b/src/mame/audio/jaguar.c
@@ -285,9 +285,9 @@ void cojag_sound_init(void)
void cojag_sound_reset(void)
{
#if ENABLE_SPEEDUP_HACKS
- serial_timer = timer_alloc(serial_chunky_callback);
+ serial_timer = timer_alloc(serial_chunky_callback, NULL);
#else
- serial_timer = timer_alloc(serial_callback);
+ serial_timer = timer_alloc(serial_callback, NULL);
#endif
}
diff --git a/src/mame/audio/leland.c b/src/mame/audio/leland.c
index 9539235c2ee..188876fdb0d 100644
--- a/src/mame/audio/leland.c
+++ b/src/mame/audio/leland.c
@@ -526,17 +526,17 @@ void *leland_80186_sh_start(int clock, const struct CustomSound_interface *confi
is_redline = 0;
/* create timers here so they stick around */
- i80186.timer[0].int_timer = timer_alloc(internal_timer_int);
- i80186.timer[1].int_timer = timer_alloc(internal_timer_int);
- i80186.timer[2].int_timer = timer_alloc(internal_timer_int);
- i80186.timer[0].time_timer = timer_alloc(NULL);
- i80186.timer[1].time_timer = timer_alloc(NULL);
- i80186.timer[2].time_timer = timer_alloc(NULL);
- i80186.dma[0].finish_timer = timer_alloc(dma_timer_callback);
- i80186.dma[1].finish_timer = timer_alloc(dma_timer_callback);
+ i80186.timer[0].int_timer = timer_alloc(internal_timer_int, NULL);
+ i80186.timer[1].int_timer = timer_alloc(internal_timer_int, NULL);
+ i80186.timer[2].int_timer = timer_alloc(internal_timer_int, NULL);
+ i80186.timer[0].time_timer = timer_alloc(NULL, NULL);
+ i80186.timer[1].time_timer = timer_alloc(NULL, NULL);
+ i80186.timer[2].time_timer = timer_alloc(NULL, NULL);
+ i80186.dma[0].finish_timer = timer_alloc(dma_timer_callback, NULL);
+ i80186.dma[1].finish_timer = timer_alloc(dma_timer_callback, NULL);
for (i = 0; i < 9; i++)
- counter[i].timer = timer_alloc(NULL);
+ counter[i].timer = timer_alloc(NULL, NULL);
return auto_malloc(1);
}
@@ -1720,7 +1720,7 @@ static TIMER_CALLBACK( command_lo_sync )
WRITE8_HANDLER( leland_80186_command_lo_w )
{
- timer_call_after_resynch(data, command_lo_sync);
+ timer_call_after_resynch(NULL, data, command_lo_sync);
}
@@ -1775,7 +1775,7 @@ READ8_HANDLER( leland_80186_response_r )
if (LOG_COMM) logerror("%04X:Read sound response latch = %02X\n", activecpu_get_previouspc(), sound_response);
/* synchronize the response */
- timer_call_after_resynch(activecpu_get_previouspc() + 2, delayed_response_r);
+ timer_call_after_resynch(NULL, activecpu_get_previouspc() + 2, delayed_response_r);
return sound_response;
}
diff --git a/src/mame/audio/m72.c b/src/mame/audio/m72.c
index ee070e4b3d7..f7b7ef4ef06 100644
--- a/src/mame/audio/m72.c
+++ b/src/mame/audio/m72.c
@@ -107,7 +107,7 @@ static TIMER_CALLBACK( setvector_callback )
MACHINE_RESET( m72_sound )
{
- setvector_callback(machine, VECTOR_INIT);
+ setvector_callback(machine, NULL, VECTOR_INIT);
state_save_register_global(irqvector);
state_save_register_global(sample_addr);
@@ -116,9 +116,9 @@ MACHINE_RESET( m72_sound )
void m72_ym2151_irq_handler(int irq)
{
if (irq)
- timer_call_after_resynch(YM2151_ASSERT,setvector_callback);
+ timer_call_after_resynch(NULL, YM2151_ASSERT,setvector_callback);
else
- timer_call_after_resynch(YM2151_CLEAR,setvector_callback);
+ timer_call_after_resynch(NULL, YM2151_CLEAR,setvector_callback);
}
WRITE16_HANDLER( m72_sound_command_w )
@@ -126,19 +126,19 @@ WRITE16_HANDLER( m72_sound_command_w )
if (ACCESSING_LSB)
{
soundlatch_w(offset,data);
- timer_call_after_resynch(Z80_ASSERT,setvector_callback);
+ timer_call_after_resynch(NULL, Z80_ASSERT,setvector_callback);
}
}
WRITE8_HANDLER( m72_sound_command_byte_w )
{
soundlatch_w(offset,data);
- timer_call_after_resynch(Z80_ASSERT,setvector_callback);
+ timer_call_after_resynch(NULL, Z80_ASSERT,setvector_callback);
}
WRITE8_HANDLER( m72_sound_irq_ack_w )
{
- timer_call_after_resynch(Z80_CLEAR,setvector_callback);
+ timer_call_after_resynch(NULL, Z80_CLEAR,setvector_callback);
}
diff --git a/src/mame/audio/mcr.c b/src/mame/audio/mcr.c
index b1b728521c0..1ca52c94ea7 100644
--- a/src/mame/audio/mcr.c
+++ b/src/mame/audio/mcr.c
@@ -382,7 +382,7 @@ static WRITE8_HANDLER( ssio_portb1_w )
/********* external interfaces ***********/
WRITE8_HANDLER( ssio_data_w )
{
- timer_call_after_resynch((offset << 8) | (data & 0xff), ssio_delayed_data_w);
+ timer_call_after_resynch(NULL, (offset << 8) | (data & 0xff), ssio_delayed_data_w);
}
READ8_HANDLER( ssio_status_r )
@@ -443,7 +443,7 @@ void ssio_set_custom_output(int which, int mask, write8_handler handler)
/********* sound interfaces ***********/
-struct AY8910interface ssio_ay8910_interface_1 =
+static struct AY8910interface ssio_ay8910_interface_1 =
{
0,
0,
@@ -451,7 +451,7 @@ struct AY8910interface ssio_ay8910_interface_1 =
ssio_portb0_w
};
-struct AY8910interface ssio_ay8910_interface_2 =
+static struct AY8910interface ssio_ay8910_interface_2 =
{
0,
0,
@@ -564,7 +564,7 @@ static WRITE16_HANDLER( csdeluxe_pia_w )
/********* external interfaces ***********/
WRITE8_HANDLER( csdeluxe_data_w )
{
- timer_call_after_resynch(data, csdeluxe_delayed_data_w);
+ timer_call_after_resynch(NULL, data, csdeluxe_delayed_data_w);
}
READ8_HANDLER( csdeluxe_status_r )
@@ -664,7 +664,7 @@ static TIMER_CALLBACK( soundsgood_delayed_data_w )
/********* external interfaces ***********/
WRITE8_HANDLER( soundsgood_data_w )
{
- timer_call_after_resynch(data, soundsgood_delayed_data_w);
+ timer_call_after_resynch(NULL, data, soundsgood_delayed_data_w);
}
READ8_HANDLER( soundsgood_status_r )
@@ -755,7 +755,7 @@ static TIMER_CALLBACK( turbocs_delayed_data_w )
/********* external interfaces ***********/
WRITE8_HANDLER( turbocs_data_w )
{
- timer_call_after_resynch(data, turbocs_delayed_data_w);
+ timer_call_after_resynch(NULL, data, turbocs_delayed_data_w);
}
READ8_HANDLER( turbocs_status_r )
@@ -882,7 +882,7 @@ static TIMER_CALLBACK( squawkntalk_delayed_data_w )
/********* external interfaces ***********/
WRITE8_HANDLER( squawkntalk_data_w )
{
- timer_call_after_resynch(data, squawkntalk_delayed_data_w);
+ timer_call_after_resynch(NULL, data, squawkntalk_delayed_data_w);
}
void squawkntalk_reset_w(int state)
diff --git a/src/mame/audio/n8080.c b/src/mame/audio/n8080.c
index b6a820904bc..5e47f32140e 100644
--- a/src/mame/audio/n8080.c
+++ b/src/mame/audio/n8080.c
@@ -30,7 +30,7 @@ static int mono_flop[3];
-struct SN76477interface sheriff_sn76477_interface =
+static struct SN76477interface sheriff_sn76477_interface =
{
RES_K(36) , /* 04 */
RES_K(100) , /* 05 */
@@ -58,7 +58,7 @@ struct SN76477interface sheriff_sn76477_interface =
};
-struct SN76477interface spacefev_sn76477_interface =
+static struct SN76477interface spacefev_sn76477_interface =
{
RES_K(36) , /* 04 */
RES_K(150) , /* 05 */
@@ -342,11 +342,11 @@ static TIMER_CALLBACK( delayed_sound_2_callback )
WRITE8_HANDLER( n8080_sound_1_w )
{
- timer_call_after_resynch(data, delayed_sound_1_callback); /* force CPUs to sync */
+ timer_call_after_resynch(NULL, data, delayed_sound_1_callback); /* force CPUs to sync */
}
WRITE8_HANDLER( n8080_sound_2_w )
{
- timer_call_after_resynch(data, delayed_sound_2_callback); /* force CPUs to sync */
+ timer_call_after_resynch(NULL, data, delayed_sound_2_callback); /* force CPUs to sync */
}
@@ -470,11 +470,11 @@ static MACHINE_RESET( spacefev_sound )
{
n8080_hardware = 1;
- timer_pulse(ATTOTIME_IN_HZ(1000), 0, spacefev_vco_voltage_timer);
+ timer_pulse(ATTOTIME_IN_HZ(1000), NULL, 0, spacefev_vco_voltage_timer);
- sound_timer[0] = timer_alloc(stop_mono_flop_callback);
- sound_timer[1] = timer_alloc(stop_mono_flop_callback);
- sound_timer[2] = timer_alloc(stop_mono_flop_callback);
+ sound_timer[0] = timer_alloc(stop_mono_flop_callback, NULL);
+ sound_timer[1] = timer_alloc(stop_mono_flop_callback, NULL);
+ sound_timer[2] = timer_alloc(stop_mono_flop_callback, NULL);
mono_flop[0] = 0;
mono_flop[1] = 0;
@@ -489,8 +489,8 @@ static MACHINE_RESET( sheriff_sound )
{
n8080_hardware = 2;
- sound_timer[0] = timer_alloc(stop_mono_flop_callback);
- sound_timer[1] = timer_alloc(stop_mono_flop_callback);
+ sound_timer[0] = timer_alloc(stop_mono_flop_callback, NULL);
+ sound_timer[1] = timer_alloc(stop_mono_flop_callback, NULL);
mono_flop[0] = 0;
mono_flop[1] = 0;
@@ -504,7 +504,7 @@ static MACHINE_RESET( helifire_sound )
{
n8080_hardware = 3;
- timer_pulse(ATTOTIME_IN_HZ(1000), 0, helifire_dac_volume_timer);
+ timer_pulse(ATTOTIME_IN_HZ(1000), NULL, 0, helifire_dac_volume_timer);
helifire_dac_volume = 1;
helifire_dac_timing = 0;
diff --git a/src/mame/audio/namco54.c b/src/mame/audio/namco54.c
index 5a4dacf4dc2..2dbf4f80ccb 100644
--- a/src/mame/audio/namco54.c
+++ b/src/mame/audio/namco54.c
@@ -119,7 +119,7 @@ void namco_54xx_write(UINT8 data)
if (cpunum == -1)
return;
- timer_call_after_resynch(data, namco_54xx_latch_callback);
+ timer_call_after_resynch(NULL, data, namco_54xx_latch_callback);
cpunum_set_input_line(cpunum, 0, ASSERT_LINE);
@@ -128,5 +128,5 @@ void namco_54xx_write(UINT8 data)
// 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(ATTOTIME_IN_USEC(21), cpunum, namco_54xx_irq_clear);
+ timer_set(ATTOTIME_IN_USEC(21), NULL, cpunum, namco_54xx_irq_clear);
}
diff --git a/src/mame/audio/segag80r.c b/src/mame/audio/segag80r.c
index 710540d0c0d..6e5522a21cf 100644
--- a/src/mame/audio/segag80r.c
+++ b/src/mame/audio/segag80r.c
@@ -579,7 +579,7 @@ static void *sega005_custom_start(int clock, const struct CustomSound_interface
sega005_stream = stream_create(0, 1, SEGA005_COUNTER_FREQ, NULL, sega005_stream_update);
/* create a timer for the 555 */
- sega005_sound_timer = timer_alloc(sega005_auto_timer);
+ sega005_sound_timer = timer_alloc(sega005_auto_timer, NULL);
/* set the initial sound data */
sound_data = 0x00;
diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c
index fc416cbd63d..fb3d4fd61f9 100644
--- a/src/mame/audio/segasnd.c
+++ b/src/mame/audio/segasnd.c
@@ -225,7 +225,7 @@ static TIMER_CALLBACK( delayed_speech_w )
WRITE8_HANDLER( sega_speech_data_w )
{
- timer_call_after_resynch(data, delayed_speech_w);
+ timer_call_after_resynch(NULL, data, delayed_speech_w);
}
@@ -317,7 +317,7 @@ void sega_usb_reset(UINT8 t1_clock_mask)
cpunum_set_input_line(usb.cpunum, INPUT_LINE_RESET, ASSERT_LINE);
/* start the clock timer */
- timer_pulse(attotime_mul(ATTOTIME_IN_HZ(USB_2MHZ_CLOCK), 256), 0, increment_t1_clock);
+ timer_pulse(attotime_mul(ATTOTIME_IN_HZ(USB_2MHZ_CLOCK), 256), NULL, 0, increment_t1_clock);
usb.t1_clock_mask = t1_clock_mask;
}
@@ -360,7 +360,7 @@ static TIMER_CALLBACK( delayed_usb_data_w )
WRITE8_HANDLER( sega_usb_data_w )
{
LOG(("%04X:usb_data_w = %02X\n", activecpu_get_pc(), data));
- timer_call_after_resynch(data, delayed_usb_data_w);
+ timer_call_after_resynch(NULL, data, delayed_usb_data_w);
/* boost the interleave so that sequences can be sent */
cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(250));
diff --git a/src/mame/audio/senjyo.c b/src/mame/audio/senjyo.c
index 1eb6f21d0de..7520692020c 100644
--- a/src/mame/audio/senjyo.c
+++ b/src/mame/audio/senjyo.c
@@ -84,5 +84,5 @@ void senjyo_sh_start(void)
sample_set_volume(0,0);
sample_start_raw(0,_single,SINGLE_LENGTH,single_rate,1);
- timer_pulse(attotime_make(0, Machine->screen[0].refresh), 0, senjyo_sh_update);
+ timer_pulse(attotime_make(0, Machine->screen[0].refresh), NULL, 0, senjyo_sh_update);
}
diff --git a/src/mame/audio/snes.c b/src/mame/audio/snes.c
index 8b7a8b78446..6f3c43b0a13 100644
--- a/src/mame/audio/snes.c
+++ b/src/mame/audio/snes.c
@@ -1153,13 +1153,13 @@ void *snes_sh_start(int clock, const struct CustomSound_interface *config)
channel = stream_create( 0, 2, 32000, NULL, snes_sh_update );
/* Initialize the timers */
- timers[0].timer = timer_alloc( snes_spc_timer );
+ timers[0].timer = timer_alloc( snes_spc_timer , NULL);
timer_adjust( timers[0].timer, ATTOTIME_IN_HZ(8000), 0, ATTOTIME_IN_HZ(8000) );
timer_enable( timers[0].timer, 0 );
- timers[1].timer = timer_alloc( snes_spc_timer );
+ timers[1].timer = timer_alloc( snes_spc_timer , NULL);
timer_adjust( timers[1].timer, ATTOTIME_IN_HZ(8000), 1, ATTOTIME_IN_HZ(8000) );
timer_enable( timers[1].timer, 0 );
- timers[2].timer = timer_alloc( snes_spc_timer );
+ timers[2].timer = timer_alloc( snes_spc_timer , NULL);
timer_adjust( timers[2].timer, ATTOTIME_IN_HZ(64000), 2, ATTOTIME_IN_HZ(64000) );
timer_enable( timers[2].timer, 0 );
diff --git a/src/mame/audio/starwars.c b/src/mame/audio/starwars.c
index 742342bb3b4..cb28e4ece7e 100644
--- a/src/mame/audio/starwars.c
+++ b/src/mame/audio/starwars.c
@@ -158,7 +158,7 @@ WRITE8_HANDLER( starwars_m6532_w )
/* Should be decrementing every data*1024 6532 clock cycles */
/* 6532 runs at 1.5 MHz */
- timer_set(attotime_mul(ATTOTIME_IN_HZ(1500000), data * 1024), 0, snd_interrupt);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(1500000), data * 1024), NULL, 0, snd_interrupt);
return;
default:
@@ -195,7 +195,7 @@ READ8_HANDLER( starwars_sin_r )
WRITE8_HANDLER( starwars_sout_w )
{
- timer_call_after_resynch(data, sound_callback);
+ timer_call_after_resynch(NULL, data, sound_callback);
}
@@ -233,7 +233,7 @@ static TIMER_CALLBACK( main_callback )
WRITE8_HANDLER( starwars_main_wr_w )
{
- timer_call_after_resynch(data, main_callback);
+ timer_call_after_resynch(NULL, data, main_callback);
}
diff --git a/src/mame/audio/system16.c b/src/mame/audio/system16.c
index 29dc0e86137..7889c2ab40c 100644
--- a/src/mame/audio/system16.c
+++ b/src/mame/audio/system16.c
@@ -39,7 +39,7 @@ WRITE8_HANDLER( sys16_7751_audio_8255_w )
if ((data & 0x0f) != 8)
{
cpunum_set_input_line(2, INPUT_LINE_RESET, PULSE_LINE);
- timer_set(ATTOTIME_IN_USEC(300), data, trigger_7751_sound);
+ timer_set(ATTOTIME_IN_USEC(300), NULL, data, trigger_7751_sound);
}
}
diff --git a/src/mame/audio/t5182.c b/src/mame/audio/t5182.c
index 98d0910e93f..2b58d6c1f9e 100644
--- a/src/mame/audio/t5182.c
+++ b/src/mame/audio/t5182.c
@@ -177,25 +177,25 @@ static TIMER_CALLBACK( setirq_callback )
WRITE8_HANDLER( t5182_sound_irq_w )
{
- timer_call_after_resynch(CPU_ASSERT,setirq_callback);
+ timer_call_after_resynch(NULL, CPU_ASSERT,setirq_callback);
}
static WRITE8_HANDLER( t5182_ym2151_irq_ack_w )
{
- timer_call_after_resynch(YM2151_ACK,setirq_callback);
+ timer_call_after_resynch(NULL, YM2151_ACK,setirq_callback);
}
static WRITE8_HANDLER( t5182_cpu_irq_ack_w )
{
- timer_call_after_resynch(CPU_CLEAR,setirq_callback);
+ timer_call_after_resynch(NULL, CPU_CLEAR,setirq_callback);
}
static void t5182_ym2151_irq_handler(int irq)
{
if (irq)
- timer_call_after_resynch(YM2151_ASSERT,setirq_callback);
+ timer_call_after_resynch(NULL, YM2151_ASSERT,setirq_callback);
else
- timer_call_after_resynch(YM2151_CLEAR,setirq_callback);
+ timer_call_after_resynch(NULL, YM2151_CLEAR,setirq_callback);
}
diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c
index bc90e021d69..937ed800aa2 100644
--- a/src/mame/audio/taito_en.c
+++ b/src/mame/audio/taito_en.c
@@ -68,7 +68,7 @@ WRITE16_HANDLER( f3_volume_w )
/* Channels 0, 1, 2, 3 - Unused */
}
-static TIMER_CALLBACK( timer_callback )
+static TIMER_CALLBACK( taito_en_timer_callback )
{
/* Only cause IRQ if the mask is set to allow it */
if (m68681_imr&8) {
@@ -80,7 +80,7 @@ static TIMER_CALLBACK( timer_callback )
void f3_68681_reset(void)
{
- timer_68681 = timer_alloc(timer_callback);
+ timer_68681 = timer_alloc(taito_en_timer_callback, NULL);
}
READ16_HANDLER(f3_68681_r)
diff --git a/src/mame/audio/tank8.c b/src/mame/audio/tank8.c
index 3a344a72aa3..211ead0498b 100644
--- a/src/mame/audio/tank8.c
+++ b/src/mame/audio/tank8.c
@@ -86,7 +86,7 @@ static const discrete_op_amp_filt_info tank8_filt =
0 /* VEE */
};
-discrete_dac_r1_ladder tank8_dac =
+static discrete_dac_r1_ladder tank8_dac =
{
1,
{RES_K(4.7)}, // R89
diff --git a/src/mame/audio/turbo.c b/src/mame/audio/turbo.c
index 28c1d7bff48..6faa460271d 100644
--- a/src/mame/audio/turbo.c
+++ b/src/mame/audio/turbo.c
@@ -107,7 +107,7 @@ WRITE8_HANDLER( turbo_sound_a_w )
#else
if (((data ^ last_sound_a) & 0x1e) && (last_sound_a & 0x1e) != 0x1e)
- timer_set(ATTOTIME_IN_HZ(20000), data, update_sound_a);
+ timer_set(ATTOTIME_IN_HZ(20000), NULL, data, update_sound_a);
else
update_sound_a(data);
diff --git a/src/mame/audio/vicdual.c b/src/mame/audio/vicdual.c
index 1bf2cfaf5df..2635eb9aec7 100644
--- a/src/mame/audio/vicdual.c
+++ b/src/mame/audio/vicdual.c
@@ -139,7 +139,7 @@ static TIMER_CALLBACK( frogs_croak_callback )
MACHINE_START( frogs_audio )
{
- frogs_croak_timer = timer_alloc(frogs_croak_callback);
+ frogs_croak_timer = timer_alloc(frogs_croak_callback, NULL);
}
diff --git a/src/mame/audio/warpwarp.c b/src/mame/audio/warpwarp.c
index fc1e4a8c246..13a8e843846 100644
--- a/src/mame/audio/warpwarp.c
+++ b/src/mame/audio/warpwarp.c
@@ -215,7 +215,7 @@ void *warpwarp_sh_start(int clock, const struct CustomSound_interface *config)
channel = stream_create(0, 1, CLOCK_16H, NULL, warpwarp_sound_update);
- sound_volume_timer = timer_alloc(sound_volume_decay);
- music_volume_timer = timer_alloc(music_volume_decay);
+ sound_volume_timer = timer_alloc(sound_volume_decay, NULL);
+ music_volume_timer = timer_alloc(music_volume_decay, NULL);
return auto_malloc(1);
}
diff --git a/src/mame/audio/williams.c b/src/mame/audio/williams.c
index bd49bdb4a06..a9988c2588c 100644
--- a/src/mame/audio/williams.c
+++ b/src/mame/audio/williams.c
@@ -464,7 +464,7 @@ static TIMER_CALLBACK( williams_cvsd_delayed_data_w )
void williams_cvsd_data_w(int data)
{
- timer_call_after_resynch(data, williams_cvsd_delayed_data_w);
+ timer_call_after_resynch(NULL, data, williams_cvsd_delayed_data_w);
}
diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c
index 85875dbbfac..f85be1dc7b5 100644
--- a/src/mame/drivers/40love.c
+++ b/src/mame/drivers/40love.c
@@ -267,7 +267,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_command_w )
{
soundlatch_w(0,data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
static WRITE8_HANDLER( nmi_disable_w )
diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c
index 7433977e0e9..ce14e4a974d 100644
--- a/src/mame/drivers/acefruit.c
+++ b/src/mame/drivers/acefruit.c
@@ -48,7 +48,7 @@ static TIMER_CALLBACK( acefruit_refresh )
static VIDEO_START( acefruit )
{
- acefruit_refresh_timer = timer_alloc( acefruit_refresh );
+ acefruit_refresh_timer = timer_alloc( acefruit_refresh , NULL);
}
static INTERRUPT_GEN( acefruit_vblank )
diff --git a/src/mame/drivers/aleck64.c b/src/mame/drivers/aleck64.c
index 9240d8b659a..1d2f4b80099 100644
--- a/src/mame/drivers/aleck64.c
+++ b/src/mame/drivers/aleck64.c
@@ -167,7 +167,6 @@ Notes:
#include "driver.h"
#include "cpu/mips/mips3.h"
-#include "cpu/rsp/rsp.h"
#include "streams.h"
#include "sound/custom.h"
#include "includes/n64.h"
@@ -434,6 +433,7 @@ static MACHINE_DRIVER_START( aleck64 )
MDRV_CPU_VBLANK_INT( n64_vblank, 1 )
MDRV_CPU_ADD(RSP, 62500000)
+ MDRV_CPU_CONFIG(n64_rsp_config)
MDRV_CPU_PROGRAM_MAP(rsp_map, 0)
MDRV_MACHINE_RESET( aleck64 )
diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c
index e6ec61d464b..d7a5bf638a5 100644
--- a/src/mame/drivers/alg.c
+++ b/src/mame/drivers/alg.c
@@ -145,7 +145,7 @@ static VIDEO_UPDATE( alg )
static MACHINE_START( alg )
{
discinfo = laserdisc_init(LASERDISC_TYPE_LDP1450, get_disk_handle(0), 1);
- serial_timer = timer_alloc(response_timer);
+ serial_timer = timer_alloc(response_timer, NULL);
serial_timer_active = FALSE;
}
diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c
index 7f2b94d68a0..523c89c809a 100644
--- a/src/mame/drivers/aquarium.c
+++ b/src/mame/drivers/aquarium.c
@@ -57,7 +57,8 @@ Stephh's notes (based on the game M68000 code and some tests) :
static int aquarium_snd_ack;
-UINT16 *aquarium_scroll, *aquarium_priority;
+UINT16 *aquarium_scroll;
+//UINT16 *aquarium_priority;
UINT16 *aquarium_txt_videoram;
UINT16 *aquarium_mid_videoram;
UINT16 *aquarium_bak_videoram;
diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c
index d5b6a95af0f..ad1c361a15d 100644
--- a/src/mame/drivers/asterix.c
+++ b/src/mame/drivers/asterix.c
@@ -127,7 +127,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_arm_nmi_w )
{
cpunum_set_input_line(1, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(ATTOTIME_IN_USEC(5),0,nmi_callback);
+ timer_set(ATTOTIME_IN_USEC(5), NULL,0,nmi_callback);
}
static WRITE16_HANDLER( sound_irq_w )
diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c
index b2b11ec2d95..2fb40ff5418 100644
--- a/src/mame/drivers/astrocde.c
+++ b/src/mame/drivers/astrocde.c
@@ -1200,7 +1200,7 @@ static const char *seawolf_sample_names[] =
0
};
-struct Samplesinterface seawolf2_samples_interface =
+static struct Samplesinterface seawolf2_samples_interface =
{
10, /* 5*2 channels */
seawolf_sample_names
@@ -1226,7 +1226,7 @@ static struct Samplesinterface gorf_samples_interface =
*
*************************************/
-struct z80_irq_daisy_chain tenpin_daisy_chain[] =
+static struct z80_irq_daisy_chain tenpin_daisy_chain[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */
{ 0, 0, 0, 0, -1 } /* end mark */
diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c
index 8dafbbdde7e..0df28baf993 100644
--- a/src/mame/drivers/astrof.c
+++ b/src/mame/drivers/astrof.c
@@ -105,7 +105,7 @@ static TIMER_CALLBACK( irq_callback )
static void create_irq_timer(void)
{
- irq_timer = timer_alloc(irq_callback);
+ irq_timer = timer_alloc(irq_callback, NULL);
}
diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c
index 30c9e8ae2bb..a5e0bfc3428 100644
--- a/src/mame/drivers/asuka.c
+++ b/src/mame/drivers/asuka.c
@@ -241,7 +241,7 @@ static TIMER_CALLBACK( cadash_interrupt5 )
static INTERRUPT_GEN( cadash_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(500,0),0, cadash_interrupt5);
+ timer_set(ATTOTIME_IN_CYCLES(500,0), NULL, 0, cadash_interrupt5);
cpunum_set_input_line(0, 4, HOLD_LINE); /* interrupt vector 4 */
}
diff --git a/src/mame/drivers/atarisy1.c b/src/mame/drivers/atarisy1.c
index a0bf10ee83d..fedfdf98585 100644
--- a/src/mame/drivers/atarisy1.c
+++ b/src/mame/drivers/atarisy1.c
@@ -186,7 +186,7 @@ static MACHINE_RESET( atarisy1 )
/* reset the joystick parameters */
joystick_value = 0;
- joystick_timer = timer_alloc(delayed_joystick_int);
+ joystick_timer = timer_alloc(delayed_joystick_int, NULL);
joystick_int = 0;
joystick_int_enable = 0;
}
diff --git a/src/mame/drivers/atarisy2.c b/src/mame/drivers/atarisy2.c
index 255a94c42ec..f9b0ff210f9 100644
--- a/src/mame/drivers/atarisy2.c
+++ b/src/mame/drivers/atarisy2.c
@@ -285,7 +285,7 @@ static TIMER_CALLBACK( delayed_int_enable_w )
static WRITE16_HANDLER( int_enable_w )
{
if (offset == 0 && ACCESSING_LSB)
- timer_call_after_resynch(data, delayed_int_enable_w);
+ timer_call_after_resynch(NULL, data, delayed_int_enable_w);
}
diff --git a/src/mame/drivers/atetris.c b/src/mame/drivers/atetris.c
index 8a5e331a3e0..84704b9546e 100644
--- a/src/mame/drivers/atetris.c
+++ b/src/mame/drivers/atetris.c
@@ -84,7 +84,7 @@ static TIMER_CALLBACK( interrupt_gen )
scanline += 32;
if (scanline >= 256)
scanline -= 256;
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, interrupt_gen);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, interrupt_gen);
}
@@ -109,7 +109,7 @@ static MACHINE_RESET( atetris )
memcpy(slapstic_base, &slapstic_source[current_bank * 0x4000], 0x4000);
/* start interrupts going (32V clocked by 16V) */
- timer_set(video_screen_get_time_until_pos(0, 48, 0), 48, interrupt_gen);
+ timer_set(video_screen_get_time_until_pos(0, 48, 0), NULL, 48, interrupt_gen);
}
diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c
index 1795254b13d..b251c7928d2 100644
--- a/src/mame/drivers/beaminv.c
+++ b/src/mame/drivers/beaminv.c
@@ -93,7 +93,7 @@ static TIMER_CALLBACK( interrupt_callback )
static void create_interrupt_timer(void)
{
- interrupt_timer = timer_alloc(interrupt_callback);
+ interrupt_timer = timer_alloc(interrupt_callback, NULL);
}
diff --git a/src/mame/drivers/beathead.c b/src/mame/drivers/beathead.c
index 17384e371c9..8d0700b6349 100644
--- a/src/mame/drivers/beathead.c
+++ b/src/mame/drivers/beathead.c
@@ -156,7 +156,7 @@ static TIMER_CALLBACK( scanline_callback )
update_interrupts();
/* set the timer for the next one */
- timer_set(double_to_attotime(attotime_to_double(video_screen_get_time_until_pos(0, scanline, 0)) - hblank_offset), scanline, scanline_callback);
+ timer_set(double_to_attotime(attotime_to_double(video_screen_get_time_until_pos(0, scanline, 0)) - hblank_offset), NULL, scanline, scanline_callback);
}
@@ -173,7 +173,7 @@ static MACHINE_RESET( beathead )
/* compute the timing of the HBLANK interrupt and set the first timer */
hblank_offset = attotime_to_double(video_screen_get_scan_period(0)) * ((455. - 336. - 25.) / 455.);
- timer_set(double_to_attotime(attotime_to_double(video_screen_get_time_until_pos(0, 0, 0)) - hblank_offset), 0, scanline_callback);
+ timer_set(double_to_attotime(attotime_to_double(video_screen_get_time_until_pos(0, 0, 0)) - hblank_offset), NULL, 0, scanline_callback);
/* reset IRQs */
irq_line_state = CLEAR_LINE;
diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c
index a626469e498..8eec5bb576a 100644
--- a/src/mame/drivers/berzerk.c
+++ b/src/mame/drivers/berzerk.c
@@ -170,7 +170,7 @@ static TIMER_CALLBACK( irq_callback )
static void create_irq_timer(void)
{
- irq_timer = timer_alloc(irq_callback);
+ irq_timer = timer_alloc(irq_callback, NULL);
}
@@ -247,7 +247,7 @@ static TIMER_CALLBACK( nmi_callback )
static void create_nmi_timer(void)
{
- nmi_timer = timer_alloc(nmi_callback);
+ nmi_timer = timer_alloc(nmi_callback, NULL);
}
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index 6204f99740d..0b286bcf7be 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -138,7 +138,7 @@ static void update_irqs(void)
***************************************************************************/
#ifdef MAME_DEBUG
-int DEBUG_BLITTER = 0;
+static int DEBUG_BLITTER = 0;
#endif
/* Typedefs */
diff --git a/src/mame/drivers/bigevglf.c b/src/mame/drivers/bigevglf.c
index f82ae8e9f1a..e4303cfef10 100644
--- a/src/mame/drivers/bigevglf.c
+++ b/src/mame/drivers/bigevglf.c
@@ -113,13 +113,13 @@ static TIMER_CALLBACK( from_sound_latch_callback )
}
static WRITE8_HANDLER(beg_fromsound_w) /* write to D800 sets bit 1 in status */
{
- timer_call_after_resynch((activecpu_get_pc()<<16)|data, from_sound_latch_callback);
+ timer_call_after_resynch(NULL, (activecpu_get_pc()<<16)|data, from_sound_latch_callback);
}
static READ8_HANDLER(beg_fromsound_r)
{
/* set a timer to force synchronization after the read */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
return from_sound;
}
@@ -127,7 +127,7 @@ static READ8_HANDLER(beg_soundstate_r)
{
UINT8 ret = sound_state;
/* set a timer to force synchronization after the read */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
sound_state &= ~2; /* read from port 21 clears bit 1 in status */
return ret;
}
@@ -135,7 +135,7 @@ static READ8_HANDLER(beg_soundstate_r)
static READ8_HANDLER(soundstate_r)
{
/* set a timer to force synchronization after the read */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
return sound_state;
}
@@ -148,7 +148,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_command_w ) /* write to port 20 clears bit 0 in status */
{
for_sound = data;
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
static READ8_HANDLER( sound_command_r ) /* read from D800 sets bit 0 in status */
@@ -184,19 +184,19 @@ static TIMER_CALLBACK( deferred_ls74_w )
/* do this on a timer to let the CPUs synchronize */
static WRITE8_HANDLER (beg13A_clr_w)
{
- timer_call_after_resynch((0<<8) | 0, deferred_ls74_w);
+ timer_call_after_resynch(NULL, (0<<8) | 0, deferred_ls74_w);
}
static WRITE8_HANDLER (beg13B_clr_w)
{
- timer_call_after_resynch((1<<8) | 0, deferred_ls74_w);
+ timer_call_after_resynch(NULL, (1<<8) | 0, deferred_ls74_w);
}
static WRITE8_HANDLER (beg13A_set_w)
{
- timer_call_after_resynch((0<<8) | 1, deferred_ls74_w);
+ timer_call_after_resynch(NULL, (0<<8) | 1, deferred_ls74_w);
}
static WRITE8_HANDLER (beg13B_set_w)
{
- timer_call_after_resynch((1<<8) | 1, deferred_ls74_w);
+ timer_call_after_resynch(NULL, (1<<8) | 1, deferred_ls74_w);
}
static READ8_HANDLER( beg_status_r )
@@ -211,7 +211,7 @@ static READ8_HANDLER( beg_status_r )
*/
/* set a timer to force synchronization after the read */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
return (beg13_ls74[0]<<0) | (beg13_ls74[1]<<1);
}
diff --git a/src/mame/drivers/bombjack.c b/src/mame/drivers/bombjack.c
index c36f516173f..09fc6e6f62b 100644
--- a/src/mame/drivers/bombjack.c
+++ b/src/mame/drivers/bombjack.c
@@ -121,7 +121,7 @@ static TIMER_CALLBACK( soundlatch_callback )
static WRITE8_HANDLER( bombjack_soundlatch_w )
{
/* make all the CPUs synchronize, and only AFTER that write the new command to the latch */
- timer_call_after_resynch(data,soundlatch_callback);
+ timer_call_after_resynch(NULL, data,soundlatch_callback);
}
static READ8_HANDLER( bombjack_soundlatch_r )
diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c
index 050b8044307..8e5024bf1bf 100644
--- a/src/mame/drivers/boxer.c
+++ b/src/mame/drivers/boxer.c
@@ -57,7 +57,7 @@ static TIMER_CALLBACK( periodic_callback )
{
if (mask[i] != 0)
{
- timer_set(video_screen_get_time_until_pos(0, i, 0), mask[i], pot_interrupt);
+ timer_set(video_screen_get_time_until_pos(0, i, 0), NULL, mask[i], pot_interrupt);
}
}
@@ -71,7 +71,7 @@ static TIMER_CALLBACK( periodic_callback )
scanline = 0;
}
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, periodic_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, periodic_callback);
}
@@ -87,7 +87,7 @@ static PALETTE_INIT( boxer )
static MACHINE_RESET( boxer )
{
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, periodic_callback);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, periodic_callback);
pot_latch = 0;
}
diff --git a/src/mame/drivers/btoads.c b/src/mame/drivers/btoads.c
index 6e47a565cf7..6c8a5086bf9 100644
--- a/src/mame/drivers/btoads.c
+++ b/src/mame/drivers/btoads.c
@@ -55,14 +55,14 @@ static TIMER_CALLBACK( delayed_sound_w )
cpu_triggerint(1);
/* use a timer to make long transfers faster */
- timer_set(ATTOTIME_IN_USEC(50), 0, 0);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, 0, 0);
}
static WRITE16_HANDLER( main_sound_w )
{
if (ACCESSING_LSB)
- timer_call_after_resynch(data & 0xff, delayed_sound_w);
+ timer_call_after_resynch(NULL, data & 0xff, delayed_sound_w);
}
diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c
index 8803797cadb..b63fb25bd17 100644
--- a/src/mame/drivers/buggychl.c
+++ b/src/mame/drivers/buggychl.c
@@ -132,7 +132,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_command_w )
{
soundlatch_w(0,data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
static WRITE8_HANDLER( nmi_disable_w )
diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c
index 0dd7fa3a76d..dc9b85e6255 100644
--- a/src/mame/drivers/capbowl.c
+++ b/src/mame/drivers/capbowl.c
@@ -129,13 +129,13 @@ static TIMER_CALLBACK( capbowl_update )
video_screen_update_partial(0, scanline - 1);
scanline += 32;
if (scanline > 240) scanline = 32;
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, capbowl_update);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, capbowl_update);
}
static MACHINE_RESET( capbowl )
{
- timer_set(video_screen_get_time_until_pos(0, 32, 0), 32, capbowl_update);
+ timer_set(video_screen_get_time_until_pos(0, 32, 0), NULL, 32, capbowl_update);
}
diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c
index 3a24a993d4b..8424bceacee 100644
--- a/src/mame/drivers/cave.c
+++ b/src/mame/drivers/cave.c
@@ -123,8 +123,8 @@ static TIMER_CALLBACK( cave_vblank_end )
/* Called once/frame to generate the VBLANK interrupt */
static INTERRUPT_GEN( cave_interrupt )
{
- timer_set(ATTOTIME_IN_USEC(17376-time_vblank_irq), 0, cave_vblank_start);
- timer_set(ATTOTIME_IN_USEC(17376-time_vblank_irq + 2000), 0, cave_vblank_end);
+ timer_set(ATTOTIME_IN_USEC(17376-time_vblank_irq), NULL, 0, cave_vblank_start);
+ timer_set(ATTOTIME_IN_USEC(17376-time_vblank_irq + 2000), NULL, 0, cave_vblank_end);
}
/* Called by the YMZ280B to set the IRQ state */
diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c
index f7f8ce9c655..96944972623 100644
--- a/src/mame/drivers/cball.c
+++ b/src/mame/drivers/cball.c
@@ -64,13 +64,13 @@ static TIMER_CALLBACK( interrupt_callback )
scanline = 16;
}
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, interrupt_callback);
}
static MACHINE_RESET( cball )
{
- timer_set(video_screen_get_time_until_pos(0, 16, 0), 16, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 16, 0), NULL, 16, interrupt_callback);
}
diff --git a/src/mame/drivers/ccastles.c b/src/mame/drivers/ccastles.c
index 3d3e76d0adb..c96680a5007 100644
--- a/src/mame/drivers/ccastles.c
+++ b/src/mame/drivers/ccastles.c
@@ -232,7 +232,7 @@ static MACHINE_START( ccastles )
memory_configure_bank(1, 0, 2, memory_region(REGION_CPU1) + 0xa000, 0x6000);
/* create a timer for IRQs and set up the first callback */
- irq_timer = timer_alloc(clock_irq);
+ irq_timer = timer_alloc(clock_irq, NULL);
irq_state = 0;
schedule_next_irq(0);
diff --git a/src/mame/drivers/cclimber.c b/src/mame/drivers/cclimber.c
index e98a0bfbf36..eba1648ab98 100644
--- a/src/mame/drivers/cclimber.c
+++ b/src/mame/drivers/cclimber.c
@@ -167,7 +167,7 @@ static MACHINE_RESET( cclimber )
/* we must do this on a timer in order to have it take effect */
/* otherwise, the reset process will override our changes */
- timer_call_after_resynch(0, disable_interrupts);
+ timer_call_after_resynch(NULL, 0, disable_interrupts);
}
diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c
index 8b07fe7a022..8dffcb20061 100644
--- a/src/mame/drivers/centiped.c
+++ b/src/mame/drivers/centiped.c
@@ -6,6 +6,7 @@
* Centipede (5 sets)
* Warlords
* Millipede
+ * Maze Invaders (prototype)
* Bulls Eye Darts
Centipede sync-prom added by HIGHWAYMAN.
@@ -450,6 +451,9 @@ static TIMER_CALLBACK( generate_interrupt )
if (scanline & 16)
cpunum_set_input_line(0, 0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE);
+ /* do a partial update now to handle sprite multiplexing (Maze Invaders) */
+ video_screen_update_partial(0, scanline);
+
/* call back again after 16 scanlines */
scanline += 16;
if (scanline >= 256)
@@ -469,7 +473,7 @@ static MACHINE_START( centiped )
static MACHINE_RESET( centiped )
{
- interrupt_timer = timer_alloc(generate_interrupt);
+ interrupt_timer = timer_alloc(generate_interrupt, NULL);
timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
cpunum_set_input_line(0, 0, CLEAR_LINE);
dsw_select = 0;
@@ -591,6 +595,18 @@ static WRITE8_HANDLER( control_select_w )
control_select = (data >> 7) & 1;
}
+
+static READ8_HANDLER( mazeinv_input_r )
+{
+ return readinputport(6 + control_select);
+}
+
+
+static WRITE8_HANDLER( mazeinv_input_select_w )
+{
+ control_select = offset & 3;
+}
+
static READ8_HANDLER( bullsdrt_data_port_r )
{
switch (activecpu_get_pc())
@@ -603,6 +619,8 @@ static READ8_HANDLER( bullsdrt_data_port_r )
return 0;
}
+
+
/*************************************
*
* Output ports
@@ -772,6 +790,40 @@ ADDRESS_MAP_END
+/*************************************
+ *
+ * Maze Invaders CPU memory handlers
+ *
+ *************************************/
+
+static ADDRESS_MAP_START( mazeinv_map, ADDRESS_SPACE_PROGRAM, 8 )
+ ADDRESS_MAP_FLAGS( AMEF_ABITS(15) )
+ AM_RANGE(0x0000, 0x03ff) AM_RAM
+ AM_RANGE(0x0400, 0x040f) AM_READWRITE(pokey1_r, pokey1_w)
+ AM_RANGE(0x0800, 0x080f) AM_READWRITE(pokey2_r, pokey2_w)
+ AM_RANGE(0x1000, 0x13bf) AM_READWRITE(MRA8_RAM, centiped_videoram_w) AM_BASE(&videoram)
+ AM_RANGE(0x13c0, 0x13ff) AM_RAM AM_BASE(&spriteram)
+ AM_RANGE(0x2000, 0x2000) AM_READ(input_port_0_r)
+ AM_RANGE(0x2001, 0x2001) AM_READ(input_port_1_r)
+ AM_RANGE(0x2010, 0x2010) AM_READ(input_port_2_r)
+ AM_RANGE(0x2011, 0x2011) AM_READ(input_port_3_r)
+ AM_RANGE(0x2020, 0x2020) AM_READ(mazeinv_input_r)
+ AM_RANGE(0x2030, 0x2030) AM_READ(atari_vg_earom_r)
+ AM_RANGE(0x2480, 0x249f) AM_WRITE(mazeinv_paletteram_w) AM_BASE(&paletteram)
+ AM_RANGE(0x2500, 0x2502) AM_WRITE(coin_count_w)
+ AM_RANGE(0x2503, 0x2504) AM_WRITE(led_w)
+ AM_RANGE(0x2505, 0x2505) AM_WRITE(input_select_w)
+// AM_RANGE(0x2506, 0x2507) AM_WRITE(MWA8_NOP) /* ? */
+ AM_RANGE(0x2580, 0x2583) AM_WRITE(mazeinv_input_select_w)
+ AM_RANGE(0x2600, 0x2600) AM_WRITE(irq_ack_w)
+ AM_RANGE(0x2680, 0x2680) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0x2700, 0x2700) AM_WRITE(atari_vg_earom_ctrl_w)
+ AM_RANGE(0x2780, 0x27bf) AM_WRITE(atari_vg_earom_w)
+ AM_RANGE(0x3000, 0x7fff) AM_ROM
+ADDRESS_MAP_END
+
+
+
/****************************************
*
* Bulls Eye Darts CPU memory handlers
@@ -1283,6 +1335,109 @@ static INPUT_PORTS_START( warlords )
INPUT_PORTS_END
+static INPUT_PORTS_START( mazeinv )
+ PORT_START /* IN0 */
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ))
+ PORT_DIPSETTING( 0x00, DEF_STR( English ))
+ PORT_DIPSETTING( 0x01, DEF_STR( German ))
+ PORT_DIPSETTING( 0x02, DEF_STR( French ))
+ PORT_DIPSETTING( 0x03, DEF_STR( Spanish ))
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ))
+ PORT_DIPSETTING( 0x04, DEF_STR( On ))
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ))
+ PORT_DIPSETTING( 0x08, DEF_STR( On ))
+ PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ))
+ PORT_DIPSETTING( 0x10, DEF_STR( On ))
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ))
+ PORT_DIPSETTING( 0x20, DEF_STR( On ))
+ PORT_DIPNAME( 0x40, 0x00, "Minimum credits" )
+ PORT_DIPSETTING( 0x00, "1" )
+ PORT_DIPSETTING( 0x40, "2" )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
+
+ PORT_START /* IN1 */
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START /* IN2 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
+
+ PORT_START /* IN3 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
+ PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
+
+ PORT_START /* IN4 */
+ PORT_DIPNAME( 0x03, 0x00, "Doors for bonus" )
+ PORT_DIPSETTING( 0x00, "10" )
+ PORT_DIPSETTING( 0x01, "12" )
+ PORT_DIPSETTING( 0x02, "14" )
+ PORT_DIPSETTING( 0x03, "16" )
+ PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ))
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPSETTING( 0x04, "3" )
+ PORT_DIPSETTING( 0x08, "4" )
+ PORT_DIPSETTING( 0x0c, "5" )
+ PORT_DIPNAME( 0x30, 0x00, "Extra life at" )
+ PORT_DIPSETTING( 0x00, "20000" )
+ PORT_DIPSETTING( 0x10, "25000" )
+ PORT_DIPSETTING( 0x20, "30000" )
+ PORT_DIPSETTING( 0x30, "Never" )
+ PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Difficulty ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Easier ))
+ PORT_DIPSETTING( 0x40, DEF_STR( Easy ))
+ PORT_DIPSETTING( 0x80, DEF_STR( Hard ))
+ PORT_DIPSETTING( 0xc0, DEF_STR( Harder ))
+
+ PORT_START /* IN5 */
+ PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ))
+ PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ))
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ))
+ PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ))
+ PORT_DIPNAME( 0x0c, 0x00, "Right Coin" )
+ PORT_DIPSETTING( 0x00, "*1" )
+ PORT_DIPSETTING( 0x04, "*4" )
+ PORT_DIPSETTING( 0x08, "*5" )
+ PORT_DIPSETTING( 0x0c, "*6" )
+ PORT_DIPNAME( 0x10, 0x00, "Left Coin" )
+ PORT_DIPSETTING( 0x00, "*1" )
+ PORT_DIPSETTING( 0x10, "*2" )
+ PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )
+ PORT_DIPSETTING( 0x00, DEF_STR( None ))
+ PORT_DIPSETTING( 0x20, "3 credits/2 coins" )
+ PORT_DIPSETTING( 0x40, "5 credits/4 coins" )
+ PORT_DIPSETTING( 0x60, "6 credits/4 coins" )
+ PORT_DIPSETTING( 0x80, "6 credits/5 coins" )
+
+ /* IN6-9 fake to control player joysticks */
+ PORT_START
+ PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x40, 0xbf) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1)
+
+ PORT_START
+
+ PORT_START
+ PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x40, 0xbf) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
+
+ PORT_START
+INPUT_PORTS_END
+
+
static INPUT_PORTS_START( bullsdrt )
PORT_START /* IN0 */
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* trackball data */
@@ -1594,6 +1749,16 @@ static MACHINE_DRIVER_START( warlords )
MACHINE_DRIVER_END
+static MACHINE_DRIVER_START( mazeinv )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(milliped)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(mazeinv_map,0)
+ MDRV_VIDEO_UPDATE(centiped)
+MACHINE_DRIVER_END
+
+
static MACHINE_DRIVER_START( bullsdrt )
/* basic machine hardware */
@@ -1759,6 +1924,24 @@ ROM_START( milliped )
ROM_END
+ROM_START( mazeinv )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 ) /* 64k for code */
+ ROM_LOAD( "005.011", 0x3000, 0x1000, CRC(37129536) SHA1(356cb986a40b332100e00fb72194fd4dade2cba7) )
+ ROM_LOAD( "004.011", 0x4000, 0x1000, CRC(2d0fbf2f) SHA1(9d4c2bc9f80604d1ff5c5bf5a4a78378efdd8b33) )
+ ROM_LOAD( "003.011", 0x5000, 0x1000, CRC(0ff3747c) SHA1(1a7e1c487c24875dada967fb3a9ceaca25b7e2a7) )
+ ROM_LOAD( "002.011", 0x6000, 0x1000, CRC(96478e07) SHA1(e99d9970dc12ed36520d91646f1955cce87b55b6) )
+ ROM_LOAD( "001.011", 0x7000, 0x1000, CRC(d5c29a01) SHA1(5201a6cd42e4954c6cd4298f7b6cee4a8c181248) )
+
+ ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "007.011", 0x0000, 0x0800, CRC(16e738f4) SHA1(96335afc4510aae6b4ee6dfd8f5c1b2baa8c2798) )
+ ROM_LOAD( "006.011", 0x0800, 0x0800, CRC(d4705e4e) SHA1(e099f3df0d2f56d557631e69bc76ae2f09a80b42) )
+
+ ROM_REGION( 0x0120, REGION_PROMS, 0 )
+ ROM_LOAD( "009.011", 0x0000, 0x0020, CRC(dcc48de5) SHA1(5594568dd6a605d6d9d9646b1af645af72a7f53d) )
+ ROM_LOAD( "008.011", 0x0020, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) )
+ROM_END
+
+
ROM_START( warlords )
ROM_REGION( 0x10000, REGION_CPU1, 0 )
ROM_LOAD( "037154.1m", 0x5000, 0x0800, CRC(18006c87) SHA1(6b4aab1b1710819d29f4bbc29269eb9c915626c0) )
@@ -1842,5 +2025,6 @@ GAME( 1980, magworm, centiped, magworm, magworm, magworm, ROT270, "bootleg",
GAME( 1982, milliped, 0, milliped, milliped, 0, ROT270, "Atari", "Millipede", GAME_SUPPORTS_SAVE )
GAME( 1980, warlords, 0, warlords, warlords, 0, ROT0, "Atari", "Warlords", GAME_SUPPORTS_SAVE )
+GAME( 1981, mazeinv, 0, mazeinv, mazeinv, 0, ROT270, "Atari", "Maze Invaders (prototype)", 0 )
GAME( 1985, bullsdrt, 0, bullsdrt, bullsdrt, bullsdrt, ROT270, "Shinkai Inc. (Magic Eletronics Inc. licence)", "Bulls Eye Darts", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/cidelsa.c b/src/mame/drivers/cidelsa.c
index e90080259fc..de9a57f96a2 100644
--- a/src/mame/drivers/cidelsa.c
+++ b/src/mame/drivers/cidelsa.c
@@ -680,7 +680,7 @@ static DRIVER_INIT( cidelsa )
{
cdp1869_configure(&destryer_CDP1869_interface);
- timer_set(ATTOTIME_IN_MSEC(200), 0, set_cpu_mode);
+ timer_set(ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
}
static const CDP1869_interface draco_CDP1869_interface =
@@ -699,7 +699,7 @@ static DRIVER_INIT( draco )
cdp1869_configure(&draco_CDP1869_interface);
- timer_set(ATTOTIME_IN_MSEC(200), 0, set_cpu_mode);
+ timer_set(ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
}
/* ROMs */
diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c
index 556d5578015..b76623274ab 100644
--- a/src/mame/drivers/clayshoo.c
+++ b/src/mame/drivers/clayshoo.c
@@ -120,8 +120,8 @@ static READ8_HANDLER( analog_r )
static void create_analog_timers(void)
{
- analog_timer_1 = timer_alloc(reset_analog_bit);
- analog_timer_2 = timer_alloc(reset_analog_bit);
+ analog_timer_1 = timer_alloc(reset_analog_bit, NULL);
+ analog_timer_2 = timer_alloc(reset_analog_bit, NULL);
}
diff --git a/src/mame/drivers/cliffhgr.c b/src/mame/drivers/cliffhgr.c
index 01d77fbc052..2bfac91b002 100644
--- a/src/mame/drivers/cliffhgr.c
+++ b/src/mame/drivers/cliffhgr.c
@@ -264,7 +264,7 @@ static void vdp_interrupt (int state)
static MACHINE_START( cliffhgr )
{
discinfo = laserdisc_init(LASERDISC_TYPE_PR8210, get_disk_handle(0), 0);
- irq_timer = timer_alloc(cliff_irq_callback);
+ irq_timer = timer_alloc(cliff_irq_callback, NULL);
}
static MACHINE_RESET( cliffhgr )
diff --git a/src/mame/drivers/cloud9.c b/src/mame/drivers/cloud9.c
index e0568669c22..8a2dbe8e0ac 100644
--- a/src/mame/drivers/cloud9.c
+++ b/src/mame/drivers/cloud9.c
@@ -196,7 +196,7 @@ static MACHINE_START( cloud9 )
video_screen_configure(0, 320, 256, &visarea, HZ_TO_ATTOSECONDS(PIXEL_CLOCK) * VTOTAL * HTOTAL);
/* create a timer for IRQs and set up the first callback */
- irq_timer = timer_alloc(clock_irq);
+ irq_timer = timer_alloc(clock_irq, NULL);
irq_state = 0;
schedule_next_irq(0-64);
diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c
index b1517c0a408..de101ee8fa7 100644
--- a/src/mame/drivers/cninja.c
+++ b/src/mame/drivers/cninja.c
@@ -825,7 +825,7 @@ GFXDECODE_END
static MACHINE_RESET( cninja )
{
- raster_irq_timer = timer_alloc(interrupt_gen);
+ raster_irq_timer = timer_alloc(interrupt_gen, NULL);
cninja_scanline=0;
cninja_irq_mask=0;
}
diff --git a/src/mame/drivers/cojag.c b/src/mame/drivers/cojag.c
index d2620348731..316d477d974 100644
--- a/src/mame/drivers/cojag.c
+++ b/src/mame/drivers/cojag.c
@@ -474,7 +474,7 @@ static TIMER_CALLBACK( gpu_sync_timer )
{
/* if a command is still pending, and we haven't maxed out our timer, set a new one */
if (gpu_command_pending && param < 1000)
- timer_set(ATTOTIME_IN_USEC(50), ++param, gpu_sync_timer);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, ++param, gpu_sync_timer);
}
@@ -488,7 +488,7 @@ static WRITE32_HANDLER( gpu_jump_w )
jaguar_gpu_resume();
/* start the sync timer going, and note that there is a command pending */
- timer_call_after_resynch(0, gpu_sync_timer);
+ timer_call_after_resynch(NULL, 0, gpu_sync_timer);
gpu_command_pending = 1;
}
diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c
index 18ae381b6eb..1f34f5b8e53 100644
--- a/src/mame/drivers/combatsc.c
+++ b/src/mame/drivers/combatsc.c
@@ -904,7 +904,7 @@ ROM_END
static void combasc_init_common(void)
{
- combasc_interleave_timer = timer_alloc(NULL);
+ combasc_interleave_timer = timer_alloc(NULL, NULL);
}
static DRIVER_INIT( combasct )
diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c
index ac9dd25c623..bd4258188f3 100644
--- a/src/mame/drivers/coolpool.c
+++ b/src/mame/drivers/coolpool.c
@@ -146,7 +146,7 @@ static void coolpool_from_shiftreg(UINT32 address, UINT16 *shiftreg)
static MACHINE_RESET( amerdart )
{
nvram_write_enable = 0;
- nvram_write_timer = timer_alloc(nvram_write_timeout);
+ nvram_write_timer = timer_alloc(nvram_write_timeout, NULL);
}
@@ -154,7 +154,7 @@ static MACHINE_RESET( coolpool )
{
tlc34076_reset(6);
nvram_write_enable = 0;
- nvram_write_timer = timer_alloc(nvram_write_timeout);
+ nvram_write_timer = timer_alloc(nvram_write_timeout, NULL);
}
@@ -277,7 +277,7 @@ static WRITE16_HANDLER( amerdart_iop_w )
{
logerror("%08x:IOP write %04x\n", activecpu_get_pc(), data);
COMBINE_DATA(&iop_cmd);
- timer_set(ATTOTIME_IN_USEC(100), 0, amerdart_iop_response);
+ timer_set(ATTOTIME_IN_USEC(100), NULL, 0, amerdart_iop_response);
}
@@ -321,7 +321,7 @@ static TIMER_CALLBACK( deferred_iop_w )
static WRITE16_HANDLER( coolpool_iop_w )
{
logerror("%08x:IOP write %04x\n", activecpu_get_pc(), data);
- timer_call_after_resynch(data, deferred_iop_w);
+ timer_call_after_resynch(NULL, data, deferred_iop_w);
}
diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c
index 7a04db588c9..b37fb87c72b 100644
--- a/src/mame/drivers/cps3.c
+++ b/src/mame/drivers/cps3.c
@@ -366,10 +366,10 @@ static UINT32* cps3_spriteram;
static UINT32* cps3_eeprom;
static UINT32* cps3_fullscreenzoom;
-UINT32 cps3_ss_pal_base = 0;
+static UINT32 cps3_ss_pal_base = 0;
static UINT32* cps3_colourram;
static UINT32 cps3_unk_vidregs[0x20/4];
-UINT32 cps3_ss_bank_base = 0;
+static UINT32 cps3_ss_bank_base = 0;
static UINT32 cps3_screenwidth;
//cdrom_file* cps3_cd;
@@ -2038,7 +2038,7 @@ static UINT32 chardma_other;
//static UINT8* current_table;
static UINT32 current_table_address = -1;
-int cps3_rle_length = 0;
+static int cps3_rle_length = 0;
static int last_normal_byte = 0;
@@ -2515,7 +2515,7 @@ static MACHINE_RESET( cps3 )
if (cps3_use_fastboot)
{
- fastboot_timer = timer_alloc(fastboot_timer_callback);
+ fastboot_timer = timer_alloc(fastboot_timer_callback, NULL);
// printf("reset\n");
timer_adjust(fastboot_timer, attotime_zero, 0, attotime_zero);
}
diff --git a/src/mame/drivers/crgolf.c b/src/mame/drivers/crgolf.c
index 56ce8322d9c..075310ff61d 100644
--- a/src/mame/drivers/crgolf.c
+++ b/src/mame/drivers/crgolf.c
@@ -124,7 +124,7 @@ static TIMER_CALLBACK( main_to_sound_callback )
static WRITE8_HANDLER( main_to_sound_w )
{
- timer_call_after_resynch(data, main_to_sound_callback);
+ timer_call_after_resynch(NULL, data, main_to_sound_callback);
}
@@ -151,7 +151,7 @@ static TIMER_CALLBACK( sound_to_main_callback )
static WRITE8_HANDLER( sound_to_main_w )
{
- timer_call_after_resynch(data, sound_to_main_callback);
+ timer_call_after_resynch(NULL, data, sound_to_main_callback);
}
diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c
index bb83c0fd672..47e01d11edb 100644
--- a/src/mame/drivers/crystal.c
+++ b/src/mame/drivers/crystal.c
@@ -593,16 +593,16 @@ static MACHINE_RESET(crystal)
Timer2ctrl=0;
Timer3ctrl=0;
- Timer0=timer_alloc(Timer0cb);
+ Timer0=timer_alloc(Timer0cb, NULL);
timer_adjust(Timer0,attotime_never,0,attotime_never);
- Timer1=timer_alloc(Timer1cb);
+ Timer1=timer_alloc(Timer1cb, NULL);
timer_adjust(Timer1,attotime_never,0,attotime_never);
- Timer2=timer_alloc(Timer2cb);
+ Timer2=timer_alloc(Timer2cb, NULL);
timer_adjust(Timer2,attotime_never,0,attotime_never);
- Timer3=timer_alloc(Timer3cb);
+ Timer3=timer_alloc(Timer3cb, NULL);
timer_adjust(Timer3,attotime_never,0,attotime_never);
VR0_Snd_Set_Areas(textureram,frameram);
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index 26030c42c5f..ceaeb2b624d 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -1859,7 +1859,7 @@ static NVRAM_HANDLER(tattass)
static MACHINE_RESET( deco32 )
{
- raster_irq_timer = timer_alloc(interrupt_gen);
+ raster_irq_timer = timer_alloc(interrupt_gen, NULL);
}
static INTERRUPT_GEN( deco32_vbl_interrupt )
diff --git a/src/mame/drivers/deco_mlc.c b/src/mame/drivers/deco_mlc.c
index e927ab513b8..d86c62fec72 100644
--- a/src/mame/drivers/deco_mlc.c
+++ b/src/mame/drivers/deco_mlc.c
@@ -422,7 +422,7 @@ GFXDECODE_END
static MACHINE_RESET( mlc )
{
- raster_irq_timer = timer_alloc(interrupt_gen);
+ raster_irq_timer = timer_alloc(interrupt_gen, NULL);
}
static struct YMZ280Binterface ymz280b_intf =
diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c
index ac566d12569..c7531167ed1 100644
--- a/src/mame/drivers/destroyr.c
+++ b/src/mame/drivers/destroyr.c
@@ -49,14 +49,14 @@ static TIMER_CALLBACK( destroyr_frame_callback )
/* PCB supports two dials, but cab has only got one */
- timer_set(video_screen_get_time_until_pos(0, readinputport(3), 0), 0, destroyr_dial_callback);
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, destroyr_frame_callback);
+ timer_set(video_screen_get_time_until_pos(0, readinputport(3), 0), NULL, 0, destroyr_dial_callback);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, destroyr_frame_callback);
}
static MACHINE_RESET( destroyr )
{
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, destroyr_frame_callback);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, destroyr_frame_callback);
}
diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c
index 9bbed62b3d8..2d18f8853e6 100644
--- a/src/mame/drivers/dlair.c
+++ b/src/mame/drivers/dlair.c
@@ -133,7 +133,7 @@ static z80sio_interface sio_intf =
};
-struct z80_irq_daisy_chain dleuro_daisy_chain[] =
+static struct z80_irq_daisy_chain dleuro_daisy_chain[] =
{
{ z80sio_reset, z80sio_irq_state, z80sio_irq_ack, z80sio_irq_reti, 0 },
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },
diff --git a/src/mame/drivers/dragrace.c b/src/mame/drivers/dragrace.c
index 142fdc1807f..8e97ffbf6d4 100644
--- a/src/mame/drivers/dragrace.c
+++ b/src/mame/drivers/dragrace.c
@@ -36,7 +36,7 @@ static TIMER_CALLBACK( dragrace_frame_callback )
static MACHINE_RESET( dragrace )
{
- timer_pulse(video_screen_get_frame_period(0), 0, dragrace_frame_callback);
+ timer_pulse(video_screen_get_frame_period(0), NULL, 0, dragrace_frame_callback);
}
static void dragrace_update_misc_flags(void)
diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c
index f4d17dff190..e55db4e5e60 100644
--- a/src/mame/drivers/enigma2.c
+++ b/src/mame/drivers/enigma2.c
@@ -114,8 +114,8 @@ static TIMER_CALLBACK( interrupt_assert_callback )
static void create_interrupt_timers(void)
{
- interrupt_clear_timer = timer_alloc(interrupt_clear_callback);
- interrupt_assert_timer = timer_alloc(interrupt_assert_callback);
+ interrupt_clear_timer = timer_alloc(interrupt_clear_callback, NULL);
+ interrupt_assert_timer = timer_alloc(interrupt_assert_callback, NULL);
}
diff --git a/src/mame/drivers/eprom.c b/src/mame/drivers/eprom.c
index 02a648481b4..63f06d36dad 100644
--- a/src/mame/drivers/eprom.c
+++ b/src/mame/drivers/eprom.c
@@ -7,6 +7,7 @@
Games supported:
* Escape From The Planet Of The Robot Monsters (1989) [2 sets]
* Klax prototypes [2 sets]
+ * Guts n' Glory (prototype)
Known bugs:
* none at this time
@@ -185,6 +186,32 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
ADDRESS_MAP_END
+static ADDRESS_MAP_START( guts_map, ADDRESS_SPACE_PROGRAM, 16 )
+ AM_RANGE(0x000000, 0x09ffff) AM_ROM
+ AM_RANGE(0x0e0000, 0x0e0fff) AM_READWRITE(atarigen_eeprom_r, atarigen_eeprom_w) AM_BASE(&atarigen_eeprom) AM_SIZE(&atarigen_eeprom_size)
+ AM_RANGE(0x16cc00, 0x16cc01) AM_RAM AM_SHARE(2)
+ AM_RANGE(0x160000, 0x16ffff) AM_RAM AM_SHARE(1)
+ AM_RANGE(0x1f0000, 0x1fffff) AM_WRITE(atarigen_eeprom_enable_w)
+ AM_RANGE(0x260000, 0x26000f) AM_READ(input_port_0_word_r)
+ AM_RANGE(0x260010, 0x26001f) AM_READ(special_port1_r)
+ AM_RANGE(0x260020, 0x26002f) AM_READ(adc_r)
+ AM_RANGE(0x260030, 0x260031) AM_READ(atarigen_sound_r)
+ AM_RANGE(0x2e0000, 0x2e0001) AM_WRITE(watchdog_reset16_w)
+ AM_RANGE(0x360000, 0x360001) AM_WRITE(atarigen_video_int_ack_w)
+// AM_RANGE(0x360010, 0x360011) AM_WRITE(eprom_latch_w)
+ AM_RANGE(0x360020, 0x360021) AM_WRITE(atarigen_sound_reset_w)
+ AM_RANGE(0x360030, 0x360031) AM_WRITE(atarigen_sound_w)
+ AM_RANGE(0x3e0000, 0x3e0fff) AM_READWRITE(MRA16_RAM, paletteram16_IIIIRRRRGGGGBBBB_word_w) AM_BASE(&paletteram16)
+ AM_RANGE(0xff0000, 0xff1fff) AM_WRITE(atarigen_playfield_upper_w) AM_BASE(&atarigen_playfield_upper)
+ AM_RANGE(0xff8000, 0xff9fff) AM_WRITE(atarigen_playfield_w) AM_BASE(&atarigen_playfield)
+ AM_RANGE(0xffa000, 0xffbfff) AM_WRITE(atarimo_0_spriteram_w) AM_BASE(&atarimo_0_spriteram)
+ AM_RANGE(0xffc000, 0xffcf7f) AM_WRITE(atarigen_alpha_w) AM_BASE(&atarigen_alpha)
+ AM_RANGE(0xffcf80, 0xffcfff) AM_WRITE(atarimo_0_slipram_w) AM_BASE(&atarimo_0_slipram)
+ AM_RANGE(0xff0000, 0xff1fff) AM_RAM
+ AM_RANGE(0xff8000, 0xffffff) AM_RAM
+ADDRESS_MAP_END
+
+
/*************************************
*
@@ -292,6 +319,50 @@ static INPUT_PORTS_START( klaxp )
INPUT_PORTS_END
+static INPUT_PORTS_START( guts )
+ PORT_START /* 26000 */
+ PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
+ PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START /* 26010 */
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK )
+ PORT_SERVICE( 0x0002, IP_ACTIVE_LOW )
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) /* Input buffer full (@260030) */
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) /* Output buffer full (@360030) */
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNUSED ) /* ADEOC, end of conversion */
+ PORT_BIT( 0x00e0, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
+ PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START /* ADC0 @ 0x260020 */
+ PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START /* ADC1 @ 0x260022 */
+ PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_REVERSE
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START /* ADC0 @ 0x260024 */
+ PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START /* ADC1 @ 0x260026 */
+ PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) PORT_REVERSE
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ JSA_II_PORT /* audio board port */
+INPUT_PORTS_END
+
+
/*************************************
*
@@ -305,8 +376,8 @@ static const gfx_layout anlayout =
RGN_FRAC(1,1),
2,
{ 0, 4 },
- { 0, 1, 2, 3, 8, 9, 10, 11 },
- { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
+ { STEP4(0,1), STEP4(8,1) },
+ { STEP8(0,16) },
8*16
};
@@ -317,8 +388,8 @@ static const gfx_layout pfmolayout =
RGN_FRAC(1,4),
4,
{ RGN_FRAC(0,4), RGN_FRAC(1,4), RGN_FRAC(2,4), RGN_FRAC(3,4) },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ { STEP8(0,1) },
+ { STEP8(0,8) },
8*8
};
@@ -329,6 +400,13 @@ static GFXDECODE_START( eprom )
GFXDECODE_END
+static GFXDECODE_START( guts )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, pfmolayout, 256, 32 ) /* sprites */
+ GFXDECODE_ENTRY( REGION_GFX2, 0, anlayout, 0, 64 ) /* characters 8x8 */
+ GFXDECODE_ENTRY( REGION_GFX3, 0, pfmolayout, 256, 32 ) /* playfield */
+GFXDECODE_END
+
+
/*************************************
*
@@ -401,6 +479,36 @@ static MACHINE_DRIVER_START( klaxp )
MACHINE_DRIVER_END
+static MACHINE_DRIVER_START( guts )
+ /* basic machine hardware */
+ MDRV_CPU_ADD_TAG("main", M68000, ATARI_CLOCK_14MHz/2)
+ MDRV_CPU_PROGRAM_MAP(guts_map,0)
+ MDRV_CPU_VBLANK_INT(atarigen_video_int_gen,1)
+
+ MDRV_INTERLEAVE(10)
+
+ MDRV_MACHINE_RESET(eprom)
+ MDRV_NVRAM_HANDLER(atarigen)
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK)
+ MDRV_GFXDECODE(guts)
+ MDRV_PALETTE_LENGTH(2048)
+
+ MDRV_SCREEN_ADD("main", 0)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ /* note: these parameters are from published specs, not derived */
+ /* the board uses a SYNGEN chip to generate video signals */
+ MDRV_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
+
+ MDRV_VIDEO_START(guts)
+ MDRV_VIDEO_UPDATE(guts)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(jsa_ii_mono)
+MACHINE_DRIVER_END
+
+
/*************************************
*
@@ -560,6 +668,58 @@ ROM_START( klaxp2 )
ROM_END
+ROM_START( guts )
+ ROM_REGION( 0xa0000, REGION_CPU1, 0 ) /* 10*64k for 68000 code */
+ ROM_LOAD16_BYTE( "guts-hi0.50a", 0x00000, 0x10000, CRC(3afca24a) SHA1(4910c958ac2124de13d4069420fb2cfd18b12cec) )
+ ROM_LOAD16_BYTE( "guts-lo0.40a", 0x00001, 0x10000, CRC(ce86cf23) SHA1(28504e2e8dcf1eaa96364eed1faf00fec9e98788) )
+ ROM_LOAD16_BYTE( "guts-hi1.50b", 0x20000, 0x10000, CRC(a231f65d) SHA1(9c8ccd265ed0e9f6d7181d216ed41a0c5cc0cd5f) )
+ ROM_LOAD16_BYTE( "guts-lo1.40b", 0x20001, 0x10000, CRC(dbdd4910) SHA1(9ca22321398b6397902aa99a3ef46f1a78ccc438) )
+
+ ROM_REGION( 0x14000, REGION_CPU2, 0 ) /* 64k + 16k for 6502 code */
+ ROM_LOAD( "guts-snd.10c", 0x10000, 0x4000, CRC(9fe065d7) SHA1(0d202af3d6c62fdcfc3bb2ea95bbf4e37c0d43cf) )
+ ROM_CONTINUE( 0x04000, 0xc000 )
+
+ ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE | ROMREGION_INVERT )
+ ROM_LOAD( "guts-mo0.bin", 0x00000, 0x10000, CRC(b8d8d8da) SHA1(6426607402aa9f1c872290910eefc57a8dd60e17) )
+ ROM_LOAD( "guts-mo1.bin", 0x10000, 0x10000, CRC(d01b5a7f) SHA1(19aead56ddb92e0b1fc78d9065b1f139fe2a5668) )
+ ROM_LOAD( "guts-mo2.bin", 0x20000, 0x10000, CRC(4577b807) SHA1(df0ead177342ab360cfab9b6defb7d0129d921e4) )
+ ROM_LOAD( "guts-mo3.bin", 0x30000, 0x10000, CRC(4ab03c84) SHA1(b37d4abaaa42b9b847cc928a2b40b4e58ba9887f) )
+ ROM_LOAD( "guts-mo4.bin", 0x40000, 0x10000, CRC(04cae4fb) SHA1(1b2cde0a97f687f67836f9eb09a45875a81c994a) )
+ ROM_LOAD( "guts-mo5.bin", 0x50000, 0x10000, CRC(c65322ec) SHA1(0e77fb3db5760e12ee7b321906c2211e60a63ea4) )
+ ROM_LOAD( "guts-mo6.bin", 0x60000, 0x10000, CRC(92602a5f) SHA1(a52376d326368e989cb7c3aa3913b918b4639307) )
+ ROM_LOAD( "guts-mo7.bin", 0x70000, 0x10000, CRC(71a1911d) SHA1(6fd7c8b7a340466672e9db7a44e472e8e078e469) )
+ ROM_LOAD( "guts-mo8.bin", 0x80000, 0x10000, CRC(aa273234) SHA1(41c310d53b4a847323cfd1f2080653cbc19216bf) )
+ ROM_LOAD( "guts-mo9.bin", 0x90000, 0x10000, CRC(e85a12ef) SHA1(cbdb19e2e075c56288b9ed6aec07f03a2f265951) )
+ ROM_LOAD( "guts-moa.bin", 0xa0000, 0x10000, CRC(da1cc76f) SHA1(ba91026464fec3cd94d1625c8780d5b18ecbb6ae) )
+ ROM_LOAD( "guts-mob.bin", 0xb0000, 0x10000, CRC(246e7955) SHA1(cf146be2855d0a9c28c8da926c7fa381d06d5dd4) )
+ ROM_LOAD( "guts-moc.bin", 0xc0000, 0x10000, CRC(1764c272) SHA1(0682fdc20cc1cd9355a50804a3f13c913c33f52b) )
+ ROM_LOAD( "guts-mod.bin", 0xd0000, 0x10000, CRC(8220f2f6) SHA1(8a2900e223c203507c11e0185c2172ddddb0f4ee) )
+ ROM_LOAD( "guts-moe.bin", 0xe0000, 0x10000, CRC(ee372eac) SHA1(bb1248bb3415853e16819a7b6b64ec67f87a2c58) )
+ ROM_LOAD( "guts-mof.bin", 0xf0000, 0x10000, CRC(028ec56e) SHA1(8a95cffe5c00296e4df725335046a810efab533a) )
+
+ ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "guts-alpha.bin", 0x00000, 0x04000, CRC(ee965058) SHA1(ccd3f6550bd5b531e8dd70ca88c30cdabf30e1e9) )
+
+ ROM_REGION( 0x100000, REGION_GFX3, ROMREGION_DISPOSE | ROMREGION_INVERT )
+ ROM_LOAD( "guts-pf0.bin", 0x00000, 0x10000, CRC(1669fdb3) SHA1(d8d27b0f5877e215bf3d5343893c979860b1b45f) )
+ ROM_LOAD( "guts-pf1.bin", 0x10000, 0x10000, CRC(135c41bd) SHA1(945ad9edbfcc5fe807cb15aa72b1be9e05974cb2) )
+ ROM_LOAD( "guts-pf2.bin", 0x20000, 0x10000, CRC(c0408d39) SHA1(187ecea51f607c7f2565a9853c728e80118fefb1) )
+ ROM_LOAD( "guts-pf4.bin", 0x40000, 0x10000, CRC(577f25a6) SHA1(3eaa3de6aa7e5b3938d34823f2cccc60e9b211e7) )
+ ROM_LOAD( "guts-pf5.bin", 0x50000, 0x10000, CRC(43cbc0e3) SHA1(51e5f90391ebb402f715f389168baf401e3c03e9) )
+ ROM_LOAD( "guts-pf6.bin", 0x60000, 0x10000, CRC(03c096f4) SHA1(fc0ffd5b61ab8bda37db508ec6dc5c70e1007187) )
+ ROM_LOAD( "guts-pf8.bin", 0x80000, 0x10000, CRC(2f078b09) SHA1(e9b1aba767339d4677c3366d3f2df5a8deb5105e) )
+ ROM_LOAD( "guts-pf9.bin", 0x90000, 0x10000, CRC(7cb7302d) SHA1(9d6ae58f1f64d1e28634dd42daedebb39570cd95) )
+ ROM_LOAD( "guts-pfa.bin", 0xa0000, 0x10000, CRC(a3919dae) SHA1(0eba64afcc35e37322f9eb3a0e254026443ce092) )
+ ROM_LOAD( "guts-pfc.bin", 0xc0000, 0x10000, CRC(7c571ee8) SHA1(044744ca95b2bd7486b0b057f1d7bdbd391958ab) )
+ ROM_LOAD( "guts-pfd.bin", 0xd0000, 0x10000, CRC(979af5b2) SHA1(574a41552eb641668841cf01aeed442ccd3bc8e5) )
+ ROM_LOAD( "guts-pfe.bin", 0xe0000, 0x10000, CRC(bf384e4d) SHA1(c4810b5a3ee754b169efa01f06941a02b50c53a0) )
+
+ ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* ADPCM data */
+ ROM_LOAD( "guts-adpcm0.1f", 0x00000, 0x10000, CRC(92e9c35d) SHA1(dcc724f915e113bc34f499af9fd7c8ebb6d8ba98) )
+ ROM_LOAD( "guts-adpcm1.1e", 0x10000, 0x10000, CRC(0afddd3a) SHA1(e1a43825ad02325a64869ec8048c8176da01b286) )
+ROM_END
+
+
/*************************************
*
@@ -587,6 +747,13 @@ static DRIVER_INIT( klaxp )
}
+static DRIVER_INIT( guts )
+{
+ atarigen_eeprom_default = NULL;
+ atarijsa_init(1, 6, 1, 0x0002);
+}
+
+
/*************************************
*
@@ -598,3 +765,4 @@ GAME( 1989, eprom, 0, eprom, eprom, eprom, ROT0, "Atari Games", "Escape fro
GAME( 1989, eprom2, eprom, eprom, eprom, eprom, ROT0, "Atari Games", "Escape from the Planet of the Robot Monsters (set 2)", GAME_SUPPORTS_SAVE )
GAME( 1989, klaxp1, klax, klaxp, klaxp, klaxp, ROT0, "Atari Games", "Klax (prototype set 1)", GAME_SUPPORTS_SAVE )
GAME( 1989, klaxp2, klax, klaxp, klaxp, klaxp, ROT0, "Atari Games", "Klax (prototype set 2)", GAME_SUPPORTS_SAVE )
+GAME( 1989, guts, 0, guts, guts, guts, ROT0, "Atari Games", "Guts n' Glory (prototype)", 0 )
diff --git a/src/mame/drivers/ertictac.c b/src/mame/drivers/ertictac.c
index 1e8f11c99ce..9711a37d5f8 100644
--- a/src/mame/drivers/ertictac.c
+++ b/src/mame/drivers/ertictac.c
@@ -161,7 +161,7 @@ static TIMER_CALLBACK( ertictacTimer )
static void startTimer(void)
{
- timer_set(ATTOTIME_IN_USEC( ((T1low&0xff)|((T1high&0xff)<<8))>>4), 0, ertictacTimer);
+ timer_set(ATTOTIME_IN_USEC( ((T1low&0xff)|((T1high&0xff)<<8))>>4), NULL, 0, ertictacTimer);
}
static WRITE32_HANDLER(T1GO_w)
diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c
index f35c8cd6aa5..18389fa7be8 100644
--- a/src/mame/drivers/esh.c
+++ b/src/mame/drivers/esh.c
@@ -274,7 +274,7 @@ static INTERRUPT_GEN( vblank_callback_esh )
{
// IRQ
cpunum_set_input_line(0, 0, ASSERT_LINE);
- timer_set(ATTOTIME_IN_USEC(50), 0, irq_stop);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, 0, irq_stop);
laserdisc_vsync(discinfo);
}
diff --git a/src/mame/drivers/espial.c b/src/mame/drivers/espial.c
index ddac1e1089f..3c53d013975 100644
--- a/src/mame/drivers/espial.c
+++ b/src/mame/drivers/espial.c
@@ -24,7 +24,7 @@ static TIMER_CALLBACK( interrupt_disable )
MACHINE_RESET( espial )
{
/* we must start with NMI interrupts disabled */
- timer_call_after_resynch(0, interrupt_disable);
+ timer_call_after_resynch(NULL, 0, interrupt_disable);
sound_nmi_enabled = FALSE;
}
diff --git a/src/mame/drivers/exidy440.c b/src/mame/drivers/exidy440.c
index a186176e3cc..15260721054 100644
--- a/src/mame/drivers/exidy440.c
+++ b/src/mame/drivers/exidy440.c
@@ -446,7 +446,7 @@ static WRITE8_HANDLER( io_w )
switch (offset & 0xe0)
{
case 0x00: /* sound command */
- timer_call_after_resynch(data, delayed_sound_command_w);
+ timer_call_after_resynch(NULL, data, delayed_sound_command_w);
break;
case 0x20: /* coin bits I/O1 */
diff --git a/src/mame/drivers/exterm.c b/src/mame/drivers/exterm.c
index c29fe0afc54..001db75acf8 100644
--- a/src/mame/drivers/exterm.c
+++ b/src/mame/drivers/exterm.c
@@ -104,7 +104,7 @@ static TIMER_CALLBACK( master_sound_nmi_callback );
static MACHINE_RESET( exterm )
{
- sound_nmi_timer = timer_alloc(master_sound_nmi_callback);
+ sound_nmi_timer = timer_alloc(master_sound_nmi_callback, NULL);
}
@@ -222,7 +222,7 @@ static TIMER_CALLBACK( sound_delayed_w )
static WRITE16_HANDLER( sound_latch_w )
{
if (ACCESSING_LSB)
- timer_call_after_resynch(data & 0xff, sound_delayed_w);
+ timer_call_after_resynch(NULL, data & 0xff, sound_delayed_w);
}
diff --git a/src/mame/drivers/f-32.c b/src/mame/drivers/f-32.c
index f8225404911..b55d3bb2b25 100644
--- a/src/mame/drivers/f-32.c
+++ b/src/mame/drivers/f-32.c
@@ -87,11 +87,21 @@ static ADDRESS_MAP_START( common_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0xfff00000, 0xffffffff) AM_ROM AM_REGION(REGION_USER1,0)
ADDRESS_MAP_END
+static READ32_HANDLER( f32_input_port_1_r )
+{
+ /* burn a bunch of cycles because this is polled frequently during busy loops */
+ if ((activecpu_get_pc() == 0x000379de) ||
+ (activecpu_get_pc() == 0x000379cc) ) activecpu_adjust_icount(-100);
+ //else printf("PC %08x\n", activecpu_get_pc() );
+ return input_port_1_dword_r(0, 0);
+}
+
+
static ADDRESS_MAP_START( mosaicf2_io, ADDRESS_SPACE_IO, 32 )
AM_RANGE(0x4000, 0x4003) AM_READ(oki_32bit_r)
AM_RANGE(0x4810, 0x4813) AM_READ(ym2151_status_32bit_r)
AM_RANGE(0x5000, 0x5003) AM_READ(input_port_0_dword_r)
- AM_RANGE(0x5200, 0x5203) AM_READ(input_port_1_dword_r)
+ AM_RANGE(0x5200, 0x5203) AM_READ(f32_input_port_1_r)
AM_RANGE(0x5400, 0x5403) AM_READ(eeprom_r)
AM_RANGE(0x6000, 0x6003) AM_WRITE(oki_32bit_w)
AM_RANGE(0x6800, 0x6803) AM_WRITE(ym2151_data_32bit_w)
diff --git a/src/mame/drivers/fgoal.c b/src/mame/drivers/fgoal.c
index 3f492acd6de..6533a649c5b 100644
--- a/src/mame/drivers/fgoal.c
+++ b/src/mame/drivers/fgoal.c
@@ -99,13 +99,13 @@ static TIMER_CALLBACK( interrupt_callback )
scanline = 0;
}
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), 0, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, 0, interrupt_callback);
}
static MACHINE_RESET( fgoal )
{
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, interrupt_callback);
}
diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c
index 7c509fe6cd9..b7e754dee1d 100644
--- a/src/mame/drivers/firebeat.c
+++ b/src/mame/drivers/firebeat.c
@@ -2283,7 +2283,7 @@ static DRIVER_INIT(ppd)
static void init_keyboard(void)
{
// set keyboard timer
- keyboard_timer = timer_alloc(keyboard_timer_callback);
+ keyboard_timer = timer_alloc(keyboard_timer_callback, NULL);
timer_adjust(keyboard_timer, ATTOTIME_IN_MSEC(10), 0, ATTOTIME_IN_MSEC(10));
}
diff --git a/src/mame/drivers/firetrk.c b/src/mame/drivers/firetrk.c
index 9c755c33658..e786a36e0ff 100644
--- a/src/mame/drivers/firetrk.c
+++ b/src/mame/drivers/firetrk.c
@@ -102,7 +102,7 @@ static TIMER_CALLBACK( periodic_callback )
scanline = 0;
}
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, periodic_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, periodic_callback);
}
@@ -226,7 +226,7 @@ static void write_output(UINT8 flags)
static MACHINE_RESET( firetrk )
{
- timer_pulse(video_screen_get_frame_period(0), 0, frame_callback);
+ timer_pulse(video_screen_get_frame_period(0), NULL, 0, frame_callback);
if (GAME_IS_MONTECARLO)
{
@@ -241,7 +241,7 @@ static MACHINE_RESET( firetrk )
set_firetrk_service(last_service);
}
- timer_call_after_resynch(0, periodic_callback);
+ timer_call_after_resynch(NULL, 0, periodic_callback);
}
diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c
index 5ea5b43871c..e8a1003b6a1 100644
--- a/src/mame/drivers/flstory.c
+++ b/src/mame/drivers/flstory.c
@@ -87,7 +87,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_command_w )
{
soundlatch_w(0,data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c
index bbb16335dce..916eefcac32 100644
--- a/src/mame/drivers/flyball.c
+++ b/src/mame/drivers/flyball.c
@@ -52,14 +52,14 @@ static TIMER_CALLBACK( flyball_quarter_callback )
{
if (potsense[i] != 0)
{
- timer_set(video_screen_get_time_until_pos(0, scanline + i, 0), potsense[i], flyball_joystick_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline + i, 0), NULL, potsense[i], flyball_joystick_callback);
}
}
scanline += 0x40;
scanline &= 0xff;
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, flyball_quarter_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, flyball_quarter_callback);
flyball_potsense = 0;
flyball_potmask = 0;
@@ -77,7 +77,7 @@ static MACHINE_RESET( flyball )
for (i = 0; i < 0x1000; i++)
rombase[i] = ROM[i ^ 0x1ff];
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, flyball_quarter_callback);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, flyball_quarter_callback);
}
diff --git a/src/mame/drivers/foodf.c b/src/mame/drivers/foodf.c
index 03b6f4734e8..27fd7af25ed 100644
--- a/src/mame/drivers/foodf.c
+++ b/src/mame/drivers/foodf.c
@@ -153,7 +153,7 @@ static TIMER_CALLBACK( scanline_update )
static MACHINE_START( foodf )
{
state_save_register_global(whichport);
- scanline_timer = timer_alloc(scanline_update);
+ scanline_timer = timer_alloc(scanline_update, NULL);
}
diff --git a/src/mame/drivers/fromance.c b/src/mame/drivers/fromance.c
index c99d0f5361c..1cbc6ee4f87 100644
--- a/src/mame/drivers/fromance.c
+++ b/src/mame/drivers/fromance.c
@@ -99,14 +99,14 @@ static TIMER_CALLBACK( deferred_commanddata_w )
static WRITE8_HANDLER( fromance_commanddata_w )
{
/* do this on a timer to let the slave CPU synchronize */
- timer_call_after_resynch(data, deferred_commanddata_w);
+ timer_call_after_resynch(NULL, data, deferred_commanddata_w);
}
static READ8_HANDLER( fromance_busycheck_main_r )
{
/* set a timer to force synchronization after the read */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
if (!fromance_directionflag) return 0x00; // standby
else return 0xff; // busy
diff --git a/src/mame/drivers/fuukifg2.c b/src/mame/drivers/fuukifg2.c
index b5d61175070..1a91be22558 100644
--- a/src/mame/drivers/fuukifg2.c
+++ b/src/mame/drivers/fuukifg2.c
@@ -524,14 +524,14 @@ static struct YM3812interface fuuki16_ym3812_intf =
static TIMER_CALLBACK( level_1_interrupt_callback )
{
cpunum_set_input_line(0, 1, PULSE_LINE);
- timer_set(video_screen_get_time_until_pos(0, 248, 0), 0, level_1_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 248, 0), NULL, 0, level_1_interrupt_callback);
}
static TIMER_CALLBACK( vblank_interrupt_callback )
{
cpunum_set_input_line(0, 3, PULSE_LINE); // VBlank IRQ
- timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), 0, vblank_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), NULL, 0, vblank_interrupt_callback);
}
@@ -545,14 +545,14 @@ static TIMER_CALLBACK( raster_interrupt_callback )
static MACHINE_START( fuuki16 )
{
- raster_interrupt_timer = timer_alloc(raster_interrupt_callback);
+ raster_interrupt_timer = timer_alloc(raster_interrupt_callback, NULL);
}
static MACHINE_RESET( fuuki16 )
{
- timer_set(video_screen_get_time_until_pos(0, 248, 0), 0, level_1_interrupt_callback);
- timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), 0, vblank_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 248, 0), NULL, 0, level_1_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), NULL, 0, vblank_interrupt_callback);
timer_adjust(raster_interrupt_timer, video_screen_get_time_until_pos(0, 0, machine->screen[0].visarea.max_x + 1), 0, attotime_zero);
}
diff --git a/src/mame/drivers/fuukifg3.c b/src/mame/drivers/fuukifg3.c
index 760ae8185b5..170e31750ef 100644
--- a/src/mame/drivers/fuukifg3.c
+++ b/src/mame/drivers/fuukifg3.c
@@ -539,14 +539,14 @@ GFXDECODE_END
static TIMER_CALLBACK( level_1_interrupt_callback )
{
cpunum_set_input_line(0, 1, PULSE_LINE);
- timer_set(video_screen_get_time_until_pos(0, 248, 0), 0, level_1_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 248, 0), NULL, 0, level_1_interrupt_callback);
}
static TIMER_CALLBACK( vblank_interrupt_callback )
{
cpunum_set_input_line(0, 3, PULSE_LINE); // VBlank IRQ
- timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), 0, vblank_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), NULL, 0, vblank_interrupt_callback);
}
@@ -560,14 +560,14 @@ static TIMER_CALLBACK( raster_interrupt_callback )
static MACHINE_START( fuuki32 )
{
- raster_interrupt_timer = timer_alloc(raster_interrupt_callback);
+ raster_interrupt_timer = timer_alloc(raster_interrupt_callback, NULL);
}
static MACHINE_RESET( fuuki32 )
{
- timer_set(video_screen_get_time_until_pos(0, 248, 0), 0, level_1_interrupt_callback);
- timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), 0, vblank_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 248, 0), NULL, 0, level_1_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), NULL, 0, vblank_interrupt_callback);
timer_adjust(raster_interrupt_timer, video_screen_get_time_until_pos(0, 0, machine->screen[0].visarea.max_x + 1), 0, attotime_zero);
}
diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c
index 6e413382c6d..80471ae79a0 100644
--- a/src/mame/drivers/gaelco3d.c
+++ b/src/mame/drivers/gaelco3d.c
@@ -197,7 +197,7 @@ static void init_machine_common(void)
cpunum_set_info_fct(2, CPUINFO_PTR_ADSP2100_TX_HANDLER, (genf *)adsp_tx_callback);
/* allocate a timer for feeding the autobuffer */
- adsp_autobuffer_timer = timer_alloc(adsp_autobuffer_irq);
+ adsp_autobuffer_timer = timer_alloc(adsp_autobuffer_irq, NULL);
memory_configure_bank(1, 0, 256, memory_region(REGION_USER1), 0x4000);
memory_set_bank(1, 0);
@@ -315,7 +315,7 @@ static WRITE16_HANDLER( sound_data_w )
{
logerror("%06X:sound_data_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, ~mem_mask);
if (!(mem_mask & 0xff))
- timer_call_after_resynch(data & 0xff, delayed_sound_w);
+ timer_call_after_resynch(NULL, data & 0xff, delayed_sound_w);
}
static WRITE32_HANDLER( sound_data_020_w ) { if ((mem_mask & 0xffff0000) != 0xffff0000) sound_data_w(offset, data >> 16, mem_mask >> 16); }
diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c
index cb9692c126a..a1b7190c9ae 100644
--- a/src/mame/drivers/galaga.c
+++ b/src/mame/drivers/galaga.c
@@ -1607,7 +1607,7 @@ static const char *battles_sample_names[] =
0 /* end of array */
};
-struct Samplesinterface battles_samples_interface =
+static struct Samplesinterface battles_samples_interface =
{
1, /* one channel */
battles_sample_names
diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c
index 74e9e981573..33acae10e12 100644
--- a/src/mame/drivers/gamecstl.c
+++ b/src/mame/drivers/gamecstl.c
@@ -11,6 +11,31 @@
disk image, it's in C:\GH4\GH4.EXE. It's UPX compressed, so unpack it before doing
any forensics. The emulator does run on Windows as new as XP Pro SP2 but you can't
control it due to the lack of the custom input.
+
+ Updates 27/11/2007 (Diego Nappino):
+ The COM1 port is opened at 19200 bps, No parity, 8 bit data,1 stop bit.
+ The protocol is based on a 6 bytes frame with a leading byte valued 0x05 and a trailing one at 0x02
+ The four middle bytes are used, in negative logic (0xFF = No button pressed), to implement the inputs.
+ Each bit meaning as follows :
+
+ Byte 1 Byte 2 Byte 3 Byte 4
+ Bit 0 P1-Credit P1-Button C P2-Left UNUSED
+ Bit 1 P1-Start P1-Button D P2-Right UNUSED
+ Bit 2 P1-Down P1-Button E P2-Button A SERVICE
+ Bit 3 P1-Up TEST P2-Button B UNUSED
+ Bit 4 P1-Left P2-Credit P2-Button C UNUSED
+ Bit 5 P1-Right P2-Start P2-Button D UNUSED
+ Bit 6 P1-Button A P2-Down P2-Button E UNUSED
+ Bit 7 P1-Button B P2-Up VIDEO-MODE UNUSED
+
+ The JAMMA adaptor sends a byte frame each time an input changes. So, in example, if the P1-Button A and P1-Button B are both pressed, it will send :
+
+ 0x05 0xFC 0xFF 0xFF 0xFF 0x02
+
+ And when the buttons are both released
+
+ 0x05 0xFF 0xFF 0xFF 0xFF 0x02
+
*/
#include "driver.h"
diff --git a/src/mame/drivers/gameplan.c b/src/mame/drivers/gameplan.c
index 6d005894816..bce79ce97e2 100644
--- a/src/mame/drivers/gameplan.c
+++ b/src/mame/drivers/gameplan.c
@@ -262,7 +262,7 @@ static WRITE8_HANDLER( video_command_trigger_w )
/* set a timer for an arbitrarily short period.
The real time it takes to clear to screen is not
important to the software */
- timer_call_after_resynch(0, clear_screen_done_callback);
+ timer_call_after_resynch(NULL, 0, clear_screen_done_callback);
break;
}
@@ -281,7 +281,7 @@ static void via_irq(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(ATTOTIME_IN_USEC(50), state, via_irq_delayed);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, state, via_irq_delayed);
}
@@ -319,7 +319,7 @@ static TIMER_CALLBACK( via_0_ca1_timer_callback )
static void create_via_0_timer(void)
{
- via_0_ca1_timer = timer_alloc(via_0_ca1_timer_callback);
+ via_0_ca1_timer = timer_alloc(via_0_ca1_timer_callback, NULL);
}
diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c
index 3515a6dfe05..96327204b8f 100644
--- a/src/mame/drivers/gcpinbal.c
+++ b/src/mame/drivers/gcpinbal.c
@@ -64,8 +64,8 @@ static INTERRUPT_GEN( gcpinbal_interrupt )
{
/* Unsure of actual sequence */
- timer_set(ATTOTIME_IN_CYCLES(500,0),0, gcpinbal_interrupt1);
-// timer_set(ATTOTIME_IN_CYCLES(1000,0),0, gcpinbal_interrupt3);
+ timer_set(ATTOTIME_IN_CYCLES(500,0), NULL, 0, gcpinbal_interrupt1);
+// timer_set(ATTOTIME_IN_CYCLES(1000,0), NULL, 0, gcpinbal_interrupt3);
cpunum_set_input_line(0, 4, HOLD_LINE);
}
diff --git a/src/mame/drivers/genesis.c b/src/mame/drivers/genesis.c
index ed7b462d77d..27c00e821b2 100644
--- a/src/mame/drivers/genesis.c
+++ b/src/mame/drivers/genesis.c
@@ -103,7 +103,7 @@ static TIMER_CALLBACK( vdp_reload_counter )
{
scanline_int = 1;
update_interrupts();
- timer_set(video_screen_get_time_until_pos(0, scanline + 1, 0), 0, vdp_int4_off);
+ timer_set(video_screen_get_time_until_pos(0, scanline + 1, 0), NULL, 0, vdp_int4_off);
}
/* advance to the next scanline */
@@ -134,7 +134,7 @@ INTERRUPT_GEN( genesis_vblank_interrupt )
update_interrupts();
/* set a timer to turn it off */
- timer_set(video_screen_get_time_until_pos(0, video_screen_get_vpos(0), 22), 0, vdp_int6_off);
+ timer_set(video_screen_get_time_until_pos(0, video_screen_get_vpos(0), 22), NULL, 0, vdp_int6_off);
}
@@ -172,7 +172,7 @@ MACHINE_RESET( genesis )
logerror("Machine init\n");
/* set the first scanline 0 timer to go off */
- scan_timer = timer_alloc(vdp_reload_counter);
+ scan_timer = timer_alloc(vdp_reload_counter, NULL);
timer_adjust(scan_timer, video_screen_get_time_until_pos(0, 0, 320), 0, attotime_zero);
}
diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c
index 5689aa1c96a..57126fb7f1f 100644
--- a/src/mame/drivers/gijoe.c
+++ b/src/mame/drivers/gijoe.c
@@ -207,7 +207,7 @@ static MACHINE_START( gijoe )
{
state_save_register_global(cur_control2);
- dmadelay_timer = timer_alloc(dmaend_callback);
+ dmadelay_timer = timer_alloc(dmaend_callback, NULL);
}
diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c
index 0905e8e736e..1165ed7bc64 100644
--- a/src/mame/drivers/gpworld.c
+++ b/src/mame/drivers/gpworld.c
@@ -408,7 +408,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? */
cpunum_set_input_line(0, 0, ASSERT_LINE);
- timer_set(ATTOTIME_IN_USEC(100), 0, irq_stop);
+ timer_set(ATTOTIME_IN_USEC(100), NULL, 0, irq_stop);
laserdisc_vsync(discinfo);
}
diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c
index 9a3ff5d01ce..e1442b2e146 100644
--- a/src/mame/drivers/grchamp.c
+++ b/src/mame/drivers/grchamp.c
@@ -405,7 +405,7 @@ static TIMER_CALLBACK( main_to_sub_comm_sync_w )
static WRITE8_HANDLER( main_to_sub_comm_w )
{
- timer_call_after_resynch(data | (offset << 8), main_to_sub_comm_sync_w);
+ timer_call_after_resynch(NULL, data | (offset << 8), main_to_sub_comm_sync_w);
}
diff --git a/src/mame/drivers/gridlee.c b/src/mame/drivers/gridlee.c
index 307699ca45b..ca61b4c224a 100644
--- a/src/mame/drivers/gridlee.c
+++ b/src/mame/drivers/gridlee.c
@@ -119,15 +119,15 @@ static TIMER_CALLBACK( irq_timer )
{
/* next interrupt after scanline 256 is scanline 64 */
if (param == 256)
- timer_set(video_screen_get_time_until_pos(0, 64, 0), 64, irq_timer);
+ timer_set(video_screen_get_time_until_pos(0, 64, 0), NULL, 64, irq_timer);
else
- timer_set(video_screen_get_time_until_pos(0, param + 64, 0), param + 64, irq_timer);
+ timer_set(video_screen_get_time_until_pos(0, param + 64, 0), NULL, param + 64, irq_timer);
/* IRQ starts on scanline 0, 64, 128, etc. */
cpunum_set_input_line(0, M6809_IRQ_LINE, ASSERT_LINE);
/* it will turn off on the next HBLANK */
- timer_set(video_screen_get_time_until_pos(0, param, BALSENTE_HBSTART), 0, irq_off);
+ timer_set(video_screen_get_time_until_pos(0, param, BALSENTE_HBSTART), NULL, 0, irq_off);
}
@@ -140,21 +140,21 @@ static TIMER_CALLBACK( firq_off )
static TIMER_CALLBACK( firq_timer )
{
/* same time next frame */
- timer_set(video_screen_get_time_until_pos(0, FIRQ_SCANLINE, 0), 0, firq_timer);
+ timer_set(video_screen_get_time_until_pos(0, FIRQ_SCANLINE, 0), NULL, 0, firq_timer);
/* IRQ starts on scanline FIRQ_SCANLINE? */
cpunum_set_input_line(0, M6809_FIRQ_LINE, ASSERT_LINE);
/* it will turn off on the next HBLANK */
- timer_set(video_screen_get_time_until_pos(0, FIRQ_SCANLINE, BALSENTE_HBSTART), 0, firq_off);
+ timer_set(video_screen_get_time_until_pos(0, FIRQ_SCANLINE, BALSENTE_HBSTART), NULL, 0, firq_off);
}
static MACHINE_RESET( gridlee )
{
/* start timers to generate interrupts */
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, irq_timer);
- timer_set(video_screen_get_time_until_pos(0, FIRQ_SCANLINE, 0), 0, firq_timer);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, irq_timer);
+ timer_set(video_screen_get_time_until_pos(0, FIRQ_SCANLINE, 0), NULL, 0, firq_timer);
/* create the polynomial tables */
poly17_init();
diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c
index 5352ef84262..5052fbd933a 100644
--- a/src/mame/drivers/groundfx.c
+++ b/src/mame/drivers/groundfx.c
@@ -221,7 +221,7 @@ static WRITE32_HANDLER( groundfx_adc_w )
{
/* One interrupt per input port (4 per frame, though only 2 used).
1000 cycle delay is arbitrary */
- timer_set(ATTOTIME_IN_CYCLES(1000,0),0, groundfx_interrupt5);
+ timer_set(ATTOTIME_IN_CYCLES(1000,0), NULL, 0, groundfx_interrupt5);
}
static WRITE32_HANDLER( rotate_control_w ) /* only a guess that it's rotation */
diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c
index 8a5239ca45c..74eb24fc228 100644
--- a/src/mame/drivers/gunbustr.c
+++ b/src/mame/drivers/gunbustr.c
@@ -69,7 +69,7 @@ static TIMER_CALLBACK( gunbustr_interrupt5 )
static INTERRUPT_GEN( gunbustr_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(200000-500,0),0, gunbustr_interrupt5);
+ timer_set(ATTOTIME_IN_CYCLES(200000-500,0), NULL, 0, gunbustr_interrupt5);
cpunum_set_input_line(0, 4, HOLD_LINE);
}
@@ -181,7 +181,7 @@ static READ32_HANDLER( gunbustr_gun_r )
static WRITE32_HANDLER( gunbustr_gun_w )
{
/* 10000 cycle delay is arbitrary */
- timer_set(ATTOTIME_IN_CYCLES(10000,0),0, gunbustr_interrupt5);
+ timer_set(ATTOTIME_IN_CYCLES(10000,0), NULL, 0, gunbustr_interrupt5);
}
diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c
index 7b9ea25b0e3..bc20ea3dd7b 100644
--- a/src/mame/drivers/halleys.c
+++ b/src/mame/drivers/halleys.c
@@ -2228,7 +2228,7 @@ static DRIVER_INIT( benberob )
init_common();
- blitter_reset_timer = timer_alloc(blitter_reset);
+ blitter_reset_timer = timer_alloc(blitter_reset, NULL);
}
diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c
index cd62d9abffe..d5a8fc1fcfb 100644
--- a/src/mame/drivers/hng64.c
+++ b/src/mame/drivers/hng64.c
@@ -1448,7 +1448,7 @@ static INTERRUPT_GEN( irq_start )
}
cpunum_set_input_line(0, 0, ASSERT_LINE);
- timer_set(ATTOTIME_IN_USEC(50), 0, irq_stop);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, 0, irq_stop);
}
diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c
index 5bd02fe4e1c..e09e99a2636 100644
--- a/src/mame/drivers/hyperspt.c
+++ b/src/mame/drivers/hyperspt.c
@@ -450,7 +450,7 @@ GFXDECODE_END
-struct VLM5030interface hyperspt_vlm5030_interface =
+static struct VLM5030interface hyperspt_vlm5030_interface =
{
REGION_SOUND1, /* memory region */
0 /* memory size */
diff --git a/src/mame/drivers/hyprduel.c b/src/mame/drivers/hyprduel.c
index e366263cac7..05fd15afd15 100644
--- a/src/mame/drivers/hyprduel.c
+++ b/src/mame/drivers/hyprduel.c
@@ -196,7 +196,7 @@ static INTERRUPT_GEN( hyprduel_interrupt )
cpunum_set_input_line(0, 2, HOLD_LINE);
cpunum_set_input_line(1, 1, HOLD_LINE);
/* the duration is a guess */
- timer_set(ATTOTIME_IN_USEC(2500), 0x20, vblank_end_callback);
+ timer_set(ATTOTIME_IN_USEC(2500), NULL, 0x20, vblank_end_callback);
rastersplit = 0;
} else {
requested_int |= 0x12; /* hsync */
@@ -367,7 +367,7 @@ static WRITE16_HANDLER( hyprduel_blitter_w )
another blit. */
if (b1 == 0)
{
- timer_set(ATTOTIME_IN_USEC(500),0,hyprduel_blit_done);
+ timer_set(ATTOTIME_IN_USEC(500), NULL,0,hyprduel_blit_done);
return;
}
diff --git a/src/mame/drivers/itech32.c b/src/mame/drivers/itech32.c
index f7ce9cad927..e4d26724236 100644
--- a/src/mame/drivers/itech32.c
+++ b/src/mame/drivers/itech32.c
@@ -544,7 +544,7 @@ static TIMER_CALLBACK( delayed_sound_data_w )
static WRITE16_HANDLER( sound_data_w )
{
if (ACCESSING_LSB)
- timer_call_after_resynch(data & 0xff, delayed_sound_data_w);
+ timer_call_after_resynch(NULL, data & 0xff, delayed_sound_data_w);
}
@@ -557,7 +557,7 @@ static READ32_HANDLER( sound_data32_r )
static WRITE32_HANDLER( sound_data32_w )
{
if (!(mem_mask & 0x00ff0000))
- timer_call_after_resynch((data >> 16) & 0xff, delayed_sound_data_w);
+ timer_call_after_resynch(NULL, (data >> 16) & 0xff, delayed_sound_data_w);
}
diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c
index 586bfce8e1a..e29068d465b 100644
--- a/src/mame/drivers/itech8.c
+++ b/src/mame/drivers/itech8.c
@@ -622,7 +622,7 @@ static MACHINE_START( sstrike )
machine_start_itech8(machine);
/* we need to update behind the beam as well */
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 32, behind_the_beam_update);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 32, behind_the_beam_update);
}
static MACHINE_RESET( itech8 )
@@ -674,7 +674,7 @@ static TIMER_CALLBACK( behind_the_beam_update )
if (scanline >= 256) scanline = 0;
/* set a new timer */
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), (scanline << 8) + interval, behind_the_beam_update);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, (scanline << 8) + interval, behind_the_beam_update);
}
@@ -786,7 +786,7 @@ static TIMER_CALLBACK( delayed_sound_data_w )
static WRITE8_HANDLER( sound_data_w )
{
- timer_call_after_resynch(data, delayed_sound_data_w);
+ timer_call_after_resynch(NULL, data, delayed_sound_data_w);
}
@@ -797,7 +797,7 @@ static WRITE8_HANDLER( gtg2_sound_data_w )
((data & 0x5d) << 1) |
((data & 0x20) >> 3) |
((data & 0x02) << 5);
- timer_call_after_resynch(data, delayed_sound_data_w);
+ timer_call_after_resynch(NULL, data, delayed_sound_data_w);
}
diff --git a/src/mame/drivers/jedi.c b/src/mame/drivers/jedi.c
index a52ec8620e1..c8f28cf79ac 100644
--- a/src/mame/drivers/jedi.c
+++ b/src/mame/drivers/jedi.c
@@ -169,7 +169,7 @@ static WRITE8_HANDLER( sound_irq_ack_w )
static MACHINE_START( jedi )
{
/* set a timer to run the interrupts */
- jedi_timer = timer_alloc(generate_interrupt);
+ jedi_timer = timer_alloc(generate_interrupt, NULL);
timer_adjust(jedi_timer,video_screen_get_time_until_pos(0, 32, 0), 32, attotime_zero);
/* configure the banks */
@@ -236,7 +236,7 @@ static TIMER_CALLBACK( delayed_sound_latch_w )
static WRITE8_HANDLER( sound_latch_w )
{
- timer_call_after_resynch(data, delayed_sound_latch_w);
+ timer_call_after_resynch(NULL, data, delayed_sound_latch_w);
}
diff --git a/src/mame/drivers/jpmimpct.c b/src/mame/drivers/jpmimpct.c
index 6af3ecbc754..682e3376e61 100644
--- a/src/mame/drivers/jpmimpct.c
+++ b/src/mame/drivers/jpmimpct.c
@@ -174,7 +174,7 @@ static MACHINE_RESET( jpmimpct )
{
memset(&duart_1, 0, sizeof(duart_1));
- duart_1_timer = timer_alloc(duart_1_timer_event);
+ duart_1_timer = timer_alloc(duart_1_timer_event, NULL);
/* Reset states */
duart_1_irq = tms_irq = 0;
diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c
index f39c981154a..05015d96aaf 100644
--- a/src/mame/drivers/kinst.c
+++ b/src/mame/drivers/kinst.c
@@ -249,7 +249,7 @@ static TIMER_CALLBACK( irq0_stop )
static INTERRUPT_GEN( irq0_start )
{
cpunum_set_input_line(0, 0, ASSERT_LINE);
- timer_set(ATTOTIME_IN_USEC(50), 0, irq0_stop);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, 0, irq0_stop);
}
@@ -392,7 +392,7 @@ static READ32_HANDLER( kinst_speedup_r )
UINT32 r26 = activecpu_get_reg(MIPS3_R26) - *kinst_speedup;
if (r26 < r3)
{
- timer_set(ATTOTIME_IN_CYCLES((r3 - r26) * 2, 0), 0, end_spin);
+ timer_set(ATTOTIME_IN_CYCLES((r3 - r26) * 2, 0), NULL, 0, end_spin);
cpu_spinuntil_int();
}
}
diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c
index 2325bf5f366..2dc85fef79e 100644
--- a/src/mame/drivers/konamigx.c
+++ b/src/mame/drivers/konamigx.c
@@ -1268,7 +1268,7 @@ static const gfx_layout bglayout_8bpp =
16*128
};
-gfx_layout t1_charlayout6 =
+static gfx_layout t1_charlayout6 =
{
16, 16,
RGN_FRAC(1,1),
@@ -1280,7 +1280,7 @@ gfx_layout t1_charlayout6 =
16*16*6
};
-gfx_layout t1_charlayout8 =
+static gfx_layout t1_charlayout8 =
{
16, 16,
RGN_FRAC(1,1),
@@ -3526,7 +3526,7 @@ static DRIVER_INIT(konamigx)
snd020_hack = 0;
resume_trigger = 0;
- dmadelay_timer = timer_alloc(dmaend_callback);
+ dmadelay_timer = timer_alloc(dmaend_callback, NULL);
i = match = 0;
while ((gameDefs[i].cfgport != -1) && (!match))
diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c
index 812df78db59..1d11a2878da 100644
--- a/src/mame/drivers/ksys573.c
+++ b/src/mame/drivers/ksys573.c
@@ -892,7 +892,7 @@ static void atapi_init(void)
atapi_data_len = 0;
atapi_cdata_wait = 0;
- atapi_timer = timer_alloc( atapi_xfer_end );
+ atapi_timer = timer_alloc( atapi_xfer_end , NULL);
timer_adjust(atapi_timer, attotime_never, 0, attotime_never);
for( i = 0; i < 2; i++ )
@@ -1483,7 +1483,7 @@ static DRIVER_INIT( konami573 )
for (i = 0; i < 3; i++)
{
- m_p_timer_root[i] = timer_alloc(root_finished);
+ m_p_timer_root[i] = timer_alloc(root_finished, NULL);
}
timekeeper_init( 0, TIMEKEEPER_M48T58, memory_region( REGION_USER11 ) );
diff --git a/src/mame/drivers/ladyfrog.c b/src/mame/drivers/ladyfrog.c
index 1a739bdd253..531b525d2c5 100644
--- a/src/mame/drivers/ladyfrog.c
+++ b/src/mame/drivers/ladyfrog.c
@@ -97,7 +97,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_command_w )
{
soundlatch_w(0,data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
static WRITE8_HANDLER( nmi_disable_w )
diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c
index f21be382845..de948eb80fb 100644
--- a/src/mame/drivers/lgp.c
+++ b/src/mame/drivers/lgp.c
@@ -333,7 +333,7 @@ static INTERRUPT_GEN( vblank_callback_lgp )
// IRQ
cpunum_set_input_line(0, 0, ASSERT_LINE);
- timer_set(ATTOTIME_IN_USEC(50), 0, irq_stop);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, 0, irq_stop);
laserdisc_vsync(discinfo);
}
diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c
index 96eb9e0af97..e9350f028ef 100644
--- a/src/mame/drivers/lkage.c
+++ b/src/mame/drivers/lkage.c
@@ -62,7 +62,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( lkage_sound_command_w )
{
soundlatch_w(offset,data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
static WRITE8_HANDLER( lkage_sh_nmi_disable_w )
diff --git a/src/mame/drivers/m107.c b/src/mame/drivers/m107.c
index 45ce317629a..1d4ac5fe235 100644
--- a/src/mame/drivers/m107.c
+++ b/src/mame/drivers/m107.c
@@ -45,7 +45,7 @@ static WRITE16_HANDLER( bankswitch_w )
static MACHINE_START( m107 )
{
- scanline_timer = timer_alloc(m107_scanline_interrupt);
+ scanline_timer = timer_alloc(m107_scanline_interrupt, NULL);
}
static MACHINE_RESET( m107 )
@@ -119,7 +119,7 @@ static TIMER_CALLBACK( setvector_callback )
static WRITE16_HANDLER( m107_soundlatch_w )
{
- timer_call_after_resynch(V30_ASSERT,setvector_callback);
+ timer_call_after_resynch(NULL, V30_ASSERT,setvector_callback);
soundlatch_w(0, data & 0xff);
// logerror("soundlatch_w %02x\n",data);
}
@@ -138,7 +138,7 @@ static READ16_HANDLER( m107_soundlatch_r )
static WRITE16_HANDLER( m107_sound_irq_ack_w )
{
- timer_call_after_resynch(V30_CLEAR,setvector_callback);
+ timer_call_after_resynch(NULL, V30_CLEAR,setvector_callback);
}
static WRITE16_HANDLER( m107_sound_status_w )
@@ -457,9 +457,9 @@ GFXDECODE_END
static void sound_irq(int state)
{
if (state)
- timer_call_after_resynch(YM2151_ASSERT,setvector_callback);
+ timer_call_after_resynch(NULL, YM2151_ASSERT,setvector_callback);
else
- timer_call_after_resynch(YM2151_CLEAR,setvector_callback);
+ timer_call_after_resynch(NULL, YM2151_CLEAR,setvector_callback);
}
static struct YM2151interface ym2151_interface =
diff --git a/src/mame/drivers/m92.c b/src/mame/drivers/m92.c
index 41d51bf960f..5d3f951fb29 100644
--- a/src/mame/drivers/m92.c
+++ b/src/mame/drivers/m92.c
@@ -225,7 +225,7 @@ static MACHINE_START( m92 )
state_save_register_global(bankaddress);
state_save_register_func_postload(set_m92_bank);
- scanline_timer = timer_alloc(m92_scanline_interrupt);
+ scanline_timer = timer_alloc(m92_scanline_interrupt, NULL);
}
static MACHINE_RESET( m92 )
@@ -330,7 +330,7 @@ static TIMER_CALLBACK( setvector_callback )
static WRITE16_HANDLER( m92_soundlatch_w )
{
- timer_call_after_resynch(V30_ASSERT, setvector_callback);
+ timer_call_after_resynch(NULL, V30_ASSERT, setvector_callback);
soundlatch_w(0, data & 0xff);
}
@@ -347,7 +347,7 @@ static READ16_HANDLER( m92_soundlatch_r )
static WRITE16_HANDLER( m92_sound_irq_ack_w )
{
- timer_call_after_resynch(V30_CLEAR, setvector_callback);
+ timer_call_after_resynch(NULL, V30_CLEAR, setvector_callback);
}
static WRITE16_HANDLER( m92_sound_status_w )
@@ -928,9 +928,9 @@ GFXDECODE_END
static void sound_irq(int state)
{
if (state)
- timer_call_after_resynch(YM2151_ASSERT, setvector_callback);
+ timer_call_after_resynch(NULL, YM2151_ASSERT, setvector_callback);
else
- timer_call_after_resynch(YM2151_CLEAR, setvector_callback);
+ timer_call_after_resynch(NULL, YM2151_CLEAR, setvector_callback);
}
static struct YM2151interface ym2151_interface =
@@ -1920,7 +1920,7 @@ static void init_m92(running_machine *machine, const UINT8 *decryption_table, in
m92_irq_vectorbase=0x80;
m92_sprite_buffer_busy=1;
- setvector_callback(machine, VECTOR_INIT);
+ setvector_callback(machine, NULL, VECTOR_INIT);
irem_cpu_decrypt(1,decryption_table);
}
diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c
index e6d51dd9318..56c03da92ca 100644
--- a/src/mame/drivers/magmax.c
+++ b/src/mame/drivers/magmax.c
@@ -74,7 +74,7 @@ static TIMER_CALLBACK( scanline_callback )
static MACHINE_START( magmax )
{
/* Create interrupt timer */
- interrupt_timer = timer_alloc(scanline_callback);
+ interrupt_timer = timer_alloc(scanline_callback, NULL);
/* Set up save state */
state_save_register_global(sound_latch);
diff --git a/src/mame/drivers/maxaflex.c b/src/mame/drivers/maxaflex.c
index ec74a51fa77..fa25f608fe8 100644
--- a/src/mame/drivers/maxaflex.c
+++ b/src/mame/drivers/maxaflex.c
@@ -212,7 +212,7 @@ static MACHINE_RESET(supervisor_board)
portB_in = portB_out = ddrB = 0;
portC_in = portC_out = ddrC = 0;
tdr = tcr = 0;
- mcu_timer = timer_alloc( mcu_timer_proc );
+ mcu_timer = timer_alloc( mcu_timer_proc , NULL);
output_set_lamp_value(0, 0);
output_set_lamp_value(1, 0);
diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c
index 757c59c8a75..1ffa98bddbd 100644
--- a/src/mame/drivers/mazerbla.c
+++ b/src/mame/drivers/mazerbla.c
@@ -335,7 +335,7 @@ static UINT8 ls670_1[4];
static READ8_HANDLER( ls670_0_r )
{
/* set a timer to force synchronization after the read */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
return ls670_0[offset];
}
@@ -351,7 +351,7 @@ static TIMER_CALLBACK( deferred_ls670_0_w )
static WRITE8_HANDLER( ls670_0_w )
{
/* do this on a timer to let the CPUs synchronize */
- timer_call_after_resynch((offset<<8) | data, deferred_ls670_0_w);
+ timer_call_after_resynch(NULL, (offset<<8) | data, deferred_ls670_0_w);
}
@@ -359,7 +359,7 @@ static WRITE8_HANDLER( ls670_0_w )
static READ8_HANDLER( ls670_1_r )
{
/* set a timer to force synchronization after the read */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
return ls670_1[offset];
}
@@ -375,7 +375,7 @@ static TIMER_CALLBACK( deferred_ls670_1_w )
static WRITE8_HANDLER( ls670_1_w )
{
/* do this on a timer to let the CPUs synchronize */
- timer_call_after_resynch((offset<<8) | data, deferred_ls670_1_w);
+ timer_call_after_resynch(NULL, (offset<<8) | data, deferred_ls670_1_w);
}
@@ -1084,7 +1084,7 @@ static TIMER_CALLBACK( delayed_sound_w )
static WRITE8_HANDLER( main_sound_w )
{
- timer_call_after_resynch(data & 0xff, delayed_sound_w);
+ timer_call_after_resynch(NULL, data & 0xff, delayed_sound_w);
}
diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c
index 6efd31347cb..864916ffa6c 100644
--- a/src/mame/drivers/mcatadv.c
+++ b/src/mame/drivers/mcatadv.c
@@ -481,7 +481,7 @@ static void sound_irq( int irq )
{
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-struct YM2610interface mcatadv_ym2610_interface =
+static struct YM2610interface mcatadv_ym2610_interface =
{
sound_irq, /* irq */
REGION_SOUND1, /* delta_t */
diff --git a/src/mame/drivers/mcr.c b/src/mame/drivers/mcr.c
index 87d7afdc0ed..118dc5b4907 100644
--- a/src/mame/drivers/mcr.c
+++ b/src/mame/drivers/mcr.c
@@ -1485,7 +1485,7 @@ static const char *journey_sample_names[] =
0
};
-struct Samplesinterface journey_samples_interface =
+static struct Samplesinterface journey_samples_interface =
{
1,
journey_sample_names
diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c
index b0cb2019b44..d96913e9c4b 100644
--- a/src/mame/drivers/mediagx.c
+++ b/src/mame/drivers/mediagx.c
@@ -860,7 +860,7 @@ static MACHINE_RESET(mediagx)
dacl = auto_malloc(65536 * sizeof(INT16));
dacr = auto_malloc(65536 * sizeof(INT16));
- sound_timer = timer_alloc(sound_timer_callback);
+ sound_timer = timer_alloc(sound_timer_callback, NULL);
timer_adjust(sound_timer, ATTOTIME_IN_MSEC(10), 0, attotime_zero);
dmadac_enable(0, 2, 1);
diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c
index 05da1ee4bab..10a02adcb72 100644
--- a/src/mame/drivers/megadriv.c
+++ b/src/mame/drivers/megadriv.c
@@ -55,18 +55,18 @@ Known Non-Issues (confirmed on Real Genesis)
/* the same on all systems? */
#define MASTER_CLOCK 53693100
/* timing details */
-int megadriv_framerate = 60;
-int megadrive_total_scanlines = 262;
-int megadrive_visible_scanlines = 224;
-int megadrive_irq6_scanline = 224;
-int megadrive_irq6_hpos = 320;
-int megadrive_z80irq_scanline = 226;
-int megadrive_z80irq_hpos = 320;
-int megadrive_imode = 0;
-int megadrive_imode_odd_frame = 0;
-int megadrive_vblank_flag = 0;
-int megadrive_irq6_pending = 0;
-int megadrive_irq4_pending = 0;
+static int megadriv_framerate = 60;
+static int megadrive_total_scanlines = 262;
+static int megadrive_visible_scanlines = 224;
+static int megadrive_irq6_scanline = 224;
+//int megadrive_irq6_hpos = 320;
+static int megadrive_z80irq_scanline = 226;
+//int megadrive_z80irq_hpos = 320;
+static int megadrive_imode = 0;
+static int megadrive_imode_odd_frame = 0;
+static int megadrive_vblank_flag = 0;
+static int megadrive_irq6_pending = 0;
+static int megadrive_irq4_pending = 0;
INLINE UINT16 get_hposition(void);
@@ -78,10 +78,10 @@ static UINT16* megadrive_vdp_palette_lookup_shadow;
static UINT16* megadrive_vdp_palette_lookup_highlight;
static UINT8 oldscreenwidth = 3;
UINT16* megadrive_ram;
-UINT8 megadrive_vram_fill_pending = 0;
-UINT16 megadrive_vram_fill_length = 0;
-int genesis_scanline_counter = 0;
-int megadrive_sprite_collision = 0;
+static UINT8 megadrive_vram_fill_pending = 0;
+static UINT16 megadrive_vram_fill_length = 0;
+static int genesis_scanline_counter = 0;
+static int megadrive_sprite_collision = 0;
static int megadrive_region_export;
static int megadrive_region_pal;
static int megadrive_max_hposition;
@@ -1426,10 +1426,10 @@ static TIMER_CALLBACK( io_timeout1_timer_callback )
static void init_megadri6_io(void)
{
- io_timeout[0] = timer_alloc(io_timeout0_timer_callback);
+ io_timeout[0] = timer_alloc(io_timeout0_timer_callback, NULL);
io_stage[0] = -1;
- io_timeout[1] = timer_alloc(io_timeout1_timer_callback);
+ io_timeout[1] = timer_alloc(io_timeout1_timer_callback, NULL);
io_stage[1] = -1;
}
@@ -4254,7 +4254,7 @@ static TIMER_CALLBACK( scanline_timer_callback )
top-left of the screen. The first scanline is scanline 0 (we set scanline to -1 in
VIDEO_EOF) */
- timer_call_after_resynch(0, 0);
+ timer_call_after_resynch(NULL, 0, 0);
/* Compensate for some rounding errors
When the counter reaches 261 we should have reached the end of the frame, however due
@@ -4406,12 +4406,12 @@ MACHINE_RESET( megadriv )
megadrive_init_io(machine);
- frame_timer = timer_alloc(frame_timer_callback);
- scanline_timer = timer_alloc(scanline_timer_callback);
- render_timer = timer_alloc(render_timer_callback);
+ frame_timer = timer_alloc(frame_timer_callback, NULL);
+ scanline_timer = timer_alloc(scanline_timer_callback, NULL);
+ render_timer = timer_alloc(render_timer_callback, NULL);
- irq6_on_timer = timer_alloc(irq6_on_callback);
- irq4_on_timer = timer_alloc(irq4_on_callback);
+ irq6_on_timer = timer_alloc(irq6_on_callback, NULL);
+ irq4_on_timer = timer_alloc(irq4_on_callback, NULL);
timer_adjust(frame_timer, attotime_zero, 0, attotime_zero);
timer_adjust(scanline_timer, attotime_zero, 0, attotime_zero);
diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c
index 00124da73bf..8b690f53194 100644
--- a/src/mame/drivers/megatech.c
+++ b/src/mame/drivers/megatech.c
@@ -19,7 +19,7 @@
todo: cleanup, fix so that everything works properly
games are marked as NOT WORKING due to
a) incorrect behavior at time out
- b) they're sms based games which aren't yet supported
+ b) they're sms based games which aren't yet fully supported
About MegaTech:
@@ -1057,9 +1057,10 @@ ROM_END
#define MEGATECH_GAME04(GAME_REGION, INSTRUCTION_REGION) \
ROM_REGION( 0x300000, GAME_REGION, 0 ) \
- ROM_LOAD( "mp11129f.ic1", 0x000000, 0x020000, CRC(972c75ac) SHA1(2ae74c8563a3cefb27611d17bf3926865b6ebd45) ) \
+ ROM_LOAD( "mp11129f.ic1", 0x000000, 0x020000, CRC(c6611c84) SHA1(eab0eed872dd26b13bcf0b2dd74fcbbc078812c9) ) \
MEGATECH_INSTRUCTION_REGION( INSTRUCTION_REGION, MEGATECH_GAME_IS_SMS ) \
ROM_LOAD( "12368-04.ic2", 0x000000, 0x08000, CRC(62e5579b) SHA1(e1f531be5c40a1216d4192baeda9352384444410) ) \
+ /* Also known to have the ID# MPR-11128 instead of MPR-11129F, same contents */
ROM_START( mt_ggolf )
MEGATECH_BIOS
@@ -1248,16 +1249,16 @@ ROM_END
/* 01 */ GAME( 1988, mt_beast, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Altered Beast (Mega-Tech)", GAME_NOT_WORKING )
/* 02 */ GAME( 1988, mt_shar2, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Space Harrier II (Mega-Tech)", GAME_NOT_WORKING )
/* 03 */ GAME( 1988, mt_stbld, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Super Thunder Blade (Mega-Tech)", GAME_NOT_WORKING )
-/* 04 */ GAME( 19??, mt_ggolf, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Great Golf (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! also bad */
-/* 05 */ GAME( 19??, mt_gsocr, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Great Soccer (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! also bad */
-/* 06 */ GAME( 1989, mt_orun, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Out Run (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
-/* 07 */ GAME( 19??, mt_asyn, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Alien Syndrome (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
-/* 08 */ GAME( 19??, mt_shnbi, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Shinobi (Mega-Tech, SMS based)", GAME_NOT_WORKING) /* sms */
+/* 04 */ GAME( 1987, mt_ggolf, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Great Golf (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
+/* 05 */ GAME( 198?, mt_gsocr, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Great Soccer (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! also bad */
+/* 06 */ GAME( 1987, mt_orun, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Out Run (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
+/* 07 */ GAME( 1987, mt_asyn, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Alien Syndrome (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
+/* 08 */ GAME( 1987, mt_shnbi, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Shinobi (Mega-Tech, SMS based)", GAME_NOT_WORKING) /* sms */
/* 09 */ // unknown
-/* 10 */ GAME( 19??, mt_aftrb, megatech, megatech, megatech, mtnew, ROT0, "Sega", "After Burner (Mega-Tech, SMS based)", GAME_NOT_WORKING) /* sms */
+/* 10 */ GAME( 1987, mt_aftrb, megatech, megatech, megatech, mtnew, ROT0, "Sega", "After Burner (Mega-Tech, SMS based)", GAME_NOT_WORKING) /* sms */
/* 11 */ GAME( 1989, mt_tfor2, megatech, megatech, megatech, mtnew, ROT0, "Tecno Soft / Sega", "Thunder Force II MD (Mega-Tech)", GAME_NOT_WORKING )
/* 12 */ // unknown
-/* 13 */ GAME( 19??, mt_astro, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Astro Warrior (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
+/* 13 */ GAME( 1986, mt_astro, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Astro Warrior (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
/* 14 */ // unknown
/* 15 */ // unknown
/* 16 */ // unknown
@@ -1266,14 +1267,14 @@ ROM_END
/* 19 */ // unknown
/* 20 */ GAME( 1989, mt_lastb, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Last Battle (Mega-Tech)", GAME_NOT_WORKING )
/* 21 */ GAME( 1989, mt_wcsoc, megatech, megatech, megatech, mtnew, ROT0, "Sega", "World Championship Soccer (Mega-Tech)", GAME_NOT_WORKING )
-/* 22 */ GAME( 19??, mt_tetri, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Tetris (Mega-Tech)", GAME_NOT_WORKING )
+/* 22 */ GAME( 1989, mt_tetri, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Tetris (Mega-Tech)", GAME_NOT_WORKING )
/* 23 */ GAME( 1989, mt_gng, megatech, megatech, megatech, mtnew, ROT0, "Capcom / Sega", "Ghouls'n Ghosts (Mega-Tech)", GAME_NOT_WORKING )
/* 24 */ GAME( 1989, mt_shang, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Super Hang-On (Mega-Tech)", GAME_NOT_WORKING )
/* 25 */ GAME( 1989, mt_gaxe, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Golden Axe (Mega-Tech)", GAME_NOT_WORKING )
/* 26 */ GAME( 1989, mt_fwrld, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Forgotten Worlds (Mega-Tech)", GAME_NOT_WORKING )
/* 27 */ GAME( 1989, mt_mystd, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Mystic Defender (Mega-Tech)", GAME_NOT_WORKING )
/* 28 */ GAME( 1989, mt_revsh, megatech, megatech, megatech, mtnew, ROT0, "Sega", "The Revenge of Shinobi (Mega-Tech)", GAME_NOT_WORKING )
-/* 29 */ GAME( 19??, mt_parlg, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Parlour Games (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
+/* 29 */ GAME( 1987, mt_parlg, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Parlour Games (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */
/* 30 */ // unknown
/* 31 */ GAME( 1989, mt_tgolf, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Arnold Palmer Tournament Golf (Mega-Tech)", GAME_NOT_WORKING )
/* 32 */ GAME( 1989, mt_srbb, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Super Real Basketball (Mega-Tech)", GAME_NOT_WORKING )
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index f08bb6c8713..325091e9cf9 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -780,7 +780,7 @@ static ppi8255_interface ppi8255_intf =
{ NULL, misc_w }, /* Port C write */
};
-struct AY8910interface merit_ay8912_interface =
+static struct AY8910interface merit_ay8912_interface =
{
0,0,
led2_w,0
diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c
index 63fec61dbfb..e709c3ae435 100644
--- a/src/mame/drivers/metro.c
+++ b/src/mame/drivers/metro.c
@@ -259,7 +259,7 @@ static INTERRUPT_GEN( karatour_interrupt )
requested_int[0] = 1;
requested_int[5] = 1; // write the scroll registers
/* the duration is a guess */
- timer_set(ATTOTIME_IN_USEC(2500), 0, vblank_end_callback);
+ timer_set(ATTOTIME_IN_USEC(2500), NULL, 0, vblank_end_callback);
update_irq_state();
break;
@@ -754,7 +754,7 @@ static WRITE16_HANDLER( metro_blitter_w )
another blit. */
if (b1 == 0)
{
- timer_set(ATTOTIME_IN_USEC(500),0,metro_blit_done);
+ timer_set(ATTOTIME_IN_USEC(500), NULL,0,metro_blit_done);
return;
}
@@ -3679,7 +3679,7 @@ GFXDECODE_END
***************************************************************************/
-UPD7810_CONFIG metro_cpu_config =
+static UPD7810_CONFIG metro_cpu_config =
{
TYPE_7810,
metro_io_callback
@@ -4667,7 +4667,7 @@ static DRIVER_INIT( mouja )
{
metro_common();
irq_line = -1; /* split interrupt handlers */
- mouja_irq_timer = timer_alloc(mouja_irq_callback);
+ mouja_irq_timer = timer_alloc(mouja_irq_callback, NULL);
}
static DRIVER_INIT( gakusai )
diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c
index cc48da7a6fc..13ead26f0a8 100644
--- a/src/mame/drivers/mgolf.c
+++ b/src/mame/drivers/mgolf.c
@@ -110,7 +110,7 @@ static TIMER_CALLBACK( interrupt_callback )
scanline = 16;
}
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, interrupt_callback);
}
@@ -122,7 +122,7 @@ static double calc_plunger_pos(void)
static MACHINE_RESET( mgolf )
{
- timer_set(video_screen_get_time_until_pos(0, 16, 0), 16, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 16, 0), NULL, 16, interrupt_callback);
}
diff --git a/src/mame/drivers/micro3d.c b/src/mame/drivers/micro3d.c
index 30a8cc746fa..ca32d16644e 100644
--- a/src/mame/drivers/micro3d.c
+++ b/src/mame/drivers/micro3d.c
@@ -406,7 +406,7 @@ static void micro3d_vblank(void)
static TIMER_CALLBACK( timera_int )
{
// timer_set(attotime_mul(ATTOTIME_IN_HZ(M68901_CLK), ((m68901_base[0xf]>>8) & 0xff) * 200),0,timera_int); // Set the timer again.
- timer_set(ATTOTIME_IN_USEC(1000),0,timera_int); // Set the timer again.
+ timer_set(ATTOTIME_IN_USEC(1000), NULL,0,timera_int); // Set the timer again.
m68901_int_gen(TMRA); // Fire an interrupt.
}
@@ -426,7 +426,7 @@ static TIMER_CALLBACK( timerc_int )
static TIMER_CALLBACK( timerd_int )
{
- timer_set(ATTOTIME_IN_USEC(250),0,timerd_int);
+ timer_set(ATTOTIME_IN_USEC(250), NULL,0,timerd_int);
m68901_int_gen(TMRD); // Fire an interrupt.
}
@@ -473,7 +473,7 @@ switch(offset)
break;
case 0x0f: mame_printf_debug("Timer A Data:%4x\n",value); // Timer A Data Register
- timer_set(ATTOTIME_IN_USEC(1000),0,timera_int);
+ timer_set(ATTOTIME_IN_USEC(1000), NULL,0,timera_int);
break;
case 0x10: mame_printf_debug("Timer B Data:%4x\n",value); // Timer B Data Register
@@ -485,7 +485,7 @@ switch(offset)
break;
case 0x12: mame_printf_debug("Timer D Data:%4x\n",value);
- timer_set(ATTOTIME_IN_USEC(500),0,timerd_int); // Timer D Data Register
+ timer_set(ATTOTIME_IN_USEC(500), NULL,0,timerd_int); // Timer D Data Register
break;
}
diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c
index 876eceafd1b..3439b5810d4 100644
--- a/src/mame/drivers/midvunit.c
+++ b/src/mame/drivers/midvunit.c
@@ -63,8 +63,8 @@ static MACHINE_RESET( midvunit )
memcpy(ram_base, memory_region(REGION_USER1), 0x20000*4);
- timer[0] = timer_alloc(NULL);
- timer[1] = timer_alloc(NULL);
+ timer[0] = timer_alloc(NULL, NULL);
+ timer[1] = timer_alloc(NULL, NULL);
}
@@ -75,8 +75,8 @@ static MACHINE_RESET( midvplus )
memcpy(ram_base, memory_region(REGION_USER1), 0x20000*4);
- timer[0] = timer_alloc(NULL);
- timer[1] = timer_alloc(NULL);
+ timer[0] = timer_alloc(NULL, NULL);
+ timer[1] = timer_alloc(NULL, NULL);
ide_controller_reset(0);
}
@@ -154,7 +154,7 @@ static WRITE32_HANDLER( midvunit_adc_w )
if (which < 0 || which > 2)
logerror("adc_w: unexpected which = %02X\n", which + 4);
adc_data = readinputport(3 + which);
- timer_set(ATTOTIME_IN_MSEC(1), 0, adc_ready);
+ timer_set(ATTOTIME_IN_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 0f5047e8868..807c290bfdb 100644
--- a/src/mame/drivers/midzeus.c
+++ b/src/mame/drivers/midzeus.c
@@ -47,8 +47,8 @@ static MACHINE_RESET( midzeus )
*(UINT32 *)ram_base *= 2;
- timer[0] = timer_alloc(NULL);
- timer[1] = timer_alloc(NULL);
+ timer[0] = timer_alloc(NULL, NULL);
+ timer[1] = timer_alloc(NULL, NULL);
}
@@ -634,8 +634,8 @@ static MACHINE_DRIVER_START( midzeus )
/* video hardware */
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_SIZE(512, 278)
- MDRV_SCREEN_VISIBLE_AREA(0, 399, 0, 255)
+ MDRV_SCREEN_SIZE(512/*+256*/, 278/*+256*/)
+ MDRV_SCREEN_VISIBLE_AREA(0, 399/*+256*/, 0, 255/*+256*/)
MDRV_PALETTE_LENGTH(32768)
MDRV_VIDEO_START(midzeus)
diff --git a/src/mame/drivers/missile.c b/src/mame/drivers/missile.c
index 9cc74b36ac7..e1fe2670585 100644
--- a/src/mame/drivers/missile.c
+++ b/src/mame/drivers/missile.c
@@ -391,11 +391,11 @@ static MACHINE_START( missile )
opcode_base = opcode_arg_base = videoram;
/* create a timer to speed/slow the CPU */
- cpu_timer = timer_alloc(adjust_cpu_speed);
+ cpu_timer = timer_alloc(adjust_cpu_speed, NULL);
timer_adjust(cpu_timer, video_screen_get_time_until_pos(0, v_to_scanline(0), 0), 0, attotime_zero);
/* create a timer for IRQs and set up the first callback */
- irq_timer = timer_alloc(clock_irq);
+ irq_timer = timer_alloc(clock_irq, NULL);
irq_state = 0;
schedule_next_irq(-32);
diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c
index b557fa3835d..23dacdcf116 100644
--- a/src/mame/drivers/mjsister.c
+++ b/src/mame/drivers/mjsister.c
@@ -39,7 +39,7 @@ static TIMER_CALLBACK( dac_callback )
DAC_data_w(0,DACROM[(dac_bank * 0x10000 + dac_adr++) & 0x1ffff]);
if (((dac_adr & 0xff00 ) >> 8) != dac_adr_e )
- timer_set(attotime_mul(ATTOTIME_IN_HZ(MCLK), 1024),0,dac_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(MCLK), 1024), NULL, 0, dac_callback);
else
dac_busy = 0;
}
@@ -55,7 +55,7 @@ static WRITE8_HANDLER( mjsister_dac_adr_e_w )
dac_adr = dac_adr_s << 8;
if (dac_busy == 0)
- timer_call_after_resynch(0,dac_callback);
+ timer_call_after_resynch(NULL, 0,dac_callback);
dac_busy = 1;
}
diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c
index da8543d6f4e..53d2758c2ed 100644
--- a/src/mame/drivers/model2.c
+++ b/src/mame/drivers/model2.c
@@ -341,10 +341,10 @@ static MACHINE_RESET(model2_common)
model2_timerrun[0] = model2_timerrun[1] = model2_timerrun[2] = model2_timerrun[3] = 0;
- model2_timers[0] = timer_alloc(model2_timer_0_cb);
- model2_timers[1] = timer_alloc(model2_timer_1_cb);
- model2_timers[2] = timer_alloc(model2_timer_2_cb);
- model2_timers[3] = timer_alloc(model2_timer_3_cb);
+ model2_timers[0] = timer_alloc(model2_timer_0_cb, NULL);
+ model2_timers[1] = timer_alloc(model2_timer_1_cb, NULL);
+ model2_timers[2] = timer_alloc(model2_timer_2_cb, NULL);
+ model2_timers[3] = timer_alloc(model2_timer_3_cb, NULL);
timer_adjust(model2_timers[0], attotime_never, 0, attotime_never);
timer_adjust(model2_timers[1], attotime_never, 0, attotime_never);
@@ -621,7 +621,7 @@ static WRITE32_HANDLER(copro_sharc_iop_w)
/* GEO */
UINT32 geo_read_start_address = 0;
-UINT32 geo_write_start_address = 0;
+static UINT32 geo_write_start_address = 0;
static WRITE32_HANDLER( geo_ctl1_w )
{
diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c
index 3b963cd036d..2e0ee8bd8cf 100644
--- a/src/mame/drivers/moo.c
+++ b/src/mame/drivers/moo.c
@@ -178,7 +178,7 @@ static INTERRUPT_GEN(moo_interrupt)
moo_objdma(game_type);
// schedule DMA end interrupt (delay shortened to catch up with V-blank)
- timer_set(ATTOTIME_IN_USEC(MOO_DMADELAY), 0, dmaend_callback);
+ timer_set(ATTOTIME_IN_USEC(MOO_DMADELAY), NULL, 0, dmaend_callback);
}
// trigger V-blank interrupt
@@ -191,7 +191,7 @@ static INTERRUPT_GEN(moobl_interrupt)
moo_objdma(game_type);
// schedule DMA end interrupt (delay shortened to catch up with V-blank)
- timer_set(ATTOTIME_IN_USEC(MOO_DMADELAY), 0, dmaend_callback);
+ timer_set(ATTOTIME_IN_USEC(MOO_DMADELAY), NULL, 0, dmaend_callback);
// trigger V-blank interrupt
cpunum_set_input_line(0, 5, HOLD_LINE);
diff --git a/src/mame/drivers/mpu4.c b/src/mame/drivers/mpu4.c
index 5c2bcbc85bd..1673628b498 100644
--- a/src/mame/drivers/mpu4.c
+++ b/src/mame/drivers/mpu4.c
@@ -1197,7 +1197,7 @@ static void mpu4_config_common(void)
pia_config(4,&pia_ic7_intf);
pia_config(5,&pia_ic8_intf);
- ic24_timer = timer_alloc(ic24_timeout);
+ ic24_timer = timer_alloc(ic24_timeout, NULL);
// setup ptm ////////////////////////////////////////////////////////////
ptm6840_config(0, &ptm_ic2_intf );
}
diff --git a/src/mame/drivers/msisaac.c b/src/mame/drivers/msisaac.c
index 67e0a40ddcc..aa288a8e184 100644
--- a/src/mame/drivers/msisaac.c
+++ b/src/mame/drivers/msisaac.c
@@ -70,7 +70,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_command_w )
{
soundlatch_w(0,data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
static WRITE8_HANDLER( nmi_disable_w )
diff --git a/src/mame/drivers/mustache.c b/src/mame/drivers/mustache.c
index 70c1b4fa707..eae3317d533 100644
--- a/src/mame/drivers/mustache.c
+++ b/src/mame/drivers/mustache.c
@@ -189,7 +189,7 @@ static TIMER_CALLBACK( clear_irq_cb )
static void assert_irq(void)
{
cpunum_set_input_line(0, 0, ASSERT_LINE);
- timer_set(ATTOTIME_IN_CYCLES(14288, 0), 0, clear_irq_cb);
+ timer_set(ATTOTIME_IN_CYCLES(14288, 0), NULL, 0, clear_irq_cb);
/* Timing here is an educated GUESS, Z80 /INT must stay high so the irq
fires no less than TWICE per frame, else game doesn't work right.
6000000 / 56.747 = 105732.4616 cycles per frame, we'll call it A
diff --git a/src/mame/drivers/mw8080bw.c b/src/mame/drivers/mw8080bw.c
index ba03738b22f..88ce86811b0 100644
--- a/src/mame/drivers/mw8080bw.c
+++ b/src/mame/drivers/mw8080bw.c
@@ -872,7 +872,7 @@ static TIMER_CALLBACK( maze_tone_timing_timer_callback )
static MACHINE_START( maze )
{
/* create astable timer for IC B1 */
- timer_pulse(MAZE_555_B1_PERIOD, 0, maze_tone_timing_timer_callback);
+ timer_pulse(MAZE_555_B1_PERIOD, NULL, 0, maze_tone_timing_timer_callback);
/* initialize state of Tone Timing FF, IC C1 */
maze_tone_timing_state = 0;
@@ -2048,8 +2048,8 @@ static TIMER_CALLBACK( spcenctr_strobe_timer_callback )
static MACHINE_START( spcenctr )
{
/* create timers */
- spcenctr_strobe_on_timer = timer_alloc(spcenctr_strobe_timer_callback);
- spcenctr_strobe_off_timer = timer_alloc(spcenctr_strobe_timer_callback);
+ spcenctr_strobe_on_timer = timer_alloc(spcenctr_strobe_timer_callback, NULL);
+ spcenctr_strobe_off_timer = timer_alloc(spcenctr_strobe_timer_callback, NULL);
/* setup for save states */
state_save_register_global(spcenctr_strobe_state);
diff --git a/src/mame/drivers/namcofl.c b/src/mame/drivers/namcofl.c
index 621bb6da71b..16f989c19cf 100644
--- a/src/mame/drivers/namcofl.c
+++ b/src/mame/drivers/namcofl.c
@@ -314,14 +314,14 @@ GFXDECODE_END
static TIMER_CALLBACK( network_interrupt_callback )
{
cpunum_set_input_line(0, I960_IRQ0, ASSERT_LINE);
- timer_set(video_screen_get_frame_period(0), 0, network_interrupt_callback);
+ timer_set(video_screen_get_frame_period(0), NULL, 0, network_interrupt_callback);
}
static TIMER_CALLBACK( vblank_interrupt_callback )
{
cpunum_set_input_line(0, I960_IRQ2, ASSERT_LINE);
- timer_set(video_screen_get_frame_period(0), 0, vblank_interrupt_callback);
+ timer_set(video_screen_get_frame_period(0), NULL, 0, vblank_interrupt_callback);
}
@@ -335,14 +335,14 @@ static TIMER_CALLBACK( raster_interrupt_callback )
static MACHINE_START( namcofl )
{
- raster_interrupt_timer = timer_alloc(raster_interrupt_callback);
+ raster_interrupt_timer = timer_alloc(raster_interrupt_callback, NULL);
}
static MACHINE_RESET( namcofl )
{
- timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 3, 0), 0, network_interrupt_callback);
- timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), 0, vblank_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 3, 0), NULL, 0, network_interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), NULL, 0, vblank_interrupt_callback);
}
diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c
index 01c3efe6fe2..53c3bbbbf29 100644
--- a/src/mame/drivers/namconb1.c
+++ b/src/mame/drivers/namconb1.c
@@ -347,7 +347,7 @@ static INTERRUPT_GEN( namconb2_interrupt )
}
if( scanline < NAMCONB1_VBSTART )
{
- timer_set( video_screen_get_time_until_pos(0, scanline, 0), scanline, namconb2_TriggerPOSIRQ );
+ timer_set( video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, namconb2_TriggerPOSIRQ );
}
} /* namconb2_interrupt */
static INTERRUPT_GEN( namconb1_interrupt )
@@ -395,7 +395,7 @@ static INTERRUPT_GEN( namconb1_interrupt )
}
if( scanline < NAMCONB1_VBSTART )
{
- timer_set( video_screen_get_time_until_pos(0, scanline, 0), scanline, namconb1_TriggerPOSIRQ );
+ timer_set( video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, namconb1_TriggerPOSIRQ );
}
} /* namconb1_interrupt */
diff --git a/src/mame/drivers/namcos11.c b/src/mame/drivers/namcos11.c
index 8c18e40018a..be3ae22d2eb 100644
--- a/src/mame/drivers/namcos11.c
+++ b/src/mame/drivers/namcos11.c
@@ -824,7 +824,7 @@ static DRIVER_INIT( namcos11 )
int n_game;
emu_timer *timer;
- timer = timer_alloc( mcu_timer );
+ timer = timer_alloc( mcu_timer , NULL);
timer_adjust( timer, ATTOTIME_IN_HZ( 600 ), 0, ATTOTIME_IN_HZ( 600 ) );
psx_driver_init();
diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c
index 478085889a0..445321a940d 100644
--- a/src/mame/drivers/namcos22.c
+++ b/src/mame/drivers/namcos22.c
@@ -1183,7 +1183,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(ATTOTIME_IN_MSEC(50), 0, start_subcpu);
+ timer_set(ATTOTIME_IN_MSEC(50), NULL, 0, start_subcpu);
}
}
}
diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c
index 371ace0730c..495e14acfc6 100644
--- a/src/mame/drivers/naomi.c
+++ b/src/mame/drivers/naomi.c
@@ -443,7 +443,7 @@ Naomi 2 / GD-ROM | | |
#define CPU_CLOCK 200000000
/* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */
-struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK };
+static struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK };
static UINT64 *dc_sound_ram;
diff --git a/src/mame/drivers/neodrvr.c b/src/mame/drivers/neodrvr.c
index 277e66b6a1b..35b2c6d08a1 100644
--- a/src/mame/drivers/neodrvr.c
+++ b/src/mame/drivers/neodrvr.c
@@ -6753,8 +6753,8 @@ static TIMER_CALLBACK( svcpcb_bios_timer_callback )
static DRIVER_INIT( svcpcb )
{
/* start a timer that will check the BIOS select DIP every second */
- timer_pulse(ATTOTIME_IN_MSEC(1000), 0, svcpcb_bios_timer_callback);
- svcpcb_bios_timer_callback(machine, 0);
+ timer_pulse(ATTOTIME_IN_MSEC(1000), NULL, 0, svcpcb_bios_timer_callback);
+ svcpcb_bios_timer_callback(machine, NULL, 0);
svcchaos_px_decrypt();
svcpcb_gfx_decrypt();
diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c
index e26602ad3b3..d8ece60dc96 100644
--- a/src/mame/drivers/neogeo.c
+++ b/src/mame/drivers/neogeo.c
@@ -272,9 +272,9 @@ static TIMER_CALLBACK( vblank_interrupt_callback )
static void create_interrupt_timers(void)
{
- display_position_interrupt_timer = timer_alloc(display_position_interrupt_callback);
- display_position_vblank_timer = timer_alloc(display_position_vblank_callback);
- vblank_interrupt_timer = timer_alloc(vblank_interrupt_callback);
+ display_position_interrupt_timer = timer_alloc(display_position_interrupt_callback, NULL);
+ display_position_vblank_timer = timer_alloc(display_position_vblank_callback, NULL);
+ vblank_interrupt_timer = timer_alloc(vblank_interrupt_callback, NULL);
}
diff --git a/src/mame/drivers/nitedrvr.c b/src/mame/drivers/nitedrvr.c
index 32fd7511654..081c212b1a0 100644
--- a/src/mame/drivers/nitedrvr.c
+++ b/src/mame/drivers/nitedrvr.c
@@ -154,7 +154,7 @@ static TIMER_CALLBACK( nitedrvr_crash_toggle_callback )
static MACHINE_RESET( nitedrvr )
{
- timer_pulse(PERIOD_OF_555_ASTABLE(RES_K(180), 330, CAP_U(1)), 0, nitedrvr_crash_toggle_callback);
+ timer_pulse(PERIOD_OF_555_ASTABLE(RES_K(180), 330, CAP_U(1)), NULL, 0, nitedrvr_crash_toggle_callback);
nitedrvr_register_machine_vars();
}
diff --git a/src/mame/drivers/nycaptor.c b/src/mame/drivers/nycaptor.c
index 117385ebf19..db2927d5eca 100644
--- a/src/mame/drivers/nycaptor.c
+++ b/src/mame/drivers/nycaptor.c
@@ -271,7 +271,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_command_w )
{
soundlatch_w(0,data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
static WRITE8_HANDLER( nmi_disable_w )
diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c
index 608e3cc683a..f5d125a0018 100644
--- a/src/mame/drivers/othunder.c
+++ b/src/mame/drivers/othunder.c
@@ -430,7 +430,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(ATTOTIME_IN_USEC(10),0, ad_interrupt);
+ timer_set(ATTOTIME_IN_USEC(10), NULL,0, ad_interrupt);
}
diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c
index 24c262a70d7..726276de46b 100644
--- a/src/mame/drivers/panicr.c
+++ b/src/mame/drivers/panicr.c
@@ -235,7 +235,7 @@ static INPUT_PORTS_START( panicr )
PORT_BIT( 0xe7, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START_TAG("DSW1")
- PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:8,7,6")
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ))
PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ))
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ))
@@ -244,62 +244,45 @@ static INPUT_PORTS_START( panicr )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ))
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ))
PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ))
-
- PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,4")
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ))
PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ))
PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ))
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ))
-
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DSW1-4" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_DIPNAME( 0x20, 0x20, "Test Mode" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) )
+ PORT_SERVICE_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:3" )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START_TAG("DSW2")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x06, 0x04, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x06, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,6")
PORT_DIPSETTING( 0x06, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0x18, 0x0c, "Bonus" )
+ PORT_DIPNAME( 0x18, 0x18, "Bonus" ) PORT_DIPLOCATION("SW2:5,4")
PORT_DIPSETTING( 0x18, "50k & every 1OOk" )
PORT_DIPSETTING( 0x10, "1Ok 20k" )
PORT_DIPSETTING( 0x08, "20k 40k" )
PORT_DIPSETTING( 0x00, "50k 100k" )
- PORT_DIPNAME( 0x08, 0x08, "DSW2-3" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DSW2-4" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x60, 0x40, "Balls" )
+ PORT_DIPNAME( 0x60, 0x40, "Balls" ) PORT_DIPLOCATION("SW2:3,2")
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPSETTING( 0x20, "2" )
PORT_DIPSETTING( 0x40, "3" )
PORT_DIPSETTING( 0x60, "1" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) //?
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START_TAG(T5182COINPORT)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(2)
-
INPUT_PORTS_END
static const gfx_layout charlayout =
diff --git a/src/mame/drivers/parodius.c b/src/mame/drivers/parodius.c
index 3b1d57e9282..c648d92916e 100644
--- a/src/mame/drivers/parodius.c
+++ b/src/mame/drivers/parodius.c
@@ -122,7 +122,7 @@ static WRITE8_HANDLER( sound_arm_nmi_w )
{
// sound_nmi_enabled = 1;
cpunum_set_input_line(1, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(ATTOTIME_IN_USEC(50),0,nmi_callback); /* kludge until the K053260 is emulated correctly */
+ timer_set(ATTOTIME_IN_USEC(50), NULL,0,nmi_callback); /* kludge until the K053260 is emulated correctly */
}
/********************************************/
diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c
index 1eaa998935a..244ac4ec24a 100644
--- a/src/mame/drivers/peplus.c
+++ b/src/mame/drivers/peplus.c
@@ -4,6 +4,7 @@
PLAYER'S EDGE PLUS (PE+)
Driver by Jim Stolis.
+ Layouts by Stephh.
Special thanks to smf for I2C EEPROM support.
@@ -38,16 +39,127 @@
periodically update an external eeprom for an even more secure backup. This eeprom
also holds the current game state in order to recover the player from a full power failure.
+
+Additional notes
+================
+
+1) What are "set chips" ?
+
+ They are meant to be used after you have already sucessfully put a new game in your machine.
+ Lets say you have 'pepp0516' installed and you go through the setup. In a real machine,
+ you may want to add a bill validator. The only way to do that is to un-socket the 'pepp0516'
+ chip and put in the 'peset038' chip and then reboot the machine. Then this chip's program
+ runs and you set the options and put the 'pepp0516' chip back in.
+
+ The only way to simulate this is to fire up the 'pepp0516' game and set it up. Then exit the
+ game and copy the pepp0516.nv file to peset038.nv, and then run the 'peset038' program.
+ This is because they have to have the same eeprom and cmos data in memory to work. When you
+ are done with the 'peset038' program, you copy the peset038.nv file back over the pepp0516.nv .
+ 'peset038' is just a utility program with one screen and 3 tested inputs.
+
+
+2) Initialisation
+
+ - Method 1 :
+ * be sure the door is opened (if not, press 'O' by default)
+ * "CMOS DATA" will be displayed
+ * press the self-test button (default is 'K')
+ * be sure the door is opened (if not, press 'O' by default)
+ * "EEPROM DATA" will be displayed
+ * press the self-test button (default is 'K')
+ * be sure the door is closed (if not, press 'O' by default)
+
+ - Method 2 :
+ * be sure the door is opened (if not, press 'O' by default)
+ * "CMOS DATA" will be displayed
+ * press the self-test button (default is 'K') until a "beep" is heard
+ * be sure the door is closed (if not, press 'O' by default)
+ * press the jackpot reset button (default is 'L')
+ * be sure the door is opened (if not, press 'O' by default)
+ * "EEPROM DATA" will be displayed
+ * press the self-test button (default is 'K')
+ * be sure the door is closed (if not, press 'O' by default)
+
+
+ gamename method
+ -------- ------
+ pepp0158 2
+ pepp0188 1
+ pepp0516 1
+ pebe0014 1
+ peke1012 1
+ peps0615 2
+ peps0716 2
+ pexp0019 2
+ pexs0006 2
+
+
+2) Configuration
+
+ - To configure a game :
+ * be sure the door is opened (if not, press 'O' by default)
+ * press the self-test button (default is 'K')
+ * cycle through the screens with the self-test button (default is 'K')
+ * close the door (default is 'O') to go back to the game and save the settings
+
+2a) What are "set chips" ?
+
+ They are meant to be used after you have already sucessfully put a new game in your machine.
+ Lets say you have 'pepp0516' installed and you go through the setup. In a real machine,
+ you may want to add a bill validator. The only way to do that is to un-socket the 'pepp0516'
+ chip and put in the 'peset038' chip and then reboot the machine. Then this chip's program
+ runs and you set the options and put the 'pepp0516' chip back in.
+
+ The only way to simulate this is to fire up the 'pepp0516' game and set it up. Then exit the
+ game and copy the pepp0516.nv file to peset038.nv, and then run the 'peset038' program.
+ This is because they have to have the same eeprom and cmos data in memory to work. When you
+ are done with the peset038 program, you copy the peset038.nv file back over the pepp0516.nv .
+ 'peset038' is just a utility program with one screen.
+
+2b) About the "autohold" feature
+
+ Depending on laws which vary from cities/country, this feature can available or not in the
+ "operator mode". By default, it isn't available. To have this feature available in the
+ "operator mode", a new chip has to be burnt with a bit set and a new checksum (game ID
+ doesn't change though). Once the feature is available, it can be decided to turn the
+ "autohold" option ON or OFF (default is OFF).
+ To avoid having too many clones in MAME, a fake "Enable Autohold Feature" configuration
+ option has been added for (poker) games that support it. If you change this option,
+ you must leave the game, delete the .nv file, initialise and configure the game again.
+
+
+
+Stephh's log (2007.11.28) :
+ - split old peplus.c to peplus.c and pe_drvr.c (same as it was done for the NEOGEO)
+ - Renamed sets :
+ * 'peplus' -> 'pepp0516' (so we get the game ID as for the other games)
+ - added MACHINE_RESET definition (needed for fake "Enable Autohold Feature" configuration)
+ - added generic/default layout, inputs and outputs
+ - for each kind of game (poker, bjack, keno, slots) :
+ * added two layouts (default is the "Bezel Lamps" for players, the other is "Debug Lamps")
+ * added one INPUT_PORT definition
+ - added fake "Enable Autohold Feature" configuration option for poker games that allow it
+ and added a specific INPUT_PORT definition
+ - for "set chips" :
+ * added one fake layout
+ * added one fake INPUT_PORT definition
+
***********************************************************************************/
+
#include "driver.h"
#include "sound/ay8910.h"
#include "cpu/i8051/i8051.h"
#include "machine/i2cmem.h"
#include "peplus.lh"
-#include "pepp0158.lh"
-#include "pepp0188.lh"
-#include "peset038.lh"
+#include "pe_schip.lh"
+#include "pe_poker.lh"
+#include "pe_bjack.lh"
+#include "pe_keno.lh"
+#include "pe_slots.lh"
+
+
+static UINT16 autohold_addr; /* address to patch in program RAM to enable autohold feature */
static tilemap *bg_tilemap;
@@ -241,14 +353,14 @@ static WRITE8_HANDLER( peplus_sf000_w )
static WRITE8_HANDLER( peplus_output_bank_a_w )
{
- output_set_value("coinlockout",(data >> 0) & 1); /* Coin Lockout */
- output_set_value("diverter",(data >> 1) & 1); /* Diverter */
- output_set_value("bell",(data >> 2) & 1); /* Bell */
- output_set_value("na1",(data >> 3) & 1); /* N/A */
- output_set_value("hopper1",(data >> 4) & 1); /* Hopper 1 */
- output_set_value("hopper2",(data >> 5) & 1); /* Hopper 2 */
- output_set_value("na2",(data >> 6) & 1); /* N/A */
- output_set_value("na3",(data >> 7) & 1); /* N/A */
+ output_set_value("pe_bnka0",(data >> 0) & 1); /* Coin Lockout */
+ output_set_value("pe_bnka1",(data >> 1) & 1); /* Diverter */
+ output_set_value("pe_bnka2",(data >> 2) & 1); /* Bell */
+ output_set_value("pe_bnka3",(data >> 3) & 1); /* N/A */
+ output_set_value("pe_bnka4",(data >> 4) & 1); /* Hopper 1 */
+ output_set_value("pe_bnka5",(data >> 5) & 1); /* Hopper 2 */
+ output_set_value("pe_bnka6",(data >> 6) & 1); /* specific to a kind of machine */
+ output_set_value("pe_bnka7",(data >> 7) & 1); /* specific to a kind of machine */
coin_out_state = 0;
if((data >> 4) & 1)
@@ -257,26 +369,26 @@ static WRITE8_HANDLER( peplus_output_bank_a_w )
static WRITE8_HANDLER( peplus_output_bank_b_w )
{
- output_set_lamp_value(0,(data >> 0) & 1); /* Hold 2 3 4 Lt */
- output_set_lamp_value(1,(data >> 1) & 1); /* Deal Draw Lt */
- output_set_lamp_value(2,(data >> 2) & 1); /* Cash Out Lt */
- output_set_lamp_value(3,(data >> 3) & 1); /* Hold 1 Lt */
- output_set_lamp_value(4,(data >> 4) & 1); /* Bet Credits Lt */
- output_set_lamp_value(5,(data >> 5) & 1); /* Change Request Lt */
- output_set_lamp_value(6,(data >> 6) & 1); /* Door Open Lt */
- output_set_lamp_value(7,(data >> 7) & 1); /* Hold 5 Lt */
+ output_set_value("pe_bnkb0",(data >> 0) & 1); /* specific to a kind of machine */
+ output_set_value("pe_bnkb1",(data >> 1) & 1); /* Deal Spin Start */
+ output_set_value("pe_bnkb2",(data >> 2) & 1); /* Cash Out */
+ output_set_value("pe_bnkb3",(data >> 3) & 1); /* specific to a kind of machine */
+ output_set_value("pe_bnkb4",(data >> 4) & 1); /* Bet 1 / Bet Max */
+ output_set_value("pe_bnkb5",(data >> 5) & 1); /* Change Request */
+ output_set_value("pe_bnkb6",(data >> 6) & 1); /* Door Open */
+ output_set_value("pe_bnkb7",(data >> 7) & 1); /* specific to a kind of machine */
}
static WRITE8_HANDLER( peplus_output_bank_c_w )
{
- output_set_value("coininmeter",(data >> 0) & 1); /* Coin In Meter */
- output_set_value("coinoutmeter",(data >> 1) & 1); /* Coin Out Meter */
- output_set_value("coindropmeter",(data >> 2) & 1); /* Coin Drop Meter */
- output_set_value("jackpotmeter",(data >> 3) & 1); /* Jackpot Meter */
- output_set_value("billacceptor",(data >> 4) & 1); /* Bill Acceptor Enabled */
- output_set_value("sdsout",(data >> 5) & 1); /* SDS Out */
- output_set_value("na4",(data >> 6) & 1); /* N/A */
- output_set_value("gamemeter",(data >> 7) & 1); /* Game Meter */
+ output_set_value("pe_bnkc0",(data >> 0) & 1); /* Coin In Meter */
+ output_set_value("pe_bnkc1",(data >> 1) & 1); /* Coin Out Meter */
+ output_set_value("pe_bnkc2",(data >> 2) & 1); /* Coin Drop Meter */
+ output_set_value("pe_bnkc3",(data >> 3) & 1); /* Jackpot Meter */
+ output_set_value("pe_bnkc4",(data >> 4) & 1); /* Bill Acceptor Enabled */
+ output_set_value("pe_bnkc5",(data >> 5) & 1); /* SDS Out */
+ output_set_value("pe_bnkc6",(data >> 6) & 1); /* N/A */
+ output_set_value("pe_bnkc7",(data >> 7) & 1); /* Game Meter */
}
static WRITE8_HANDLER(i2c_nvram_w)
@@ -308,8 +420,8 @@ static READ8_HANDLER( peplus_crtc_lpen1_r )
static READ8_HANDLER( peplus_crtc_lpen2_r )
{
UINT8 ret_val = 0x00;
- UINT8 x_val = readinputportbytag("TOUCH_X");
- UINT8 y_val = (0x19 - readinputportbytag("TOUCH_Y"));
+ UINT8 x_val = readinputportbytag_safe("TOUCH_X",0x00);
+ UINT8 y_val = (0x19 - readinputportbytag_safe("TOUCH_Y",0x00));
UINT16 t_val = y_val * 0x28 + (x_val+1);
switch(vid_register) {
@@ -340,12 +452,12 @@ static READ8_HANDLER( peplus_cmos_r )
switch (offset)
{
case 0x00db:
- if ((readinputportbytag("DOOR") & 0x01) == 0) {
+ if ((readinputportbytag_safe("DOOR",0xff) & 0x01) == 0) {
cmos_ram[offset] = 0x00;
}
break;
case 0x0b8d:
- if ((readinputportbytag("DOOR") & 0x02) == 1) {
+ if ((readinputportbytag_safe("DOOR",0xff) & 0x02) == 1) {
cmos_ram[offset] = 0x01;
}
break;
@@ -438,7 +550,7 @@ static READ8_HANDLER( peplus_input_bank_a_r )
sda = i2cmem_read(0, I2CMEM_SDA);
}
- if ((readinputportbytag("SENSOR") & 0x01) == 0x01 && coin_state == 0) {
+ if ((readinputportbytag_safe("SENSOR",0x00) & 0x01) == 0x01 && coin_state == 0) {
coin_state = 1; // Start Coin Cycle
last_cycles = activecpu_gettotalcycles();
} else {
@@ -474,7 +586,7 @@ static READ8_HANDLER( peplus_input_bank_a_r )
}
if (curr_cycles - last_door > 6000) { // Guessing with 6000
- if ((readinputportbytag("DOOR") & 0x01) == 0x01) {
+ if ((readinputportbytag_safe("DOOR",0xff) & 0x01) == 0x01) {
door_open = (!door_open & 0x01);
} else {
door_open = 1;
@@ -587,167 +699,6 @@ static GFXDECODE_START( peplus )
GFXDECODE_END
-/**************
-* Driver Init *
-***************/
-
-static DRIVER_INIT( peplus )
-{
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- //program_ram[0x5e7e] = 0x01; // Enable Autohold Feature
- program_ram[0x9a24] = 0x22; // RET - Disable Memory Test
- program_ram[0xd61d] = 0x22; // RET - Disable Program Checksum
-}
-
-static DRIVER_INIT( pepp0158 )
-{
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- //program_ram[0x5ffe] = 0x01; // Enable Autohold Feature
- program_ram[0xa19f] = 0x22; // RET - Disable Memory Test
- program_ram[0xddea] = 0x22; // RET - Disable Program Checksum
-}
-
-static DRIVER_INIT( pepp0188 )
-{
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- //program_ram[0x742f] = 0x01; // Enable Autohold Feature
- program_ram[0x9a8d] = 0x22; // RET - Disable Memory Test
- program_ram[0xf429] = 0x22; // RET - Disable Program Checksum
-}
-
-static DRIVER_INIT( peset038 )
-{
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- program_ram[0x302] = 0x22; // RET - Disable Memory Test
- program_ram[0x289f] = 0x22; // RET - Disable Program Checksum
-}
-
-static DRIVER_INIT( pebe0014 )
-{
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- program_ram[0x75e7] = 0x22; // RET - Disable Memory Test
- program_ram[0xc3ab] = 0x22; // RET - Disable Program Checksum
-}
-
-static DRIVER_INIT( peke1012 )
-{
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- program_ram[0x59e7] = 0x22; // RET - Disable Memory Test
- program_ram[0xbe01] = 0x22; // RET - Disable Program Checksum
-}
-
-static DRIVER_INIT( peps0615 )
-{
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- program_ram[0x84be] = 0x22; // RET - Disable Memory Test
- program_ram[0xbfd8] = 0x22; // RET - Disable Program Checksum
-}
-
-static DRIVER_INIT( peps0716 )
-{
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- program_ram[0x7f99] = 0x22; // RET - Disable Memory Test
- program_ram[0xbaa9] = 0x22; // RET - Disable Program Checksum
-}
-
-static DRIVER_INIT( pexp0019 )
-{
- UINT8 *super_data = memory_region(REGION_USER1);
-
- /* Distribute Superboard Data */
- memcpy(s1000_ram, &super_data[0], 0x1000);
- memcpy(s3000_ram, &super_data[0x3000], 0x1000);
- memcpy(s5000_ram, &super_data[0x5000], 0x1000);
- memcpy(s7000_ram, &super_data[0x7000], 0x1000);
- memcpy(sb000_ram, &super_data[0xb000], 0x1000);
- memcpy(sd000_ram, &super_data[0xd000], 0x1000);
- memcpy(sf000_ram, &super_data[0xf000], 0x1000);
-
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- program_ram[0xc1e4] = 0x22; // RET - Disable Memory Test
- program_ram[0xc15f] = 0x22; // RET - Disable Program Checksum
- program_ram[0xc421] = 0x22; // RET - Disable 2nd Memory Test
-}
-
-static DRIVER_INIT( pexs0006 )
-{
- UINT8 *super_data = memory_region(REGION_USER1);
-
- /* Distribute Superboard Data */
- memcpy(s1000_ram, &super_data[0], 0x1000);
- memcpy(s3000_ram, &super_data[0x3000], 0x1000);
- memcpy(s5000_ram, &super_data[0x5000], 0x1000);
- memcpy(s7000_ram, &super_data[0x7000], 0x1000);
- memcpy(sb000_ram, &super_data[0xb000], 0x1000);
- memcpy(sd000_ram, &super_data[0xd000], 0x1000);
- memcpy(sf000_ram, &super_data[0xf000], 0x1000);
-
- /* External RAM callback */
- i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
-
- /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
- i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
-
- // For testing only, cannot stay in final driver
- program_ram[0x9bd4] = 0x22; // RET - Disable Memory Test
- program_ram[0x9e9c] = 0x22; // RET - Disable 2nd Memory Test
-}
-
-
/*************************
* Memory map information *
*************************/
@@ -774,7 +725,7 @@ static ADDRESS_MAP_START( peplus_datamap, ADDRESS_SPACE_DATA, 8 )
// Sound and Dipswitches
AM_RANGE(0x4000, 0x4000) AM_WRITE(AY8910_control_port_0_w)
- AM_RANGE(0x4004, 0x4004) AM_READ(input_port_3_r) AM_WRITE(AY8910_write_port_0_w)
+ AM_RANGE(0x4004, 0x4004) AM_READ_PORT("SW1") AM_WRITE(AY8910_write_port_0_w)
// Superboard Data
AM_RANGE(0x5000, 0x5fff) AM_RAM AM_READWRITE(peplus_s5000_r, peplus_s5000_w) AM_BASE(&s5000_ram)
@@ -795,7 +746,7 @@ static ADDRESS_MAP_START( peplus_datamap, ADDRESS_SPACE_DATA, 8 )
AM_RANGE(0x9000, 0x9000) AM_READ(peplus_dropdoor_r) AM_WRITE(i2c_nvram_w)
// Input Banks B & C, Output Bank B
- AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) AM_WRITE(peplus_output_bank_b_w)
+ AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") AM_WRITE(peplus_output_bank_b_w)
// Superboard Data
AM_RANGE(0xb000, 0xbfff) AM_RAM AM_READWRITE(peplus_sb000_r, peplus_sb000_w) AM_BASE(&sb000_ram)
@@ -820,28 +771,13 @@ static ADDRESS_MAP_START( peplus_iomap, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x03) AM_READ(peplus_io_r) AM_WRITE(peplus_io_w) AM_BASE(&io_port)
ADDRESS_MAP_END
+
/*************************
* Input ports *
*************************/
-static INPUT_PORTS_START( peplus_poker )
- PORT_START_TAG("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Jackpot Reset") PORT_CODE(KEYCODE_L)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Self Test") PORT_CODE(KEYCODE_K)
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Hold 1") PORT_CODE(KEYCODE_Z)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Hold 2") PORT_CODE(KEYCODE_X)
- PORT_BIT( 0x05, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C)
- PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Hold 4") PORT_CODE(KEYCODE_V)
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Hold 5") PORT_CODE(KEYCODE_B)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Deal-Spin-Start") PORT_CODE(KEYCODE_Q)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Max Bet") PORT_CODE(KEYCODE_W)
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("Play Credit") PORT_CODE(KEYCODE_R)
- PORT_BIT( 0x50, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("Cashout") PORT_CODE(KEYCODE_T)
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_BUTTON14 ) PORT_NAME("Change Request") PORT_CODE(KEYCODE_Y)
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+static INPUT_PORTS_START( peplus )
+ /* IN0 has to be defined for each kind of game */
PORT_START_TAG("DOOR")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Upper Door") PORT_CODE(KEYCODE_O) PORT_TOGGLE
@@ -854,80 +790,128 @@ static INPUT_PORTS_START( peplus_poker )
PORT_DIPNAME( 0x01, 0x01, "Line Frequency" )
PORT_DIPSETTING( 0x01, "60HZ" )
PORT_DIPSETTING( 0x00, "50HZ" )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
INPUT_PORTS_END
-static INPUT_PORTS_START( peplus_keno )
+
+/*************************
+* Input ports *
+*************************/
+
+/* Fake inputs to only map what is needed */
+static INPUT_PORTS_START( peplus_schip )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Jackpot Reset") PORT_CODE(KEYCODE_L)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Self Test") PORT_CODE(KEYCODE_K)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x05, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Deal-Spin-Start") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x50, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("SW1")
+ PORT_DIPNAME( 0x01, 0x01, "Line Frequency" )
+ PORT_DIPSETTING( 0x01, "60HZ" )
+ PORT_DIPSETTING( 0x00, "50HZ" )
+ PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( peplus_poker )
+ PORT_INCLUDE(peplus)
+
PORT_START_TAG("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Jackpot Reset") PORT_CODE(KEYCODE_L)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Self Test") PORT_CODE(KEYCODE_K)
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x05, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Erase") PORT_CODE(KEYCODE_B)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("Light Pen") PORT_CODE(KEYCODE_A)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Deal-Spin-Start") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Jackpot Reset") PORT_CODE(KEYCODE_L)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Self Test") PORT_CODE(KEYCODE_K)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Hold 1") PORT_CODE(KEYCODE_Z)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Hold 2") PORT_CODE(KEYCODE_X)
+ PORT_BIT( 0x05, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C)
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Hold 4") PORT_CODE(KEYCODE_V)
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Hold 5") PORT_CODE(KEYCODE_B)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Deal-Spin-Start") PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Max Bet") PORT_CODE(KEYCODE_W)
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("Play Credit") PORT_CODE(KEYCODE_R)
PORT_BIT( 0x50, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("Cashout") PORT_CODE(KEYCODE_T)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_BUTTON14 ) PORT_NAME("Change Request") PORT_CODE(KEYCODE_Y)
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+INPUT_PORTS_END
- PORT_START_TAG("DOOR")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Upper Door") PORT_CODE(KEYCODE_O)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Lower Door") PORT_CODE(KEYCODE_I)
+/* same as peplus_poker with additionnal fake option to enable the "Autohold" feature */
+static INPUT_PORTS_START( peplus_pokah )
+ PORT_INCLUDE(peplus_poker)
- PORT_START_TAG("SENSOR")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("Coin In") PORT_IMPULSE(1)
+ /* If you change this option, you'll have to delete the .nv file next time you launch the game ! */
+ PORT_START_TAG("AUTOHOLD")
+ PORT_CONFNAME( 0x01, 0x00, "Enable Autohold Feature" )
+ PORT_CONFSETTING( 0x00, DEF_STR( No ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Yes ) )
+INPUT_PORTS_END
- PORT_START_TAG("SW1")
- PORT_DIPNAME( 0x01, 0x01, "Line Frequency" )
- PORT_DIPSETTING( 0x01, "60HZ" )
- PORT_DIPSETTING( 0x00, "50HZ" )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+static INPUT_PORTS_START( peplus_bjack )
+ PORT_INCLUDE(peplus)
+
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Jackpot Reset") PORT_CODE(KEYCODE_L)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Self Test") PORT_CODE(KEYCODE_K)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Surrender") PORT_CODE(KEYCODE_Z)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_X)
+ PORT_BIT( 0x05, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Insurance") PORT_CODE(KEYCODE_C)
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Double Down") PORT_CODE(KEYCODE_V)
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Split") PORT_CODE(KEYCODE_B)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Deal-Spin-Start") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Max Bet") PORT_CODE(KEYCODE_W)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("Play Credit") PORT_CODE(KEYCODE_R)
+ PORT_BIT( 0x50, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("Cashout") PORT_CODE(KEYCODE_T)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_BUTTON14 ) PORT_NAME("Change Request") PORT_CODE(KEYCODE_Y)
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( peplus_keno )
+ PORT_INCLUDE(peplus)
+
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Jackpot Reset") PORT_CODE(KEYCODE_L)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Self Test") PORT_CODE(KEYCODE_K)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x05, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Erase") PORT_CODE(KEYCODE_B)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Light Pen") PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Deal-Spin-Start") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Max Bet") PORT_CODE(KEYCODE_W)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("Play Credit") PORT_CODE(KEYCODE_R)
+ PORT_BIT( 0x50, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("Cashout") PORT_CODE(KEYCODE_T)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_BUTTON14 ) PORT_NAME("Change Request") PORT_CODE(KEYCODE_Y)
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START_TAG("TOUCH_X")
PORT_BIT( 0xff, 0x08, IPT_LIGHTGUN_X ) PORT_MINMAX(0x00, 0x28) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(13)
@@ -935,6 +919,41 @@ static INPUT_PORTS_START( peplus_keno )
PORT_BIT( 0xff, 0x08, IPT_LIGHTGUN_Y ) PORT_MINMAX(0x00, 0x19) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(13)
INPUT_PORTS_END
+static INPUT_PORTS_START( peplus_slots )
+ PORT_INCLUDE(peplus)
+
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Jackpot Reset") PORT_CODE(KEYCODE_L)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Self Test") PORT_CODE(KEYCODE_K)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x05, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Deal-Spin-Start") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Max Bet") PORT_CODE(KEYCODE_W)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("Play Credit") PORT_CODE(KEYCODE_R)
+ PORT_BIT( 0x50, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("Cashout") PORT_CODE(KEYCODE_T)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_BUTTON14 ) PORT_NAME("Change Request") PORT_CODE(KEYCODE_Y)
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+
+
+/*************************
+* Machine Reset *
+*************************/
+
+static MACHINE_RESET( peplus )
+{
+ if (autohold_addr)
+ program_ram[autohold_addr] = readinputportbytag_safe("AUTOHOLD",0x00) & 0x01;
+}
+
+
/*************************
* Machine Driver *
*************************/
@@ -950,6 +969,7 @@ static MACHINE_DRIVER_START( peplus )
MDRV_SCREEN_REFRESH_RATE(60)
MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+ MDRV_MACHINE_RESET(peplus)
MDRV_NVRAM_HANDLER(peplus)
// video hardware
@@ -971,13 +991,151 @@ static MACHINE_DRIVER_START( peplus )
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_DRIVER_END
+
+/*****************
+* Initialisation *
+*****************/
+
+/* Normal board */
+static void peplus_init(void)
+{
+ /* External RAM callback */
+ i8051_set_eram_iaddr_callback(peplus_external_ram_iaddr);
+
+ /* EEPROM is a X2404P 4K-bit Serial I2C Bus */
+ i2cmem_init(0, I2CMEM_SLAVE_ADDRESS, 8, EEPROM_NVRAM_SIZE, NULL);
+
+ /* default : no address to patch in program RAM to enable autohold feature */
+ autohold_addr = 0;
+}
+
+/* Superboard */
+static void peplussb_init(void)
+{
+ UINT8 *super_data = memory_region(REGION_USER1);
+
+ /* Distribute Superboard Data */
+ memcpy(s1000_ram, &super_data[0], 0x1000);
+ memcpy(s3000_ram, &super_data[0x3000], 0x1000);
+ memcpy(s5000_ram, &super_data[0x5000], 0x1000);
+ memcpy(s7000_ram, &super_data[0x7000], 0x1000);
+ memcpy(sb000_ram, &super_data[0xb000], 0x1000);
+ memcpy(sd000_ram, &super_data[0xd000], 0x1000);
+ memcpy(sf000_ram, &super_data[0xf000], 0x1000);
+
+ peplus_init();
+}
+
+
+/*************************
+* Driver Init *
+*************************/
+
+static DRIVER_INIT( peset038 )
+{
+ peplus_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0x302] = 0x22; // RET - Disable Memory Test
+ program_ram[0x289f] = 0x22; // RET - Disable Program Checksum
+}
+
+static DRIVER_INIT( pepp0158 )
+{
+ peplus_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0xa19f] = 0x22; // RET - Disable Memory Test
+ program_ram[0xddea] = 0x22; // RET - Disable Program Checksum
+
+ autohold_addr = 0x5ffe;
+}
+
+static DRIVER_INIT( pepp0188 )
+{
+ peplus_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0x9a8d] = 0x22; // RET - Disable Memory Test
+ program_ram[0xf429] = 0x22; // RET - Disable Program Checksum
+
+ autohold_addr = 0x742f;
+}
+
+static DRIVER_INIT( pepp0516 )
+{
+ peplus_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0x9a24] = 0x22; // RET - Disable Memory Test
+ program_ram[0xd61d] = 0x22; // RET - Disable Program Checksum
+
+ autohold_addr = 0x5e7e;
+}
+
+static DRIVER_INIT( pebe0014 )
+{
+ peplus_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0x75e7] = 0x22; // RET - Disable Memory Test
+ program_ram[0xc3ab] = 0x22; // RET - Disable Program Checksum
+}
+
+static DRIVER_INIT( peke1012 )
+{
+ peplus_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0x59e7] = 0x22; // RET - Disable Memory Test
+ program_ram[0xbe01] = 0x22; // RET - Disable Program Checksum
+}
+
+static DRIVER_INIT( peps0615 )
+{
+ peplus_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0x84be] = 0x22; // RET - Disable Memory Test
+ program_ram[0xbfd8] = 0x22; // RET - Disable Program Checksum
+}
+
+static DRIVER_INIT( peps0716 )
+{
+ peplus_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0x7f99] = 0x22; // RET - Disable Memory Test
+ program_ram[0xbaa9] = 0x22; // RET - Disable Program Checksum
+}
+
+static DRIVER_INIT( pexp0019 )
+{
+ peplussb_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0xc1e4] = 0x22; // RET - Disable Memory Test
+ program_ram[0xc15f] = 0x22; // RET - Disable Program Checksum
+ program_ram[0xc421] = 0x22; // RET - Disable 2nd Memory Test
+}
+
+static DRIVER_INIT( pexs0006 )
+{
+ peplussb_init();
+
+ // For testing only, cannot stay in final driver
+ program_ram[0x9bd4] = 0x22; // RET - Disable Memory Test
+ program_ram[0x9e9c] = 0x22; // RET - Disable 2nd Memory Test
+}
+
+
/*************************
* Rom Load *
*************************/
-ROM_START( peplus )
+ROM_START( peset038 )
ROM_REGION( 0x10000, REGION_CPU1, 0 )
- ROM_LOAD( "pp0516.u68", 0x00000, 0x10000, CRC(d9da6e13) SHA1(421678d9cb42daaf5b21074cc3900db914dd26cf) )
+ ROM_LOAD( "set038.u68", 0x00000, 0x10000, CRC(9c4b1d1a) SHA1(8a65cd1d8e2d74c7b66f4dfc73e7afca8458e979) )
ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "mro-cg740.u72", 0x00000, 0x8000, CRC(72667f6c) SHA1(89843f472cc0329317cfc643c63bdfd11234b194) )
@@ -1017,9 +1175,9 @@ ROM_START( pepp0188 )
ROM_LOAD( "cap740.u50", 0x0000, 0x0100, CRC(6fe619c4) SHA1(49e43dafd010ce0fe9b2a63b96a4ddedcb933c6d) )
ROM_END
-ROM_START( peset038 )
+ROM_START( pepp0516 )
ROM_REGION( 0x10000, REGION_CPU1, 0 )
- ROM_LOAD( "set038.u68", 0x00000, 0x10000, CRC(9c4b1d1a) SHA1(8a65cd1d8e2d74c7b66f4dfc73e7afca8458e979) )
+ ROM_LOAD( "pp0516.u68", 0x00000, 0x10000, CRC(d9da6e13) SHA1(421678d9cb42daaf5b21074cc3900db914dd26cf) )
ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "mro-cg740.u72", 0x00000, 0x8000, CRC(72667f6c) SHA1(89843f472cc0329317cfc643c63bdfd11234b194) )
@@ -1121,18 +1279,33 @@ ROM_START( pexs0006 )
ROM_LOAD( "cap2361.u43", 0x0000, 0x0100, CRC(051aea66) SHA1(2abf32caaeb821ca50a6398581de69bbfe5930e9) )
ROM_END
+
/*************************
* Game Drivers *
*************************/
-/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */
-GAME( 1987, peplus, 0, peplus, peplus_poker, peplus, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PP0516) Double Bonus Poker", 0 )
-GAME( 1987, pepp0158, 0, peplus, peplus_poker, pepp0158, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PP0158) 4 of a Kind Bonus Poker", 0 )
-GAME( 1987, pepp0188, 0, peplus, peplus_poker, pepp0188, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PP0188) Standard Draw Poker", 0 )
-GAME( 1987, peset038, 0, peplus, peplus_poker, peset038, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (Set038) Set Chip", 0 )
-GAME( 1994, pebe0014, 0, peplus, peplus_poker, pebe0014, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (BE0014) Blackjack", 0 )
-GAME( 1994, peke1012, 0, peplus, peplus_keno, peke1012, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (KE1012) Keno", 0 )
-GAME( 1996, peps0615, 0, peplus, peplus_poker, peps0615, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PS0615) Chaos Slots", 0 )
-GAME( 1996, peps0716, 0, peplus, peplus_poker, peps0716, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PS0716) Quarter Mania Slots", 0 )
-GAME( 1995, pexp0019, 0, peplus, peplus_poker, pexp0019, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (XP000019) Deuces Wild Poker", 0 )
-GAME( 1997, pexs0006, 0, peplus, peplus_poker, pexs0006, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (XS000006) Triple Triple Diamond Slots", 0 )
+/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */
+
+/* Set chips */
+GAMEL(1987, peset038, 0, peplus, peplus_schip, peset038, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (Set038) Set Chip", 0, layout_pe_schip )
+
+/* Normal board : poker */
+GAMEL(1987, pepp0158, 0, peplus, peplus_pokah, pepp0158, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PP0158) 4 of a Kind Bonus Poker", 0, layout_pe_poker )
+GAMEL(1987, pepp0188, 0, peplus, peplus_pokah, pepp0188, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PP0188) Standard Draw Poker", 0, layout_pe_poker )
+GAMEL(1987, pepp0516, 0, peplus, peplus_pokah, pepp0516, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PP0516) Double Bonus Poker", 0, layout_pe_poker )
+
+/* Normal board : blackjack */
+GAMEL(1994, pebe0014, 0, peplus, peplus_bjack, pebe0014, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (BE0014) Blackjack", 0, layout_pe_bjack )
+
+/* Normal board : keno */
+GAMEL(1994, peke1012, 0, peplus, peplus_keno, peke1012, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (KE1012) Keno", 0, layout_pe_keno )
+
+/* Normal board : slots machine */
+GAMEL(1996, peps0615, 0, peplus, peplus_slots, peps0615, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PS0615) Chaos Slots", 0, layout_pe_slots )
+GAMEL(1996, peps0716, 0, peplus, peplus_slots, peps0716, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (PS0716) Quarter Mania Slots", 0, layout_pe_slots )
+
+/* Superboard : poker */
+GAMEL(1995, pexp0019, 0, peplus, peplus_poker, pexp0019, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (XP000019) Deuces Wild Poker", 0, layout_pe_poker )
+
+/* Superboard : slots machine */
+GAMEL(1997, pexs0006, 0, peplus, peplus_slots, pexs0006, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (XS000006) Triple Triple Diamond Slots", 0, layout_pe_slots )
diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c
index 1846e5c83b9..f6b1c287fcd 100644
--- a/src/mame/drivers/pgm.c
+++ b/src/mame/drivers/pgm.c
@@ -376,7 +376,7 @@ static WRITE16_HANDLER( arm7_latch_68k_w )
#ifdef PGMARM7SPEEDHACK
cpu_trigger(1000);
- timer_set(ATTOTIME_IN_USEC(50), 0, arm_irq); // i don't know how long..
+ timer_set(ATTOTIME_IN_USEC(50), NULL, 0, arm_irq); // i don't know how long..
cpu_spinuntil_trigger(1002);
#else
cpunum_set_input_line(2, ARM7_FIRQ_LINE, PULSE_LINE);
diff --git a/src/mame/drivers/phoenix.c b/src/mame/drivers/phoenix.c
index 2b7fd361f4b..30edd8b23c3 100644
--- a/src/mame/drivers/phoenix.c
+++ b/src/mame/drivers/phoenix.c
@@ -415,6 +415,54 @@ static INPUT_PORTS_START( falcona )
PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) )
INPUT_PORTS_END
+
+static INPUT_PORTS_START( nextfase )
+ PORT_START /* IN0 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 )
+
+ PORT_START /* IN1 */
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
+
+ PORT_START /* DSW0 */
+ PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "1" )
+ PORT_DIPSETTING( 0x01, "2" )
+ PORT_DIPSETTING( 0x02, "3" )
+ PORT_DIPSETTING( 0x03, "4" )
+ PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x00, "3K 30K" )
+ PORT_DIPSETTING( 0x04, "4K 40K" )
+ PORT_DIPSETTING( 0x08, "5K 50K" )
+ PORT_DIPSETTING( 0x0c, "6K 60K" )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x60, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x00, "1C/1C & 1C/2C" )
+ PORT_DIPSETTING( 0x20, "2C/3C & 1C/3C" )
+ PORT_DIPSETTING( 0x40, "1C/2C & 1C/4C" )
+ PORT_DIPSETTING( 0x60, "2C/5C & 1C/5C" )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
+
+ PORT_START /* fake port for non-memory mapped dip switch */
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
static INPUT_PORTS_START( pleiads )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -1096,6 +1144,32 @@ ROM_START( falcona )
ROM_LOAD( "mmi6301.ic41", 0x0100, 0x0100, CRC(e176b768) SHA1(e2184dd495ed579f10b6da0b78379e02d7a6229f) ) /* palette high bits */
ROM_END
+ROM_START( nextfase )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "nf01.bin", 0x0000, 0x0800, CRC(b31ce820) SHA1(dfdb17995a14b66d2571c2c8de481d2792f9ce6a) )
+ ROM_LOAD( "nf02.bin", 0x0800, 0x0800, CRC(891d21e1) SHA1(bea01962c0706c00eae42920bb2b3bfdb7e80d89) )
+ ROM_LOAD( "nf03.bin", 0x1000, 0x0800, CRC(2ab7389d) SHA1(c0bc0c235cae4a8e880237196ea1718f8c1d0123) )
+ ROM_LOAD( "nf04.bin", 0x1800, 0x0800, CRC(590d3c36) SHA1(89e87f207cdb9a7f5624170c09626ef85ede3969) )
+ ROM_LOAD( "nf05.bin", 0x2000, 0x0800, CRC(3527f247) SHA1(0cccbc3e15d7603deaec845581983bfbcc4d4560) )
+ ROM_LOAD( "nf06.bin", 0x2800, 0x0800, CRC(ac5e9ec1) SHA1(0402e5241d99759d804291998efd43f37ce99917) )
+ ROM_LOAD( "nf07.bin", 0x3000, 0x0800, CRC(2eab35b4) SHA1(849bf8273317cc869bdd67e50c68399ee8ece81d) )
+ ROM_LOAD( "nf08.bin", 0x3800, 0x0800, CRC(04c2323f) SHA1(4d820464f57e4f59acc46ea3264dba3cb9c501a1) )
+
+ ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "nf11.bin", 0x0000, 0x0800, CRC(3c7e623f) SHA1(e7ff5fc371664af44785c079e92eeb2d8530187b) )
+ ROM_LOAD( "nf12.bin", 0x0800, 0x0800, CRC(59916d3b) SHA1(71aec70a8e096ed1f0c2297b3ae7dca1b8ecc38d) )
+
+ ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "nf09.bin", 0x0000, 0x0800, CRC(bacbfa88) SHA1(bf378a729726db01448f2cc4820f06e17659d674) )
+ ROM_LOAD( "nf10.bin", 0x0800, 0x0800, CRC(3143a9ee) SHA1(371bb314dc9e4ec6ed469eb81391061296c547ec) )
+
+ /* Proms were missing from this dump, these might not be correct */
+ ROM_REGION( 0x0200, REGION_PROMS, 0 )
+ ROM_LOAD( "mmi6301.ic40", 0x0000, 0x0100, CRC(79350b25) SHA1(57411be4c1d89677f7919ae295446da90612c8a8) ) /* palette low bits */
+ ROM_LOAD( "mmi6301.ic41", 0x0100, 0x0100, CRC(e176b768) SHA1(e2184dd495ed579f10b6da0b78379e02d7a6229f) ) /* palette high bits */
+ROM_END
+
+
ROM_START( pleiads )
ROM_REGION( 0x10000, REGION_CPU1, 0 )
ROM_LOAD( "ic47.r1", 0x0000, 0x0800, CRC(960212c8) SHA1(52a3232e99920805ce9e195b8a6338ae7044dd18) )
@@ -1239,15 +1313,20 @@ GAME( 1980, phoenixb, phoenix, phoenix, phoenixa, 0, ROT90, "Amstar (Cen
GAME( 1980, phoenixt, phoenix, phoenix, phoenixt, 0, ROT90, "Taito", "Phoenix (Taito)", 0 )
GAME( 1980, phoenix3, phoenix, phoenix, phoenix3, 0, ROT90, "bootleg", "Phoenix (T.P.N.)", 0 )
GAME( 1981, phoenixc, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg?", "Phoenix (IRECSA, G.G.I Corp)", 0 )
-GAME( 1981, condor, phoenix, condor, condor, condor, ROT90, "Sidam", "Condor", 0 )
+
+
+GAME( 1981, condor, phoenix, condor, condor, condor, ROT90, "Sidam (bootleg)", "Condor (bootleg of Phoenix)", 0 )
// the following 2 were common bootlegs in england & france respectively
-GAME( 1980, falcon, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg", "Falcon (bootleg set 1)", 0 )
-GAME( 1980, vautour, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg", "Vautour (set 1 - Jeutel France)", 0 )
-GAME( 1980, vautour2, phoenix, condor, condor, condor, ROT90, "bootleg", "Vautour (set 2)", 0 )
+GAME( 1980, falcon, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg", "Falcon (bootleg of Phoenix) (set 1)", 0 )
+GAME( 1980, vautour, phoenix, phoenix, phoenixt, 0, ROT90, "Jeutel (bootleg)", "Vautour (bootleg of Phoenix) (set 1)", 0 )
+GAME( 1980, vautour2, phoenix, condor, condor, condor, ROT90, "bootleg", "Vautour (bootleg of Phoenix) (set 2)", 0 )
// fenix is an italian bootleg based on vautour
-GAME( 1980, fenix, phoenix, condor, condor, condor, ROT90, "bootleg", "Fenix", GAME_NOT_WORKING )
-GAME( 1980, griffon, phoenix, condor, condor, condor, ROT90, "Videotron", "Griffon", 0 )
-GAME( 1980, falcona, phoenix, condor, falcona, 0, ROT90, "bootleg", "Falcon (bootleg set 2)", 0 )
+GAME( 1980, fenix, phoenix, condor, condor, condor, ROT90, "bootleg", "Fenix (bootleg of Phoenix)", GAME_NOT_WORKING )
+GAME( 1980, griffon, phoenix, condor, condor, condor, ROT90, "Videotron (bootleg)", "Griffon (bootleg of Phoenix)", 0 )
+GAME( 1980, falcona, phoenix, condor, falcona, 0, ROT90, "bootleg", "Falcon (bootleg of Phoenix) (set 2)", 0 )
+// nextfase is a spanish bootleg
+GAME( 1981, nextfase, phoenix, phoenix, nextfase, 0, ROT90, "Petaco S.A. (bootleg)","Next Fase (bootleg of Phoenix)", 0 )
+
GAME( 1981, pleiads, 0, pleiads, pleiads, 0, ROT90, "Tehkan", "Pleiads (Tehkan)", GAME_IMPERFECT_COLORS )
GAME( 1981, pleiadbl, pleiads, pleiads, pleiads, 0, ROT90, "bootleg", "Pleiads (bootleg)", GAME_IMPERFECT_COLORS )
GAME( 1981, pleiadce, pleiads, pleiads, pleiadce, 0, ROT90, "Tehkan (Centuri license)", "Pleiads (Centuri)", GAME_IMPERFECT_COLORS )
diff --git a/src/mame/drivers/pipedrm.c b/src/mame/drivers/pipedrm.c
index df63e798448..ab24a3c3f1f 100644
--- a/src/mame/drivers/pipedrm.c
+++ b/src/mame/drivers/pipedrm.c
@@ -188,13 +188,13 @@ static TIMER_CALLBACK( delayed_command_w )
static WRITE8_HANDLER( sound_command_w )
{
- timer_call_after_resynch(data | 0x100, delayed_command_w);
+ timer_call_after_resynch(NULL, data | 0x100, delayed_command_w);
}
static WRITE8_HANDLER( sound_command_nonmi_w )
{
- timer_call_after_resynch(data, delayed_command_w);
+ timer_call_after_resynch(NULL, data, delayed_command_w);
}
diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c
index e8711dddc6f..f05b99bafbf 100644
--- a/src/mame/drivers/pipeline.c
+++ b/src/mame/drivers/pipeline.c
@@ -209,7 +209,7 @@ static TIMER_CALLBACK( protection_deferred_w )
static WRITE8_HANDLER(protection_w)
{
- timer_call_after_resynch(data, protection_deferred_w);
+ timer_call_after_resynch(NULL, data, protection_deferred_w);
cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100));
}
diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c
index 1840035b20f..6ea17fc3966 100644
--- a/src/mame/drivers/pkscram.c
+++ b/src/mame/drivers/pkscram.c
@@ -274,7 +274,7 @@ static MACHINE_RESET( pkscramble)
{
out = 0;
interrupt_line_active=0;
- scanline_timer = timer_alloc(scanline_callback);
+ scanline_timer = timer_alloc(scanline_callback, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, interrupt_scanline, 0), interrupt_scanline, attotime_zero);
state_save_register_global(out);
diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c
index 573ab04590c..9863c525aea 100644
--- a/src/mame/drivers/policetr.c
+++ b/src/mame/drivers/policetr.c
@@ -128,7 +128,7 @@ static TIMER_CALLBACK( irq5_gen )
static INTERRUPT_GEN( irq4_gen )
{
cpunum_set_input_line(0, R3000_IRQ4, ASSERT_LINE);
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, irq5_gen);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, irq5_gen);
}
@@ -269,7 +269,7 @@ static WRITE32_HANDLER( speedup_w )
*
*************************************/
-struct EEPROM_interface eeprom_interface_policetr =
+static struct EEPROM_interface eeprom_interface_policetr =
{
8, // address bits 8
16, // data bits 16
diff --git a/src/mame/drivers/polyplay.c b/src/mame/drivers/polyplay.c
index 0c3d67b1908..e73c856e050 100644
--- a/src/mame/drivers/polyplay.c
+++ b/src/mame/drivers/polyplay.c
@@ -106,7 +106,7 @@ void polyplay_play_channel2(int data);
void polyplay_sh_start(void);
/* timer handling */
-static TIMER_CALLBACK( timer_callback );
+static TIMER_CALLBACK( polyplay_timer_callback );
static emu_timer* polyplay_timer;
static WRITE8_HANDLER( polyplay_start_timer2 );
static WRITE8_HANDLER( polyplay_sound_channel );
@@ -133,7 +133,7 @@ static MACHINE_RESET( polyplay )
polyplay_set_channel2(0);
polyplay_play_channel2(0);
- polyplay_timer = timer_alloc(timer_callback);
+ polyplay_timer = timer_alloc(polyplay_timer_callback, NULL);
}
@@ -365,7 +365,7 @@ ROM_START( polyplay )
ROM_END
-static TIMER_CALLBACK( timer_callback )
+static TIMER_CALLBACK( polyplay_timer_callback )
{
cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0x4c);
}
diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c
index 4ee488bc80b..ef4401a71ce 100644
--- a/src/mame/drivers/psikyo.c
+++ b/src/mame/drivers/psikyo.c
@@ -130,7 +130,7 @@ static int psikyo_readcoinport(int has_mcu)
/* main CPU might be waiting for sound CPU to finish NMI,
so set a timer to give sound CPU a chance to run */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
// logerror("PC %06X - Read coin port during Z80 NMI\n", activecpu_get_pc());
}
@@ -171,7 +171,7 @@ static TIMER_CALLBACK( psikyo_soundlatch_callback )
static WRITE32_HANDLER( psikyo_soundlatch_w )
{
if (ACCESSING_LSB32)
- timer_call_after_resynch(data & 0xff, psikyo_soundlatch_callback);
+ timer_call_after_resynch(NULL, data & 0xff, psikyo_soundlatch_callback);
}
/***************************************************************************
@@ -181,7 +181,7 @@ static WRITE32_HANDLER( psikyo_soundlatch_w )
static WRITE32_HANDLER( s1945_soundlatch_w )
{
if (!(mem_mask & 0x00ff0000))
- timer_call_after_resynch((data >> 16) & 0xff, psikyo_soundlatch_callback);
+ timer_call_after_resynch(NULL, (data >> 16) & 0xff, psikyo_soundlatch_callback);
}
static UINT8 s1945_table[256] = {
@@ -1552,7 +1552,7 @@ GFXDECODE_END
***************************************************************************/
-struct YM2610interface sngkace_ym2610_interface =
+static struct YM2610interface sngkace_ym2610_interface =
{
sound_irq, /* irq */
REGION_SOUND1, /* delta_t */
@@ -1606,7 +1606,7 @@ MACHINE_DRIVER_END
***************************************************************************/
-struct YM2610interface gunbird_ym2610_interface =
+static struct YM2610interface gunbird_ym2610_interface =
{
sound_irq, /* irq */
REGION_SOUND1, /* delta_t */
diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c
index b04f9cf64b5..b9653e53906 100644
--- a/src/mame/drivers/qdrmfgp.c
+++ b/src/mame/drivers/qdrmfgp.c
@@ -656,7 +656,7 @@ static MACHINE_RESET( qdrmfgp2 )
sndram = memory_region(REGION_SOUND1) + 0x100000;
/* sound irq (CCU? 240Hz) */
- timer_pulse(ATTOTIME_IN_HZ(18432000/76800), 0, gp2_timer_callback);
+ timer_pulse(ATTOTIME_IN_HZ(18432000/76800), NULL, 0, gp2_timer_callback);
/* reset the IDE controller */
gp2_irq_control = 0;
diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c
index 8b41c179e76..999c9df9f5e 100644
--- a/src/mame/drivers/rabbit.c
+++ b/src/mame/drivers/rabbit.c
@@ -656,7 +656,7 @@ static void rabbit_do_blit(void)
if (!blt_amount)
{
if(BLITLOG) mame_printf_debug("end of blit list\n");
- timer_set(ATTOTIME_IN_USEC(500),0,rabbit_blit_done);
+ timer_set(ATTOTIME_IN_USEC(500), NULL,0,rabbit_blit_done);
return;
}
diff --git a/src/mame/drivers/rockola.c b/src/mame/drivers/rockola.c
index c3bb348aaea..c69330af02b 100644
--- a/src/mame/drivers/rockola.c
+++ b/src/mame/drivers/rockola.c
@@ -188,7 +188,7 @@ static void sasuke_start_counter(void)
{
sasuke_counter = 0;
- sasuke_timer = timer_alloc(sasuke_update_counter);
+ sasuke_timer = timer_alloc(sasuke_update_counter, NULL);
timer_adjust(sasuke_timer, attotime_zero, 0, ATTOTIME_IN_HZ(11289000/8)); // 1.4 MHz
}
diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c
index 77967c12895..6e5fe311df4 100644
--- a/src/mame/drivers/rollerg.c
+++ b/src/mame/drivers/rollerg.c
@@ -67,7 +67,7 @@ static TIMER_CALLBACK( nmi_callback )
static WRITE8_HANDLER( sound_arm_nmi_w )
{
cpunum_set_input_line(1, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(ATTOTIME_IN_USEC(50),0,nmi_callback); /* kludge until the K053260 is emulated correctly */
+ timer_set(ATTOTIME_IN_USEC(50), NULL,0,nmi_callback); /* kludge until the K053260 is emulated correctly */
}
static READ8_HANDLER( pip_r )
diff --git a/src/mame/drivers/rpunch.c b/src/mame/drivers/rpunch.c
index 124830dbd8e..c52e71d90ea 100644
--- a/src/mame/drivers/rpunch.c
+++ b/src/mame/drivers/rpunch.c
@@ -187,7 +187,7 @@ static TIMER_CALLBACK( sound_command_w_callback )
static WRITE16_HANDLER( sound_command_w )
{
if (ACCESSING_LSB)
- timer_call_after_resynch(data & 0xff, sound_command_w_callback);
+ timer_call_after_resynch(NULL, data & 0xff, sound_command_w_callback);
}
diff --git a/src/mame/drivers/runaway.c b/src/mame/drivers/runaway.c
index 746ba84074f..87bac649499 100644
--- a/src/mame/drivers/runaway.c
+++ b/src/mame/drivers/runaway.c
@@ -41,13 +41,13 @@ static TIMER_CALLBACK( interrupt_callback )
scanline = 16;
}
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, interrupt_callback);
}
static MACHINE_RESET( runaway )
{
- timer_set(video_screen_get_time_until_pos(0, 16, 0), 16, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 16, 0), NULL, 16, interrupt_callback);
}
diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c
index 6450889d544..bf3e3dc9006 100644
--- a/src/mame/drivers/sbasketb.c
+++ b/src/mame/drivers/sbasketb.c
@@ -227,7 +227,7 @@ static GFXDECODE_START( sbasketb )
GFXDECODE_END
-struct VLM5030interface sbasketb_vlm5030_interface =
+static struct VLM5030interface sbasketb_vlm5030_interface =
{
REGION_SOUND1, /* memory region */
0 /* memory size */
diff --git a/src/mame/drivers/sbrkout.c b/src/mame/drivers/sbrkout.c
index 396094bce99..f7f8075dd47 100644
--- a/src/mame/drivers/sbrkout.c
+++ b/src/mame/drivers/sbrkout.c
@@ -77,7 +77,7 @@ static TIMER_CALLBACK( sbrkout_tones_4V )
static MACHINE_RESET( sbrkout )
{
- timer_pulse(TIME_4V, 0, sbrkout_tones_4V);
+ timer_pulse(TIME_4V, NULL, 0, sbrkout_tones_4V);
}
diff --git a/src/mame/drivers/scobra.c b/src/mame/drivers/scobra.c
index 78ac668a9c1..5b4d9dfbf72 100644
--- a/src/mame/drivers/scobra.c
+++ b/src/mame/drivers/scobra.c
@@ -1373,7 +1373,7 @@ MM_COMMON2
INPUT_PORTS_END
-struct AY8910interface scobra_ay8910_interface_2 =
+static struct AY8910interface scobra_ay8910_interface_2 =
{
soundlatch_r,
scramble_portB_r
diff --git a/src/mame/drivers/scramble.c b/src/mame/drivers/scramble.c
index a94aba164b5..2c1e8bc822a 100644
--- a/src/mame/drivers/scramble.c
+++ b/src/mame/drivers/scramble.c
@@ -1944,23 +1944,23 @@ static struct AY8910interface sfx_ay8910_interface_1 =
sfx_sh_irqtrigger_w
};
-struct AY8910interface explorer_ay8910_interface_1 =
+static struct AY8910interface explorer_ay8910_interface_1 =
{
scramble_portB_r
};
-struct AY8910interface explorer_ay8910_interface_2 =
+static struct AY8910interface explorer_ay8910_interface_2 =
{
hotshock_soundlatch_r
};
-struct AY8910interface hotshock_ay8910_interface_2 =
+static struct AY8910interface hotshock_ay8910_interface_2 =
{
hotshock_soundlatch_r,
scramble_portB_r
};
-struct AY8910interface scorpion_ay8910_interface_1 =
+static struct AY8910interface scorpion_ay8910_interface_1 =
{
0,
0,
@@ -1968,7 +1968,7 @@ struct AY8910interface scorpion_ay8910_interface_1 =
scorpion_sound_cmd_w,
};
-struct AY8910interface triplep_ay8910_interface =
+static struct AY8910interface triplep_ay8910_interface =
{
0
};
diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c
index 73772da946d..a35277a764f 100644
--- a/src/mame/drivers/seattle.c
+++ b/src/mame/drivers/seattle.c
@@ -541,10 +541,10 @@ static MACHINE_RESET( seattle )
cpunum_set_info_int(0, CPUINFO_INT_MIPS3_FASTRAM_READONLY, 1);
/* allocate timers for the galileo */
- galileo.timer[0].timer = timer_alloc(galileo_timer_callback);
- galileo.timer[1].timer = timer_alloc(galileo_timer_callback);
- galileo.timer[2].timer = timer_alloc(galileo_timer_callback);
- galileo.timer[3].timer = timer_alloc(galileo_timer_callback);
+ galileo.timer[0].timer = timer_alloc(galileo_timer_callback, NULL);
+ galileo.timer[1].timer = timer_alloc(galileo_timer_callback, NULL);
+ galileo.timer[2].timer = timer_alloc(galileo_timer_callback, NULL);
+ galileo.timer[3].timer = timer_alloc(galileo_timer_callback, NULL);
galileo.dma_active = -1;
vblank_irq_num = 0;
diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c
index 957e266752b..df2d224f6d0 100644
--- a/src/mame/drivers/segae.c
+++ b/src/mame/drivers/segae.c
@@ -305,7 +305,7 @@ covert megatech / megaplay drivers to use new code etc. etc.
//static UINT8* sms_rom;
static UINT8* sms_mainram;
//static UINT8* smsgg_backupram;
-static TIMER_CALLBACK_PTR( sms_scanline_timer_callback );
+static TIMER_CALLBACK( sms_scanline_timer_callback );
static struct sms_vdp *vdp2;
static struct sms_vdp *vdp1;
@@ -729,7 +729,7 @@ static void *start_vdp(running_machine *machine, int type)
chip->writemode = 0;
chip->r_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
- chip->sms_scanline_timer = timer_alloc_ptr(sms_scanline_timer_callback, chip);
+ chip->sms_scanline_timer = timer_alloc(sms_scanline_timer_callback, chip);
return chip;
}
@@ -737,7 +737,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_ptr(md_sms_vdp->sms_scanline_timer, attotime_never, attotime_never);
+ timer_adjust(md_sms_vdp->sms_scanline_timer, attotime_never, 0, attotime_never);
memset(md_sms_vdp->vram,0x00,0x4000);
}
@@ -1284,7 +1284,7 @@ static void sms_draw_scanline(int scanline, struct sms_vdp* chip)
}
-static TIMER_CALLBACK_PTR( sms_scanline_timer_callback )
+static TIMER_CALLBACK( sms_scanline_timer_callback )
{
/* This function is called at the very start of every scanline starting at the very
top-left of the screen. The first scanline is scanline 0 (we set scanline to -1 in
@@ -1299,12 +1299,12 @@ static TIMER_CALLBACK_PTR( sms_scanline_timer_callback )
The position to get the H position also has to compensate for a few errors
*/
// printf("num %d\n",num );
- struct sms_vdp *chip = param;
+ struct sms_vdp *chip = ptr;
if (chip->sms_scanline_counter<(chip->sms_total_scanlines-1))
{
chip->sms_scanline_counter++;
- timer_adjust_ptr(chip->sms_scanline_timer, ATTOTIME_IN_HZ(chip->sms_framerate * chip->sms_total_scanlines), attotime_zero);
+ timer_adjust(chip->sms_scanline_timer, ATTOTIME_IN_HZ(chip->sms_framerate * chip->sms_total_scanlines), 0, attotime_zero);
if (chip->sms_scanline_counter>sms_mode_table[chip->screen_mode].sms2_height)
{
@@ -1469,7 +1469,7 @@ static void end_of_frame(struct sms_vdp *chip)
chip->sms_scanline_counter = -1;
chip->yscroll = chip->regs[0x9]; // this can't change mid-frame
- timer_adjust_ptr(chip->sms_scanline_timer, attotime_zero, attotime_zero);
+ timer_adjust(chip->sms_scanline_timer, attotime_zero, 0, attotime_zero);
}
#ifdef UNUSED_FUNCTION
@@ -1491,7 +1491,7 @@ static VIDEO_START(sms)
#ifdef UNUSED_FUNCTION
MACHINE_RESET(sms)
{
- timer_adjust_ptr(vdp1->sms_scanline_timer, attotime_zero, attotime_zero);
+ timer_adjust(vdp1->sms_scanline_timer, attotime_zero, 0, attotime_zero);
}
#endif
@@ -1949,18 +1949,18 @@ static UINT8 f7_bank_value;
static MACHINE_RESET(systeme)
{
- timer_adjust_ptr(vdp1->sms_scanline_timer, attotime_zero, attotime_zero);
- timer_adjust_ptr(vdp2->sms_scanline_timer, attotime_zero, attotime_zero);
+ timer_adjust(vdp1->sms_scanline_timer, attotime_zero, 0, attotime_zero);
+ timer_adjust(vdp2->sms_scanline_timer, attotime_zero, 0, attotime_zero);
}
MACHINE_RESET(megatech_md_sms)
{
- timer_adjust_ptr(md_sms_vdp->sms_scanline_timer, attotime_zero, attotime_zero);
+ timer_adjust(md_sms_vdp->sms_scanline_timer, attotime_zero, 0, attotime_zero);
}
MACHINE_RESET(megatech_bios)
{
- timer_adjust_ptr(vdp1->sms_scanline_timer, attotime_zero, attotime_zero);
+ timer_adjust(vdp1->sms_scanline_timer, attotime_zero, 0, attotime_zero);
}
static VIDEO_EOF(systeme)
diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c
index 19f1a746937..1c95682dd3c 100644
--- a/src/mame/drivers/segahang.c
+++ b/src/mame/drivers/segahang.c
@@ -111,7 +111,7 @@ static MACHINE_RESET( hangon )
/* if we have a fake i8751 handler, disable the actual 8751 */
if (i8751_vblank_hook != NULL)
- timer_call_after_resynch(0, suspend_i8751);
+ timer_call_after_resynch(NULL, 0, suspend_i8751);
/* reset global state */
adc_select = 0;
@@ -171,7 +171,7 @@ static WRITE16_HANDLER( hangon_io_w )
case 0x0000/2: /* PPI @ 4B */
/* the port C handshaking signals control the Z80 NMI, */
/* so we have to sync whenever we access this PPI */
- timer_call_after_resynch(((offset & 3) << 8) | (data & 0xff), delayed_ppi8255_w);
+ timer_call_after_resynch(NULL, ((offset & 3) << 8) | (data & 0xff), delayed_ppi8255_w);
return;
case 0x3000/2: /* PPI @ 4C */
@@ -217,7 +217,7 @@ static WRITE16_HANDLER( sharrier_io_w )
case 0x0000/2:
/* the port C handshaking signals control the Z80 NMI, */
/* so we have to sync whenever we access this PPI */
- timer_call_after_resynch(((offset & 3) << 8) | (data & 0xff), delayed_ppi8255_w);
+ timer_call_after_resynch(NULL, ((offset & 3) << 8) | (data & 0xff), delayed_ppi8255_w);
return;
case 0x0020/2: /* PPI @ 4C */
@@ -890,7 +890,7 @@ static MACHINE_DRIVER_START( sound_board_2203 )
MDRV_CPU_PROGRAM_MAP(sound_map_2203,0)
MDRV_CPU_IO_MAP(sound_portmap_2203,0)
- /* soud hardware */
+ /* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
MDRV_SOUND_ADD(YM2203, MASTER_CLOCK_8MHz/2)
@@ -918,7 +918,7 @@ static MACHINE_DRIVER_START( sound_board_2203x2 )
MDRV_CPU_PROGRAM_MAP(sound_map_2151,0)
MDRV_CPU_IO_MAP(sound_portmap_2203x2,0)
- /* soud hardware */
+ /* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
MDRV_SOUND_ADD(YM2203, MASTER_CLOCK_8MHz/2)
@@ -956,7 +956,7 @@ static MACHINE_DRIVER_START( sound_board_2151 )
MDRV_CPU_PROGRAM_MAP(sound_map_2151,0)
MDRV_CPU_IO_MAP(sound_portmap_2151,0)
- /* soud hardware */
+ /* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
MDRV_SOUND_ADD(YM2151, MASTER_CLOCK_8MHz/2)
@@ -1033,7 +1033,7 @@ MACHINE_DRIVER_END
/**************************************************************************************************************************
**************************************************************************************************************************
**************************************************************************************************************************
- Hang On
+ Hang On (Rev A)
CPU: 68000 (317-????)
ASSY CPU BD 834-5704-01
@@ -1044,10 +1044,10 @@ MACHINE_DRIVER_END
*/
ROM_START( hangon )
ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
- ROM_LOAD16_BYTE( "epr-6918.ic22", 0x000000, 0x8000, CRC(20b1c2b0) SHA1(01b4f5105e2bbeb6ec6dbd18bfb728e3a973e0ca) ) /* Manual shows Rev A roms (Currently not dumped) */
- ROM_LOAD16_BYTE( "epr-6916.ic8", 0x000001, 0x8000, CRC(7d9db1bf) SHA1(952ee3e7a0d57ec1bb3385e0e6675890b8378d31) )
- ROM_LOAD16_BYTE( "epr-6917.ic20", 0x010000, 0x8000, CRC(fea12367) SHA1(9a1ce5863c562160b657ad948812b43f42d7d0cc) )
- ROM_LOAD16_BYTE( "epr-6915.ic6", 0x010001, 0x8000, CRC(ac883240) SHA1(f943341ae13e062f3d12c6221180086ce8bdb8c4) )
+ ROM_LOAD16_BYTE( "epr-6918a.ic22", 0x000000, 0x8000, CRC(20b1c2b0) SHA1(01b4f5105e2bbeb6ec6dbd18bfb728e3a973e0ca) )
+ ROM_LOAD16_BYTE( "epr-6916a.ic8", 0x000001, 0x8000, CRC(7d9db1bf) SHA1(952ee3e7a0d57ec1bb3385e0e6675890b8378d31) )
+ ROM_LOAD16_BYTE( "epr-6917a.ic20", 0x010000, 0x8000, CRC(fea12367) SHA1(9a1ce5863c562160b657ad948812b43f42d7d0cc) )
+ ROM_LOAD16_BYTE( "epr-6915a.ic6", 0x010001, 0x8000, CRC(ac883240) SHA1(f943341ae13e062f3d12c6221180086ce8bdb8c4) )
ROM_REGION( 0x40000, REGION_CPU2, 0 ) /* second 68000 CPU */
ROM_LOAD16_BYTE( "epr-6920.ic63", 0x0000, 0x8000, CRC(1c95013e) SHA1(8344ac953477279c2c701f984d98292a21dd2f7d) )
@@ -1092,6 +1092,63 @@ ROM_END
/**************************************************************************************************************************
**************************************************************************************************************************
**************************************************************************************************************************
+ Hang On
+ CPU: 68000 (317-????)
+
+ ASSY CPU BD 834-5704-01
+ ASSY CONTROL BD 834-5668
+ ASSY ROM BD 834-5669
+ ASSY SOUND BD 834-5670
+
+*/
+ROM_START( hangon1 )
+ ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
+ ROM_LOAD16_BYTE( "epr-6918.ic22", 0x000000, 0x8000, CRC(0bf4f2ac) SHA1(26c5bb6fe805644a8d427ad77814f4b0b1128b1a) )
+ ROM_LOAD16_BYTE( "epr-6916.ic8", 0x000001, 0x8000, CRC(06c21c8a) SHA1(f06f21ff272a803c72e5041534053494f055e466) )
+ ROM_LOAD16_BYTE( "epr-6917.ic20", 0x010000, 0x8000, CRC(f48a6cbc) SHA1(6437efaeb0e4cb727c03eb83678a9e107d244af1) )
+ ROM_LOAD16_BYTE( "epr-6915.ic6", 0x010001, 0x8000, CRC(75d3b5ee) SHA1(00948d0610f52b1b554cadde96227428e510e73e) )
+
+ ROM_REGION( 0x40000, REGION_CPU2, 0 ) /* second 68000 CPU */
+ ROM_LOAD16_BYTE( "epr-6920.ic63", 0x0000, 0x8000, CRC(1c95013e) SHA1(8344ac953477279c2c701f984d98292a21dd2f7d) )
+ ROM_LOAD16_BYTE( "epr-6919.ic51", 0x0001, 0x8000, CRC(6ca30d69) SHA1(ed933351883ebf6d9ef9428a81d09749b609cd60) )
+
+ ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
+ ROM_LOAD( "epr-6841.ic38", 0x00000, 0x08000, CRC(54d295dc) SHA1(ad8cdb281032a2f931c2abbeb966998944683dc3) )
+ ROM_LOAD( "epr-6842.ic23", 0x08000, 0x08000, CRC(f677b568) SHA1(636ca60bd4be9b5c2be09de8ae49db1063aa6c79) )
+ ROM_LOAD( "epr-6843.ic7", 0x10000, 0x08000, CRC(a257f0da) SHA1(9828f8ce4ef245ffb8dbad347f9ca74ed81aa998) )
+
+ ROM_REGION16_BE( 0x80000, REGION_GFX2, 0 ) /* sprites */
+ ROM_LOAD16_BYTE( "epr-6819.ic27", 0x000001, 0x8000, CRC(469dad07) SHA1(6d01c0b3506e28832928ad74d518577ff5be323b) )
+ ROM_LOAD16_BYTE( "epr-6820.ic34", 0x000000, 0x8000, CRC(87cbc6de) SHA1(b64652e062e1b88c6f6ae8dd2ffe4533bb27ba45) )
+ ROM_LOAD16_BYTE( "epr-6821.ic28", 0x010001, 0x8000, CRC(15792969) SHA1(b061dbf24e8b511116446794753c8b0cc49e2149) )
+ ROM_LOAD16_BYTE( "epr-6822.ic35", 0x010000, 0x8000, CRC(e9718de5) SHA1(30e3a7d5b33504da03c5780b4a946b977e46098a) )
+ ROM_LOAD16_BYTE( "epr-6823.ic29", 0x020001, 0x8000, CRC(49422691) SHA1(caee2a4a3f4587ae27dec330214edaa1229012af) )
+ ROM_LOAD16_BYTE( "epr-6824.ic36", 0x020000, 0x8000, CRC(701deaa4) SHA1(053032ef886b85a4cb4753d17b3c27d228695157) )
+ ROM_LOAD16_BYTE( "epr-6825.ic30", 0x030001, 0x8000, CRC(6e23c8b4) SHA1(b17fd7d590ed4e6616b7b4d91a47a2820248d8c7) )
+ ROM_LOAD16_BYTE( "epr-6826.ic37", 0x030000, 0x8000, CRC(77d0de2c) SHA1(83b126ed1d463504b2702391816e6e20dcd04ffc) )
+ ROM_LOAD16_BYTE( "epr-6827.ic31", 0x040001, 0x8000, CRC(7fa1bfb6) SHA1(a27b54c93613372f59050f0b2182d2984a8d2efe) )
+ ROM_LOAD16_BYTE( "epr-6828.ic38", 0x040000, 0x8000, CRC(8e880c93) SHA1(8c55deec065daf09a5d1c1c1f3f3f7bc1aeaf563) )
+ ROM_LOAD16_BYTE( "epr-6829.ic32", 0x050001, 0x8000, CRC(7ca0952d) SHA1(617d73591158ed3fea5174f7dabf0413d28de9b3) )
+ ROM_LOAD16_BYTE( "epr-6830.ic39", 0x050000, 0x8000, CRC(b1a63aef) SHA1(5db0a1cc2d13c6cfc77044f5d7f6f99d198531ed) )
+ ROM_LOAD16_BYTE( "epr-6845.ic18", 0x060001, 0x8000, CRC(ba08c9b8) SHA1(65ceaefa18999c468b38576c29101674d1f63e5f) )
+ ROM_LOAD16_BYTE( "epr-6846.ic25", 0x060000, 0x8000, CRC(f21e57a3) SHA1(92ce0723e722f446c0cef9e23080a008aa9752e7) )
+
+ ROM_REGION( 0x8000, REGION_GFX3, 0 ) /* road gfx */
+ ROM_LOAD( "epr-6840.ic108", 0x0000, 0x8000, CRC(581230e3) SHA1(954eab35059322a12a197bba04bf85f816132f20) )
+
+ ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* sound CPU */
+ ROM_LOAD( "epr-6833.ic73", 0x00000, 0x4000, CRC(3b942f5f) SHA1(4384b5c090954e69de561dde0ef32104aa11399a) )
+
+ ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* Sega PCM sound data */
+ ROM_LOAD( "epr-6831.ic5", 0x00000, 0x8000, CRC(cfef5481) SHA1(c04b302fee58f0e59a097b2be2b61e5d03df7c91) )
+ ROM_LOAD( "epr-6832.ic6", 0x08000, 0x8000, CRC(4165aea5) SHA1(be05c6d295807af2f396a1ff72d5a3d2a1e6054d) )
+
+ ROM_REGION( 0x2000, REGION_PROMS, 0 ) /* zoom table */
+ ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) )
+ROM_END
+/**************************************************************************************************************************
+ **************************************************************************************************************************
+ **************************************************************************************************************************
Super Hang On (bootleg upgrade)
CPU: 68000 (317-????)
*/
@@ -1673,7 +1730,8 @@ static DRIVER_INIT( endurob2 )
*
*************************************/
-GAME( 1985, hangon, 0, hangon, hangon, hangon, ROT0, "Sega", "Hang-On", 0 )
+GAME( 1985, hangon, 0, hangon, hangon, hangon, ROT0, "Sega", "Hang-On (Rev A)", 0 )
+GAME( 1985, hangon1, hangon, hangon, hangon, hangon, ROT0, "Sega", "Hang-On", 0 )
GAME( 1992, shangupb, shangon, shangupb, shangupb, hangon, ROT0, "bootleg", "Super Hang-On (Hang-On upgrade, bootleg)", 0 )
GAME( 1985, sharrier, 0, sharrier, sharrier, sharrier, ROT0, "Sega", "Space Harrier (Rev A, 8751 315-5163A)", 0 )
GAME( 1985, sharrir1, sharrier, sharrier, sharrier, sharrier, ROT0, "Sega", "Space Harrier (8751 315-5163)", 0 )
diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c
index c8c0916497f..0e71a72406e 100644
--- a/src/mame/drivers/segaorun.c
+++ b/src/mame/drivers/segaorun.c
@@ -128,7 +128,7 @@ static TIMER_CALLBACK( delayed_sound_data_w )
static void sound_data_w(UINT8 data)
{
- timer_call_after_resynch(data, delayed_sound_data_w);
+ timer_call_after_resynch(NULL, data, delayed_sound_data_w);
}
@@ -213,7 +213,7 @@ static TIMER_CALLBACK( scanline_callback )
case 65:
case 129:
case 193:
- timer_set(video_screen_get_time_until_pos(0, scanline, machine->screen[0].visarea.max_x + 1), 0, irq2_gen);
+ timer_set(video_screen_get_time_until_pos(0, scanline, machine->screen[0].visarea.max_x + 1), NULL, 0, irq2_gen);
next_scanline = scanline + 1;
break;
@@ -244,7 +244,7 @@ static TIMER_CALLBACK( scanline_callback )
update_main_irqs();
/* come back at the next targeted scanline */
- timer_set(video_screen_get_time_until_pos(0, next_scanline, 0), next_scanline, scanline_callback);
+ timer_set(video_screen_get_time_until_pos(0, next_scanline, 0), NULL, next_scanline, scanline_callback);
}
@@ -275,7 +275,7 @@ static MACHINE_RESET( outrun )
cpunum_set_info_fct(0, CPUINFO_PTR_M68K_RESET_CALLBACK, (genf *)outrun_reset);
/* start timers to track interrupts */
- timer_set(video_screen_get_time_until_pos(0, 223, 0), 223, scanline_callback);
+ timer_set(video_screen_get_time_until_pos(0, 223, 0), NULL, 223, scanline_callback);
}
diff --git a/src/mame/drivers/segas16a.c b/src/mame/drivers/segas16a.c
index f1d7e25699f..433a4be5ebd 100644
--- a/src/mame/drivers/segas16a.c
+++ b/src/mame/drivers/segas16a.c
@@ -240,7 +240,7 @@ static MACHINE_RESET( system16a )
/* if we have a fake i8751 handler, disable the actual 8751 */
if (i8751_vblank_hook != NULL)
- timer_call_after_resynch(0, suspend_i8751);
+ timer_call_after_resynch(NULL, 0, suspend_i8751);
}
@@ -285,7 +285,7 @@ static WRITE16_HANDLER( standard_io_w )
/* the port C handshaking signals control the Z80 NMI, */
/* so we have to sync whenever we access this PPI */
if (ACCESSING_LSB)
- timer_call_after_resynch(((offset & 3) << 8) | (data & 0xff), delayed_ppi8255_w);
+ timer_call_after_resynch(NULL, ((offset & 3) << 8) | (data & 0xff), delayed_ppi8255_w);
return;
}
logerror("%06X:standard_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask ^ 0xffff);
diff --git a/src/mame/drivers/segas16b.c b/src/mame/drivers/segas16b.c
index f292d602d50..bacd9112130 100644
--- a/src/mame/drivers/segas16b.c
+++ b/src/mame/drivers/segas16b.c
@@ -1063,7 +1063,7 @@ static MACHINE_RESET( system16b )
/* if we have a fake i8751 handler, disable the actual 8751 */
if (i8751_vblank_hook != NULL)
- timer_call_after_resynch(0, suspend_i8751);
+ timer_call_after_resynch(NULL, 0, suspend_i8751);
/* configure sprite banks */
for (i = 0; i < 16; i++)
@@ -1080,7 +1080,7 @@ static TIMER_CALLBACK( atomicp_sound_irq )
static MACHINE_RESET( atomicp )
{
machine_reset_system16b(machine);
- timer_pulse(ATTOTIME_IN_HZ(atomicp_sound_rate), 0, atomicp_sound_irq);
+ timer_pulse(ATTOTIME_IN_HZ(atomicp_sound_rate), NULL, 0, atomicp_sound_irq);
}
diff --git a/src/mame/drivers/segas18.c b/src/mame/drivers/segas18.c
index 6dff9a0fe11..e00b4394cd5 100644
--- a/src/mame/drivers/segas18.c
+++ b/src/mame/drivers/segas18.c
@@ -204,7 +204,7 @@ static MACHINE_RESET( system18 )
/* if we are running with a real live 8751, we need to boost the interleave at startup */
if (machine->drv->cpu[2].type == CPU_I8751)
- timer_call_after_resynch(0, boost_interleave);
+ timer_call_after_resynch(NULL, 0, boost_interleave);
}
diff --git a/src/mame/drivers/system24.c b/src/mame/drivers/segas24.c
index c5419539157..f50186afeb5 100644
--- a/src/mame/drivers/system24.c
+++ b/src/mame/drivers/segas24.c
@@ -333,7 +333,7 @@ Notes:
#include "driver.h"
#include "cpu/m68000/m68k.h"
-#include "system24.h"
+#include "segas24.h"
#include "system16.h"
#include "video/segaic24.h"
#include "sound/ym2151.h"
@@ -837,7 +837,7 @@ static void irq_init(void)
irq_allow1 = 0;
irq_timer_pend0 = 0;
irq_timer_pend1 = 0;
- irq_timer = timer_alloc(irq_timer_cb);
+ irq_timer = timer_alloc(irq_timer_cb, NULL);
}
static void irq_timer_reset(void)
@@ -912,7 +912,7 @@ static READ16_HANDLER(irq_r)
/* set a timer to generate an irq at the needed point */
if (ggground_kludge == 1)
{
- timer_set(ATTOTIME_IN_USEC(180000), 0, gground_generate_kludge_irq);
+ timer_set(ATTOTIME_IN_USEC(180000), NULL, 0, gground_generate_kludge_irq);
ggground_kludge = 0;
}
return 1;
@@ -936,7 +936,7 @@ static READ16_HANDLER(irq_r)
/* set a timer to generate an irq at the needed point */
if (ggground_kludge == 1)
{
- timer_set(ATTOTIME_IN_USEC(180000), 0, gground_generate_kludge_irq);
+ timer_set(ATTOTIME_IN_USEC(180000), NULL, 0, gground_generate_kludge_irq);
ggground_kludge = 0;
}
return 1;
@@ -1005,6 +1005,12 @@ f0-f3 ramprg
fc-ff ramhi
*/
+/*************************************
+ *
+ * CPU 1 memory handlers
+ *
+ *************************************/
+
static ADDRESS_MAP_START( system24_cpu1_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x140000) AM_ROM AM_SHARE(1)
AM_RANGE(0x080000, 0x0fffff) AM_RAM AM_SHARE(2)
@@ -1036,6 +1042,12 @@ AM_RANGE(0xd00300, 0xd00301) AM_WRITE(MWA16_NOP)
AM_RANGE(0xf80000, 0xffffff) AM_RAM AM_SHARE(2)
ADDRESS_MAP_END
+/*************************************
+ *
+ * CPU 2 memory handlers
+ *
+ *************************************/
+
static ADDRESS_MAP_START( system24_cpu2_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x03ffff) AM_RAM AM_SHARE(3) AM_BASE(&s24_mainram1) // RAM here overrides the ROM mirror
AM_RANGE(0x040000, 0x07ffff) AM_ROM AM_SHARE(1)
@@ -1070,6 +1082,12 @@ AM_RANGE(0xd00300, 0xd00301) AM_WRITE(MWA16_NOP)
ADDRESS_MAP_END
+/*************************************
+ *
+ * Game-specific driver inits
+ *
+ *************************************/
+
static DRIVER_INIT(qgh)
{
system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
@@ -1220,6 +1238,11 @@ static DRIVER_INIT(roughrac)
s24_fd1094_driver_init();
}
+/*************************************
+ *
+ * Generic driver initialization
+ *
+ *************************************/
static NVRAM_HANDLER(system24)
{
@@ -1242,84 +1265,126 @@ static MACHINE_RESET(system24)
mlatch = 0x00;
}
-static INPUT_PORTS_START( hotrod )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN4 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN5 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN6 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+/*************************************
+ *
+ * Generic port definitions
+ *
+ *************************************/
- PORT_START
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE3 )
- PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+static INPUT_PORTS_START( system24_P1_P2 )
+ PORT_START_TAG("P1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) //enabled with "Separate"
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
- PORT_START
- PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_START_TAG("P2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 ) //enabled with "Separate"
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+INPUT_PORTS_END
- SYS16_COINAGE
+static INPUT_PORTS_START( system24_Service )
+ PORT_START_TAG("SERVICE")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("All Service")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN4 )
+INPUT_PORTS_END
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
+static INPUT_PORTS_START( system24_DSW )
+ PORT_START_TAG("COINAGE")
+ PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4")
+ PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" )
+ PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" )
+ PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" )
+ PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" )
+ PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" )
+ PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" )
+ PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:5,6,7,8")
+ PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" )
+ PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" )
+ PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" )
+ PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" )
+ PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" )
+ PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" )
+
+ PORT_START_TAG("DSW")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "Start Credit" )
- PORT_DIPSETTING( 0x20, "1" )
- PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPNAME( 0x40, 0x40, "Coin Chute" )
- PORT_DIPSETTING( 0x40, "Separate" )
- PORT_DIPSETTING( 0x00, "Common" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
- PORT_START
- PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
-
- PORT_START
- PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
-
- PORT_START
- PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(3)
-
- PORT_START /* p4 not used on this set */
- PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START
- PORT_BIT( 0xff, 0x01, IPT_PEDAL ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
-
- PORT_START
- PORT_BIT( 0xff, 0x01, IPT_PEDAL ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
+static INPUT_PORTS_START( system24_generic )
+ PORT_INCLUDE( system24_P1_P2 )
+ PORT_INCLUDE( system24_Service )
+ PORT_INCLUDE( system24_DSW )
+INPUT_PORTS_END
- PORT_START
- PORT_BIT( 0xff, 0x01, IPT_PEDAL ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(3)
+/*************************************
+ *
+ * Game-specific port definitions
+ *
+ *************************************/
- PORT_START /* p4 not used on this set */
- PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED )
-INPUT_PORTS_END
+static INPUT_PORTS_START( hotrod )
+ PORT_INCLUDE( system24_generic )
-static INPUT_PORTS_START( hotrodj )
- PORT_START
+ PORT_MODIFY("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
@@ -1329,43 +1394,24 @@ static INPUT_PORTS_START( hotrodj )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN7 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN8 )
- PORT_START
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_MODIFY("P2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE3 )
- PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_SERVICE4 )
-
- PORT_START
- PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED )
-
- SYS16_COINAGE
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE4 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "Start Credit" )
- PORT_DIPSETTING( 0x04, "1" )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x20, 0x20, "Start Credit" ) PORT_DIPLOCATION("SWB:6")
+ PORT_DIPSETTING( 0x20, "1" )
PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPNAME( 0x08, 0x08, "Play Mode" )
- PORT_DIPSETTING( 0x08, "4 Player" )
- PORT_DIPSETTING( 0x00, "2 Player" )
- PORT_DIPNAME( 0x10, 0x10, "Game Style" )
- PORT_DIPSETTING( 0x10, "4 Sides" )
- PORT_DIPSETTING( 0x00, "2 Sides" )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Language ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Japanese ) )
- PORT_DIPSETTING( 0x00, DEF_STR( English ) )
- PORT_DIPNAME( 0x40, 0x40, "Coin Chute" )
+ PORT_DIPNAME( 0x40, 0x40, "Coin Chute" ) PORT_DIPLOCATION("SWB:7")
PORT_DIPSETTING( 0x40, "Separate" )
PORT_DIPSETTING( 0x00, "Common" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1394,182 +1440,91 @@ static INPUT_PORTS_START( hotrodj )
PORT_BIT( 0xff, 0x01, IPT_PEDAL ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(4)
INPUT_PORTS_END
-static INPUT_PORTS_START( bnzabros )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+static INPUT_PORTS_START( hotrodj )
+ PORT_INCLUDE( hotrod )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x04, 0x04, "Start Credit" ) PORT_DIPLOCATION("SWB:3")
+ PORT_DIPSETTING( 0x04, "1" )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPNAME( 0x08, 0x08, "Play Mode" ) PORT_DIPLOCATION("SWB:4")
+ PORT_DIPSETTING( 0x08, "4 Player" )
+ PORT_DIPSETTING( 0x00, "2 Player" )
+ PORT_DIPNAME( 0x10, 0x10, "Game Style" ) PORT_DIPLOCATION("SWB:5")
+ PORT_DIPSETTING( 0x10, "4 Sides" )
+ PORT_DIPSETTING( 0x00, "2 Sides" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Language ) ) PORT_DIPLOCATION("SWB:6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Japanese ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( English ) )
+INPUT_PORTS_END
- SYS16_COINAGE
+static INPUT_PORTS_START( bnzabros )
+ PORT_INCLUDE( system24_generic )
- PORT_START
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "Start Credit" )
+ PORT_DIPNAME( 0x02, 0x02, "Start Credit" ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x02, "1" )
PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPNAME( 0x04, 0x04, "Coin Chute" )
+ PORT_DIPNAME( 0x04, 0x04, "Coin Chute" ) PORT_DIPLOCATION("SWB:3")
PORT_DIPSETTING( 0x04, "Common" )
PORT_DIPSETTING( 0x00, "Individual" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:5,6")
PORT_DIPSETTING( 0x20, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:7,8")
+ PORT_DIPSETTING( 0x00, "1" )
+ PORT_DIPSETTING( 0x40, "2" )
PORT_DIPSETTING( 0xc0, "3" )
PORT_DIPSETTING( 0x80, "4" )
- PORT_DIPSETTING( 0x40, "2" )
- PORT_DIPSETTING( 0x00, "1" )
INPUT_PORTS_END
static INPUT_PORTS_START( crkdown )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("P1 Service") //enabled with "Separate"
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_INCLUDE( system24_generic )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("P2 Service") //enabled with "Separate"
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("All Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
-
- SYS16_COINAGE
-
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Coin Chute" )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x40, 0x40, "Coin Chute" ) PORT_DIPLOCATION("SWB:7")
PORT_DIPSETTING( 0x40, "Common" )
PORT_DIPSETTING( 0x00, "Separate" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( roughrac )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("P1 Service") //enabled with "Separate"
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_INCLUDE( system24_generic )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("P2 Service") //enabled with "Separate"
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("All Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
-
- SYS16_COINAGE
-
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x01, "Start Credit" ) PORT_DIPLOCATION("SWB:1")
+ PORT_DIPSETTING( 0x01, "1" )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Coin Chute" )
- PORT_DIPSETTING( 0x40, "Common" )
- PORT_DIPSETTING( 0x00, "Separate" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, "Game Instruction" ) PORT_DIPLOCATION("SWB:4")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:5,6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
+ PORT_DIPNAME( 0x40, 0x40, "Start Money" ) PORT_DIPLOCATION("SWB:7")
+ PORT_DIPSETTING( 0x40, "15000" )
+ PORT_DIPSETTING( 0x00, "20000" )
+ PORT_DIPNAME( 0x80, 0x80, "Start Intro" ) PORT_DIPLOCATION("SWB:8")
+ PORT_DIPSETTING( 0x80, "10" )
+ PORT_DIPSETTING( 0x00, "15" )
PORT_START
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
@@ -1579,198 +1534,181 @@ static INPUT_PORTS_START( roughrac )
INPUT_PORTS_END
static INPUT_PORTS_START( sspirits )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_INCLUDE( system24_generic )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- SYS16_COINAGE
-
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4")
+ PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x0c, "3" )
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x04, "5" )
- PORT_DIPSETTING( 0x00, "2" )
-
- PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) )
- PORT_DIPSETTING( 0x30, "600K" )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6")
PORT_DIPSETTING( 0x20, "500K" )
+ PORT_DIPSETTING( 0x30, "600K" )
PORT_DIPSETTING( 0x10, "800K" )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
-
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8")
PORT_DIPSETTING( 0x80, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
INPUT_PORTS_END
-
static INPUT_PORTS_START( qgh )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_INCLUDE( system24_generic )
- SYS16_COINAGE
-
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:3,4")
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
- PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x30, "5" )
- PORT_DIPSETTING( 0x20, "4" )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:5,6")
PORT_DIPSETTING( 0x10, "3" )
PORT_DIPSETTING( 0x00, "3" )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, "4" )
+ PORT_DIPSETTING( 0x30, "5" )
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( qsww )
+ PORT_INCLUDE( system24_generic )
+
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x01, "Start Credit" ) PORT_DIPLOCATION("SWB:1")
+ PORT_DIPSETTING( 0x01, "1" )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:5,6")
+ PORT_DIPSETTING( 0x10, "2" )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x30, "4" )
+ PORT_DIPSETTING( 0x20, "5" )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
INPUT_PORTS_END
-static INPUT_PORTS_START( dcclub )
- PORT_START
+static INPUT_PORTS_START( dcclub ) /* In the Japan set missing angle input */
+ PORT_INCLUDE( system24_generic )
+
+ PORT_MODIFY("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_START
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- SYS16_COINAGE
-
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, "Start Credit" )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x01, "Start Credit" ) PORT_DIPLOCATION("SWB:1")
PORT_DIPSETTING( 0x01, "1" )
PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "Timing Meter" )
+ PORT_DIPNAME( 0x08, 0x08, "Timing Meter" ) PORT_DIPLOCATION("SWB:4")
PORT_DIPSETTING( 0x08, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
- PORT_DIPNAME( 0x10, 0x10, "Initial Balls" )
- PORT_DIPSETTING( 0x10, "2" )
+ PORT_DIPNAME( 0x10, 0x10, "Initial Balls" ) PORT_DIPLOCATION("SWB:5")
PORT_DIPSETTING( 0x00, "1" )
- PORT_DIPNAME( 0x20, 0x20, "Balls Limit" )
- PORT_DIPSETTING( 0x20, "4" )
+ PORT_DIPSETTING( 0x10, "2" )
+ PORT_DIPNAME( 0x20, 0x20, "Balls Limit" ) PORT_DIPLOCATION("SWB:6")
PORT_DIPSETTING( 0x00, "3" )
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x20, "4" )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8")
PORT_DIPSETTING( 0x80, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_START
- PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x8f) PORT_SENSITIVITY(16) PORT_KEYDELTA(16) PORT_PLAYER(1)
+ PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_MINMAX(0x00,0x8f) PORT_SENSITIVITY(64) PORT_KEYDELTA(64) PORT_PLAYER(1)
INPUT_PORTS_END
-static INPUT_PORTS_START( quizmeku )
+static INPUT_PORTS_START( sgmast )
+ PORT_INCLUDE( system24_generic )
+
+ PORT_MODIFY("P1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ /* For select the power shot rotate the stick from up-left (max power) to up (minimum power) and relese */
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x01, "Start Credit" ) PORT_DIPLOCATION("SWB:1")
+ PORT_DIPSETTING( 0x01, "1" )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:3")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:2")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, "Gameplay" ) PORT_DIPLOCATION("SWB:4")
+ PORT_DIPSETTING( 0x08, "1 Hole 1 Credit" )
+ PORT_DIPSETTING( 0x00, "Lose Ball Game Over" )
+ PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:6,7,8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Easiest ) )
+ PORT_DIPSETTING( 0xa0, DEF_STR( Easier ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0xe0, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x60, "Little Hard" )
+ PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Harder ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( sgmastj )
+ PORT_INCLUDE( sgmast )
+
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
PORT_START
+ PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( quizmeku )
+ PORT_INCLUDE( system24_P1_P2 )
+
+ PORT_MODIFY("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
- PORT_START
+ PORT_MODIFY("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START4 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
- PORT_START
+ PORT_START_TAG("P3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
@@ -1780,147 +1718,146 @@ static INPUT_PORTS_START( quizmeku )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
-
- SYS16_COINAGE
+ PORT_INCLUDE( system24_Service )
+ PORT_INCLUDE( system24_DSW )
- PORT_START
- PORT_DIPNAME( 0x01, 0x00, "Play Mode" )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x00, "Play Mode" ) PORT_DIPLOCATION("SWB:1")
PORT_DIPSETTING( 0x01, "2 Player" )
PORT_DIPSETTING( 0x00, "4 Player" )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x0c, "3" )
+ PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4")
PORT_DIPSETTING( 0x08, "2" )
+ PORT_DIPSETTING( 0x0c, "3" )
PORT_DIPSETTING( 0x04, "4" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x10, 0x10, "Answer Counts" )
+ PORT_DIPNAME( 0x10, 0x10, "Answer Counts" ) PORT_DIPLOCATION("SWB:5")
PORT_DIPSETTING( 0x10, "Every" )
PORT_DIPSETTING( 0x00, "3" )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Easy ) )
PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( qrouka ) /* Missing stick input for the 3rd & 4th player */
+ PORT_INCLUDE( system24_generic )
+
+ PORT_MODIFY("P1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
+
+ PORT_MODIFY("P2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START4 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
+
+ PORT_MODIFY("SERVICE")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
+
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x00, "Play Mode" ) PORT_DIPLOCATION("SWB:1")
+ PORT_DIPSETTING( 0x01, "2 Player" )
+ PORT_DIPSETTING( 0x00, "4 Player" )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, "Coin Chute" ) PORT_DIPLOCATION("SWB:4")
+ PORT_DIPSETTING( 0x08, "Common" )
+ PORT_DIPSETTING( 0x00, "Separate" )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:5,6")
+ PORT_DIPSETTING( 0x10, "2" )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x30, "4" )
+ PORT_DIPSETTING( 0x20, "5" )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8")
PORT_DIPSETTING( 0x80, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
INPUT_PORTS_END
static INPUT_PORTS_START( mahmajn )
- PORT_START
+ PORT_START_TAG("MJ0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("A") PORT_CODE(KEYCODE_A)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("B") PORT_CODE(KEYCODE_B)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("C") PORT_CODE(KEYCODE_C)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("D") PORT_CODE(KEYCODE_D)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("MJ1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("E") PORT_CODE(KEYCODE_E)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("F") PORT_CODE(KEYCODE_F)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("G") PORT_CODE(KEYCODE_G)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("H") PORT_CODE(KEYCODE_H)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("MJ2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("I") PORT_CODE(KEYCODE_I)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("J") PORT_CODE(KEYCODE_J)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("K") PORT_CODE(KEYCODE_K)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("L") PORT_CODE(KEYCODE_L)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("MJ3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("M") PORT_CODE(KEYCODE_M)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("N") PORT_CODE(KEYCODE_N)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Chi") PORT_CODE(KEYCODE_SPACE)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pon") PORT_CODE(KEYCODE_LALT)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("MJ4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("MJ5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Kan") PORT_CODE(KEYCODE_LCONTROL)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Reach") PORT_CODE(KEYCODE_LSHIFT)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Ron") PORT_CODE(KEYCODE_Z)
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("P1")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("P2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- SYS16_COINAGE
+ PORT_INCLUDE( system24_Service )
+ PORT_INCLUDE( system24_DSW )
- PORT_START
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "Start Score" )
- PORT_DIPSETTING( 0x02, "3000" )
+ PORT_DIPNAME( 0x02, 0x02, "Start Score" ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x00, "2000" )
- PORT_DIPNAME( 0x0c, 0x0c, "Difficulty (computer)" )
- PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x02, "3000" )
+ PORT_DIPNAME( 0x0c, 0x0c, "Difficulty (computer)" ) PORT_DIPLOCATION("SWB:3,4")
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0x30, 0x30, "Difficulty (player)" )
- PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
+ PORT_DIPNAME( 0x30, 0x30, "Difficulty (player)" ) PORT_DIPLOCATION("SWB:5,6")
PORT_DIPSETTING( 0x20, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( gground )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("P1 Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_INCLUDE( system24_P1_P2 )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("P2 Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
-
- PORT_START
+ PORT_START_TAG("P3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
@@ -1930,112 +1867,93 @@ static INPUT_PORTS_START( gground )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("All Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
-
- SYS16_COINAGE
+ PORT_INCLUDE( system24_Service )
+ PORT_INCLUDE( system24_DSW )
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
+ PORT_MODIFY("DSW")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:3,4,5")
PORT_DIPSETTING( 0x00, DEF_STR( Easiest ) )
PORT_DIPSETTING( 0x10, DEF_STR( Easier ) )
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x18, "Little Easy" )
- PORT_DIPSETTING( 0x1c, "Moderate" )
+ PORT_DIPSETTING( 0x1c, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0c, "Little Hard" )
PORT_DIPSETTING( 0x14, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x04, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0x60, 0x60, "Time Limit Per Stage" )
+ PORT_DIPNAME( 0x60, 0x60, "Time Limit Per Stage" ) PORT_DIPLOCATION("SWB:6,7")
PORT_DIPSETTING( 0x20, DEF_STR( Easiest ) )
PORT_DIPSETTING( 0x40, DEF_STR( Easy ) )
- PORT_DIPSETTING( 0x60, "Moderate" )
+ PORT_DIPSETTING( 0x60, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
- PORT_DIPNAME( 0x80, 0x80, "Clock Of Time Limit" )
+ PORT_DIPNAME( 0x80, 0x80, "Clock Of Time Limit" ) PORT_DIPLOCATION("SWB:8")
PORT_DIPSETTING( 0x80, "1.00 sec" )
PORT_DIPSETTING( 0x00, "0.80 sec" )
INPUT_PORTS_END
-static INPUT_PORTS_START( ggroundj )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("P1 Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+/*************************************
+ *
+ * Sound definitions
+ *
+ *************************************/
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("P2 Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+static struct YM2151interface ym2151_interface =
+{
+ irq_ym
+};
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("P3 Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
+/*************************************
+ *
+ * Generic machine drivers
+ *
+ *************************************/
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("All Service")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+static MACHINE_DRIVER_START( system24 )
+ MDRV_CPU_ADD(M68000, 10000000)
+ MDRV_CPU_PROGRAM_MAP(system24_cpu1_map, 0)
+ MDRV_CPU_VBLANK_INT(irq_vbl, 2)
- SYS16_COINAGE
+ MDRV_CPU_ADD(M68000, 10000000)
+ MDRV_CPU_PROGRAM_MAP(system24_cpu2_map, 0)
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Easiest ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Easier ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Easy ) )
- PORT_DIPSETTING( 0x18, "Little Easy" )
- PORT_DIPSETTING( 0x1c, "Moderate" )
- PORT_DIPSETTING( 0x0c, "Little Hard" )
- PORT_DIPSETTING( 0x14, DEF_STR( Hard ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0x60, 0x60, "Time Limit Per Stage" )
- PORT_DIPSETTING( 0x20, DEF_STR( Easiest ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Easy ) )
- PORT_DIPSETTING( 0x60, "Moderate" )
- PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
- PORT_DIPNAME( 0x80, 0x80, "Clock Of Time Limit" )
- PORT_DIPSETTING( 0x80, "1.00 sec" )
- PORT_DIPSETTING( 0x00, "0.80 sec" )
-INPUT_PORTS_END
+ MDRV_SCREEN_REFRESH_RATE(58)
+ MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(100))
+ MDRV_INTERLEAVE(4)
+
+ MDRV_MACHINE_RESET(system24)
+ MDRV_NVRAM_HANDLER(system24)
+
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(62*8, 48*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1)
+ MDRV_PALETTE_LENGTH(8192*2)
+
+ MDRV_VIDEO_START(system24)
+ MDRV_VIDEO_UPDATE(system24)
+
+ MDRV_SPEAKER_STANDARD_STEREO("left", "right")
+
+ MDRV_SOUND_ADD(YM2151, 4000000)
+ MDRV_SOUND_CONFIG(ym2151_interface)
+ MDRV_SOUND_ROUTE(0, "left", 0.50)
+ MDRV_SOUND_ROUTE(1, "right", 0.50)
+
+ MDRV_SOUND_ADD(DAC, 0)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.50)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.50)
+MACHINE_DRIVER_END
+
+/*************************************
+ *
+ * ROM definition(s)
+ *
+ *************************************/
ROM_START( hotrod )
ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
@@ -2360,80 +2278,44 @@ ROM_START( roughrac )
ROM_LOAD( "ds3-5000-06b.img", 0x000000, 0x1c2000, CRC(a7fb2149) SHA1(c04266ae31700b085ab45606aed83019a563de70) )
ROM_END
-
-static struct YM2151interface ym2151_interface =
-{
- irq_ym
-};
-
-static MACHINE_DRIVER_START( system24 )
- MDRV_CPU_ADD(M68000, 10000000)
- MDRV_CPU_PROGRAM_MAP(system24_cpu1_map, 0)
- MDRV_CPU_VBLANK_INT(irq_vbl, 2)
-
- MDRV_CPU_ADD(M68000, 10000000)
- MDRV_CPU_PROGRAM_MAP(system24_cpu2_map, 0)
-
- MDRV_SCREEN_REFRESH_RATE(58)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(100))
- MDRV_INTERLEAVE(4)
-
- MDRV_MACHINE_RESET(system24)
- MDRV_NVRAM_HANDLER(system24)
-
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_SIZE(62*8, 48*8)
- MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1)
- MDRV_PALETTE_LENGTH(8192*2)
-
- MDRV_VIDEO_START(system24)
- MDRV_VIDEO_UPDATE(system24)
-
- MDRV_SPEAKER_STANDARD_STEREO("left", "right")
-
- MDRV_SOUND_ADD(YM2151, 4000000)
- MDRV_SOUND_CONFIG(ym2151_interface)
- MDRV_SOUND_ROUTE(0, "left", 0.50)
- MDRV_SOUND_ROUTE(1, "right", 0.50)
-
- MDRV_SOUND_ADD(DAC, 0)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.50)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.50)
-MACHINE_DRIVER_END
-
/* I think the letter after the disk code is the region
'b' = Japan
'c' = europe?
'd' = US
*/
+/*************************************
+ *
+ * Game driver(s)
+ *
+ *************************************/
+
/* Disk Based Games */
-/* 01 */GAME( 1988, hotrod, 0, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 1)", 0 )
-/* 01 */GAME( 1988, hotroda, hotrod, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 2)", GAME_NO_SOUND )
-/* 01 */GAME( 1988, hotrodj, hotrod, system24, hotrodj, hotrod, ROT0, "Sega", "Hot Rod (Japan, 4 Players)", GAME_NO_SOUND )
-/* 02 */GAME( 1988, sspirits, 0, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits", 0 )
-/* 02 */GAME( 1988, sspiritj, sspirits, system24, sspirits, sspiritj, ROT270, "Sega", "Scramble Spirits (Japan, Floppy DS3-5000-02-REV-A)", 0 )
-/* 02 */GAME( 1988, sspirtfc, sspirits, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (FD1094 317-0058-02c)",GAME_NOT_WORKING ) /* MISSING disk image */
-/* 03 */GAME( 1988, gground, 0, system24, gground, gground, ROT270, "Sega", "Gain Ground (World, FD1094 317-0058-03c?)", 0 )
-/* 03 */GAME( 1988, ggroundj, gground, system24, ggroundj, gground, ROT270, "Sega", "Gain Ground (Japan, FD1094 317-0058-03b)", 0 )
-/* 04 */GAME( 1989, crkdown, 0, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (World, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
-/* 04 */GAME( 1989, crkdownu, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (US, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
-/* 04 */GAME( 1989, crkdownj, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (Japan, FD1094 317-0058-04b)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
-/* 05 */GAME( 1989, sgmast, 0, system24, bnzabros, sgmast, ROT0, "Sega", "Super Masters Golf (FD1094 317-0058-05d?)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION ) // NOT decrypted
-/* 05 */GAME( 1989, sgmastc, sgmast, system24, bnzabros, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (World, FD1094 317-0058-05c)", GAME_NOT_WORKING ) // controls, some gfx offset / colour probs?
-/* 05 */GAME( 1989, sgmastj, sgmast, system24, bnzabros, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (Japan, FD1094 317-0058-05b)", GAME_NOT_WORKING ) // controls, some gfx offset / colour probs?
-/* 06 */GAME( 1990, roughrac, 0, system24, roughrac, roughrac, ROT0, "Sega", "Rough Racer (Japan, FD1094 317-0058-06b)", 0 )
-/* 07 */GAME( 1990, bnzabros, 0, system24, bnzabros, bnzabros, ROT0, "Sega", "Bonanza Bros (US, Floppy DS3-5000-07d?)", 0 )
-/* 07 */GAME( 1990, bnzabrsj, bnzabros, system24, bnzabros, bnzabros, ROT0, "Sega", "Bonanza Bros (Japan, Floppy DS3-5000-07b)", 0 )
-/* 08 */GAME( 1991, qsww, 0, system24, bnzabros, qsww, ROT0, "Sega", "Quiz Syukudai wo Wasuremashita (Japan, FD1094 317-0058-08b)", GAME_IMPERFECT_GRAPHICS ) // wrong bg colour on title
-/* 09 */GAME( 1991, dcclubfd, 0, system24, dcclub, dcclubfd, ROT0, "Sega", "Dynamic Country Club (FD1094 317-0058-09d)", 0 )
+/* 01 */GAME( 1988, hotrod, 0, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 1, Floppy Based)", 0 )
+/* 01 */GAME( 1988, hotroda, hotrod, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 2, Floppy Based)", GAME_NO_SOUND )
+/* 01 */GAME( 1988, hotrodj, hotrod, system24, hotrodj, hotrod, ROT0, "Sega", "Hot Rod (Japan, 4 Players, Floppy Based)", GAME_NO_SOUND )
+/* 02 */GAME( 1988, sspirits, 0, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based)", 0 )
+/* 02 */GAME( 1988, sspiritj, sspirits, system24, sspirits, sspiritj, ROT270, "Sega", "Scramble Spirits (Japan, Floppy DS3-5000-02-REV-A Based)", 0 )
+/* 02 */GAME( 1988, sspirtfc, sspirits, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World set 2?, Floppy Based, FD1094 317-0058-02c)",GAME_NOT_WORKING ) /* MISSING disk image */
+/* 03 */GAME( 1988, gground, 0, system24, gground, gground, ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03c?)", 0 )
+/* 03 */GAME( 1988, ggroundj, gground, system24, gground, gground, ROT270, "Sega", "Gain Ground (Japan, 2 Players, Floppy Based, FD1094 317-0058-03b)", 0 )
+/* 04 */GAME( 1989, crkdown, 0, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (World,Floppy Based, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
+/* 04 */GAME( 1989, crkdownu, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (US,Floppy Based, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
+/* 04 */GAME( 1989, crkdownj, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (Japan,Floppy Based, FD1094 317-0058-04b)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
+/* 05 */GAME( 1989, sgmast, 0, system24, sgmast, sgmast, ROT0, "Sega", "Super Masters Golf (World?, Floppy Based, FD1094 317-0058-05d?)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION ) // NOT decrypted
+/* 05 */GAME( 1989, sgmastc, sgmast, system24, sgmast, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (World, Floppy Based, FD1094 317-0058-05c)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
+/* 05 */GAME( 1989, sgmastj, sgmast, system24, sgmastj, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
+/* 06 */GAME( 1990, roughrac, 0, system24, roughrac, roughrac, ROT0, "Sega", "Rough Racer (Japan, Floppy Based, FD1094 317-0058-06b)", 0 )
+/* 07 */GAME( 1990, bnzabros, 0, system24, bnzabros, bnzabros, ROT0, "Sega", "Bonanza Bros (US, Floppy DS3-5000-07d? Based)", 0 )
+/* 07 */GAME( 1990, bnzabrsj, bnzabros, system24, bnzabros, bnzabros, ROT0, "Sega", "Bonanza Bros (Japan, Floppy DS3-5000-07b Based)", 0 )
+/* 08 */GAME( 1991, qsww, 0, system24, qsww, qsww, ROT0, "Sega", "Quiz Syukudai wo Wasuremashita (Japan, Floppy Based, FD1094 317-0058-08b)", GAME_IMPERFECT_GRAPHICS ) // wrong bg colour on title
+/* 09 */GAME( 1991, dcclubfd, dcclub, system24, dcclub, dcclubfd, ROT0, "Sega", "Dynamic Country Club (US, Floppy Based, FD1094 317-0058-09d)", 0 )
/* ROM Based */
-GAME( 1991, dcclub, 0, system24, dcclub, dcclub, ROT0, "Sega", "Dynamic Country Club", 0 )
-GAME( 1991, dcclubj, dcclub, system24, dcclub, dcclub, ROT0, "Sega", "Dynamic Country Club (Japan)", 0 )
-GAME( 1992, mahmajn, 0, system24, mahmajn, mahmajn, ROT0, "Sega", "Tokoro San no MahMahjan", 0 )
-GAME( 1994, qgh, 0, system24, qgh, qgh, ROT0, "Sega", "Quiz Ghost Hunter", 0 )
-GAME( 1994, quizmeku, 0, system24, quizmeku, quizmeku, ROT0, "Sega", "Quiz Mekurumeku Story", 0 )
-GAME( 1994, qrouka, 0, system24, qgh, qrouka, ROT0, "Sega", "Quiz Rouka Ni Tattenasai", 0 )
-GAME( 1994, mahmajn2, 0, system24, mahmajn, mahmajn2, ROT0, "Sega", "Tokoro San no MahMahjan 2", 0 )
+GAME( 1991, dcclub, 0, system24, dcclub, dcclub, ROT0, "Sega", "Dynamic Country Club (World, ROM Based)", 0 )
+GAME( 1991, dcclubj, dcclub, system24, dcclub, dcclub, ROT0, "Sega", "Dynamic Country Club (Japan, ROM Based)", 0 )
+GAME( 1992, mahmajn, 0, system24, mahmajn, mahmajn, ROT0, "Sega", "Tokoro San no MahMahjan (Japan, ROM Based)", 0 )
+GAME( 1994, qgh, 0, system24, qgh, qgh, ROT0, "Sega", "Quiz Ghost Hunter (Japan, ROM Based)", 0 )
+GAME( 1994, quizmeku, 0, system24, quizmeku, quizmeku, ROT0, "Sega", "Quiz Mekurumeku Story (Japan, ROM Based)", 0 )
+GAME( 1994, qrouka, 0, system24, qrouka, qrouka, ROT0, "Sega", "Quiz Rouka Ni Tattenasai (Japan, ROM Based)", 0 )
+GAME( 1994, mahmajn2, 0, system24, mahmajn, mahmajn2, ROT0, "Sega", "Tokoro San no MahMahjan 2 (Japan, ROM Based)", 0 )
diff --git a/src/mame/drivers/segas32.c b/src/mame/drivers/segas32.c
index 0f5ead5de23..1a32c3fa6d0 100644
--- a/src/mame/drivers/segas32.c
+++ b/src/mame/drivers/segas32.c
@@ -392,8 +392,8 @@ static MACHINE_RESET( system32 )
memset(v60_irq_control, 0xff, sizeof(v60_irq_control));
/* allocate timers */
- v60_irq_timer[0] = timer_alloc(signal_v60_irq_callback);
- v60_irq_timer[1] = timer_alloc(signal_v60_irq_callback);
+ v60_irq_timer[0] = timer_alloc(signal_v60_irq_callback, NULL);
+ v60_irq_timer[1] = timer_alloc(signal_v60_irq_callback, NULL);
/* clear IRQ lines */
cpunum_set_input_line(0, 0, CLEAR_LINE);
@@ -571,7 +571,7 @@ static INTERRUPT_GEN( start_of_vblank_int )
{
signal_v60_irq(MAIN_IRQ_VBSTART);
system32_set_vblank(1);
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, end_of_vblank_int);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, end_of_vblank_int);
if (system32_prot_vblank)
(*system32_prot_vblank)();
}
diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c
index 14726b3aeb2..17512373d25 100644
--- a/src/mame/drivers/segaxbd.c
+++ b/src/mame/drivers/segaxbd.c
@@ -150,7 +150,7 @@ static TIMER_CALLBACK( scanline_callback )
update_main_irqs();
/* come back in 2 scanlines */
- timer_set(video_screen_get_time_until_pos(0, next_scanline, 0), next_scanline, scanline_callback);
+ timer_set(video_screen_get_time_until_pos(0, next_scanline, 0), NULL, next_scanline, scanline_callback);
}
@@ -178,7 +178,7 @@ static TIMER_CALLBACK( delayed_sound_data_w )
static void sound_data_w(UINT8 data)
{
- timer_call_after_resynch(data, delayed_sound_data_w);
+ timer_call_after_resynch(NULL, data, delayed_sound_data_w);
}
@@ -222,7 +222,7 @@ static MACHINE_RESET( xboard )
segaic16_compare_timer_init(1, NULL, NULL);
/* start timers to track interrupts */
- timer_set(video_screen_get_time_until_pos(0, 1, 0), 1, scanline_callback);
+ timer_set(video_screen_get_time_until_pos(0, 1, 0), NULL, 1, scanline_callback);
}
diff --git a/src/mame/drivers/segaybd.c b/src/mame/drivers/segaybd.c
index d863c1548dc..019c42ba79e 100644
--- a/src/mame/drivers/segaybd.c
+++ b/src/mame/drivers/segaybd.c
@@ -184,7 +184,7 @@ static TIMER_CALLBACK( scanline_callback )
static MACHINE_RESET( yboard )
{
- interrupt_timer = timer_alloc(scanline_callback);
+ interrupt_timer = timer_alloc(scanline_callback, NULL);
timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 223, 0), 223, attotime_zero);
state_save_register_global_array(misc_io_data);
@@ -217,7 +217,7 @@ static TIMER_CALLBACK( delayed_sound_data_w )
static WRITE16_HANDLER( sound_data_w )
{
if (ACCESSING_LSB)
- timer_call_after_resynch(data & 0xff, delayed_sound_data_w);
+ timer_call_after_resynch(NULL, data & 0xff, delayed_sound_data_w);
}
diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c
index 2d84e5f216f..74e0a80b554 100644
--- a/src/mame/drivers/seta.c
+++ b/src/mame/drivers/seta.c
@@ -1287,7 +1287,7 @@ static void uPD71054_timer_init( void )
uPD71054.max[no] = 0xffff;
}
for( no = 0; no < USED_TIMER_NUM; no++ ) {
- uPD71054.timer[no] = timer_alloc( uPD71054_timer_callback );
+ uPD71054.timer[no] = timer_alloc( uPD71054_timer_callback , NULL);
}
}
diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c
index 71e8de8e370..3b06ea6a227 100644
--- a/src/mame/drivers/simpsons.c
+++ b/src/mame/drivers/simpsons.c
@@ -85,7 +85,7 @@ static WRITE8_HANDLER( z80_arm_nmi_w )
{
// sound_nmi_enabled = 1;
cpunum_set_input_line(1, INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(ATTOTIME_IN_USEC(25),0,nmi_callback); /* kludge until the K053260 is emulated correctly */
+ timer_set(ATTOTIME_IN_USEC(25), NULL,0,nmi_callback); /* kludge until the K053260 is emulated correctly */
}
static ADDRESS_MAP_START( z80_map, ADDRESS_SPACE_PROGRAM, 8 )
@@ -266,7 +266,7 @@ static INTERRUPT_GEN( simpsons_irq )
simpsons_objdma();
// 32+256us delay at 8MHz dotclock; artificially shortened since actual V-blank length is unknown
- timer_set(ATTOTIME_IN_USEC(30), 0, dmaend_callback);
+ timer_set(ATTOTIME_IN_USEC(30), NULL, 0, dmaend_callback);
}
if (K052109_is_IRQ_enabled())
diff --git a/src/mame/drivers/skullxbo.c b/src/mame/drivers/skullxbo.c
index 6a443f9eccc..294d5d33d0d 100644
--- a/src/mame/drivers/skullxbo.c
+++ b/src/mame/drivers/skullxbo.c
@@ -63,7 +63,7 @@ static void alpha_row_update(running_machine *machine, int scrnum, int scanline)
if (check < &atarigen_alpha[0x7c0] && (*check & 0x8000))
{
attotime period = video_screen_get_time_until_pos(scrnum, video_screen_get_vpos(scrnum) + 6, machine->screen[scrnum].width * 0.9);
- timer_set(period, 0, irq_gen);
+ timer_set(period, NULL, 0, irq_gen);
}
/* update the playfield and motion objects */
diff --git a/src/mame/drivers/skykid.c b/src/mame/drivers/skykid.c
index 9f847b1dc0f..d4aae3a6906 100644
--- a/src/mame/drivers/skykid.c
+++ b/src/mame/drivers/skykid.c
@@ -166,7 +166,7 @@ static INPUT_PORTS_START( skykid )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "Round Select" )
+ PORT_DIPNAME( 0x08, 0x08, "Round Skip" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "Freeze" )
@@ -234,6 +234,85 @@ static INPUT_PORTS_START( skykid )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
+static INPUT_PORTS_START( skykids )
+ PORT_START /* DSW A */
+ PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
+ PORT_DIPNAME( 0x60, 0x60, DEF_STR( Coin_A ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x60, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, "Round Select" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, "Freeze" )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
+
+ PORT_START /* DSW B */
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x80, "1" )
+ PORT_DIPSETTING( 0x40, "2" )
+ PORT_DIPSETTING( 0xc0, "3" )
+ PORT_DIPSETTING( 0x00, "5" )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x00, "30k every 80k" )
+ PORT_DIPSETTING( 0x10, "30k and 80k" )
+ PORT_DIPSETTING( 0x20, "40k every 90k" )
+ PORT_DIPSETTING( 0x30, "40k and 90k" )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, "Allow Buy In" )
+ PORT_DIPSETTING( 0x00, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( Yes ) )
+ PO