summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2007-12-17 16:37:57 +0000
committer 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 ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_START
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START /* IN 0 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START /* IN 1 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START /* IN 2 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
+INPUT_PORTS_END
+
static INPUT_PORTS_START( drgnbstr )
PORT_START /* DSW A */
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
@@ -499,6 +578,36 @@ ROM_START( skykidd )
ROM_LOAD( "sk1-5.6n", 0x0500, 0x0200, CRC(161514a4) SHA1(4488ce60d12be6586e4a1ddbbfd06bf4e7dfaceb) ) /* sprites lookup table */
ROM_END
+ROM_START( skykids )
+ ROM_REGION( 0x14000, REGION_CPU1, 0 ) /* 6809 code */
+ ROM_LOAD( "sk2a.6c", 0x08000, 0x4000, CRC(68492672) SHA1(3dbe5ec930de5c526d3ef65513993c10f2153a36) )
+ ROM_LOAD( "sk1a.6b", 0x0c000, 0x4000, CRC(e16abe25) SHA1(78e0d30b15fb62c4399d847784ddc61f6819feba) )
+ ROM_LOAD( "sk1_3.6d", 0x10000, 0x4000, CRC(314b8765) SHA1(d90a8a853ce672fe5ee190f07bcb33262c73df3b) ) /* banked ROM */
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* MCU code */
+ ROM_LOAD( "sk2_4.3c", 0x8000, 0x2000, CRC(a460d0e0) SHA1(7124ffeb3b84b282940dcbf9421ae4934bcce1c8) ) /* subprogram for the MCU */
+ ROM_LOAD( "cus63-63a1.mcu", 0xf000, 0x1000, CRC(6ef08fb3) SHA1(4842590d60035a0059b0899eb2d5f58ae72c2529) ) /* MCU internal code */
+
+ ROM_REGION( 0x02000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "sk1_6.6l", 0x0000, 0x2000, CRC(58b731b9) SHA1(40f7be85914833ce02a734c20d68c0db8b77911d) ) /* chars */
+
+ ROM_REGION( 0x02000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "sk1_5.7e", 0x0000, 0x2000, CRC(c33a498e) SHA1(9f89a514888418a9bebbca341a8cc66e41b58acb) )
+
+ ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "sk1_8.10n", 0x0000, 0x4000, CRC(44bb7375) SHA1(5b2fa6782671150bab5f3c3ac46b47bc23f3d7e0) ) /* sprites */
+ ROM_LOAD( "sk1_7.10m", 0x4000, 0x4000, CRC(3454671d) SHA1(723b26a0f208addc2a22736457cb4be6ab6c69cc) )
+ /* 0x8000-0xbfff will be unpacked from 0x4000-0x5fff */
+ ROM_FILL( 0xc000, 0x4000, 0x00 ) // part of the gfx is 2bpp decoded as 3bpp
+
+ ROM_REGION( 0x0700, REGION_PROMS, 0 )
+ ROM_LOAD( "sk1-1.2n", 0x0000, 0x0100, CRC(0218e726) SHA1(8b766162a4783c058d9a1ecf8741673d7ef955fb) ) /* red component */
+ ROM_LOAD( "sk1-2.2p", 0x0100, 0x0100, CRC(fc0d5b85) SHA1(d1b13e42e735b24594cf0b840dee8110de23369e) ) /* green component */
+ ROM_LOAD( "sk1-3.2r", 0x0200, 0x0100, CRC(d06b620b) SHA1(968a2d62c65e201d521e9efa8fcf6ad15898e4b3) ) /* blue component */
+ ROM_LOAD( "sk1-4.5n", 0x0300, 0x0200, CRC(c697ac72) SHA1(3b79755e6cbb22c14fc4affdbd3f4521da1d90e8) ) /* tiles lookup table */
+ ROM_LOAD( "sk1-5.6n", 0x0500, 0x0200, CRC(161514a4) SHA1(4488ce60d12be6586e4a1ddbbfd06bf4e7dfaceb) ) /* sprites lookup table */
+ROM_END
+
ROM_START( drgnbstr )
ROM_REGION( 0x14000, REGION_CPU1, 0 ) /* 6809 code */
ROM_LOAD( "db1_2b.6c", 0x08000, 0x04000, CRC(0f11cd17) SHA1(691d853f4f08898ecf4bccfb70a568de309329f1) )
@@ -551,3 +660,7 @@ GAME( 1984, drgnbstr, 0, skykid, drgnbstr, skykid, ROT0, "Namco", "Drago
GAME( 1985, skykid, 0, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (New Ver.)", GAME_SUPPORTS_SAVE ) /* Uses CUS63 aka 63a1 */
GAME( 1985, skykido, skykid, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (Old Ver.)", GAME_SUPPORTS_SAVE ) /* Uses CUS63 aka 63a1 */
GAME( 1985, skykidd, skykid, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (CUS60 Ver.)", GAME_SUPPORTS_SAVE ) /* Uses CUS60 aka 60a1 */
+
+// no license text is displayed but the PCB was licensed by Namco for production by Sipem (formerly Sidam) with Namco supplying the Custom chips (MCU etc.)
+// the level select is handled in a much more user-friendly way in this set and the dip for it is inverted (although this is displayed incorrectly in the test mode)
+GAME( 1985, skykids, skykid, skykid, skykids, skykid, ROT180, "Namco [Sipem license]", "Sky Kid (Manufactured by Sipem)", GAME_SUPPORTS_SAVE ) /* Uses CUS63 aka 63a1 */
diff --git a/src/mame/drivers/slapshot.c b/src/mame/drivers/slapshot.c
index 06ff98bbdf6..75ae3a5c70e 100644
--- a/src/mame/drivers/slapshot.c
+++ b/src/mame/drivers/slapshot.c
@@ -187,7 +187,7 @@ static TIMER_CALLBACK( slapshot_interrupt6 )
static INTERRUPT_GEN( slapshot_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(200000-500,0),0, slapshot_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(200000-500,0), NULL, 0, slapshot_interrupt6);
cpunum_set_input_line(0,5,HOLD_LINE);
}
diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c
index ba27ebf7c10..5a3866c32a8 100644
--- a/src/mame/drivers/snk.c
+++ b/src/mame/drivers/snk.c
@@ -236,13 +236,13 @@ static TIMER_CALLBACK( irq_trigger_callback ) { cpunum_set_input_line(param, 0,
INTERRUPT_GEN( snk_irq_AB )
{
cpunum_set_input_line(0, 0, HOLD_LINE);
- timer_set(ATTOTIME_IN_USEC(snk_irq_delay), 1, irq_trigger_callback);
+ timer_set(ATTOTIME_IN_USEC(snk_irq_delay), NULL, 1, irq_trigger_callback);
}
INTERRUPT_GEN( snk_irq_BA )
{
cpunum_set_input_line(1, 0, HOLD_LINE);
- timer_set(ATTOTIME_IN_USEC(snk_irq_delay), 0, irq_trigger_callback);
+ timer_set(ATTOTIME_IN_USEC(snk_irq_delay), NULL, 0, irq_trigger_callback);
}
// NMI handshakes between CPUs are determined to be much simpler
diff --git a/src/mame/drivers/spacefb.c b/src/mame/drivers/spacefb.c
index c32a34baac3..8813caa0692 100644
--- a/src/mame/drivers/spacefb.c
+++ b/src/mame/drivers/spacefb.c
@@ -141,7 +141,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/sprint4.c b/src/mame/drivers/sprint4.c
index e1a22953d42..51fdcc6b5b7 100644
--- a/src/mame/drivers/sprint4.c
+++ b/src/mame/drivers/sprint4.c
@@ -122,13 +122,13 @@ static TIMER_CALLBACK( nmi_callback )
cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
}
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, nmi_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, nmi_callback);
}
static MACHINE_RESET( sprint4 )
{
- timer_set(video_screen_get_time_until_pos(0, 32, 0), 32, nmi_callback);
+ timer_set(video_screen_get_time_until_pos(0, 32, 0), NULL, 32, nmi_callback);
memset(steer_FF1, 0, sizeof steer_FF1);
memset(steer_FF2, 0, sizeof steer_FF2);
diff --git a/src/mame/drivers/sprint8.c b/src/mame/drivers/sprint8.c
index 4cc93543c64..b0af0086ce5 100644
--- a/src/mame/drivers/sprint8.c
+++ b/src/mame/drivers/sprint8.c
@@ -117,7 +117,7 @@ static MACHINE_RESET( sprint8 )
collision_reset = 0;
collision_index = 0;
- timer_pulse(video_screen_get_frame_period(0), 0, input_callback);
+ timer_pulse(video_screen_get_frame_period(0), NULL, 0, input_callback);
}
diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c
index ff38ccb78c3..eb976849b06 100644
--- a/src/mame/drivers/ssfindo.c
+++ b/src/mame/drivers/ssfindo.c
@@ -705,15 +705,15 @@ ROM_END
static DRIVER_INIT(ssfindo)
{
flashType=0;
- PS7500timer0 = timer_alloc(PS7500_Timer0_callback);
- PS7500timer1 = timer_alloc(PS7500_Timer1_callback);
+ PS7500timer0 = timer_alloc(PS7500_Timer0_callback, NULL);
+ PS7500timer1 = timer_alloc(PS7500_Timer1_callback, NULL);
}
static DRIVER_INIT(ppcar)
{
flashType=1;
- PS7500timer0 = timer_alloc(PS7500_Timer0_callback);
- PS7500timer1 = timer_alloc(PS7500_Timer1_callback);
+ PS7500timer0 = timer_alloc(PS7500_Timer0_callback, NULL);
+ PS7500timer1 = timer_alloc(PS7500_Timer1_callback, NULL);
}
GAME( 1999, ssfindo, 0, ssfindo, ssfindo, ssfindo, ROT0, "Icarus", "See See Find Out", GAME_NO_SOUND )
diff --git a/src/mame/drivers/sslam.c b/src/mame/drivers/sslam.c
index 076679a2aa6..b1ffd4349d5 100644
--- a/src/mame/drivers/sslam.c
+++ b/src/mame/drivers/sslam.c
@@ -958,7 +958,7 @@ static DRIVER_INIT( sslam )
state_save_register_global(sslam_bar);
state_save_register_global(sslam_snd_bank);
- music_timer = timer_alloc(music_playback);
+ music_timer = timer_alloc(music_playback, NULL);
}
static DRIVER_INIT( powerbls )
diff --git a/src/mame/drivers/ssv.c b/src/mame/drivers/ssv.c
index cfd3629ab7f..710534b9f92 100644
--- a/src/mame/drivers/ssv.c
+++ b/src/mame/drivers/ssv.c
@@ -1000,7 +1000,7 @@ static WRITE32_HANDLER(latch32_w)
if(!offset)
latches[2]|=1;
COMBINE_DATA(&latches[offset]);
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
}
static READ16_HANDLER(latch16_r)
@@ -1015,7 +1015,7 @@ static WRITE16_HANDLER(latch16_w)
if(!offset)
latches[2]|=2;
latches[offset]=data;
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
}
static ADDRESS_MAP_START( jsk_readmem, ADDRESS_SPACE_PROGRAM, 16 )
diff --git a/src/mame/drivers/st0016.c b/src/mame/drivers/st0016.c
index a96553e9df3..4d97880ab4e 100644
--- a/src/mame/drivers/st0016.c
+++ b/src/mame/drivers/st0016.c
@@ -105,7 +105,7 @@ static WRITE32_HANDLER(latch32_w)
if(!offset)
latches[2]|=1;
COMBINE_DATA(&latches[offset]);
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
}
static READ8_HANDLER(latch8_r)
@@ -120,7 +120,7 @@ static WRITE8_HANDLER(latch8_w)
if(!offset)
latches[2]|=2;
latches[offset]=data;
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
}
static ADDRESS_MAP_START( v810_mem,ADDRESS_SPACE_PROGRAM, 32 )
diff --git a/src/mame/drivers/starfire.c b/src/mame/drivers/starfire.c
index 94332335de2..2f9291e0398 100644
--- a/src/mame/drivers/starfire.c
+++ b/src/mame/drivers/starfire.c
@@ -74,13 +74,13 @@ static TIMER_CALLBACK( update_callback )
scanline += SCANLINE_UPDATE_CHUNK;
if (scanline >= machine->screen[0].height)
scanline = 32;
- timer_set(video_screen_get_time_until_pos(0, scanline + SCANLINE_UPDATE_CHUNK - 1, 0), scanline, update_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline + SCANLINE_UPDATE_CHUNK - 1, 0), NULL, scanline, update_callback);
}
static MACHINE_RESET( starfire )
{
- timer_set(video_screen_get_time_until_pos(0, 32 + SCANLINE_UPDATE_CHUNK - 1, 0), 32, update_callback);
+ timer_set(video_screen_get_time_until_pos(0, 32 + SCANLINE_UPDATE_CHUNK - 1, 0), NULL, 32, update_callback);
}
diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c
index 2820d48caa1..3e20a72120a 100644
--- a/src/mame/drivers/stv.c
+++ b/src/mame/drivers/stv.c
@@ -2642,8 +2642,8 @@ static GFXDECODE_START( stv )
GFXDECODE_END
-struct sh2_config sh2_conf_master = { 0 };
-struct sh2_config sh2_conf_slave = { 1 };
+static struct sh2_config sh2_conf_master = { 0 };
+static struct sh2_config sh2_conf_slave = { 1 };
static int scsp_last_line = 0;
diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c
index e76494b01a3..ab3ce120c2b 100644
--- a/src/mame/drivers/supbtime.c
+++ b/src/mame/drivers/supbtime.c
@@ -468,6 +468,26 @@ ROM_START( supbtime )
ROM_LOAD( "gc05.bin", 0x00000, 0x20000, CRC(2f2246ff) SHA1(3fcceb6f5aa5f33187bcf4c59d88327f396fa80d) )
ROM_END
+/* is this actually a good dump?, there are no backgrounds ingame! */
+ROM_START( supbtima )
+ ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
+ ROM_LOAD16_BYTE( "3.11f", 0x00000, 0x20000, CRC(98b5f263) SHA1(ee4b0d2fcdc95aba0e78d066bd6c4d553a902848) )
+ ROM_LOAD16_BYTE( "4.12f", 0x00001, 0x20000, CRC(937e68b9) SHA1(4779e150518b9014c2154f33d38767c6a7447334) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */
+ ROM_LOAD( "gc06.bin", 0x00000, 0x10000, CRC(e0e6c0f4) SHA1(5a8b29752c58ea76d9c7961c5b0d8c94f35037af) )
+
+ ROM_REGION( 0x080000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "mae02.bin", 0x000000, 0x80000, CRC(a715cca0) SHA1(0539bba39c60324d85599ac69ff78bb215deb511) ) /* chars */
+
+ ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD16_BYTE( "mae00.bin", 0x000001, 0x80000, CRC(30043094) SHA1(5302cfd9bdaf90c4901fda75407379c4ce1cbdec) ) /* sprites */
+ ROM_LOAD16_BYTE( "mae01.bin", 0x000000, 0x80000, CRC(434af3fb) SHA1(1cfd30d14f03554e826576d6d32ce424f0df3748) )
+
+ ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* ADPCM samples */
+ ROM_LOAD( "gc05.bin", 0x00000, 0x20000, CRC(2f2246ff) SHA1(3fcceb6f5aa5f33187bcf4c59d88327f396fa80d) )
+ROM_END
+
ROM_START( supbtimj )
ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "gc03.bin", 0x00000, 0x20000, CRC(b5621f6a) SHA1(2dfd361e81dc4805bc248cc293d94131162df2d2) )
@@ -508,6 +528,7 @@ ROM_END
/******************************************************************************/
-GAME( 1990, supbtime, 0, supbtime, supbtime, 0, ROT0, "Data East Corporation", "Super Burger Time (World)", 0 )
+GAME( 1990, supbtime, 0, supbtime, supbtime, 0, ROT0, "Data East Corporation", "Super Burger Time (World, set 1)", 0 )
+GAME( 1990, supbtima, supbtime, supbtime, supbtime, 0, ROT0, "Data East Corporation", "Super Burger Time (World, set 2)", 0 )
GAME( 1990, supbtimj, supbtime, supbtime, supbtime, 0, ROT0, "Data East Corporation", "Super Burger Time (Japan)", 0 )
GAME( 1991, chinatwn, 0, chinatwn, chinatwn, 0, ROT0, "Data East Corporation", "China Town (Japan)", 0 )
diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c
index 2ba396e5317..ed8898b3f3e 100644
--- a/src/mame/drivers/superqix.c
+++ b/src/mame/drivers/superqix.c
@@ -212,7 +212,7 @@ static TIMER_CALLBACK( mcu_acknowledge_callback )
static READ8_HANDLER( mcu_acknowledge_r )
{
- timer_call_after_resynch(0, mcu_acknowledge_callback);
+ timer_call_after_resynch(NULL, 0, mcu_acknowledge_callback);
return 0;
}
@@ -419,7 +419,7 @@ logerror("%04x: z80 reads command %02x\n",activecpu_get_pc(),from_z80);
break;
case 0x5: // answer to Z80
- timer_call_after_resynch(portB_out, delayed_mcu_z80_w);
+ timer_call_after_resynch(NULL, portB_out, delayed_mcu_z80_w);
break;
case 0x6:
@@ -435,7 +435,7 @@ logerror("%04x: z80 reads command %02x\n",activecpu_get_pc(),from_z80);
static WRITE8_HANDLER( hotsmash_z80_mcu_w )
{
- timer_call_after_resynch(data, delayed_z80_mcu_w);
+ timer_call_after_resynch(NULL, data, delayed_z80_mcu_w);
}
static READ8_HANDLER(hotsmash_from_mcu_r)
diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c
index 1b4ce00c8bf..23c6789088f 100644
--- a/src/mame/drivers/suprnova.c
+++ b/src/mame/drivers/suprnova.c
@@ -454,9 +454,9 @@ static TIMER_CALLBACK( interrupt_callback )
static MACHINE_RESET(skns)
{
- timer_pulse(ATTOTIME_IN_MSEC(2), 15, interrupt_callback);
- timer_pulse(ATTOTIME_IN_MSEC(8), 11, interrupt_callback);
- timer_pulse(ATTOTIME_IN_CYCLES(1824, 0), 9, interrupt_callback);
+ timer_pulse(ATTOTIME_IN_MSEC(2), NULL, 15, interrupt_callback);
+ timer_pulse(ATTOTIME_IN_MSEC(8), NULL, 11, interrupt_callback);
+ timer_pulse(ATTOTIME_IN_CYCLES(1824, 0), NULL, 9, interrupt_callback);
memory_set_bankptr(1,memory_region(REGION_USER1));
}
diff --git a/src/mame/drivers/suprridr.c b/src/mame/drivers/suprridr.c
index c44ec833943..5830cbd63c6 100644
--- a/src/mame/drivers/suprridr.c
+++ b/src/mame/drivers/suprridr.c
@@ -123,7 +123,7 @@ static TIMER_CALLBACK( delayed_sound_w )
static WRITE8_HANDLER( sound_data_w )
{
- timer_call_after_resynch(data, delayed_sound_w);
+ timer_call_after_resynch(NULL, data, delayed_sound_w);
}
diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c
index 59a908deb21..60a126bc36a 100644
--- a/src/mame/drivers/system1.c
+++ b/src/mame/drivers/system1.c
@@ -3537,34 +3537,120 @@ ROM_START( myherok )
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
+/*
+ Shooting Master (SEGA) - Set 1, 8751 315-5159
+ Year: 1985
+ System 2
+
+ Main Board 834-5719
+ Light Gun Board? 834-5720
+*/
+
ROM_START( shtngmst )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
- ROM_LOAD( "epr7100", 0x00000, 0x8000, CRC(45e64431) SHA1(7edf818dc1f65365641e51abc197d13db7a8d4d9) )
- ROM_LOAD( "epr7101", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) )
- ROM_LOAD( "epr7102", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) )
+ /* This rom is located on the daughter board .*/
+ ROM_LOAD( "epr7100.ic18", 0x00000, 0x8000, CRC(45e64431) SHA1(7edf818dc1f65365641e51abc197d13db7a8d4d9) )
+ /* These roms are located on the main board. */
+ ROM_LOAD( "epr7101.ic91", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) )
+ ROM_LOAD( "epr7102.ic92", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) )
+ /* This rom is located on the main board. */
ROM_REGION( 0x10000, REGION_CPU2, 0 )
- ROM_LOAD( "epr7043", 0x0000, 0x8000, CRC(99a368ab) SHA1(a9451f39ee2613e5c3e2791d4d8d837b4a3ab666) )
+ ROM_LOAD( "epr7043.ic126", 0x0000, 0x8000, CRC(99a368ab) SHA1(a9451f39ee2613e5c3e2791d4d8d837b4a3ab666) )
+
+ /* This mcu is located on the main board. */
+ ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Internal i8751 MCU code */
+ ROM_LOAD( "315-5159.ic74", 0x00000, 0x1000, NO_DUMP )
+ /* These roms are located on the main board. */
ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE )
- ROM_LOAD( "epr7040", 0x00000, 0x8000, CRC(f30769fa) SHA1(366c1fbe4e1c8943b209f6c831c9a6b7e4372105) )
- ROM_LOAD( "epr7041", 0x08000, 0x8000, CRC(f3e273f9) SHA1(b8715c528299dc1e4f0c19c50d91ca9861a423a1) )
- ROM_LOAD( "epr7042", 0x10000, 0x8000, CRC(6841c917) SHA1(6553843eea0131eb7b5a9aa29dddf641e41d8cc3) )
+ ROM_LOAD( "epr7040.ic4", 0x00000, 0x8000, CRC(f30769fa) SHA1(366c1fbe4e1c8943b209f6c831c9a6b7e4372105) )
+ ROM_LOAD( "epr7041.ic5", 0x08000, 0x8000, CRC(f3e273f9) SHA1(b8715c528299dc1e4f0c19c50d91ca9861a423a1) )
+ ROM_LOAD( "epr7042.ic6", 0x10000, 0x8000, CRC(6841c917) SHA1(6553843eea0131eb7b5a9aa29dddf641e41d8cc3) )
+ /* These roms are located on the daughter board. */
ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_ERASEFF )
- ROM_LOAD( "epr7110", 0x00000, 0x8000, CRC(5d1a5048) SHA1(d1626ab1981080451c912df7e4ad7f76c0cb3459) )
- ROM_LOAD( "epr7106", 0x08000, 0x8000, CRC(ae7ab7a2) SHA1(153691e468d29d21b95f1fbffb6896a3140d7e14) )
- ROM_LOAD( "epr7108", 0x10000, 0x8000, CRC(816180ac) SHA1(a59670ec77d4359041ebf12dae5b74add55d82ac) )
- ROM_LOAD( "epr7104", 0x18000, 0x8000, CRC(84a679c5) SHA1(19a21b1b33fc215f606093bfd61d597e4bd0b3d0) )
- ROM_LOAD( "epr7109", 0x20000, 0x8000, CRC(097f7481) SHA1(4d93ea01b811af1cd3e136116625e4b8e06358a2) )
- ROM_LOAD( "epr7105", 0x28000, 0x8000, CRC(13111729) SHA1(57ca2b945db36b056d0e40a39456fd8bf9d0a3ec) )
- ROM_LOAD( "epr7107", 0x30000, 0x8000, CRC(8f50ea24) SHA1(781687e202dedca7b72c9bd5b97d9d46fcfd601c) )
+ ROM_LOAD( "epr7110.ic26", 0x00000, 0x8000, CRC(5d1a5048) SHA1(d1626ab1981080451c912df7e4ad7f76c0cb3459) )
+ ROM_LOAD( "epr7106.ic22", 0x08000, 0x8000, CRC(ae7ab7a2) SHA1(153691e468d29d21b95f1fbffb6896a3140d7e14) )
+ ROM_LOAD( "epr7108.ic24", 0x10000, 0x8000, CRC(816180ac) SHA1(a59670ec77d4359041ebf12dae5b74add55d82ac) )
+ ROM_LOAD( "epr7104.ic20", 0x18000, 0x8000, CRC(84a679c5) SHA1(19a21b1b33fc215f606093bfd61d597e4bd0b3d0) )
+ ROM_LOAD( "epr7109.ic25", 0x20000, 0x8000, CRC(097f7481) SHA1(4d93ea01b811af1cd3e136116625e4b8e06358a2) )
+ ROM_LOAD( "epr7105.ic21", 0x28000, 0x8000, CRC(13111729) SHA1(57ca2b945db36b056d0e40a39456fd8bf9d0a3ec) )
+ ROM_LOAD( "epr7107.ic23", 0x30000, 0x8000, CRC(8f50ea24) SHA1(781687e202dedca7b72c9bd5b97d9d46fcfd601c) )
+
+ /* These proms are located on the main board. */
+ ROM_REGION( 0x0400, REGION_PROMS, 0 )
+ ROM_LOAD( "epr7113.ic20", 0x00000, 0x0100, CRC(5c0e1360) SHA1(2011b3eef2a58f9bd3f3b1bb9e6c201db85727c2) ) /* palette red component */
+ ROM_LOAD( "epr7112.ic14", 0x00100, 0x0100, CRC(46fbd351) SHA1(1fca7fbc5d5f8e13e58bbac735511bd0af392446) ) /* palette green component */
+ ROM_LOAD( "epr7111.ic8", 0x00200, 0x0100, CRC(8123b6b9) SHA1(fb2c5498f0603b5cd270402a738c891a85453666) ) /* palette blue component - N82S129AN */
+ ROM_LOAD( "epr5317.ic37", 0x00300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) - N82S129AN */
+
+ /* These pld's are located on the main board. */
+ ROM_REGION( 0x0618, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "315-5137.bin", 0x00000, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) ) /* TI PAL16R4A-2CN Located at IC10 */
+ ROM_LOAD( "315-5138.bin", 0x00000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* TI PAL16R4ACN Located at IC11 */
+ ROM_LOAD( "315-5139.bin", 0x00000, 0x0104, NO_DUMP ) /* CK2605 located at IC50 */
+ ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC7 */
+ ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC13 */
+ ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC19 */
+ROM_END
+
+/*
+ Shooting Master (SEGA) - Set 2, 8751 315-5159a
+ Year: 1985
+ System 2
+
+ Main Board 834-5719
+ Light Gun Board? 834-5720
+*/
+
+ROM_START( shtngmsb )
+ ROM_REGION( 0x20000, REGION_CPU1, 0 )
+ /* This rom is located on the daughter board .*/
+ ROM_LOAD( "epr7100a.ic18", 0x00000, 0x8000, CRC(661f0b6e) SHA1(a1d064839c95d8a6f6d89b0894259f666d637ec4) )
+ /* These roms are located on the main board. */
+ ROM_LOAD( "epr7101.ic91", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) )
+ ROM_LOAD( "epr7102.ic92", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) )
+
+ /* This rom is located on the main board. */
+ ROM_REGION( 0x10000, REGION_CPU2, 0 )
+ ROM_LOAD( "epr7043.ic126", 0x0000, 0x8000, CRC(99a368ab) SHA1(a9451f39ee2613e5c3e2791d4d8d837b4a3ab666) )
+
+ /* This mcu is located on the main board. */
+ ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Internal i8751 MCU code */
+ ROM_LOAD( "315-5159a.ic74", 0x00000, 0x1000, NO_DUMP )
+ /* These roms are located on the main board. */
+ ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "epr7040.ic4", 0x00000, 0x8000, CRC(f30769fa) SHA1(366c1fbe4e1c8943b209f6c831c9a6b7e4372105) )
+ ROM_LOAD( "epr7041.ic5", 0x08000, 0x8000, CRC(f3e273f9) SHA1(b8715c528299dc1e4f0c19c50d91ca9861a423a1) )
+ ROM_LOAD( "epr7042.ic6", 0x10000, 0x8000, CRC(6841c917) SHA1(6553843eea0131eb7b5a9aa29dddf641e41d8cc3) )
+
+ /* These roms are located on the daughter board. */
+ ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_ERASEFF )
+ ROM_LOAD( "epr7110.ic26", 0x00000, 0x8000, CRC(5d1a5048) SHA1(d1626ab1981080451c912df7e4ad7f76c0cb3459) )
+ ROM_LOAD( "epr7106.ic22", 0x08000, 0x8000, CRC(ae7ab7a2) SHA1(153691e468d29d21b95f1fbffb6896a3140d7e14) )
+ ROM_LOAD( "epr7108.ic24", 0x10000, 0x8000, CRC(816180ac) SHA1(a59670ec77d4359041ebf12dae5b74add55d82ac) )
+ ROM_LOAD( "epr7104.ic20", 0x18000, 0x8000, CRC(84a679c5) SHA1(19a21b1b33fc215f606093bfd61d597e4bd0b3d0) )
+ ROM_LOAD( "epr7109.ic25", 0x20000, 0x8000, CRC(097f7481) SHA1(4d93ea01b811af1cd3e136116625e4b8e06358a2) )
+ ROM_LOAD( "epr7105.ic21", 0x28000, 0x8000, CRC(13111729) SHA1(57ca2b945db36b056d0e40a39456fd8bf9d0a3ec) )
+ ROM_LOAD( "epr7107.ic23", 0x30000, 0x8000, CRC(8f50ea24) SHA1(781687e202dedca7b72c9bd5b97d9d46fcfd601c) )
+
+ /* These proms are located on the main board. */
ROM_REGION( 0x0400, REGION_PROMS, 0 )
- ROM_LOAD( "epr7113", 0x0000, 0x0100, CRC(5c0e1360) SHA1(2011b3eef2a58f9bd3f3b1bb9e6c201db85727c2) ) /* palette red component */
- ROM_LOAD( "epr7112", 0x0100, 0x0100, CRC(46fbd351) SHA1(1fca7fbc5d5f8e13e58bbac735511bd0af392446) ) /* palette green component */
- ROM_LOAD( "epr7111", 0x0200, 0x0100, CRC(8123b6b9) SHA1(fb2c5498f0603b5cd270402a738c891a85453666) ) /* palette blue component */
- ROM_LOAD( "epr5317", 0x0300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
+ ROM_LOAD( "epr7113.ic20", 0x00000, 0x0100, CRC(5c0e1360) SHA1(2011b3eef2a58f9bd3f3b1bb9e6c201db85727c2) ) /* palette red component */
+ ROM_LOAD( "epr7112.ic14", 0x00100, 0x0100, CRC(46fbd351) SHA1(1fca7fbc5d5f8e13e58bbac735511bd0af392446) ) /* palette green component */
+ ROM_LOAD( "epr7111.ic8", 0x00200, 0x0100, CRC(8123b6b9) SHA1(fb2c5498f0603b5cd270402a738c891a85453666) ) /* palette blue component - N82S129AN */
+ ROM_LOAD( "epr5317.ic37", 0x00300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) - N82S129AN */
+
+ /* These pld's are located on the main board. */
+ ROM_REGION( 0x0618, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "315-5137.bin", 0x00000, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) ) /* TI PAL16R4A-2CN Located at IC10 */
+ ROM_LOAD( "315-5138.bin", 0x00000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* TI PAL16R4ACN Located at IC11 */
+ ROM_LOAD( "315-5139.bin", 0x00000, 0x0104, NO_DUMP ) /* CK2605 located at IC50 */
+ ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC7 */
+ ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC13 */
+ ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC19 */
ROM_END
/*
@@ -3651,65 +3737,101 @@ ROM_START( shtngmsa )
ROM_LOAD( "pal16r4a(315-5137).bin", 0x0200, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) )
ROM_END
+/*
+ Choplifter (8751 315-5151)
+ Year: 1985
+ System 2
+
+ Main Board 834-5795
+*/
ROM_START( chplft )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
- ROM_LOAD( "epr-7124.90", 0x00000, 0x8000, CRC(678d5c41) SHA1(7553979f78270c2ddc5b3f3ebf7817ead8e08de7) )
- ROM_LOAD( "epr-7125.91", 0x10000, 0x8000, CRC(f5283498) SHA1(1ad40f6d7b4cd18212ee56917240c0796f1a4ec2) )
- ROM_LOAD( "epr-7126.92", 0x18000, 0x8000, CRC(dbd192ab) SHA1(03d280c82599a14fc6a2065d57c6241cdc6f1143) )
+ ROM_LOAD( "epr-7124.ic90", 0x00000, 0x8000, CRC(678d5c41) SHA1(7553979f78270c2ddc5b3f3ebf7817ead8e08de7) )
+ ROM_LOAD( "epr-7125.ic91", 0x10000, 0x8000, CRC(f5283498) SHA1(1ad40f6d7b4cd18212ee56917240c0796f1a4ec2) )
+ ROM_LOAD( "epr-7126.ic92", 0x18000, 0x8000, CRC(dbd192ab) SHA1(03d280c82599a14fc6a2065d57c6241cdc6f1143) )
ROM_REGION( 0x10000, REGION_CPU2, 0 )
- ROM_LOAD( "epr-7130.126", 0x0000, 0x8000, CRC(346af118) SHA1(ef579818a45b8ebb276d5832092b26e232d5a737) )
+ ROM_LOAD( "epr-7130.ic126", 0x0000, 0x8000, CRC(346af118) SHA1(ef579818a45b8ebb276d5832092b26e232d5a737) )
+
+ ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Internal i8751 MCU code */
+ ROM_LOAD( "315-5151.ic74", 0x00000, 0x1000, NO_DUMP )
ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE )
- ROM_LOAD( "epr-7127.4", 0x00000, 0x8000, CRC(1e708f6d) SHA1(b975e13bdc44105e7a15c2694e3ec53b60e23e5e) )
- ROM_LOAD( "epr-7128.5", 0x08000, 0x8000, CRC(b922e787) SHA1(16087671ec7de25f749b5fd66409d48ef7b35820) )
- ROM_LOAD( "epr-7129.6", 0x10000, 0x8000, CRC(bd3b6e6e) SHA1(c66f21b98cb8fc61a9318041ac1812c13099d974) )
+ ROM_LOAD( "epr-7127.ic4", 0x00000, 0x8000, CRC(1e708f6d) SHA1(b975e13bdc44105e7a15c2694e3ec53b60e23e5e) )
+ ROM_LOAD( "epr-7128.ic5", 0x08000, 0x8000, CRC(b922e787) SHA1(16087671ec7de25f749b5fd66409d48ef7b35820) )
+ ROM_LOAD( "epr-7129.ic6", 0x10000, 0x8000, CRC(bd3b6e6e) SHA1(c66f21b98cb8fc61a9318041ac1812c13099d974) )
ROM_REGION( 0x20000, REGION_GFX2, 0 ) /* 128k for sprites data */
- ROM_LOAD( "epr-7121.87", 0x00000, 0x8000, CRC(f2b88f73) SHA1(2b06da1beabbea82d502fbe12f6ec3ef26056edd) )
- ROM_LOAD( "epr-7120.86", 0x08000, 0x8000, CRC(517d7fd3) SHA1(3fb5c00224920c3f62fb86e82caf0fee2293e1e2) )
- ROM_LOAD( "epr-7123.89", 0x10000, 0x8000, CRC(8f16a303) SHA1(5f2465505f001dc052e9de4cf66bc1d53fc8c7da) )
- ROM_LOAD( "epr-7122.88", 0x18000, 0x8000, CRC(7c93f160) SHA1(6ab156cad7556808496070f8b02a708ce405c492) )
+ ROM_LOAD( "epr-7121.ic87", 0x00000, 0x8000, CRC(f2b88f73) SHA1(2b06da1beabbea82d502fbe12f6ec3ef26056edd) )
+ ROM_LOAD( "epr-7120.ic86", 0x08000, 0x8000, CRC(517d7fd3) SHA1(3fb5c00224920c3f62fb86e82caf0fee2293e1e2) )
+ ROM_LOAD( "epr-7123.ic89", 0x10000, 0x8000, CRC(8f16a303) SHA1(5f2465505f001dc052e9de4cf66bc1d53fc8c7da) )
+ ROM_LOAD( "epr-7122.ic88", 0x18000, 0x8000, CRC(7c93f160) SHA1(6ab156cad7556808496070f8b02a708ce405c492) )
ROM_REGION( 0x0400, REGION_PROMS, 0 )
- ROM_LOAD( "pr7119.20", 0x0000, 0x0100, CRC(b2a8260f) SHA1(36c1debb4b3f2f190a25b18d533319d7380416de) ) /* palette red component */
- ROM_LOAD( "pr7118.14", 0x0100, 0x0100, CRC(693e20c7) SHA1(9ebf4bd2c30ddd9648bc4b41c7739cfdf80100da) ) /* palette green component */
- ROM_LOAD( "pr7117.8", 0x0200, 0x0100, CRC(4124307e) SHA1(cee28d891e6ce732c43a61acb5beeafd2200cf37) ) /* palette blue component */
- ROM_LOAD( "pr5317.28", 0x0300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
-
- ROM_REGION( 0x0400, REGION_PLDS, ROMREGION_DISPOSE )
- ROM_LOAD( "pal16r4a.ic9", 0x0000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) )
- ROM_LOAD( "pal16r4a.ic10", 0x0200, 0x0104, CRC(2c9229b4) SHA1(9755013afcf89f99d7a399c7e223e027761cf89a) )
+ ROM_LOAD( "pr7119.ic20", 0x0000, 0x0100, CRC(b2a8260f) SHA1(36c1debb4b3f2f190a25b18d533319d7380416de) ) /* palette red component */
+ ROM_LOAD( "pr7118.ic14", 0x0100, 0x0100, CRC(693e20c7) SHA1(9ebf4bd2c30ddd9648bc4b41c7739cfdf80100da) ) /* palette green component */
+ ROM_LOAD( "pr7117.ic8", 0x0200, 0x0100, CRC(4124307e) SHA1(cee28d891e6ce732c43a61acb5beeafd2200cf37) ) /* palette blue component */
+ ROM_LOAD( "pr5317.ic28", 0x0300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
+
+ ROM_REGION( 0x0618, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "315-5152.bin", 0x00000, 0x0104, CRC(2c9229b4) SHA1(9755013afcf89f99d7a399c7e223e027761cf89a) ) /* PAL16R4A located at IC10. */
+ ROM_LOAD( "315-5138.bin", 0x00000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* TI PAL16R4NC located at IC11. */
+ ROM_LOAD( "315-5139.bin", 0x00000, 0x0104, NO_DUMP ) /* CK2605 located at IC50. */
+ ROM_LOAD( "315-5025.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC7. */
+ ROM_LOAD( "315-5025.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC13. */
+ ROM_LOAD( "315-5025.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC19. */
ROM_END
+/*
+ Choplifter (Unprotected)
+ Year: 1985
+ System 2
+
+ Main Board 834-5795
+*/
+
ROM_START( chplftb )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
- ROM_LOAD( "epr-7152.90", 0x00000, 0x8000, CRC(fe49d83e) SHA1(307be38dd73ed37b275c1b464d266a752cb06132) )
- ROM_LOAD( "epr-7153.91", 0x10000, 0x8000, CRC(48697666) SHA1(0f4c6db9558272f5ceb347e742b284474f18b707) )
- ROM_LOAD( "epr-7154.92", 0x18000, 0x8000, CRC(56d6222a) SHA1(ad8ccf15fe7f1d6716f78490892da0167d79f678) )
+ ROM_LOAD( "epr-7152.ic90", 0x00000, 0x8000, CRC(fe49d83e) SHA1(307be38dd73ed37b275c1b464d266a752cb06132) )
+ ROM_LOAD( "epr-7153.ic91", 0x10000, 0x8000, CRC(48697666) SHA1(0f4c6db9558272f5ceb347e742b284474f18b707) )
+ ROM_LOAD( "epr-7154.ic92", 0x18000, 0x8000, CRC(56d6222a) SHA1(ad8ccf15fe7f1d6716f78490892da0167d79f678) )
ROM_REGION( 0x10000, REGION_CPU2, 0 )
- ROM_LOAD( "epr-7130.126", 0x0000, 0x8000, CRC(346af118) SHA1(ef579818a45b8ebb276d5832092b26e232d5a737) )
+ ROM_LOAD( "epr-7130.ic126", 0x0000, 0x8000, CRC(346af118) SHA1(ef579818a45b8ebb276d5832092b26e232d5a737) )
ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE )
- ROM_LOAD( "epr-7127.4", 0x00000, 0x8000, CRC(1e708f6d) SHA1(b975e13bdc44105e7a15c2694e3ec53b60e23e5e) )
- ROM_LOAD( "epr-7128.5", 0x08000, 0x8000, CRC(b922e787) SHA1(16087671ec7de25f749b5fd66409d48ef7b35820) )
- ROM_LOAD( "epr-7129.6", 0x10000, 0x8000, CRC(bd3b6e6e) SHA1(c66f21b98cb8fc61a9318041ac1812c13099d974) )
+ ROM_LOAD( "epr-7127.ic4", 0x00000, 0x8000, CRC(1e708f6d) SHA1(b975e13bdc44105e7a15c2694e3ec53b60e23e5e) )
+ ROM_LOAD( "epr-7128.ic5", 0x08000, 0x8000, CRC(b922e787) SHA1(16087671ec7de25f749b5fd66409d48ef7b35820) )
+ ROM_LOAD( "epr-7129.ic6", 0x10000, 0x8000, CRC(bd3b6e6e) SHA1(c66f21b98cb8fc61a9318041ac1812c13099d974) )
ROM_REGION( 0x20000, REGION_GFX2, 0 ) /* 128k for sprites data */
- ROM_LOAD( "epr-7121.87", 0x00000, 0x8000, CRC(f2b88f73) SHA1(2b06da1beabbea82d502fbe12f6ec3ef26056edd) )
- ROM_LOAD( "epr-7120.86", 0x08000, 0x8000, CRC(517d7fd3) SHA1(3fb5c00224920c3f62fb86e82caf0fee2293e1e2) )
- ROM_LOAD( "epr-7123.89", 0x10000, 0x8000, CRC(8f16a303) SHA1(5f2465505f001dc052e9de4cf66bc1d53fc8c7da) )
- ROM_LOAD( "epr-7122.88", 0x18000, 0x8000, CRC(7c93f160) SHA1(6ab156cad7556808496070f8b02a708ce405c492) )
+ ROM_LOAD( "epr-7121.ic87", 0x00000, 0x8000, CRC(f2b88f73) SHA1(2b06da1beabbea82d502fbe12f6ec3ef26056edd) )
+ ROM_LOAD( "epr-7120.ic86", 0x08000, 0x8000, CRC(517d7fd3) SHA1(3fb5c00224920c3f62fb86e82caf0fee2293e1e2) )
+ ROM_LOAD( "epr-7123.ic89", 0x10000, 0x8000, CRC(8f16a303) SHA1(5f2465505f001dc052e9de4cf66bc1d53fc8c7da) )
+ ROM_LOAD( "epr-7122.ic88", 0x18000, 0x8000, CRC(7c93f160) SHA1(6ab156cad7556808496070f8b02a708ce405c492) )
ROM_REGION( 0x0400, REGION_PROMS, 0 )
- ROM_LOAD( "pr7119.20", 0x0000, 0x0100, CRC(b2a8260f) SHA1(36c1debb4b3f2f190a25b18d533319d7380416de) ) /* palette red component */
- ROM_LOAD( "pr7118.14", 0x0100, 0x0100, CRC(693e20c7) SHA1(9ebf4bd2c30ddd9648bc4b41c7739cfdf80100da) ) /* palette green component */
- ROM_LOAD( "pr7117.8", 0x0200, 0x0100, CRC(4124307e) SHA1(cee28d891e6ce732c43a61acb5beeafd2200cf37) ) /* palette blue component */
- ROM_LOAD( "pr5317.28", 0x0300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
+ ROM_LOAD( "pr7119.ic20", 0x0000, 0x0100, CRC(b2a8260f) SHA1(36c1debb4b3f2f190a25b18d533319d7380416de) ) /* palette red component */
+ ROM_LOAD( "pr7118.ic14", 0x0100, 0x0100, CRC(693e20c7) SHA1(9ebf4bd2c30ddd9648bc4b41c7739cfdf80100da) ) /* palette green component */
+ ROM_LOAD( "pr7117.ic8", 0x0200, 0x0100, CRC(4124307e) SHA1(cee28d891e6ce732c43a61acb5beeafd2200cf37) ) /* palette blue component */
+ ROM_LOAD( "pr5317.ic28", 0x0300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
+
+ ROM_REGION( 0x0618, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "315-5152.bin", 0x00000, 0x0104, CRC(2c9229b4) SHA1(9755013afcf89f99d7a399c7e223e027761cf89a) ) /* PAL16R4A located at IC10. */
+ ROM_LOAD( "315-5138.bin", 0x00000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* TI PAL16R4NC located at IC11. */
+ ROM_LOAD( "315-5139.bin", 0x00000, 0x0104, NO_DUMP ) /* CK2605 located at IC50. */
+ ROM_LOAD( "315-5025.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC7. */
+ ROM_LOAD( "315-5025.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC13. */
+ ROM_LOAD( "315-5025.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC19. */
ROM_END
+/*
+ Choplifter (Bootleg)
+ Year: 1985
+ System 2
+*/
+
ROM_START( chplftbl )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
ROM_LOAD( "ep7124bl.90", 0x00000, 0x8000, CRC(71a37932) SHA1(72b6f8949d356b3adc5248fdaa13c2a1b9c0fa70) )
@@ -4735,10 +4857,11 @@ GAME( 1985, myhero, 0, system1, myhero, 0, ROT0, "Sega",
GAME( 1985, sscandal, myhero, system1, myhero, myheroj, ROT0, "Coreland / Sega", "Seishun Scandal (315-5132, Japan)", GAME_SUPPORTS_SAVE )
GAME( 1985, myherok, myhero, system1, myhero, myherok, ROT0, "Coreland / Sega", "My Hero (Korea)", GAME_SUPPORTS_SAVE )
GAME( 1985, hvymetal, 0, hvymetal, hvymetal, hvymetal, ROT0, "Sega", "Heavy Metal (315-5135)", GAME_SUPPORTS_SAVE )
-GAME( 1985, shtngmst, 0, shtngmst, shtngmst, 0, ROT0, "Sega", "Shooting Master", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection, mcu = 315-5159 */
+GAME( 1985, shtngmst, 0, shtngmst, shtngmst, 0, ROT0, "Sega", "Shooting Master (set 1, 8751 315-5159)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection, mcu = 315-5159 */
GAME( 1985, shtngmsa, shtngmst, shtngmst, shtngmst, 0, ROT0, "Sega [EVG]", "Shooting Master (EVG)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection, mcu = 315-5159 */
-GAME( 1985, chplft, 0, chplft, chplft, 0, ROT0, "Sega", "Choplifter", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection */
-GAME( 1985, chplftb, chplft, chplft, chplft, 0, ROT0, "Sega", "Choplifter (alternate)", GAME_SUPPORTS_SAVE )
+GAME( 1985, shtngmsb, shtngmst, shtngmst, shtngmst, 0, ROT0, "Sega", "Shooting Master (set 2, 8751 315-5159a)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection, mcu = 315-5159a */
+GAME( 1985, chplft, 0, chplft, chplft, 0, ROT0, "Sega", "Choplifter (8751 315-5151)", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection */
+GAME( 1985, chplftb, chplft, chplft, chplft, 0, ROT0, "Sega", "Choplifter (unprotected)", GAME_SUPPORTS_SAVE )
GAME( 1985, chplftbl, chplft, chplft, chplft, 0, ROT0, "bootleg", "Choplifter (bootleg)", GAME_SUPPORTS_SAVE )
GAME( 1985, 4dwarrio, 0, system1, 4dwarrio, 4dwarrio, ROT0, "Coreland / Sega", "4-D Warriors (315-5162)", GAME_SUPPORTS_SAVE )
GAME( 1986, brain, 0, brain, brain, 0, ROT0, "Coreland / Sega", "Brain", GAME_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c
index eda7ae2bcb4..2b932f3243b 100644
--- a/src/mame/drivers/system16.c
+++ b/src/mame/drivers/system16.c
@@ -271,7 +271,7 @@ static struct MSM5205interface tturfbl_msm5205_interface =
};
-UINT8 *tturfbl_soundbank_ptr = NULL; /* Pointer to currently selected portion of ROM */
+static UINT8 *tturfbl_soundbank_ptr = NULL; /* Pointer to currently selected portion of ROM */
static READ8_HANDLER( tturfbl_soundbank_r )
{
diff --git a/src/mame/drivers/system18.c b/src/mame/drivers/system18.c
index a47c988a75f..7b4ae4b0b10 100644
--- a/src/mame/drivers/system18.c
+++ b/src/mame/drivers/system18.c
@@ -190,7 +190,7 @@ static struct MSM5205interface shdancbl_msm5205_interface =
MSM5205_S48_4B
};
-UINT8* shdancbl_soundbank_ptr = NULL; /* Pointer to currently selected portion of ROM */
+static UINT8* shdancbl_soundbank_ptr = NULL; /* Pointer to currently selected portion of ROM */
static WRITE16_HANDLER( sound_command_irq_w ){
if( ACCESSING_LSB ){
diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c
index 8b32f6e99f9..7652abcb83a 100644
--- a/src/mame/drivers/taito_b.c
+++ b/src/mame/drivers/taito_b.c
@@ -216,7 +216,7 @@ static TIMER_CALLBACK( rsaga2_interrupt2 )
static INTERRUPT_GEN( rastansaga2_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,rsaga2_interrupt2);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, rsaga2_interrupt2);
cpunum_set_input_line(0, 4, HOLD_LINE);
}
@@ -228,7 +228,7 @@ static TIMER_CALLBACK( crimec_interrupt3 )
static INTERRUPT_GEN( crimec_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,crimec_interrupt3);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, crimec_interrupt3);
cpunum_set_input_line(0, 5, HOLD_LINE);
}
@@ -240,7 +240,7 @@ static TIMER_CALLBACK( hitice_interrupt6 )
static INTERRUPT_GEN( hitice_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,hitice_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, hitice_interrupt6);
cpunum_set_input_line(0, 4, HOLD_LINE);
}
@@ -252,7 +252,7 @@ static TIMER_CALLBACK( rambo3_interrupt1 )
static INTERRUPT_GEN( rambo3_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,rambo3_interrupt1);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, rambo3_interrupt1);
cpunum_set_input_line(0, 6, HOLD_LINE);
}
@@ -264,7 +264,7 @@ static TIMER_CALLBACK( pbobble_interrupt5 )
static INTERRUPT_GEN( pbobble_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,pbobble_interrupt5);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, pbobble_interrupt5);
cpunum_set_input_line(0, 3, HOLD_LINE);
}
@@ -275,7 +275,7 @@ static TIMER_CALLBACK( viofight_interrupt1 )
static INTERRUPT_GEN( viofight_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,viofight_interrupt1);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, viofight_interrupt1);
cpunum_set_input_line(0, 4, HOLD_LINE);
}
@@ -286,7 +286,7 @@ static TIMER_CALLBACK( masterw_interrupt4 )
static INTERRUPT_GEN( masterw_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,masterw_interrupt4);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, masterw_interrupt4);
cpunum_set_input_line(0, 5, HOLD_LINE);
}
@@ -297,7 +297,7 @@ static TIMER_CALLBACK( silentd_interrupt4 )
static INTERRUPT_GEN( silentd_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,silentd_interrupt4);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, silentd_interrupt4);
cpunum_set_input_line(0, 6, HOLD_LINE);
}
@@ -308,7 +308,7 @@ static TIMER_CALLBACK( selfeena_interrupt4 )
static INTERRUPT_GEN( selfeena_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(5000,0),0,selfeena_interrupt4);
+ timer_set(ATTOTIME_IN_CYCLES(5000,0), NULL, 0, selfeena_interrupt4);
cpunum_set_input_line(0, 6, HOLD_LINE);
}
@@ -319,7 +319,7 @@ static TIMER_CALLBACK( sbm_interrupt5 )//4
static INTERRUPT_GEN( sbm_interrupt )//5
{
- timer_set(ATTOTIME_IN_CYCLES(10000,0),0,sbm_interrupt5);
+ timer_set(ATTOTIME_IN_CYCLES(10000,0), NULL, 0, sbm_interrupt5);
cpunum_set_input_line(0, 4, HOLD_LINE);
}
diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c
index 78cad97ab02..277683d3b4b 100644
--- a/src/mame/drivers/taito_f2.c
+++ b/src/mame/drivers/taito_f2.c
@@ -800,7 +800,7 @@ static TIMER_CALLBACK( taitof2_interrupt6 )
static INTERRUPT_GEN( taitof2_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(500,0),0, taitof2_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(500,0), NULL, 0, taitof2_interrupt6);
cpunum_set_input_line(0, 5, HOLD_LINE);
}
diff --git a/src/mame/drivers/taito_f3.c b/src/mame/drivers/taito_f3.c
index 81622f1772d..1e006fdc317 100644
--- a/src/mame/drivers/taito_f3.c
+++ b/src/mame/drivers/taito_f3.c
@@ -393,7 +393,7 @@ static TIMER_CALLBACK( f3_interrupt3 )
static INTERRUPT_GEN( f3_interrupt2 )
{
cpunum_set_input_line(0, 2, HOLD_LINE); // vblank
- timer_set( ATTOTIME_IN_CYCLES(10000,0), 0, f3_interrupt3);
+ timer_set( ATTOTIME_IN_CYCLES(10000,0), NULL, 0, f3_interrupt3);
}
static MACHINE_RESET( f3 )
diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c
index cf96592896c..5ae8e9c56e9 100644
--- a/src/mame/drivers/taito_z.c
+++ b/src/mame/drivers/taito_z.c
@@ -911,7 +911,7 @@ static INTERRUPT_GEN( sci_interrupt )
sci_int6 = !sci_int6;
if (sci_int6)
- timer_set(ATTOTIME_IN_CYCLES(200000-500,0),0, taitoz_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(200000-500,0), NULL, 0, taitoz_interrupt6);
cpunum_set_input_line(0, 4, HOLD_LINE);
}
@@ -926,7 +926,7 @@ static INTERRUPT_GEN( dblaxle_interrupt )
dblaxle_int6 = !dblaxle_int6;
if (dblaxle_int6)
- timer_set(ATTOTIME_IN_CYCLES(200000-500,0),0, taitoz_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(200000-500,0), NULL, 0, taitoz_interrupt6);
cpunum_set_input_line(0, 4, HOLD_LINE);
}
@@ -934,7 +934,7 @@ static INTERRUPT_GEN( dblaxle_interrupt )
static INTERRUPT_GEN( dblaxle_cpub_interrupt )
{
// Unsure how many int6's per frame
- timer_set(ATTOTIME_IN_CYCLES(200000-500,0),0, taitoz_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(200000-500,0), NULL, 0, taitoz_interrupt6);
cpunum_set_input_line(2, 4, HOLD_LINE);
}
@@ -1175,7 +1175,7 @@ static WRITE16_HANDLER( bshark_stick_w )
but we don't want CPUA to have an int6 before int4 is over (?)
*/
- timer_set(ATTOTIME_IN_CYCLES(10000,0),0, taitoz_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(10000,0), NULL, 0, taitoz_interrupt6);
}
@@ -1258,7 +1258,7 @@ static WRITE16_HANDLER( spacegun_lightgun_w )
Four lightgun interrupts happen before the collected coords
are moved to shared ram where CPUA can use them. */
- timer_set(ATTOTIME_IN_CYCLES(10000,0),0, taitoz_sg_cpub_interrupt5);
+ timer_set(ATTOTIME_IN_CYCLES(10000,0), NULL, 0, taitoz_sg_cpub_interrupt5);
}
diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c
index 9596b3a2995..a9a4b51dc42 100644
--- a/src/mame/drivers/tankbust.c
+++ b/src/mame/drivers/tankbust.c
@@ -46,7 +46,7 @@ static TIMER_CALLBACK( soundlatch_callback )
static WRITE8_HANDLER( tankbust_soundlatch_w )
{
- timer_call_after_resynch(data,soundlatch_callback);
+ timer_call_after_resynch(NULL, data,soundlatch_callback);
}
static READ8_HANDLER( tankbust_soundlatch_r )
@@ -95,7 +95,7 @@ static WRITE8_HANDLER( tankbust_e0xx_w )
break;
case 1: /* 0xe001 (value 0 then 1) written right after the soundlatch_w */
- timer_call_after_resynch(data,soundirqline_callback);
+ timer_call_after_resynch(NULL, data,soundirqline_callback);
break;
case 2: /* 0xe002 coin counter */
diff --git a/src/mame/drivers/tceptor.c b/src/mame/drivers/tceptor.c
index fcc2872da10..1bcf8c5aa2d 100644
--- a/src/mame/drivers/tceptor.c
+++ b/src/mame/drivers/tceptor.c
@@ -15,10 +15,13 @@
#include "sound/dac.h"
#include "sound/2151intf.h"
#include "sound/namco.h"
+#include "rendlay.h"
+#include "tceptor2.lh"
extern PALETTE_INIT( tceptor );
extern VIDEO_START( tceptor );
extern VIDEO_UPDATE( tceptor );
+extern VIDEO_EOF( tceptor );
extern READ8_HANDLER( tceptor_tile_ram_r );
extern WRITE8_HANDLER( tceptor_tile_ram_w );
@@ -220,7 +223,7 @@ static ADDRESS_MAP_START( m6809_readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x4f01, 0x4f01) AM_READ(input_port_4_r) // analog input (accel)
AM_RANGE(0x4f02, 0x4f02) AM_READ(input_port_5_r) // analog input (left/right)
AM_RANGE(0x4f03, 0x4f03) AM_READ(input_port_6_r) // analog input (up/down)
- AM_RANGE(0x6000, 0x7fff) AM_READ(m68k_shared_r) // COM RAM
+ AM_RANGE(0x6000, 0x7fff) AM_READ(m68k_shared_r) // COM RAM
AM_RANGE(0x8000, 0xffff) AM_READ(MRA8_ROM)
ADDRESS_MAP_END
@@ -234,7 +237,7 @@ static ADDRESS_MAP_START( m6809_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x4000, 0x43ff) AM_WRITE(namcos1_cus30_w)
AM_RANGE(0x4800, 0x4800) AM_WRITE(MWA8_NOP) // 3D scope left/right?
AM_RANGE(0x4f00, 0x4f03) AM_WRITE(MWA8_NOP) // analog input control?
- AM_RANGE(0x5000, 0x5006) AM_WRITE(tceptor_bg_scroll_w) // bg scroll
+ AM_RANGE(0x5000, 0x5006) AM_WRITE(tceptor_bg_scroll_w) // bg scroll
AM_RANGE(0x6000, 0x7fff) AM_WRITE(m68k_shared_w) AM_BASE(&m68k_shared_ram)
AM_RANGE(0x8000, 0x8000) AM_WRITE(m6809_irq_disable_w)
AM_RANGE(0x8800, 0x8800) AM_WRITE(m6809_irq_enable_w)
@@ -281,9 +284,9 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( m68k_readmem, ADDRESS_SPACE_PROGRAM, 16 )
- AM_RANGE(0x000000, 0x00ffff) AM_READ(MRA16_ROM) // M68K ERROR 1
- AM_RANGE(0x100000, 0x10ffff) AM_READ(MRA16_ROM) // not sure
- AM_RANGE(0x200000, 0x203fff) AM_READ(MRA16_RAM) // M68K ERROR 0
+ AM_RANGE(0x000000, 0x00ffff) AM_READ(MRA16_ROM) // M68K ERROR 1
+ AM_RANGE(0x100000, 0x10ffff) AM_READ(MRA16_ROM) // not sure
+ AM_RANGE(0x200000, 0x203fff) AM_READ(MRA16_RAM) // M68K ERROR 0
AM_RANGE(0x700000, 0x703fff) AM_READ(m68k_shared_word_r)
ADDRESS_MAP_END
@@ -431,7 +434,7 @@ static INPUT_PORTS_START( tceptor2 )
PORT_DIPSETTING( 0x03, "B" )
PORT_DIPSETTING( 0x01, "C" )
PORT_DIPSETTING( 0x00, "D" )
- PORT_DIPNAME( 0x04, 0x00, "MODE" ) // set default as 2D mode
+ PORT_DIPNAME( 0x04, 0x04, "MODE" )
PORT_DIPSETTING( 0x00, "2D" )
PORT_DIPSETTING( 0x04, "3D" )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -539,8 +542,6 @@ static MACHINE_DRIVER_START( tceptor )
MDRV_CPU_IO_MAP(mcu_readport,mcu_writeport)
MDRV_CPU_VBLANK_INT(mcu_vb_interrupt,1)
- MDRV_SCREEN_REFRESH_RATE(60.606060)
- MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
MDRV_INTERLEAVE(100)
MDRV_NVRAM_HANDLER(generic_1fill)
@@ -550,16 +551,37 @@ static MACHINE_DRIVER_START( tceptor )
/* video hardware */
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_SIZE(38*8, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(2*8, 34*8-1 + 2*8, 0*8, 28*8-1 + 0)
MDRV_GFXDECODE(tceptor)
MDRV_PALETTE_LENGTH(1024)
MDRV_COLORTABLE_LENGTH(4096)
+ MDRV_DEFAULT_LAYOUT(layout_horizont)
+
+ MDRV_SCREEN_ADD("2D", 0x000)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_REFRESH_RATE(60.606060)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+ MDRV_SCREEN_SIZE(38*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(2*8, 34*8-1 + 2*8, 0*8, 28*8-1 + 0)
+
+ MDRV_SCREEN_ADD("3D Left", 0x000)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_REFRESH_RATE(60.606060)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+ MDRV_SCREEN_SIZE(38*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(2*8, 34*8-1 + 2*8, 0*8, 28*8-1 + 0)
+
+ MDRV_SCREEN_ADD("3D Right", 0x000)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_REFRESH_RATE(60.606060)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+ MDRV_SCREEN_SIZE(38*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(2*8, 34*8-1 + 2*8, 0*8, 28*8-1 + 0)
MDRV_PALETTE_INIT(tceptor)
+
MDRV_VIDEO_START(tceptor)
MDRV_VIDEO_UPDATE(tceptor)
+ MDRV_VIDEO_EOF(tceptor)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
@@ -694,5 +716,5 @@ ROM_END
/* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME ) */
-GAME( 1986, tceptor, 0, tceptor, tceptor, 0, ROT0, "Namco", "Thunder Ceptor", 0)
-GAME( 1986, tceptor2, tceptor, tceptor, tceptor2, 0, ROT0, "Namco", "Thunder Ceptor II", 0)
+GAME ( 1986, tceptor, 0, tceptor, tceptor, 0, ROT0, "Namco", "Thunder Ceptor", 0)
+GAMEL( 1986, tceptor2, tceptor, tceptor, tceptor2, 0, ROT0, "Namco", "Thunder Ceptor II", 0, layout_tceptor2)
diff --git a/src/mame/drivers/tecmosys.c b/src/mame/drivers/tecmosys.c
index 09647c09c14..fc43b59a532 100644
--- a/src/mame/drivers/tecmosys.c
+++ b/src/mame/drivers/tecmosys.c
@@ -660,7 +660,7 @@ static DRIVER_INIT( deroon )
ROM[0x044A/2] = 0x4E71;
ROM[0x04bc/2] = 0x0000;
ROM[0x302c/2] = 0x60a4;
- timer_set(ATTOTIME_IN_SEC(2),0,reset_callback);
+ timer_set(ATTOTIME_IN_SEC(2), NULL,0,reset_callback);
gametype=0;
}
@@ -682,7 +682,7 @@ static DRIVER_INIT( tkdensho )
ROM[0x04822/2] = 0x4E71;
ROM[0x04862/2] = 0x4E71;
- timer_set(ATTOTIME_IN_SEC(2),0,reset_callback);
+ timer_set(ATTOTIME_IN_SEC(2), NULL,0,reset_callback);
gametype=1;
}
diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c
index 8acc27491d4..ca273c79ff6 100644
--- a/src/mame/drivers/tehkanwc.c
+++ b/src/mame/drivers/tehkanwc.c
@@ -175,7 +175,7 @@ static WRITE8_HANDLER( sound_answer_w )
/* in Gridiron, the sound CPU goes in a tight loop after the self test, */
/* probably waiting to be reset by a watchdog */
- if (activecpu_get_pc() == 0x08bc) timer_set(ATTOTIME_IN_SEC(1),0,reset_callback);
+ if (activecpu_get_pc() == 0x08bc) timer_set(ATTOTIME_IN_SEC(1), NULL,0,reset_callback);
}
diff --git a/src/mame/drivers/tetrisp2.c b/src/mame/drivers/tetrisp2.c
index 88d2a583494..cc6dc638229 100644
--- a/src/mame/drivers/tetrisp2.c
+++ b/src/mame/drivers/tetrisp2.c
@@ -1024,8 +1024,8 @@ static TIMER_CALLBACK( rockn_timer_sub_level1_callback )
static void init_rockn_timer(running_machine *machine)
{
- timer_pulse(ATTOTIME_IN_MSEC(32), 0, rockn_timer_level1_callback);
- rockn_timer_l4 = timer_alloc(rockn_timer_level4_callback);
+ timer_pulse(ATTOTIME_IN_MSEC(32), NULL, 0, rockn_timer_level1_callback);
+ rockn_timer_l4 = timer_alloc(rockn_timer_level4_callback, NULL);
state_save_register_global_array(tetrisp2_systemregs);
state_save_register_global_array(rocknms_sub_systemregs);
@@ -1056,8 +1056,8 @@ static DRIVER_INIT( rocknms )
{
init_rockn_timer(machine);
- timer_pulse(ATTOTIME_IN_MSEC(32), 0, rockn_timer_sub_level1_callback);
- rockn_timer_sub_l4 = timer_alloc(rockn_timer_sub_level4_callback);
+ timer_pulse(ATTOTIME_IN_MSEC(32), NULL, 0, rockn_timer_sub_level1_callback);
+ rockn_timer_sub_l4 = timer_alloc(rockn_timer_sub_level4_callback, NULL);
rockn_protectdata = 3;
diff --git a/src/mame/drivers/thunderj.c b/src/mame/drivers/thunderj.c
index 8dcf4284c6c..97b5b20738c 100644
--- a/src/mame/drivers/thunderj.c
+++ b/src/mame/drivers/thunderj.c
@@ -120,7 +120,7 @@ static WRITE16_HANDLER( latch_w )
static TIMER_CALLBACK( shared_sync_callback )
{
if (--param)
- timer_set(ATTOTIME_IN_USEC(50), param, shared_sync_callback);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, param, shared_sync_callback);
}
@@ -143,7 +143,7 @@ static READ16_HANDLER( shared_ram_r )
if ((opcode & 0xffc0) == 0x4ac0 ||
((opcode & 0xffc0) == 0x0080 && rom_base[cpunum][ppc / 2 + 1] == 7))
{
- timer_call_after_resynch(4, shared_sync_callback);
+ timer_call_after_resynch(NULL, 4, shared_sync_callback);
}
}
}
diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c
index cab1a60dadf..f00c52a621b 100644
--- a/src/mame/drivers/thunderx.c
+++ b/src/mame/drivers/thunderx.c
@@ -308,7 +308,7 @@ static WRITE8_HANDLER( thunderx_1f98_w )
calculate_collisions();
/* 100 cycle delay is arbitrary */
- timer_set(ATTOTIME_IN_CYCLES(100,0),0, thunderx_firq_callback);
+ timer_set(ATTOTIME_IN_CYCLES(100,0), NULL, 0, thunderx_firq_callback);
}
thunderx_1f98_data = data;
diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c
index c3057e26c4b..c8c709da936 100644
--- a/src/mame/drivers/tmnt.c
+++ b/src/mame/drivers/tmnt.c
@@ -359,7 +359,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/toaplan2.c b/src/mame/drivers/toaplan2.c
index 41058f437c5..601d6929440 100644
--- a/src/mame/drivers/toaplan2.c
+++ b/src/mame/drivers/toaplan2.c
@@ -575,7 +575,7 @@ static TIMER_CALLBACK( toaplan2_raise_irq )
static void toaplan2_vblank_irq(int irq_line)
{
/* the IRQ appears to fire at line 0xe6 */
- timer_set(video_screen_get_time_until_pos(0, 0xe6, 0), irq_line, toaplan2_raise_irq);
+ timer_set(video_screen_get_time_until_pos(0, 0xe6, 0), NULL, irq_line, toaplan2_raise_irq);
}
static INTERRUPT_GEN( toaplan2_vblank_irq1 ) { toaplan2_vblank_irq(1); }
diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c
index ac1d0df2cd2..5dec30ad522 100644
--- a/src/mame/drivers/topspeed.c
+++ b/src/mame/drivers/topspeed.c
@@ -307,14 +307,14 @@ static TIMER_CALLBACK( topspeed_cpub_interrupt6 )
static INTERRUPT_GEN( topspeed_interrupt )
{
/* Unsure how many int6's per frame */
- timer_set(ATTOTIME_IN_CYCLES(200000-500,0),0, topspeed_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(200000-500,0), NULL, 0, topspeed_interrupt6);
cpunum_set_input_line(0, 5, HOLD_LINE);
}
static INTERRUPT_GEN( topspeed_cpub_interrupt )
{
/* Unsure how many int6's per frame */
- timer_set(ATTOTIME_IN_CYCLES(200000-500,0),0, topspeed_cpub_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(200000-500,0), NULL, 0, topspeed_cpub_interrupt6);
cpunum_set_input_line(2, 5, HOLD_LINE);
}
diff --git a/src/mame/drivers/tourtabl.c b/src/mame/drivers/tourtabl.c
index 149b00bfbdf..89dcc92e59f 100644
--- a/src/mame/drivers/tourtabl.c
+++ b/src/mame/drivers/tourtabl.c
@@ -251,5 +251,5 @@ ROM_START( tourtab2 )
ROM_END
-GAME( 1978, tourtabl, 0, tourtabl, tourtabl, NULL, ROT0, "Atari", "Tournament Table (set 1)", 0 )
-GAME( 1978, tourtab2, tourtabl, tourtabl, tourtabl, NULL, ROT0, "Atari", "Tournament Table (set 2)", 0 )
+GAME( 1978, tourtabl, 0, tourtabl, tourtabl, 0, ROT0, "Atari", "Tournament Table (set 1)", 0 )
+GAME( 1978, tourtab2, tourtabl, tourtabl, tourtabl, 0, ROT0, "Atari", "Tournament Table (set 2)", 0 )
diff --git a/src/mame/drivers/toypop.c b/src/mame/drivers/toypop.c
index 6dac25a274c..64a48e0f7d1 100644
--- a/src/mame/drivers/toypop.c
+++ b/src/mame/drivers/toypop.c
@@ -223,7 +223,7 @@ static MACHINE_RESET( toypop )
{
/* 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);
}
static INTERRUPT_GEN( toypop_m68000_interrupt )
diff --git a/src/mame/drivers/trackfld.c b/src/mame/drivers/trackfld.c
index e0972a55b52..f82e1acbd08 100644
--- a/src/mame/drivers/trackfld.c
+++ b/src/mame/drivers/trackfld.c
@@ -844,7 +844,7 @@ static GFXDECODE_START( trackfld )
GFXDECODE_END
-struct VLM5030interface trackfld_vlm5030_interface =
+static struct VLM5030interface trackfld_vlm5030_interface =
{
REGION_SOUND1, /* memory region */
0 /* memory size */
diff --git a/src/mame/drivers/trucocl.c b/src/mame/drivers/trucocl.c
index 7daf3e36c5c..aeb1c66488e 100644
--- a/src/mame/drivers/trucocl.c
+++ b/src/mame/drivers/trucocl.c
@@ -82,7 +82,7 @@ static WRITE8_HANDLER( audio_dac_w)
DAC_data_w( 0, rom[dac_address+cur_dac_address_index] );
- timer_set( ATTOTIME_IN_HZ( 16000 ), 0, dac_irq );
+ timer_set( ATTOTIME_IN_HZ( 16000 ), NULL, 0, dac_irq );
}
static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
diff --git a/src/mame/drivers/trvquest.c b/src/mame/drivers/trvquest.c
index d525dc42f93..fe081f869ca 100644
--- a/src/mame/drivers/trvquest.c
+++ b/src/mame/drivers/trvquest.c
@@ -220,7 +220,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);
}
diff --git a/src/mame/drivers/tubep.c b/src/mame/drivers/tubep.c
index 8a2d74dffc3..4d79e542df9 100644
--- a/src/mame/drivers/tubep.c
+++ b/src/mame/drivers/tubep.c
@@ -352,7 +352,7 @@ static void tubep_setup_save_state(void)
static MACHINE_START( tubep )
{
/* Create interrupt timer */
- interrupt_timer = timer_alloc(tubep_scanline_callback);
+ interrupt_timer = timer_alloc(tubep_scanline_callback, NULL);
tubep_setup_save_state();
}
@@ -516,7 +516,7 @@ logerror("scanline=%3i scrgetvpos(0)=%3i\n",scanline,video_screen_get_vpos(0));
static MACHINE_START( rjammer )
{
/* Create interrupt timer */
- interrupt_timer = timer_alloc(rjammer_scanline_callback);
+ interrupt_timer = timer_alloc(rjammer_scanline_callback, NULL);
tubep_setup_save_state();
}
diff --git a/src/mame/drivers/tugboat.c b/src/mame/drivers/tugboat.c
index e3766671990..be70ca9ce8a 100644
--- a/src/mame/drivers/tugboat.c
+++ b/src/mame/drivers/tugboat.c
@@ -168,7 +168,7 @@ static const pia6821_interface pia1_intf =
static TIMER_CALLBACK( interrupt_gen )
{
cpunum_set_input_line(0, 0, HOLD_LINE);
- timer_set(video_screen_get_frame_period(0), 0, interrupt_gen);
+ timer_set(video_screen_get_frame_period(0), NULL, 0, interrupt_gen);
}
static MACHINE_START( tugboat )
@@ -180,7 +180,7 @@ static MACHINE_START( tugboat )
static MACHINE_RESET( tugboat )
{
pia_reset();
- timer_set(video_screen_get_time_until_pos(0, 30*8+4, 0), 0, interrupt_gen);
+ timer_set(video_screen_get_time_until_pos(0, 30*8+4, 0), NULL, 0, interrupt_gen);
}
diff --git a/src/mame/drivers/turbo.c b/src/mame/drivers/turbo.c
index 37125b52732..89229c8aa12 100644
--- a/src/mame/drivers/turbo.c
+++ b/src/mame/drivers/turbo.c
@@ -646,7 +646,7 @@ static WRITE8_HANDLER( buckrog_ppi8255_0_w )
{
/* the port C handshaking signals control the sub CPU IRQ, */
/* 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);
}
diff --git a/src/mame/drivers/ultratnk.c b/src/mame/drivers/ultratnk.c
index 34f3bf29b53..ca09c1da6d3 100644
--- a/src/mame/drivers/ultratnk.c
+++ b/src/mame/drivers/ultratnk.c
@@ -61,13 +61,13 @@ static TIMER_CALLBACK( nmi_callback )
cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
}
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, nmi_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, nmi_callback);
}
static MACHINE_RESET( ultratnk )
{
- timer_set(video_screen_get_time_until_pos(0, 32, 0), 32, nmi_callback);
+ timer_set(video_screen_get_time_until_pos(0, 32, 0), NULL, 32, nmi_callback);
}
diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c
index a91fffe987e..a33313dd826 100644
--- a/src/mame/drivers/undrfire.c
+++ b/src/mame/drivers/undrfire.c
@@ -295,7 +295,7 @@ static READ32_HANDLER( unknown_hardware_r )
static WRITE32_HANDLER( unknown_int_req_w )
{
/* 10000 cycle delay is arbitrary */
- timer_set(ATTOTIME_IN_CYCLES(10000,0),0, undrfire_interrupt5);
+ timer_set(ATTOTIME_IN_CYCLES(10000,0), NULL, 0, undrfire_interrupt5);
}
diff --git a/src/mame/drivers/unico.c b/src/mame/drivers/unico.c
index d5b3f59f39f..a3ac671d546 100644
--- a/src/mame/drivers/unico.c
+++ b/src/mame/drivers/unico.c
@@ -642,7 +642,7 @@ static MACHINE_RESET( unico )
}
-struct EEPROM_interface zeropnt2_eeprom_interface =
+static struct EEPROM_interface zeropnt2_eeprom_interface =
{
7, // address bits 7
8, // data bits 8
diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c
index 369018eca15..65d50b6a5f6 100644
--- a/src/mame/drivers/vaportra.c
+++ b/src/mame/drivers/vaportra.c
@@ -27,7 +27,7 @@ WRITE16_HANDLER( vaportra_palette_24bit_b_w );
static WRITE16_HANDLER( vaportra_sound_w )
{
/* Force synchronisation between CPUs with fake timer */
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
soundlatch_w(0,data & 0xff);
cpunum_set_input_line(1,0,ASSERT_LINE);
}
diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c
index d6a78a55e9f..3ca0d54e285 100644
--- a/src/mame/drivers/vegas.c
+++ b/src/mame/drivers/vegas.c
@@ -499,7 +499,7 @@ static struct dynamic_address
*************************************/
static void vblank_assert(int state);
-static TIMER_CALLBACK( timer_callback );
+static TIMER_CALLBACK( nile_timer_callback );
static void ide_interrupt(int state);
static void remap_dynamic_addresses(void);
@@ -576,10 +576,10 @@ static MACHINE_RESET( vegas )
cpunum_set_info_int(0, CPUINFO_INT_MIPS3_FASTRAM_READONLY, 1);
/* allocate timers for the NILE */
- timer[0] = timer_alloc(NULL);
- timer[1] = timer_alloc(NULL);
- timer[2] = timer_alloc(timer_callback);
- timer[3] = timer_alloc(timer_callback);
+ timer[0] = timer_alloc(NULL, NULL);
+ timer[1] = timer_alloc(NULL, NULL);
+ timer[2] = timer_alloc(nile_timer_callback, NULL);
+ timer[3] = timer_alloc(nile_timer_callback, NULL);
/* reset dynamic addressing */
memset(nile_regs, 0, 0x1000);
@@ -952,7 +952,7 @@ static void update_nile_irqs(void)
}
-static TIMER_CALLBACK( timer_callback )
+static TIMER_CALLBACK( nile_timer_callback )
{
int which = param;
UINT32 *regs = &nile_regs[NREG_T0CTRL + which * 4];
diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c
index 67477a74783..a67a5f3829c 100644
--- a/src/mame/drivers/vendetta.c
+++ b/src/mame/drivers/vendetta.c
@@ -244,7 +244,7 @@ static WRITE8_HANDLER( z80_arm_nmi_w )
{
cpunum_set_input_line(1, INPUT_LINE_NMI, CLEAR_LINE );
- timer_set( ATTOTIME_IN_USEC( 25 ), 0, z80_nmi_callback );
+ timer_set( ATTOTIME_IN_USEC( 25 ), NULL, 0, z80_nmi_callback );
}
static WRITE8_HANDLER( z80_irq_w )
diff --git a/src/mame/drivers/vicdual.c b/src/mame/drivers/vicdual.c
index 355da81e84e..b7ff8dd86e5 100644
--- a/src/mame/drivers/vicdual.c
+++ b/src/mame/drivers/vicdual.c
@@ -95,7 +95,7 @@ static UINT32 vicdual_read_coin_status(void *param)
cpunum_set_input_line(0, INPUT_LINE_RESET, PULSE_LINE);
/* simulate the coin switch being closed for a while */
- timer_set(double_to_attotime(4 * attotime_to_double(video_screen_get_frame_period(0))), 0, clear_coin_status);
+ timer_set(double_to_attotime(4 * attotime_to_double(video_screen_get_frame_period(0))), NULL, 0, clear_coin_status);
}
last_coin_input = coin_input;
@@ -174,7 +174,7 @@ static UINT32 vicdual_get_timer_value(void *param)
{
timer_started = 1;
- timer_pulse(TIMER_HALF_PERIOD, 0, vicdual_timer_callback);
+ timer_pulse(TIMER_HALF_PERIOD, NULL, 0, vicdual_timer_callback);
}
return timer_value;
diff --git a/src/mame/drivers/victory.c b/src/mame/drivers/victory.c
index 3be57627191..a53894ac766 100644
--- a/src/mame/drivers/victory.c
+++ b/src/mame/drivers/victory.c
@@ -154,7 +154,7 @@ static TIMER_CALLBACK( delayed_command_w )
static WRITE8_HANDLER( sound_command_w )
{
- timer_call_after_resynch(data, delayed_command_w);
+ timer_call_after_resynch(NULL, data, delayed_command_w);
}
diff --git a/src/mame/drivers/videopin.c b/src/mame/drivers/videopin.c
index cac8d820ee3..254ab3471f6 100644
--- a/src/mame/drivers/videopin.c
+++ b/src/mame/drivers/videopin.c
@@ -65,13 +65,13 @@ static TIMER_CALLBACK( interrupt_callback )
scanline = 32;
}
- 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( videopin )
{
- timer_set(video_screen_get_time_until_pos(0, 32, 0), 32, interrupt_callback);
+ timer_set(video_screen_get_time_until_pos(0, 32, 0), NULL, 32, interrupt_callback);
/* both output latches are cleared on reset */
diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c
index cb96098dac2..2babf92a8c5 100644
--- a/src/mame/drivers/wgp.c
+++ b/src/mame/drivers/wgp.c
@@ -488,7 +488,7 @@ static TIMER_CALLBACK( wgp_cpub_interrupt6 )
static INTERRUPT_GEN( wgp_cpub_interrupt )
{
- timer_set(ATTOTIME_IN_CYCLES(200000-500,0),0, wgp_cpub_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(200000-500,0), NULL, 0, wgp_cpub_interrupt6);
cpunum_set_input_line(2, 4, HOLD_LINE);
}
@@ -611,7 +611,7 @@ static WRITE16_HANDLER( wgp_adinput_w )
hardware has got the next a/d conversion ready. We set a token
delay of 10000 cycles although our inputs are always ready. */
- timer_set(ATTOTIME_IN_CYCLES(10000,0),0, wgp_interrupt6);
+ timer_set(ATTOTIME_IN_CYCLES(10000,0), NULL, 0, wgp_interrupt6);
}
diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c
index 599ff53d619..a7068f9924e 100644
--- a/src/mame/drivers/wheelfir.c
+++ b/src/mame/drivers/wheelfir.c
@@ -569,7 +569,7 @@ static void render_background_to_render_buffer(int scanline)
static TIMER_CALLBACK( scanline_timer_callback )
{
- timer_call_after_resynch(0, 0);
+ timer_call_after_resynch(NULL, 0, 0);
if (scanline_counter!=(total_scanlines-1))
{
@@ -612,8 +612,8 @@ static VIDEO_EOF( wheelfir )
static MACHINE_RESET(wheelfir)
{
- frame_timer = timer_alloc(frame_timer_callback);
- scanline_timer = timer_alloc(scanline_timer_callback);
+ frame_timer = timer_alloc(frame_timer_callback, NULL);
+ scanline_timer = timer_alloc(scanline_timer_callback, NULL);
timer_adjust(frame_timer, attotime_zero, 0, attotime_zero);
timer_adjust(scanline_timer, attotime_zero, 0, attotime_zero);
scanline_counter = -1;
diff --git a/src/mame/drivers/wink.c b/src/mame/drivers/wink.c
index 53735825955..625a9444fe1 100644
--- a/src/mame/drivers/wink.c
+++ b/src/mame/drivers/wink.c
@@ -57,7 +57,7 @@ static WRITE8_HANDLER( sound_irq_w )
{
cpunum_set_input_line(1,0,HOLD_LINE);
//sync with sound cpu (but it still loses some soundlatches...)
- //timer_call_after_resynch(0, NULL);
+ //timer_call_after_resynch(NULL, 0, NULL);
}
static ADDRESS_MAP_START( wink_map, ADDRESS_SPACE_PROGRAM, 8 )
diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c
index ce0c65a899c..c7380bfe75a 100644
--- a/src/mame/drivers/witch.c
+++ b/src/mame/drivers/witch.c
@@ -655,7 +655,7 @@ F180 kkkbbppp ; Read on port 0xA005
INPUT_PORTS_END
-struct ES8712interface es8712_interface =
+static struct ES8712interface es8712_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/wolfpack.c b/src/mame/drivers/wolfpack.c
index 986ff3820b9..32ce955952b 100644
--- a/src/mame/drivers/wolfpack.c
+++ b/src/mame/drivers/wolfpack.c
@@ -47,13 +47,13 @@ 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);
}
static MACHINE_RESET( wolfpack )
{
- 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);
}
diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c
index 269a1fa5543..44ea5706197 100644
--- a/src/mame/drivers/xexex.c
+++ b/src/mame/drivers/xexex.c
@@ -633,7 +633,7 @@ static MACHINE_START( xexex )
resume_trigger = 1000;
- dmadelay_timer = timer_alloc(dmaend_callback);
+ dmadelay_timer = timer_alloc(dmaend_callback, NULL);
}
diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c
index 362b500acdc..0b1380d120d 100644
--- a/src/mame/drivers/zaccaria.c
+++ b/src/mame/drivers/zaccaria.c
@@ -272,7 +272,7 @@ static WRITE8_HANDLER( mc1408_data_w )
}
-extern game_driver driver_monymony;
+extern const game_driver driver_monymony;
static READ8_HANDLER( zaccaria_prot1_r )
{
diff --git a/src/mame/includes/centiped.h b/src/mame/includes/centiped.h
index dc88af7b0c6..50e2a57bde3 100644
--- a/src/mame/includes/centiped.h
+++ b/src/mame/includes/centiped.h
@@ -30,3 +30,5 @@ WRITE8_HANDLER( centiped_flip_screen_w );
WRITE8_HANDLER( bullsdrt_tilesbank_w );
WRITE8_HANDLER( bullsdrt_sprites_bank_w );
+WRITE8_HANDLER( mazeinv_paletteram_w );
+
diff --git a/src/mame/includes/eprom.h b/src/mame/includes/eprom.h
index c4fd1b09825..fc057b13085 100644
--- a/src/mame/includes/eprom.h
+++ b/src/mame/includes/eprom.h
@@ -9,4 +9,7 @@
VIDEO_START( eprom );
VIDEO_UPDATE( eprom );
+VIDEO_START( guts );
+VIDEO_UPDATE( guts );
+
void eprom_scanline_update(running_machine *machine, int scrnum, int scanline);
diff --git a/src/mame/includes/n64.h b/src/mame/includes/n64.h
index 8b4877b5daf..ee14cb9084e 100644
--- a/src/mame/includes/n64.h
+++ b/src/mame/includes/n64.h
@@ -1,6 +1,8 @@
#ifndef _INCLUDES_N64_H_
#define _INCLUDES_N64_H_
+#include "cpu/rsp/rsp.h"
+
/*----------- defined in video/n64.c -----------*/
extern VIDEO_START( n64 );
@@ -40,6 +42,8 @@ extern void rdp_process_list(void);
/*----------- defined in machine/n64.c -----------*/
+extern rsp_config n64_rsp_config;
+
extern UINT32 *rdram;
extern UINT32 *rsp_imem;
extern UINT32 *rsp_dmem;
diff --git a/src/mame/includes/system24.h b/src/mame/includes/segas24.h
index f719d5001fc..f719d5001fc 100644
--- a/src/mame/includes/system24.h
+++ b/src/mame/includes/segas24.h
diff --git a/src/mame/layout/pe_bjack.lay b/src/mame/layout/pe_bjack.lay
new file mode 100644
index 00000000000..743be6de714
--- /dev/null
+++ b/src/mame/layout/pe_bjack.lay
@@ -0,0 +1,267 @@
+<!-- pe_bjack.lay -->
+
+<mamelayout version="2">
+ <element name="bezel">
+ </element>
+
+ <!-- specific elements to a kind of machine -->
+ <element name="surrender" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="SURRENDER">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="stand" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="STAND">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="insurance" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="INSURANCE">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="double" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="DOUBLE">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="split" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="SPLIT">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <!-- change text depending on kind of machine -->
+ <element name="dealspinstart" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="DEAL/HIT">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <!-- shared elements by all kinds of machine -->
+ <element name="dooropen" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="DOOR OPEN">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper1" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper2" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 2">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="change" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.5" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+ <element name="changetext" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.0" green="0.0" blue="0.0" />
+ </rect>
+ <text string="CHANGE REQUEST ... CALLING ATTENDANT ...">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="bet1" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="BET 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="betmax" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="BET MAX">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="cashout" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="CASHOUT">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <view name="Bezel Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <!-- specific bezels to a kind of machine -->
+ <bezel name="pe_bnka7" element="surrender">
+ <bounds x="12" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnka6" element="stand">
+ <bounds x="76" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb0" element="insurance">
+ <bounds x="140" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb3" element="double">
+ <bounds x="204" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb7" element="split">
+ <bounds x="268" y="250" width="60" height="20" />
+ </bezel>
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb5" element="changetext">
+ <bounds x="20" y="10" width="300" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+
+ <view name="Debug Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <!-- specific bezels to a kind of machine -->
+ <bezel name="pe_bnka7" element="surrender">
+ <bounds x="12" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnka6" element="stand">
+ <bounds x="76" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb0" element="insurance">
+ <bounds x="140" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb3" element="double">
+ <bounds x="204" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb7" element="split">
+ <bounds x="268" y="250" width="60" height="20" />
+ </bezel>
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb6" element="dooropen">
+ <bounds x="10" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnka4" element="hopper1">
+ <bounds x="110" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnka5" element="hopper2">
+ <bounds x="210" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb5" element="change">
+ <bounds x="310" y="10" width="20" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/pe_keno.lay b/src/mame/layout/pe_keno.lay
new file mode 100644
index 00000000000..b632d9ea27d
--- /dev/null
+++ b/src/mame/layout/pe_keno.lay
@@ -0,0 +1,195 @@
+<!-- pe_keno.lay -->
+
+<mamelayout version="2">
+ <element name="bezel">
+ </element>
+
+ <!-- specific elements to a kind of machine -->
+ <element name="erase" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="ERASE">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <!-- change text depending on kind of machine -->
+ <element name="dealspinstart" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="START">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <!-- shared elements by all kinds of machine -->
+ <element name="dooropen" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="DOOR OPEN">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper1" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper2" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 2">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="change" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.5" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+ <element name="changetext" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.0" green="0.0" blue="0.0" />
+ </rect>
+ <text string="CHANGE REQUEST ... CALLING ATTENDANT ...">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="bet1" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="BET 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="betmax" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="BET MAX">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="cashout" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="CASHOUT">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <view name="Bezel Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <!-- specific bezels to a kind of machine -->
+ <bezel name="pe_bnkb7" element="erase">
+ <bounds x="268" y="250" width="60" height="20" />
+ </bezel>
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb5" element="changetext">
+ <bounds x="20" y="10" width="300" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+
+ <view name="Debug Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <!-- specific bezels to a kind of machine -->
+ <bezel name="pe_bnkb7" element="erase">
+ <bounds x="268" y="250" width="60" height="20" />
+ </bezel>
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb6" element="dooropen">
+ <bounds x="10" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnka4" element="hopper1">
+ <bounds x="110" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnka5" element="hopper2">
+ <bounds x="210" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb5" element="change">
+ <bounds x="310" y="10" width="20" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/pe_poker.lay b/src/mame/layout/pe_poker.lay
new file mode 100644
index 00000000000..c9bf3488d16
--- /dev/null
+++ b/src/mame/layout/pe_poker.lay
@@ -0,0 +1,219 @@
+<!-- pe_poker.lay -->
+
+<mamelayout version="2">
+ <element name="bezel">
+ </element>
+
+ <!-- specific elements to a kind of machine -->
+ <element name="hold" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOLD">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <!-- change text depending on kind of machine -->
+ <element name="dealspinstart" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="DRAW">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <!-- shared elements by all kinds of machine -->
+ <element name="dooropen" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="DOOR OPEN">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper1" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper2" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 2">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="change" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.5" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+ <element name="changetext" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.0" green="0.0" blue="0.0" />
+ </rect>
+ <text string="CHANGE REQUEST ... CALLING ATTENDANT ...">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="bet1" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="BET 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="betmax" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="BET MAX">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="cashout" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="CASHOUT">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <view name="Bezel Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <!-- specific bezels to a kind of machine -->
+ <bezel name="pe_bnkb3" element="hold">
+ <bounds x="12" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb0" element="hold">
+ <bounds x="76" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb0" element="hold">
+ <bounds x="140" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb0" element="hold">
+ <bounds x="204" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb7" element="hold">
+ <bounds x="268" y="250" width="60" height="20" />
+ </bezel>
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb5" element="changetext">
+ <bounds x="20" y="10" width="300" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+
+ <view name="Debug Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <!-- specific bezels to a kind of machine -->
+ <bezel name="pe_bnkb3" element="hold">
+ <bounds x="12" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb0" element="hold">
+ <bounds x="76" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb0" element="hold">
+ <bounds x="140" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb0" element="hold">
+ <bounds x="204" y="250" width="60" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb7" element="hold">
+ <bounds x="268" y="250" width="60" height="20" />
+ </bezel>
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb6" element="dooropen">
+ <bounds x="10" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnka4" element="hopper1">
+ <bounds x="110" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnka5" element="hopper2">
+ <bounds x="210" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb5" element="change">
+ <bounds x="310" y="10" width="20" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/pe_schip.lay b/src/mame/layout/pe_schip.lay
new file mode 100644
index 00000000000..96654cedacf
--- /dev/null
+++ b/src/mame/layout/pe_schip.lay
@@ -0,0 +1,31 @@
+<!-- pe_schip.lay -->
+
+<mamelayout version="2">
+ <element name="bezel">
+ </element>
+
+ <element name="dealspinstart" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="DEAL-SPIN-START">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <view name="Set Chip Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/pe_slots.lay b/src/mame/layout/pe_slots.lay
new file mode 100644
index 00000000000..0daba21a2fc
--- /dev/null
+++ b/src/mame/layout/pe_slots.lay
@@ -0,0 +1,180 @@
+<!-- pe_slots.lay -->
+
+<mamelayout version="2">
+ <element name="bezel">
+ </element>
+
+ <!-- specific elements to a kind of machine -->
+ <!-- NONE ! -->
+
+ <!-- change text depending on kind of machine -->
+ <element name="dealspinstart" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="SPIN">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <!-- shared elements by all kinds of machine -->
+ <element name="dooropen" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="DOOR OPEN">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper1" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper2" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 2">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="change" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.5" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+ <element name="changetext" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.0" green="0.0" blue="0.0" />
+ </rect>
+ <text string="CHANGE REQUEST ... CALLING ATTENDANT ...">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="bet1" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="BET 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="betmax" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="BET MAX">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="cashout" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="CASHOUT">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+
+ <view name="Bezel Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <!-- specific bezels to a kind of machine -->
+ <!-- NONE ! -->
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb5" element="changetext">
+ <bounds x="20" y="10" width="300" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+
+ <view name="Debug Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
+ </bezel>
+ <!-- specific bezels to a kind of machine -->
+ <!-- NONE ! -->
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb6" element="dooropen">
+ <bounds x="10" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnka4" element="hopper1">
+ <bounds x="110" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnka5" element="hopper2">
+ <bounds x="210" y="10" width="90" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb5" element="change">
+ <bounds x="310" y="10" width="20" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
+ </bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/peplus.lay b/src/mame/layout/peplus.lay
index b4f52bec975..7a51a81c540 100644
--- a/src/mame/layout/peplus.lay
+++ b/src/mame/layout/peplus.lay
@@ -4,75 +4,111 @@
<element name="bezel">
</element>
- <element name="hold" defstate="1">
+ <!-- specific elements to a kind of machine -->
+
+ <!-- change text depending on kind of machine -->
+ <element name="dealspinstart" defstate="1">
<rect state="0">
<color red="0.5" green="0.5" blue="0.5" />
</rect>
<rect state="1">
<color red="1.0" green="1.0" blue="1.0" />
</rect>
- <text string="HOLD">
+ <text string="START">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.8" />
</text>
</element>
- <element name="change" defstate="1">
+ <!-- shared elements by all kinds of machine -->
+ <element name="dooropen" defstate="1">
+ <rect state="0">
+ <color red="0.5" green="0.5" blue="0.5" />
+ </rect>
<rect state="1">
- <color red="1.0" green="0.0" blue="0.0" />
+ <color red="1.0" green="1.0" blue="1.0" />
</rect>
+ <text string="DOOR OPEN">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="hopper1" defstate="1">
<rect state="0">
- <color red="0.5" green="0.0" blue="0.0" />
+ <color red="0.5" green="0.5" blue="0.5" />
</rect>
+ <rect state="1">
+ <color red="1.0" green="1.0" blue="1.0" />
+ </rect>
+ <text string="HOPPER 1">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
</element>
-
- <element name="dooropen" defstate="1">
+ <element name="hopper2" defstate="1">
<rect state="0">
<color red="0.5" green="0.5" blue="0.5" />
</rect>
<rect state="1">
<color red="1.0" green="1.0" blue="1.0" />
</rect>
- <text string="DOOR OPEN">
+ <text string="HOPPER 2">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.8" />
</text>
</element>
-
- <element name="dealdraw" defstate="1">
+ <element name="change" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.5" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+ <element name="changetext" defstate="1">
+ <rect state="1">
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ <rect state="0">
+ <color red="0.0" green="0.0" blue="0.0" />
+ </rect>
+ <text string="CHANGE REQUEST ... CALLING ATTENDANT ...">
+ <color red="0.0" green="0.0" blue="0.0" />
+ <bounds x="0" y="0.1" width="1" height="0.8" />
+ </text>
+ </element>
+ <element name="bet1" defstate="1">
<rect state="0">
<color red="0.5" green="0.5" blue="0.5" />
</rect>
<rect state="1">
<color red="1.0" green="1.0" blue="1.0" />
</rect>
- <text string="DEAL DRAW">
+ <text string="BET 1">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.8" />
</text>
</element>
-
- <element name="cashout" defstate="1">
+ <element name="betmax" defstate="1">
<rect state="0">
<color red="0.5" green="0.5" blue="0.5" />
</rect>
<rect state="1">
<color red="1.0" green="1.0" blue="1.0" />
</rect>
- <text string="CASHOUT">
+ <text string="BET MAX">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.8" />
</text>
</element>
-
- <element name="betcredits" defstate="1">
+ <element name="cashout" defstate="1">
<rect state="0">
<color red="0.5" green="0.5" blue="0.5" />
</rect>
<rect state="1">
<color red="1.0" green="1.0" blue="1.0" />
</rect>
- <text string="BET CREDITS">
+ <text string="CASHOUT">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.8" />
</text>
@@ -85,35 +121,57 @@
<bezel element="bezel">
<bounds left="0" top="0" right="340" bottom="310" />
</bezel>
- <bezel name="lamp3" element="hold">
- <bounds x="50" y="250" width="40" height="20" />
+ <!-- specific bezels to a kind of machine -->
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb5" element="changetext">
+ <bounds x="20" y="10" width="300" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
+ </bezel>
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
</bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="100" y="250" width="40" height="20" />
+ </view>
+
+ <view name="Debug Lamps">
+ <screen index="0">
+ <bounds left="10" top="40" right="330" bottom="240" />
+ </screen>
+ <bezel element="bezel">
+ <bounds left="0" top="0" right="340" bottom="310" />
</bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="150" y="250" width="40" height="20" />
+ <!-- specific bezels to a kind of machine -->
+ <!-- shared bezels by all kinds of machine -->
+ <bezel name="pe_bnkb6" element="dooropen">
+ <bounds x="10" y="10" width="90" height="20" />
</bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="200" y="250" width="40" height="20" />
+ <bezel name="pe_bnka4" element="hopper1">
+ <bounds x="110" y="10" width="90" height="20" />
</bezel>
- <bezel name="lamp7" element="hold">
- <bounds x="250" y="250" width="40" height="20" />
+ <bezel name="pe_bnka5" element="hopper2">
+ <bounds x="210" y="10" width="90" height="20" />
</bezel>
- <bezel name="lamp5" element="change">
+ <bezel name="pe_bnkb5" element="change">
<bounds x="310" y="10" width="20" height="20" />
</bezel>
- <bezel name="lamp6" element="dooropen">
- <bounds x="10" y="10" width="100" height="20" />
+ <bezel name="pe_bnkb1" element="dealspinstart">
+ <bounds x="10" y="280" width="74" height="20" />
</bezel>
- <bezel name="lamp1" element="dealdraw">
- <bounds x="10" y="280" width="100" height="20" />
+ <bezel name="pe_bnkb4" element="bet1">
+ <bounds x="92" y="280" width="74" height="20" />
</bezel>
- <bezel name="lamp2" element="cashout">
- <bounds x="120" y="280" width="100" height="20" />
+ <bezel name="pe_bnkb4" element="betmax">
+ <bounds x="174" y="280" width="74" height="20" />
</bezel>
- <bezel name="lamp4" element="betcredits">
- <bounds x="230" y="280" width="100" height="20" />
+ <bezel name="pe_bnkb2" element="cashout">
+ <bounds x="256" y="280" width="74" height="20" />
</bezel>
</view>
</mamelayout>
diff --git a/src/mame/layout/pepp0158.lay b/src/mame/layout/pepp0158.lay
deleted file mode 100644
index b4f52bec975..00000000000
--- a/src/mame/layout/pepp0158.lay
+++ /dev/null
@@ -1,119 +0,0 @@
-<!-- peplus.lay -->
-
-<mamelayout version="2">
- <element name="bezel">
- </element>
-
- <element name="hold" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="HOLD">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="change" defstate="1">
- <rect state="1">
- <color red="1.0" green="0.0" blue="0.0" />
- </rect>
- <rect state="0">
- <color red="0.5" green="0.0" blue="0.0" />
- </rect>
- </element>
-
- <element name="dooropen" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="DOOR OPEN">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="dealdraw" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="DEAL DRAW">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="cashout" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="CASHOUT">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="betcredits" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="BET CREDITS">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <view name="Bezel Lamps">
- <screen index="0">
- <bounds left="10" top="40" right="330" bottom="240" />
- </screen>
- <bezel element="bezel">
- <bounds left="0" top="0" right="340" bottom="310" />
- </bezel>
- <bezel name="lamp3" element="hold">
- <bounds x="50" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="100" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="150" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="200" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp7" element="hold">
- <bounds x="250" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp5" element="change">
- <bounds x="310" y="10" width="20" height="20" />
- </bezel>
- <bezel name="lamp6" element="dooropen">
- <bounds x="10" y="10" width="100" height="20" />
- </bezel>
- <bezel name="lamp1" element="dealdraw">
- <bounds x="10" y="280" width="100" height="20" />
- </bezel>
- <bezel name="lamp2" element="cashout">
- <bounds x="120" y="280" width="100" height="20" />
- </bezel>
- <bezel name="lamp4" element="betcredits">
- <bounds x="230" y="280" width="100" height="20" />
- </bezel>
- </view>
-</mamelayout>
diff --git a/src/mame/layout/pepp0188.lay b/src/mame/layout/pepp0188.lay
deleted file mode 100644
index b4f52bec975..00000000000
--- a/src/mame/layout/pepp0188.lay
+++ /dev/null
@@ -1,119 +0,0 @@
-<!-- peplus.lay -->
-
-<mamelayout version="2">
- <element name="bezel">
- </element>
-
- <element name="hold" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="HOLD">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="change" defstate="1">
- <rect state="1">
- <color red="1.0" green="0.0" blue="0.0" />
- </rect>
- <rect state="0">
- <color red="0.5" green="0.0" blue="0.0" />
- </rect>
- </element>
-
- <element name="dooropen" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="DOOR OPEN">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="dealdraw" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="DEAL DRAW">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="cashout" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="CASHOUT">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="betcredits" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="BET CREDITS">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <view name="Bezel Lamps">
- <screen index="0">
- <bounds left="10" top="40" right="330" bottom="240" />
- </screen>
- <bezel element="bezel">
- <bounds left="0" top="0" right="340" bottom="310" />
- </bezel>
- <bezel name="lamp3" element="hold">
- <bounds x="50" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="100" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="150" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="200" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp7" element="hold">
- <bounds x="250" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp5" element="change">
- <bounds x="310" y="10" width="20" height="20" />
- </bezel>
- <bezel name="lamp6" element="dooropen">
- <bounds x="10" y="10" width="100" height="20" />
- </bezel>
- <bezel name="lamp1" element="dealdraw">
- <bounds x="10" y="280" width="100" height="20" />
- </bezel>
- <bezel name="lamp2" element="cashout">
- <bounds x="120" y="280" width="100" height="20" />
- </bezel>
- <bezel name="lamp4" element="betcredits">
- <bounds x="230" y="280" width="100" height="20" />
- </bezel>
- </view>
-</mamelayout>
diff --git a/src/mame/layout/peset038.lay b/src/mame/layout/peset038.lay
deleted file mode 100644
index b4f52bec975..00000000000
--- a/src/mame/layout/peset038.lay
+++ /dev/null
@@ -1,119 +0,0 @@
-<!-- peplus.lay -->
-
-<mamelayout version="2">
- <element name="bezel">
- </element>
-
- <element name="hold" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="HOLD">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="change" defstate="1">
- <rect state="1">
- <color red="1.0" green="0.0" blue="0.0" />
- </rect>
- <rect state="0">
- <color red="0.5" green="0.0" blue="0.0" />
- </rect>
- </element>
-
- <element name="dooropen" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="DOOR OPEN">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="dealdraw" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="DEAL DRAW">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="cashout" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="CASHOUT">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <element name="betcredits" defstate="1">
- <rect state="0">
- <color red="0.5" green="0.5" blue="0.5" />
- </rect>
- <rect state="1">
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- <text string="BET CREDITS">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0" y="0.1" width="1" height="0.8" />
- </text>
- </element>
-
- <view name="Bezel Lamps">
- <screen index="0">
- <bounds left="10" top="40" right="330" bottom="240" />
- </screen>
- <bezel element="bezel">
- <bounds left="0" top="0" right="340" bottom="310" />
- </bezel>
- <bezel name="lamp3" element="hold">
- <bounds x="50" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="100" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="150" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp0" element="hold">
- <bounds x="200" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp7" element="hold">
- <bounds x="250" y="250" width="40" height="20" />
- </bezel>
- <bezel name="lamp5" element="change">
- <bounds x="310" y="10" width="20" height="20" />
- </bezel>
- <bezel name="lamp6" element="dooropen">
- <bounds x="10" y="10" width="100" height="20" />
- </bezel>
- <bezel name="lamp1" element="dealdraw">
- <bounds x="10" y="280" width="100" height="20" />
- </bezel>
- <bezel name="lamp2" element="cashout">
- <bounds x="120" y="280" width="100" height="20" />
- </bezel>
- <bezel name="lamp4" element="betcredits">
- <bounds x="230" y="280" width="100" height="20" />
- </bezel>
- </view>
-</mamelayout>
diff --git a/src/mame/layout/tceptor2.lay b/src/mame/layout/tceptor2.lay
new file mode 100644
index 00000000000..f2dd2fbeee2
--- /dev/null
+++ b/src/mame/layout/tceptor2.lay
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+ <view name="3D Glasses Side-by-Side">
+ <screen index="1">
+ <bounds x="0" y="0" width="4" height="3" />
+ </screen>
+ <screen index="2">
+ <bounds x="4.03" y="0" width="4" height="3" />
+ </screen>
+ </view>
+ <view name="3D Glasses Left">
+ <screen index="1">
+ <bounds x="0" y="0" width="4" height="3" />
+ </screen>
+ </view>
+ <view name="3D Glasses Right">
+ <screen index="2">
+ <bounds x="0" y="0" width="4" height="3" />
+ </screen>
+ </view>
+</mamelayout>
diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c
index 8194a4943f3..2bdd46ca2c0 100644
--- a/src/mame/machine/amiga.c
+++ b/src/mame/machine/amiga.c
@@ -293,8 +293,8 @@ void amiga_machine_config(const amiga_machine_interface *intf)
cia_config(1, &cia_intf[1]);
/* setup the timers */
- amiga_irq_timer = timer_alloc(amiga_irq_proc);
- amiga_blitter_timer = timer_alloc(amiga_blitter_proc);
+ amiga_irq_timer = timer_alloc(amiga_irq_proc, NULL);
+ amiga_blitter_timer = timer_alloc(amiga_blitter_proc, NULL);
}
@@ -1308,7 +1308,7 @@ WRITE16_HANDLER( amiga_custom_w )
if (amiga_intf->serdat_w != NULL)
(*amiga_intf->serdat_w)(data);
CUSTOM_REG(REG_SERDATR) &= ~0x3000;
- timer_set(amiga_get_serial_char_period(), 0, finish_serial_write);
+ timer_set(amiga_get_serial_char_period(), NULL, 0, finish_serial_write);
break;
case REG_BLTSIZE:
diff --git a/src/mame/machine/arkanoid.c b/src/mame/machine/arkanoid.c
index 1112886118c..7219739021d 100644
--- a/src/mame/machine/arkanoid.c
+++ b/src/mame/machine/arkanoid.c
@@ -60,7 +60,7 @@ static TIMER_CALLBACK( test )
WRITE8_HANDLER( arkanoid_Z80_mcu_w )
{
- timer_call_after_resynch(data, test);
+ timer_call_after_resynch(NULL, data, test);
/* boost the interleave for a few usecs to make sure it is read successfully */
cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(10));
}
diff --git a/src/mame/machine/asic65.c b/src/mame/machine/asic65.c
index a6f464ef29a..4ba35a1f98b 100644
--- a/src/mame/machine/asic65.c
+++ b/src/mame/machine/asic65.c
@@ -193,7 +193,7 @@ WRITE16_HANDLER( asic65_data_w )
/* rom-based use a deferred write mechanism */
if (asic65_type == ASIC65_ROMBASED)
{
- timer_call_after_resynch(data | (offset << 16), m68k_asic65_deferred_w);
+ timer_call_after_resynch(NULL, data | (offset << 16), m68k_asic65_deferred_w);
cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(20));
return;
}
diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c
index ddff7ce6da5..068f5df308d 100644
--- a/src/mame/machine/atarigen.c
+++ b/src/mame/machine/atarigen.c
@@ -143,10 +143,10 @@ void atarigen_interrupt_reset(atarigen_int_callback update_int)
/* create timers */
for (i = 0; i < ATARIMO_MAX; i++)
- scanline_timer[i] = timer_alloc(scanline_timer_callback);
+ scanline_timer[i] = timer_alloc(scanline_timer_callback, NULL);
/* create a timer for scanlines */
- scanline_interrupt_timer = timer_alloc(scanline_interrupt_callback);
+ scanline_interrupt_timer = timer_alloc(scanline_interrupt_callback, NULL);
}
@@ -595,7 +595,7 @@ void atarigen_ym2151_irq_gen(int irq)
WRITE16_HANDLER( atarigen_sound_reset_w )
{
- timer_call_after_resynch(0, delayed_sound_reset);
+ timer_call_after_resynch(NULL, 0, delayed_sound_reset);
}
@@ -606,7 +606,7 @@ WRITE16_HANDLER( atarigen_sound_reset_w )
void atarigen_sound_reset(void)
{
- timer_call_after_resynch(1, delayed_sound_reset);
+ timer_call_after_resynch(NULL, 1, delayed_sound_reset);
}
@@ -620,19 +620,19 @@ void atarigen_sound_reset(void)
WRITE16_HANDLER( atarigen_sound_w )
{
if (ACCESSING_LSB)
- timer_call_after_resynch(data & 0xff, delayed_sound_w);
+ timer_call_after_resynch(NULL, data & 0xff, delayed_sound_w);
}
WRITE16_HANDLER( atarigen_sound_upper_w )
{
if (ACCESSING_MSB)
- timer_call_after_resynch((data >> 8) & 0xff, delayed_sound_w);
+ timer_call_after_resynch(NULL, (data >> 8) & 0xff, delayed_sound_w);
}
WRITE32_HANDLER( atarigen_sound_upper32_w )
{
if (ACCESSING_MSB32)
- timer_call_after_resynch((data >> 24) & 0xff, delayed_sound_w);
+ timer_call_after_resynch(NULL, (data >> 24) & 0xff, delayed_sound_w);
}
@@ -672,7 +672,7 @@ READ32_HANDLER( atarigen_sound_upper32_r )
WRITE8_HANDLER( atarigen_6502_sound_w )
{
- timer_call_after_resynch(data, delayed_6502_sound_w);
+ timer_call_after_resynch(NULL, data, delayed_6502_sound_w);
}
@@ -936,7 +936,7 @@ void atarivc_reset(int scrnum, UINT16 *eof_data, int playfields)
atarivc_state.latch1 = atarivc_state.latch2 = -1;
actual_vc_latch0 = actual_vc_latch1 = -1;
- atarivc_eof_update_timer[scrnum] = timer_alloc(atarivc_eof_update);
+ atarivc_eof_update_timer[scrnum] = timer_alloc(atarivc_eof_update, NULL);
/* start a timer to go off a little before scanline 0 */
if (atarivc_eof_data)
@@ -1297,7 +1297,7 @@ WRITE16_HANDLER( atarigen_halt_until_hblank_0_w )
/* halt and set a timer to wake up */
fraction = (double)(hblank - hpos) / (double)Machine->screen[0].width;
- timer_set(double_to_attotime(attotime_to_double(video_screen_get_scan_period(0)) * fraction), 0, unhalt_cpu);
+ timer_set(double_to_attotime(attotime_to_double(video_screen_get_scan_period(0)) * fraction), NULL, 0, unhalt_cpu);
cpunum_set_input_line(0, INPUT_LINE_HALT, ASSERT_LINE);
}
diff --git a/src/mame/machine/balsente.c b/src/mame/machine/balsente.c
index cfe4ec0332d..3d76236ed43 100644
--- a/src/mame/machine/balsente.c
+++ b/src/mame/machine/balsente.c
@@ -119,7 +119,7 @@ static TIMER_CALLBACK( interrupt_timer )
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);
/* if this is Grudge Match, update the steering */
if (grudge_steering_result & 0x80)
@@ -155,14 +155,14 @@ MACHINE_RESET( balsente )
/* reset counters; counter 2's gate is tied high */
memset(counter, 0, sizeof(counter));
- counter[1].timer = timer_alloc(counter_callback);
- counter[2].timer = timer_alloc(counter_callback);
+ counter[1].timer = timer_alloc(counter_callback, NULL);
+ counter[2].timer = timer_alloc(counter_callback, NULL);
counter[2].gate = 1;
/* reset the manual counter 0 clock */
counter_control = 0x00;
counter_0_ff = 0;
- counter_0_timer = timer_alloc(clock_counter_0_ff);
+ counter_0_timer = timer_alloc(clock_counter_0_ff, NULL);
counter_0_timer_active = 0;
/* reset the ADC states */
@@ -191,7 +191,7 @@ MACHINE_RESET( balsente )
memory_set_bank(2, 0);
/* start a timer to generate interrupts */
- scanline_timer = timer_alloc(interrupt_timer);
+ scanline_timer = timer_alloc(interrupt_timer, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
/* register for saving */
@@ -525,7 +525,7 @@ static TIMER_CALLBACK( m6850_w_callback )
/* set a timer for 500usec later to actually transmit the data */
/* (this is very important for several games, esp Snacks'n Jaxson) */
- timer_set(ATTOTIME_IN_USEC(500), param, m6850_data_ready_callback);
+ timer_set(ATTOTIME_IN_USEC(500), NULL, param, m6850_data_ready_callback);
}
@@ -542,7 +542,7 @@ WRITE8_HANDLER( balsente_m6850_w )
/* output register is at offset 1; set a timer to synchronize the CPUs */
else
- timer_call_after_resynch(data, m6850_w_callback);
+ timer_call_after_resynch(NULL, data, m6850_w_callback);
}
@@ -661,7 +661,7 @@ WRITE8_HANDLER( balsente_adc_select_w )
/* set a timer to go off and read the value after 50us */
/* it's important that we do this for Mini Golf */
logerror("adc_select %d\n", offset & 7);
- timer_set(ATTOTIME_IN_USEC(50), offset & 7, adc_finished);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, offset & 7, adc_finished);
}
@@ -909,7 +909,7 @@ static void set_counter_0_ff(running_machine *machine, int newstate)
{
counter[0].count--;
if (counter[0].count == 0)
- counter_callback(machine, 0);
+ counter_callback(machine, NULL, 0);
}
}
diff --git a/src/mame/machine/bublbobl.c b/src/mame/machine/bublbobl.c
index 9f2812b5ac4..e57a3a0e79f 100644
--- a/src/mame/machine/bublbobl.c
+++ b/src/mame/machine/bublbobl.c
@@ -105,7 +105,7 @@ static TIMER_CALLBACK( nmi_callback )
WRITE8_HANDLER( bublbobl_sound_command_w )
{
soundlatch_w(offset,data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
WRITE8_HANDLER( bublbobl_sh_nmi_disable_w )
diff --git a/src/mame/machine/cubocd32.c b/src/mame/machine/cubocd32.c
index 93c1898dfbc..5ff4a4c64b1 100644
--- a/src/mame/machine/cubocd32.c
+++ b/src/mame/machine/cubocd32.c
@@ -94,8 +94,8 @@ void amiga_akiko_init(void)
akiko.cdrom_cmd_resp = 0;
akiko.cdrom = cdrom_open(get_disk_handle(0));
akiko.cdrom_toc = NULL;
- akiko.dma_timer = timer_alloc(akiko_dma_proc);
- akiko.frame_timer = timer_alloc(akiko_frame_proc);
+ akiko.dma_timer = timer_alloc(akiko_dma_proc, NULL);
+ akiko.frame_timer = timer_alloc(akiko_frame_proc, NULL);
/* create the TOC table */
if ( akiko.cdrom != NULL && cdrom_get_last_track(akiko.cdrom) )
@@ -679,7 +679,7 @@ static void akiko_update_cdrom( void )
{
akiko.cdrom_cmd_start = (akiko.cdrom_cmd_start+3) & 0xff;
- timer_set( ATTOTIME_IN_MSEC(1), resp[0], akiko_cd_delayed_cmd );
+ timer_set( ATTOTIME_IN_MSEC(1), NULL, resp[0], akiko_cd_delayed_cmd );
break;
}
diff --git a/src/mame/machine/dec0.c b/src/mame/machine/dec0.c
index 41821b576b0..b8dfedf5967 100644
--- a/src/mame/machine/dec0.c
+++ b/src/mame/machine/dec0.c
@@ -483,7 +483,7 @@ void dec0_i8751_write(int data)
if (i8751_timer)
logerror("i8751: Missed a timer!!!\n");
else
- i8751_timer = timer_call_after_resynch(0, i8751_callback);*/
+ i8751_timer = timer_call_after_resynch(NULL, 0, i8751_callback);*/
/* There is a timing problem in Heavy Barrel if the processing time is not
simulated - if the interrupt is triggered straight away then HB will reset
diff --git a/src/mame/machine/decocass.c b/src/mame/machine/decocass.c
index 4af788d0b08..141629de08c 100644
--- a/src/mame/machine/decocass.c
+++ b/src/mame/machine/decocass.c
@@ -1657,7 +1657,7 @@ static void decocass_init_common(void)
tape_dir = 0;
tape_speed = 0;
- tape_timer = timer_alloc(NULL);
+ tape_timer = timer_alloc(NULL, NULL);
firsttime = 1;
tape_present = 1;
@@ -1711,7 +1711,7 @@ static void decocass_init_common(void)
memset(decocass_quadrature_decoder, 0, sizeof(decocass_quadrature_decoder));
decocass_sound_ack = 0;
- decocass_sound_timer = timer_alloc(decocass_sound_nmi_pulse);
+ decocass_sound_timer = timer_alloc(decocass_sound_nmi_pulse, NULL);
}
MACHINE_RESET( decocass )
diff --git a/src/mame/machine/equites.c b/src/mame/machine/equites.c
index 47b89a85301..5d0fc9b48e1 100644
--- a/src/mame/machine/equites.c
+++ b/src/mame/machine/equites.c
@@ -258,7 +258,7 @@ void equites_8404init(void)
mrulemap = (struct MRULELIST *)byte_ptr; // pointer table to rule lists
mrulepool = (struct MRULE *)(byte_ptr + 0x4000); // rules pool
- timer_pulse(ATTOTIME_IN_HZ(106), 0, equites_synth_callback); // hand tuned
+ timer_pulse(ATTOTIME_IN_HZ(106), NULL, 0, equites_synth_callback); // hand tuned
seedMT(mame_rand(Machine));
}
diff --git a/src/mame/machine/galaxian.c b/src/mame/machine/galaxian.c
index 6616a14f733..667d3a2319d 100644
--- a/src/mame/machine/galaxian.c
+++ b/src/mame/machine/galaxian.c
@@ -84,7 +84,7 @@ static void machine_reset_common( int line )
TTL7474_preset_w(1, 0);
/* start a timer to generate interrupts */
- int_timer = timer_alloc(interrupt_timer);
+ int_timer = timer_alloc(interrupt_timer, NULL);
timer_adjust(int_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
}
diff --git a/src/mame/machine/harddriv.c b/src/mame/machine/harddriv.c
index 76d4b3b8dbc..42c2b6105a8 100644
--- a/src/mame/machine/harddriv.c
+++ b/src/mame/machine/harddriv.c
@@ -200,7 +200,7 @@ MACHINE_RESET( harddriv )
memset(duart_read_data, 0, sizeof(duart_read_data));
memset(duart_write_data, 0, sizeof(duart_write_data));
duart_output_port = 0;
- duart_timer = timer_alloc(duart_callback);
+ duart_timer = timer_alloc(duart_callback, NULL);
/* reset the ADSP/DSIII/DSIV boards */
adsp_halt = 1;
@@ -783,7 +783,7 @@ INLINE void stmsp_sync_w(int which, offs_t offset, UINT16 data, UINT16 mem_mask)
/* if being written from the 68000, synchronize on it */
if (hd34010_host_access)
- timer_call_after_resynch(newdata | (offset << 16) | (which << 28), stmsp_sync_update);
+ timer_call_after_resynch(NULL, newdata | (offset << 16) | (which << 28), stmsp_sync_update);
/* otherwise, just update */
else
@@ -871,7 +871,7 @@ WRITE16_HANDLER( hd68k_adsp_data_w )
if (offset == 0x1fff)
{
logerror("%06X:ADSP sync address written (%04X)\n", activecpu_get_previouspc(), data);
- timer_call_after_resynch(0, 0);
+ timer_call_after_resynch(NULL, 0, 0);
cpu_triggerint(hdcpu_adsp);
}
else
@@ -974,7 +974,7 @@ WRITE16_HANDLER( hd68k_adsp_control_w )
case 3:
logerror("ADSP bank = %d (deferred)\n", val);
- timer_call_after_resynch(val, deferred_adsp_bank_switch);
+ timer_call_after_resynch(NULL, val, deferred_adsp_bank_switch);
break;
case 5:
@@ -1571,7 +1571,7 @@ WRITE32_HANDLER( rddsp32_sync0_w )
COMBINE_DATA(&newdata);
dataptr[next_msp_sync % MAX_MSP_SYNC] = dptr;
dataval[next_msp_sync % MAX_MSP_SYNC] = newdata;
- timer_call_after_resynch(next_msp_sync++ % MAX_MSP_SYNC, rddsp32_sync_cb);
+ timer_call_after_resynch(NULL, next_msp_sync++ % MAX_MSP_SYNC, rddsp32_sync_cb);
}
else
COMBINE_DATA(&rddsp32_sync[0][offset]);
@@ -1587,7 +1587,7 @@ WRITE32_HANDLER( rddsp32_sync1_w )
COMBINE_DATA(&newdata);
dataptr[next_msp_sync % MAX_MSP_SYNC] = dptr;
dataval[next_msp_sync % MAX_MSP_SYNC] = newdata;
- timer_call_after_resynch(next_msp_sync++ % MAX_MSP_SYNC, rddsp32_sync_cb);
+ timer_call_after_resynch(NULL, next_msp_sync++ % MAX_MSP_SYNC, rddsp32_sync_cb);
}
else
COMBINE_DATA(&rddsp32_sync[1][offset]);
diff --git a/src/mame/machine/irobot.c b/src/mame/machine/irobot.c
index 2fd1243e252..8343aa20747 100644
--- a/src/mame/machine/irobot.c
+++ b/src/mame/machine/irobot.c
@@ -185,7 +185,7 @@ static TIMER_CALLBACK( scanline_callback )
/* set a callback for the next 32-scanline increment */
scanline += 32;
if (scanline >= 256) scanline = 0;
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, scanline_callback);
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, scanline_callback);
}
static TIMER_CALLBACK( irmb_done_callback );
@@ -201,12 +201,12 @@ MACHINE_RESET( irobot )
irvg_vblank=0;
irvg_running = 0;
- irvg_timer = timer_alloc(irvg_done_callback);
+ irvg_timer = timer_alloc(irvg_done_callback, NULL);
irmb_running = 0;
- irmb_timer = timer_alloc(irmb_done_callback);
+ irmb_timer = timer_alloc(irmb_done_callback, NULL);
/* set an initial timer to go off on scanline 0 */
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, scanline_callback);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, scanline_callback);
irobot_rom_banksel_w(0,0);
irobot_out0_w(0,0);
diff --git a/src/mame/machine/jackal.c b/src/mame/machine/jackal.c
index cc5539dcd9c..a22002b2353 100644
--- a/src/mame/machine/jackal.c
+++ b/src/mame/machine/jackal.c
@@ -15,8 +15,8 @@
extern UINT8 jackal_interrupt_enable;
extern void jackal_mark_tile_dirty(int offset);
-UINT8 *jackal_rambank = 0;
-UINT8 *jackal_spritebank = 0;
+static UINT8 *jackal_rambank = 0;
+static UINT8 *jackal_spritebank = 0;
MACHINE_RESET( jackal )
diff --git a/src/mame/machine/konamiic.c b/src/mame/machine/konamiic.c
index 45500599b8d..8efdcbb13dc 100644
--- a/src/mame/machine/konamiic.c
+++ b/src/mame/machine/konamiic.c
@@ -63,7 +63,7 @@ void K056800_init(void (* irq_callback)(int))
timer_period = attotime_mul(ATTOTIME_IN_HZ(44100), 128); // roughly 2.9us
- K056800_sound_cpu_timer = timer_alloc(K056800_sound_cpu_timer_tick);
+ K056800_sound_cpu_timer = timer_alloc(K056800_sound_cpu_timer_tick, NULL);
timer_adjust(K056800_sound_cpu_timer, timer_period, 0, timer_period);
}
diff --git a/src/mame/machine/leland.c b/src/mame/machine/leland.c
index bf0dfe6d6d2..fc38517e319 100644
--- a/src/mame/machine/leland.c
+++ b/src/mame/machine/leland.c
@@ -361,7 +361,7 @@ MACHINE_START( leland )
battery_ram = auto_malloc(LELAND_BATTERY_RAM_SIZE);
/* start scanline interrupts going */
- master_int_timer = timer_alloc(leland_interrupt_callback);
+ master_int_timer = timer_alloc(leland_interrupt_callback, NULL);
}
@@ -414,7 +414,7 @@ MACHINE_START( ataxx )
extra_tram = auto_malloc(ATAXX_EXTRA_TRAM_SIZE);
/* start scanline interrupts going */
- master_int_timer = timer_alloc(ataxx_interrupt_callback);
+ master_int_timer = timer_alloc(ataxx_interrupt_callback, NULL);
}
diff --git a/src/mame/machine/lsasquad.c b/src/mame/machine/lsasquad.c
index cd054fe2f9b..2e590f0f794 100644
--- a/src/mame/machine/lsasquad.c
+++ b/src/mame/machine/lsasquad.c
@@ -41,7 +41,7 @@ WRITE8_HANDLER( lsasquad_sound_command_w )
lsasquad_sound_pending |= 0x01;
sound_cmd = data;
//logerror("%04x: sound cmd %02x\n",activecpu_get_pc(),data);
- timer_call_after_resynch(data,nmi_callback);
+ timer_call_after_resynch(NULL, data,nmi_callback);
}
READ8_HANDLER( lsasquad_sh_sound_command_r )
diff --git a/src/mame/machine/mcr.c b/src/mame/machine/mcr.c
index 82dc807d1ac..4478f8af296 100644
--- a/src/mame/machine/mcr.c
+++ b/src/mame/machine/mcr.c
@@ -61,7 +61,7 @@ static UINT8 m6840_irq_vector;
static UINT8 v493_irq_state;
static UINT8 v493_irq_vector;
-static void (*v493_callback)(running_machine *machine, int param);
+static timer_callback v493_callback;
static UINT8 zwackery_sound_data;
@@ -290,7 +290,7 @@ MACHINE_START( nflfoot )
z80sio_init(0, &nflfoot_sio_intf);
/* allocate a timer for the IPU watchdog */
- ipu_watchdog_timer = timer_alloc(ipu_watchdog_reset);
+ ipu_watchdog_timer = timer_alloc(ipu_watchdog_reset, NULL);
}
@@ -319,7 +319,7 @@ MACHINE_START( mcr68 )
{
struct counter_state *m6840 = &m6840_state[i];
- m6840->timer = timer_alloc(counter_fired_callback);
+ m6840->timer = timer_alloc(counter_fired_callback, NULL);
state_save_register_item("m6840", i, m6840->control);
state_save_register_item("m6840", i, m6840->latch);
@@ -459,7 +459,7 @@ INTERRUPT_GEN( mcr68_interrupt )
/* also set a timer to generate the 493 signal at a specific time before the next VBLANK */
/* the timing of this is crucial for Blasted and Tri-Sports, which check the timing of */
/* VBLANK and 493 using counter 2 */
- timer_set(attotime_sub(ATTOTIME_IN_HZ(30), mcr68_timing_factor), 0, v493_callback);
+ timer_set(attotime_sub(ATTOTIME_IN_HZ(30), mcr68_timing_factor), NULL, 0, v493_callback);
}
@@ -499,7 +499,7 @@ static TIMER_CALLBACK( mcr68_493_callback )
{
v493_irq_state = 1;
update_mcr68_interrupts();
- timer_set(video_screen_get_scan_period(0), 0, mcr68_493_off_callback);
+ timer_set(video_screen_get_scan_period(0), NULL, 0, mcr68_493_off_callback);
logerror("--- (INT1) ---\n");
}
@@ -620,7 +620,7 @@ static TIMER_CALLBACK( zwackery_493_off_callback )
static TIMER_CALLBACK( zwackery_493_callback )
{
pia_2_ca1_w(0, 1);
- timer_set(video_screen_get_scan_period(0), 0, zwackery_493_off_callback);
+ timer_set(video_screen_get_scan_period(0), NULL, 0, zwackery_493_off_callback);
}
diff --git a/src/mame/machine/mhavoc.c b/src/mame/machine/mhavoc.c
index 8c15c0665ba..cdd1c596d2d 100644
--- a/src/mame/machine/mhavoc.c
+++ b/src/mame/machine/mhavoc.c
@@ -113,7 +113,7 @@ MACHINE_RESET( mhavoc )
gamma_irq_clock = 0;
/* set a timer going for the CPU interrupt generators */
- timer_pulse(ATTOTIME_IN_HZ(MHAVOC_CLOCK_5K), 0, cpu_irq_clock);
+ timer_pulse(ATTOTIME_IN_HZ(MHAVOC_CLOCK_5K), NULL, 0, cpu_irq_clock);
state_save_register_item("misc", 0, alpha_data);
state_save_register_item("misc", 0, alpha_rcvd);
@@ -146,14 +146,14 @@ static TIMER_CALLBACK( delayed_gamma_w )
cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
/* the sound CPU needs to reply in 250microseconds (according to Neil Bradley) */
- timer_set(ATTOTIME_IN_USEC(250), 0, 0);
+ timer_set(ATTOTIME_IN_USEC(250), NULL, 0, 0);
}
WRITE8_HANDLER( mhavoc_gamma_w )
{
logerror(" writing to gamma processor: %02x (%d %d)\n", data, gamma_rcvd, alpha_xmtd);
- timer_call_after_resynch(data, delayed_gamma_w);
+ timer_call_after_resynch(NULL, data, delayed_gamma_w);
}
diff --git a/src/mame/machine/midwayic.c b/src/mame/machine/midwayic.c
index 4ac3403c28c..21c145ddc8d 100644
--- a/src/mame/machine/midwayic.c
+++ b/src/mame/machine/midwayic.c
@@ -287,7 +287,7 @@ void midway_serial_pic2_init(int upper, int yearoffs)
pic.yearoffs = yearoffs;
pic.time_just_written = 0;
- pic.time_write_timer = timer_alloc(reset_timer);
+ pic.time_write_timer = timer_alloc(reset_timer, NULL);
memset(pic.default_nvram, 0xff, sizeof(pic.default_nvram));
generate_serial_data(upper);
}
diff --git a/src/mame/machine/midwunit.c b/src/mame/machine/midwunit.c
index 8bd63b8aa7d..4cb9362565f 100644
--- a/src/mame/machine/midwunit.c
+++ b/src/mame/machine/midwunit.c
@@ -278,7 +278,7 @@ READ16_HANDLER( midxunit_uart_r )
int temp = midwunit_sound_state_r(0, 0);
result |= (temp & 0x800) >> 9;
result |= (~temp & 0x400) >> 10;
- timer_call_after_resynch(0, 0);
+ timer_call_after_resynch(NULL, 0, 0);
}
break;
@@ -305,7 +305,7 @@ READ16_HANDLER( midxunit_uart_r )
int temp = midwunit_sound_state_r(0, 0);
result |= (temp & 0x800) >> 11;
result |= (~temp & 0x400) >> 8;
- timer_call_after_resynch(0, 0);
+ timer_call_after_resynch(NULL, 0, 0);
}
break;
diff --git a/src/mame/machine/model1.c b/src/mame/machine/model1.c
index 7f44eab0908..93f32644bc8 100644
--- a/src/mame/machine/model1.c
+++ b/src/mame/machine/model1.c
@@ -2031,7 +2031,7 @@ static UINT32 copro_fifoout_pop(void)
extern void v60_stall(void);
v60_stall();
- timer_call_after_resynch(0, NULL);
+ timer_call_after_resynch(NULL, 0, NULL);
return 0;
}
diff --git a/src/mame/machine/mw8080bw.c b/src/mame/machine/mw8080bw.c
index 24c32966bee..942d0938c9b 100644
--- a/src/mame/machine/mw8080bw.c
+++ b/src/mame/machine/mw8080bw.c
@@ -87,7 +87,7 @@ static TIMER_CALLBACK( mw8080bw_interrupt_callback )
static void mw8080bw_create_interrupt_timer(void)
{
- interrupt_timer = timer_alloc(mw8080bw_interrupt_callback);
+ interrupt_timer = timer_alloc(mw8080bw_interrupt_callback, NULL);
}
diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c
index e8ee71bd200..1925c5702e9 100644
--- a/src/mame/machine/n64.c
+++ b/src/mame/machine/n64.c
@@ -2,7 +2,6 @@
#include "driver.h"
#include "cpu/mips/mips3.h"
-#include "cpu/rsp/rsp.h"
#include "sound/custom.h"
#include "streams.h"
#include "includes/n64.h"
@@ -225,7 +224,7 @@ static void sp_dma(int direction)
-void sp_set_status(UINT32 status)
+static void sp_set_status(UINT32 status)
{
if (status & 0x1)
{
@@ -499,23 +498,6 @@ WRITE32_HANDLER( n64_sp_reg_w )
}
}
-UINT32 sp_read_reg(UINT32 reg)
-{
- switch (reg)
- {
- //case 4: return rsp_sp_status;
- default: return n64_sp_reg_r(reg, 0x00000000);
- }
-}
-
-void sp_write_reg(UINT32 reg, UINT32 data)
-{
- switch (reg)
- {
- default: n64_sp_reg_w(reg, data, 0x00000000); break;
- }
-}
-
// RDP Interface
UINT32 dp_start;
UINT32 dp_end;
@@ -582,6 +564,15 @@ WRITE32_HANDLER( n64_dp_reg_w )
}
+rsp_config n64_rsp_config =
+{
+ n64_dp_reg_r,
+ n64_dp_reg_w,
+ n64_sp_reg_r,
+ n64_sp_reg_w,
+ sp_set_status
+};
+
// Video Interface
static UINT32 vi_width;
@@ -1059,9 +1050,9 @@ WRITE32_HANDLER( n64_ri_reg_w )
// Serial Interface
static UINT8 pif_ram[0x40];
static UINT8 pif_cmd[0x40];
-UINT32 si_dram_addr = 0;
-UINT32 si_pif_addr = 0;
-UINT32 si_status = 0;
+static UINT32 si_dram_addr = 0;
+static UINT32 si_pif_addr = 0;
+static UINT32 si_status = 0;
static UINT8 eeprom[512];
static UINT8 mempack[0x8000];
@@ -1517,7 +1508,7 @@ WRITE32_HANDLER( n64_si_reg_w )
}
}
-UINT32 cic_status = 0x00000000;
+static UINT32 cic_status = 0x00000000;
READ32_HANDLER( n64_pif_ram_r )
{
@@ -1576,7 +1567,7 @@ void n64_machine_reset(void)
cpunum_set_info_ptr(0, CPUINFO_PTR_MIPS3_FASTRAM_BASE, rdram);
cpunum_set_info_int(0, CPUINFO_INT_MIPS3_FASTRAM_READONLY, 0);
- audio_timer = timer_alloc(audio_timer_callback);
+ audio_timer = timer_alloc(audio_timer_callback, NULL);
timer_adjust(audio_timer, attotime_never, 0, attotime_never);
cpunum_set_input_line(1, INPUT_LINE_HALT, ASSERT_LINE);
diff --git a/src/mame/machine/namco50.c b/src/mame/machine/namco50.c
index bd519a73594..dfbda4bd8e6 100644
--- a/src/mame/machine/namco50.c
+++ b/src/mame/machine/namco50.c
@@ -266,7 +266,7 @@ static void namco_50xx_irq_set(int cpunum)
// 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_50xx_irq_clear);
+ timer_set(ATTOTIME_IN_USEC(21), NULL, cpunum, namco_50xx_irq_clear);
}
void namco_50xx_write(UINT8 data)
@@ -276,7 +276,7 @@ void namco_50xx_write(UINT8 data)
if (cpunum == -1)
return;
- timer_call_after_resynch(data, namco_50xx_latch_callback);
+ timer_call_after_resynch(NULL, data, namco_50xx_latch_callback);
namco_50xx_irq_set(cpunum);
}
@@ -288,7 +288,7 @@ void namco_50xx_2_write(UINT8 data)
if (cpunum == -1)
return;
- timer_call_after_resynch(data, namco_50xx_2_latch_callback);
+ timer_call_after_resynch(NULL, data, namco_50xx_2_latch_callback);
namco_50xx_irq_set(cpunum);
}
@@ -301,7 +301,7 @@ void namco_50xx_read_request(void)
if (cpunum == -1)
return;
- timer_call_after_resynch(0, namco_50xx_readrequest_callback);
+ timer_call_after_resynch(NULL, 0, namco_50xx_readrequest_callback);
namco_50xx_irq_set(cpunum);
}
@@ -313,7 +313,7 @@ void namco_50xx_2_read_request(void)
if (cpunum == -1)
return;
- timer_call_after_resynch(0, namco_50xx_2_readrequest_callback);
+ timer_call_after_resynch(NULL, 0, namco_50xx_2_readrequest_callback);
namco_50xx_irq_set(cpunum);
}
diff --git a/src/mame/machine/namcoio.c b/src/mame/machine/namcoio.c
index 84c601e15c8..38e135ccefc 100644
--- a/src/mame/machine/namcoio.c
+++ b/src/mame/machine/namcoio.c
@@ -794,7 +794,7 @@ void namcoio_set_irq_line(int chipnum, int state)
if (chipnum < MAX_NAMCOIO && state != CLEAR_LINE && !io[chipnum].reset)
{
/* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(ATTOTIME_IN_USEC(50), chipnum, namcoio_run);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, chipnum, namcoio_run);
}
}
@@ -876,7 +876,7 @@ void namco_06xx_init(int chipnum, int cpu,
namcoio_init(4*chipnum + 2, type2, intf2);
namcoio_init(4*chipnum + 3, type3, intf3);
nmi_cpu[chipnum] = cpu;
- nmi_timer[chipnum] = timer_alloc(nmi_generate);
+ nmi_timer[chipnum] = timer_alloc(nmi_generate, NULL);
namco_06xx_state_save(chipnum);
}
}
diff --git a/src/mame/machine/namcos2.c b/src/mame/machine/namcos2.c
index 024f45e32b8..f395aee1770 100644
--- a/src/mame/machine/namcos2.c
+++ b/src/mame/machine/namcos2.c
@@ -665,7 +665,7 @@ INTERRUPT_GEN( namcos2_68k_master_vblank )
if( IsSystem21()==0 && namcos2_68k_master_C148[NAMCOS2_C148_POSIRQ] )
{
int scanline = GetPosIRQScanline();
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, namcos2_68k_master_posirq );
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, namcos2_68k_master_posirq );
}
cpunum_set_input_line( CPU_MASTER, namcos2_68k_master_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE);
}
@@ -681,7 +681,7 @@ INTERRUPT_GEN( namcos2_68k_slave_vblank )
if( IsSystem21()==0 && namcos2_68k_slave_C148[NAMCOS2_C148_POSIRQ] )
{
int scanline = GetPosIRQScanline();
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, namcos2_68k_slave_posirq );
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, namcos2_68k_slave_posirq );
}
cpunum_set_input_line( CPU_SLAVE, namcos2_68k_slave_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE);
}
@@ -699,7 +699,7 @@ INTERRUPT_GEN( namcos2_68k_gpu_vblank )
if( namcos2_68k_gpu_C148[NAMCOS2_C148_POSIRQ] )
{
int scanline = 0x50+0x89; /* HACK for Winning Run */
- timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, namcos2_68k_gpu_posirq );
+ timer_set(video_screen_get_time_until_pos(0, scanline, 0), NULL, scanline, namcos2_68k_gpu_posirq );
}
cpunum_set_input_line( CPU_GPU, namcos2_68k_gpu_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE);
}
diff --git a/src/mame/machine/nb1413m3.c b/src/mame/machine/nb1413m3.c
index 1b45a3ab7ba..a4c0909eb4e 100644
--- a/src/mame/machine/nb1413m3.c
+++ b/src/mame/machine/nb1413m3.c
@@ -44,7 +44,7 @@ static int nb1413m3_outcoin_flag;
#define NB1413M3_TIMER_BASE 20000000
static TIMER_CALLBACK( nb1413m3_timer_callback )
{
- timer_set(attotime_mul(ATTOTIME_IN_HZ(NB1413M3_TIMER_BASE), 256), 0, nb1413m3_timer_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(NB1413M3_TIMER_BASE), 256), NULL, 0, nb1413m3_timer_callback);
nb1413m3_74ls193_counter++;
nb1413m3_74ls193_counter &= 0x0f;
@@ -141,7 +141,7 @@ MACHINE_RESET( nb1413m3 )
nb1413m3_74ls193_counter = 0;
- timer_call_after_resynch(0, nb1413m3_timer_callback);
+ timer_call_after_resynch(NULL, 0, nb1413m3_timer_callback);
}
WRITE8_HANDLER( nb1413m3_nmi_clock_w )
diff --git a/src/mame/machine/nmk004.c b/src/mame/machine/nmk004.c
index e11c94ed142..ca38777b8c9 100644
--- a/src/mame/machine/nmk004.c
+++ b/src/mame/machine/nmk004.c
@@ -88,7 +88,7 @@ struct effects_control
/* C1CA-C1CB */ UINT16 timer_duration;
};
-struct
+static struct
{
const UINT8 *rom; // NMK004 data ROM
UINT8 from_main; // command from main CPU
@@ -1050,7 +1050,7 @@ static TIMER_CALLBACK( real_nmk004_init )
void NMK004_init(void)
{
/* we have to do this via a timer because we get called before the sound reset */
- timer_call_after_resynch(0, real_nmk004_init);
+ timer_call_after_resynch(NULL, 0, real_nmk004_init);
}
diff --git a/src/mame/machine/opwolf.c b/src/mame/machine/opwolf.c
index 492c2017376..efd244f010b 100644
--- a/src/mame/machine/opwolf.c
+++ b/src/mame/machine/opwolf.c
@@ -284,7 +284,7 @@ static const UINT16* level_data_lookup[] =
};
-static TIMER_CALLBACK( timer_callback )
+static TIMER_CALLBACK( opwolf_timer_callback )
{
// Level data command
if (current_cmd==0xf5)
@@ -694,7 +694,7 @@ static TIMER_CALLBACK( cchip_timer )
{
// Simulate time for command to execute (exact timing unknown, this is close)
current_cmd=0xf5;
- timer_set(ATTOTIME_IN_CYCLES(80000,0), 0, timer_callback);
+ timer_set(ATTOTIME_IN_CYCLES(80000,0), NULL, 0, opwolf_timer_callback);
}
cchip_last_7a=cchip_ram[0x7a];
@@ -747,5 +747,5 @@ void opwolf_cchip_init(void)
cchip_coins_for_credit[1]=1;
cchip_credits_for_coin[1]=1;
- timer_pulse(ATTOTIME_IN_HZ(60), 0, cchip_timer);
+ timer_pulse(ATTOTIME_IN_HZ(60), NULL, 0, cchip_timer);
}
diff --git a/src/mame/machine/pcshare.c b/src/mame/machine/pcshare.c
index da3fa1d02bb..a6a58ff025b 100644
--- a/src/mame/machine/pcshare.c
+++ b/src/mame/machine/pcshare.c
@@ -503,7 +503,7 @@ void init_pc_common(UINT32 flags)
pc_page_offset_mask = 0x0F0000;
}
- pc_keyboard_timer = timer_alloc(pc_keyb_timer);
+ pc_keyboard_timer = timer_alloc(pc_keyb_timer, NULL);
}
/*
diff --git a/src/mame/machine/pitnrun.c b/src/mame/machine/pitnrun.c
index 570d8e3a04d..877e45a8a78 100644
--- a/src/mame/machine/pitnrun.c
+++ b/src/mame/machine/pitnrun.c
@@ -28,7 +28,7 @@ static TIMER_CALLBACK( pitnrun_mcu_real_data_r )
READ8_HANDLER( pitnrun_mcu_data_r )
{
- timer_call_after_resynch(0,pitnrun_mcu_real_data_r);
+ timer_call_after_resynch(NULL, 0,pitnrun_mcu_real_data_r);
return toz80;
}
@@ -41,13 +41,13 @@ static TIMER_CALLBACK( pitnrun_mcu_real_data_w )
WRITE8_HANDLER( pitnrun_mcu_data_w )
{
- timer_call_after_resynch(data,pitnrun_mcu_real_data_w);
+ timer_call_after_resynch(NULL, data,pitnrun_mcu_real_data_w);
+ cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(5));
}
READ8_HANDLER( pitnrun_mcu_status_r )
{
/* mcu synchronization */
- cpu_yielduntil_time (ATTOTIME_IN_USEC(5));
/* bit 0 = the 68705 has read data from the Z80 */
/* bit 1 = the 68705 has written data for the Z80 */
return ~((zready << 1) | (zaccept << 0));
@@ -108,14 +108,14 @@ WRITE8_HANDLER( pitnrun_68705_portB_w )
if (~data & 0x02)
{
/* 68705 is going to read data from the Z80 */
- timer_call_after_resynch(0,pitnrun_mcu_data_real_r);
+ timer_call_after_resynch(NULL, 0,pitnrun_mcu_data_real_r);
cpunum_set_input_line(2,0,CLEAR_LINE);
portA_in = fromz80;
}
if (~data & 0x04)
{
/* 68705 is writing data for the Z80 */
- timer_call_after_resynch(portA_out,pitnrun_mcu_status_real_w);
+ timer_call_after_resynch(NULL, portA_out,pitnrun_mcu_status_real_w);
}
if (~data & 0x10)
{
diff --git a/src/mame/machine/psx.c b/src/mame/machine/psx.c
index 3bb6d93f993..be4ffe996b3 100644
--- a/src/mame/machine/psx.c
+++ b/src/mame/machine/psx.c
@@ -1563,19 +1563,19 @@ void psx_driver_init( void )
for( n = 0; n < 7; n++ )
{
- m_p_timer_dma[ n ] = timer_alloc( dma_finished_callback );
+ m_p_timer_dma[ n ] = timer_alloc( dma_finished_callback , NULL);
m_p_fn_dma_read[ n ] = NULL;
m_p_fn_dma_write[ n ] = NULL;
}
for( n = 0; n < 3; n++ )
{
- m_p_timer_root[ n ] = timer_alloc( root_finished );
+ m_p_timer_root[ n ] = timer_alloc( root_finished , NULL);
}
for( n = 0; n < 2; n++ )
{
- m_p_timer_sio[ n ] = timer_alloc( sio_clock );
+ m_p_timer_sio[ n ] = timer_alloc( sio_clock , NULL);
}
for( n = 0; n < 256; n++ )
diff --git a/src/mame/machine/qix.c b/src/mame/machine/qix.c
index aa1e93ff630..76301077726 100644
--- a/src/mame/machine/qix.c
+++ b/src/mame/machine/qix.c
@@ -271,7 +271,7 @@ static TIMER_CALLBACK( vblank_stop )
INTERRUPT_GEN( qix_vblank_start )
{
pia_3_cb1_w(0, 1);
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, vblank_stop);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, vblank_stop);
}
@@ -372,7 +372,7 @@ static TIMER_CALLBACK( deferred_pia_4_porta_w )
static WRITE8_HANDLER( sync_pia_4_porta_w )
{
/* we need to synchronize this so the sound CPU doesn't drop anything important */
- timer_call_after_resynch(data, deferred_pia_4_porta_w);
+ timer_call_after_resynch(NULL, data, deferred_pia_4_porta_w);
}
@@ -519,7 +519,7 @@ WRITE8_HANDLER( qix_pia_0_w )
{
/* make all the CPUs synchronize, and only AFTER that write the command to the PIA */
/* otherwise the 68705 will miss commands */
- timer_call_after_resynch(data | (offset << 8), pia_0_w_callback);
+ timer_call_after_resynch(NULL, data | (offset << 8), pia_0_w_callback);
}
diff --git a/src/mame/machine/rainbow.c b/src/mame/machine/rainbow.c
index 5f1be085e13..aa580b52736 100644
--- a/src/mame/machine/rainbow.c
+++ b/src/mame/machine/rainbow.c
@@ -827,5 +827,5 @@ void rainbow_cchip_init(int version)
state_save_register_item("cchip", 0, current_bank);
- timer_pulse(ATTOTIME_IN_HZ(60), 0, cchip_timer);
+ timer_pulse(ATTOTIME_IN_HZ(60), NULL, 0, cchip_timer);
}
diff --git a/src/mame/machine/sbrkout.c b/src/mame/machine/sbrkout.c
index 362449bbdb3..e5cc046905d 100644
--- a/src/mame/machine/sbrkout.c
+++ b/src/mame/machine/sbrkout.c
@@ -12,7 +12,7 @@
#define SBRKOUT_DOUBLE 0x01
#define SBRKOUT_CAVITY 0x02
-int sbrkout_game_switch = SBRKOUT_PROGRESSIVE;
+static int sbrkout_game_switch = SBRKOUT_PROGRESSIVE;
/***************************************************************************
diff --git a/src/mame/machine/system24.c b/src/mame/machine/segas24.c
index 282368df146..b7d7227cdcd 100644
--- a/src/mame/machine/system24.c
+++ b/src/mame/machine/segas24.c
@@ -1,6 +1,6 @@
#include "driver.h"
#include "system16.h"
-#include "includes/system24.h"
+#include "includes/segas24.h"
/* system24temp_ functions / variables are from shared rewrite files,
once the rest of the rewrite is complete they can be removed, I
diff --git a/src/mame/machine/slikshot.c b/src/mame/machine/slikshot.c
index 58cd6da6a0a..7fe346b2b81 100644
--- a/src/mame/machine/slikshot.c
+++ b/src/mame/machine/slikshot.c
@@ -527,7 +527,7 @@ static TIMER_CALLBACK( delayed_z80_control_w )
WRITE8_HANDLER( slikshot_z80_control_w )
{
- timer_call_after_resynch(data, delayed_z80_control_w);
+ timer_call_after_resynch(NULL, data, delayed_z80_control_w);
}
diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c
index feca580085b..6119ea42f39 100644
--- a/src/mame/machine/snes.c
+++ b/src/mame/machine/snes.c
@@ -318,13 +318,13 @@ static void snes_init_ram(void)
snes_ram[VMAIN] = 0x80;
/* init timers and stop them */
- snes_scanline_timer = timer_alloc(snes_scanline_tick);
+ snes_scanline_timer = timer_alloc(snes_scanline_tick, NULL);
timer_adjust(snes_scanline_timer, attotime_never, 0, attotime_never);
- snes_hblank_timer = timer_alloc(snes_hblank_tick);
+ snes_hblank_timer = timer_alloc(snes_hblank_tick, NULL);
timer_adjust(snes_hblank_timer, attotime_never, 0, attotime_never);
- snes_nmi_timer = timer_alloc(snes_nmi_tick);
+ snes_nmi_timer = timer_alloc(snes_nmi_tick, NULL);
timer_adjust(snes_nmi_timer, attotime_never, 0, attotime_never);
- snes_hirq_timer = timer_alloc(snes_hirq_tick_callback);
+ snes_hirq_timer = timer_alloc(snes_hirq_tick_callback, NULL);
timer_adjust(snes_hirq_timer, attotime_never, 0, attotime_never);
// SNES hcounter has a 0-339 range. hblank starts at counter 260.
diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c
index 623d9802963..92c3c28a9c0 100644
--- a/src/mame/machine/stfight.c
+++ b/src/mame/machine/stfight.c
@@ -108,7 +108,7 @@ INTERRUPT_GEN( stfight_vb_interrupt )
{
// Do a RST10
cpunum_set_input_line_and_vector(0,0,HOLD_LINE,0xd7);
- timer_set(ATTOTIME_IN_HZ(120), 0, stfight_interrupt_1);
+ timer_set(ATTOTIME_IN_HZ(120), NULL, 0, stfight_interrupt_1);
}
/*
diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c
index 58548adf9e8..58e6bafdcb2 100644
--- a/src/mame/machine/stvcd.c
+++ b/src/mame/machine/stvcd.c
@@ -273,7 +273,7 @@ void stvcd_reset(void)
cd_stat = CD_STAT_OPEN;
}
- sector_timer = timer_alloc(sector_cb);
+ sector_timer = timer_alloc(sector_cb, NULL);
timer_adjust(sector_timer, ATTOTIME_IN_HZ(150), 0, attotime_zero); // 150 sectors / second = 300kBytes/second
}
diff --git a/src/mame/machine/tait8741.c b/src/mame/machine/tait8741.c
index fcb16982a77..87537278b72 100644
--- a/src/mame/machine/tait8741.c
+++ b/src/mame/machine/tait8741.c
@@ -204,7 +204,7 @@ static void taito8741_update(int num)
st->txd[0] = st->portHandler ? st->portHandler(0) : 0;
if( sst )
{
- timer_call_after_resynch(num,taito8741_serial_tx);
+ timer_call_after_resynch(NULL, num, taito8741_serial_tx);
st->serial_out = 0;
st->status |= 0x04;
st->phase = CMD_08;
@@ -445,7 +445,7 @@ static void josvolly_8741_do(int num)
if( (i8741[num].sts & 0x02) )
{
/* transmit data */
- timer_set (ATTOTIME_IN_USEC(1),num,josvolly_8741_tx);
+ timer_set (ATTOTIME_IN_USEC(1), NULL, num, josvolly_8741_tx);
}
}
diff --git a/src/mame/machine/taitosj.c b/src/mame/machine/taitosj.c
index 0a33c0de9a6..5940061dc6b 100644
--- a/src/mame/machine/taitosj.c
+++ b/src/mame/machine/taitosj.c
@@ -132,7 +132,7 @@ WRITE8_HANDLER( taitosj_mcu_data_w )
#if DEBUG_MCU
logerror("%04x: protection write %02x\n",activecpu_get_pc(),data);
#endif
- timer_call_after_resynch(data,taitosj_mcu_real_data_w);
+ timer_call_after_resynch(NULL, data,taitosj_mcu_real_data_w);
/* temporarily boost the interleave to sync things up */
cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(10));
}
@@ -218,7 +218,7 @@ logerror("%04x: 68705 68INTRQ **NOT SUPPORTED**!\n",activecpu_get_pc());
if (~data & 0x02)
{
/* 68705 is going to read data from the Z80 */
- timer_call_after_resynch(0,taitosj_mcu_data_real_r);
+ timer_call_after_resynch(NULL, 0,taitosj_mcu_data_real_r);
cpunum_set_input_line(2,0,CLEAR_LINE);
portA_in = fromz80;
#if DEBUG_MCU
@@ -235,7 +235,7 @@ logerror("%04x: 68705 <- Z80 %02x\n",activecpu_get_pc(),portA_in);
logerror("%04x: 68705 -> Z80 %02x\n",activecpu_get_pc(),portA_out);
#endif
/* 68705 is writing data for the Z80 */
- timer_call_after_resynch(portA_out,taitosj_mcu_status_real_w);
+ timer_call_after_resynch(NULL, portA_out,taitosj_mcu_status_real_w);
}
if (~data & 0x10)
{
diff --git a/src/mame/machine/ticket.c b/src/mame/machine/ticket.c
index caf30035fe2..ed26aa703f3 100644
--- a/src/mame/machine/ticket.c
+++ b/src/mame/machine/ticket.c
@@ -32,7 +32,7 @@ static int ticketnotdispensed;
static struct ticket_state dispenser[MAX_DISPENSERS];
-static TIMER_CALLBACK_PTR( ticket_dispenser_toggle );
+static TIMER_CALLBACK( ticket_dispenser_toggle );
/***************************************************************************
@@ -53,7 +53,7 @@ void ticket_dispenser_init(int msec, int motoronhigh, int statusactivehigh)
{
dispenser[i].status = ticketnotdispensed;
dispenser[i].power = 0x00;
- dispenser[i].timer = timer_alloc_ptr(ticket_dispenser_toggle, &dispenser[i]);
+ dispenser[i].timer = timer_alloc(ticket_dispenser_toggle, &dispenser[i]);
state_save_register_item("ticket", i, dispenser[i].status);
state_save_register_item("ticket", i, dispenser[i].power);
@@ -102,7 +102,7 @@ WRITE8_HANDLER( ticket_dispenser_0_w )
#ifdef DEBUG_TICKET
logerror("PC: %04X Ticket Power On\n", activecpu_get_pc());
#endif
- timer_adjust_ptr(dispenser[0].timer, ATTOTIME_IN_MSEC(time_msec), attotime_zero);
+ timer_adjust(dispenser[0].timer, ATTOTIME_IN_MSEC(time_msec), 0, attotime_zero);
dispenser[0].power = 1;
dispenser[0].status = ticketnotdispensed;
@@ -115,7 +115,7 @@ WRITE8_HANDLER( ticket_dispenser_0_w )
#ifdef DEBUG_TICKET
logerror("PC: %04X Ticket Power Off\n", activecpu_get_pc());
#endif
- timer_adjust_ptr(dispenser[0].timer, attotime_never, attotime_never);
+ timer_adjust(dispenser[0].timer, attotime_never, 0, attotime_never);
set_led_status(2,0);
dispenser[0].power = 0;
}
@@ -132,7 +132,7 @@ WRITE8_HANDLER( ticket_dispenser_1_w )
#ifdef DEBUG_TICKET
logerror("PC: %04X Ticket Power On\n", activecpu_get_pc());
#endif
- timer_adjust_ptr(dispenser[1].timer, ATTOTIME_IN_MSEC(time_msec), attotime_zero);
+ timer_adjust(dispenser[1].timer, ATTOTIME_IN_MSEC(time_msec), 0, attotime_zero);
dispenser[1].power = 1;
dispenser[1].status = ticketnotdispensed;
@@ -145,7 +145,7 @@ WRITE8_HANDLER( ticket_dispenser_1_w )
#ifdef DEBUG_TICKET
logerror("PC: %04X Ticket Power Off\n", activecpu_get_pc());
#endif
- timer_adjust_ptr(dispenser[1].timer, attotime_never, attotime_never);
+ timer_adjust(dispenser[1].timer, attotime_never, 0, attotime_never);
set_led_status(2,0);
dispenser[1].power = 0;
}
@@ -160,9 +160,9 @@ WRITE8_HANDLER( ticket_dispenser_1_w )
When a ticket dispenses, there is N milliseconds of status = high,
and N milliseconds of status = low (a wait cycle?).
***************************************************************************/
-static TIMER_CALLBACK_PTR( ticket_dispenser_toggle )
+static TIMER_CALLBACK( ticket_dispenser_toggle )
{
- struct ticket_state *dispenser = param;
+ struct ticket_state *dispenser = ptr;
/* If we still have power, keep toggling ticket states. */
if (dispenser->power)
@@ -171,7 +171,7 @@ static TIMER_CALLBACK_PTR( ticket_dispenser_toggle )
#ifdef DEBUG_TICKET
logerror("Ticket Status Changed to %02X\n", status);
#endif
- timer_adjust_ptr(dispenser->timer, ATTOTIME_IN_MSEC(time_msec), attotime_zero);
+ timer_adjust(dispenser->timer, ATTOTIME_IN_MSEC(time_msec), 0, attotime_zero);
}
if (dispenser->status == ticketdispensed)
diff --git a/src/mame/machine/tnzs.c b/src/mame/machine/tnzs.c
index bc86eeccebf..8f3a7ab405f 100644
--- a/src/mame/machine/tnzs.c
+++ b/src/mame/machine/tnzs.c
@@ -507,7 +507,7 @@ static TIMER_CALLBACK( kludge_callback )
static WRITE8_HANDLER( tnzs_sync_kludge_w )
{
- timer_call_after_resynch(data,kludge_callback);
+ timer_call_after_resynch(NULL, data,kludge_callback);
}
diff --git a/src/mame/machine/vertigo.c b/src/mame/machine/vertigo.c
index b1fd9bc8439..0b8b3f3a225 100644
--- a/src/mame/machine/vertigo.c
+++ b/src/mame/machine/vertigo.c
@@ -174,7 +174,7 @@ static TIMER_CALLBACK( sound_command_w )
WRITE16_HANDLER( vertigo_audio_w )
{
if (ACCESSING_LSB)
- timer_call_after_resynch(data & 0xff, sound_command_w);
+ timer_call_after_resynch(NULL, data & 0xff, sound_command_w);
}
READ16_HANDLER( vertigo_sio_r )
diff --git a/src/mame/machine/volfied.c b/src/mame/machine/volfied.c
index 9936933f298..d8b9ffe61d6 100644
--- a/src/mame/machine/volfied.c
+++ b/src/mame/machine/volfied.c
@@ -283,7 +283,7 @@ static const UINT16* palette_data_lookup[] =
};
-static TIMER_CALLBACK( timer_callback )
+static TIMER_CALLBACK( volfied_timer_callback )
{
// Palette commands - palette data written to bank 0: $10 - $af
if (current_cmd>=0x1 && current_cmd<0x12)
@@ -392,12 +392,12 @@ WRITE16_HANDLER( volfied_cchip_ram_w )
// Palette request cmd - verified to take around 122242 68000 cycles to complete
if (current_cmd >= 0x1 && current_cmd < 0x12)
{
- timer_set(ATTOTIME_IN_CYCLES(122242,0), 0, timer_callback);
+ timer_set(ATTOTIME_IN_CYCLES(122242,0), NULL, 0, volfied_timer_callback);
}
// Unknown cmd - verified to take around 105500 68000 cycles to complete
else if (current_cmd >= 0x81 && current_cmd < 0x92)
{
- timer_set(ATTOTIME_IN_CYCLES(105500,0), 0, timer_callback);
+ timer_set(ATTOTIME_IN_CYCLES(105500,0), NULL, 0, volfied_timer_callback);
}
else
{
diff --git a/src/mame/machine/williams.c b/src/mame/machine/williams.c
index 0dfb1b998ea..d9defe3b283 100644
--- a/src/mame/machine/williams.c
+++ b/src/mame/machine/williams.c
@@ -274,7 +274,7 @@ static TIMER_CALLBACK( williams_count240_callback )
pia_1_ca1_w(0, 1);
/* set a timer to turn it off once the scanline counter resets */
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, williams_count240_off_callback);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, williams_count240_off_callback);
/* set a timer for next frame */
timer_adjust(scan240_timer, video_screen_get_time_until_pos(0, 240, 0), 0, attotime_zero);
@@ -318,11 +318,11 @@ static void williams_common_init(void)
ticket_dispenser_init(70, TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH);
/* set a timer to go off every 16 scanlines, to toggle the VA11 line and update the screen */
- scanline_timer = timer_alloc(williams_va11_callback);
+ scanline_timer = timer_alloc(williams_va11_callback, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
/* also set a timer to go off on scanline 240 */
- scan240_timer = timer_alloc(williams_count240_callback);
+ scan240_timer = timer_alloc(williams_count240_callback, NULL);
timer_adjust(scan240_timer, video_screen_get_time_until_pos(0, 240, 0), 0, attotime_zero);
state_save_register_global(vram_bank);
@@ -377,7 +377,7 @@ static TIMER_CALLBACK( williams2_endscreen_callback )
pia_0_ca1_w(0, 0);
/* set a timer to turn it off once the scanline counter resets */
- timer_set(video_screen_get_time_until_pos(0, 8, 0), 0, williams2_endscreen_off_callback);
+ timer_set(video_screen_get_time_until_pos(0, 8, 0), NULL, 0, williams2_endscreen_off_callback);
/* set a timer for next frame */
timer_adjust(scan254_timer, video_screen_get_time_until_pos(0, 254, 0), 0, attotime_zero);
@@ -410,11 +410,11 @@ MACHINE_RESET( williams2 )
williams2_bank_select_w(0, 0);
/* set a timer to go off every 16 scanlines, to toggle the VA11 line and update the screen */
- scanline_timer = timer_alloc(williams2_va11_callback);
+ scanline_timer = timer_alloc(williams2_va11_callback, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
/* also set a timer to go off on scanline 254 */
- scan254_timer = timer_alloc(williams2_endscreen_callback);
+ scan254_timer = timer_alloc(williams2_endscreen_callback, NULL);
timer_adjust(scan254_timer, video_screen_get_time_until_pos(0, 254, 0), 0, attotime_zero);
state_save_register_global(vram_bank);
@@ -490,12 +490,12 @@ static TIMER_CALLBACK( williams_deferred_snd_cmd_w )
WRITE8_HANDLER( williams_snd_cmd_w )
{
/* the high two bits are set externally, and should be 1 */
- timer_call_after_resynch(data | 0xc0, williams_deferred_snd_cmd_w);
+ timer_call_after_resynch(NULL, data | 0xc0, williams_deferred_snd_cmd_w);
}
WRITE8_HANDLER( playball_snd_cmd_w )
{
- timer_call_after_resynch(data, williams_deferred_snd_cmd_w);
+ timer_call_after_resynch(NULL, data, williams_deferred_snd_cmd_w);
}
@@ -506,7 +506,7 @@ static TIMER_CALLBACK( williams2_deferred_snd_cmd_w )
static WRITE8_HANDLER( williams2_snd_cmd_w )
{
- timer_call_after_resynch(data, williams2_deferred_snd_cmd_w);
+ timer_call_after_resynch(NULL, data, williams2_deferred_snd_cmd_w);
}
@@ -915,5 +915,5 @@ static WRITE8_HANDLER( joust2_snd_cmd_w )
{
joust2_current_sound_data = (joust2_current_sound_data & ~0xff) | (data & 0xff);
williams_cvsd_data_w(joust2_current_sound_data);
- timer_call_after_resynch(joust2_current_sound_data, joust2_deferred_snd_cmd_w);
+ timer_call_after_resynch(NULL, joust2_current_sound_data, joust2_deferred_snd_cmd_w);
}
diff --git a/src/mame/machine/xevious.c b/src/mame/machine/xevious.c
index c370a43e9f5..12d15fa8c5a 100644
--- a/src/mame/machine/xevious.c
+++ b/src/mame/machine/xevious.c
@@ -36,7 +36,7 @@ void battles_customio_init(void)
battles_customio_command_count = 0;
battles_customio_data = 0;
battles_sound_played = 0;
- nmi_timer = timer_alloc(battles_nmi_generate);
+ nmi_timer = timer_alloc(battles_nmi_generate, NULL);
}
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index c38d9c04bc8..8a317959bf8 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -1145,6 +1145,7 @@ $(MAMEOBJ)/sega.a: \
$(DRIVERS)/segas16a.o $(VIDEO)/segas16a.o \
$(DRIVERS)/segas16b.o $(VIDEO)/segas16b.o \
$(DRIVERS)/segas18.o $(VIDEO)/segas18.o \
+ $(DRIVERS)/segas24.o $(MACHINE)/segas24.o $(VIDEO)/segas24.o \
$(DRIVERS)/segas32.o $(MACHINE)/segas32.o $(VIDEO)/segas32.o \
$(DRIVERS)/segae.o $(VIDEO)/segasyse.o \
$(DRIVERS)/segaxbd.o $(VIDEO)/segaxbd.o \
@@ -1157,7 +1158,6 @@ $(MAMEOBJ)/sega.a: \
$(DRIVERS)/system1.o $(VIDEO)/system1.o \
$(DRIVERS)/system16.o $(MACHINE)/system16.o $(VIDEO)/system16.o $(VIDEO)/sys16spr.o \
$(DRIVERS)/system18.o \
- $(DRIVERS)/system24.o $(MACHINE)/system24.o $(VIDEO)/system24.o \
$(DRIVERS)/topshoot.o \
$(DRIVERS)/turbo.o $(AUDIO)/turbo.o $(VIDEO)/turbo.o \
$(DRIVERS)/vicdual.o $(AUDIO)/vicdual.o $(VIDEO)/vicdual.o \
@@ -1684,9 +1684,11 @@ $(DRIVERS)/meadows.o: $(LAYOUT)/deadeye.lh \
$(DRIVERS)/nbmj8688.o: $(LAYOUT)/nbmj8688.lh
$(DRIVERS)/peplus.o: $(LAYOUT)/peplus.lh \
- $(LAYOUT)/pepp0158.lh \
- $(LAYOUT)/pepp0188.lh \
- $(LAYOUT)/peset038.lh
+ $(LAYOUT)/pe_schip.lh \
+ $(LAYOUT)/pe_poker.lh \
+ $(LAYOUT)/pe_bjack.lh \
+ $(LAYOUT)/pe_keno.lh \
+ $(LAYOUT)/pe_slots.lh
$(DRIVERS)/pmpoker.o: $(LAYOUT)/pmpoker.lh \
$(LAYOUT)/goldnpkr.lh \
@@ -1696,6 +1698,8 @@ $(DRIVERS)/sbrkout.o: $(LAYOUT)/sbrkout.lh
$(DRIVERS)/sspeedr.o: $(LAYOUT)/sspeedr.lh
+$(DRIVERS)/tceptor.o: $(LAYOUT)/tceptor2.lh
+
$(DRIVERS)/tetrisp2.o: $(LAYOUT)/rocknms.lh
$(DRIVERS)/turbo.o: $(LAYOUT)/turbo.lh \
@@ -1716,4 +1720,4 @@ $(DRIVERS)/zac2650.o: $(LAYOUT)/tinv2650.lh
#-------------------------------------------------
$(DRIVERS)/neogeo.o: $(MAMESRC)/drivers/neodrvr.c
-$(DRIVERS)/mpu4.o: $(MAMESRC)/drivers/mpu4drvr.c \ No newline at end of file
+$(DRIVERS)/mpu4.o: $(MAMESRC)/drivers/mpu4drvr.c
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index 6ce3ef4f716..817985a5446 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -550,6 +550,7 @@ const game_driver * const drivers[] =
DRIVER( vautour2 ) /* bootleg */
DRIVER( griffon ) /* bootleg (Videotron) */
DRIVER( falcona ) /* bootleg */
+ DRIVER( nextfase ) /* bootleg */
DRIVER( pleiads ) /* (c) 1981 Tehkan */
DRIVER( pleiadbl ) /* bootleg */
DRIVER( pleiadce ) /* (c) 1981 Centuri + Tehkan */
@@ -662,6 +663,7 @@ const game_driver * const drivers[] =
DRIVER( skykid ) /* (c) 1985 */
DRIVER( skykido ) /* (c) 1985 */
DRIVER( skykidd ) /* (c) 1985 */
+ DRIVER( skykids ) /* (c) 1985 */
DRIVER( aliensec ) /* (c) 1985 */
DRIVER( baraduke ) /* (c) 1985 */
DRIVER( metrocrs ) /* (c) 1985 */
@@ -3270,6 +3272,7 @@ V-V TP-027
DRIVER( myherok ) /* 834-5755 (c) 1985 Coreland / Sega (S1) */
DRIVER( shtngmst ) /* 834-5719/5720 (c) 1985 (S2) */
DRIVER( shtngmsa ) /* 834-5719/5720 (c) 1985 (S2) */
+ DRIVER( shtngmsb ) /* 834-5719/5720 (c) 1985 (S2) */
DRIVER( chplft ) /* 834-5795 (c) 1985, (c) 1982 Dan Gorlin (S2) */
DRIVER( chplftb ) /* 834-5795 (c) 1985, (c) 1982 Dan Gorlin (S2) */
DRIVER( chplftbl ) /* bootleg (S2) */
@@ -3338,7 +3341,8 @@ DokiDoki Penguin Land *not confirmed
DRIVER( enduror1 ) /* (c) 1985 (FD1089B, decrypted) */
DRIVER( endurob2 ) /* (c) 1985 (Beta bootleg) */
DRIVER( endurobl ) /* (c) 1985 (Herb bootleg) */
- DRIVER( hangon ) /* (c) 1985 */
+ DRIVER( hangon ) /* (c) 1985 (Rev A)*/
+ DRIVER( hangon1 ) /* (c) 1985 */
DRIVER( sharrier ) /* (c) 1985 */
DRIVER( sharrir1 ) /* (c) 1985 */
DRIVER( shangupb ) /* (c) 1992 (but bootleg, hangon hw?) */
@@ -4192,6 +4196,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
DRIVER( edrandy0 ) /* MAD (c) 1990 Data East Corporation (World) */
DRIVER( edrandyj ) /* MAD (c) 1990 Data East Corporation (Japan) */
DRIVER( supbtime ) /* MAE (c) 1990 Data East Corporation (World) */
+ DRIVER( supbtima ) /* MAE (c) 1990 Data East Corporation (World) */
DRIVER( supbtimj ) /* MAE (c) 1990 Data East Corporation (Japan) */
DRIVER( mutantf ) /* MAF (c) 1992 Data East Corporation (World) */
DRIVER( mutantfa ) /* MAF (c) 1992 Data East Corporation (World) */
@@ -4971,6 +4976,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
DRIVER( caterplr ) /* (bootleg) */
DRIVER( millpac ) /* Valadon */
DRIVER( magworm ) /* (bootleg) */
+ DRIVER( mazeinv ) /* (proto) (c) 1982 */
DRIVER( milliped ) /* 136013 (c) 1982 */
DRIVER( qwak ) /* (proto) (c) 1982 */
DRIVER( runaway ) /* (proto) (c) 1982 */
@@ -5219,6 +5225,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
/* Escape from the Planet of Robot Monsters */
DRIVER( eprom ) /* 136069 (c) 1989 */
DRIVER( eprom2 ) /* 136069 (c) 1989 */
+ DRIVER( guts ) /* prototype */
/* Cyberball 2 Player */
DRIVER( cyberb2p ) /* 136071 (c) 1989 */
DRIVER( cyberb23 ) /* 136071 (c) 1989 */
@@ -7846,10 +7853,10 @@ Other Sun games
DRIVER( esha ) /* (c) 1984 Funai / Gakken */
DRIVER( eshb ) /* (c) 1984 Funai / Gakken */
DRIVER( comebaby ) /* (c) 2000 ExPotato */
- DRIVER( peplus ) /* (c) 1987 IGT - International Gaming Technology */
+ DRIVER( peset038 ) /* (c) 1987 IGT - International Gaming Technology */
DRIVER( pepp0158 ) /* (c) 1987 IGT - International Gaming Technology */
DRIVER( pepp0188 ) /* (c) 1987 IGT - International Gaming Technology */
- DRIVER( peset038 ) /* (c) 1987 IGT - International Gaming Technology */
+ DRIVER( pepp0516 ) /* (c) 1987 IGT - International Gaming Technology */
DRIVER( pebe0014 ) /* (c) 1994 IGT - International Gaming Technology */
DRIVER( peke1012 ) /* (c) 1994 IGT - International Gaming Technology */
DRIVER( peps0615 ) /* (c) 1996 IGT - International Gaming Technology */
diff --git a/src/mame/video/astrocde.c b/src/mame/video/astrocde.c
index e6c094784ee..f38e21266e5 100644
--- a/src/mame/video/astrocde.c
+++ b/src/mame/video/astrocde.c
@@ -224,7 +224,7 @@ PALETTE_INIT( profpac )
VIDEO_START( astrocde )
{
/* allocate a per-scanline timer */
- scanline_timer = timer_alloc(scanline_callback);
+ scanline_timer = timer_alloc(scanline_callback, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 1, 0), 1, attotime_zero);
/* register for save states */
@@ -239,7 +239,7 @@ VIDEO_START( astrocde )
VIDEO_START( profpac )
{
/* allocate a per-scanline timer */
- scanline_timer = timer_alloc(scanline_callback);
+ scanline_timer = timer_alloc(scanline_callback, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 1, 0), 1, attotime_zero);
/* allocate videoram */
@@ -444,7 +444,7 @@ void astrocade_trigger_lightpen(UINT8 vfeedback, UINT8 hfeedback)
else
{
cpunum_set_input_line_and_vector(0, 0, ASSERT_LINE, interrupt_vector & 0xf0);
- timer_set(ATTOTIME_IN_CYCLES(1, 0), 0, interrupt_off);
+ timer_set(ATTOTIME_IN_CYCLES(1, 0), NULL, 0, interrupt_off);
}
/* latch the feedback registers */
@@ -480,7 +480,7 @@ static TIMER_CALLBACK( scanline_callback )
else
{
cpunum_set_input_line_and_vector(0, 0, ASSERT_LINE, interrupt_vector);
- timer_set(ATTOTIME_IN_CYCLES(1, 0), 0, interrupt_off);
+ timer_set(ATTOTIME_IN_CYCLES(1, 0), NULL, 0, interrupt_off);
}
}
diff --git a/src/mame/video/atari.c b/src/mame/video/atari.c
index ca1166b42a0..a9fffa22d22 100644
--- a/src/mame/video/atari.c
+++ b/src/mame/video/atari.c
@@ -1065,12 +1065,12 @@ static int cycle(void)
}
#endif
-static void after(int cycles, void (*function)(running_machine *machine, int), const char *funcname)
+static void after(int cycles, timer_callback function, const char *funcname)
{
attotime duration = attotime_make(0, attotime_to_attoseconds(video_screen_get_scan_period(0)) * cycles / CYCLES_PER_LINE);
(void)funcname;
LOG((" after %3d (%5.1f us) %s\n", cycles, attotime_to_double(duration) * 1.0e6, funcname));
- timer_set(duration, 0, function);
+ timer_set(duration, NULL, 0, function);
}
static TIMER_CALLBACK( antic_issue_dli )
diff --git a/src/mame/video/atarimo.c b/src/mame/video/atarimo.c
index 3fd5e39f374..f0054199219 100644
--- a/src/mame/video/atarimo.c
+++ b/src/mame/video/atarimo.c
@@ -444,7 +444,7 @@ void atarimo_init(running_machine *machine, int map, const struct atarimo_desc *
init_gfxelement(machine, mo, desc->gfxindex);
/* start a timer to update a few times during refresh */
- force_update_timer = timer_alloc(force_update);
+ force_update_timer = timer_alloc(force_update, NULL);
timer_adjust(force_update_timer,video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
init_savestate(map, mo);
diff --git a/src/mame/video/atarirle.c b/src/mame/video/atarirle.c
index f5e354ede30..811b9d08cbd 100644
--- a/src/mame/video/atarirle.c
+++ b/src/mame/video/atarirle.c
@@ -118,7 +118,7 @@ UINT32 *atarirle_0_spriteram32;
//UINT16 *atarirle_0_table;
//UINT32 *atarirle_0_table32;
-int atarirle_hilite_index = -1;
+static int atarirle_hilite_index = -1;
diff --git a/src/mame/video/atarisy1.c b/src/mame/video/atarisy1.c
index 16276fb83d1..5fdca93d1c1 100644
--- a/src/mame/video/atarisy1.c
+++ b/src/mame/video/atarisy1.c
@@ -201,9 +201,9 @@ VIDEO_START( atarisy1 )
/* reset the statics */
atarimo_set_yscroll(0, 256);
next_timer_scanline = -1;
- scanline_timer = timer_alloc(int3_callback);
- int3off_timer = timer_alloc(int3off_callback);
- yscroll_reset_timer = timer_alloc(reset_yscroll_callback);
+ scanline_timer = timer_alloc(int3_callback, NULL);
+ int3off_timer = timer_alloc(int3off_callback, NULL);
+ yscroll_reset_timer = timer_alloc(reset_yscroll_callback, NULL);
}
diff --git a/src/mame/video/atarisy2.c b/src/mame/video/atarisy2.c
index 906b69c93b6..fcd4489ca20 100644
--- a/src/mame/video/atarisy2.c
+++ b/src/mame/video/atarisy2.c
@@ -133,7 +133,7 @@ VIDEO_START( atarisy2 )
tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
/* reset the statics */
- yscroll_reset_timer = timer_alloc(reset_yscroll_callback);
+ yscroll_reset_timer = timer_alloc(reset_yscroll_callback, NULL);
videobank = 0;
}
diff --git a/src/mame/video/avgdvg.c b/src/mame/video/avgdvg.c
index 85a82b03205..3e1755ca85f 100644
--- a/src/mame/video/avgdvg.c
+++ b/src/mame/video/avgdvg.c
@@ -1286,8 +1286,8 @@ static VIDEO_START( avgdvg )
flip_x = flip_y = 0;
- vg_halt_timer = timer_alloc(vg_set_halt_callback);
- vg_run_timer = timer_alloc(run_state_machine);
+ vg_halt_timer = timer_alloc(vg_set_halt_callback, NULL);
+ vg_run_timer = timer_alloc(run_state_machine, NULL);
/*
* The x and y DACs use 10 bit of the counter values which are in
diff --git a/src/mame/video/blstroid.c b/src/mame/video/blstroid.c
index ac53febf351..fb9f7289310 100644
--- a/src/mame/video/blstroid.c
+++ b/src/mame/video/blstroid.c
@@ -132,8 +132,8 @@ void blstroid_scanline_update(running_machine *machine, int scrnum, int scanline
period_on = video_screen_get_time_until_pos(scrnum, video_screen_get_vpos(scrnum) + 7, machine->screen[scrnum].width * 0.9);
period_off = video_screen_get_time_until_pos(scrnum, video_screen_get_vpos(scrnum) + 8, machine->screen[scrnum].width * 0.9);
- timer_set(period_on, 0, irq_on);
- timer_set(period_off, 0, irq_off);
+ timer_set(period_on, NULL, 0, irq_on);
+ timer_set(period_off, NULL, 0, irq_off);
}
}
diff --git a/src/mame/video/cchasm.c b/src/mame/video/cchasm.c
index 0c4cfd92693..b6e6ab93f15 100644
--- a/src/mame/video/cchasm.c
+++ b/src/mame/video/cchasm.c
@@ -100,7 +100,7 @@ static void cchasm_refresh (void)
}
}
/* Refresh processor runs with 6 MHz */
- timer_set (attotime_mul(ATTOTIME_IN_HZ(6000000), total_length), 0, cchasm_refresh_end);
+ timer_set (attotime_mul(ATTOTIME_IN_HZ(6000000), total_length), NULL, 0, cchasm_refresh_end);
}
diff --git a/src/mame/video/centiped.c b/src/mame/video/centiped.c
index b0489694ff4..d4e13bfaea0 100644
--- a/src/mame/video/centiped.c
+++ b/src/mame/video/centiped.c
@@ -368,6 +368,36 @@ WRITE8_HANDLER( milliped_paletteram_w )
}
+WRITE8_HANDLER( mazeinv_paletteram_w )
+{
+ int bit0,bit1,bit2;
+ int r,g,b;
+
+ paletteram[offset] = data;
+ data = memory_region(REGION_PROMS)[~data & 0x0f];
+
+ /* red component */
+ bit0 = (data >> 5) & 0x01;
+ bit1 = (data >> 6) & 0x01;
+ bit2 = (data >> 7) & 0x01;
+ r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+
+ /* green component */
+ bit0 = 0;
+ bit1 = (data >> 3) & 0x01;
+ bit2 = (data >> 4) & 0x01;
+ g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+
+ /* blue component */
+ bit0 = (data >> 0) & 0x01;
+ bit1 = (data >> 1) & 0x01;
+ bit2 = (data >> 2) & 0x01;
+ b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+
+ palette_set_color(Machine, offset, MAKE_RGB(r, g, b));
+}
+
+
/*************************************
*
diff --git a/src/mame/video/changela.c b/src/mame/video/changela.c
index aee25ff082b..e84294dd5e0 100644
--- a/src/mame/video/changela.c
+++ b/src/mame/video/changela.c
@@ -46,7 +46,7 @@ VIDEO_START( changela )
tree0_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
tree1_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
- changela_scanline_timer = timer_alloc(changela_scanline_callback);
+ changela_scanline_timer = timer_alloc(changela_scanline_callback, NULL);
timer_adjust(changela_scanline_timer, video_screen_get_time_until_pos(0, 30, 0), 30, attotime_zero);
state_save_register_global(slopeROM_bank);
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c
index 1ee5e333d8d..0d7dcaf77ee 100644
--- a/src/mame/video/cps1.c
+++ b/src/mame/video/cps1.c
@@ -230,7 +230,7 @@ struct CPS1config
int kludge; /* Ghouls n Ghosts sprite kludge */
};
-struct CPS1config *cps1_game_config;
+static struct CPS1config *cps1_game_config;
/* CPSB ID multiply protection ctrl priority masks unknwn layer enable masks */
#define CPS_B_01 0x00,0x0000, 0,0,0,0, /* n/a */ 0x66,{0x68,0x6a,0x6c,0x6e},0x70, {0x02,0x04,0x08,0x30,0x30}
@@ -601,11 +601,11 @@ size_t cps1_output_size;
static int palette_basecolor[6];
#define cps1_palette_entries (32*8) /* Number colour schemes in palette */
-const int cps1_scroll_size =0x4000; /* scroll1, scroll2, scroll3 */
-const int cps1_obj_size =0x0800;
-const int cps1_other_size =0x0800;
-const int cps1_palette_align=0x0800; /* can't be larger than this, breaks ringdest & batcirc otherwise */
-const int cps1_palette_size=cps1_palette_entries*32; /* Size of palette RAM */
+static const int cps1_scroll_size =0x4000; /* scroll1, scroll2, scroll3 */
+static const int cps1_obj_size =0x0800;
+static const int cps1_other_size =0x0800;
+static const int cps1_palette_align=0x0800; /* can't be larger than this, breaks ringdest & batcirc otherwise */
+static const int cps1_palette_size=cps1_palette_entries*32; /* Size of palette RAM */
static UINT16 *cps1_scroll1;
static UINT16 *cps1_scroll2;
@@ -661,7 +661,7 @@ CPS1 VIDEO RENDERER
static const int stars_rom_size = 0x2000;
/* PSL: CPS2 support */
-const int cps2_obj_size =0x2000;
+static const int cps2_obj_size =0x2000;
UINT16 *cps2_objram1,*cps2_objram2;
UINT16 *cps2_output;
diff --git a/src/mame/video/dcheese.c b/src/mame/video/dcheese.c
index a406753887a..d13cd57993c 100644
--- a/src/mame/video/dcheese.c
+++ b/src/mame/video/dcheese.c
@@ -111,7 +111,7 @@ VIDEO_START( dcheese )
dstbitmap = auto_bitmap_alloc(DSTBITMAP_WIDTH, DSTBITMAP_HEIGHT, machine->screen[0].format);
/* create a timer */
- blitter_timer = timer_alloc(blitter_scanline_callback);
+ blitter_timer = timer_alloc(blitter_scanline_callback, NULL);
/* register for saving */
state_save_register_global_array(blitter_color);
@@ -162,7 +162,7 @@ static void do_clear(void)
memset(BITMAP_ADDR16(dstbitmap, y % DSTBITMAP_HEIGHT, 0), 0, DSTBITMAP_WIDTH * 2);
/* signal an IRQ when done (timing is just a guess) */
- timer_set(video_screen_get_scan_period(0), 1, dcheese_signal_irq_callback);
+ timer_set(video_screen_get_scan_period(0), NULL, 1, dcheese_signal_irq_callback);
}
@@ -216,7 +216,7 @@ static void do_blit(void)
}
/* signal an IRQ when done (timing is just a guess) */
- timer_set(attotime_make(0, attotime_to_attoseconds(video_screen_get_scan_period(0)) / 2), 2, dcheese_signal_irq_callback);
+ timer_set(attotime_make(0, attotime_to_attoseconds(video_screen_get_scan_period(0)) / 2), NULL, 2, dcheese_signal_irq_callback);
/* these extra parameters are written but they are always zero, so I don't know what they do */
if (blitter_xparam[8] != 0 || blitter_xparam[9] != 0 || blitter_xparam[10] != 0 || blitter_xparam[11] != 0 ||
diff --git a/src/mame/video/dday.c b/src/mame/video/dday.c
index 0d6c74b6e9f..1fb2b79eef4 100644
--- a/src/mame/video/dday.c
+++ b/src/mame/video/dday.c
@@ -48,7 +48,7 @@ static void start_countdown_timer(void)
{
timer_value = 0;
- timer_pulse(ATTOTIME_IN_SEC(1), 0, countdown_timer_callback);
+ timer_pulse(ATTOTIME_IN_SEC(1), NULL, 0, countdown_timer_callback);
}
diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c
index 7d2bd13e02f..7f223290808 100644
--- a/src/mame/video/dkong.c
+++ b/src/mame/video/dkong.c
@@ -820,7 +820,7 @@ VIDEO_START( radarscp )
bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
- scanline_timer = timer_alloc(scanline_callback);
+ scanline_timer = timer_alloc(scanline_callback, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
}
@@ -837,7 +837,7 @@ VIDEO_START( radarsc1 )
bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
- scanline_timer = timer_alloc(scanline_callback);
+ scanline_timer = timer_alloc(scanline_callback, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
}
diff --git a/src/mame/video/eprom.c b/src/mame/video/eprom.c
index 9e490918765..4a5d96cfc2c 100644
--- a/src/mame/video/eprom.c
+++ b/src/mame/video/eprom.c
@@ -37,6 +37,16 @@ static TILE_GET_INFO( get_playfield_tile_info )
}
+static TILE_GET_INFO( guts_get_playfield_tile_info )
+{
+ UINT16 data1 = atarigen_playfield[tile_index];
+ UINT16 data2 = atarigen_playfield_upper[tile_index] >> 8;
+ int code = data1 & 0x7fff;
+ int color = 0x10 + (data2 & 0x0f);
+ SET_TILE_INFO(2, code, color, (data1 >> 15) & 1);
+}
+
+
/*************************************
*
@@ -95,6 +105,57 @@ VIDEO_START( eprom )
}
+VIDEO_START( guts )
+{
+ static const struct atarimo_desc modesc =
+ {
+ 0, /* index to which gfx system */
+ 1, /* number of motion object banks */
+ 1, /* are the entries linked? */
+ 0, /* are the entries split? */
+ 0, /* render in reverse order? */
+ 0, /* render in swapped X/Y order? */
+ 0, /* does the neighbor bit affect the next object? */
+ 8, /* pixels per SLIP entry (0 for no-slip) */
+ 0, /* pixel offset for SLIPs */
+ 0, /* maximum number of links to visit/scanline (0=all) */
+
+ 0x100, /* base palette entry */
+ 0x100, /* maximum number of colors */
+ 0, /* transparent pen index */
+
+ {{ 0x03ff,0,0,0 }}, /* mask for the link */
+ {{ 0 }}, /* mask for the graphics bank */
+ {{ 0,0x7fff,0,0 }}, /* mask for the code index */
+ {{ 0 }}, /* mask for the upper code index */
+ {{ 0,0,0x000f,0 }}, /* mask for the color */
+ {{ 0,0,0xff80,0 }}, /* mask for the X position */
+ {{ 0,0,0,0xff80 }}, /* mask for the Y position */
+ {{ 0,0,0,0x0070 }}, /* mask for the width, in tiles*/
+ {{ 0,0,0,0x000f }}, /* mask for the height, in tiles */
+ {{ 0,0x8000,0,0 }}, /* mask for the horizontal flip */
+ {{ 0 }}, /* mask for the vertical flip */
+ {{ 0,0,0x0070,0 }}, /* mask for the priority */
+ {{ 0 }}, /* mask for the neighbor */
+ {{ 0 }}, /* mask for absolute coordinates */
+
+ {{ 0 }}, /* mask for the special value */
+ 0, /* resulting value to indicate "special" */
+ 0 /* callback routine for special entries */
+ };
+
+ /* initialize the playfield */
+ atarigen_playfield_tilemap = tilemap_create(guts_get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 8,8, 64,64);
+
+ /* initialize the motion objects */
+ atarimo_init(machine, 0, &modesc);
+
+ /* initialize the alphanumerics */
+ atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 64,32);
+ tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
+}
+
+
/*************************************
*
@@ -268,3 +329,69 @@ VIDEO_UPDATE( eprom )
}
return 0;
}
+
+
+VIDEO_UPDATE( guts )
+{
+ struct atarimo_rect_list rectlist;
+ mame_bitmap *mobitmap;
+ int x, y, r;
+
+ /* draw the playfield */
+ tilemap_draw(bitmap, cliprect, atarigen_playfield_tilemap, 0, 0);
+
+ /* draw and merge the MO */
+ mobitmap = atarimo_render(machine, 0, cliprect, &rectlist);
+ for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
+ for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
+ {
+ UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
+ UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
+ if (mo[x])
+ {
+ int mopriority = (mo[x] >> ATARIMO_PRIORITY_SHIFT) & 7;
+ int pfpriority = (pf[x] >> 5) & 3;
+
+ /* upper bit of MO priority signals special rendering and doesn't draw anything */
+ if (mopriority & 4)
+ continue;
+
+ /* check the priority */
+ if (!(pf[x] & 8) || mopriority >= pfpriority)
+ pf[x] = mo[x] & ATARIMO_DATA_MASK;
+
+ /* don't erase yet -- we need to make another pass later */
+ }
+ }
+
+ /* add the alpha on top */
+ tilemap_draw(bitmap, cliprect, atarigen_alpha_tilemap, 0, 0);
+
+ /* now go back and process the upper bit of MO priority */
+ rectlist.rect -= rectlist.numrects;
+ for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
+ for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
+ {
+ UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
+ UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
+ if (mo[x])
+ {
+ int mopriority = mo[x] >> ATARIMO_PRIORITY_SHIFT;
+
+ /* upper bit of MO priority might mean palette kludges */
+ if (mopriority & 4)
+ {
+ /* if bit 2 is set, start setting high palette bits */
+ if (mo[x] & 2)
+ thunderj_mark_high_palette(bitmap, pf, mo, x, y);
+ }
+
+ /* erase behind ourselves */
+ mo[x] = 0;
+ }
+ }
+
+ return 0;
+}
diff --git a/src/mame/video/exctsccr.c b/src/mame/video/exctsccr.c
index 8a7447121a1..7b54d709b01 100644
--- a/src/mame/video/exctsccr.c
+++ b/src/mame/video/exctsccr.c
@@ -143,7 +143,7 @@ VIDEO_START( exctsccr )
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
TILEMAP_TYPE_PEN, 8, 8, 32, 32);
- timer_pulse(ATTOTIME_IN_HZ(75), 0, exctsccr_fm_callback); /* updates fm */
+ timer_pulse(ATTOTIME_IN_HZ(75), NULL, 0, exctsccr_fm_callback); /* updates fm */
}
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
diff --git a/src/mame/video/exidy.c b/src/mame/video/exidy.c
index f2fd7f21302..8bee8510128 100644
--- a/src/mame/video/exidy.c
+++ b/src/mame/video/exidy.c
@@ -372,14 +372,14 @@ VIDEO_EOF( exidy )
/* if we got one, trigger an interrupt */
if ((collision_mask & exidy_collision_mask) && count++ < 128)
- timer_set(video_screen_get_time_until_pos(0, org_1_x + sx, org_1_y + sy), collision_mask, collision_irq_callback);
+ timer_set(video_screen_get_time_until_pos(0, org_1_x + sx, org_1_y + sy), NULL, collision_mask, collision_irq_callback);
}
if (*BITMAP_ADDR16(motion_object_2_vid, sy, sx) != 0xff)
{
/* check for background collision (M2CHAR) */
if (((*BITMAP_ADDR16(tmpbitmap, org_2_y + sy, org_2_x + sx) - 4) & bgmask) != 0)
if ((exidy_collision_mask & 0x08) && count++ < 128)
- timer_set(video_screen_get_time_until_pos(0, org_2_x + sx, org_2_y + sy), 0x08, collision_irq_callback);
+ timer_set(video_screen_get_time_until_pos(0, org_2_x + sx, org_2_y + sy), NULL, 0x08, collision_irq_callback);
}
}
}
diff --git a/src/mame/video/exidy440.c b/src/mame/video/exidy440.c
index d2f1f27d07b..84565c86b04 100644
--- a/src/mame/video/exidy440.c
+++ b/src/mame/video/exidy440.c
@@ -354,7 +354,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
/* check the collisions bit */
if ((palette[2 * pen] & 0x80) && count++ < 128)
- timer_set(video_screen_get_time_until_pos(0, yoffs, currx), currx, collide_firq_callback);
+ timer_set(video_screen_get_time_until_pos(0, yoffs, currx), NULL, currx, collide_firq_callback);
}
currx++;
@@ -367,7 +367,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
/* check the collisions bit */
if ((palette[2 * pen] & 0x80) && count++ < 128)
- timer_set(video_screen_get_time_until_pos(0, yoffs, currx), currx, collide_firq_callback);
+ timer_set(video_screen_get_time_until_pos(0, yoffs, currx), NULL, currx, collide_firq_callback);
}
currx++;
}
@@ -456,7 +456,7 @@ VIDEO_EOF( exidy440 )
time = attotime_sub(video_screen_get_time_until_pos(0, beamy, beamx), attotime_make(0, increment * 6));
for (i = 0; i <= 12; i++)
{
- timer_set(time, beamx, beam_firq_callback);
+ timer_set(time, NULL, beamx, beam_firq_callback);
time = attotime_add(time, attotime_make(0, increment));
}
}
diff --git a/src/mame/video/fromance.c b/src/mame/video/fromance.c
index 06ae9541f5c..e1c71d18e40 100644
--- a/src/mame/video/fromance.c
+++ b/src/mame/video/fromance.c
@@ -90,7 +90,7 @@ VIDEO_START( fromance )
tilemap_set_transparent_pen(fg_tilemap,15);
/* reset the timer */
- crtc_timer = timer_alloc(crtc_interrupt_gen);
+ crtc_timer = timer_alloc(crtc_interrupt_gen, NULL);
scrollx_ofs = 0x159;
scrolly_ofs = 0x10;
@@ -129,7 +129,7 @@ VIDEO_START( nekkyoku )
tilemap_set_transparent_pen(fg_tilemap,15);
/* reset the timer */
- crtc_timer = timer_alloc(crtc_interrupt_gen);
+ crtc_timer = timer_alloc(crtc_interrupt_gen, NULL);
scrollx_ofs = 0x159;
scrolly_ofs = 0x10;
diff --git a/src/mame/video/galaxian.c b/src/mame/video/galaxian.c
index e862ade02ab..32f3e9fa863 100644
--- a/src/mame/video/galaxian.c
+++ b/src/mame/video/galaxian.c
@@ -1731,8 +1731,8 @@ void galaxian_init_stars(running_machine *machine, int colors_offset)
galaxian_stars_on = 0;
stars_blink_state = 0;
- stars_blink_timer = timer_alloc(stars_blink_callback);
- stars_scroll_timer = timer_alloc(stars_scroll_callback);
+ stars_blink_timer = timer_alloc(stars_blink_callback, NULL);
+ stars_scroll_timer = timer_alloc(stars_scroll_callback, NULL);
timer_adjusted = 0;
stars_colors_start = colors_offset;
diff --git a/src/mame/video/gticlub.c b/src/mame/video/gticlub.c
index 4a03ccaa576..eb0124c2333 100644
--- a/src/mame/video/gticlub.c
+++ b/src/mame/video/gticlub.c
@@ -153,7 +153,7 @@ static const int decode_y_gti[16] = { 0, 8, 32, 40, 1, 9, 33, 41, 64, 72, 96, 1
static const int decode_x_zr107[8] = { 0, 16, 1, 17, 2, 18, 3, 19 };
static const int decode_y_zr107[16] = { 0, 8, 32, 40, 4, 12, 36, 44, 64, 72, 96, 104, 68, 76, 100, 108 };
-UINT32 K001005_status = 0;
+static UINT32 K001005_status = 0;
static mame_bitmap *K001005_bitmap[2];
static mame_bitmap *K001005_zbuffer;
static rectangle K001005_cliprect;
diff --git a/src/mame/video/hyhoo.c b/src/mame/video/hyhoo.c
index 3f569c2e1d6..a7a987f96b9 100644
--- a/src/mame/video/hyhoo.c
+++ b/src/mame/video/hyhoo.c
@@ -226,7 +226,7 @@ void hyhoo_gfxdraw(void)
}
nb1413m3_busyflag = 0;
- timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), 0, blitter_timer_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), NULL, 0, blitter_timer_callback);
}
diff --git a/src/mame/video/itech32.c b/src/mame/video/itech32.c
index 4e00bae7b32..08f0f44dd4f 100644
--- a/src/mame/video/itech32.c
+++ b/src/mame/video/itech32.c
@@ -231,7 +231,7 @@ VIDEO_START( itech32 )
/* reset statics */
memset(itech32_video, 0, 0x80);
- scanline_timer = timer_alloc(scanline_interrupt);
+ scanline_timer = timer_alloc(scanline_interrupt, NULL);
enable_latch[0] = 1;
enable_latch[1] = (itech32_planes > 1) ? 1 : 0;
diff --git a/src/mame/video/itech8.c b/src/mame/video/itech8.c
index 9f90fb8ad33..e202867e59c 100644
--- a/src/mame/video/itech8.c
+++ b/src/mame/video/itech8.c
@@ -517,7 +517,7 @@ WRITE8_HANDLER( itech8_blitter_w )
blit_in_progress = 1;
/* set a timer to go off when we're done */
- timer_set(attotime_mul(ATTOTIME_IN_HZ(12000000/4), BLITTER_WIDTH * BLITTER_HEIGHT + 12), 0, blitter_done);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(12000000/4), BLITTER_WIDTH * BLITTER_HEIGHT + 12), NULL, 0, blitter_done);
}
/* debugging */
diff --git a/src/mame/video/jaguar.c b/src/mame/video/jaguar.c
index e4ea4b5aa88..d12762079e9 100644
--- a/src/mame/video/jaguar.c
+++ b/src/mame/video/jaguar.c
@@ -734,7 +734,7 @@ VIDEO_START( cojag )
pen_table = auto_malloc(65536 * sizeof(pen_t));
- vi_timer = timer_alloc(vi_callback);
+ vi_timer = timer_alloc(vi_callback, NULL);
state_save_register_global_pointer(pen_table, 65536);
state_save_register_global_array(blitter_regs);
diff --git a/src/mame/video/kaneko16.c b/src/mame/video/kaneko16.c
index c389ed8299d..5d3ab09d63f 100644
--- a/src/mame/video/kaneko16.c
+++ b/src/mame/video/kaneko16.c
@@ -35,7 +35,7 @@
#include "kaneko16.h"
#include "kan_pand.h"
-UINT16 kaneko16_disp_enable = 1; // default enabled for games not using it
+static UINT16 kaneko16_disp_enable = 1; // default enabled for games not using it
static tilemap *kaneko16_tmap_0, *kaneko16_tmap_1;
@@ -49,7 +49,7 @@ UINT16* galsnew_bg_pixram;
UINT16* galsnew_fg_pixram;
int kaneko16_sprite_type;
-int kaneko16_keep_sprites = 0; // default disabled for games not using it
+static int kaneko16_keep_sprites = 0; // default disabled for games not using it
UINT16 kaneko16_sprite_xoffs, kaneko16_sprite_flipx;
UINT16 kaneko16_sprite_yoffs, kaneko16_sprite_flipy;
UINT16 *kaneko16_sprites_regs;
diff --git a/src/mame/video/konamiic.c b/src/mame/video/konamiic.c
index 7c784dd5448..af766f192ba 100644
--- a/src/mame/video/konamiic.c
+++ b/src/mame/video/konamiic.c
@@ -1443,11 +1443,11 @@ static UINT8 *K007342_ram,*K007342_scroll_ram;
static int K007342_gfxnum;
static int K007342_int_enabled;
static int K007342_flipscreen;
-static int K007342_scrollx[2];
-static int K007342_scrolly[2];
+static UINT16 K007342_scrollx[2];
+static UINT8 K007342_scrolly[2];
static UINT8 *K007342_videoram_0,*K007342_colorram_0;
static UINT8 *K007342_videoram_1,*K007342_colorram_1;
-static int K007342_regs[8];
+static UINT8 K007342_regs[8];
static void (*K007342_callback)(int tmap, int bank, int *code, int *color, int *flags);
static tilemap *K007342_tilemap[2];
@@ -1517,6 +1517,14 @@ void K007342_vh_start(int gfx_index, void (*callback)(int tmap, int bank, int *c
tilemap_set_transparent_pen(K007342_tilemap[0],0);
tilemap_set_transparent_pen(K007342_tilemap[1],0);
+
+ state_save_register_global_pointer(K007342_ram, 0x2000);
+ state_save_register_global_pointer(K007342_scroll_ram, 0x0200);
+ state_save_register_global(K007342_int_enabled);
+ state_save_register_global(K007342_flipscreen);
+ state_save_register_global_array(K007342_scrollx);
+ state_save_register_global_array(K007342_scrolly);
+ state_save_register_global_array(K007342_regs);
}
READ8_HANDLER( K007342_r )
@@ -1677,6 +1685,9 @@ void K007420_vh_start(running_machine *machine, int gfxnum, void (*callback)(int
memset(K007420_ram,0,0x200);
K007420_banklimit = -1;
+
+ state_save_register_global_pointer(K007420_ram, 0x0200);
+ state_save_register_global(K007420_banklimit);
}
READ8_HANDLER( K007420_r )
@@ -2468,6 +2479,14 @@ void K051960_vh_start(running_machine *machine,int gfx_memory_region,int plane0,
K051960_callback = callback;
K051960_ram = auto_malloc(0x400);
memset(K051960_ram,0,0x400);
+
+ state_save_register_global(K051960_romoffset);
+ state_save_register_global(K051960_spriteflip);
+ state_save_register_global(K051960_readroms);
+ state_save_register_global_array(K051960_spriterombank);
+ state_save_register_global_pointer(K051960_ram, 0x400);
+ state_save_register_global(K051960_irq_enabled);
+ state_save_register_global(K051960_nmi_enabled);
}
@@ -2964,6 +2983,13 @@ void K053245_vh_start(running_machine *machine,int chip, int gfx_memory_region,i
memset(K053245_ram[chip],0,K053245_ramsize[chip]);
memset(K053245_buffer[chip],0,K053245_ramsize[chip]);
+
+ state_save_register_item_pointer("K053245", chip, K053245_ram[chip], K053245_ramsize[chip] / 2);
+ state_save_register_item_pointer("K053245", chip, K053245_buffer[chip], K053245_ramsize[chip] / 2);
+ state_save_register_item("K053245", chip, K053244_rombank[chip]);
+ state_save_register_item("K053245", chip, K053245_dx[chip]);
+ state_save_register_item("K053245", chip, K053245_dy[chip]);
+ state_save_register_item_array("K053245", chip, K053244_regs[chip]);
}
void K053245_set_SpriteOffset(int chip,int offsx, int offsy)
@@ -4613,6 +4639,12 @@ static void K051316_vh_start(running_machine *machine,int chip, int gfx_memory_r
K051316_wraparound[chip] = 0; /* default = no wraparound */
K051316_offset[chip][0] = K051316_offset[chip][1] = 0;
+
+ state_save_register_item_pointer("K051316", chip, K051316_ram[chip], 0x800);
+ state_save_register_item_array("K051316", chip, K051316_ctrlram[chip]);
+ state_save_register_item("K051316", chip, K051316_wraparound[chip]);
+ state_save_register_item("K051316", chip, K051316_offset[chip][0]);
+ state_save_register_item("K051316", chip, K051316_offset[chip][1]);
}
void K051316_vh_start_0(running_machine *machine,int gfx_memory_region,int bpp,
diff --git a/src/mame/video/leland.c b/src/mame/video/leland.c
index 1f44b6e6b4e..9388d74a83f 100644
--- a/src/mame/video/leland.c
+++ b/src/mame/video/leland.c
@@ -364,7 +364,7 @@ WRITE8_HANDLER( leland_mvram_port_w )
{
if (sync_next_write)
{
- timer_call_after_resynch(0x00000 | (offset << 8) | data, leland_delayed_mvram_w);
+ timer_call_after_resynch(NULL, 0x00000 | (offset << 8) | data, leland_delayed_mvram_w);
sync_next_write = 0;
}
else
@@ -415,7 +415,7 @@ WRITE8_HANDLER( ataxx_mvram_port_w )
offset = ((offset >> 1) & 0x07) | ((offset << 3) & 0x08) | (offset & 0x10);
if (sync_next_write)
{
- timer_call_after_resynch(0x00000 | (offset << 8) | data, leland_delayed_mvram_w);
+ timer_call_after_resynch(NULL, 0x00000 | (offset << 8) | data, leland_delayed_mvram_w);
sync_next_write = 0;
}
else
@@ -474,7 +474,7 @@ VIDEO_EOF( leland )
update_for_scanline(VIDEO_HEIGHT * 8);
/* set a timer to go off at the top of the frame */
- timer_set(video_screen_get_time_until_pos(0, 0, 0), 0, scanline_reset);
+ timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, scanline_reset);
}
diff --git a/src/mame/video/lethalj.c b/src/mame/video/lethalj.c
index 12f6b3a3adc..8843cacb068 100644
--- a/src/mame/video/lethalj.c
+++ b/src/mame/video/lethalj.c
@@ -161,7 +161,7 @@ WRITE16_HANDLER( lethalj_blitter_w )
if (offset == 7)
{
do_blit();
- timer_set(ATTOTIME_IN_USEC(10), 0, gen_ext1_int);
+ timer_set(ATTOTIME_IN_USEC(10), NULL, 0, gen_ext1_int);
}
/* clear the IRQ on offset 0 */
diff --git a/src/mame/video/m92.c b/src/mame/video/m92.c
index 7451f1d3b1e..cc3e593daf9 100644
--- a/src/mame/video/m92.c
+++ b/src/mame/video/m92.c
@@ -99,7 +99,7 @@ WRITE16_HANDLER( m92_spritecontrol_w )
/* Pixel clock is 26.6666 MHz, we have 0x800 bytes, or 0x400 words
to copy from spriteram to the buffer. It seems safe to assume 1
word can be copied per clock.*/
- timer_set(attotime_mul(ATTOTIME_IN_HZ(26666000), 0x400), 0, spritebuffer_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(26666000), 0x400), NULL, 0, spritebuffer_callback);
}
// logerror("%04x: m92_spritecontrol_w %08x %08x\n",activecpu_get_pc(),offset,data);
}
diff --git a/src/mame/video/malzak.c b/src/mame/video/malzak.c
index 8f05d10c918..90eaeabf01b 100644
--- a/src/mame/video/malzak.c
+++ b/src/mame/video/malzak.c
@@ -28,7 +28,8 @@ static INT8 frame_count;
#define SAA5050_BLACK 0
#define SAA5050_WHITE 7
-struct {
+static struct
+{
UINT16 saa5050_flags;
UINT8 saa5050_forecol;
UINT8 saa5050_backcol;
diff --git a/src/mame/video/midtunit.c b/src/mame/video/midtunit.c
index 75a2dc9f017..f7f4e841877 100644
--- a/src/mame/video/midtunit.c
+++ b/src/mame/video/midtunit.c
@@ -44,9 +44,6 @@ enum
UINT8 midtunit_gfx_rom_large;
static UINT16 midtunit_control;
-/* palette-related variables */
-static pen_t * pen_map;
-
/* videoram-related variables */
static UINT32 gfxbank_offset[2];
static UINT16 * local_videoram;
@@ -89,15 +86,8 @@ static struct
VIDEO_START( midtunit )
{
- int i;
-
/* allocate memory */
local_videoram = auto_malloc(0x100000);
- pen_map = auto_malloc(65536 * sizeof(pen_map[0]));
-
- /* initialize pen map */
- for (i = 0; i < 0x10000; i++)
- pen_map[i] = i & 0x7fff;
/* reset all the globals */
gfxbank_offset[0] = 0x000000;
@@ -804,7 +794,7 @@ WRITE16_HANDLER( midtunit_dma_w )
/* signal we're done */
skipdma:
- timer_set(ATTOTIME_IN_NSEC(41 * pixels), 0, dma_callback);
+ timer_set(ATTOTIME_IN_NSEC(41 * pixels), NULL, 0, dma_callback);
profiler_mark(PROFILER_END);
}
@@ -826,7 +816,7 @@ void midtunit_scanline_update(running_machine *machine, int screen, mame_bitmap
/* copy the non-blanked portions of this scanline */
for (x = params->heblnk; x < params->hsblnk; x++)
- dest[x] = pen_map[src[coladdr++ & 0x1ff]];
+ dest[x] = src[coladdr++ & 0x1ff] & 0x7fff;
}
void midxunit_scanline_update(running_machine *machine, int screen, mame_bitmap *bitmap, int scanline, const tms34010_display_params *params)
@@ -838,5 +828,5 @@ void midxunit_scanline_update(running_machine *machine, int screen, mame_bitmap
/* copy the non-blanked portions of this scanline */
for (x = params->heblnk; x < params->hsblnk; x++)
- dest[x] = pen_map[src[fulladdr++ & 0x1ff]];
+ dest[x] = src[fulladdr++ & 0x1ff] & 0x7fff;
}
diff --git a/src/mame/video/midvunit.c b/src/mame/video/midvunit.c
index 31577255a60..5d7094106b9 100644
--- a/src/mame/video/midvunit.c
+++ b/src/mame/video/midvunit.c
@@ -70,7 +70,7 @@ static void midvunit_exit(running_machine *machine)
VIDEO_START( midvunit )
{
- scanline_timer = timer_alloc(scanline_timer_cb);
+ scanline_timer = timer_alloc(scanline_timer_cb, NULL);
poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
add_exit_callback(machine, midvunit_exit);
}
diff --git a/src/mame/video/midyunit.c b/src/mame/video/midyunit.c
index 2fbb9624b02..d5db9fa473e 100644
--- a/src/mame/video/midyunit.c
+++ b/src/mame/video/midyunit.c
@@ -580,7 +580,7 @@ WRITE16_HANDLER( midyunit_dma_w )
}
/* signal we're done */
- timer_set(ATTOTIME_IN_NSEC(41 * dma_state.width * dma_state.height), 0, dma_callback);
+ timer_set(ATTOTIME_IN_NSEC(41 * dma_state.width * dma_state.height), NULL, 0, dma_callback);
profiler_mark(PROFILER_END);
}
@@ -614,10 +614,10 @@ void midyunit_scanline_update(running_machine *machine, int screen, mame_bitmap
dest[x] = pen_map[src[coladdr++ & 0x1ff]];
/* handle autoerase on the previous line */
- autoerase_line(machine, params->rowaddr - 1);
+ autoerase_line(machine, NULL, params->rowaddr - 1);
/* if this is the last update of the screen, set a timer to clear out the final line */
/* (since we update one behind) */
if (scanline == machine->screen[0].visarea.max_y)
- timer_set(video_screen_get_time_until_pos(0, scanline + 1, 0), params->rowaddr, autoerase_line);
+ timer_set(video_screen_get_time_until_pos(0, scanline + 1, 0), NULL, params->rowaddr, autoerase_line);
}
diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c
index ce44dda519e..b9f1e84c93a 100644
--- a/src/mame/video/midzeus.c
+++ b/src/mame/video/midzeus.c
@@ -51,7 +51,7 @@ UINT32 *zeusbase;
static poly_manager *poly;
-static UINT32 zeuscmd_buffer[8];
+static UINT32 zeuscmd_buffer[20];
static UINT8 zeuscmd_buffer_words;
static UINT8 zeuscmd_buffer_expected_words;
static INT16 zeus_matrix[3][3];
@@ -62,11 +62,15 @@ static UINT32 zeus_blend;
static UINT32 zeus_texdata;
static UINT32 zeus_objdata;
-static UINT32 last_tex[1000][2];
-static int last_tex_index;
-
static UINT32 *waveram;
+static UINT8 single_step;
+static poly_extra_data single_step_extra;
+static UINT32 single_step_val1;
+static UINT32 single_step_val2;
+static INT32 single_step_dx, single_step_dy;
+static UINT8 single_step_advance;
+
/*************************************
@@ -77,6 +81,12 @@ static UINT32 *waveram;
static void exit_handler(running_machine *machine);
+static void zeus_write_16bit(offs_t offset, UINT16 data, int logit);
+static void zeus_write_32bit(offs_t offset, UINT32 data, int logit);
+static void zeus_process_write(offs_t offset);
+static void zeuscmd_execute(int words);
+static UINT8 zeuscmd_length(UINT32 word);
+
/*************************************
@@ -249,6 +259,37 @@ VIDEO_UPDATE( midzeus )
src += 2;
}
}
+
+ if (single_step)
+ {
+ int texwshift = ((single_step_val2 >> 6) + single_step_dx) & 7;
+ const UINT32 *texbase = &waveram[(single_step_val1 << ((7 + single_step_dy) - texwshift)) & 0x3fffff];
+ int texwidth = 512 >> texwshift;
+ int texdepth = (single_step_val2 & 0x20) ? 8 : 4;
+ int x, y;
+
+ for (y = 0; y < 256; y++)
+ {
+ UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels + 400;
+ for (x = 0; x < 256; x++)
+ {
+ if (x < texwidth)
+ dest[x] = single_step_extra.palbase[(texdepth == 8) ?
+ get_texel_8bit(texbase, y, x, texwidth) :
+ get_texel_4bit(texbase, y, x, texwidth)];
+ else
+ dest[x] = 0;
+ }
+ }
+
+ popmessage("val1=%08X val2=%08X\nwidth=%d depth=%d", single_step_val1, single_step_val2, texwidth, texdepth);
+
+ if (input_code_pressed(KEYCODE_UP)) { single_step_dy--; while (input_code_pressed(KEYCODE_UP)) ; }
+ if (input_code_pressed(KEYCODE_DOWN)) { single_step_dy++; while (input_code_pressed(KEYCODE_DOWN)) ; }
+ if (input_code_pressed(KEYCODE_LEFT)) { single_step_dx--; while (input_code_pressed(KEYCODE_LEFT)) ; }
+ if (input_code_pressed(KEYCODE_RIGHT)) { single_step_dx++; while (input_code_pressed(KEYCODE_RIGHT)) ; }
+ if (input_code_pressed(KEYCODE_LSHIFT)) { single_step_advance = TRUE; while (input_code_pressed(KEYCODE_LSHIFT)) ; }
+ }
}
/* waveram drawing case */
@@ -278,164 +319,11 @@ VIDEO_UPDATE( midzeus )
popmessage("offs = %06X", yoffs << 12);
}
- if (input_code_pressed(KEYCODE_T) && last_tex_index != 0)
- {
- int i;
- printf("----\n");
- for (i = 0; i < last_tex_index; i++)
- printf("%06X %03X (w=%d)\n", last_tex[i][0], last_tex[i][1], 512 >> ((last_tex[i][1] >> 6) & 7));
- last_tex_index = 0;
- }
-
return 0;
}
-/*
-
- New analysis:
-
- Offset
- ------
-
- $58 W Usually written after $5A; after writing, waits for $F6 bit 4 to be cleared
-
- $5A W Usually written first, followed by $58
-
- $68 W Written at startup:
- $00030000 = toggled on then off at startup
-
- $76 W
-
- $7C W
-
- $80 W Master control
-
- $40000000 = set along with $02000000 when enabling FIFO empty interrupt
- $02000000 = enable internal data FIFO empty interrupt
- $01000000 = cleared along with $02000000 when disabling FIFO empty interrupt
- $00020000 = 16-bit (0) or 32-bit (1) mode
- $00000008 = cleared just before writing to offsets $200-$3FF
-
- $82 W
- $84 W
- $86 W
- $88 W
- $8A W
- $8C W
- $8E W
-
- $B0 R/W Data port for direct RAM access
- $B2 R/W Data port for direct RAM access
-
- $B4 W Address for direct RAM access
-
- $07FF0100 = mask for Y coordinate
- $000000FF = mask for X coordinate
-
- $B6 W Direct RAM access control
-
- $80000000 = enable writes to wave RAM 0
- $40000000 = enable writes to wave RAM 1
- $02000000 = perform access on write to B0(0) or B2(1) ?????
- $00800000 = enable writes from [$B2] to depth buffer
- $00400000 = enable writes from [$B0] to depth buffer
- $00200000 = enable writes from [$B2] to RAM buffer
- $00100000 = enable writes from [$B0] to RAM buffer
- $00020000 = auto increment the address
- $00010000 = perform a read when the address is written
- $00000001 = enable direct RAM access
-
- Examples:
- $80A00000 when writing a single pixel (address written each time)
- $80A20001 when writing the right pixel of a pair (autoinc assumed)
- $80F60001 when writing the middle pairs of pixels (autoinc assumed)
- $80520001 when writing the left pixel of a pair (autoinc assumed)
- $82F00001 when testing wave RAM page 1 (address written each pair)
- $42F00001 when testing wave RAM page 0 (address written each pair)
- $82F60001 when uploading to wave RAM page 1 (autoinc assumed)
- $42F60001 when uploading to wave RAM page 0 (autoinc assumed)
-
- $C0 W Written at startup = $801F2500
- $C2 W Written at startup = $0015E591
- $C4 W Written at startup = $000C0042 (HSYNC start/HSYNC end?)
- $C6 W Written at startup = $0211007F (HTOTAL/HBLANK end?)
- $C8 W Written at startup = $010300FF (VSYNC start/VBLANK start?)
- $CA W Written at startup = $01160107 (VTOTAL/VSYNC end?)
- $CC W Written at startup = $00000000
- $CE W Written at startup = $00C87620
-
- $E0 W Internal data FIFO
-
- $F2 R Looped on until it returns a stable value; must change frequently; PRNG?
-
- $F4 R Status register
-
- $00000800 = VBLANK? code waits for it to clear to 0 and then reset to 1
- $00000140 = tested together in tight loop until both are 0
- $00000008 = internal data FIFO full
- $00000004 = tested in tight loop along with $00000002 until at least one is set
- $00000002 = tested in tight loop after handling FIFO interrupt until set
-
- $F6 R Status register 2
-
- $00000010 = tested in tight loop after writing 5A/59/58 until set to 0
-
- $200- W Unknown, but written in a loop with master control bit $00000008 cleared
- $3FF Possible fast buffer clear? One set of writes stores $7F7F to all entries.
- A second set writes $E00,$25,$E01,$25,...,$E7F,$25. A third set writes
- $52,$A0000000,...
-
-Notes:
-
- In 16-bit mode, writes to $E0 are done via $E1 first then $E0
-
--------------------------------------------------------
-
-Old info:
-
- offset B7 = control....
-
- 8000 = page 1 enable
- 4000 = page 0 enable
-
- 0080 = 2nd pixel enable (maybe Z buff?)
- 0040 = 1st pixel enable (maybe Z buff?)
- 0020 = 2nd pixel enable
- 0010 = 1st pixel enable
-
-
- writes 80a2 to write an odd pixel at startup
- writes 80f6 to write the middle pixels
- writes 8052 to write an odd pixel at the end
-
- writes 8050 before writing an odd pixel
- writes 80a0 before writing an even pixel
-
- writes 44f1 before reading from page 0 of wave ram
- writes 84f1 before reading from page 1 of wave ram
-
- writes 42f0 before writing to page 0 of wave ram
- writes 82f0 before writing to page 1 of wave ram
-
-*/
-
-/*
- zeus data notes:
-
- Data from $1000-1A20
- Palettes at $2000,$2200,$2400
- Data from $2600-27C7
- Palettes at $27C8,$29C8,$2BC8,$2DC8
- Palettes up through $5A000
-
- Interesting data at $5A000-5BFFF
-
- Common sequence:
- $8000 xxxx $0C01 $3805
- x = matches address of next data * 8
-*/
@@ -473,6 +361,16 @@ Old info:
$0000C040 = set palette to 'yyyyyyyy'
+ $01rrxxxx = another type of register set?
+ yyyyyyyy
+
+ $01008000 = set object pointer (equivalent to word 2 of command $67)
+ $0100C0B0 = set texture data (equivalent to word 1 of command $67)
+ $0100C09C
+ $0100C0A3
+ $0100C0F0
+ $0100C040 = set palette base
+
$17rrxxxx = 16-bit write 'xxxx' to register 'rr'
$1752xxxx = write 'xxxx' to something that reflects back through $B2
@@ -480,7 +378,7 @@ Old info:
$1772xxxx = write 'xxxx' to upper 16 bits of Y coordinate
$1774xxxx = write 'xxxx' to upper 16 bits of Z coordinate
- $18rr0000 = 32-bit write 'xxxxxxxx' to register 'rr'
+ $18rr0000 = 32-bit write 'xxxxxxxx' to register ('rr' & 0x7f)
xxxxxxxx
$1A000000 = pipeline synchronize (guess)
@@ -500,6 +398,9 @@ Old info:
*/
/*
+
+MK4:
+
Zeus cmd 18 : 18D60000 500A00FF
Zeus cmd 00 : 0005C0A5 21001125
Zeus cmd 25 : 25000000 007F0018 01000400 B0F60008
@@ -602,7 +503,434 @@ Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -101.00
08000000 00000000
*/
+/*
+
+Note this sequence:
+Zeus cmd 17 : 1757500A
+Zeus cmd 17 : 175600FF
+Zeus cmd 17 : 176F0032
+Zeus cmd 17 : 176E0031
+Zeus cmd 17 : 176D003B
+Zeus cmd 17 : 176C002F
+Appears to do the same thing as:
+Zeus cmd 18 : 18D60000 500A00FF
+Zeus cmd 18 : 18EE0000 00320031
+Zeus cmd 18 : 18EC0000 003B002F
+
+
+
+Also this sequence:
+Zeus cmd 17 : 176940C4
+Zeus cmd 17 : 17681370
+
+Seems to have the same purpose as this part of the command stream:
+ 19E80000 40C41370
+
+
+
+Invasion startup:
+
+00CC86:zeus16_w(81) = 0000 [00000000]
+00CC86:zeus16_w(80) = 0000 [00000000]
+00CC86:zeus16_w(4B) = 018F [018F0000]
+00CC86:zeus16_w(4A) = 01FE [018F01FE]
+00CC86:zeus16_w(49) = 018F [018F0000]
+00CC86:zeus16_w(48) = 01FE [018F01FE]
+00CC86:zeus16_w(CE) = 7620 [00007620]
+00CC86:zeus16_w(CD) = 0000 [00000000]
+00CC86:zeus16_w(CC) = 0000 [00000000]
+00CC86:zeus16_w(CB) = 0116 [01160000]
+00CC86:zeus16_w(CA) = 0107 [01160107]
+00CC86:zeus16_w(C9) = 0103 [01030000]
+00CC86:zeus16_w(C8) = 00FF [010300FF]
+00CC86:zeus16_w(C7) = 0211 [02110000]
+00CC86:zeus16_w(C6) = 007F [0211007F]
+00CC86:zeus16_w(C5) = 000C [000C0000]
+00CC86:zeus16_w(C4) = 004C [000C004C]
+00CC86:zeus16_w(C3) = 001F [001F0000]
+00CC86:zeus16_w(C2) = E591 [001FE591]
+00CC86:zeus16_w(C1) = 801F [801F0000]
+00CC86:zeus16_w(C0) = 2500 [801F2500]
+00CC86:zeus16_w(86) = 8003 [00008003]
+00CC86:zeus16_w(80) = 0C05 [00000C05]
+00CC86:zeus16_w(8F) = 0206 [02060000]
+00CC86:zeus16_w(8E) = 0000 [02060000]
+00CC86:zeus16_w(8D) = 0226 [02260000]
+00CC86:zeus16_w(8C) = 0000 [02260000]
+00CC86:zeus16_w(8B) = 0000 [00000000]
+00CC86:zeus16_w(8A) = FAFA [0000FAFA]
+00CC86:zeus16_w(89) = 0000 [00000000]
+00CC86:zeus16_w(88) = FAFA [0000FAFA]
+00CC86:zeus16_w(80) = 0001 [00000001]
+00CC86:zeus16_w(8F) = 0207 [02070000]
+00CC86:zeus16_w(8E) = BFFF [0207BFFF]
+00CC86:zeus16_w(8F) = 0206 [0206BFFF]
+00CC86:zeus16_w(8E) = 0000 [02060000]
+00CC86:zeus16_w(8D) = 0227 [02270000]
+00CC86:zeus16_w(8C) = BFFF [0227BFFF]
+00CC86:zeus16_w(8D) = 0226 [0226BFFF]
+00CC86:zeus16_w(8C) = 0000 [02260000]
+00CC86:zeus16_w(8F) = 0207 [02070000]
+00CC86:zeus16_w(8E) = F020 [0207F020]
+00CC86:zeus16_w(8F) = 0206 [0206F020]
+00CC86:zeus16_w(8E) = 0000 [02060000]
+00CC86:zeus16_w(8D) = 0227 [02270000]
+00CC86:zeus16_w(8C) = F020 [0227F020]
+00CC86:zeus16_w(8D) = 0226 [0226F020]
+00CC86:zeus16_w(8C) = 0000 [02260000]
+00CC86:zeus16_w(8F) = 0207 [02070000]
+00CC86:zeus16_w(8E) = DFFF [0207DFFF]
+00CC86:zeus16_w(8F) = 0206 [0206DFFF]
+00CC86:zeus16_w(8E) = 0000 [02060000]
+00CC86:zeus16_w(8D) = 0227 [02270000]
+00CC86:zeus16_w(8C) = DFFF [0227DFFF]
+00CC86:zeus16_w(8D) = 0226 [0226DFFF]
+00CC86:zeus16_w(8C) = 0000 [02260000]
+00CC86:zeus16_w(8F) = 0207 [02070000]
+00CC86:zeus16_w(8E) = DFFF [0207DFFF]
+00CC86:zeus16_w(8F) = 0206 [0206DFFF]
+00CC86:zeus16_w(8E) = 0000 [02060000]
+00CC86:zeus16_w(8D) = 0227 [02270000]
+00CC86:zeus16_w(8C) = DFFF [0227DFFF]
+00CC86:zeus16_w(8D) = 0226 [0226DFFF]
+00CC86:zeus16_w(8C) = 0000 [02260000]
+00CC86:zeus16_w(8F) = 0206 [02060000]
+00CC86:zeus16_w(8E) = 0000 [02060000]
+00CC86:zeus16_w(8D) = 0226 [02260000]
+00CC86:zeus16_w(8C) = 0000 [02260000]
+00CC86:zeus16_w(8B) = 0000 [0000FAFA]
+00CC86:zeus16_w(8A) = D254 [0000D254]
+00CC86:zeus16_w(89) = 8FFF [8FFFFAFA]
+00CC86:zeus16_w(88) = D794 [8FFFD794]
+00CC86:zeus16_w(85) = 0000 [00000000]
+00CC86:zeus16_w(84) = 0000 [00000000]
+00CC86:zeus16_w(83) = 1F1F [1F1F0000]
+00CC86:zeus16_w(82) = 2011 [1F1F2011]
+00CC86:zeus16_w(69) = 0003 [00030000]
+00CC86:zeus16_w(69) = 0000 [00000000]
+00CC86:zeus16_w(68) = 0100 [00000100]
+00CC92:zeus16_w(200) = 0100 [00000100]
+00CC92:zeus16_w(201) = 0000 [00000100]
+00CC92:zeus16_w(202) = 0000 [00000000]
+00CC92:zeus16_w(203) = 0000 [00000000]
+00CC92:zeus16_w(204) = 00D4 [000000D4]
+00CC92:zeus16_w(205) = 0000 [000000D4]
+00CC92:zeus16_w(206) = 0000 [00000000]
+00CC92:zeus16_w(207) = A000 [A0000000]
+00CC92:zeus16_w(208) = 0050 [00000050]
+00CC92:zeus16_w(209) = 0000 [00000050]
+00CC92:zeus16_w(20A) = 0000 [00000000]
+00CC92:zeus16_w(20B) = A000 [A0000000]
+00CC92:zeus16_w(20C) = 0703 [00000703]
+00CC92:zeus16_w(20D) = 0000 [00000703]
+00CC92:zeus16_w(20E) = 0000 [00000000]
+00CC92:zeus16_w(20F) = 0000 [00000000]
+00CC92:zeus16_w(210) = 0050 [00000050]
+00CC92:zeus16_w(211) = 0000 [00000050]
+00CC92:zeus16_w(212) = 0000 [00000000]
+00CC92:zeus16_w(213) = A000 [A0000000]
+00CC92:zeus16_w(214) = 005A [0000005A]
+00CC92:zeus16_w(215) = 01C0 [01C0005A]
+00CC92:zeus16_w(216) = 0000 [00000000]
+00CC92:zeus16_w(217) = B000 [B0000000]
+00CC92:zeus16_w(218) = 00D8 [000000D8]
+00CC92:zeus16_w(219) = 0000 [000000D8]
+00CC92:zeus16_w(21A) = 0000 [00000000]
+00CC92:zeus16_w(21B) = 9000 [90000000]
+00CC92:zeus16_w(21C) = 0607 [00000607]
+00CC92:zeus16_w(21D) = 0000 [00000607]
+00CC92:zeus16_w(21E) = 0000 [00000000]
+00CC92:zeus16_w(21F) = 0000 [00000000]
+00CC92:zeus16_w(220) = C000 [0000C000]
+00CC92:zeus16_w(221) = 0008 [0008C000]
+00CC92:zeus16_w(222) = 0000 [00000000]
+00CC92:zeus16_w(223) = 003F [003F0000]
+00CC92:zeus16_w(224) = 006A [0000006A]
+00CC92:zeus16_w(225) = 01D0 [01D0006A]
+00CC92:zeus16_w(226) = 0025 [00000025]
+00CC92:zeus16_w(227) = B000 [B0000025]
+00CC92:zeus16_w(228) = 0F00 [00000F00]
+00CC92:zeus16_w(229) = 0000 [00000F00]
+00CC92:zeus16_w(22A) = 0001 [00000001]
+00CC92:zeus16_w(22B) = 0000 [00000001]
+00CC92:zeus16_w(22C) = 0E08 [00000E08]
+00CC92:zeus16_w(22D) = 0000 [00000E08]
+00CC92:zeus16_w(22E) = 0000 [00000000]
+00CC92:zeus16_w(22F) = 0000 [00000000]
+00CC92:zeus16_w(230) = 00D4 [000000D4]
+00CC92:zeus16_w(231) = 0000 [000000D4]
+00CC92:zeus16_w(232) = 0000 [00000000]
+00CC92:zeus16_w(233) = A000 [A0000000]
+00CC92:zeus16_w(234) = 0050 [00000050]
+00CC92:zeus16_w(235) = 0000 [00000050]
+00CC92:zeus16_w(236) = 0000 [00000000]
+00CC92:zeus16_w(237) = A000 [A0000000]
+00CC92:zeus16_w(238) = 070E [0000070E]
+00CC92:zeus16_w(239) = 0000 [0000070E]
+00CC92:zeus16_w(23A) = 0000 [00000000]
+00CC92:zeus16_w(23B) = 0000 [00000000]
+00CC92:zeus16_w(23C) = 0050 [00000050]
+00CC92:zeus16_w(23D) = 0000 [00000050]
+00CC92:zeus16_w(23E) = 0000 [00000000]
+00CC92:zeus16_w(23F) = A000 [A0000000]
+00CC92:zeus16_w(240) = 005A [0000005A]
+00CC92:zeus16_w(241) = 01C0 [01C0005A]
+00CC92:zeus16_w(242) = 0000 [00000000]
+00CC92:zeus16_w(243) = B000 [B0000000]
+00CC92:zeus16_w(244) = 00D8 [000000D8]
+00CC92:zeus16_w(245) = 0000 [000000D8]
+00CC92:zeus16_w(246) = 0000 [00000000]
+00CC92:zeus16_w(247) = 8CC0 [8CC00000]
+00CC92:zeus16_w(248) = 0612 [00000612]
+00CC92:zeus16_w(249) = 0000 [00000612]
+00CC92:zeus16_w(24A) = 0000 [00000000]
+00CC92:zeus16_w(24B) = 0000 [00000000]
+00CC92:zeus16_w(24C) = D000 [0000D000]
+00CC92:zeus16_w(24D) = 0008 [0008D000]
+00CC92:zeus16_w(24E) = 8000 [00008000]
+00CC92:zeus16_w(24F) = 003E [003E8000]
+00CC92:zeus16_w(250) = 006A [0000006A]
+00CC92:zeus16_w(251) = 01D0 [01D0006A]
+00CC92:zeus16_w(252) = 0025 [00000025]
+00CC92:zeus16_w(253) = B000 [B0000025]
+00CC92:zeus16_w(254) = 0F00 [00000F00]
+00CC92:zeus16_w(255) = 0000 [00000F00]
+00CC92:zeus16_w(256) = 0001 [00000001]
+00CC92:zeus16_w(257) = 0000 [00000001]
+00CC92:zeus16_w(258) = 0E13 [00000E13]
+00CC92:zeus16_w(259) = 0000 [00000E13]
+00CC92:zeus16_w(25A) = 0000 [00000000]
+00CC92:zeus16_w(25B) = 0000 [00000000]
+00CC92:zeus16_w(25C) = 0F00 [00000F00]
+00CC92:zeus16_w(25D) = 05C0 [05C00F00]
+00CC92:zeus16_w(25E) = 0000 [00000000]
+00CC92:zeus16_w(25F) = B000 [B0000000]
+00CC92:zeus16_w(260) = 0F80 [00000F80]
+00CC92:zeus16_w(261) = 0400 [04000F80]
+00CC92:zeus16_w(262) = 0000 [00000000]
+00CC92:zeus16_w(263) = 9000 [90000000]
+00CC92:zeus16_w(264) = 0F80 [00000F80]
+00CC92:zeus16_w(265) = 0400 [04000F80]
+00CC92:zeus16_w(266) = 0000 [00000000]
+00CC92:zeus16_w(267) = 8CC0 [8CC00000]
+00CC92:zeus16_w(268) = 011A [0000011A]
+00CC92:zeus16_w(269) = 0000 [0000011A]
+00CC92:zeus16_w(26A) = 0000 [00000000]
+00CC92:zeus16_w(26B) = 0000 [00000000]
+00CC92:zeus16_w(26C) = 0F00 [00000F00]
+00CC92:zeus16_w(26D) = 0000 [00000F00]
+00CC92:zeus16_w(26E) = 0000 [00000000]
+00CC92:zeus16_w(26F) = 0000 [00000000]
+00CC92:zeus16_w(270) = A001 [0000A001]
+00CC92:zeus16_w(271) = 0003 [0003A001]
+00CC92:zeus16_w(272) = 0025 [00000025]
+00CC92:zeus16_w(273) = 0000 [00000025]
+00CC92:zeus16_w(274) = 0000 [00000000]
+00CC92:zeus16_w(275) = 40F3 [40F30000]
+00CC92:zeus16_w(276) = 0000 [00000000]
+00CC92:zeus16_w(277) = 0000 [00000000]
+00CC92:zeus16_w(278) = 4000 [00004000]
+00CC92:zeus16_w(279) = 0803 [08034000]
+00CC92:zeus16_w(27A) = 2000 [00002000]
+00CC92:zeus16_w(27B) = 0013 [00132000]
+00CC92:zeus16_w(27C) = 8000 [00008000]
+00CC92:zeus16_w(27D) = 0003 [00038000]
+00CC92:zeus16_w(27E) = 1000 [00001000]
+00CC92:zeus16_w(27F) = 003E [003E1000]
+00CC92:zeus16_w(280) = 20F0 [000020F0]
+00CC92:zeus16_w(281) = 0001 [000120F0]
+00CC92:zeus16_w(282) = 0000 [00000000]
+00CC92:zeus16_w(283) = 93C0 [93C00000]
+00CC92:zeus16_w(284) = 60F2 [000060F2]
+00CC92:zeus16_w(285) = 0001 [000160F2]
+00CC92:zeus16_w(286) = 0000 [00000000]
+00CC92:zeus16_w(287) = 9380 [93800000]
+00CC92:zeus16_w(288) = FFF4 [0000FFF4]
+00CC92:zeus16_w(289) = 0001 [0001FFF4]
+00CC92:zeus16_w(28A) = 0000 [00000000]
+00CC92:zeus16_w(28B) = 90C0 [90C00000]
+00CC92:zeus16_w(28C) = 0000 [00000000]
+00CC92:zeus16_w(28D) = 0000 [00000000]
+00CC92:zeus16_w(28E) = 0000 [00000000]
+00CC92:zeus16_w(28F) = 0000 [00000000]
+00CC92:zeus16_w(290) = 0000 [00000000]
+00CC92:zeus16_w(291) = 0000 [00000000]
+00CC92:zeus16_w(292) = 0000 [00000000]
+00CC92:zeus16_w(293) = 0000 [00000000]
+00CC92:zeus16_w(294) = 0000 [00000000]
+00CC92:zeus16_w(295) = 0000 [00000000]
+00CC92:zeus16_w(296) = 0000 [00000000]
+00CC92:zeus16_w(297) = 0000 [00000000]
+00CC92:zeus16_w(298) = 0000 [00000000]
+00CC92:zeus16_w(299) = 0000 [00000000]
+00CC92:zeus16_w(29A) = 0000 [00000000]
+00CC92:zeus16_w(29B) = 0000 [00000000]
+00CC92:zeus16_w(29C) = 0000 [00000000]
+00CC92:zeus16_w(29D) = 0000 [00000000]
+00CC92:zeus16_w(29E) = 0000 [00000000]
+00CC92:zeus16_w(29F) = 0000 [00000000]
+00CC92:zeus16_w(2A0) = 0000 [00000000]
+00CC92:zeus16_w(2A1) = 0000 [00000000]
+00CC92:zeus16_w(2A2) = 0000 [00000000]
+00CC92:zeus16_w(2A3) = 0000 [00000000]
+00CC92:zeus16_w(2A4) = 0000 [00000000]
+00CC92:zeus16_w(2A5) = 0000 [00000000]
+00CC92:zeus16_w(2A6) = 0000 [00000000]
+00CC92:zeus16_w(2A7) = 0000 [00000000]
+00CC92:zeus16_w(2A8) = 0000 [00000000]
+00CC92:zeus16_w(2A9) = 0000 [00000000]
+00CC92:zeus16_w(2AA) = 0000 [00000000]
+00CC92:zeus16_w(2AB) = 0000 [00000000]
+00CC92:zeus16_w(2AC) = 0000 [00000000]
+00CC92:zeus16_w(2AD) = 0000 [00000000]
+00CC92:zeus16_w(2AE) = 0000 [00000000]
+00CC92:zeus16_w(2AF) = 0000 [00000000]
+00CC92:zeus16_w(2B0) = 0000 [00000000]
+00CC92:zeus16_w(2B1) = 0000 [00000000]
+00CC92:zeus16_w(2B2) = 0000 [00000000]
+00CC92:zeus16_w(2B3) = 0000 [00000000]
+00CC92:zeus16_w(2B4) = 7F00 [00007F00]
+00CC92:zeus16_w(2B5) = 0001 [00017F00]
+00CC92:zeus16_w(2B6) = 0000 [00000000]
+00CC92:zeus16_w(2B7) = 03C0 [03C00000]
+00CC92:zeus16_w(2B8) = C000 [0000C000]
+00CC92:zeus16_w(2B9) = 0003 [0003C000]
+00CC92:zeus16_w(2BA) = 0000 [00000000]
+00CC92:zeus16_w(2BB) = 0000 [00000000]
+00CC92:zeus16_w(2BC) = EF00 [0000EF00]
+00CC92:zeus16_w(2BD) = 0001 [0001EF00]
+00CC92:zeus16_w(2BE) = 0000 [00000000]
+00CC92:zeus16_w(2BF) = 03C0 [03C00000]
+00CC92:zeus16_w(2C0) = 0007 [00000007]
+00CC86:zeus16_w(68) = 0008 [00000008]
+00CC86:zeus16_w(80) = 0C01 [00000C01]
+00CC86:zeus16_w(80) = 0C1D [00000C1D]
+00CC86:zeus16_w(69) = 0003 [00030008]
+00CC86:zeus16_w(69) = 0000 [00000008]
+00CC86:zeus16_w(80) = 0C01 [00000C01]
+00CC86:zeus16_w(80) = FC1D [0000FC1D]
+00CC86:zeus16_w(81) = 0022 [0022FC1D]
+Zeus cmd 1A : 1A000000
+00CFDC:zeus32_w(86) = 00008020
+00CFE0:zeus32_w(8E) = 0207F440
+00CFE1:zeus32_w(100) = 00000000
+00CFE5:zeus32_w(86) = 00008000
+00CFE7:zeus32_w(8E) = 02060000
+00D0FC:zeus32_w(CE) = 00C97020
+00D09A:zeus32_w(80) = 0022FC3F
+00D104:zeus32_w(CE) = 00C87020
+00D034:zeus32_w(84) = 00000100
+00D0C9:zeus32_w(68) = 00000100
+00D0CA:zeus32_w(00) = 0000C3F0
+00D0CC:zeus32_w(5C) = 00000000
+00D0CE:zeus32_w(06) = FFFF0030
+00D0D0:zeus32_w(02) = 000C0000
+00D0D2:zeus32_w(04) = 00000E01
+00D0D4:zeus32_w(4C) = 00808080
+00D0D5:zeus32_w(4E) = 00808080
+00D0D6:zeus32_w(08) = 00000000
+00D0D7:zeus32_w(0C) = 00FF018F
+00D0DD:zeus32_w(0A) = 0000018F
+00D0E3:zeus32_w(0E) = 00FF0000
+00D0E5:zeus32_w(1E) = FFFFFFFF
+00D0E6:zeus32_w(1C) = FFFFFFFF
+00D0E7:zeus32_w(1A) = FFFFFFFF
+00D0E8:zeus32_w(18) = FFFFFFFF
+00D0EA:zeus32_w(46) = 00000000
+00D0EB:zeus32_w(44) = 00000000
+00D0EC:zeus32_w(42) = 00000000
+00D0ED:zeus32_w(40) = 00000000
+00D0EE:zeus32_w(26) = 00000000
+00D0EF:zeus32_w(24) = 00000000
+00D0F0:zeus32_w(22) = 00000000
+00D0F1:zeus32_w(20) = 00000000
+00D09A:zeus32_w(80) = 0022FCFF
+00D0F6:zeus32_w(60) = 00000001
+00D09A:zeus32_w(80) = 0022FC3F
+00D01E:zeus32_w(76) = F8800000
+00D020:zeus32_w(CC) = 00000000
+00D034:zeus32_w(84) = 00000080
+00D0FC:zeus32_w(CE) = 00C97020
+00D09A:zeus32_w(80) = 0022FC3F
+00D104:zeus32_w(CE) = 00C87020
+Zeus cmd 1A : 1A000000
+Zeus cmd 18 : 187E0000 0000FFFF
+Zeus cmd 18 : 187C0000 FFFFFFE0
+Zeus cmd 18 : 187A0000 00800000
+Zeus cmd 18 : 18780000 000000C7
+Zeus cmd 18 : 18760000 F8800000
+Zeus cmd 17 : 176F0032
+Zeus cmd 17 : 176E0031
+Zeus cmd 17 : 176D003B
+Zeus cmd 17 : 176C002B
+Zeus cmd 18 : 184E0000 00808080
+Zeus cmd 18 : 184C0000 00808080
+Zeus cmd 18 : 184A0000 00FF018E
+Zeus cmd 18 : 18480000 00FF018E
+Zeus cmd 17 : 176940C4
+Zeus cmd 17 : 17681370
+Zeus cmd 17 : 1707FFFF
+Zeus cmd 17 : 17060030
+Zeus cmd 17 : 17010000
+Zeus cmd 2D : 2D007FFF
+Zeus cmd 2E : 2E000800 00000000
+Zeus cmd 17 : 1757500A
+Zeus cmd 17 : 175600FF
+Zeus cmd 17 : 17524321
+Zeus cmd 17 : 1752BCDE
+Zeus cmd 01 : 0100C0B0 3F001059
+00D09A:zeus32_w(80) = 0222FC3F
+....
+Zeus cmd 1A : 1A000000
+Zeus cmd 1A : 1A000000
+....
+Zeus cmd 1A : 1A000000
+Zeus cmd 1A : 1A000000
+....
+Zeus cmd 01 : 0100C0B0 3F001059
+00D09A:zeus32_w(80) = 0222FC3F
+....
+Zeus cmd 1A : 1A000000
+Zeus cmd 1A : 1A000000
+....
+00D09A:zeus32_w(80) = FB22FC3F
+00D01E:zeus32_w(76) = F8800000
+00D020:zeus32_w(CC) = 00800000
+00D034:zeus32_w(84) = 00000000
+00D0C9:zeus32_w(68) = 00000100
+00D0CA:zeus32_w(00) = 00000000
+00D0CC:zeus32_w(5C) = 00000000
+00D0CE:zeus32_w(06) = FFFF0030
+00D0D0:zeus32_w(02) = 000C0000
+00D0D2:zeus32_w(04) = 00000E01
+00D0D4:zeus32_w(4C) = 00808080
+00D0D5:zeus32_w(4E) = 00808080
+00D0D6:zeus32_w(08) = 00000000
+00D0D7:zeus32_w(0C) = 00FF018F
+00D0DD:zeus32_w(0A) = 0000018F
+00D0E3:zeus32_w(0E) = 00FF0000
+00D0E5:zeus32_w(1E) = FFFFFFFF
+00D0E6:zeus32_w(1C) = FFFFFFFF
+00D0E7:zeus32_w(1A) = FFFFFFFF
+00D0E8:zeus32_w(18) = FFFFFFFF
+00D0EA:zeus32_w(46) = 00000000
+00D0EB:zeus32_w(44) = 00000000
+00D0EC:zeus32_w(42) = 00000000
+00D0ED:zeus32_w(40) = 00000000
+00D0EE:zeus32_w(26) = 00000000
+00D0EF:zeus32_w(24) = 00000000
+00D0F0:zeus32_w(22) = 00000000
+00D0F1:zeus32_w(20) = 00000000
+00D09A:zeus32_w(80) = FB22FCFF
+00D0F6:zeus32_w(60) = 00000001
+00D09A:zeus32_w(80) = FB22FC3F
+Zeus cmd 17 : 1757500A
+Zeus cmd 17 : 175600FF
+00D09A:zeus32_w(80) = 0222FC3F
+
+
+*/
static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
{
const poly_extra_data *extra = extradata;
@@ -618,6 +946,9 @@ static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *exte
int texwidth = extra->texwidth;
int x;
+if (extra->alpha < 0x80)
+ return;
+
for (x = extent->startx; x < extent->stopx; x++)
{
float z = recip_approx(ooz);
@@ -655,6 +986,9 @@ static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *exte
int texwidth = extra->texwidth;
int x;
+if (extra->alpha < 0x80)
+ return;
+
for (x = extent->startx; x < extent->stopx; x++)
{
float z = recip_approx(ooz);
@@ -677,7 +1011,7 @@ static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *exte
}
-static void zeus_draw_polys(UINT32 addr_and_count, UINT32 texdata, int logcmd)
+static void zeus_draw_model(UINT32 addr_and_count, UINT32 texdata, int logcmd)
{
static UINT32 *loglist[1000];
static int loglist_last = 0;
@@ -694,24 +1028,15 @@ static void zeus_draw_polys(UINT32 addr_and_count, UINT32 texdata, int logcmd)
if (logcmd)
{
int texwshift = (val2 >> 6) & 7;
- logerror("Zeus cmd 67 : %08X %08X %03X %06X (w=%d adj=%03X%03X)\n",
- zeuscmd_buffer[0], addr_and_count, val2, val1,
+ logerror(" -- model @ %08X val2=%03X val1=%06X (w=%d bpp=%d adj=%03X%03X)\n",
+ addr_and_count, val2, val1,
512 >> texwshift,
+ (val2 & 0x20) ? 8 : 4,
((val1 << (7 - texwshift)) >> 10) & 0xfff,
((val1 << (7 - texwshift)) >> 1) & 0x1ff
);
}
- for (i = 0; i < last_tex_index; i++)
- if (last_tex[i][0] == val1 && last_tex[i][1] == val2)
- break;
- if (i == last_tex_index)
- {
- last_tex[i][0] = val1;
- last_tex[i][1] = val2;
- last_tex_index++;
- }
-
if (logcmd)
{
for (i = 0; i < loglist_last; i++)
@@ -790,19 +1115,29 @@ static void zeus_draw_polys(UINT32 addr_and_count, UINT32 texdata, int logcmd)
vert[i].y += 128.0f;
}
- val1 <<= 7 - texwshift;
-
extra = poly_get_extra_data(poly);
extra->transcolor = 0x100;
- extra->texbase = &waveram[val1 & 0x3fffff];
+ extra->texbase = &waveram[(val1 << (7 - texwshift)) & 0x3fffff];
extra->texwidth = 512 >> texwshift;
extra->palbase = zeus_palbase;
extra->alpha = zeus_blend;
- poly_render_quad(poly, NULL, &Machine->screen[0].visarea, callback, 3, &vert[0], &vert[1], &vert[2], &vert[3]);
+ if (single_step)
+ {
+ single_step_extra = *extra;
+ single_step_val1 = val1;
+ single_step_val2 = val2;
+ single_step_dx = single_step_dy = 0;
+ single_step_advance = FALSE;
+ }
+
+ poly_render_quad(poly, NULL, &Machine->screen[0].visarea, callback, 3, &vert[0], &vert[1], &vert[2], &vert[3]);
poly_wait(poly, "Normal");
+
+ if (single_step)
+ while (!single_step_advance) video_frame_update(TRUE);
}
- else if (data[datanum] == 0x0c018000)
+ else if (data[datanum] == 0x0c018000/* mk4 */ || data[datanum] == 0x0c008000/* invasn */)
next_addr_and_count = data[datanum + 1];
}
if (datanum != count)
@@ -816,142 +1151,6 @@ static void zeus_draw_polys(UINT32 addr_and_count, UINT32 texdata, int logcmd)
}
-static void zeuscmd_execute(void)
-{
- static int colorcount;
- int logcmd = input_code_pressed(KEYCODE_L);
- int wordnum;
-
- switch (zeuscmd_buffer[0] >> 24)
- {
- case 0x1c:
- if (logcmd)
- logerror("Zeus cmd 1C : ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X ) %8.2f %8.2f %8.5f\n",
- zeuscmd_buffer[2] & 0xffff,
- zeuscmd_buffer[2] >> 16,
- zeuscmd_buffer[0] & 0xffff,
- zeuscmd_buffer[3] & 0xffff,
- zeuscmd_buffer[3] >> 16,
- zeuscmd_buffer[1] >> 16,
- zeuscmd_buffer[4] & 0xffff,
- zeuscmd_buffer[4] >> 16,
- zeuscmd_buffer[1] & 0xffff,
- (float)(INT32)zeuscmd_buffer[5] * (1.0f / 65536.0f),
- (float)(INT32)zeuscmd_buffer[6] * (1.0f / 65536.0f),
- (float)(INT32)zeuscmd_buffer[7] * (1.0f / (65536.0f * 512.0f)));
-
- zeus_matrix[0][0] = zeuscmd_buffer[2];
- zeus_matrix[0][1] = zeuscmd_buffer[2] >> 16;
- zeus_matrix[0][2] = zeuscmd_buffer[0];
- zeus_matrix[1][0] = zeuscmd_buffer[3];
- zeus_matrix[1][1] = zeuscmd_buffer[3] >> 16;
- zeus_matrix[1][2] = zeuscmd_buffer[1] >> 16;
- zeus_matrix[2][0] = zeuscmd_buffer[4];
- zeus_matrix[2][1] = zeuscmd_buffer[4] >> 16;
- zeus_matrix[2][2] = zeuscmd_buffer[1];
- zeus_point[0] = zeuscmd_buffer[5];
- zeus_point[1] = zeuscmd_buffer[6];
- zeus_point[2] = zeuscmd_buffer[7];
- break;
-
- case 0x13: /* invasn */
- zeus_draw_polys(zeus_objdata, zeus_texdata, logcmd);
- break;
-
- case 0x67:
- zeus_draw_polys(zeuscmd_buffer[1], zeuscmd_buffer[2], logcmd);
- break;
-
- case 0x01: /* invasn */
- if (logcmd)
- logerror("Zeus cmd %02X : %08X %08X\n", zeuscmd_buffer[0] >> 24, zeuscmd_buffer[0], zeuscmd_buffer[1]);
- if (zeuscmd_buffer[0] == 0x01008000)
- zeus_objdata = zeuscmd_buffer[1];
- else if (zeuscmd_buffer[0] == 0x0100c0b0)
- zeus_texdata = zeuscmd_buffer[1];
- else if (zeuscmd_buffer[0] == 0x0100C040)
- zeus_palbase = waveram_ptr_from_addr(zeuscmd_buffer[1]);
- break;
-
- default:
- if ((zeuscmd_buffer[0] >> 16) == 0x1752)
- {
- zeusbase[0xb2] = zeuscmd_buffer[0];
-// zeus_enable_logging = 1;
- }
- if ((zeuscmd_buffer[0] >> 16) == 0x1770)
- zeus_point[0] = zeuscmd_buffer[0] << 16;
- if ((zeuscmd_buffer[0] >> 16) == 0x1772)
- zeus_point[1] = zeuscmd_buffer[0] << 16;
- if ((zeuscmd_buffer[0] >> 16) == 0x1774)
- zeus_point[2] = zeuscmd_buffer[0] << 16;
- if ((zeuscmd_buffer[0] >> 16) == 0x18ce)
- zeus_blend = zeuscmd_buffer[1];
-
- if (zeuscmd_buffer[0] == 0x0000c040)
- zeus_palbase = waveram_ptr_from_addr(zeuscmd_buffer[1]);
-
- if (zeuscmd_buffer[0] == 0x0080C0A5)
- {
- /* not right -- just a hack */
- int x, y;
- for (y = 0; y <= 255; y++)
- for (x = 0; x <= 399; x++)
- waveram_plot_depth(y, x, 0, 0x7fff);
- colorcount = 0;
- last_tex_index = 0;
- }
-
- if (logcmd)
- {
- logerror("Zeus cmd %02X : %08X", zeuscmd_buffer[0] >> 24, zeuscmd_buffer[0]);
- for (wordnum = 1; wordnum < zeuscmd_buffer_expected_words; wordnum++)
- logerror(" %08X", zeuscmd_buffer[wordnum]);
- logerror("\n");
- }
- break;
- }
-}
-
-
-static UINT8 zeuscmd_length(UINT32 word)
-{
- switch (word >> 24)
- {
- case 0x00:
- case 0x01:
- return (word == 0) ? 1 : 2;
-
- case 0x13:
- case 0x17:
- case 0x1a:
- case 0x2d: /* invasn */
- case 0x70:
- return 1;
-
- case 0x18:
- case 0x23:
- case 0x2e: /* invasn */
- return 2;
-
- case 0x67:
- return 3;
-
- case 0x25:
- case 0x30: /* invasn */
- return 4; /* ??? */
-
- case 0x1c:
- return 8;
-
- default:
- printf("Unknown command %02X\n", zeusbase[0xe0] >> 24);
- break;
- }
- return 1;
-}
-
-
READ32_HANDLER( zeus_r )
{
int logit = (offset < 0xb0 || offset > 0xb7);
@@ -1026,34 +1225,211 @@ WRITE32_HANDLER( zeus_w )
{
int logit = zeus_enable_logging || ((offset < 0xb0 || offset > 0xb7) && (offset < 0xe0 || offset > 0xe1));
+ if (logit)
+ logerror("%06X:zeus_w", activecpu_get_pc());
+
/* 32-bit mode */
if (zeusbase[0x80] & 0x00020000)
- {
- zeusbase[offset & ~1] = data;
-
- if (logit)
- {
- if (offset & 1)
- logerror("%06X:zeus32_w(%02X) = %08X -- unexpected in 32-bit mode\n", activecpu_get_pc(), offset, data);
- else if (offset != 0xe0)
- logerror("%06X:zeus32_w(%02X) = %08X\n", activecpu_get_pc(), offset, data);
- else
- logerror("%06X:zeus32_w(%02X) = %08X\n", activecpu_get_pc(), offset, data);
- }
- }
+ zeus_write_32bit(offset, data, logit);
/* 16-bit mode */
else
+ zeus_write_16bit(offset, data, logit);
+}
+
+
+READ32_HANDLER( zeus2_r )
+{
+ return zeus_r(offset * 2, 0);
+}
+
+
+WRITE32_HANDLER( zeus2_w )
+{
+ zeus_w(offset * 2, data, mem_mask);
+}
+
+
+static void zeus_write_16bit(offs_t offset, UINT16 data, int logit)
+{
+ /* write to high part on odd addresses */
+ if (offset & 1)
+ zeusbase[offset & ~1] = (zeusbase[offset & ~1] & 0x0000ffff) | (data << 16);
+
+ /* write to low part on event addresses */
+ else
+ zeusbase[offset & ~1] = (zeusbase[offset & ~1] & 0xffff0000) | (data & 0xffff);
+
+ /* log appropriately */
+ if (logit)
+ logerror("(%02X) = %04X [%08X]\n", offset, data & 0xffff, zeusbase[offset & ~1]);
+
+ /* handle the update */
+ if ((offset & 1) == 0)
+ zeus_process_write(offset);
+}
+
+
+static void zeus_write_32bit(offs_t offset, UINT32 data, int logit)
+{
+ /* always write to low word? */
+ zeusbase[offset & ~1] = data;
+
+ /* log appropriately */
+ if (logit)
{
if (offset & 1)
- zeusbase[offset & ~1] = (zeusbase[offset & ~1] & 0x0000ffff) | (data << 16);
+ logerror("(%02X) = %08X -- unexpected in 32-bit mode\n", offset, data);
+ else if (offset != 0xe0)
+ logerror("(%02X) = %08X\n", offset, data);
else
- zeusbase[offset & ~1] = (zeusbase[offset & ~1] & 0xffff0000) | (data & 0xffff);
-
- if (logit)
- logerror("%06X:zeus16_w(%02X) = %04X [%08X]\n", activecpu_get_pc(), offset, data & 0xffff, zeusbase[offset & ~1]);
+ logerror("(%02X) = %08X\n", offset, data);
}
+ /* handle the update */
+ if ((offset & 1) == 0)
+ zeus_process_write(offset);
+}
+
+
+/*
+
+ New analysis:
+
+ Offset
+ ------
+
+ $06 W Low 16 bits = texture mode
+
+ $58 W Usually written after $5A; after writing, waits for $F6 bit 4 to be cleared
+
+ $5A W Usually written first, followed by $58
+
+ $68 W Written at startup:
+ $00030000 = toggled on then off at startup
+
+ $76 W
+
+ $7C W
+
+ $80 W Master control
+
+ $40000000 = set along with $02000000 when enabling FIFO empty interrupt
+ $02000000 = enable internal data FIFO empty interrupt
+ $01000000 = cleared along with $02000000 when disabling FIFO empty interrupt
+ $00020000 = 16-bit (0) or 32-bit (1) mode
+ $00000080 = set just before writing direct command to $60
+ $00000040 = set just before writing direct command to $60
+ $00000008 = cleared just before writing to offsets $200-$3FF
+
+ $82 W
+ $84 W
+
+ $00000080 = render page? (generally set when $CC is set to $000000 and clear when $CC is set to $800000)
+
+ $86 W
+ $88 W
+ $8A W
+ $8C W
+ $8E W
+
+ $B0 R/W Data port for direct RAM access
+ $B2 R/W Data port for direct RAM access
+
+ $B4 W Address for direct RAM access
+
+ $07FF0100 = mask for Y coordinate
+ $000000FF = mask for X coordinate
+
+ $B6 W Direct RAM access control
+
+ $80000000 = enable writes to wave RAM 0
+ $40000000 = enable writes to wave RAM 1
+ $02000000 = perform access on write to B0(0) or B2(1) ?????
+ $00800000 = enable writes from [$B2] to depth buffer
+ $00400000 = enable writes from [$B0] to depth buffer
+ $00200000 = enable writes from [$B2] to RAM buffer
+ $00100000 = enable writes from [$B0] to RAM buffer
+ $00020000 = auto increment the address
+ $00010000 = perform a read when the address is written
+ $00000001 = enable direct RAM access
+
+ Examples:
+ $80A00000 when writing a single pixel (address written each time)
+ $80A20001 when writing the right pixel of a pair (autoinc assumed)
+ $80F60001 when writing the middle pairs of pixels (autoinc assumed)
+ $80520001 when writing the left pixel of a pair (autoinc assumed)
+ $82F00001 when testing wave RAM page 1 (address written each pair)
+ $42F00001 when testing wave RAM page 0 (address written each pair)
+ $82F60001 when uploading to wave RAM page 1 (autoinc assumed)
+ $42F60001 when uploading to wave RAM page 0 (autoinc assumed)
+
+ $C0 W Written at startup = $801F2500
+ $C2 W Written at startup = $0015E591
+ $C4 W Written at startup = $000C0042 (HSYNC start/HSYNC end?)
+ $C6 W Written at startup = $0211007F (HTOTAL/HBLANK end?)
+ $C8 W Written at startup = $010300FF (VSYNC start/VBLANK start?)
+ $CA W Written at startup = $01160107 (VTOTAL/VSYNC end?)
+ $CC W Written at startup = $00000000 (display start address? switches to $00800000)
+ $CE W Written at startup = $00C87620
+
+ $E0 W Internal data FIFO
+
+ $F2 R Looped on until it returns a stable value; must change frequently; PRNG?
+
+ $F4 R Status register
+
+ $00000800 = VBLANK? code waits for it to clear to 0 and then reset to 1
+ $00000140 = tested together in tight loop until both are 0
+ $00000008 = internal data FIFO full
+ $00000004 = tested in tight loop along with $00000002 until at least one is set
+ $00000002 = tested in tight loop after handling FIFO interrupt until set
+
+ $F6 R Status register 2
+
+ $00000010 = tested in tight loop after writing 5A/59/58 until set to 0
+
+ $200- W Unknown, but written in a loop with master control bit $00000008 cleared
+ $3FF Possible fast buffer clear? One set of writes stores $7F7F to all entries.
+ A second set writes $E00,$25,$E01,$25,...,$E7F,$25. A third set writes
+ $52,$A0000000,...
+
+Notes:
+
+ In 16-bit mode, writes to $E0 are done via $E1 first then $E0
+
+-------------------------------------------------------
+
+Old info:
+
+ offset B7 = control....
+
+ 8000 = page 1 enable
+ 4000 = page 0 enable
+
+ 0080 = 2nd pixel enable (maybe Z buff?)
+ 0040 = 1st pixel enable (maybe Z buff?)
+ 0020 = 2nd pixel enable
+ 0010 = 1st pixel enable
+
+
+ writes 80a2 to write an odd pixel at startup
+ writes 80f6 to write the middle pixels
+ writes 8052 to write an odd pixel at the end
+
+ writes 8050 before writing an odd pixel
+ writes 80a0 before writing an even pixel
+
+ writes 44f1 before reading from page 0 of wave ram
+ writes 84f1 before reading from page 1 of wave ram
+
+ writes 42f0 before writing to page 0 of wave ram
+ writes 82f0 before writing to page 1 of wave ram
+
+*/
+
+static void zeus_process_write(offs_t offset)
+{
/* handle the writes; only trigger on low accesses */
switch (offset)
{
@@ -1061,7 +1437,7 @@ WRITE32_HANDLER( zeus_w )
/* invasn writes here to execute a command (?) */
if (zeusbase[0x60] & 1)
{
- if (zeusbase[0x80] == 0x0022FCFF)
+ if ((zeusbase[0x80] & 0xffffff) == 0x22FCFF)
{
int startx, stopx, starty, stopy;
int x, y;
@@ -1094,6 +1470,9 @@ WRITE32_HANDLER( zeus_w )
for (y = starty; y <= stopy; y++)
for (x = startx; x <= stopx; x++)
waveram[(1 * WAVERAM_HEIGHT + (y % WAVERAM_HEIGHT)) * WAVERAM_WIDTH + x] = zeusbase[0x00];
+ single_step = input_code_pressed(KEYCODE_S);
+ if (single_step)
+ popmessage("Single Step");
}
else
logerror("Execute unknown command\n");
@@ -1131,13 +1510,55 @@ WRITE32_HANDLER( zeus_w )
}
break;
+ case 0x84:
+ /* MK4: Written in tandem with 0xcc */
+ /* MK4: Writes either 0x80 (and 0x000000 to 0xcc) or 0x00 (and 0x800000 to 0xcc) */
+ break;
+
+ case 0xcc:
+ /* see 0x84 above */
+ break;
+
+ case 0x70:
+ zeus_point[0] = zeusbase[0x70] << 16;
+ break;
+
+ case 0x72:
+ zeus_point[1] = zeusbase[0x72] << 16;
+ break;
+
+ case 0x74:
+ zeus_point[2] = zeusbase[0x74] << 16;
+ break;
+
+ case 0x4e:
+ zeus_blend = zeusbase[0x4e];
+ break;
+// if ((zeuscmd_buffer[0] >> 16) == 0x1770)
+// zeus_point[0] = zeuscmd_buffer[0] << 16;
+// if ((zeuscmd_buffer[0] >> 16) == 0x1772)
+// zeus_point[1] = zeuscmd_buffer[0] << 16;
+// if ((zeuscmd_buffer[0] >> 16) == 0x1774)
+// zeus_point[2] = zeuscmd_buffer[0] << 16;
+// if ((zeuscmd_buffer[0] >> 16) == 0x18ce)
+// zeus_blend = zeuscmd_buffer[1];
+
+ case 0x52:
+ zeusbase[0xb2] = zeusbase[0x52];
+ break;
+// if ((zeuscmd_buffer[0] >> 16) == 0x1752)
+// {
+// zeusbase[0xb2] = zeuscmd_buffer[0];
+// zeus_enable_logging = 1;
+// }
+
case 0xe0:
zeuscmd_buffer[zeuscmd_buffer_words++] = zeusbase[0xe0];
if (zeuscmd_buffer_words == 1)
zeuscmd_buffer_expected_words = zeuscmd_length(zeusbase[0xe0]);
if (zeuscmd_buffer_words == zeuscmd_buffer_expected_words)
{
- zeuscmd_execute();
+ zeuscmd_execute(zeuscmd_buffer_expected_words);
zeuscmd_buffer_words = 0;
}
break;
@@ -1145,13 +1566,285 @@ WRITE32_HANDLER( zeus_w )
}
-READ32_HANDLER( zeus2_r )
+static void log_waveram(UINT32 length_and_base)
{
- return zeus_r(offset * 2, 0);
+ static struct
+ {
+ UINT32 lab, checksum;
+ } recent_entries[100];
+
+ UINT32 numoctets = (length_and_base >> 24) + 1;
+ const UINT32 *ptr = waveram_ptr_from_addr(length_and_base);
+ UINT32 checksum = length_and_base;
+ int foundit = FALSE;
+ int i;
+
+ for (i = 0; i < numoctets; i++)
+ checksum += ptr[i * 2 + 0] + ptr[i * 2 + 1];
+
+ for (i = 0; i < ARRAY_LENGTH(recent_entries); i++)
+ if (recent_entries[i].lab == length_and_base && recent_entries[i].checksum == checksum)
+ {
+ foundit = TRUE;
+ break;
+ }
+
+ if (i == ARRAY_LENGTH(recent_entries))
+ i--;
+ if (i != 0)
+ {
+ memmove(&recent_entries[1], &recent_entries[0], i * sizeof(recent_entries[0]));
+ recent_entries[0].lab = length_and_base;
+ recent_entries[0].checksum = checksum;
+ }
+ if (foundit)
+ return;
+
+ for (i = 0; i < numoctets; i++)
+ logerror("\t%02X: %08X %08X\n", i, ptr[i * 2 + 0], ptr[i * 2 + 1]);
}
-WRITE32_HANDLER( zeus2_w )
+static void zeuscmd_execute(int words)
{
- zeus_w(offset * 2, data, mem_mask);
+ static int colorcount;
+ int logcmd = 1;//input_code_pressed(KEYCODE_L);
+ int wordnum;
+
+/* command observations:
+
+ 0x18800000 | (reg << 16), <data>:
+
+ 18F80000 00000C88 -- similar to write to $78 = 00000C78
+ 18FA0000 00808000 -- similar to write to $7A = 00800000
+ 18C80000 00FF018E -- similar to write to $48 = 00FF0190
+ 18CA0000 00FF18E0 -- similar to write to $4A = 00FF1900
+
+ -- during setup/text screen
+ 187E0000 0000FFFF FF980000
+ 18C80000 01FF01FF 00FF018E
+ 18CA0000 01FF1FF0 00FF18E0
+ 18CC0000 00808080
+ 18CE0000 00000080 00FFFFFF
+ 18D60000 500A00FF
+ 18EC0000 003B002F
+ 18EE0000 00320031
+ 18F80000 00000C88
+ 18FA0000 00808000
+
+ -- after text screen
+ 187E0000 0000FFFF FF980000
+ 18CE0000 0000007B(ramp down to 0) 00FFFFFF
+ 18D60000 500A00FF
+
+ 0x17:
+
+ 1707FFFF
+ 1752159D
+ 17680070 17681370
+ 176940C4
+ 1770xxxx - set x coordinate
+ 1772yyyy - set y coordinate
+ 1774zzzz - set z coordinate
+
+ 0x00:
+
+ 0004C09C 08001026
+ 0002C0E7 0800101C
+ 0003C0F0 00001025
+ 0080C0A5 3F00102F
+ 0005C0A5 21001125
+ 0000C040 0318E132 - set palette base
+
+ command 25:
+
+ 25000000 007F0018 01000400 B0F60008 -- during diagnostics screen
+ 25000080 007F0018 01000400 B0F60008 -- alternate frames during text screen
+
+
+ write to ($60) = 1 after setting up:
+
+
+*/
+
+ if (logcmd)
+ {
+ logerror("Zeus cmd %02X :", zeuscmd_buffer[0] >> 24);
+ for (wordnum = 0; wordnum < words; wordnum++)
+ logerror(" %08X", zeuscmd_buffer[wordnum]);
+ }
+
+ switch (zeuscmd_buffer[0] >> 24)
+ {
+ /* 0x00/0x01: set pointer */
+ /* in model data, this is 0x0C */
+ case 0x00:
+ case 0x01:
+ switch (zeuscmd_buffer[0] & 0xffffff)
+ {
+ case 0x008000:
+ /* in model data, case 0x018000 is a goto */
+ if (logcmd)
+ logerror(" -- setptr(objdata)\n");
+ zeus_objdata = zeuscmd_buffer[1];
+ break;
+
+ case 0x00c0b0:
+ if (logcmd)
+ logerror(" -- setptr(texdata)\n");
+ zeus_texdata = zeuscmd_buffer[1];
+ break;
+
+ case 0x00c040:
+ if (logcmd)
+ logerror(" -- setptr(palbase)\n");
+ zeus_palbase = waveram_ptr_from_addr(zeuscmd_buffer[1]);
+ break;
+
+ case 0x80c0a5:
+ if (logcmd)
+ logerror(" -- setptr(hack clear screen)\n");
+ {
+ /* not right -- just a hack */
+ int x, y;
+ for (y = 0; y <= 255; y++)
+ for (x = 0; x <= 399; x++)
+ waveram_plot_depth(y, x, 0, 0x7fff);
+ colorcount = 0;
+ }
+ break;
+
+ default:
+ if (logcmd)
+ logerror(" -- setptr(%06X)\n", zeuscmd_buffer[0] & 0xffffff);
+ break;
+ }
+
+ if (logcmd)
+ log_waveram(zeuscmd_buffer[1]);
+ break;
+
+ /* 0x13: render model based on previously set information */
+ case 0x13: /* invasn */
+ zeus_draw_model(zeus_objdata, zeus_texdata, logcmd);
+ break;
+
+ /* 0x17: write 16-bit value to low registers */
+ case 0x17:
+ if (logcmd)
+ logerror(" -- reg16");
+ zeus_write_16bit((zeuscmd_buffer[0] >> 16) & 0x7f, zeuscmd_buffer[0], logcmd);
+ break;
+
+ /* 0x18: write 32-bit value to low registers */
+ /* in model data, this is 0x19 */
+ case 0x18:
+ if (logcmd)
+ logerror(" -- reg32");
+ zeus_write_32bit((zeuscmd_buffer[0] >> 16) & 0x7f, zeuscmd_buffer[1], logcmd);
+ break;
+
+ /* 0x1A: sync pipeline(?) */
+ case 0x1a:
+ if (logcmd)
+ logerror(" -- sync\n");
+ break;
+
+ /* 0x1C: write matrix and translation vector */
+ case 0x1c:
+ if (logcmd)
+ logerror(" -- matrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X ) vector %8.2f %8.2f %8.5f\n",
+ zeuscmd_buffer[2] & 0xffff,
+ zeuscmd_buffer[2] >> 16,
+ zeuscmd_buffer[0] & 0xffff,
+ zeuscmd_buffer[3] & 0xffff,
+ zeuscmd_buffer[3] >> 16,
+ zeuscmd_buffer[1] >> 16,
+ zeuscmd_buffer[4] & 0xffff,
+ zeuscmd_buffer[4] >> 16,
+ zeuscmd_buffer[1] & 0xffff,
+ (float)(INT32)zeuscmd_buffer[5] * (1.0f / 65536.0f),
+ (float)(INT32)zeuscmd_buffer[6] * (1.0f / 65536.0f),
+ (float)(INT32)zeuscmd_buffer[7] * (1.0f / (65536.0f * 512.0f)));
+
+ zeus_matrix[0][0] = zeuscmd_buffer[2];
+ zeus_matrix[0][1] = zeuscmd_buffer[2] >> 16;
+ zeus_matrix[0][2] = zeuscmd_buffer[0];
+ zeus_matrix[1][0] = zeuscmd_buffer[3];
+ zeus_matrix[1][1] = zeuscmd_buffer[3] >> 16;
+ zeus_matrix[1][2] = zeuscmd_buffer[1] >> 16;
+ zeus_matrix[2][0] = zeuscmd_buffer[4];
+ zeus_matrix[2][1] = zeuscmd_buffer[4] >> 16;
+ zeus_matrix[2][2] = zeuscmd_buffer[1];
+ zeus_point[0] = zeuscmd_buffer[5];
+ zeus_point[1] = zeuscmd_buffer[6];
+ zeus_point[2] = zeuscmd_buffer[7];
+ break;
+
+ /* 0x23: some additional X,Y,Z coordinates */
+ case 0x23:
+ if (logcmd)
+ logerror(" -- additional xyz = %d,%d,%d\n", (INT16)zeuscmd_buffer[0], (INT16)(zeuscmd_buffer[1] >> 16), (INT16)zeuscmd_buffer[1]);
+ break;
+
+ /* 0x25: display control? */
+ /* 0x30: same for invasn */
+ case 0x25:
+ case 0x30:
+ if (logcmd)
+ logerror(" -- unknown control\n");
+ break;
+
+ /* 0x67: render model with inline texture info */
+ case 0x67:
+ zeus_draw_model(zeuscmd_buffer[1], zeuscmd_buffer[2], logcmd);
+ break;
+
+ default:
+ if (logcmd)
+ logerror("\n");
+ break;
+ }
+}
+
+
+static UINT8 zeuscmd_length(UINT32 word)
+{
+ switch (word >> 24)
+ {
+ case 0x00:
+ case 0x01:
+ return (word == 0) ? 1 : 2;
+
+ case 0x13:
+ case 0x17:
+ case 0x1a:
+ case 0x2d: /* invasn */
+ case 0x70:
+ return 1;
+
+ case 0x18:
+ case 0x23:
+ case 0x2e: /* invasn */
+ return 2;
+
+ case 0x67:
+ return 3;
+
+ case 0x25:
+ case 0x30: /* invasn */
+ return 4; /* ??? */
+
+ case 0x1c:
+ if ((word & 0xffffff) == 0x7fff) /* invasn */
+ return 8+5;
+ return 8;
+
+ default:
+ printf("Unknown command %02X\n", zeusbase[0xe0] >> 24);
+ break;
+ }
+ return 1;
}
+
+
diff --git a/src/mame/video/n8080.c b/src/mame/video/n8080.c
index 8c42fc4b518..eb37bd81fa5 100644
--- a/src/mame/video/n8080.c
+++ b/src/mame/video/n8080.c
@@ -106,7 +106,7 @@ static void helifire_next_line(void)
VIDEO_START( spacefev )
{
- cannon_timer = timer_alloc(spacefev_stop_red_cannon);
+ cannon_timer = timer_alloc(spacefev_stop_red_cannon, NULL);
flip_screen = 0;
diff --git a/src/mame/video/nbmj8688.c b/src/mame/video/nbmj8688.c
index 45c7181db11..280e147def8 100644
--- a/src/mame/video/nbmj8688.c
+++ b/src/mame/video/nbmj8688.c
@@ -542,9 +542,9 @@ static void mbmj8688_gfxdraw(int gfxtype)
nb1413m3_busyflag = 0;
if (gfxtype == GFXTYPE_8BIT)
- timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), 0, blitter_timer_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), NULL, 0, blitter_timer_callback);
else
- timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), 0, blitter_timer_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), NULL, 0, blitter_timer_callback);
}
diff --git a/src/mame/video/nbmj8891.c b/src/mame/video/nbmj8891.c
index 959d2622ab6..db4b683237b 100644
--- a/src/mame/video/nbmj8891.c
+++ b/src/mame/video/nbmj8891.c
@@ -479,7 +479,7 @@ static void nbmj8891_gfxdraw(void)
}
nb1413m3_busyflag = 0;
- timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), 0, blitter_timer_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), NULL, 0, blitter_timer_callback);
}
/******************************************************************************
diff --git a/src/mame/video/nbmj8991.c b/src/mame/video/nbmj8991.c
index 6c517abd942..98bae54e529 100644
--- a/src/mame/video/nbmj8991.c
+++ b/src/mame/video/nbmj8991.c
@@ -287,7 +287,7 @@ static void nbmj8991_gfxdraw(void)
}
nb1413m3_busyflag = 0;
- timer_set(attotime_mul(ATTOTIME_IN_NSEC(1650), nb1413m3_busyctr), 0, blitter_timer_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_NSEC(1650), nb1413m3_busyctr), NULL, 0, blitter_timer_callback);
}
/******************************************************************************
diff --git a/src/mame/video/nbmj9195.c b/src/mame/video/nbmj9195.c
index 8e5695e8b1a..501ed4e4f9d 100644
--- a/src/mame/video/nbmj9195.c
+++ b/src/mame/video/nbmj9195.c
@@ -382,7 +382,7 @@ static void nbmj9195_gfxdraw(int vram)
nb19010_busyflag = 0;
/* 1650ns per count */
- timer_set(attotime_make(0, nb19010_busyctr * 1650 * ATTOSECONDS_PER_NANOSECOND), 0, blitter_timer_callback);
+ timer_set(ATTOTIME_IN_NSEC(nb19010_busyctr * 1650), NULL, 0, blitter_timer_callback);
}
/******************************************************************************
diff --git a/src/mame/video/neogeo.c b/src/mame/video/neogeo.c
index eb537fa419d..c9329c7e436 100644
--- a/src/mame/video/neogeo.c
+++ b/src/mame/video/neogeo.c
@@ -256,7 +256,7 @@ static TIMER_CALLBACK( auto_animation_timer_callback )
static void create_auto_animation_timer(void)
{
- auto_animation_timer = timer_alloc(auto_animation_timer_callback);
+ auto_animation_timer = timer_alloc(auto_animation_timer_callback, NULL);
}
@@ -678,7 +678,7 @@ static TIMER_CALLBACK( sprite_line_timer_callback )
static void create_sprite_line_timer(void)
{
- sprite_line_timer = timer_alloc(sprite_line_timer_callback);
+ sprite_line_timer = timer_alloc(sprite_line_timer_callback, NULL);
}
diff --git a/src/mame/video/niyanpai.c b/src/mame/video/niyanpai.c
index f447cc8a4f6..6789ce32c45 100644
--- a/src/mame/video/niyanpai.c
+++ b/src/mame/video/niyanpai.c
@@ -342,7 +342,7 @@ static void niyanpai_gfxdraw(int vram)
}
nb19010_busyflag = 0;
- timer_set(attotime_mul(ATTOTIME_IN_NSEC(1650), nb19010_busyctr), 0, blitter_timer_callback);
+ timer_set(ATTOTIME_IN_NSEC(1650 * nb19010_busyctr), NULL, 0, blitter_timer_callback);
}
/******************************************************************************
diff --git a/src/mame/video/nycaptor.c b/src/mame/video/nycaptor.c
index ed2fb5ac0f0..ce30a95b1c8 100644
--- a/src/mame/video/nycaptor.c
+++ b/src/mame/video/nycaptor.c
@@ -8,7 +8,7 @@
#include "driver.h"
#ifdef MAME_DEBUG
- int nycaptor_mask=0;
+static int nycaptor_mask=0;
#endif
static tilemap *bg_tilemap;
diff --git a/src/mame/video/pastelg.c b/src/mame/video/pastelg.c
index 7657fff1424..5c59c562b0e 100644
--- a/src/mame/video/pastelg.c
+++ b/src/mame/video/pastelg.c
@@ -253,7 +253,7 @@ static void pastelg_gfxdraw(void)
}
nb1413m3_busyflag = 0;
- timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), 0, blitter_timer_callback);
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(400000), nb1413m3_busyctr), NULL, 0, blitter_timer_callback);
}
/******************************************************************************
diff --git a/src/mame/video/ppu2c0x.c b/src/mame/video/ppu2c0x.c
index e0cd1e15fa0..f263b8b7f05 100644
--- a/src/mame/video/ppu2c0x.c
+++ b/src/mame/video/ppu2c0x.c
@@ -295,9 +295,9 @@ void ppu2c0x_init(running_machine *machine, const ppu2c0x_interface *interface )
}
/* initialize the scanline handling portion */
- chips[i].scanline_timer = timer_alloc(scanline_callback);
- chips[i].hblank_timer = timer_alloc(hblank_callback);
- chips[i].nmi_timer = timer_alloc(nmi_callback);
+ chips[i].scanline_timer = timer_alloc(scanline_callback, NULL);
+ chips[i].hblank_timer = timer_alloc(hblank_callback, NULL);
+ chips[i].nmi_timer = timer_alloc(nmi_callback, NULL);
chips[i].scanline = 0;
chips[i].scan_scale = 1;
diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c
index 809310e61dc..37954b8b552 100644
--- a/src/mame/video/qix.c
+++ b/src/mame/video/qix.c
@@ -84,7 +84,7 @@ VIDEO_START( qix )
vram_mask = 0xff;
/* allocate a timer */
- scanline_timer = timer_alloc(scanline_callback);
+ scanline_timer = timer_alloc(scanline_callback, NULL);
timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 1, 0), 1, attotime_zero);
/* set up save states */
diff --git a/src/mame/video/rpunch.c b/src/mame/video/rpunch.c
index 5202994618d..1d754b6628d 100644
--- a/src/mame/video/rpunch.c
+++ b/src/mame/video/rpunch.c
@@ -95,7 +95,7 @@ VIDEO_START( rpunch )
memset(rpunch_bitmapram, 0xff, rpunch_bitmapram_size);
/* reset the timer */
- crtc_timer = timer_alloc(crtc_interrupt_gen);
+ crtc_timer = timer_alloc(crtc_interrupt_gen, NULL);
}
diff --git a/src/mame/video/segag80r.c b/src/mame/video/segag80r.c
index c91bcddb311..4004faf1419 100644
--- a/src/mame/video/segag80r.c
+++ b/src/mame/video/segag80r.c
@@ -53,7 +53,7 @@ static void vblank_latch_set(void)
/* set a timer to mimic the 555 timer that drives the EDGINT signal */
/* the 555 is run in monostable mode with R=56000 and C=1000pF */
vblank_latch = 1;
- timer_set(PERIOD_OF_555_MONOSTABLE(CAP_P(1000), RES_K(56)), 0, vblank_latch_clear);
+ timer_set(PERIOD_OF_555_MONOSTABLE(CAP_P(1000), RES_K(56)), NULL, 0, vblank_latch_clear);
/* latch the current flip state at the same time */
video_flip = video_control & 1;
diff --git a/src/mame/video/segaic16.c b/src/mame/video/segaic16.c
index c18f57dea06..e41a400d6da 100644
--- a/src/mame/video/segaic16.c
+++ b/src/mame/video/segaic16.c
@@ -1178,14 +1178,14 @@ static TIMER_CALLBACK( segaic16_tilemap_16b_latch_values )
}
/* set a timer to do this again next frame */
- timer_set(video_screen_get_time_until_pos(0, 261, 0), param, segaic16_tilemap_16b_latch_values);
+ timer_set(video_screen_get_time_until_pos(0, 261, 0), NULL, param, segaic16_tilemap_16b_latch_values);
}
static void segaic16_tilemap_16b_reset(struct tilemap_info *info)
{
/* set a timer to latch values on scanline 261 */
- timer_set(video_screen_get_time_until_pos(0, 261, 0), info->index, segaic16_tilemap_16b_latch_values);
+ timer_set(video_screen_get_time_until_pos(0, 261, 0), NULL, info->index, segaic16_tilemap_16b_latch_values);
}
diff --git a/src/mame/video/system24.c b/src/mame/video/segas24.c
index 8d12d8c1153..5d815945f4b 100644
--- a/src/mame/video/system24.c
+++ b/src/mame/video/segas24.c
@@ -1,6 +1,6 @@
#include "driver.h"
#include "video/segaic24.h"
-#include "includes/system24.h"
+#include "includes/segas24.h"
VIDEO_START(system24)
{
diff --git a/src/mame/video/segas32.c b/src/mame/video/segas32.c
index 8596bfbad08..430101d36bb 100644
--- a/src/mame/video/segas32.c
+++ b/src/mame/video/segas32.c
@@ -378,7 +378,7 @@ void system32_set_vblank(int state)
{
/* at the end of VBLANK is when automatic sprite rendering happens */
if (!state)
- timer_set(ATTOTIME_IN_USEC(50), 1, update_sprites);
+ timer_set(ATTOTIME_IN_USEC(50), NULL, 1, update_sprites);
}
diff --git a/src/mame/video/slapshot.c b/src/mame/video/slapshot.c
index e6dbd0cff61..e40f0ac0db2 100644
--- a/src/mame/video/slapshot.c
+++ b/src/mame/video/slapshot.c
@@ -21,7 +21,7 @@ static INT32 sprites_disabled,sprites_active_area,sprites_master_scrollx,sprites
static int sprites_flipscreen = 0;
static UINT16 *spriteram_buffered,*spriteram_delayed;
-INT32 taito_sprite_type = 0;
+static INT32 taito_sprite_type = 0;
UINT16 *taito_sprite_ext;
size_t taito_spriteext_size;
static UINT16 spritebank[8];
diff --git a/src/mame/video/sprint8.c b/src/mame/video/sprint8.c
index a0035091cab..6fae366fe62 100644
--- a/src/mame/video/sprint8.c
+++ b/src/mame/video/sprint8.c
@@ -150,7 +150,7 @@ VIDEO_EOF( sprint8 )
{
if (p1[x] != 16 && p2[x] != 16)
{
- timer_set(video_screen_get_time_until_pos(0, y + 24, x), p1[x], sprint8_collision_callback);
+ timer_set(video_screen_get_time_until_pos(0, y + 24, x), NULL, p1[x], sprint8_collision_callback);
}
}
}
diff --git a/src/mame/video/starcrus.c b/src/mame/video/starcrus.c
index 8549e32c526..26b5e9ea989 100644
--- a/src/mame/video/starcrus.c
+++ b/src/mame/video/starcrus.c
@@ -39,10 +39,10 @@ static int collision_reg = 0x00;
audio bits are in the same bytes, and there are so few
samples... */
-int starcrus_engine_sound_playing = 0;
-int starcrus_explode_sound_playing = 0;
-int starcrus_launch1_sound_playing = 0;
-int starcrus_launch2_sound_playing = 0;
+static int starcrus_engine_sound_playing = 0;
+static int starcrus_explode_sound_playing = 0;
+static int starcrus_launch1_sound_playing = 0;
+static int starcrus_launch2_sound_playing = 0;
WRITE8_HANDLER( starcrus_s1_x_w ) { s1_x = data^0xff; }
WRITE8_HANDLER( starcrus_s1_y_w ) { s1_y = data^0xff; }
diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c
index 324d6989e15..cb31b4ad413 100644
--- a/src/mame/video/taito_f2.c
+++ b/src/mame/video/taito_f2.c
@@ -38,7 +38,7 @@ static UINT16 *spriteram_buffered,*spriteram_delayed;
tiles are always accessible)
************************************************************/
-int f2_sprite_type = 0;
+static int f2_sprite_type = 0;
UINT16 *f2_sprite_extension;
size_t f2_spriteext_size;
@@ -67,7 +67,7 @@ static INT32 f2_tilemap_xoffs = 0; /* Needed in TC0480SCP games */
static INT32 f2_tilemap_yoffs = 0;
static INT32 f2_text_xoffs = 0;
-int f2_tilemap_col_base = 0;
+static int f2_tilemap_col_base = 0;
static INT32 f2_game = 0;
static INT32 FOOTCHMP = 1;
diff --git a/src/mame/video/tank8.c b/src/mame/video/tank8.c
index 97d4e2a40aa..29c2fd1555e 100644
--- a/src/mame/video/tank8.c
+++ b/src/mame/video/tank8.c
@@ -267,7 +267,7 @@ VIDEO_EOF( tank8 )
}
}
- timer_set(video_screen_get_time_until_pos(0, y, x), index, tank8_collision_callback);
+ timer_set(video_screen_get_time_until_pos(0, y, x), NULL, index, tank8_collision_callback);
state = 1;
}
diff --git a/src/mame/video/tceptor.c b/src/mame/video/tceptor.c
index 944a19340cf..09c98406d55 100644
--- a/src/mame/video/tceptor.c
+++ b/src/mame/video/tceptor.c
@@ -33,6 +33,8 @@ static INT32 bg2_scroll_x, bg2_scroll_y;
static mame_bitmap *temp_bitmap;
+static UINT16 *tceptor_sprite_ram_buffered;
+
static int is_mask_spr[1024/16];
/*******************************************************************/
@@ -73,12 +75,12 @@ PALETTE_INIT( tceptor )
/* color_prom now points to the beginning of the lookup table */
/*
- color lookup table:
- 0- +1024 ( 4 * 256) colors: text (use 0- 256 colors)
- 1024- +1024 (16 * 64) colors: sprite (use 768- 256 colors)
- 2048- +512 ( 8 * 64) colors: bg (use 0- 512 colors)
- 3840- +256 ( 4 * 64) colors: road (use 512- 256 colors)
- */
+ color lookup table:
+ 0- +1024 ( 4 * 256) colors: text (use 0- 256 colors)
+ 1024- +1024 (16 * 64) colors: sprite (use 768- 256 colors)
+ 2048- +512 ( 8 * 64) colors: bg (use 0- 512 colors)
+ 3840- +256 ( 4 * 64) colors: road (use 512- 256 colors)
+ */
/* tiles lookup table (1024 colors) */
for (i = 0; i < 1024;i++)
@@ -419,6 +421,9 @@ VIDEO_START( tceptor )
{
int gfx_index;
+ tceptor_sprite_ram_buffered = auto_malloc(0x200);
+ memset(tceptor_sprite_ram_buffered, 0, 0x200);
+
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
if (machine->gfx[gfx_index] == 0)
@@ -450,6 +455,7 @@ VIDEO_START( tceptor )
bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32);
bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32);
+ state_save_register_global_pointer(tceptor_sprite_ram_buffered, 0x200 / 2);
state_save_register_global(bg1_scroll_x);
state_save_register_global(bg1_scroll_y);
state_save_register_global(bg2_scroll_x);
@@ -484,8 +490,8 @@ VIDEO_START( tceptor )
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int sprite_priority)
{
- UINT16 *mem1 = &tceptor_sprite_ram[0x000/2];
- UINT16 *mem2 = &tceptor_sprite_ram[0x100/2];
+ UINT16 *mem1 = &tceptor_sprite_ram_buffered[0x000/2];
+ UINT16 *mem2 = &tceptor_sprite_ram_buffered[0x100/2];
int need_mask = 0;
int i;
@@ -571,6 +577,16 @@ VIDEO_UPDATE( tceptor )
int pri;
int bg_center = 144 - ((((bg1_scroll_x + bg2_scroll_x ) & 0x1ff) - 288) / 2);
+ if (screen)
+ {
+ int frame = cpu_getcurrentframe();
+
+ if ((frame & 1) == 1 && screen == 1)
+ return UPDATE_HAS_NOT_CHANGED;
+ if ((frame & 1) == 0 && screen == 2)
+ return UPDATE_HAS_NOT_CHANGED;
+ }
+
// left background
rect = *cliprect;
rect.max_x = bg_center;
@@ -595,3 +611,9 @@ VIDEO_UPDATE( tceptor )
tilemap_draw(bitmap, cliprect, tx_tilemap, 0, 0);
return 0;
}
+
+
+VIDEO_EOF( tceptor )
+{
+ memcpy(tceptor_sprite_ram_buffered, tceptor_sprite_ram, 0x200);
+}
diff --git a/src/mame/video/tickee.c b/src/mame/video/tickee.c
index f1a043db29c..ebacc58babf 100644
--- a/src/mame/video/tickee.c
+++ b/src/mame/video/tickee.c
@@ -64,13 +64,13 @@ static TIMER_CALLBACK( setup_gun_interrupts )
/* generate interrupts for player 1's gun */
get_crosshair_xy(0, &beamx, &beamy);
- timer_set(video_screen_get_time_until_pos(0, beamy, beamx + 50), 0, trigger_gun_interrupt);
- timer_set(video_screen_get_time_until_pos(0, beamy + 1, beamx + 50), 0, clear_gun_interrupt);
+ timer_set(video_screen_get_time_until_pos(0, beamy, beamx + 50), NULL, 0, trigger_gun_interrupt);
+ timer_set(video_screen_get_time_until_pos(0, beamy + 1, beamx + 50), NULL, 0, clear_gun_interrupt);
/* generate interrupts for player 2's gun */
get_crosshair_xy(1, &beamx, &beamy);
- timer_set(video_screen_get_time_until_pos(0, beamy, beamx + 50), 1, trigger_gun_interrupt);
- timer_set(video_screen_get_time_until_pos(0, beamy + 1, beamx + 50), 1, clear_gun_interrupt);
+ timer_set(video_screen_get_time_until_pos(0, beamy, beamx + 50), NULL, 1, trigger_gun_interrupt);
+ timer_set(video_screen_get_time_until_pos(0, beamy + 1, beamx + 50), NULL, 1, clear_gun_interrupt);
}
@@ -84,7 +84,7 @@ static TIMER_CALLBACK( setup_gun_interrupts )
VIDEO_START( tickee )
{
/* start a timer going on the first scanline of every frame */
- setup_gun_timer = timer_alloc(setup_gun_interrupts);
+ setup_gun_timer = timer_alloc(setup_gun_interrupts, NULL);
timer_adjust(setup_gun_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
}
diff --git a/src/mame/video/triplhnt.c b/src/mame/video/triplhnt.c
index 50df61f7d7b..364d6dcd043 100644
--- a/src/mame/video/triplhnt.c
+++ b/src/mame/video/triplhnt.c
@@ -129,7 +129,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap* bitmap, const re
if (hit_line != 999 && hit_code != 999)
{
- timer_set(video_screen_get_time_until_pos(0, hit_line, 0), hit_code, triplhnt_hit_callback);
+ timer_set(video_screen_get_time_until_pos(0, hit_line, 0), NULL, hit_code, triplhnt_hit_callback);
}
}
diff --git a/src/mame/video/tubep.c b/src/mame/video/tubep.c
index 7b47510de66..4c2448a562f 100644
--- a/src/mame/video/tubep.c
+++ b/src/mame/video/tubep.c
@@ -569,7 +569,7 @@ WRITE8_HANDLER( tubep_sprite_control_w )
cpunum_set_input_line(3,0,CLEAR_LINE);
/* 2.assert /SINT again after this time */
- timer_set( attotime_mul(ATTOTIME_IN_HZ(19968000/8), (XSize+1)*(YSize+1)), 0, sprite_timer_callback);
+ timer_set( attotime_mul(ATTOTIME_IN_HZ(19968000/8), (XSize+1)*(YSize+1)), NULL, 0, sprite_timer_callback);
/* 3.clear of /SINT starts sprite drawing circuit */
draw_sprite();
diff --git a/src/mame/video/vball.c b/src/mame/video/vball.c
index 831b62ea387..4ba898b1c18 100644
--- a/src/mame/video/vball.c
+++ b/src/mame/video/vball.c
@@ -17,8 +17,8 @@ UINT8 *vb_scrolly_lo;
UINT8 *vb_videoram;
UINT8 *vb_attribram;
int vball_gfxset=0;
-int vb_bgprombank=0xff;
-int vb_spprombank=0xff;
+static int vb_bgprombank=0xff;
+static int vb_spprombank=0xff;
static tilemap *bg_tilemap;
static int scrollx[32];
diff --git a/src/mame/video/victory.c b/src/mame/video/victory.c
index 59c9724aba8..71c0dd5fa26 100644
--- a/src/mame/video/victory.c
+++ b/src/mame/video/victory.c
@@ -97,7 +97,7 @@ VIDEO_START( victory )
update_complete = 0;
video_control = 0;
memset(&micro, 0, sizeof(micro));
- micro.timer = timer_alloc(NULL);
+ micro.timer = timer_alloc(NULL, NULL);
}
@@ -1180,7 +1180,7 @@ VIDEO_EOF( victory )
int fpix = *fg++;
int bpix = bg[(x + scrollx) & 255];
if (fpix && (bpix & bgcollmask) && count++ < 128)
- timer_set(video_screen_get_time_until_pos(0, y, x), x | (y << 8), bgcoll_irq_callback);
+ timer_set(video_screen_get_time_until_pos(0, y, x), NULL, x | (y << 8), bgcoll_irq_callback);
}
}
}
@@ -1218,7 +1218,7 @@ VIDEO_UPDATE( victory )
int bpix = bg[(x + scrollx) & 255];
scanline[x] = bpix | (fpix << 3);
if (fpix && (bpix & bgcollmask) && count++ < 128)
- timer_set(video_screen_get_time_until_pos(0, y, x), x | (y << 8), bgcoll_irq_callback);
+ timer_set(video_screen_get_time_until_pos(0, y, x), NULL, x | (y << 8), bgcoll_irq_callback);
}
/* draw the scanline */
diff --git a/src/osd/windows/mamex64.man b/src/osd/windows/mamex64.man
deleted file mode 100644
index cc62373447b..00000000000
--- a/src/osd/windows/mamex64.man
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity version="1.0.0.0" processorArchitecture="amd64" name="MAME" type="win32" />
- <description>Multiple Arcade Machine Emulator</description>
- <dependency>
- <dependentAssembly>
- <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="amd64"/>
- </dependentAssembly>
- </dependency>
-</assembly>
diff --git a/src/osd/windows/mamex64.rc b/src/osd/windows/mamex64.rc
deleted file mode 100644
index 76290bcd355..00000000000
--- a/src/osd/windows/mamex64.rc
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// mamex64.rc - Minimal resource file for Win32 MAME
-//
-// Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
-// Visit http://mamedev.org for licensing and usage restrictions.
-//
-
-#define NOWINRES
-#include "windows.h"
-#include "commctrl.h"
-
-#include "mamevers.rc"
-
-1 24 MOVEABLE PURE "mamex64.man"
diff --git a/src/osd/windows/vconv.c b/src/osd/windows/vconv.c
index 039dcb082f3..01098ae489f 100644
--- a/src/osd/windows/vconv.c
+++ b/src/osd/windows/vconv.c
@@ -86,6 +86,7 @@ static const translation_info gcc_translate[] =
{ 0, "-mwindows", "" },
{ 0, "-mno-cygwin", "" },
{ 0, "-std=gnu89", "" },
+ { 0, "-pipe", "" },
{ 0 }
};
diff --git a/src/osd/windows/winalloc.c b/src/osd/windows/winalloc.c
index c54eda5e768..8b6b3679519 100644
--- a/src/osd/windows/winalloc.c
+++ b/src/osd/windows/winalloc.c
@@ -328,7 +328,10 @@ void *realloc_file_line(void *memory, size_t size, const char *file, int line)
}
else
{
- newmemory = (void *) GlobalReAlloc(memory, size, GMEM_MOVEABLE);
+ if (memory != NULL)
+ newmemory = (void *) GlobalReAlloc(memory, size, GMEM_MOVEABLE);
+ else
+ newmemory = (void *) GlobalAlloc(GMEM_FIXED, size);
}
return newmemory;
@@ -380,17 +383,27 @@ void CLIB_DECL free(void *memory)
size_t CLIB_DECL _msize(void *memory)
{
- memory_entry *entry = find_entry(memory);
- if (entry == NULL)
+ size_t result;
+
+ if (use_malloc_tracking())
{
- if (winalloc_in_main_code)
+ memory_entry *entry = find_entry(memory);
+ if (entry == NULL)
{
- fprintf(stderr, "Error: msize a non-existant block\n");
- osd_break_into_debugger("Error: msize a non-existant block");
+ if (winalloc_in_main_code)
+ {
+ fprintf(stderr, "Error: msize a non-existant block\n");
+ osd_break_into_debugger("Error: msize a non-existant block");
+ }
+ return 0;
}
- return 0;
+ result = entry->size;
+ }
+ else
+ {
+ result = GlobalSize(memory);
}
- return entry->size;
+ return result;
}
diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak
index d969bc490aa..6212c9ba5e5 100644
--- a/src/osd/windows/windows.mak
+++ b/src/osd/windows/windows.mak
@@ -83,6 +83,11 @@ ifdef MSVC_BUILD
VCONV = $(WINOBJ)/vconv$(EXE)
+# append a 'v' prefix if nothing specified
+ifndef PREFIX
+PREFIX = v
+endif
+
# replace the various compilers with vconv.exe prefixes
CC = @$(VCONV) gcc -I.
LD = @$(VCONV) ld /profile
@@ -103,11 +108,11 @@ LD += /LTCG
endif
ifdef PTR64
-CC += /wd4267 /Wp64
+CC += /wd4267
endif
# add some VC++-specific defines
-DEFS += -D_CRT_SECURE_NO_DEPRECATE -DXML_STATIC -D__inline__=__inline -Dsnprintf=_snprintf -Dvsnprintf=_vsnprintf
+DEFS += -D_CRT_SECURE_NO_DEPRECATE -DXML_STATIC -D__inline__=__inline -Dsnprintf=_snprintf
# make msvcprep into a pre-build step
# OSPREBUILD = $(VCONV)
diff --git a/src/osd/windows/winprefix.h b/src/osd/windows/winprefix.h
index a902120f2e7..fce57fb2f34 100644
--- a/src/osd/windows/winprefix.h
+++ b/src/osd/windows/winprefix.h
@@ -26,6 +26,9 @@ void * realloc_file_line(void *memory, size_t size, const char *file, int line);
#ifdef _MSC_VER
void *__cdecl _alloca(size_t);
#define alloca _alloca
+#if _MSC_VER < 1400
+#define vsnprintf _vsnprintf
+#endif
#endif
#ifdef __GNUC__
diff --git a/src/osd/windows/winsync.c b/src/osd/windows/winsync.c
index ac84373e43d..8ee9e2f03ec 100644
--- a/src/osd/windows/winsync.c
+++ b/src/osd/windows/winsync.c
@@ -16,6 +16,7 @@
// MAME headers
#include "osdcore.h"
+#include "osinline.h"
//============================================================
diff --git a/src/version.c b/src/version.c
index d780ea24ab1..5acc38d07ae 100644
--- a/src/version.c
+++ b/src/version.c
@@ -9,4 +9,4 @@
***************************************************************************/
-char build_version[] = "0.121u1 ("__DATE__")";
+char build_version[] = "0.121u2 ("__DATE__")";